pretty-lights
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -154,3 +154,2 @@ "use strict"; | ||
} else if (options) { | ||
// $FlowFixMe | ||
existingProperties = options.properties; | ||
@@ -157,0 +156,0 @@ } |
@@ -83,4 +83,3 @@ "use strict"; | ||
if (indexOfClassName !== -1) { | ||
let nameWithoutKey = classNames[indexOfClassName].substring(emotion.caches.key.length + 1); // $FlowFixMe | ||
let nameWithoutKey = classNames[indexOfClassName].substring(emotion.caches.key.length + 1); | ||
styles += emotion.caches.inserted[nameWithoutKey]; | ||
@@ -87,0 +86,0 @@ } |
@@ -54,4 +54,3 @@ "use strict"; | ||
if (indexOfClassName !== -1) { | ||
let nameWithoutKey = classNames[indexOfClassName].substring(emotion.caches.key.length + 1); // $FlowFixMe | ||
let nameWithoutKey = classNames[indexOfClassName].substring(emotion.caches.key.length + 1); | ||
styles += emotion.caches.inserted[nameWithoutKey]; | ||
@@ -58,0 +57,0 @@ } |
@@ -21,3 +21,3 @@ "use strict"; | ||
function shouldDive(node) { | ||
return typeof node.dive === 'function' && typeof node.type() !== 'string'; | ||
return node.length > 0 && typeof node.dive === 'function' && typeof node.type() !== 'string'; | ||
} | ||
@@ -24,0 +24,0 @@ |
@@ -1,2 +0,2 @@ | ||
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),s=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),c=e(require("hoist-non-react-statics")),u=e(require("react")),l=/[A-Z]|^ms/g,p=o(function(e){return e.replace(l,"-$&").toLowerCase()}),d=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var f=/(attr|calc|counters?|url)\(/,h=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],v=d;d=function(e,t){return"content"===e&&("string"!=typeof t||-1===h.indexOf(t)&&!f.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),v(e,t)}}var y=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=y(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},m="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),N=s,w=function(e){return"theme"!==e&&"innerRef"!==e},b=function(){return!0},O=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n++){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},x=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var j=function(e,o){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===o&&(o={});var i,s=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(s))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+s+'" was passed');var a,c=n(function(e){i+=e,m&&l.insert(e,h)});void 0!==o.prefix&&(a={prefix:o.prefix});var u={registered:{},inserted:{},nonce:o.nonce,key:s},l=new _(o);m&&l.inject();var f=new t(a);f.use(o.stylisPlugins)(c);var h="";function v(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),v.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(N.has(e))return N.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=v.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==u.registered[e[r]]?r+"{"+u.registered[e[r]]+"}":p(r)+":"+d(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===u.registered[e[r][0]]?e[r].forEach(function(e){t+=p(r)+":"+d(r,e)+";"}):t+=r+"{"+v.call(this,e[r],!1)+"}"}},this),N.set(e,t),t}.call(this,e);default:var n=u.registered[e];return!1===t&&void 0!==n?n:e}}var g,E,N=new WeakMap,w=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var O=b,x=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(x,function(e){return h=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=v.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=v.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(w,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var j=f;f=function(e,t){j(e,t),h=""}}function P(e,t){void 0===u.inserted[g]&&(i="",f(e,t),u.inserted[g]=i)}var A=function(){var e=C.apply(this,arguments),t=s+"-"+g;return void 0===u.registered[t]&&(u.registered[t]=E),P("."+t,e),t};function S(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==u.registered[t]?e.push(t):r+=t+" "}),r}function T(e,t){var r=[],n=S(r,e);return r.length<2?e:n+A(r,t)}function k(e){u.inserted[e]=!0}if(m){var R=document.querySelectorAll("[data-emotion-"+s+"]");Array.prototype.forEach.call(R,function(e){l.tags[0].parentNode.insertBefore(e,l.tags[0]),e.getAttribute("data-emotion-"+s).split(" ").forEach(k)})}var q={flush:function(){m&&(l.flush(),l.inject()),u.inserted={},u.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return T(y(e))},merge:T,getRegisteredStyles:S,injectGlobal:function(){P("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return P("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:l,caches:u};return e.__SECRET_EMOTION__=q,q}("undefined"!=typeof global?global:{}),P=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__emotion_real===r,l=void 0===o&&c&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?N:w),function(){var p=arguments,d=c&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&d.push("label:"+i+";"),void 0===o)if(null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{d.push(p[0][0]);for(var f=p.length,h=1;h<f;h++)d.push(p[h],p[0][h])}var v=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=O(b,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,d.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,O(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return v.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(v.defaultProps=r.defaultProps),v.__emotion_styles=d,v.__emotion_base=l,v.__emotion_real=v,v.__emotion_forwardProp=a,Object.defineProperty(v,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),v.withComponent=function(e,r){return t(e,void 0!==r?O(b,{},n,r):n).apply(void 0,d)},v}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(j),A=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){if((!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t])return o.css+=e.caches.inserted[t],!0}),o}}(j),S=j.hydrate,T=j.cx,k=j.merge,R=j.getRegisteredStyles,q=j.injectGlobal,D=j.keyframes,V=j.css,M=j.sheet,I=j.caches;exports.flush=j.flush,exports.hydrate=S,exports.cx=T,exports.merge=k,exports.getRegisteredStyles=R,exports.injectGlobal=q,exports.keyframes=D,exports.css=V,exports.sheet=M,exports.caches=I,exports.ThemeContext=E,exports.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=x(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(E)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},exports.extractCritical=A,exports.default=P; | ||
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),s=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),c=e(require("hoist-non-react-statics")),u=e(require("react")),l=/[A-Z]|^ms/g,p=o(function(e){return e.replace(l,"-$&").toLowerCase()}),d=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var f=/(attr|calc|counters?|url)\(/,h=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],y=d;d=function(e,t){return"content"===e&&("string"!=typeof t||-1===h.indexOf(t)&&!f.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),y(e,t)}}var v=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=v(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},m="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),N=s,w=function(e){return"theme"!==e&&"innerRef"!==e},b=function(){return!0},O=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},x=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var j=function(e,o){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new _(o),u="",l=n(function(e){s+=e,m&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var f={registered:{},inserted:{},nonce:o.nonce,key:i};m&&c.inject();var h=new t(a);function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(N.has(e))return N.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==f.registered[e[r]]?r+"{"+f.registered[e[r]]+"}":p(r)+":"+d(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===f.registered[e[r][0]]?e[r].forEach(function(e){t+=p(r)+":"+d(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),N.set(e,t),t}.call(this,e);default:var n=f.registered[e];return!1===t&&void 0!==n?n:e}}h.use(o.stylisPlugins)(l);var g,E,N=new WeakMap,w=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var O=b,x=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(x,function(e){return u=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(w,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var j=h;h=function(e,t){j(e,t),u=""}}function P(e,t){void 0===f.inserted[g]&&(s="",h(e,t),f.inserted[g]=s)}var A=function(){var e=C.apply(this,arguments),t=i+"-"+g;return void 0===f.registered[t]&&(f.registered[t]=E),P("."+t,e),t};function S(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):r+=t+" "}),r}function T(e,t){var r=[],n=S(r,e);return r.length<2?e:n+A(r,t)}function k(e){f.inserted[e]=!0}if(m){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(k)})}var q={flush:function(){m&&(c.flush(),c.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return T(v(e))},merge:T,getRegisteredStyles:S,injectGlobal:function(){P("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return P("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:c,caches:f};return e.__SECRET_EMOTION__=q,q}("undefined"!=typeof global?global:{}),P=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__emotion_real===r,l=void 0===o&&c&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?N:w),function(){var p=arguments,d=c&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&d.push("label:"+i+";"),void 0===o)if(null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{d.push(p[0][0]);for(var f=p.length,h=1;h<f;h+=1)d.push(p[h],p[0][h])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=O(b,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,d.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,O(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__emotion_styles=d,y.__emotion_base=l,y.__emotion_real=y,y.__emotion_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?O(b,{},n,r):n).apply(void 0,d)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(j),A=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(j),S=j.hydrate,T=j.cx,k=j.merge,R=j.getRegisteredStyles,q=j.injectGlobal,D=j.keyframes,V=j.css,M=j.sheet,I=j.caches;exports.flush=j.flush,exports.hydrate=S,exports.cx=T,exports.merge=k,exports.getRegisteredStyles=R,exports.injectGlobal=q,exports.keyframes=D,exports.css=V,exports.sheet=M,exports.caches=I,exports.ThemeContext=E,exports.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=x(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(E)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},exports.extractCritical=A,exports.styled=P; | ||
//# sourceMappingURL=pretty-lights.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import s from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import c from"react";var u=/[A-Z]|^ms/g,l=n(function(e){return e.replace(u,"-$&").toLowerCase()}),p=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var f=/(attr|calc|counters?|url)\(/,d=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],h=p;p=function(e,t){return"content"===e&&("string"!=typeof t||-1===d.indexOf(t)&&!f.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),h(e,t)}}var m=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=m(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},v="undefined"!=typeof document;function y(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=y(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=y(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(y(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var g=c.createContext({}),E=i,N=function(e){return"theme"!==e&&"innerRef"!==e},w=function(){return!0},b=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n++){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},O=s(function(e){return s(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})}),C=function(e){return c.createElement(g.Consumer,null,function(t){return e.theme!==t&&(t=O(t)(e.theme)),c.createElement(g.Provider,{value:t},e.children)})};function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function A(e){var t=e.displayName||e.name||"Component",r=c.forwardRef(function(t,r){return c.createElement(g.Consumer,null,function(n){return c.createElement(e,j({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",a(r,e)}function P(){return c.useContext(g)}var S=function(n,o){if(void 0!==n.__SECRET_EMOTION__)return n.__SECRET_EMOTION__;void 0===o&&(o={});var i,s=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(s))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+s+'" was passed');var a,c=r(function(e){i+=e,v&&f.insert(e,h)});void 0!==o.prefix&&(a={prefix:o.prefix});var u={registered:{},inserted:{},nonce:o.nonce,key:s},f=new _(o);v&&f.inject();var d=new e(a);d.use(o.stylisPlugins)(c);var h="";function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(N.has(e))return N.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==u.registered[e[r]]?r+"{"+u.registered[e[r]]+"}":l(r)+":"+p(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===u.registered[e[r][0]]?e[r].forEach(function(e){t+=l(r)+":"+p(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),N.set(e,t),t}.call(this,e);default:var n=u.registered[e];return!1===t&&void 0!==n?n:e}}var g,E,N=new WeakMap,w=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var O=b,C=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(C,function(e){return h=e,""}),t)}}var j=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(w,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var A=d;d=function(e,t){A(e,t),h=""}}function P(e,t){void 0===u.inserted[g]&&(i="",d(e,t),u.inserted[g]=i)}var S=function(){var e=j.apply(this,arguments),t=s+"-"+g;return void 0===u.registered[t]&&(u.registered[t]=E),P("."+t,e),t};function x(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==u.registered[t]?e.push(t):r+=t+" "}),r}function k(e,t){var r=[],n=x(r,e);return r.length<2?e:n+S(r,t)}function T(e){u.inserted[e]=!0}if(v){var R=document.querySelectorAll("[data-emotion-"+s+"]");Array.prototype.forEach.call(R,function(e){f.tags[0].parentNode.insertBefore(e,f.tags[0]),e.getAttribute("data-emotion-"+s).split(" ").forEach(T)})}var D={flush:function(){v&&(f.flush(),f.inject()),u.inserted={},u.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return k(m(e))},merge:k,getRegisteredStyles:x,injectGlobal:function(){P("",j.apply(this,arguments))},keyframes:function(){var e=j.apply(this,arguments),t="animation-"+g;return P("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:f,caches:u};return n.__SECRET_EMOTION__=D,D}("undefined"!=typeof global?global:{}),x=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__emotion_real===r,l=void 0===o&&u&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?E:N),function(){var p=arguments,f=u&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),void 0===o)if(null==p[0]||void 0===p[0].raw)f.push.apply(f,p);else{f.push(p[0][0]);for(var d=p.length,h=1;h<d;h++)f.push(p[h],p[0][h])}var m=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return c.createElement(g.Consumer,null,function(r){var n=t.props;t.mergedProps=b(w,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(u,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,f.concat(u)):o,void 0!==s&&(i+=" "+s),c.createElement(l,b(a,{},n,{className:i,ref:n.innerRef}))})},r}(c.Component);return m.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(m.defaultProps=r.defaultProps),m.__emotion_styles=f,m.__emotion_base=l,m.__emotion_real=m,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),m.withComponent=function(e,r){return t(e,void 0!==r?b(w,{},n,r):n).apply(void 0,f)},m}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(S),k=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){if((!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t])return o.css+=e.caches.inserted[t],!0}),o}}(S),T=S.flush,R=S.hydrate,D=S.cx,V=S.merge,M=S.getRegisteredStyles,q=S.injectGlobal,I=S.keyframes,L=S.css,z=S.sheet,Y=S.caches;export default x;export{T as flush,R as hydrate,D as cx,V as merge,M as getRegisteredStyles,q as injectGlobal,I as keyframes,L as css,z as sheet,Y as caches,g as ThemeContext,C as ThemeProvider,P as useTheme,A as withTheme,k as extractCritical}; | ||
import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import s from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import c from"react";var u=/[A-Z]|^ms/g,l=n(function(e){return e.replace(u,"-$&").toLowerCase()}),p=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var f=/(attr|calc|counters?|url)\(/,d=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],h=p;p=function(e,t){return"content"===e&&("string"!=typeof t||-1===d.indexOf(t)&&!f.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),h(e,t)}}var m=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=m(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},v="undefined"!=typeof document;function y(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=y(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=y(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(y(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var g=c.createContext({}),E=i,N=function(e){return"theme"!==e&&"innerRef"!==e},w=function(){return!0},b=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},O=s(function(e){return s(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})}),C=function(e){return c.createElement(g.Consumer,null,function(t){return e.theme!==t&&(t=O(t)(e.theme)),c.createElement(g.Provider,{value:t},e.children)})};function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function A(e){var t=e.displayName||e.name||"Component",r=c.forwardRef(function(t,r){return c.createElement(g.Consumer,null,function(n){return c.createElement(e,j({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",a(r,e)}function P(){return c.useContext(g)}var S=function(n,o){if(void 0!==n.__SECRET_EMOTION__)return n.__SECRET_EMOTION__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new _(o),u="",f=r(function(e){s+=e,v&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var d={registered:{},inserted:{},nonce:o.nonce,key:i};v&&c.inject();var h=new e(a);function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(N.has(e))return N.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==d.registered[e[r]]?r+"{"+d.registered[e[r]]+"}":l(r)+":"+p(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===d.registered[e[r][0]]?e[r].forEach(function(e){t+=l(r)+":"+p(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),N.set(e,t),t}.call(this,e);default:var n=d.registered[e];return!1===t&&void 0!==n?n:e}}h.use(o.stylisPlugins)(f);var g,E,N=new WeakMap,w=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var O=b,C=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;b=function(e,t){return O(e.replace(C,function(e){return u=e,""}),t)}}var j=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(w,function(e,t){return i+="-"+t,""}),g=b(o,i),o};if("production"!==process.env.NODE_ENV){var A=h;h=function(e,t){A(e,t),u=""}}function P(e,t){void 0===d.inserted[g]&&(s="",h(e,t),d.inserted[g]=s)}var S=function(){var e=j.apply(this,arguments),t=i+"-"+g;return void 0===d.registered[t]&&(d.registered[t]=E),P("."+t,e),t};function x(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==d.registered[t]?e.push(t):r+=t+" "}),r}function k(e,t){var r=[],n=x(r,e);return r.length<2?e:n+S(r,t)}function T(e){d.inserted[e]=!0}if(v){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(T)})}var D={flush:function(){v&&(c.flush(),c.inject()),d.inserted={},d.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return k(m(e))},merge:k,getRegisteredStyles:x,injectGlobal:function(){P("",j.apply(this,arguments))},keyframes:function(){var e=j.apply(this,arguments),t="animation-"+g;return P("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:c,caches:d};return n.__SECRET_EMOTION__=D,D}("undefined"!=typeof global?global:{}),x=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__emotion_real===r,l=void 0===o&&u&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?E:N),function(){var p=arguments,f=u&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),void 0===o)if(null==p[0]||void 0===p[0].raw)f.push.apply(f,p);else{f.push(p[0][0]);for(var d=p.length,h=1;h<d;h+=1)f.push(p[h],p[0][h])}var m=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return c.createElement(g.Consumer,null,function(r){var n=t.props;t.mergedProps=b(w,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(u,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,f.concat(u)):o,void 0!==s&&(i+=" "+s),c.createElement(l,b(a,{},n,{className:i,ref:n.innerRef}))})},r}(c.Component);return m.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(m.defaultProps=r.defaultProps),m.__emotion_styles=f,m.__emotion_base=l,m.__emotion_real=m,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),m.withComponent=function(e,r){return t(e,void 0!==r?b(w,{},n,r):n).apply(void 0,f)},m}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(S),k=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(S),T=S.flush,R=S.hydrate,D=S.cx,V=S.merge,M=S.getRegisteredStyles,q=S.injectGlobal,I=S.keyframes,L=S.css,z=S.sheet,Y=S.caches;export{T as flush,R as hydrate,D as cx,V as merge,M as getRegisteredStyles,q as injectGlobal,I as keyframes,L as css,z as sheet,Y as caches,g as ThemeContext,C as ThemeProvider,P as useTheme,A as withTheme,k as extractCritical,x as styled}; | ||
//# sourceMappingURL=pretty-lights.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@emotion/stylis"),require("@emotion/hash"),require("stylis-rule-sheet"),require("@emotion/memoize"),require("@emotion/unitless"),require("@emotion/is-prop-valid"),require("@emotion/weak-memoize"),require("hoist-non-react-statics"),require("react")):"function"==typeof define&&define.amd?define(["exports","@emotion/stylis","@emotion/hash","stylis-rule-sheet","@emotion/memoize","@emotion/unitless","@emotion/is-prop-valid","@emotion/weak-memoize","hoist-non-react-statics","react"],t):t(e.prettyLights={},e.Stylis,e.hashString,e.stylisRuleSheet,e.memoize,e.unitless,e.isPropValid,e.weakMemoize,e.hoistNonReactStatics,e.react)}(this,function(e,t,r,n,o,i,s,a,c,u){t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n,o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i,s=s&&s.hasOwnProperty("default")?s.default:s,a=a&&a.hasOwnProperty("default")?a.default:a,c=c&&c.hasOwnProperty("default")?c.default:c,u=u&&u.hasOwnProperty("default")?u.default:u;var l=/[A-Z]|^ms/g,d=o(function(e){return e.replace(l,"-$&").toLowerCase()}),f=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var p=/(attr|calc|counters?|url)\(/,h=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],y=f;f=function(e,t){return"content"===e&&("string"!=typeof t||-1===h.indexOf(t)&&!p.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),y(e,t)}}var m=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=m(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},v="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),w=s,N=function(e){return"theme"!==e&&"innerRef"!==e},O=function(){return!0},b=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n++){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},P=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var j=function(e,o){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===o&&(o={});var i,s=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(s))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+s+'" was passed');var a,c=n(function(e){i+=e,v&&l.insert(e,h)});void 0!==o.prefix&&(a={prefix:o.prefix});var u={registered:{},inserted:{},nonce:o.nonce,key:s},l=new _(o);v&&l.inject();var p=new t(a);p.use(o.stylisPlugins)(c);var h="";function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==u.registered[e[r]]?r+"{"+u.registered[e[r]]+"}":d(r)+":"+f(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===u.registered[e[r][0]]?e[r].forEach(function(e){t+=d(r)+":"+f(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),w.set(e,t),t}.call(this,e);default:var n=u.registered[e];return!1===t&&void 0!==n?n:e}}var g,E,w=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,O=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var b=O,P=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;O=function(e,t){return b(e.replace(P,function(e){return h=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(N,function(e,t){return i+="-"+t,""}),g=O(o,i),o};if("production"!==process.env.NODE_ENV){var j=p;p=function(e,t){j(e,t),h=""}}function S(e,t){void 0===u.inserted[g]&&(i="",p(e,t),u.inserted[g]=i)}var A=function(){var e=C.apply(this,arguments),t=s+"-"+g;return void 0===u.registered[t]&&(u.registered[t]=E),S("."+t,e),t};function x(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==u.registered[t]?e.push(t):r+=t+" "}),r}function k(e,t){var r=[],n=x(r,e);return r.length<2?e:n+A(r,t)}function T(e){u.inserted[e]=!0}if(v){var R=document.querySelectorAll("[data-emotion-"+s+"]");Array.prototype.forEach.call(R,function(e){l.tags[0].parentNode.insertBefore(e,l.tags[0]),e.getAttribute("data-emotion-"+s).split(" ").forEach(T)})}var q={flush:function(){v&&(l.flush(),l.inject()),u.inserted={},u.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return k(m(e))},merge:k,getRegisteredStyles:x,injectGlobal:function(){S("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return S("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:l,caches:u};return e.__SECRET_EMOTION__=q,q}("undefined"!=typeof global?global:{}),S=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__emotion_real===r,l=void 0===o&&c&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?w:N),function(){var d=arguments,f=c&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),void 0===o)if(null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{f.push(d[0][0]);for(var p=d.length,h=1;h<p;h++)f.push(d[h],d[0][h])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=b(O,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,f.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,b(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__emotion_styles=f,y.__emotion_base=l,y.__emotion_real=y,y.__emotion_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?b(O,{},n,r):n).apply(void 0,f)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(j),A=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){if((!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t])return o.css+=e.caches.inserted[t],!0}),o}}(j),x=j.hydrate,k=j.cx,T=j.merge,R=j.getRegisteredStyles,q=j.injectGlobal,V=j.keyframes,D=j.css,M=j.sheet,z=j.caches;e.flush=j.flush,e.hydrate=x,e.cx=k,e.merge=T,e.getRegisteredStyles=R,e.injectGlobal=q,e.keyframes=V,e.css=D,e.sheet=M,e.caches=z,e.ThemeContext=E,e.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=P(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},e.useTheme=function(){return u.useContext(E)},e.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},e.extractCritical=A,e.default=S}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@emotion/stylis"),require("@emotion/hash"),require("stylis-rule-sheet"),require("@emotion/memoize"),require("@emotion/unitless"),require("@emotion/is-prop-valid"),require("@emotion/weak-memoize"),require("hoist-non-react-statics"),require("react")):"function"==typeof define&&define.amd?define(["exports","@emotion/stylis","@emotion/hash","stylis-rule-sheet","@emotion/memoize","@emotion/unitless","@emotion/is-prop-valid","@emotion/weak-memoize","hoist-non-react-statics","react"],t):t(e.prettyLights={},e.Stylis,e.hashString,e.stylisRuleSheet,e.memoize,e.unitless,e.isPropValid,e.weakMemoize,e.hoistNonReactStatics,e.react)}(this,function(e,t,r,n,o,i,s,a,c,u){t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n,o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i,s=s&&s.hasOwnProperty("default")?s.default:s,a=a&&a.hasOwnProperty("default")?a.default:a,c=c&&c.hasOwnProperty("default")?c.default:c,u=u&&u.hasOwnProperty("default")?u.default:u;var l=/[A-Z]|^ms/g,d=o(function(e){return e.replace(l,"-$&").toLowerCase()}),f=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==process.env.NODE_ENV){var p=/(attr|calc|counters?|url)\(/,h=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],y=f;f=function(e,t){return"content"===e&&("string"!=typeof t||-1===h.indexOf(t)&&!p.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),y(e,t)}}var m=function(e){for(var t="",r=0;r<e.length;r+=1){var n=e[r];if(null!=n){var o=void 0;switch(typeof n){case"boolean":break;case"object":if(Array.isArray(n))o=m(n);else for(var i in o="",n)n[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},v="undefined"!=typeof document;function g(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var _=function(e){this.isSpeedy="production"===process.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=e};_.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=g(this.opts),this.injected=!0},_.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},_.prototype.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn("illegal rule",e)}}else{var n=g(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr+=1,this.ctr%65e3==0&&this.tags.push(g(this.opts))},_.prototype.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1};var E=u.createContext({}),w=s,N=function(e){return"theme"!==e&&"innerRef"!==e},O=function(){return!0},b=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],s=void 0;for(s in i)e(s)&&(t[s]=i[s])}return t},P=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!=typeof t||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return Object.assign({},e,t)}(e,t)})});function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var j=function(e,o){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===o&&(o={});var i=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(i))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var s,a,c=new _(o),u="",l=n(function(e){s+=e,v&&c.insert(e,u)});void 0!==o.prefix&&(a={prefix:o.prefix});var p={registered:{},inserted:{},nonce:o.nonce,key:i};v&&c.inject();var h=new t(a);function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!=typeof e[r])t+=void 0!==p.registered[e[r]]?r+"{"+p.registered[e[r]]+"}":d(r)+":"+f(r,e[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===p.registered[e[r][0]]?e[r].forEach(function(e){t+=d(r)+":"+f(r,e)+";"}):t+=r+"{"+y.call(this,e[r],!1)+"}"}},this),w.set(e,t),t}.call(this,e);default:var n=p.registered[e];return!1===t&&void 0!==n?n:e}}h.use(o.stylisPlugins)(l);var g,E,w=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,O=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var b=O,P=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;O=function(e,t){return b(e.replace(P,function(e){return u=e,""}),t)}}var C=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=!0,o="",i="";return null==e||void 0===e.raw?(n=!1,o+=y.call(this,e,!1)):o+=e[0],t.forEach(function(t,r){o+=y.call(this,t,46===o.charCodeAt(o.length-1)),!0===n&&void 0!==e[r+1]&&(o+=e[r+1])},this),E=o,o=o.replace(N,function(e,t){return i+="-"+t,""}),g=O(o,i),o};if("production"!==process.env.NODE_ENV){var j=h;h=function(e,t){j(e,t),u=""}}function S(e,t){void 0===p.inserted[g]&&(s="",h(e,t),p.inserted[g]=s)}var A=function(){var e=C.apply(this,arguments),t=i+"-"+g;return void 0===p.registered[t]&&(p.registered[t]=E),S("."+t,e),t};function x(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):r+=t+" "}),r}function k(e,t){var r=[],n=x(r,e);return r.length<2?e:n+A(r,t)}function T(e){p.inserted[e]=!0}if(v){var R=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(R,function(e){c.tags[0].parentNode.insertBefore(e,c.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(T)})}var q={flush:function(){v&&(c.flush(),c.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(T)},cx:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return k(m(e))},merge:k,getRegisteredStyles:x,injectGlobal:function(){S("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+g;return S("","@keyframes "+t+"{"+e+"}"),t},css:A,sheet:c,caches:p};return e.__SECRET_EMOTION__=q,q}("undefined"!=typeof global?global:{}),S=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,s,a;void 0!==n&&(o=n.e,i=n.label,s=n.target,a=r.__emotion_forwardProp&&n.shouldForwardProp?function(e){return r.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=r.__emotion_real===r,l=void 0===o&&c&&r.__emotion_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?w:N),function(){var d=arguments,f=c&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),void 0===o)if(null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{f.push(d[0][0]);for(var p=d.length,h=1;h<p;h+=1)f.push(d[h],d[0][h])}var y=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),(r.prototype=Object.create(t&&t.prototype)).constructor=r,r.prototype.render=function(){var t=this;return u.createElement(E.Consumer,null,function(r){var n=t.props;t.mergedProps=b(O,{},n,{theme:n.theme||r});var i="",c=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(c,n.className):n.className+" "),i+=void 0===o?e.css.apply(t,f.concat(c)):o,void 0!==s&&(i+=" "+s),u.createElement(l,b(a,{},n,{className:i,ref:n.innerRef}))})},r}(u.Component);return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",void 0!==r.defaultProps&&(y.defaultProps=r.defaultProps),y.__emotion_styles=f,y.__emotion_base=l,y.__emotion_real=y,y.__emotion_forwardProp=a,Object.defineProperty(y,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===s?"NO_COMPONENT_SELECTOR":"."+s}}),y.withComponent=function(e,r){return t(e,void 0!==r?b(O,{},n,r):n).apply(void 0,f)},y}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without babel-plugin-emotion.\nPlease install and setup babel-plugin-emotion or use the function call syntax(`styled('"+t+"')` instead of `styled."+t+"`)")}}})),t}(j),A=function(e){return function(t){for(var r,n=new RegExp(e.caches.key+"-([a-zA-Z0-9-_]+)","gm"),o={html:t,ids:[],css:""},i={};null!==(r=n.exec(t));)void 0===i[r[1]]&&(i[r[1]]=!0);return o.ids=Object.keys(e.caches.inserted).filter(function(t){return(!0===i[t]||void 0===e.caches.registered[e.caches.key+"-"+t])&&!0!==e.caches.inserted[t]&&(o.css+=e.caches.inserted[t],!0)}),o}}(j),x=j.hydrate,k=j.cx,T=j.merge,R=j.getRegisteredStyles,q=j.injectGlobal,V=j.keyframes,D=j.css,M=j.sheet,z=j.caches;e.flush=j.flush,e.hydrate=x,e.cx=k,e.merge=T,e.getRegisteredStyles=R,e.injectGlobal=q,e.keyframes=V,e.css=D,e.sheet=M,e.caches=z,e.ThemeContext=E,e.ThemeProvider=function(e){return u.createElement(E.Consumer,null,function(t){return e.theme!==t&&(t=P(t)(e.theme)),u.createElement(E.Provider,{value:t},e.children)})},e.useTheme=function(){return u.useContext(E)},e.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(E.Consumer,null,function(n){return u.createElement(e,C({theme:n,ref:r},t))})});return r.displayName="WithTheme("+t+")",c(r,e)},e.extractCritical=A,e.styled=S}); | ||
//# sourceMappingURL=pretty-lights.umd.js.map |
{ | ||
"name": "pretty-lights", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "CSS-in-JS with a reliable API", | ||
@@ -49,5 +49,8 @@ "main": "lib/pretty-lights.js", | ||
"@babel/core": "7.6.2", | ||
"@babel/plugin-proposal-class-properties": "7.5.5", | ||
"@babel/preset-env": "7.6.2", | ||
"@babel/preset-react": "7.6.3", | ||
"@emotion/babel-utils": "0.6.10", | ||
"babel-check-duplicated-nodes": "1.0.0", | ||
"babel-eslint": "10.0.1", | ||
"babel-plugin-codegen": "3.0.0", | ||
@@ -61,4 +64,16 @@ "chalk": "2.4.2", | ||
"enzyme-to-json": "3.4.2", | ||
"eslint": "5.16.0", | ||
"eslint-config-airbnb": "17.1.0", | ||
"eslint-config-kyt": "1.0.0-alpha.8d1d2ff9", | ||
"eslint-config-prettier": "4.2.0", | ||
"eslint-plugin-import": "2.17.2", | ||
"eslint-plugin-json": "1.4.0", | ||
"eslint-plugin-jsx-a11y": "6.2.1", | ||
"eslint-plugin-kyt": "1.0.0-alpha.8d1d2ff9", | ||
"eslint-plugin-prettier": "3.1.0", | ||
"eslint-plugin-react": "7.13.0", | ||
"eslint-plugin-react-hooks": "1.6.0", | ||
"find-root": "1.1.0", | ||
"jest": "24.9.0", | ||
"jest-in-case": "1.0.2", | ||
"jest-serializer-html": "^7.0.0", | ||
@@ -68,2 +83,4 @@ "microbundle": "0.11.0", | ||
"polished": "3.4.1", | ||
"prettier": "1.17.1", | ||
"pretty-format": "24.9.0", | ||
"prop-types": "^15.7.2", | ||
@@ -79,4 +96,4 @@ "react": "^16.3.2", | ||
"clean": "rimraf lib babel jest", | ||
"build:jest": "babel src/jest -d jest", | ||
"build:babel": "babel src/babel -d babel", | ||
"build:jest": "babel src/jest --ignore \"**/__tests__/**\" -d jest", | ||
"build:babel": "babel src/babel --ignore \"**/__tests__/**\" -d babel", | ||
"build:main": "NODE_ENV=production microbundle --jsx React.createElement", | ||
@@ -86,4 +103,7 @@ "build:dev": "npm run clean && npm run build:jest && npm run build:babel", | ||
"prepare": "npm run build", | ||
"test": "npm run build:dev && jest" | ||
"test": "npm run build:dev && jest", | ||
"test-update": "npm run build:dev && jest -u", | ||
"lint": "eslint .", | ||
"lint-fix": "eslint . --fix" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
182658
0
43
843