!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react-is"),require("react")):"function"==typeof define&&define.amd?define(["react-is","react"],t):(e=e||self).styled=t(e.ReactIs,e.React)}(this,(function(e,t){"use strict";var r="default"in e?e.default:e,n="default"in t?t.default:t;function o(e){return e&&"string"==typeof e.styledComponentId}var a=function(e,t){for(var r=[e[0]],n=0,o=t.length;n ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document ``\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"};function y(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],r=1,n=arguments.length;r1?t-1:0),n=1;n=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&v(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var a=n;a=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a1<<30)&&v(16,""+t),w.set(e,t),S.set(t,e),t},A=function(e){return S.get(e)},x=function(e,t){t>=k&&(k=t+1),w.set(e,t),S.set(t,e)},P="style["+h+'][data-styled-version="5.3.6"]',I=new RegExp("^"+h+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),R=function(e,t,r){for(var n,o=r.split(","),a=0,i=o.length;a=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(h))return n}}(r),a=void 0!==o?o.nextSibling:null;n.setAttribute(h,"active"),n.setAttribute("data-styled-version","5.3.6");var i=T();return i&&n.setAttribute("nonce",i),r.insertBefore(n,a),n},E=function(){function e(e){var t=this.element=_(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(l+=e+",")})),n+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return n}(this)},e}(),L=/(a)(d)/gi,$=function(e){return String.fromCharCode(e+(e>25?39:97))};function F(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=$(t%52)+r;return($(t%52)+r).replace(L,"$1-$2")}var B=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},G=function(e){return B(5381,e)},H=G("5.3.6"),Y=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=!1,this.componentId=t,this.baseHash=B(H,t),this.baseStyle=r,M.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var a=de(this.rules,e,t,r).join(""),i=F(B(this.baseHash,a)>>>0);if(!t.hasNameForId(n,i)){var s=r(a,"."+i,void 0,n);t.insertRules(n,i,s)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,l=B(this.baseHash,r.hash),u="",d=0;d>>0);if(!t.hasNameForId(n,m)){var g=r(u,"."+m,void 0,n);t.insertRules(n,m,g)}o.push(m)}}return o.join(" ")},e}();function q(e){function t(e,t,n){var o=t.trim().split(p);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";sn&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*r&&0c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0f)&&($=(G=G.replace(" ",":")).length),00&&(o[0]=o[0].replace(n,m))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),g.hash=d.length?d.reduce((function(e,t){return t.name||v(15),B(e,t.name)}),5381).toString():"",g}var X=n.createContext(),Z=X.Consumer,J=n.createContext(),K=(J.Consumer,new M),Q=V();function ee(){return t.useContext(X)||K}function te(){return t.useContext(J)||Q}function re(e){var r=t.useState(e.stylisPlugins),o=r[0],a=r[1],i=ee(),s=t.useMemo((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=t.useMemo((function(){return V({options:{prefix:!e.disableVendorPrefixes},plugins:o})}),[e.disableVendorPrefixes,o]);return t.useEffect((function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c1?t-1:0),n=1;n2&&M.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),me=n.createContext(),ge=me.Consumer,ye=/invalid hook call/i,ve=new Set,be=function(e,r){var n="The component "+e+(r?' with the id of "'+r+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",o=console.error;try{var a=!0;console.error=function(e){if(ye.test(e))a=!1,ve.delete(n);else{for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i>>0)},ke=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=T();return""},this.getStyleTags=function(){return e.sealed?v(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return v(2);var r=((t={})[h]="",t["data-styled-version"]="5.3.6",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=T();return o&&(r.nonce=o),[n.createElement("style",d({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new M({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?v(2):n.createElement(re,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return v(3)},e}(),Ce={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ae={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Pe={};function Ie(e){return r.isMemo(e)?xe:Pe[e.$$typeof]||Ce}Pe[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Pe[r.Memo]=xe;var Re=Object.defineProperty,Oe=Object.getOwnPropertyNames,Te=Object.getOwnPropertySymbols,_e=Object.getOwnPropertyDescriptor,Ee=Object.getPrototypeOf,je=Object.prototype,Ne=function e(t,r,n){if("string"!=typeof r){if(je){var o=Ee(r);o&&o!==je&&e(t,o,n)}var a=Oe(r);Te&&(a=a.concat(Te(r)));for(var i=Ie(t),s=Ie(r),c=0;c1?r-1:0),a=1;a meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app."),r.server&&u(l,e,r,a,o),t.useLayoutEffect((function(){if(!r.server)return u(l,e,r,a,o),function(){return c.removeStyles(l,r)}}),[l,e,r,a,o]),null}function u(e,t,r,n,o){if(c.isStatic)c.renderStyles(e,m,r,o);else{var a=d({},t,{theme:we(t,n,l.defaultProps)});c.renderStyles(e,a,r,o)}}return be(s),n.memo(l)},css:fe,isStyledComponent:o,keyframes:function(e){"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,Be=/(^-|-$)/g;function Ge(e){return e.replace(Fe,"-").replace(Be,"")}function He(e){return"string"==typeof e&&e.charAt(0)===e.charAt(0).toLowerCase()}var Ye=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},qe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function We(e,t,r){var n=e[r];Ye(t)&&Ye(n)?Ue(n,t):e[r]=t}function Ue(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(o[r]=e[r]);return o}(r,["componentId"]),o=t&&t+"-"+(He(e)?e:Ge(u(e)));return Xe(e,d({},n,{attrs:w,componentId:o}),a)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?Ue({},e.defaultProps,t):t}}),be(v,b),k.warnTooManyClasses=function(e,t){var r={},n=!1;return function(o){if(!n&&(r[o]=!0,Object.keys(r).length>=200)){var a=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+a+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n "),n=!0,r={}}}}(v,b),k.toString=function(){return"."+k.styledComponentId},h&&Ne(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}var Ze=function(t){return function t(r,n,o){if(void 0===o&&(o=c),!e.isValidElementType(n))return v(1,String(n));var a=function(){return r(n,o,fe.apply(void 0,arguments))};return a.withConfig=function(e){return t(r,n,d({},o,{},e))},a.attrs=function(e){return t(r,n,d({},o,{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},a}(Xe,t)};for(var Je in["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ze[e]=Ze(e)})),ze)Ze[Je]=ze[Je];return Ze})); //# sourceMappingURL=styled-components.js.map