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N_E/./node_modules/lodash/_apply.js","webpack://_N_E/./node_modules/lodash/_arrayEach.js","webpack://_N_E/./node_modules/lodash/_assignValue.js","webpack://_N_E/./node_modules/lodash/_baseAssign.js","webpack://_N_E/./node_modules/lodash/_baseAssignIn.js","webpack://_N_E/./node_modules/lodash/_baseAssignValue.js","webpack://_N_E/./node_modules/lodash/_baseClone.js","webpack://_N_E/./node_modules/lodash/_baseCreate.js","webpack://_N_E/./node_modules/lodash/_baseFilter.js","webpack://_N_E/./node_modules/lodash/_baseIsMap.js","webpack://_N_E/./node_modules/lodash/_baseIsSet.js","webpack://_N_E/./node_modules/lodash/_baseKeysIn.js","webpack://_N_E/./node_modules/lodash/_baseRest.js","webpack://_N_E/./node_modules/lodash/_baseSetToString.js","webpack://_N_E/./node_modules/lodash/_cloneArrayBuffer.js","webpack://_N_E/./node_modules/lodash/_cloneBuffer.js","webpack://_N_E/./node_modules/lodash/_cloneDataView.js","webpack://_N_E/./node_modules/lodash/_cloneRegExp.js","webpack://_N_E/./node_modules/lodash/_cloneSymbol.js","webpack://_N_E/./node_modules/lodash/_cloneTypedArray.js","webpack://_N_E/./node_modules/lodash/_copyArray.js","webpack://_N_E/./node_modules/lodash/_copyObject.js","webpack://_N_E/./node_modules/lodash/_copySymbols.js","webpack://_N_E/./node_modules/lodash/_copySymbolsIn.js","webpack://_N_E/./node_modules/lodash/_defineProperty.js","webpack://_N_E/./node_modules/lodash/_getAllKeysIn.js","webpack://_N_E/./node_modules/lodash/_getPrototype.js","webpack://_N_E/./node_modules/lodash/_getSymbolsIn.js","webpack://_N_E/./node_modules/lodash/_initCloneArray.js","webpack://_N_E/./node_modules/lodash/_initCloneByTag.js","webpack://_N_E/./node_modules/lodash/_initCloneObject.js","webpack://_N_E/./node_modules/lodash/_isIterateeCall.js","webpack://_N_E/./node_modules/lodash/_nativeKeysIn.js","webpack://_N_E/./node_modules/lodash/_overRest.js","webpack://_N_E/./node_modules/lodash/_setToString.js","webpack://_N_E/./node_modules/lodash/_shortOut.js","webpack://_N_E/./node_modules/lodash/clone.js","webpack://_N_E/./node_modules/lodash/constant.js","webpack://_N_E/./node_modules/lodash/defaults.js","webpack://_N_E/./node_modules/lodash/filter.js","webpack://_N_E/./node_modules/lodash/isMap.js","webpack://_N_E/./node_modules/lodash/isSet.js","webpack://_N_E/./node_modules/lodash/keysIn.js","webpack://_N_E/./node_modules/next/dist/compiled/native-url/index.js","webpack://_N_E/./node_modules/node-vibrant/lib/browser.js","webpack://_N_E/./node_modules/node-vibrant/lib/builder.js","webpack://_N_E/./node_modules/node-vibrant/lib/color.js","webpack://_N_E/./node_modules/node-vibrant/lib/filter/default.js","webpack://_N_E/./node_modules/node-vibrant/lib/filter/index.js","webpack://_N_E/./node_modules/node-vibrant/lib/generator/default.js","webpack://_N_E/./node_modules/node-vibrant/lib/generator/index.js","webpack://_N_E/./node_modules/node-vibrant/lib/image/base.js","webpack://_N_E/./node_modules/node-vibrant/lib/image/browser.js","webpack://_N_E/./node_modules/node-vibrant/lib/quantizer/index.js","webpack://_N_E/./node_modules/node-vibrant/lib/quantizer/mmcq.js","webpack://_N_E/./node_modules/node-vibrant/lib/quantizer/pqueue.js","webpack://_N_E/./node_modules/node-vibrant/lib/quantizer/vbox.js","webpack://_N_E/./node_modules/node-vibrant/lib/util.js","webpack://_N_E/./node_modules/node-vibrant/lib/vibrant.js","webpack://_N_E/./node_modules/polished/dist/polished.esm.js","webpack://_N_E/./node_modules/querystring/decode.js","webpack://_N_E/./node_modules/querystring/encode.js","webpack://_N_E/./node_modules/querystring/index.js","webpack://_N_E/./node_modules/wcag-contrast/dist/index.m.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js"],"sourcesContent":["/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nmodule.exports = baseFilter;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","module.exports=function(){var e={715:function(e,t,o){var a,s=(a=o(191))&&\"object\"==typeof a&&\"default\"in a?a.default:a,n=/https?|ftp|gopher|file/;function r(e){\"string\"==typeof e&&(e=d(e));var t=function(e,t,r){var o=e.auth,a=e.hostname,s=e.protocol||\"\",n=e.pathname||\"\",p=e.hash||\"\",c=e.query||\"\",h=!1;o=o?encodeURIComponent(o).replace(/%3A/i,\":\")+\"@\":\"\",e.host?h=o+e.host:a&&(h=o+(~a.indexOf(\":\")?\"[\"+a+\"]\":a),e.port&&(h+=\":\"+e.port)),c&&\"object\"==typeof c&&(c=t.encode(c));var l=e.search||c&&\"?\"+c||\"\";return s&&\":\"!==s.substr(-1)&&(s+=\":\"),e.slashes||(!s||r.test(s))&&!1!==h?(h=\"//\"+(h||\"\"),n&&\"/\"!==n[0]&&(n=\"/\"+n)):h||(h=\"\"),p&&\"#\"!==p[0]&&(p=\"#\"+p),l&&\"?\"!==l[0]&&(l=\"?\"+l),{protocol:s,host:h,pathname:n=n.replace(/[?#]/g,encodeURIComponent),search:l=l.replace(\"#\",\"%23\"),hash:p}}(e,s,n);return\"\"+t.protocol+t.host+t.pathname+t.search+t.hash}var p=\"http://\",c=\"w.w\",i=p+c,u=/^([a-z0-9.+-]*:\\/\\/\\/)([a-z0-9.+-]:\\/*)?/i,f=/https?|ftp|gopher|file/;function h(e,t){var o=\"string\"==typeof e?d(e):e;e=\"object\"==typeof e?r(e):e;var a=d(t),s=\"\";o.protocol&&!o.slashes&&(s=o.protocol,e=e.replace(o.protocol,\"\"),s+=\"/\"===t[0]||\"/\"===e[0]?\"/\":\"\"),s&&a.protocol&&(s=\"\",a.slashes||(s=a.protocol,t=t.replace(a.protocol,\"\")));var n=e.match(u);n&&!a.protocol&&(e=e.substr((s=n[1]+(n[2]||\"\")).length),/^\\/\\/[^/]/.test(t)&&(s=s.slice(0,-1)));var c=new URL(e,i+\"/\"),h=new URL(t,c).toString().replace(i,\"\"),l=a.protocol||o.protocol;return l+=o.slashes||a.slashes?\"//\":\"\",!s&&l?h=h.replace(p,l):s&&(h=h.replace(p,\"\")),f.test(h)||~t.indexOf(\".\")||\"/\"===e.slice(-1)||\"/\"===t.slice(-1)||\"/\"!==h.slice(-1)||(h=h.slice(0,-1)),s&&(h=s+(\"/\"===h[0]?h.substr(1):h)),h}function l(){}l.prototype.parse=d,l.prototype.format=r,l.prototype.resolve=h,l.prototype.resolveObject=h;var m=/^https?|ftp|gopher|file/,v=/^(.*?)([#?].*)/,_=/^([a-z0-9.+-]*:)(\\/{0,3})(.*)/i,b=/^([a-z0-9.+-]*:)?\\/\\/\\/*/i,g=/^([a-z0-9.+-]*:)(\\/{0,2})\\[(.*)\\]$/i;function d(e,t,o){if(void 0===t&&(t=!1),void 0===o&&(o=!1),e&&\"object\"==typeof e&&e instanceof l)return e;var a=(e=e.trim()).match(v);e=a?a[1].replace(/\\\\/g,\"/\")+a[2]:e.replace(/\\\\/g,\"/\"),g.test(e)&&\"/\"!==e.slice(-1)&&(e+=\"/\");var n=!/(^javascript)/.test(e)&&e.match(_),p=b.test(e),h=\"\";n&&(m.test(n[1])||(h=n[1].toLowerCase(),e=\"\"+n[2]+n[3]),n[2]||(p=!1,m.test(n[1])?(h=n[1],e=\"\"+n[3]):e=\"//\"+n[3]),3!==n[2].length&&1!==n[2].length||(h=n[1],e=\"/\"+n[3]));var u,f=(a?a[1]:e).match(/^https?:\\/\\/[^/]+(:[0-9]+)(?=\\/|$)/),d=f&&f[1],y=new l,w=\"\",C=\"\";try{u=new URL(e)}catch(t){w=t,h||o||!/^\\/\\//.test(e)||/^\\/\\/.+[@.]/.test(e)||(C=\"/\",e=e.substr(1));try{u=new URL(e,i)}catch(e){return y.protocol=h,y.href=h,y}}y.slashes=p&&!C,y.host=u.host===c?\"\":u.host,y.hostname=u.hostname===c?\"\":u.hostname.replace(/(\\[|\\])/g,\"\"),y.protocol=w?h||null:u.protocol,y.search=u.search.replace(/\\\\/g,\"%5C\"),y.hash=u.hash.replace(/\\\\/g,\"%5C\");var U=e.split(\"#\");!y.search&&~U[0].indexOf(\"?\")&&(y.search=\"?\"),y.hash||\"\"!==U[1]||(y.hash=\"#\"),y.query=t?s.decode(u.search.substr(1)):y.search.substr(1),y.pathname=C+(n?function(e){return e.replace(/['^|`]/g,function(e){return\"%\"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split(\"\").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:\"%\"+t.toString(16).toUpperCase()}).join(\"\")}catch(e){return t}})}(u.pathname):u.pathname),\"about:\"===y.protocol&&\"blank\"===y.pathname&&(y.protocol=\"\",y.pathname=\"\"),w&&\"/\"!==e[0]&&(y.pathname=y.pathname.substr(1)),h&&!m.test(h)&&\"/\"!==e.slice(-1)&&\"/\"===y.pathname&&(y.pathname=\"\"),y.path=y.pathname+y.search,y.auth=[u.username,u.password].map(decodeURIComponent).filter(Boolean).join(\":\"),y.port=u.port,d&&!y.host.endsWith(d)&&(y.host+=d,y.port=d.slice(1)),y.href=C?\"\"+y.pathname+y.search+y.hash:r(y);var j=/^(file)/.test(y.href)?[\"host\",\"hostname\"]:[];return Object.keys(y).forEach(function(e){~j.indexOf(e)||(y[e]=y[e]||null)}),y}t.parse=d,t.format=r,t.resolve=h,t.resolveObject=function(e,t){return d(h(e,t))},t.Url=l},191:function(e){\"use strict\";e.exports=require(\"querystring\")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var o=t[r]={exports:{}};var a=true;try{e[r](o,o.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}return o.exports}__nccwpck_require__.ab=__dirname+\"/\";return __nccwpck_require__(715)}();","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar vibrant_1 = __importDefault(require(\"./vibrant\"));\nvar browser_1 = __importDefault(require(\"./image/browser\"));\nvibrant_1.default.DefaultOpts.ImageClass = browser_1.default;\nmodule.exports = vibrant_1.default;\n//# sourceMappingURL=browser.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar vibrant_1 = __importDefault(require(\"./vibrant\"));\nvar clone = require(\"lodash/clone\");\nvar Builder = /** @class */ (function () {\n function Builder(src, opts) {\n if (opts === void 0) { opts = {}; }\n this._src = src;\n this._opts = opts;\n this._opts.filters = clone(vibrant_1.default.DefaultOpts.filters);\n }\n Builder.prototype.maxColorCount = function (n) {\n this._opts.colorCount = n;\n return this;\n };\n Builder.prototype.maxDimension = function (d) {\n this._opts.maxDimension = d;\n return this;\n };\n Builder.prototype.addFilter = function (f) {\n this._opts.filters.push(f);\n return this;\n };\n Builder.prototype.removeFilter = function (f) {\n var i = this._opts.filters.indexOf(f);\n if (i > 0)\n this._opts.filters.splice(i);\n return this;\n };\n Builder.prototype.clearFilters = function () {\n this._opts.filters = [];\n return this;\n };\n Builder.prototype.quality = function (q) {\n this._opts.quality = q;\n return this;\n };\n Builder.prototype.useImageClass = function (imageClass) {\n this._opts.ImageClass = imageClass;\n return this;\n };\n Builder.prototype.useGenerator = function (generator) {\n this._opts.generator = generator;\n return this;\n };\n Builder.prototype.useQuantizer = function (quantizer) {\n this._opts.quantizer = quantizer;\n return this;\n };\n Builder.prototype.build = function () {\n return new vibrant_1.default(this._src, this._opts);\n };\n Builder.prototype.getPalette = function (cb) {\n return this.build().getPalette(cb);\n };\n Builder.prototype.getSwatches = function (cb) {\n return this.build().getPalette(cb);\n };\n return Builder;\n}());\nexports.default = Builder;\n//# sourceMappingURL=builder.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Swatch = void 0;\nvar util_1 = require(\"./util\");\nvar filter = require(\"lodash/filter\");\nvar Swatch = /** @class */ (function () {\n function Swatch(rgb, population) {\n this._rgb = rgb;\n this._population = population;\n }\n Swatch.applyFilter = function (colors, f) {\n return typeof f === 'function'\n ? filter(colors, function (_a) {\n var r = _a.r, g = _a.g, b = _a.b;\n return f(r, g, b, 255);\n })\n : colors;\n };\n Object.defineProperty(Swatch.prototype, \"r\", {\n get: function () { return this._rgb[0]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"g\", {\n get: function () { return this._rgb[1]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"b\", {\n get: function () { return this._rgb[2]; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"rgb\", {\n get: function () { return this._rgb; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"hsl\", {\n get: function () {\n if (!this._hsl) {\n var _a = this._rgb, r = _a[0], g = _a[1], b = _a[2];\n this._hsl = util_1.rgbToHsl(r, g, b);\n }\n return this._hsl;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"hex\", {\n get: function () {\n if (!this._hex) {\n var _a = this._rgb, r = _a[0], g = _a[1], b = _a[2];\n this._hex = util_1.rgbToHex(r, g, b);\n }\n return this._hex;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"population\", {\n get: function () { return this._population; },\n enumerable: false,\n configurable: true\n });\n Swatch.prototype.toJSON = function () {\n return {\n rgb: this.rgb,\n population: this.population\n };\n };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getRgb = function () { return this._rgb; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getHsl = function () { return this.hsl; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getPopulation = function () { return this._population; };\n // TODO: deprecate internally, use property instead\n Swatch.prototype.getHex = function () { return this.hex; };\n Swatch.prototype.getYiq = function () {\n if (!this._yiq) {\n var rgb = this._rgb;\n this._yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n }\n return this._yiq;\n };\n Object.defineProperty(Swatch.prototype, \"titleTextColor\", {\n get: function () {\n if (!this._titleTextColor) {\n this._titleTextColor = this.getYiq() < 200 ? '#fff' : '#000';\n }\n return this._titleTextColor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Swatch.prototype, \"bodyTextColor\", {\n get: function () {\n if (!this._bodyTextColor) {\n this._bodyTextColor = this.getYiq() < 150 ? '#fff' : '#000';\n }\n return this._bodyTextColor;\n },\n enumerable: false,\n configurable: true\n });\n Swatch.prototype.getTitleTextColor = function () {\n return this.titleTextColor;\n };\n Swatch.prototype.getBodyTextColor = function () {\n return this.bodyTextColor;\n };\n return Swatch;\n}());\nexports.Swatch = Swatch;\n//# sourceMappingURL=color.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction defaultFilter(r, g, b, a) {\n return a >= 125 &&\n !(r > 250 && g > 250 && b > 250);\n}\nexports.default = defaultFilter;\n//# sourceMappingURL=default.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combineFilters = void 0;\nvar default_1 = require(\"./default\");\nObject.defineProperty(exports, \"Default\", { enumerable: true, get: function () { return default_1.default; } });\nfunction combineFilters(filters) {\n // TODO: caching\n if (!Array.isArray(filters) || filters.length === 0)\n return null;\n return function (r, g, b, a) {\n if (a === 0)\n return false;\n for (var i = 0; i < filters.length; i++) {\n if (!filters[i](r, g, b, a))\n return false;\n }\n return true;\n };\n}\nexports.combineFilters = combineFilters;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../color\");\nvar util_1 = require(\"../util\");\nvar defaults = require(\"lodash/defaults\");\nvar DefaultOpts = {\n targetDarkLuma: 0.26,\n maxDarkLuma: 0.45,\n minLightLuma: 0.55,\n targetLightLuma: 0.74,\n minNormalLuma: 0.3,\n targetNormalLuma: 0.5,\n maxNormalLuma: 0.7,\n targetMutesSaturation: 0.3,\n maxMutesSaturation: 0.4,\n targetVibrantSaturation: 1.0,\n minVibrantSaturation: 0.35,\n weightSaturation: 3,\n weightLuma: 6.5,\n weightPopulation: 0.5\n};\nfunction _findMaxPopulation(swatches) {\n var p = 0;\n swatches.forEach(function (s) {\n p = Math.max(p, s.getPopulation());\n });\n return p;\n}\nfunction _isAlreadySelected(palette, s) {\n return palette.Vibrant === s ||\n palette.DarkVibrant === s ||\n palette.LightVibrant === s ||\n palette.Muted === s ||\n palette.DarkMuted === s ||\n palette.LightMuted === s;\n}\nfunction _createComparisonValue(saturation, targetSaturation, luma, targetLuma, population, maxPopulation, opts) {\n function weightedMean() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n var sum = 0;\n var weightSum = 0;\n for (var i = 0; i < values.length; i += 2) {\n var value = values[i];\n var weight = values[i + 1];\n sum += value * weight;\n weightSum += weight;\n }\n return sum / weightSum;\n }\n function invertDiff(value, targetValue) {\n return 1 - Math.abs(value - targetValue);\n }\n return weightedMean(invertDiff(saturation, targetSaturation), opts.weightSaturation, invertDiff(luma, targetLuma), opts.weightLuma, population / maxPopulation, opts.weightPopulation);\n}\nfunction _findColorVariation(palette, swatches, maxPopulation, targetLuma, minLuma, maxLuma, targetSaturation, minSaturation, maxSaturation, opts) {\n var max = null;\n var maxValue = 0;\n swatches.forEach(function (swatch) {\n var _a = swatch.getHsl(), s = _a[1], l = _a[2];\n if (s >= minSaturation && s <= maxSaturation &&\n l >= minLuma && l <= maxLuma &&\n !_isAlreadySelected(palette, swatch)) {\n var value = _createComparisonValue(s, targetSaturation, l, targetLuma, swatch.getPopulation(), maxPopulation, opts);\n if (max === null || value > maxValue) {\n max = swatch;\n maxValue = value;\n }\n }\n });\n return max;\n}\nfunction _generateVariationColors(swatches, maxPopulation, opts) {\n var palette = {};\n // mVibrantSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.Vibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetNormalLuma, opts.minNormalLuma, opts.maxNormalLuma, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mLightVibrantSwatch = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.LightVibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetLightLuma, opts.minLightLuma, 1, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mDarkVibrantSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,\n // TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);\n palette.DarkVibrant = _findColorVariation(palette, swatches, maxPopulation, opts.targetDarkLuma, 0, opts.maxDarkLuma, opts.targetVibrantSaturation, opts.minVibrantSaturation, 1, opts);\n // mMutedSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.Muted = _findColorVariation(palette, swatches, maxPopulation, opts.targetNormalLuma, opts.minNormalLuma, opts.maxNormalLuma, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n // mLightMutedColor = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.LightMuted = _findColorVariation(palette, swatches, maxPopulation, opts.targetLightLuma, opts.minLightLuma, 1, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n // mDarkMutedSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,\n // TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);\n palette.DarkMuted = _findColorVariation(palette, swatches, maxPopulation, opts.targetDarkLuma, 0, opts.maxDarkLuma, opts.targetMutesSaturation, 0, opts.maxMutesSaturation, opts);\n return palette;\n}\nfunction _generateEmptySwatches(palette, maxPopulation, opts) {\n if (palette.Vibrant === null && palette.DarkVibrant === null && palette.LightVibrant === null) {\n if (palette.DarkVibrant === null && palette.DarkMuted !== null) {\n var _a = palette.DarkMuted.getHsl(), h = _a[0], s = _a[1], l = _a[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightVibrant === null && palette.LightMuted !== null) {\n var _b = palette.LightMuted.getHsl(), h = _b[0], s = _b[1], l = _b[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n }\n if (palette.Vibrant === null && palette.DarkVibrant !== null) {\n var _c = palette.DarkVibrant.getHsl(), h = _c[0], s = _c[1], l = _c[2];\n l = opts.targetNormalLuma;\n palette.Vibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n else if (palette.Vibrant === null && palette.LightVibrant !== null) {\n var _d = palette.LightVibrant.getHsl(), h = _d[0], s = _d[1], l = _d[2];\n l = opts.targetNormalLuma;\n palette.Vibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.DarkVibrant === null && palette.Vibrant !== null) {\n var _e = palette.Vibrant.getHsl(), h = _e[0], s = _e[1], l = _e[2];\n l = opts.targetDarkLuma;\n palette.DarkVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightVibrant === null && palette.Vibrant !== null) {\n var _f = palette.Vibrant.getHsl(), h = _f[0], s = _f[1], l = _f[2];\n l = opts.targetLightLuma;\n palette.LightVibrant = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.Muted === null && palette.Vibrant !== null) {\n var _g = palette.Vibrant.getHsl(), h = _g[0], s = _g[1], l = _g[2];\n l = opts.targetMutesSaturation;\n palette.Muted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.DarkMuted === null && palette.DarkVibrant !== null) {\n var _h = palette.DarkVibrant.getHsl(), h = _h[0], s = _h[1], l = _h[2];\n l = opts.targetMutesSaturation;\n palette.DarkMuted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n if (palette.LightMuted === null && palette.LightVibrant !== null) {\n var _j = palette.LightVibrant.getHsl(), h = _j[0], s = _j[1], l = _j[2];\n l = opts.targetMutesSaturation;\n palette.LightMuted = new color_1.Swatch(util_1.hslToRgb(h, s, l), 0);\n }\n}\nvar DefaultGenerator = function (swatches, opts) {\n opts = defaults({}, opts, DefaultOpts);\n var maxPopulation = _findMaxPopulation(swatches);\n var palette = _generateVariationColors(swatches, maxPopulation, opts);\n _generateEmptySwatches(palette, maxPopulation, opts);\n return palette;\n};\nexports.default = DefaultGenerator;\n//# sourceMappingURL=default.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar default_1 = require(\"./default\");\nObject.defineProperty(exports, \"Default\", { enumerable: true, get: function () { return default_1.default; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImageBase = void 0;\nvar ImageBase = /** @class */ (function () {\n function ImageBase() {\n }\n ImageBase.prototype.scaleDown = function (opts) {\n var width = this.getWidth();\n var height = this.getHeight();\n var ratio = 1;\n if (opts.maxDimension > 0) {\n var maxSide = Math.max(width, height);\n if (maxSide > opts.maxDimension)\n ratio = opts.maxDimension / maxSide;\n }\n else {\n ratio = 1 / opts.quality;\n }\n if (ratio < 1)\n this.resize(width * ratio, height * ratio, ratio);\n };\n ImageBase.prototype.applyFilter = function (filter) {\n var imageData = this.getImageData();\n if (typeof filter === 'function') {\n var pixels = imageData.data;\n var n = pixels.length / 4;\n var offset = void 0, r = void 0, g = void 0, b = void 0, a = void 0;\n for (var i = 0; i < n; i++) {\n offset = i * 4;\n r = pixels[offset + 0];\n g = pixels[offset + 1];\n b = pixels[offset + 2];\n a = pixels[offset + 3];\n // Mark ignored color\n if (!filter(r, g, b, a))\n pixels[offset + 3] = 0;\n }\n }\n return Promise.resolve(imageData);\n };\n return ImageBase;\n}());\nexports.ImageBase = ImageBase;\n//# sourceMappingURL=base.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar base_1 = require(\"./base\");\nvar Url = __importStar(require(\"url\"));\nfunction isRelativeUrl(url) {\n var u = Url.parse(url);\n return u.protocol === null &&\n u.host === null &&\n u.port === null;\n}\nfunction isSameOrigin(a, b) {\n var ua = Url.parse(a);\n var ub = Url.parse(b);\n // https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\n return ua.protocol === ub.protocol &&\n ua.hostname === ub.hostname &&\n ua.port === ub.port;\n}\nvar BrowserImage = /** @class */ (function (_super) {\n __extends(BrowserImage, _super);\n function BrowserImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrowserImage.prototype._initCanvas = function () {\n var img = this.image;\n var canvas = this._canvas = document.createElement('canvas');\n var context = this._context = canvas.getContext('2d');\n canvas.className = 'vibrant-canvas';\n canvas.style.display = 'none';\n this._width = canvas.width = img.width;\n this._height = canvas.height = img.height;\n context.drawImage(img, 0, 0);\n document.body.appendChild(canvas);\n };\n BrowserImage.prototype.load = function (image) {\n var _this = this;\n var img = null;\n var src = null;\n if (typeof image === 'string') {\n img = document.createElement('img');\n if (!isRelativeUrl(image) && !isSameOrigin(window.location.href, image)) {\n img.crossOrigin = 'anonymous';\n }\n src = img.src = image;\n }\n else if (image instanceof HTMLImageElement) {\n img = image;\n src = image.src;\n }\n else {\n return Promise.reject(new Error(\"Cannot load buffer as an image in browser\"));\n }\n this.image = img;\n return new Promise(function (resolve, reject) {\n var onImageLoad = function () {\n _this._initCanvas();\n resolve(_this);\n };\n if (img.complete) {\n // Already loaded\n onImageLoad();\n }\n else {\n img.onload = onImageLoad;\n img.onerror = function (e) { return reject(new Error(\"Fail to load image: \" + src)); };\n }\n });\n };\n BrowserImage.prototype.clear = function () {\n this._context.clearRect(0, 0, this._width, this._height);\n };\n BrowserImage.prototype.update = function (imageData) {\n this._context.putImageData(imageData, 0, 0);\n };\n BrowserImage.prototype.getWidth = function () {\n return this._width;\n };\n BrowserImage.prototype.getHeight = function () {\n return this._height;\n };\n BrowserImage.prototype.resize = function (targetWidth, targetHeight, ratio) {\n var _a = this, canvas = _a._canvas, context = _a._context, img = _a.image;\n this._width = canvas.width = targetWidth;\n this._height = canvas.height = targetHeight;\n context.scale(ratio, ratio);\n context.drawImage(img, 0, 0);\n };\n BrowserImage.prototype.getPixelCount = function () {\n return this._width * this._height;\n };\n BrowserImage.prototype.getImageData = function () {\n return this._context.getImageData(0, 0, this._width, this._height);\n };\n BrowserImage.prototype.remove = function () {\n if (this._canvas && this._canvas.parentNode) {\n this._canvas.parentNode.removeChild(this._canvas);\n }\n };\n return BrowserImage;\n}(base_1.ImageBase));\nexports.default = BrowserImage;\n//# sourceMappingURL=browser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebWorker = void 0;\nvar mmcq_1 = require(\"./mmcq\");\nObject.defineProperty(exports, \"MMCQ\", { enumerable: true, get: function () { return mmcq_1.default; } });\nexports.WebWorker = null;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../color\");\nvar vbox_1 = __importDefault(require(\"./vbox\"));\nvar pqueue_1 = __importDefault(require(\"./pqueue\"));\nvar fractByPopulations = 0.75;\nfunction _splitBoxes(pq, target) {\n var lastSize = pq.size();\n while (pq.size() < target) {\n var vbox = pq.pop();\n if (vbox && vbox.count() > 0) {\n var _a = vbox.split(), vbox1 = _a[0], vbox2 = _a[1];\n pq.push(vbox1);\n if (vbox2 && vbox2.count() > 0)\n pq.push(vbox2);\n // No more new boxes, converged\n if (pq.size() === lastSize) {\n break;\n }\n else {\n lastSize = pq.size();\n }\n }\n else {\n break;\n }\n }\n}\nvar MMCQ = function (pixels, opts) {\n if (pixels.length === 0 || opts.colorCount < 2 || opts.colorCount > 256) {\n throw new Error('Wrong MMCQ parameters');\n }\n var vbox = vbox_1.default.build(pixels);\n var hist = vbox.hist;\n var colorCount = Object.keys(hist).length;\n var pq = new pqueue_1.default(function (a, b) { return a.count() - b.count(); });\n pq.push(vbox);\n // first set of colors, sorted by population\n _splitBoxes(pq, fractByPopulations * opts.colorCount);\n // Re-order\n var pq2 = new pqueue_1.default(function (a, b) { return a.count() * a.volume() - b.count() * b.volume(); });\n pq2.contents = pq.contents;\n // next set - generate the median cuts using the (npix * vol) sorting.\n _splitBoxes(pq2, opts.colorCount - pq2.size());\n // calculate the actual colors\n return generateSwatches(pq2);\n};\nfunction generateSwatches(pq) {\n var swatches = [];\n while (pq.size()) {\n var v = pq.pop();\n var color = v.avg();\n var r = color[0], g = color[1], b = color[2];\n swatches.push(new color_1.Swatch(color, v.count()));\n }\n return swatches;\n}\nexports.default = MMCQ;\n//# sourceMappingURL=mmcq.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PQueue = /** @class */ (function () {\n function PQueue(comparator) {\n this._comparator = comparator;\n this.contents = [];\n this._sorted = false;\n }\n PQueue.prototype._sort = function () {\n if (!this._sorted) {\n this.contents.sort(this._comparator);\n this._sorted = true;\n }\n };\n PQueue.prototype.push = function (item) {\n this.contents.push(item);\n this._sorted = false;\n };\n PQueue.prototype.peek = function (index) {\n this._sort();\n index = typeof index === 'number' ? index : this.contents.length - 1;\n return this.contents[index];\n };\n PQueue.prototype.pop = function () {\n this._sort();\n return this.contents.pop();\n };\n PQueue.prototype.size = function () {\n return this.contents.length;\n };\n PQueue.prototype.map = function (mapper) {\n this._sort();\n return this.contents.map(mapper);\n };\n return PQueue;\n}());\nexports.default = PQueue;\n//# sourceMappingURL=pqueue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar VBox = /** @class */ (function () {\n function VBox(r1, r2, g1, g2, b1, b2, hist) {\n this._volume = -1;\n this._count = -1;\n this.dimension = { r1: r1, r2: r2, g1: g1, g2: g2, b1: b1, b2: b2 };\n this.hist = hist;\n }\n VBox.build = function (pixels, shouldIgnore) {\n var hn = 1 << (3 * util_1.SIGBITS);\n var hist = new Uint32Array(hn);\n var rmax;\n var rmin;\n var gmax;\n var gmin;\n var bmax;\n var bmin;\n var r;\n var g;\n var b;\n var a;\n rmax = gmax = bmax = 0;\n rmin = gmin = bmin = Number.MAX_VALUE;\n var n = pixels.length / 4;\n var i = 0;\n while (i < n) {\n var offset = i * 4;\n i++;\n r = pixels[offset + 0];\n g = pixels[offset + 1];\n b = pixels[offset + 2];\n a = pixels[offset + 3];\n // Ignored pixels' alpha is marked as 0 in filtering stage\n if (a === 0)\n continue;\n r = r >> util_1.RSHIFT;\n g = g >> util_1.RSHIFT;\n b = b >> util_1.RSHIFT;\n var index = util_1.getColorIndex(r, g, b);\n hist[index] += 1;\n if (r > rmax)\n rmax = r;\n if (r < rmin)\n rmin = r;\n if (g > gmax)\n gmax = g;\n if (g < gmin)\n gmin = g;\n if (b > bmax)\n bmax = b;\n if (b < bmin)\n bmin = b;\n }\n return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, hist);\n };\n VBox.prototype.invalidate = function () {\n this._volume = this._count = -1;\n this._avg = null;\n };\n VBox.prototype.volume = function () {\n if (this._volume < 0) {\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n this._volume = (r2 - r1 + 1) * (g2 - g1 + 1) * (b2 - b1 + 1);\n }\n return this._volume;\n };\n VBox.prototype.count = function () {\n if (this._count < 0) {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var c = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n c += hist[index];\n }\n }\n }\n this._count = c;\n }\n return this._count;\n };\n VBox.prototype.clone = function () {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n return new VBox(r1, r2, g1, g2, b1, b2, hist);\n };\n VBox.prototype.avg = function () {\n if (!this._avg) {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var ntot = 0;\n var mult = 1 << (8 - util_1.SIGBITS);\n var rsum = void 0;\n var gsum = void 0;\n var bsum = void 0;\n rsum = gsum = bsum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n var h = hist[index];\n ntot += h;\n rsum += (h * (r + 0.5) * mult);\n gsum += (h * (g + 0.5) * mult);\n bsum += (h * (b + 0.5) * mult);\n }\n }\n }\n if (ntot) {\n this._avg = [\n ~~(rsum / ntot),\n ~~(gsum / ntot),\n ~~(bsum / ntot)\n ];\n }\n else {\n this._avg = [\n ~~(mult * (r1 + r2 + 1) / 2),\n ~~(mult * (g1 + g2 + 1) / 2),\n ~~(mult * (b1 + b2 + 1) / 2)\n ];\n }\n }\n return this._avg;\n };\n VBox.prototype.contains = function (rgb) {\n var r = rgb[0], g = rgb[1], b = rgb[2];\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n r >>= util_1.RSHIFT;\n g >>= util_1.RSHIFT;\n b >>= util_1.RSHIFT;\n return r >= r1 && r <= r2 &&\n g >= g1 && g <= g2 &&\n b >= b1 && b <= b2;\n };\n VBox.prototype.split = function () {\n var hist = this.hist;\n var _a = this.dimension, r1 = _a.r1, r2 = _a.r2, g1 = _a.g1, g2 = _a.g2, b1 = _a.b1, b2 = _a.b2;\n var count = this.count();\n if (!count)\n return [];\n if (count === 1)\n return [this.clone()];\n var rw = r2 - r1 + 1;\n var gw = g2 - g1 + 1;\n var bw = b2 - b1 + 1;\n var maxw = Math.max(rw, gw, bw);\n var accSum = null;\n var sum;\n var total;\n sum = total = 0;\n var maxd = null;\n if (maxw === rw) {\n maxd = 'r';\n accSum = new Uint32Array(r2 + 1);\n for (var r = r1; r <= r2; r++) {\n sum = 0;\n for (var g = g1; g <= g2; g++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[r] = total;\n }\n }\n else if (maxw === gw) {\n maxd = 'g';\n accSum = new Uint32Array(g2 + 1);\n for (var g = g1; g <= g2; g++) {\n sum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var b = b1; b <= b2; b++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[g] = total;\n }\n }\n else {\n maxd = 'b';\n accSum = new Uint32Array(b2 + 1);\n for (var b = b1; b <= b2; b++) {\n sum = 0;\n for (var r = r1; r <= r2; r++) {\n for (var g = g1; g <= g2; g++) {\n var index = util_1.getColorIndex(r, g, b);\n sum += hist[index];\n }\n }\n total += sum;\n accSum[b] = total;\n }\n }\n var splitPoint = -1;\n var reverseSum = new Uint32Array(accSum.length);\n for (var i = 0; i < accSum.length; i++) {\n var d = accSum[i];\n if (splitPoint < 0 && d > total / 2)\n splitPoint = i;\n reverseSum[i] = total - d;\n }\n var vbox = this;\n function doCut(d) {\n var dim1 = d + '1';\n var dim2 = d + '2';\n var d1 = vbox.dimension[dim1];\n var d2 = vbox.dimension[dim2];\n var vbox1 = vbox.clone();\n var vbox2 = vbox.clone();\n var left = splitPoint - d1;\n var right = d2 - splitPoint;\n if (left <= right) {\n d2 = Math.min(d2 - 1, ~~(splitPoint + right / 2));\n d2 = Math.max(0, d2);\n }\n else {\n d2 = Math.max(d1, ~~(splitPoint - 1 - left / 2));\n d2 = Math.min(vbox.dimension[dim2], d2);\n }\n while (!accSum[d2])\n d2++;\n var c2 = reverseSum[d2];\n while (!c2 && accSum[d2 - 1])\n c2 = reverseSum[--d2];\n vbox1.dimension[dim2] = d2;\n vbox2.dimension[dim1] = d2 + 1;\n return [vbox1, vbox2];\n }\n return doCut(maxd);\n };\n return VBox;\n}());\nexports.default = VBox;\n//# sourceMappingURL=vbox.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getColorIndex = exports.getColorDiffStatus = exports.hexDiff = exports.rgbDiff = exports.deltaE94 = exports.rgbToCIELab = exports.xyzToCIELab = exports.rgbToXyz = exports.hslToRgb = exports.rgbToHsl = exports.rgbToHex = exports.hexToRgb = exports.defer = exports.RSHIFT = exports.SIGBITS = exports.DELTAE94_DIFF_STATUS = void 0;\nexports.DELTAE94_DIFF_STATUS = {\n NA: 0,\n PERFECT: 1,\n CLOSE: 2,\n GOOD: 10,\n SIMILAR: 50\n};\nexports.SIGBITS = 5;\nexports.RSHIFT = 8 - exports.SIGBITS;\nfunction defer() {\n var resolve;\n var reject;\n // eslint-disable-next-line promise/param-names\n var promise = new Promise(function (_resolve, _reject) {\n resolve = _resolve;\n reject = _reject;\n });\n // @ts-ignore\n return { resolve: resolve, reject: reject, promise: promise };\n}\nexports.defer = defer;\nfunction hexToRgb(hex) {\n var m = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return m === null ? null : [m[1], m[2], m[3]].map(function (s) { return parseInt(s, 16); });\n}\nexports.hexToRgb = hexToRgb;\nfunction rgbToHex(r, g, b) {\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1, 7);\n}\nexports.rgbToHex = rgbToHex;\nfunction rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n if (max === min) {\n h = s = 0;\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n // @ts-ignore\n h /= 6;\n }\n // @ts-ignore\n return [h, s, l];\n}\nexports.rgbToHsl = rgbToHsl;\nfunction hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n function hue2rgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n if (s === 0) {\n r = g = b = l;\n }\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 return [\n r * 255,\n g * 255,\n b * 255\n ];\n}\nexports.hslToRgb = hslToRgb;\nfunction rgbToXyz(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n r = r > 0.04045 ? Math.pow((r + 0.005) / 1.055, 2.4) : r / 12.92;\n g = g > 0.04045 ? Math.pow((g + 0.005) / 1.055, 2.4) : g / 12.92;\n b = b > 0.04045 ? Math.pow((b + 0.005) / 1.055, 2.4) : b / 12.92;\n r *= 100;\n g *= 100;\n b *= 100;\n var x = r * 0.4124 + g * 0.3576 + b * 0.1805;\n var y = r * 0.2126 + g * 0.7152 + b * 0.0722;\n var z = r * 0.0193 + g * 0.1192 + b * 0.9505;\n return [x, y, z];\n}\nexports.rgbToXyz = rgbToXyz;\nfunction xyzToCIELab(x, y, z) {\n var REF_X = 95.047;\n var REF_Y = 100;\n var REF_Z = 108.883;\n x /= REF_X;\n y /= REF_Y;\n z /= REF_Z;\n x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;\n y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;\n z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;\n var L = 116 * y - 16;\n var a = 500 * (x - y);\n var b = 200 * (y - z);\n return [L, a, b];\n}\nexports.xyzToCIELab = xyzToCIELab;\nfunction rgbToCIELab(r, g, b) {\n var _a = rgbToXyz(r, g, b), x = _a[0], y = _a[1], z = _a[2];\n return xyzToCIELab(x, y, z);\n}\nexports.rgbToCIELab = rgbToCIELab;\nfunction deltaE94(lab1, lab2) {\n var WEIGHT_L = 1;\n var WEIGHT_C = 1;\n var WEIGHT_H = 1;\n var L1 = lab1[0], a1 = lab1[1], b1 = lab1[2];\n var L2 = lab2[0], a2 = lab2[1], b2 = lab2[2];\n var dL = L1 - L2;\n var da = a1 - a2;\n var db = b1 - b2;\n var xC1 = Math.sqrt(a1 * a1 + b1 * b1);\n var xC2 = Math.sqrt(a2 * a2 + b2 * b2);\n var xDL = L2 - L1;\n var xDC = xC2 - xC1;\n var xDE = Math.sqrt(dL * dL + da * da + db * db);\n var xDH = (Math.sqrt(xDE) > Math.sqrt(Math.abs(xDL)) + Math.sqrt(Math.abs(xDC)))\n ? Math.sqrt(xDE * xDE - xDL * xDL - xDC * xDC)\n : 0;\n var xSC = 1 + 0.045 * xC1;\n var xSH = 1 + 0.015 * xC1;\n xDL /= WEIGHT_L;\n xDC /= WEIGHT_C * xSC;\n xDH /= WEIGHT_H * xSH;\n return Math.sqrt(xDL * xDL + xDC * xDC + xDH * xDH);\n}\nexports.deltaE94 = deltaE94;\nfunction rgbDiff(rgb1, rgb2) {\n var lab1 = rgbToCIELab.apply(undefined, rgb1);\n var lab2 = rgbToCIELab.apply(undefined, rgb2);\n return deltaE94(lab1, lab2);\n}\nexports.rgbDiff = rgbDiff;\nfunction hexDiff(hex1, hex2) {\n var rgb1 = hexToRgb(hex1);\n var rgb2 = hexToRgb(hex2);\n return rgbDiff(rgb1, rgb2);\n}\nexports.hexDiff = hexDiff;\nfunction getColorDiffStatus(d) {\n if (d < exports.DELTAE94_DIFF_STATUS.NA) {\n return 'N/A';\n }\n // Not perceptible by human eyes\n if (d <= exports.DELTAE94_DIFF_STATUS.PERFECT) {\n return 'Perfect';\n }\n // Perceptible through close observation\n if (d <= exports.DELTAE94_DIFF_STATUS.CLOSE) {\n return 'Close';\n }\n // Perceptible at a glance\n if (d <= exports.DELTAE94_DIFF_STATUS.GOOD) {\n return 'Good';\n }\n // Colors are more similar than opposite\n if (d < exports.DELTAE94_DIFF_STATUS.SIMILAR) {\n return 'Similar';\n }\n return 'Wrong';\n}\nexports.getColorDiffStatus = getColorDiffStatus;\nfunction getColorIndex(r, g, b) {\n return (r << (2 * exports.SIGBITS)) + (g << exports.SIGBITS) + b;\n}\nexports.getColorIndex = getColorIndex;\n//# sourceMappingURL=util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"./color\");\nvar builder_1 = __importDefault(require(\"./builder\"));\nvar Util = __importStar(require(\"./util\"));\nvar Quantizer = __importStar(require(\"./quantizer\"));\nvar Generator = __importStar(require(\"./generator\"));\nvar Filters = __importStar(require(\"./filter\"));\nvar defaults = require(\"lodash/defaults\");\nvar Vibrant = /** @class */ (function () {\n function Vibrant(_src, opts) {\n this._src = _src;\n this.opts = defaults({}, opts, Vibrant.DefaultOpts);\n this.opts.combinedFilter = Filters.combineFilters(this.opts.filters);\n }\n Vibrant.from = function (src) {\n return new builder_1.default(src);\n };\n Vibrant.prototype._process = function (image, opts) {\n var quantizer = opts.quantizer, generator = opts.generator;\n image.scaleDown(opts);\n return image.applyFilter(opts.combinedFilter)\n .then(function (imageData) { return quantizer(imageData.data, opts); })\n .then(function (colors) { return color_1.Swatch.applyFilter(colors, opts.combinedFilter); })\n .then(function (colors) { return Promise.resolve(generator(colors)); });\n };\n Vibrant.prototype.palette = function () {\n return this.swatches();\n };\n Vibrant.prototype.swatches = function () {\n return this._palette;\n };\n Vibrant.prototype.getPalette = function (cb) {\n var _this = this;\n var image = new this.opts.ImageClass();\n var result = image.load(this._src)\n .then(function (image) { return _this._process(image, _this.opts); })\n .then(function (palette) {\n _this._palette = palette;\n image.remove();\n return palette;\n }, function (err) {\n image.remove();\n throw err;\n });\n if (cb)\n result.then(function (palette) { return cb(null, palette); }, function (err) { return cb(err); });\n return result;\n };\n Vibrant.Builder = builder_1.default;\n Vibrant.Quantizer = Quantizer;\n Vibrant.Generator = Generator;\n Vibrant.Filter = Filters;\n Vibrant.Util = Util;\n Vibrant.Swatch = color_1.Swatch;\n Vibrant.DefaultOpts = {\n colorCount: 64,\n quality: 5,\n generator: Generator.Default,\n ImageClass: null,\n quantizer: Quantizer.MMCQ,\n filters: [Filters.Default]\n };\n return Vibrant;\n}());\nexports.default = Vibrant;\n//# sourceMappingURL=vibrant.js.map","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbols.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbols.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pxtoFactory('em');\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\n\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pxtoFactory('rem');\n\nvar defaultFontSize = 16;\n\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n\n throw new PolishedError(78, deconstructedValue[1]);\n}\n\nfunction getBaseFromDoc() {\n /* eslint-disable */\n\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n\n /* istanbul ignore next */\n\n\n return defaultFontSize;\n}\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\n\n\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\n\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\n\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nvar _templateObject$1;\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\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 gold: 'ffd700',\n goldenrod: 'daa520',\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 lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\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: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\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: '639',\n red: 'f00',\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: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsla\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* :: */\n(adjustHue);\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, ).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* :: */\n(darken);\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* :: */\n(desaturate);\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* :: */\n(lighten);\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * (parseFloat(weight) / 1.0) + color2.alpha * (1 - parseFloat(weight) / 1.0)\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* :: */\n(mix);\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* :: */\n(opacify);\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n\n if (strict === void 0) {\n strict = true;\n }\n\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* :: */\n(saturate);\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* :: */\n(setHue);\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* :: */\n(setLightness);\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* :: */\n(setSaturation);\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* :: */\n(shade);\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* :: */\n(tint);\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff');\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')},\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* :: */\n(transparentize);\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken as darken, curriedDesaturate as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten as lighten, linearGradient, margin, math, meetsContrastGuidelines, curriedMix as mix, modularScale, normalize, curriedOpacify as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate as saturate, curriedSetHue as setHue, curriedSetLightness as setLightness, curriedSetSaturation as setSaturation, curriedShade as shade, size, stripUnit, textInputs, timingFunctions, curriedTint as tint, toColorString, transitions, curriedTransparentize as transparentize, triangle, wordWrap };\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","var n=.2126,r=.7152,t=.0722,e=1/12.92;function u(n){return Math.pow((n+.055)/1.055,2.4)}function a(a){var i=a[0]/255,c=a[1]/255,o=a[2]/255,s=i<=.03928?i*e:u(i),f=c<=.03928?c*e:u(c),l=o<=.03928?o*e:u(o);return s*n+f*r+l*t}function i(n){var r=255;8===(n=n.replace(/^#/,\"\")).length&&(r=parseInt(n.slice(6,8),16),n=n.substring(0,6)),4===n.length&&(r=parseInt(n.slice(3,4).repeat(2),16),n=n.substring(0,3)),3===n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var t=parseInt(n,16);return[t>>16,t>>8&255,255&t,r]}function c(n,r){return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function o(n,r){return c(a(n),a(r))}function s(n,r){return o(i(n),i(r))}function f(n){return n>=7?\"AAA\":n>=4.5?\"AA\":n>=3?\"AA Large\":\"Fail\"}export{c as luminance,o as rgb,s as hex,f as score};\n//# sourceMappingURL=index.m.js.map\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}"],"names":["module","exports","func","thisArg","args","length","call","apply","array","iteratee","index","baseAssignValue","eq","hasOwnProperty","Object","prototype","object","key","value","objValue","undefined","copyObject","keys","source","keysIn","defineProperty","Stack","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isArray","isBuffer","isMap","isObject","isSet","argsTag","funcTag","objectTag","cloneableTags","baseClone","bitmask","customizer","stack","result","isDeep","isFlat","isFull","isArr","tag","isFunc","stacked","get","set","forEach","subValue","add","props","objectCreate","create","baseCreate","proto","baseEach","collection","predicate","push","isObjectLike","isPrototype","nativeKeysIn","isProto","identity","overRest","setToString","start","constant","baseSetToString","string","Uint8Array","arrayBuffer","constructor","byteLength","root","freeExports","nodeType","freeModule","Buffer","allocUnsafe","buffer","slice","copy","cloneArrayBuffer","dataView","byteOffset","reFlags","regexp","exec","lastIndex","Symbol","symbolProto","symbolValueOf","valueOf","symbol","typedArray","Array","isNew","newValue","getSymbols","getSymbolsIn","getNative","e","baseGetAllKeys","getPrototype","overArg","getPrototypeOf","arrayPush","stubArray","getOwnPropertySymbols","input","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","Ctor","isArrayLike","isIndex","type","nativeMax","Math","max","transform","arguments","otherArgs","this","shortOut","nativeNow","Date","now","count","lastCalled","stamp","remaining","baseRest","isIterateeCall","objectProto","defaults","sources","guard","propsIndex","propsLength","arrayFilter","baseFilter","baseIteratee","baseIsMap","baseUnary","nodeUtil","nodeIsMap","baseIsSet","nodeIsSet","arrayLikeKeys","baseKeysIn","t","o","a","s","default","n","r","d","auth","hostname","protocol","pathname","p","hash","c","query","h","encodeURIComponent","replace","host","indexOf","port","encode","l","search","substr","slashes","test","i","u","f","match","URL","toString","parse","format","resolve","resolveObject","m","v","_","b","g","trim","toLowerCase","y","w","C","href","U","split","decode","charCodeAt","toUpperCase","decodeURIComponent","map","join","path","username","password","filter","Boolean","endsWith","j","Url","__nccwpck_require__","ab","__dirname","__importDefault","mod","__esModule","vibrant_1","browser_1","DefaultOpts","ImageClass","clone","Builder","src","opts","_src","_opts","filters","maxColorCount","colorCount","maxDimension","addFilter","removeFilter","splice","clearFilters","quality","q","useImageClass","imageClass","useGenerator","generator","useQuantizer","quantizer","build","getPalette","cb","getSwatches","Swatch","util_1","rgb","population","_rgb","_population","applyFilter","colors","_a","enumerable","configurable","_hsl","rgbToHsl","_hex","rgbToHex","toJSON","getRgb","getHsl","hsl","getPopulation","getHex","hex","getYiq","_yiq","_titleTextColor","_bodyTextColor","getTitleTextColor","titleTextColor","getBodyTextColor","bodyTextColor","combineFilters","default_1","color_1","targetDarkLuma","maxDarkLuma","minLightLuma","targetLightLuma","minNormalLuma","targetNormalLuma","maxNormalLuma","targetMutesSaturation","maxMutesSaturation","targetVibrantSaturation","minVibrantSaturation","weightSaturation","weightLuma","weightPopulation","_findColorVariation","palette","swatches","maxPopulation","targetLuma","minLuma","maxLuma","targetSaturation","minSaturation","maxSaturation","maxValue","swatch","Vibrant","DarkVibrant","LightVibrant","Muted","DarkMuted","LightMuted","_isAlreadySelected","saturation","luma","invertDiff","targetValue","abs","values","_i","sum","weightSum","weight","weightedMean","_createComparisonValue","_findMaxPopulation","_generateVariationColors","hslToRgb","_b","_c","_d","_e","_f","_g","_h","_j","_generateEmptySwatches","ImageBase","scaleDown","width","getWidth","height","getHeight","ratio","maxSide","resize","imageData","getImageData","pixels","data","offset","Promise","__extends","extendStatics","setPrototypeOf","__proto__","__","__createBinding","k","k2","__setModuleDefault","__importStar","base_1","BrowserImage","_super","_initCanvas","img","image","canvas","_canvas","document","createElement","context","_context","getContext","className","style","display","_width","_height","drawImage","body","appendChild","load","_this","url","isRelativeUrl","ua","ub","isSameOrigin","window","location","crossOrigin","HTMLImageElement","reject","Error","onImageLoad","complete","onload","onerror","clear","clearRect","update","putImageData","targetWidth","targetHeight","scale","getPixelCount","remove","parentNode","removeChild","WebWorker","mmcq_1","vbox_1","pqueue_1","_splitBoxes","pq","target","lastSize","size","vbox","pop","vbox1","vbox2","hist","pq2","volume","contents","color","avg","generateSwatches","PQueue","comparator","_comparator","_sorted","_sort","sort","item","peek","mapper","VBox","r1","r2","g1","g2","b1","b2","_volume","_count","dimension","shouldIgnore","rmax","rmin","gmax","gmin","bmax","bmin","hn","SIGBITS","Uint32Array","Number","MAX_VALUE","RSHIFT","getColorIndex","invalidate","_avg","ntot","mult","rsum","gsum","bsum","contains","total","rw","gw","bw","maxw","accSum","maxd","splitPoint","reverseSum","dim1","dim2","d1","d2","left","right","min","c2","doCut","hexToRgb","parseInt","rgbToXyz","pow","xyzToCIELab","x","z","rgbToCIELab","deltaE94","lab1","lab2","L1","a1","L2","a2","dL","da","db","xC1","sqrt","xDL","xDC","xDE","xDH","rgbDiff","rgb1","rgb2","getColorDiffStatus","hexDiff","defer","DELTAE94_DIFF_STATUS","NA","PERFECT","CLOSE","GOOD","SIMILAR","promise","_resolve","_reject","hue2rgb","hex1","hex2","builder_1","Util","Quantizer","Generator","Filters","combinedFilter","from","_process","then","_palette","err","Filter","Default","MMCQ","PolishedError","_Error","code","colorToInt","round","convertToInt","red","green","blue","hue","lightness","convert","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","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","gold","goldenrod","gray","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","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","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","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColor","normalizedColorName","nameToHex","alpha","parseFloat","toFixed","_alpha","rgbMatched","rgbaMatched","substring","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","reduceHexValue","numberToHex","rgba","firstValue","secondValue","thirdValue","fourthValue","rgbValue","curried","acc","combined","concat","curry","mix","otherColor","parsedColor1","color1","parsedColor2","color2","alphaDelta","weight1","weight2","floor","curriedMix","shade","percentage","curriedShade","obj","prop","qs","sep","options","maxKeys","len","kstr","vstr","idx","stringifyPrimitive","isFinite","name","ks","stringify","repeat","_inheritsLoose","subClass","superClass","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","_construct","Parent","Class","isNativeReflectConstruct","instance","Function","bind","_wrapNativeSuper","_cache","Map","fn","TypeError","has","Wrapper","writable"],"sourceRoot":""}