Comparing version 1.6.2 to 1.7.0
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.polished=e.polished||{})}(this,function(e){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function t(e,t){if(!e)return t.toLowerCase();var n=e.split("-");if(n.length>1)return n.splice(1,0,t),n.reduce(function(e,t){return""+e+r(t)});var a=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===a?""+e+t:a}function n(e,r){for(var n={},a=0;a<r.length;a+=1)r[a]&&(n[t(e,Ae[a])]=r[a]);return n}function a(e){for(var r=arguments.length,t=Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];var o=t[0],i=t[1],u=void 0===i?o:i,l=t[2],s=void 0===l?o:l,f=t[3];return n(e,[o,u,s,void 0===f?u:f])}function o(e){var r=parseFloat(e);return isNaN(r)?e:r}function i(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1em",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"perfectFourth";if("number"!=typeof e)throw new Error("Please provide a number of steps to the modularScale helper.");if("string"==typeof t&&!Ce[t])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var n="string"==typeof r?o(r):r,a="string"==typeof t?Ce[t]:t;if("string"==typeof n)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+r+'"');return n*Math.pow(a,e)+"em"}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return Me({},e+"::after",{clear:"both",content:'""',display:"table"})}function l(){return{display:"inline-block",maxWidth:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"}}function s(e,r){return r.map(function(r){return'url("'+e+"."+r+'")'}).join(", ")}function f(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function c(e,r,t){var n=[];return r&&n.push(f(r)),e&&n.push(s(e,t)),n.join(", ")}function d(e){var r=e.fontFamily,t=e.fontFilePath,n=e.fontStretch,a=e.fontStyle,o=e.fontVariant,i=e.fontWeight,u=e.fileFormats,l=void 0===u?["eot","woff2","woff","ttf","svg"]:u,s=e.localFonts,f=e.unicodeRange;if(!r)throw new Error("fontFace expects a name of a font-family.");if(!t&&!s)throw new Error("fontFace expects either the path to the font file(s) or a name of a local copy.");if(s&&!Array.isArray(s))throw new Error("fontFace expects localFonts to be an array.");if(!Array.isArray(l))throw new Error("fontFace expects fileFormats to be an array.");var d={"@font-face":{fontFamily:r,src:c(t,s,l),unicodeRange:f,fontStretch:n,fontStyle:a,fontVariant:o,fontWeight:i}};return JSON.parse(JSON.stringify(d))}function p(){return{textIndent:"101%",overflow:"hidden",whiteSpace:"nowrap"}}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.3;return"\n @media only screen and (-webkit-min-device-pixel-ratio: "+e+"),\n only screen and (min--moz-device-pixel-ratio: "+e+"),\n only screen and (-o-min-device-pixel-ratio: "+e+"/1),\n only screen and (min-resolution: "+Math.round(96*e)+"dpi),\n only screen and (min-resolution: "+e+"dppx)\n "}function h(e,r){var t=qe({},e);return Object.keys(r).forEach(function(e){t[e]?t[e]=qe({},t[e],r[e]):t[e]=qe({},r[e])}),t}function g(e){return e?Be:h(Be,We)}function m(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return r={},Me(r,t+"::-webkit-input-placeholder",qe({},e)),Me(r,t+":-moz-placeholder",qe({},e)),Me(r,t+"::-moz-placeholder",qe({},e)),Me(r,t+":-ms-input-placeholder",qe({},e)),r}function y(e){return e[0].split(" ")[0]}function v(e){for(var r="",t=0;t<e.length;t+=1)r+=e[t],3===t&&(arguments.length<=t+1?void 0:arguments[t+1])&&((arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3]))?(r=r.slice(0,-1),r+=", "+(arguments.length<=t+1?void 0:arguments[t+1])):3!==t||arguments.length<=t+1||!arguments[t+1]||(arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3])?(arguments.length<=t+1?void 0:arguments[t+1])&&(r+=(arguments.length<=t+1?void 0:arguments[t+1])+" "):r+=""+(arguments.length<=t+1?void 0:arguments[t+1]);return r.trim()}function w(e){var r=e.colorStops,t=e.extent,n=e.fallback,a=e.position,o=e.shape;if(!r||r.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{backgroundColor:n||y(r),backgroundImage:v(Qe,a,o,t,r.join(", "))}}function x(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",n=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"_2x";if(!e)throw new Error("Please supply a filename to retinaImage() as the first argument.");var o=t.replace(/^\./,""),i=n?n+"."+o:""+e+a+"."+o;return Me({backgroundImage:"url("+e+"."+o+")"},b(),{backgroundImage:"url("+i+")",backgroundSize:r})}function k(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r={},Me(r,t+"::-moz-selection",qe({},e)),Me(r,t+"::selection",qe({},e)),r}function z(e){return He[e]}function S(e){var r=e.pointingDirection,t=e.height,n=e.width,a=e.foregroundColor,o=e.backgroundColor,i=void 0===o?"transparent":o,u=parseFloat(t),l=parseFloat(n);if(isNaN(u)||isNaN(l))throw new Error("Passed an invalid value to `height` or `width`. Please provide a pixel based unit");return Me({borderColor:i,width:"0",height:"0",borderWidth:Ne(r,u,l),borderStyle:"solid"},"border"+$e[r]+"Color",a+" !important")}function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"break-word";return{overflowWrap:e,wordWrap:e,wordBreak:"break-word"===e?"break-all":e}}function E(e){return Math.round(255*e)}function j(e,r,t){return E(e)+","+E(r)+","+E(t)}function A(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;if(0===r)return n(t,t,t);var a=e%360/60,o=(1-Math.abs(2*t-1))*r,i=o*(1-Math.abs(a%2-1)),u=0,l=0,s=0;a>=0&&a<1?(u=o,l=i):a>=1&&a<2?(u=i,l=o):a>=2&&a<3?(l=o,s=i):a>=3&&a<4?(l=i,s=o):a>=4&&a<5?(u=i,s=o):a>=5&&a<6&&(u=o,s=i);var f=t-o/2;return n(u+f,l+f,s+f)}function O(e){if("string"!=typeof e)return e;var r=e.toLowerCase();return Le[r]?"#"+Le[r]:e}function F(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var r=O(e);if(r.match(De))return{red:parseInt(""+r[1]+r[2],16),green:parseInt(""+r[3]+r[4],16),blue:parseInt(""+r[5]+r[6],16)};if(r.match(_e))return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16)};var t=Ge.exec(r);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10)};var n=Je.exec(r);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10),alpha:parseFloat(""+n[4])};var a=Ue.exec(r);if(a){var o=parseInt(""+a[1],10),i=parseInt(""+a[2],10)/100,u=parseInt(""+a[3],10)/100,l="rgb("+A(o,i,u)+")",s=Ge.exec(l);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var f=Ve.exec(r);if(f){var c=parseInt(""+f[1],10),d=parseInt(""+f[2],10)/100,p=parseInt(""+f[3],10)/100,b="rgb("+A(c,d,p)+")",h=Ge.exec(b);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+f[4])}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function P(e){var r=e.red/255,t=e.green/255,n=e.blue/255,a=Math.max(r,t,n),o=Math.min(r,t,n),i=(a+o)/2;if(a===o)return void 0!==e.alpha?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var u=void 0,l=a-o,s=i>.5?l/(2-a-o):l/(a+o);switch(a){case r:u=(t-n)/l+(t<n?6:0);break;case t:u=(n-r)/l+2;break;default:u=(r-t)/l+4}return u*=60,void 0!==e.alpha?{hue:u,saturation:s,lightness:i,alpha:e.alpha}:{hue:u,saturation:s,lightness:i}}function C(e){return P(F(e))}function T(e){var r=e.toString(16);return 1===r.length?"0"+r:r}function R(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return Ye("#"+T(e)+T(r)+T(t));if("object"===(void 0===e?"undefined":Re(e))&&void 0===r&&void 0===t)return Ye("#"+T(e.red)+T(e.green)+T(e.blue));throw new Error("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 }).")}function M(e,r,t,n){if("string"==typeof e&&"number"==typeof r){var a=F(e);return"rgba("+a.red+","+a.green+","+a.blue+","+r+")"}if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?R(e,r,t):"rgba("+e+","+r+","+t+","+n+")";if("object"===(void 0===e?"undefined":Re(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?R(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("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 }).")}function q(e){return T(Math.round(255*e))}function W(e,r,t){return Ye("#"+q(e)+q(r)+q(t))}function B(e,r,t){return A(e,r,t,W)}function Q(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return B(e,r,t);if("object"===(void 0===e?"undefined":Re(e))&&void 0===r&&void 0===t)return B(e.hue,e.saturation,e.lightness);throw new Error("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 }).")}function H(e,r,t,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?B(e,r,t):"rgba("+A(e,r,t)+","+n+")";if("object"===(void 0===e?"undefined":Re(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?B(e.hue,e.saturation,e.lightness):"rgba("+A(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}function N(e){if("object"!==(void 0===e?"undefined":Re(e)))throw new Error(rr);if(Ke(e))return M(e);if(Ze(e))return R(e);if(er(e))return H(e);if(Xe(e))return Q(e);throw new Error(rr)}function $(e,r,t){return function(){var n=t.concat(Array.prototype.slice.call(arguments));return n.length>=r?e.apply(this,n):$(e,r,n)}}function L(e){return $(e,e.length,[])}function D(e,r){var t=C(r);return N(qe({},t,{hue:(t.hue+e)%360}))}function _(e){var r=C(e);return N(qe({},r,{hue:(r.hue+180)%360}))}function G(e,r,t){return Math.max(e,Math.min(r,t))}function J(e,r){var t=C(r);return N(qe({},t,{lightness:G(0,1,t.lightness-e)}))}function U(e,r){var t=C(r);return N(qe({},t,{saturation:G(0,1,t.saturation-e)}))}function V(e){return N(qe({},C(e),{saturation:0}))}function Y(e){var r=F(e);return N(qe({},r,{red:255-r.red,green:255-r.green,blue:255-r.blue}))}function Z(e,r){var t=C(r);return N(qe({},t,{lightness:G(0,1,t.lightness+e)}))}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments[1],t=arguments[2],n=F(r),a=qe({},n,{alpha:"number"==typeof n.alpha?n.alpha:1}),o=F(t),i=qe({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),u=a.alpha-i.alpha,l=2*e-1,s=l*u==-1?l:l+u,f=1+l*u,c=(s/f+1)/2,d=1-c;return M({red:Math.floor(a.red*c+i.red*d),green:Math.floor(a.green*c+i.green*d),blue:Math.floor(a.blue*c+i.blue*d),alpha:a.alpha+(i.alpha-a.alpha)*(e/1)})}function X(e,r){var t=F(r),n="number"==typeof t.alpha?t.alpha:1;return M(qe({},t,{alpha:G(0,1,(100*n+100*e)/100)}))}function ee(e){var r=F(e);return.2126*lr(r.red)+.7152*lr(r.green)+.0722*lr(r.blue)>.179?"#000":"#fff"}function re(e,r){var t=C(r);return N(qe({},t,{saturation:G(0,1,t.saturation+e)}))}function te(e,r){return N(qe({},C(r),{hue:e}))}function ne(e,r){return N(qe({},C(r),{lightness:e}))}function ae(e,r){return N(qe({},C(r),{saturation:e}))}function oe(e,r){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to shade, please pass a percentage less than or equal to 1 and larger than or equal to -1.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return ir(e,r,"rgb(0, 0, 0)")}function ie(e,r){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to tint, please pass a percentage less than or equal to 1 and larger than or equal to -1.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return ir(e,r,"rgb(255, 255, 255)")}function ue(e,r){var t=F(r),n="number"==typeof t.alpha?t.alpha:1;return M(qe({},t,{alpha:G(0,1,(100*n-100*e)/100)}))}function le(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Array.isArray(r[0]);if(!n&&r.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:r.map(function(e){if(n&&!Array.isArray(e)||!n&&Array.isArray(e))throw new Error("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')");if(Array.isArray(e)&&e.length>8)throw new Error("The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation");return Array.isArray(e)?e.join(" "):e}).join(", ")}}function se(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{backgroundImage:r.join(", ")}}function fe(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{background:r.join(", ")}}function ce(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderColor"].concat(r))}function de(e,t){var n=r(e);if(!t||"string"!=typeof t)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("Top"===n||"Bottom"===n){var a;return a={},Me(a,"border"+n+"RightRadius",t),Me(a,"border"+n+"LeftRadius",t),a}if("Left"===n||"Right"===n){var o;return o={},Me(o,"borderTop"+n+"Radius",t),Me(o,"borderBottom"+n+"Radius",t),o}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function pe(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderStyle"].concat(r))}function be(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderWidth"].concat(r))}function he(e,r){return e(r?":"+r:"")}function ge(e,r,t){if(!r)throw new Error("You must provide a template to this method.");if(0===e.length)return he(r,null);for(var n=[],a=0;a<e.length;a+=1){if(t&&t.indexOf(e[a])<0)throw new Error("You passed an unsupported selector state to this method.");n.push(he(r,e[a]))}return n=n.join(",")}function me(e){return"button"+e+',\n input[type="button"]'+e+',\n input[type="reset"]'+e+',\n input[type="submit"]'+e}function ye(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return ge(r,me,mr)}function ve(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["margin"].concat(r))}function we(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["padding"].concat(r))}function xe(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(yr.indexOf(e)>=0)return qe({position:e},a.apply(void 0,[""].concat(t)));var o=e;return a.apply(void 0,["",o].concat(t))}function ke(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function ze(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function Se(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return ge(r,ze,vr)}function Ie(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{transition:r.join(", ")}}var Ee,je,Ae=["Top","Right","Bottom","Left"],Oe=function(e,r){return e.substr(-r.length)===r},Fe=function(e){return function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",n=r,a=t;if("string"==typeof r){if(!Oe(r,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+r+'" instead.');n=o(r)}if("string"==typeof t){if(!Oe(t,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+t+'" instead.');a=o(t)}if("string"==typeof n)throw new Error('Passed invalid pixel value ("'+r+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof a)throw new Error('Passed invalid base value ("'+t+'") to '+e+'(), please pass a value like "12px" or 12.');return""+n/a+e}},Pe=Fe("em"),Ce={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4},Te=Fe("rem"),Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},qe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},We=(Ee={html:{fontFamily:"sans-serif"},body:{margin:"0"}},Me(Ee,"a:active,\n a:hover",{outlineWidth:"0"}),Me(Ee,"button,\n input,\n optgroup,\n select,\n textarea",{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15"}),Ee),Be=(je={html:{lineHeight:"1.15",textSizeAdjust:"100%"}},Me(je,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),Me(je,"h1",{fontSize:"2em",margin:"0.67em 0"}),Me(je,"figcaption,\n figure,\n main",{display:"block"}),Me(je,"figure",{margin:"1em 40px"}),Me(je,"hr",{boxSizing:"content-box",height:"0",overflow:"visible"}),Me(je,"pre",{fontFamily:"monospace, monospace",fontSize:"1em"}),Me(je,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),Me(je,"abbr[title]",Me({borderBottom:"none",textDecoration:"underline"},"textDecoration","underline dotted")),Me(je,"b,\n strong",{fontWeight:"inherit"}),Me(je,"code,\n kbd,\n samp",{fontFamily:"monospace, monospace",fontSize:"1em"}),Me(je,"dfn",{fontStyle:"italic"}),Me(je,"mark",{backgroundColor:"#ff0",color:"#000"}),Me(je,"small",{fontSize:"80%"}),Me(je,"sub,\n sup",{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"}),Me(je,"sub",{bottom:"-0.25em"}),Me(je,"sup",{top:"-0.5em"}),Me(je,"audio,\n video",{display:"inline-block"}),Me(je,"audio:not([controls])",{display:"none",height:"0"}),Me(je,"img",{borderStyle:"none"}),Me(je,"svg:not(:root)",{overflow:"hidden"}),Me(je,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),Me(je,"button,\n input",{overflow:"visible"}),Me(je,"button,\n select",{textTransform:"none"}),Me(je,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),Me(je,'button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner',{borderStyle:"none",padding:"0"}),Me(je,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),Me(je,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),Me(je,"legend",{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"}),Me(je,"progress",{display:"inline-block",verticalAlign:"baseline"}),Me(je,"textarea",{overflow:"auto"}),Me(je,'[type="checkbox"],\n [type="radio"]',{boxSizing:"border-box",padding:"0"}),Me(je,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),Me(je,'[type="search"]',{"-webkit-appearance":"textfield",outlineOffset:"-2px"}),Me(je,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),Me(je,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),Me(je,"details,\n menu",{display:"block"}),Me(je,"summary",{display:"list-item"}),Me(je,"canvas",{display:"inline-block"}),Me(je,"template",{display:"none"}),Me(je,"[hidden]",{display:"none"}),je),Qe=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}(["radial-gradient(","","","",")"],["radial-gradient(","","","",")"]),He={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},Ne=function(e,r,t){switch(e){case"top":return"0 "+t/2+"px "+r+"px "+t/2+"px";case"left":return r/2+"px "+t+"px "+r/2+"px 0";case"bottom":return r+"px "+t/2+"px 0 "+t/2+"px";case"right":return r/2+"px 0 "+r/2+"px "+t+"px";default:throw new Error("Passed invalid argument to triangle, please pass correct poitingDirection e.g. 'right'.")}},$e={left:"Right",right:"Left",top:"Bottom",bottom:"Top"},Le={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},De=/^#[a-fA-F0-9]{6}$/,_e=/^#[a-fA-F0-9]{3}$/,Ge=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,Je=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ue=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,Ve=/^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ye=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},Ze=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},Ke=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},Xe=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},er=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},rr="Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.",tr=L(D),nr=L(J),ar=L(U),or=L(Z),ir=L(K),ur=L(X),lr=function(e){return e/255<=.03928?e/255/12.92:Math.pow((e/255+.055)/1.055,2.4)},sr=L(ee),fr=L(re),cr=L(te),dr=L(ne),pr=L(ae),br=L(oe),hr=L(ie),gr=L(ue),mr=[void 0,null,"active","focus","hover"],yr=["absolute","fixed","relative","static","sticky"],vr=[void 0,null,"active","focus","hover"];e.adjustHue=tr,e.animation=le,e.backgroundImages=se,e.backgrounds=fe,e.borderColor=ce,e.borderRadius=de,e.borderStyle=pe,e.borderWidth=be,e.buttons=ye,e.clearFix=u,e.complement=_,e.darken=nr,e.desaturate=ar,e.directionalProperty=a,e.ellipsis=l,e.em=Pe,e.fontFace=d,e.grayscale=V,e.invert=Y,e.hideText=p,e.hiDPI=b,e.hsl=Q,e.hsla=H,e.lighten=or,e.margin=ve,e.mix=ir,e.modularScale=i,e.normalize=g,e.opacify=ur,e.padding=we,e.parseToHsl=C,e.parseToRgb=F,e.placeholder=m,e.position=xe,e.radialGradient=w,e.readableColor=sr,e.rem=Te,e.retinaImage=x,e.rgb=R,e.rgba=M,e.saturate=fr,e.selection=k,e.setHue=cr,e.setLightness=dr,e.setSaturation=pr,e.shade=br,e.size=ke,e.stripUnit=o,e.textInputs=Se,e.timingFunctions=z,e.tint=hr,e.toColorString=N,e.transitions=Ie,e.transparentize=gr,e.triangle=S,e.wordWrap=I,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.polished=e.polished||{})}(this,function(e){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function t(e,t){if(!e)return t.toLowerCase();var n=e.split("-");if(n.length>1)return n.splice(1,0,t),n.reduce(function(e,t){return""+e+r(t)});var a=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===a?""+e+t:a}function n(e,r){for(var n={},a=0;a<r.length;a+=1)r[a]&&(n[t(e,Oe[a])]=r[a]);return n}function a(e){for(var r=arguments.length,t=Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];var o=t[0],i=t[1],u=void 0===i?o:i,l=t[2],s=void 0===l?o:l,f=t[3];return n(e,[o,u,s,void 0===f?u:f])}function o(e){var r=parseFloat(e);return isNaN(r)?e:r}function i(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1em",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"perfectFourth";if("number"!=typeof e)throw new Error("Please provide a number of steps to the modularScale helper.");if("string"==typeof t&&!Te[t])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var n="string"==typeof r?o(r):r,a="string"==typeof t?Te[t]:t;if("string"==typeof n)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+r+'"');return n*Math.pow(a,e)+"em"}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return qe({},e+"::after",{clear:"both",content:'""',display:"table"})}function l(){return{display:"inline-block",maxWidth:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"}}function s(e,r){return r.map(function(r){return'url("'+e+"."+r+'")'}).join(", ")}function f(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function c(e,r,t){var n=[];return r&&n.push(f(r)),e&&n.push(s(e,t)),n.join(", ")}function d(e){var r=e.fontFamily,t=e.fontFilePath,n=e.fontStretch,a=e.fontStyle,o=e.fontVariant,i=e.fontWeight,u=e.fileFormats,l=void 0===u?["eot","woff2","woff","ttf","svg"]:u,s=e.localFonts,f=e.unicodeRange;if(!r)throw new Error("fontFace expects a name of a font-family.");if(!t&&!s)throw new Error("fontFace expects either the path to the font file(s) or a name of a local copy.");if(s&&!Array.isArray(s))throw new Error("fontFace expects localFonts to be an array.");if(!Array.isArray(l))throw new Error("fontFace expects fileFormats to be an array.");var d={"@font-face":{fontFamily:r,src:c(t,s,l),unicodeRange:f,fontStretch:n,fontStyle:a,fontVariant:o,fontWeight:i}};return JSON.parse(JSON.stringify(d))}function p(){return{textIndent:"101%",overflow:"hidden",whiteSpace:"nowrap"}}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.3;return"\n @media only screen and (-webkit-min-device-pixel-ratio: "+e+"),\n only screen and (min--moz-device-pixel-ratio: "+e+"),\n only screen and (-o-min-device-pixel-ratio: "+e+"/1),\n only screen and (min-resolution: "+Math.round(96*e)+"dpi),\n only screen and (min-resolution: "+e+"dppx)\n "}function h(e,r){var t=We({},e);return Object.keys(r).forEach(function(e){t[e]?t[e]=We({},t[e],r[e]):t[e]=We({},r[e])}),t}function g(e){return e?He:h(He,Qe)}function m(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return r={},qe(r,t+"::-webkit-input-placeholder",We({},e)),qe(r,t+":-moz-placeholder",We({},e)),qe(r,t+"::-moz-placeholder",We({},e)),qe(r,t+":-ms-input-placeholder",We({},e)),r}function y(e){return e[0].split(" ")[0]}function v(e){for(var r="",t=0;t<e.length;t+=1)r+=e[t],3===t&&(arguments.length<=t+1?void 0:arguments[t+1])&&((arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3]))?(r=r.slice(0,-1),r+=", "+(arguments.length<=t+1?void 0:arguments[t+1])):3!==t||arguments.length<=t+1||!arguments[t+1]||(arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3])?(arguments.length<=t+1?void 0:arguments[t+1])&&(r+=(arguments.length<=t+1?void 0:arguments[t+1])+" "):r+=""+(arguments.length<=t+1?void 0:arguments[t+1]);return r.trim()}function w(e){var r=e.colorStops,t=e.extent,n=e.fallback,a=e.position,o=e.shape;if(!r||r.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{backgroundColor:n||y(r),backgroundImage:v(Le,a,o,t,r.join(", "))}}function x(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",n=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"_2x";if(!e)throw new Error("Please supply a filename to retinaImage() as the first argument.");var o=t.replace(/^\./,""),i=n?n+"."+o:""+e+a+"."+o;return qe({backgroundImage:"url("+e+"."+o+")"},b(),{backgroundImage:"url("+i+")",backgroundSize:r})}function k(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r={},qe(r,t+"::-moz-selection",We({},e)),qe(r,t+"::selection",We({},e)),r}function z(e){return Ne[e]}function S(e){var r=e.pointingDirection,t=e.height,n=e.width,a=e.foregroundColor,o=e.backgroundColor,i=void 0===o?"transparent":o,u=parseFloat(t),l=parseFloat(n);if(isNaN(u)||isNaN(l))throw new Error("Passed an invalid value to `height` or `width`. Please provide a pixel based unit");return qe({borderColor:i,width:"0",height:"0",borderWidth:$e(r,u,l),borderStyle:"solid"},"border"+De[r]+"Color",a+" !important")}function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"break-word";return{overflowWrap:e,wordWrap:e,wordBreak:"break-word"===e?"break-all":e}}function j(e){return Math.round(255*e)}function E(e,r,t){return j(e)+","+j(r)+","+j(t)}function A(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:E;if(0===r)return n(t,t,t);var a=e%360/60,o=(1-Math.abs(2*t-1))*r,i=o*(1-Math.abs(a%2-1)),u=0,l=0,s=0;a>=0&&a<1?(u=o,l=i):a>=1&&a<2?(u=i,l=o):a>=2&&a<3?(l=o,s=i):a>=3&&a<4?(l=i,s=o):a>=4&&a<5?(u=i,s=o):a>=5&&a<6&&(u=o,s=i);var f=t-o/2;return n(u+f,l+f,s+f)}function O(e){if("string"!=typeof e)return e;var r=e.toLowerCase();return _e[r]?"#"+_e[r]:e}function F(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var r=O(e);if(r.match(Ge))return{red:parseInt(""+r[1]+r[2],16),green:parseInt(""+r[3]+r[4],16),blue:parseInt(""+r[5]+r[6],16)};if(r.match(Je))return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16)};var t=Ue.exec(r);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10)};var n=Ve.exec(r);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10),alpha:parseFloat(""+n[4])};var a=Ye.exec(r);if(a){var o=parseInt(""+a[1],10),i=parseInt(""+a[2],10)/100,u=parseInt(""+a[3],10)/100,l="rgb("+A(o,i,u)+")",s=Ue.exec(l);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var f=Ze.exec(r);if(f){var c=parseInt(""+f[1],10),d=parseInt(""+f[2],10)/100,p=parseInt(""+f[3],10)/100,b="rgb("+A(c,d,p)+")",h=Ue.exec(b);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+f[4])}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function P(e){var r=e.red/255,t=e.green/255,n=e.blue/255,a=Math.max(r,t,n),o=Math.min(r,t,n),i=(a+o)/2;if(a===o)return void 0!==e.alpha?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var u=void 0,l=a-o,s=i>.5?l/(2-a-o):l/(a+o);switch(a){case r:u=(t-n)/l+(t<n?6:0);break;case t:u=(n-r)/l+2;break;default:u=(r-t)/l+4}return u*=60,void 0!==e.alpha?{hue:u,saturation:s,lightness:i,alpha:e.alpha}:{hue:u,saturation:s,lightness:i}}function C(e){return P(F(e))}function T(e){var r=e.toString(16);return 1===r.length?"0"+r:r}function R(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return Ke("#"+T(e)+T(r)+T(t));if("object"===(void 0===e?"undefined":Me(e))&&void 0===r&&void 0===t)return Ke("#"+T(e.red)+T(e.green)+T(e.blue));throw new Error("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 }).")}function M(e,r,t,n){if("string"==typeof e&&"number"==typeof r){var a=F(e);return"rgba("+a.red+","+a.green+","+a.blue+","+r+")"}if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?R(e,r,t):"rgba("+e+","+r+","+t+","+n+")";if("object"===(void 0===e?"undefined":Me(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?R(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("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 }).")}function q(e){return T(Math.round(255*e))}function W(e,r,t){return Ke("#"+q(e)+q(r)+q(t))}function B(e,r,t){return A(e,r,t,W)}function Q(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return B(e,r,t);if("object"===(void 0===e?"undefined":Me(e))&&void 0===r&&void 0===t)return B(e.hue,e.saturation,e.lightness);throw new Error("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 }).")}function H(e,r,t,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?B(e,r,t):"rgba("+A(e,r,t)+","+n+")";if("object"===(void 0===e?"undefined":Me(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?B(e.hue,e.saturation,e.lightness):"rgba("+A(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}function L(e){if("object"!==(void 0===e?"undefined":Me(e)))throw new Error(nr);if(er(e))return M(e);if(Xe(e))return R(e);if(tr(e))return H(e);if(rr(e))return Q(e);throw new Error(nr)}function N(e,r,t){return function(){var n=t.concat(Array.prototype.slice.call(arguments));return n.length>=r?e.apply(this,n):N(e,r,n)}}function $(e){return N(e,e.length,[])}function D(e,r){var t=C(r);return L(We({},t,{hue:(t.hue+e)%360}))}function _(e){var r=C(e);return L(We({},r,{hue:(r.hue+180)%360}))}function G(e,r,t){return Math.max(e,Math.min(r,t))}function J(e,r){var t=C(r);return L(We({},t,{lightness:G(0,1,t.lightness-e)}))}function U(e,r){var t=C(r);return L(We({},t,{saturation:G(0,1,t.saturation-e)}))}function V(e){var r=F(e),t=Object.keys(r).map(function(e){var t=r[e]/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}),n=Be(t,3);return.2126*n[0]+.7152*n[1]+.0722*n[2]}function Y(e){return L(We({},C(e),{saturation:0}))}function Z(e){var r=F(e);return L(We({},r,{red:255-r.red,green:255-r.green,blue:255-r.blue}))}function K(e,r){var t=C(r);return L(We({},t,{lightness:G(0,1,t.lightness+e)}))}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments[1],t=arguments[2],n=F(r),a=We({},n,{alpha:"number"==typeof n.alpha?n.alpha:1}),o=F(t),i=We({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),u=a.alpha-i.alpha,l=2*e-1,s=l*u==-1?l:l+u,f=1+l*u,c=(s/f+1)/2,d=1-c;return M({red:Math.floor(a.red*c+i.red*d),green:Math.floor(a.green*c+i.green*d),blue:Math.floor(a.blue*c+i.blue*d),alpha:a.alpha+(i.alpha-a.alpha)*(e/1)})}function ee(e,r){var t=F(r),n="number"==typeof t.alpha?t.alpha:1;return M(We({},t,{alpha:G(0,1,(100*n+100*e)/100)}))}function re(e){return V(e)>.179?"#000":"#fff"}function te(e,r){var t=C(r);return L(We({},t,{saturation:G(0,1,t.saturation+e)}))}function ne(e,r){return L(We({},C(r),{hue:e}))}function ae(e,r){return L(We({},C(r),{lightness:e}))}function oe(e,r){return L(We({},C(r),{saturation:e}))}function ie(e,r){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to shade, please pass a percentage less than or equal to 1 and larger than or equal to -1.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return lr(e,r,"rgb(0, 0, 0)")}function ue(e,r){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to tint, please pass a percentage less than or equal to 1 and larger than or equal to -1.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return lr(e,r,"rgb(255, 255, 255)")}function le(e,r){var t=F(r),n="number"==typeof t.alpha?t.alpha:1;return M(We({},t,{alpha:G(0,1,(100*n-100*e)/100)}))}function se(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Array.isArray(r[0]);if(!n&&r.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:r.map(function(e){if(n&&!Array.isArray(e)||!n&&Array.isArray(e))throw new Error("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')");if(Array.isArray(e)&&e.length>8)throw new Error("The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation");return Array.isArray(e)?e.join(" "):e}).join(", ")}}function fe(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{backgroundImage:r.join(", ")}}function ce(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{background:r.join(", ")}}function de(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderColor"].concat(r))}function pe(e,t){var n=r(e);if(!t||"string"!=typeof t)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("Top"===n||"Bottom"===n){var a;return a={},qe(a,"border"+n+"RightRadius",t),qe(a,"border"+n+"LeftRadius",t),a}if("Left"===n||"Right"===n){var o;return o={},qe(o,"borderTop"+n+"Radius",t),qe(o,"borderBottom"+n+"Radius",t),o}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function be(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderStyle"].concat(r))}function he(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["borderWidth"].concat(r))}function ge(e,r){return e(r?":"+r:"")}function me(e,r,t){if(!r)throw new Error("You must provide a template to this method.");if(0===e.length)return ge(r,null);for(var n=[],a=0;a<e.length;a+=1){if(t&&t.indexOf(e[a])<0)throw new Error("You passed an unsupported selector state to this method.");n.push(ge(r,e[a]))}return n=n.join(",")}function ye(e){return"button"+e+',\n input[type="button"]'+e+',\n input[type="reset"]'+e+',\n input[type="submit"]'+e}function ve(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return me(r,ye,yr)}function we(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["margin"].concat(r))}function xe(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return a.apply(void 0,["padding"].concat(r))}function ke(e){for(var r=arguments.length,t=Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];if(vr.indexOf(e)>=0)return We({position:e},a.apply(void 0,[""].concat(t)));var o=e;return a.apply(void 0,["",o].concat(t))}function ze(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function Se(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function Ie(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return me(r,Se,wr)}function je(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{transition:r.join(", ")}}var Ee,Ae,Oe=["Top","Right","Bottom","Left"],Fe=function(e,r){return e.substr(-r.length)===r},Pe=function(e){return function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",n=r,a=t;if("string"==typeof r){if(!Fe(r,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+r+'" instead.');n=o(r)}if("string"==typeof t){if(!Fe(t,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+t+'" instead.');a=o(t)}if("string"==typeof n)throw new Error('Passed invalid pixel value ("'+r+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof a)throw new Error('Passed invalid base value ("'+t+'") to '+e+'(), please pass a value like "12px" or 12.');return""+n/a+e}},Ce=Pe("em"),Te={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4},Re=Pe("rem"),Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},We=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Be=function(){function e(e,r){var t=[],n=!0,a=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(e){a=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(a)throw o}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Qe=(Ee={html:{fontFamily:"sans-serif"},body:{margin:"0"}},qe(Ee,"a:active,\n a:hover",{outlineWidth:"0"}),qe(Ee,"button,\n input,\n optgroup,\n select,\n textarea",{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15"}),Ee),He=(Ae={html:{lineHeight:"1.15",textSizeAdjust:"100%"}},qe(Ae,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),qe(Ae,"h1",{fontSize:"2em",margin:"0.67em 0"}),qe(Ae,"figcaption,\n figure,\n main",{display:"block"}),qe(Ae,"figure",{margin:"1em 40px"}),qe(Ae,"hr",{boxSizing:"content-box",height:"0",overflow:"visible"}),qe(Ae,"pre",{fontFamily:"monospace, monospace",fontSize:"1em"}),qe(Ae,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),qe(Ae,"abbr[title]",qe({borderBottom:"none",textDecoration:"underline"},"textDecoration","underline dotted")),qe(Ae,"b,\n strong",{fontWeight:"inherit"}),qe(Ae,"code,\n kbd,\n samp",{fontFamily:"monospace, monospace",fontSize:"1em"}),qe(Ae,"dfn",{fontStyle:"italic"}),qe(Ae,"mark",{backgroundColor:"#ff0",color:"#000"}),qe(Ae,"small",{fontSize:"80%"}),qe(Ae,"sub,\n sup",{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"}),qe(Ae,"sub",{bottom:"-0.25em"}),qe(Ae,"sup",{top:"-0.5em"}),qe(Ae,"audio,\n video",{display:"inline-block"}),qe(Ae,"audio:not([controls])",{display:"none",height:"0"}),qe(Ae,"img",{borderStyle:"none"}),qe(Ae,"svg:not(:root)",{overflow:"hidden"}),qe(Ae,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),qe(Ae,"button,\n input",{overflow:"visible"}),qe(Ae,"button,\n select",{textTransform:"none"}),qe(Ae,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),qe(Ae,'button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner',{borderStyle:"none",padding:"0"}),qe(Ae,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),qe(Ae,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),qe(Ae,"legend",{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"}),qe(Ae,"progress",{display:"inline-block",verticalAlign:"baseline"}),qe(Ae,"textarea",{overflow:"auto"}),qe(Ae,'[type="checkbox"],\n [type="radio"]',{boxSizing:"border-box",padding:"0"}),qe(Ae,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),qe(Ae,'[type="search"]',{"-webkit-appearance":"textfield",outlineOffset:"-2px"}),qe(Ae,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),qe(Ae,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),qe(Ae,"details,\n menu",{display:"block"}),qe(Ae,"summary",{display:"list-item"}),qe(Ae,"canvas",{display:"inline-block"}),qe(Ae,"template",{display:"none"}),qe(Ae,"[hidden]",{display:"none"}),Ae),Le=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}(["radial-gradient(","","","",")"],["radial-gradient(","","","",")"]),Ne={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},$e=function(e,r,t){switch(e){case"top":return"0 "+t/2+"px "+r+"px "+t/2+"px";case"left":return r/2+"px "+t+"px "+r/2+"px 0";case"bottom":return r+"px "+t/2+"px 0 "+t/2+"px";case"right":return r/2+"px 0 "+r/2+"px "+t+"px";default:throw new Error("Passed invalid argument to triangle, please pass correct poitingDirection e.g. 'right'.")}},De={left:"Right",right:"Left",top:"Bottom",bottom:"Top"},_e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ge=/^#[a-fA-F0-9]{6}$/,Je=/^#[a-fA-F0-9]{3}$/,Ue=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,Ve=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ye=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,Ze=/^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ke=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},Xe=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},er=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},rr=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},tr=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},nr="Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.",ar=$(D),or=$(J),ir=$(U),ur=$(K),lr=$(X),sr=$(ee),fr=$(re),cr=$(te),dr=$(ne),pr=$(ae),br=$(oe),hr=$(ie),gr=$(ue),mr=$(le),yr=[void 0,null,"active","focus","hover"],vr=["absolute","fixed","relative","static","sticky"],wr=[void 0,null,"active","focus","hover"];e.adjustHue=ar,e.animation=se,e.backgroundImages=fe,e.backgrounds=ce,e.borderColor=de,e.borderRadius=pe,e.borderStyle=be,e.borderWidth=he,e.buttons=ve,e.clearFix=u,e.complement=_,e.darken=or,e.desaturate=ir,e.directionalProperty=a,e.ellipsis=l,e.em=Ce,e.fontFace=d,e.getLuminance=V,e.grayscale=Y,e.invert=Z,e.hideText=p,e.hiDPI=b,e.hsl=Q,e.hsla=H,e.lighten=ur,e.margin=we,e.mix=lr,e.modularScale=i,e.normalize=g,e.opacify=sr,e.padding=xe,e.parseToHsl=C,e.parseToRgb=F,e.placeholder=m,e.position=ke,e.radialGradient=w,e.readableColor=fr,e.rem=Re,e.retinaImage=x,e.rgb=R,e.rgba=M,e.saturate=cr,e.selection=k,e.setHue=dr,e.setLightness=pr,e.setSaturation=br,e.shade=hr,e.size=ze,e.stripUnit=o,e.textInputs=Ie,e.timingFunctions=z,e.tint=gr,e.toColorString=L,e.transitions=je,e.transparentize=mr,e.triangle=S,e.wordWrap=I,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -7,5 +7,5 @@ 'use strict'; | ||
var _parseToRgb = require('./parseToRgb'); | ||
var _getLuminance = require('./getLuminance'); | ||
var _parseToRgb2 = _interopRequireDefault(_parseToRgb); | ||
var _getLuminance2 = _interopRequireDefault(_getLuminance); | ||
@@ -18,6 +18,2 @@ var _curry = require('../internalHelpers/_curry'); | ||
var h = function h(c) { | ||
return c / 255 <= 0.03928 ? c / 255 / 12.92 : Math.pow((c / 255 + 0.055) / 1.055, 2.4); | ||
}; | ||
/** | ||
@@ -52,4 +48,3 @@ * Selects black or white for best contrast depending on the luminosity of the given color. | ||
function readableColor(color) { | ||
var c = (0, _parseToRgb2.default)(color); | ||
return h(c.red) * 0.2126 + h(c.green) * 0.7152 + h(c.blue) * 0.0722 > 0.179 ? '#000' : '#fff'; | ||
return (0, _getLuminance2.default)(color) > 0.179 ? '#000' : '#fff'; | ||
} | ||
@@ -56,0 +51,0 @@ |
@@ -18,2 +18,3 @@ import adjustHue from './color/adjustHue'; | ||
import fontFace from './mixins/fontFace'; | ||
import getLuminance from './color/getLuminance'; | ||
import grayscale from './color/grayscale'; | ||
@@ -76,2 +77,3 @@ import invert from './color/invert'; | ||
export { fontFace }; | ||
export { getLuminance }; | ||
export { grayscale }; | ||
@@ -78,0 +80,0 @@ export { invert }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.wordWrap = exports.triangle = exports.transparentize = exports.transitions = exports.toColorString = exports.tint = exports.timingFunctions = exports.textInputs = exports.stripUnit = exports.size = exports.shade = exports.setSaturation = exports.setLightness = exports.setHue = exports.selection = exports.saturate = exports.rgba = exports.rgb = exports.retinaImage = exports.rem = exports.readableColor = exports.radialGradient = exports.position = exports.placeholder = exports.parseToRgb = exports.parseToHsl = exports.padding = exports.opacify = exports.normalize = exports.modularScale = exports.mix = exports.margin = exports.lighten = exports.hsla = exports.hsl = exports.hiDPI = exports.hideText = exports.invert = exports.grayscale = exports.fontFace = exports.em = exports.ellipsis = exports.directionalProperty = exports.desaturate = exports.darken = exports.complement = exports.clearFix = exports.buttons = exports.borderWidth = exports.borderStyle = exports.borderRadius = exports.borderColor = exports.backgrounds = exports.backgroundImages = exports.animation = exports.adjustHue = undefined; | ||
exports.wordWrap = exports.triangle = exports.transparentize = exports.transitions = exports.toColorString = exports.tint = exports.timingFunctions = exports.textInputs = exports.stripUnit = exports.size = exports.shade = exports.setSaturation = exports.setLightness = exports.setHue = exports.selection = exports.saturate = exports.rgba = exports.rgb = exports.retinaImage = exports.rem = exports.readableColor = exports.radialGradient = exports.position = exports.placeholder = exports.parseToRgb = exports.parseToHsl = exports.padding = exports.opacify = exports.normalize = exports.modularScale = exports.mix = exports.margin = exports.lighten = exports.hsla = exports.hsl = exports.hiDPI = exports.hideText = exports.invert = exports.grayscale = exports.getLuminance = exports.fontFace = exports.em = exports.ellipsis = exports.directionalProperty = exports.desaturate = exports.darken = exports.complement = exports.clearFix = exports.buttons = exports.borderWidth = exports.borderStyle = exports.borderRadius = exports.borderColor = exports.backgrounds = exports.backgroundImages = exports.animation = exports.adjustHue = undefined; | ||
@@ -97,2 +97,6 @@ var _directionalProperty = require('./helpers/directionalProperty'); | ||
var _getLuminance = require('./color/getLuminance'); | ||
var _getLuminance2 = _interopRequireDefault(_getLuminance); | ||
var _grayscale = require('./color/grayscale'); | ||
@@ -239,5 +243,3 @@ | ||
// Color | ||
// Helpers | ||
// Mixins | ||
exports.adjustHue = _adjustHue2.default; | ||
@@ -260,2 +262,3 @@ exports.animation = _animation2.default; | ||
exports.fontFace = _fontFace2.default; | ||
exports.getLuminance = _getLuminance2.default; | ||
exports.grayscale = _grayscale2.default; | ||
@@ -301,2 +304,4 @@ exports.invert = _invert2.default; | ||
// Mixins | ||
// Color | ||
// Helpers |
@@ -121,3 +121,3 @@ { | ||
}, | ||
"version": "1.6.2" | ||
"version": "1.7.0" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2382104
247
13745