styled-components 6.4.0-prerelease.3 → 6.4.0-prerelease.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,6 @@
1
- import{__spreadArray as e,__assign as t,__makeTemplateObject as n}from"tslib";import r from"@emotion/is-prop-valid";import o,{createElement as s}from"react";import i from"@emotion/unitless";import*as a from"stylis";var c="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",u="active",l="data-styled-version",h="6.4.0-prerelease.3",p="/*!sc*/\n",d="undefined"!=typeof window&&"undefined"!=typeof document,f=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),m="sc-keyframes-",v={},y="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\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 `<StyleSheetManager stylisPlugins={[]}>`, 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",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function S(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(g.apply(void 0,e([y[t]],n,!1)).trim())}var w=1<<30,b=new Map,E=new Map,N=1,C=function(e){if(b.has(e))return b.get(e);for(;E.has(N);)N++;var t=N++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>w))throw S(16,"".concat(t));return b.set(e,t),E.set(t,e),t},A=function(e,t){N=t+1,b.set(e,t),E.set(t,e)},_=/invalid hook call/i,P=new Set,I=function(t,n){if("production"!==process.env.NODE_ENV){var r=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(r," has been created dynamically.\n")+"You 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.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];_.test(t)?(a=!1,P.delete(s)):i.apply(void 0,e([t],n,!1))},"function"==typeof o.useState&&o.useState(null),a&&!P.has(s)&&(console.warn(s),P.add(s))}catch(e){_.test(e.message)&&P.delete(s)}finally{console.error=i}}},R=Object.freeze([]),O=Object.freeze({});function D(e,t,n){return void 0===n&&(n=O),e.theme!==n.theme&&e.theme||t||n.theme}var T=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),x=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,j=/(^-|-$)/g;function k(e){return e.replace(x,"-").replace(j,"")}var M=/(a)(d)/gi,V=function(e){return String.fromCharCode(e+(e>25?39:97))};function G(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=V(t%52)+n;return(V(t%52)+n).replace(M,"$1-$2")}var F,L=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},B=function(e){return L(5381,e)};function z(e){return G(B(e)>>>0)}function $(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function Y(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var W="function"==typeof Symbol&&Symbol.for,q=W?Symbol.for("react.memo"):60115,H=W?Symbol.for("react.forward_ref"):60112,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},J={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Z=((F={})[H]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[q]=X,F);function K(e){return("type"in(t=e)&&t.type.$$typeof)===q?X:"$$typeof"in e?Z[e.$$typeof]:U;var t}var Q=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,ne=Object.getOwnPropertyDescriptor,re=Object.getPrototypeOf,oe=Object.prototype;function se(e,t,n){if("string"!=typeof t){if(oe){var r=re(t);r&&r!==oe&&se(e,r,n)}var o=ee(t);te&&(o=o.concat(te(t)));for(var s=K(e),i=K(t),a=0;a<o.length;++a){var c=o[a];if(!(c in J||n&&n[c]||i&&c in i||s&&c in s)){var u=ne(t,c);try{Q(e,c,u)}catch(e){}}}}return e}function ie(e){return"function"==typeof e}function ae(e){return"object"==typeof e&&"styledComponentId"in e}function ce(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ue(e,t){return e.join(t||"")}function le(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function he(e,t,n){if(void 0===n&&(n=!1),!n&&!le(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=he(e[r],t[r]);else if(le(t))for(var r in t)e[r]=he(e[r],t[r]);return e}function pe(e,t){Object.defineProperty(e,"toString",{value:t})}var de=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw S(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=(s=0,t.length);s<c;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++,a++);a>0&&this._cGroup>e&&(this._cIndex+=a)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+p;return t},e}(),fe="style[".concat(c,"][").concat(l,'="').concat(h,'"]'),me=new RegExp("^".concat(c,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ve=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},ye=function(e){if(!e)return document;if(ve(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(ve(t))return t}return document},ge=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},Se=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(p),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(me);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(A(l,u),ge(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},we=function(e){for(var t=ye(e.options.target).querySelectorAll(fe),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(c)!==u&&(Se(e,o),o.parentNode&&o.parentNode.removeChild(o))}},be=!1;function Ee(){if(!1!==be)return be;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return be=e.nonce||e.getAttribute("content")||void 0;var t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return be=t.getAttribute("content")||void 0}return be="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}var Ne=function(e,t){var n=document.head,r=e||n,o=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(c,"]")));return t[t.length-1]}(r),i=void 0!==s?s.nextSibling:null;o.setAttribute(c,u),o.setAttribute(l,h);var a=t||Ee();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},Ce=function(){function e(e,t){this.element=Ne(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,r=0,o=n.length;r<o;r++){var s=n[r];if(s.ownerNode===e)return s}throw S(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Ae=function(){function e(e,t){this.element=Ne(e,t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_e=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Pe=d,Ie={isServer:!d,useCSSOMInjection:!f},Re=function(){function e(e,n,r){void 0===e&&(e=O),void 0===n&&(n={});var o=this;this.options=t(t({},Ie),e),this.gs=n,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!e.isServer,!this.server&&d&&Pe&&(Pe=!1,we(this)),pe(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return E.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var a=c+".g"+n+'[id="'+o+'"]',u="";s.forEach(function(e){e.length>0&&(u+=e+",")}),r+=i+a+'{content:"'+u+'"}'+p},s=0;s<n;s++)o(s);return r}(o)})}return e.registerId=function(e){return C(e)},e.prototype.rehydrate=function(){!this.server&&d&&we(this)},e.prototype.reconstructWithOptions=function(n,r){void 0===r&&(r=!0);var o=new e(t(t({},this.options),n),this.gs,r&&this.names||void 0);return o.keyframeIds=new Set(this.keyframeIds),!this.server&&d&&n.target!==this.options.target&&ye(this.options.target)!==ye(n.target)&&we(o),o},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target,r=e.nonce;return e.isServer?new _e(n):t?new Ce(n,r):new Ae(n,r)}(this.options),new de(e)));var e},e.prototype.hasNameForId=function(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r},e.prototype.registerName=function(e,t){C(e),e.startsWith(m)&&this.keyframeIds.add(e);var n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(C(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(C(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function Oe(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in i||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var De=function(e){return e>="A"&&e<="Z"};function Te(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;De(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var xe=Symbol.for("sc-keyframes");function je(e){return"object"==typeof e&&null!==e&&xe in e}var ke=function(e){return null==e||!1===e||""===e},Me=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!ke(o)&&(Array.isArray(o)&&o.isCss||ie(o)?n.push("".concat(Te(r),":"),o,";"):le(o)?n.push.apply(n,e(e(["".concat(r," {")],Me(o),!1),["}"],!1)):n.push("".concat(Te(r),": ").concat(Oe(r,o),";")))}return n};function Ve(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(ke(e))return o;if(ae(e))return o.push(".".concat(e.styledComponentId)),o;if(ie(e)){if(!ie(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return o.push(e),o;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||je(s)||le(s)||null===s||console.error("".concat($(e)," 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.")),Ve(s,t,n,r,o)}var i;if(je(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(le(e)){for(var a=Me(e),c=0;c<a.length;c++)o.push(a[c]);return o}if(!Array.isArray(e))return o.push(e.toString()),o;for(c=0;c<e.length;c++)Ve(e[c],t,n,r,o);return o}function Ge(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ie(n)&&!ae(n))return!1}return!0}var Fe=B(h),Le=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ge(e),this.componentId=t,this.baseHash=L(Fe,t),this.baseStyle=n,Re.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ce(r,this.staticRulesId);else{var o=ue(Ve(this.rules,e,t,n)),s=G(L(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,"."+s,void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=ce(r,s),this.staticRulesId=s}else{for(var a=L(this.baseHash,n.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l,"production"!==process.env.NODE_ENV&&(a=L(a,l));else if(l){var h=ue(Ve(l,e,t,n));a=L(L(a,String(u)),h),c+=h}}if(c){var p=G(a>>>0);if(!t.hasNameForId(this.componentId,p)){var d=n(c,"."+p,void 0,this.componentId);t.insertRules(this.componentId,p,d)}r=ce(r,p)}}return r},e}(),Be=/&/g,ze=47,$e=42;function Ye(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==r||o||i!==ze||e.charCodeAt(s+1)!==$e)if(o)i===$e&&e.charCodeAt(s+1)===ze&&(o=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,s++}return 0!==n||0!==r}function We(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=We(e.children,t)),e})}function qe(e){var t,n,r,o=void 0===e?O:e,s=o.options,i=void 0===s?O:s,c=o.plugins,u=void 0===c?R:c,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},h=u.slice();h.push(function(e){e.type===a.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(Be,n).replace(r,l))}),i.prefix&&h.push(a.prefixer),h.push(a.stringify);var p=[],d=a.middleware(h.concat(a.rulesheet(function(e){return p.push(e)}))),f=function(e,o,s,c){void 0===o&&(o=""),void 0===s&&(s=""),void 0===c&&(c="&"),t=c,n=o,r=void 0;var u=function(e){if(!Ye(e))return e;for(var t=e.length,n="",r=0,o=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==ze||e.charCodeAt(a+1)!==$e)if(i)c===$e&&e.charCodeAt(a+1)===ze&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===s)if(123===c)o++;else if(125===c){if(--o<0){for(var u=a+1;u<t;){var l=e.charCodeAt(u);if(59===l||10===l)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,a=u-1,r=u;continue}0===o&&(n+=e.substring(r,a+1),r=a+1)}else 59===c&&0===o&&(n+=e.substring(r,a+1),r=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(r<t){var h=e.substring(r);Ye(h)||(n+=h)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,o=0,s=0,i=0;o<t;){var a=e.charCodeAt(o);if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1))if(0===s)if(a===ze&&o+1<t&&e.charCodeAt(o+1)===$e){for(o+=2;o+1<t&&(e.charCodeAt(o)!==$e||e.charCodeAt(o+1)!==ze);)o++;o+=2}else if(40===a&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===a?i--:40===a&&i++,o++;else if(a===$e&&o+1<t&&e.charCodeAt(o+1)===ze)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===ze&&o+1<t&&e.charCodeAt(o+1)===ze){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===s?s=a:s===a&&(s=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(e)),l=a.compile(s||o?"".concat(s," ").concat(o," { ").concat(u," }"):u);return i.namespace&&(l=We(l,i.namespace)),p=[],a.serialize(l,d),p};return f.hash=u.length?u.reduce(function(e,t){return t.name||S(15),L(e,t.name)},5381).toString():"",f}var He=new Re,Ue=qe(),Je=o.createContext({shouldForwardProp:void 0,styleSheet:He,stylis:Ue}),Xe=Je.Consumer,Ze=o.createContext(void 0);function Ke(){return o.useContext(Je)}function Qe(e){if(!o.useMemo)return e.children;var t=Ke().styleSheet,n=o.useMemo(function(){var n=t;return e.sheet?n=e.sheet:e.target?n=n.reconstructWithOptions({target:e.target,nonce:e.nonce},!1):void 0!==e.nonce&&(n=n.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,t]),r=o.useMemo(function(){return qe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),s=o.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:r}},[e.shouldForwardProp,n,r]);return o.createElement(Je.Provider,{value:s},o.createElement(Ze.Provider,{value:r},e.children))}var et=o.createContext(void 0),tt=et.Consumer;function nt(){var e=o.useContext(et);if(!e)throw S(18);return e}function rt(e){var n=o.useContext(et),r=o.useMemo(function(){return function(e,n){if(!e)throw S(14);if(ie(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw S(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw S(8);return n?t(t({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?o.createElement(et.Provider,{value:r},e.children):null}var ot={},st=new Set;function it(e,n,i){var a=ae(e),c=e,u=!Y(e),l=n.attrs,p=void 0===l?R:l,d=n.componentId,f=void 0===d?function(e,t){var n="string"!=typeof e?"sc":k(e);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat(z(h+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(n.displayName,n.parentComponentId):d,m=n.displayName,v=void 0===m?function(e){return Y(e)?"styled.".concat(e):"Styled(".concat($(e),")")}(e):m,y=n.displayName&&n.componentId?"".concat(k(n.displayName),"-").concat(n.componentId):n.componentId||f,g=a&&c.attrs?c.attrs.concat(p).filter(Boolean):p,S=n.shouldForwardProp;if(a&&c.shouldForwardProp){var w=c.shouldForwardProp;if(n.shouldForwardProp){var b=n.shouldForwardProp;S=function(e,t){return w(e,t)&&b(e,t)}}else S=w}var E=new Le(i,y,a?c.componentStyle:void 0);function N(e,n){return function(e,n,i){var a=e.attrs,c=e.componentStyle,u=e.defaultProps,l=e.foldedComponentIds,h=e.styledComponentId,p=e.target,d=o.useContext(et),f=Ke(),m=e.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&o.useDebugValue&&o.useDebugValue(h);var v=D(n,d,u)||O,y=function(e,n,r){for(var o,s=t(t({},n),{className:void 0,theme:r}),i=0;i<e.length;i+=1){var a=ie(o=e[i])?o(t({},s)):o;for(var c in a)"className"===c?s.className=ce(s.className,a[c]):"style"===c?s.style=t(t({},s.style),a[c]):c in n&&void 0===n[c]||(s[c]=a[c])}return"className"in n&&"string"==typeof n.className&&(s.className=ce(s.className,n.className)),s}(a,n,v),g=y.as||p,S={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w&&y.theme===v||("forwardedAs"===w?S.as=y.forwardedAs:m&&!m(w,g)||(S[w]=y[w],m||"development"!==process.env.NODE_ENV||r(w)||st.has(w)||!T.has(g)||(st.add(w),console.warn('styled-components: it looks like an unknown prop "'.concat(w,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var b=function(e,t,n,r){var s=e.generateAndInjectStyles(t,n,r);return"production"!==process.env.NODE_ENV&&o.useDebugValue&&o.useDebugValue(s),s}(c,y,f.styleSheet,f.stylis);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(b);var E=ce(l,h);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),S[Y(g)&&!T.has(g)?"class":"className"]=E,i&&(S.ref=i),s(g,S)}(C,e,n)}N.displayName=v;var C=o.forwardRef(N);return C.attrs=g,C.componentStyle=E,C.displayName=v,C.shouldForwardProp=S,C.foldedComponentIds=a?ce(c.foldedComponentIds,c.styledComponentId):"",C.styledComponentId=y,C.target=a?c.target:e,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=a?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)he(e,o[r],!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(I(v,y),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider 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 <Component />"),r=!0,n={}}}}(v,y)),pe(C,function(){return".".concat(C.styledComponentId)}),u&&se(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function at(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function ut(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ie(t)||le(t))return ct(Ve(at(R,e([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Ve(o):ct(Ve(at(o,n)))}function lt(n,r,o){if(void 0===o&&(o=O),!r)throw S(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,ut.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return lt(n,r,t(t({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return lt(n,r,t(t({},o),e))},s}var ht=function(e){return lt(it,e)},pt=ht;T.forEach(function(e){pt[e]=ht(e)});var dt,ft,mt=function(){function e(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=Ge(e),Re.registerId(this.componentId)}return e.prototype.removeStyles=function(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)},e.prototype.renderStyles=function(e,t,n,r){var o=this.componentId;if(this.isStatic)if(n.hasNameForId(o,o+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{var s=this.computeRules(e,t,n,r);n.insertRules(o,s.name,s.rules)}else{var i=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&i){var a=i.rules,c=this.instanceRules.get(e).rules;if(a.length===c.length){for(var u=!0,l=0;l<a.length;l++)if(a[l]!==c[l]){u=!1;break}if(u)return}}this.rebuildGroup(n)}},e.prototype.computeRules=function(e,t,n,r){var o=ue(Ve(this.rules,t,n,r)),s={name:this.componentId+e,rules:r(o,"")};return this.instanceRules.set(e,s),s},e.prototype.rebuildGroup=function(e){var t=this.componentId;e.clearRules(t),this.instanceRules.forEach(function(n){e.insertRules(t,n.name,n.rules)})},e}();function vt(n){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var i=ut.apply(void 0,e([n],r,!1)),a="sc-global-".concat(z(JSON.stringify(i))),c=new mt(i,a);"production"!==process.env.NODE_ENV&&I(a);var u=function(e){var t,n=Ke(),r=o.useContext(et),s=o.useRef(null);return null===s.current&&(s.current=n.styleSheet.allocateGSInstance(a)),t=s.current,"production"!==process.env.NODE_ENV&&o.Children.count(e.children)&&console.warn("The global style component ".concat(a," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&i.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),n.styleSheet.server&&l(t,e,n.styleSheet,r,n.stylis),o.useLayoutEffect(function(){return n.styleSheet.server||l(t,e,n.styleSheet,r,n.stylis),function(){c.removeStyles(t,n.styleSheet)}},c.isStatic?[t,n.styleSheet]:[t,e,n.styleSheet,r,n.stylis]),n.styleSheet.server&&c.instanceRules.delete(t),null};function l(e,n,r,o,s){if(c.isStatic)c.renderStyles(e,v,r,s);else{var i=t(t({},n),{theme:D(n,o,u.defaultProps)});c.renderStyles(e,i,r,s)}}return o.memo(u)}function yt(e,t,n,r,o){for(var s in e){var i=e[s],a=o?o+"-"+s:s;if("object"==typeof i&&null!==i){var c={};yt(i,t,c,r,a),n[s]=c}else n[s]=r(a,i,s)}}function gt(e,t,n,r){var o="";for(var s in e){var i=e[s],a=t[s],c=r?r+"-"+s:s;"object"==typeof i&&null!==i?"object"==typeof a&&null!==a&&(o+=gt(i,a,n,c)):void 0!==a&&"function"!=typeof a&&(o+="--"+n+c+":"+a+";")}return o}function St(e,t){var r,o,s,i,a=(null!==(r=null==t?void 0:t.prefix)&&void 0!==r?r:"sc")+"-",c=null!==(o=null==t?void 0:t.selector)&&void 0!==o?o:":root",u=(yt(e,s=a,i={},function(e,t){if("production"!==process.env.NODE_ENV){for(var n=String(t),r=0,o=0;o<n.length&&(40===n.charCodeAt(o)?r++:41===n.charCodeAt(o)&&r--,!(r<0));o++);0!==r&&console.warn('createTheme: value "'.concat(n,'" at "').concat(e,'" contains unbalanced parentheses and may break the var() fallback'))}return"var(--"+s+e+", "+t+")"}),i),l=vt(dt||(dt=n(["\n "," {\n ","\n }\n "],["\n "," {\n ","\n }\n "])),c,function(t){return gt(e,t.theme,a)});return Object.assign(u,{GlobalStyle:l,raw:e,resolve:function(t){if(!d)throw new Error("createTheme.resolve() is client-only");var n=null!=t?t:document.documentElement;return function(e,t,n){var r={};return yt(e,t,r,function(e,r){return n.getPropertyValue("--"+t+e).trim()||r}),r}(e,a,getComputedStyle(n))}})}var wt=function(){function e(e,t){var n=this;this[ft]=!0,this.inject=function(e,t){void 0===t&&(t=Ue);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id=m+e,this.rules=t,C(this.id),pe(this,function(){throw S(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Ue),this.name+e.hash},e}();function bt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"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.");var o=ue(ut.apply(void 0,e([t],n,!1))),s=z(o);return new wt(s,o)}function Et(e){var n=o.forwardRef(function(n,r){var s=D(n,o.useContext(et),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat($(e),'"')),o.createElement(e,t(t({},n),{theme:s,ref:r}))});return n.displayName="WithTheme(".concat($(e),")"),se(n,e)}ft=xe;var Nt=function(){function e(e){var n=(void 0===e?{}:e).nonce,r=this;this._emitSheetCSS=function(){var e=r.instance.toString();if(!e)return"";var t=r.instance.options.nonce||Ee(),n=ue([t&&'nonce="'.concat(t,'"'),"".concat(c,'="true"'),"".concat(l,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw S(2);return r._emitSheetCSS()},this.getStyleElement=function(){var e;if(r.sealed)throw S(2);var n=r.instance.toString();if(!n)return[];var s=((e={})[c]="",e[l]=h,e.dangerouslySetInnerHTML={__html:n},e),i=r.instance.options.nonce||Ee();return i&&(s.nonce=i),[o.createElement("style",t({},s,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new Re({isServer:!0,nonce:n}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw S(2);return o.createElement(Qe,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw S(3)},e}(),Ct={StyleSheet:Re,mainSheet:He};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var At="__sc-".concat(c,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[At]||(window[At]=0),1===window[At]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[At]+=1);export{Nt as ServerStyleSheet,Xe as StyleSheetConsumer,Je as StyleSheetContext,Qe as StyleSheetManager,tt as ThemeConsumer,et as ThemeContext,rt as ThemeProvider,Ct as __PRIVATE__,vt as createGlobalStyle,St as createTheme,ut as css,pt as default,ae as isStyledComponent,bt as keyframes,pt as styled,nt as useTheme,h as version,Et as withTheme};
1
+ import e from"@emotion/is-prop-valid";import t,{createElement as n}from"react";import*as o from"stylis";var s,r;const i="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",a="active",c="data-styled-version",l="6.4.0-prerelease.5",u="/*!sc*/\n",h="undefined"!=typeof window&&"undefined"!=typeof document;function d(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const p=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(r=null!==(s=d("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==s?s:d("SC_DISABLE_SPEEDY"))&&void 0!==r?r:"undefined"==typeof process||void 0===process.env||"production"!==process.env.NODE_ENV),f="sc-keyframes-",m={},g="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\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 `<StyleSheetManager stylisPlugins={[]}>`, 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",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function y(e,...t){return"production"===process.env.NODE_ENV?new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach(e=>{t=t.replace(/%[a-z]/,e)}),t}(g[e],...t).trim())}const v=1<<30;let S=new Map,w=new Map,b=1;const N=e=>{if(S.has(e))return S.get(e);for(;w.has(b);)b++;const t=b++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>v))throw y(16,`${t}`);return S.set(e,t),w.set(t,e),t},C=e=>w.get(e),O=(e,t)=>{b=t+1,S.set(e,t),w.set(t,e)},E=/invalid hook call/i,A=new Set,I=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} 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.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n`,s=console.error;try{let e=!0;console.error=(t,...n)=>{E.test(t)?(e=!1,A.delete(o)):s(t,...n)},"function"==typeof t.useState&&t.useState(null),e&&!A.has(o)&&(console.warn(o),A.add(o))}catch(e){E.test(e.message)&&A.delete(o)}finally{console.error=s}}},$=Object.freeze([]),_=Object.freeze({});function R(e,t,n=_){return e.theme!==n.theme&&e.theme||t||n.theme}var P=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);const j=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,k=/(^-|-$)/g;function x(e){return e.replace(j,"-").replace(k,"")}const D=/(a)(d)/gi,T=e=>String.fromCharCode(e+(e>25?39:97));function M(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=T(t%52)+n;return(T(t%52)+n).replace(D,"$1-$2")}const V=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},G=e=>V(5381,e);function F(e){return M(G(e)>>>0)}function z(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function W(e){return L(e)?`styled.${e}`:`Styled(${z(e)})`}const B=Symbol.for("react.memo"),q=Symbol.for("react.forward_ref"),H={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Y={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J={[q]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[B]:U};function X(e){return("type"in(t=e)&&t.type.$$typeof)===B?U:"$$typeof"in e?J[e.$$typeof]:H;var t}const Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if("string"!=typeof t){const o=te(t);o&&o!==ne&&oe(e,o,n);const s=K(t).concat(Q(t)),r=X(e),i=X(t);for(let o=0;o<s.length;++o){const a=s[o];if(!(a in Y||n&&n[a]||i&&a in i||r&&a in r)){const n=ee(t,a);try{Z(e,a,n)}catch(e){}}}}return e}function se(e){return"function"==typeof e}function re(e){return"object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?`${e} ${t}`:e||t||""}function ae(e,t){return e.join(t||"")}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n=!1){if(!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=le(e[n],t[n]);else if(ce(t))for(const n in t)e[n]=le(e[n],t[n]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t})}const he=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw y(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),o=0;for(let s=0,r=t.length;s<r;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++,o++);o>0&&this._cGroup>e&&(this._cIndex+=o)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=this.tag.getRule(e)+u;return t}},de=`style[${i}][${c}="${l}"]`,pe=new RegExp(`^${i}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),fe=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,me=e=>{if(!e)return document;if(fe(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(fe(t))return t}return document},ge=(e,t,n)=>{const o=n.split(",");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},ye=(e,t)=>{var n;const o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(u),s=[];for(let t=0,n=o.length;t<n;t++){const n=o[t].trim();if(!n)continue;const r=n.match(pe);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(O(n,t),ge(e,n,r[3]),e.getTag().insertRules(t,s)),s.length=0}else s.push(n)}},ve=e=>{const t=me(e.options.target).querySelectorAll(de);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&o.getAttribute(i)!==a&&(ye(e,o),o.parentNode&&o.parentNode.removeChild(o))}};let Se=!1;function we(){if(!1!==Se)return Se;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Se=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Se=t.getAttribute("content")||void 0}return Se="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}const be=(e,t)=>{const n=document.head,o=e||n,s=document.createElement("style"),r=(e=>{const t=Array.from(e.querySelectorAll(`style[${i}]`));return t[t.length-1]})(o),u=void 0!==r?r.nextSibling:null;s.setAttribute(i,a),s.setAttribute(c,l);const h=t||we();return h&&s.setAttribute("nonce",h),o.insertBefore(s,u),s},Ne=class{constructor(e,t){this.element=be(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o.ownerNode===e)return o}throw y(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Ce=class{constructor(e,t){this.element=be(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},Oe=class{constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:""}};let Ee=h;const Ae={isServer:!h,useCSSOMInjection:!p};class Ie{static registerId(e){return N(e)}constructor(e=_,t={},n){this.options=Object.assign(Object.assign({},Ae),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&h&&Ee&&(Ee=!1,ve(this)),ue(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=C(s);if(void 0===n)continue;const r=e.names.get(n);if(void 0===r||!r.size)continue;const a=t.getGroup(s);if(0===a.length)continue;const c=i+".g"+s+'[id="'+n+'"]';let l="";r.forEach(e=>{e.length>0&&(l+=e+",")}),o+=a+c+'{content:"'+l+'"}'+u}return o})(this))}rehydrate(){!this.server&&h&&ve(this)}reconstructWithOptions(e,t=!0){const n=new Ie(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&h&&e.target!==this.options.target&&me(this.options.target)!==me(e.target)&&ve(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n,nonce:o})=>e?new Oe(n):t?new Ne(n,o):new Ce(n,o))(this.options),new he(e)));var e}hasNameForId(e,t){var n,o;return null!==(o=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==o&&o}registerName(e,t){N(e),e.startsWith(f)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(N(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(N(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const $e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function _e(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in $e||e.startsWith("--")?String(t).trim():`${t}px`}const Re=e=>e>="A"&&e<="Z";function Pe(e){let t="";for(let n=0;n<e.length;n++){const o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;Re(o)?t+="-"+o.toLowerCase():t+=o}return t.startsWith("ms-")?"-"+t:t}const je=Symbol.for("sc-keyframes");function ke(e){return"object"==typeof e&&null!==e&&je in e}const xe=e=>null==e||!1===e||""===e,De=e=>{const t=[];for(const n in e){const o=e[n];e.hasOwnProperty(n)&&!xe(o)&&(Array.isArray(o)&&o.isCss||se(o)?t.push(`${Pe(n)}:`,o,";"):ce(o)?t.push(`${n} {`,...De(o),"}"):t.push(`${Pe(n)}: ${_e(n,o)};`))}return t};function Te(e,t,n,o,s=[]){if("string"==typeof e)return e&&s.push(e),s;if(xe(e))return s;if(re(e))return s.push(`.${e.styledComponentId}`),s;if(se(e)){if(!se(r=e)||r.prototype&&r.prototype.isReactComponent||!t)return s.push(e),s;{const r=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||ke(r)||ce(r)||null===r||console.error(`${z(e)} 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.`),Te(r,t,n,o,s)}}var r;if(ke(e))return n?(e.inject(n,o),s.push(e.getName(o))):s.push(e),s;if(ce(e)){const t=De(e);for(let e=0;e<t.length;e++)s.push(t[e]);return s}if(!Array.isArray(e))return s.push(e.toString()),s;for(let r=0;r<e.length;r++)Te(e[r],t,n,o,s);return s}function Me(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(se(n)&&!re(n))return!1}return!0}const Ve=G(l);class Ge{constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Me(e),this.componentId=t,this.baseHash=V(Ve,t),this.baseStyle=n,Ie.registerId(t)}generateAndInjectStyles(e,t,n){let o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else{const s=ae(Te(this.rules,e,t,n)),r=M(V(this.baseHash,s)>>>0);if(!t.hasNameForId(this.componentId,r)){const e=n(s,"."+r,void 0,this.componentId);t.insertRules(this.componentId,r,e)}o=ie(o,r),this.staticRulesId=r}else{let s=V(this.baseHash,n.hash),r="";for(let o=0;o<this.rules.length;o++){const i=this.rules[o];if("string"==typeof i)r+=i,"production"!==process.env.NODE_ENV&&(s=V(s,i));else if(i){const a=ae(Te(i,e,t,n));s=V(V(s,String(o)),a),r+=a}}if(r){const e=M(s>>>0);if(!t.hasNameForId(this.componentId,e)){const o=n(r,"."+e,void 0,this.componentId);t.insertRules(this.componentId,e,o)}o=ie(o,e)}}return o}}const Fe=/&/g,ze=47,Le=42;function We(e){if(-1===e.indexOf("}"))return!1;const t=e.length;let n=0,o=0,s=!1;for(let r=0;r<t;r++){const t=e.charCodeAt(r);if(0!==o||s||t!==ze||e.charCodeAt(r+1)!==Le)if(s)t===Le&&e.charCodeAt(r+1)===ze&&(s=!1,r++);else if(34!==t&&39!==t||0!==r&&92===e.charCodeAt(r-1)){if(0===o)if(123===t)n++;else if(125===t&&(n--,n<0))return!0}else 0===o?o=t:o===t&&(o=0);else s=!0,r++}return 0!==n||0!==o}function Be(e,t){return e.map(e=>("rule"===e.type&&(e.value=`${t} ${e.value}`,e.value=e.value.replaceAll(",",`,${t} `),e.props=e.props.map(e=>`${t} ${e}`)),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Be(e.children,t)),e))}function qe({options:e=_,plugins:t=$}=_){let n,s,r;const i=(e,t,o)=>o.startsWith(s)&&o.endsWith(s)&&o.replaceAll(s,"").length>0?`.${n}`:e,a=t.slice();a.push(e=>{e.type===o.RULESET&&e.value.includes("&")&&(r||(r=new RegExp(`\\${s}\\b`,"g")),e.props[0]=e.props[0].replace(Fe,s).replace(r,i))}),e.prefix&&a.push(o.prefixer),a.push(o.stringify);let c=[];const l=o.middleware(a.concat(o.rulesheet(e=>c.push(e)))),u=(t,i="",a="",u="&")=>{n=u,s=i,r=void 0;const h=function(e){if(!We(e))return e;const t=e.length;let n="",o=0,s=0,r=0,i=!1;for(let a=0;a<t;a++){const c=e.charCodeAt(a);if(0!==r||i||c!==ze||e.charCodeAt(a+1)!==Le)if(i)c===Le&&e.charCodeAt(a+1)===ze&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===r)if(123===c)s++;else if(125===c){if(s--,s<0){let n=a+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,s=0,a=n-1,o=n;continue}0===s&&(n+=e.substring(o,a+1),o=a+1)}else 59===c&&0===s&&(n+=e.substring(o,a+1),o=a+1)}else 0===r?r=c:r===c&&(r=0);else i=!0,a++}if(o<t){const t=e.substring(o);We(t)||(n+=t)}return n}(function(e){if(-1===e.indexOf("//"))return e;const t=e.length,n=[];let o=0,s=0,r=0,i=0;for(;s<t;){const a=e.charCodeAt(s);if(34!==a&&39!==a||0!==s&&92===e.charCodeAt(s-1))if(0===r)if(a===ze&&s+1<t&&e.charCodeAt(s+1)===Le){for(s+=2;s+1<t&&(e.charCodeAt(s)!==Le||e.charCodeAt(s+1)!==ze);)s++;s+=2}else if(40===a&&s>=3&&108==(32|e.charCodeAt(s-1))&&114==(32|e.charCodeAt(s-2))&&117==(32|e.charCodeAt(s-3)))i=1,s++;else if(i>0)41===a?i--:40===a&&i++,s++;else if(a===Le&&s+1<t&&e.charCodeAt(s+1)===ze)s>o&&n.push(e.substring(o,s)),s+=2,o=s;else if(a===ze&&s+1<t&&e.charCodeAt(s+1)===ze){for(s>o&&n.push(e.substring(o,s));s<t&&10!==e.charCodeAt(s);)s++;o=s}else s++;else s++;else 0===r?r=a:r===a&&(r=0),s++}return 0===o?e:(o<t&&n.push(e.substring(o)),n.join(""))}(t));let d=o.compile(a||i?`${a} ${i} { ${h} }`:h);return e.namespace&&(d=Be(d,e.namespace)),c=[],o.serialize(d,l),c};return u.hash=t.length?t.reduce((e,t)=>(t.name||y(15),V(e,t.name)),5381).toString():"",u}const He=new Ie,Ye=qe(),Ue=t.createContext({shouldForwardProp:void 0,styleSheet:He,stylis:Ye}),Je=Ue.Consumer,Xe=t.createContext(void 0);function Ze(){return t.useContext(Ue)}function Ke(e){if(!t.useMemo)return e.children;const{styleSheet:n}=Ze(),o=t.useMemo(()=>{let t=n;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions({target:e.target,nonce:e.nonce},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,n]),s=t.useMemo(()=>qe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins}),[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),r=t.useMemo(()=>({shouldForwardProp:e.shouldForwardProp,styleSheet:o,stylis:s}),[e.shouldForwardProp,o,s]);return t.createElement(Ue.Provider,{value:r},t.createElement(Xe.Provider,{value:s},e.children))}const Qe=t.createContext(void 0),et=Qe.Consumer;function tt(){const e=t.useContext(Qe);if(!e)throw y(18);return e}function nt(e){const n=t.useContext(Qe),o=t.useMemo(()=>function(e,t){if(!e)throw y(14);if(se(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw y(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw y(8);return t?Object.assign(Object.assign({},t),e):e}(e.theme,n),[e.theme,n]);return e.children?t.createElement(Qe.Provider,{value:o},e.children):null}const ot={};function st(e,t){const n="string"!=typeof e?"sc":x(e);ot[n]=(ot[n]||0)+1;const o=`${n}-${F(l+n+ot[n])}`;return t?`${t}-${o}`:o}let rt=new Set;function it(o,s,r){const i=re(o),a=o,c=!L(o),{attrs:l=$,componentId:u=st(s.displayName,s.parentComponentId),displayName:h=W(o)}=s,d=s.displayName&&s.componentId?`${x(s.displayName)}-${s.componentId}`:s.componentId||u,p=i&&a.attrs?a.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=s;if(i&&a.shouldForwardProp){const e=a.shouldForwardProp;if(s.shouldForwardProp){const t=s.shouldForwardProp;f=(n,o)=>e(n,o)&&t(n,o)}else f=e}const m=new Ge(r,d,i?a.componentStyle:void 0);function g(o,s){return function(o,s,r){const{attrs:i,componentStyle:a,defaultProps:c,foldedComponentIds:l,styledComponentId:u,target:h}=o,d=t.useContext(Qe),p=Ze(),f=o.shouldForwardProp||p.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(u);const m=R(s,d,c)||_,g=function(e,t,n){const o=Object.assign(Object.assign({},t),{className:void 0,theme:n});let s;for(let n=0;n<e.length;n+=1){s=e[n];const r=se(s)?s(Object.assign({},o)):s;for(const e in r)"className"===e?o.className=ie(o.className,r[e]):"style"===e?o.style=Object.assign(Object.assign({},o.style),r[e]):e in t&&void 0===t[e]||(o[e]=r[e])}return"className"in t&&"string"==typeof t.className&&(o.className=ie(o.className,t.className)),o}(i,s,m),y=g.as||h,v={};for(const t in g)void 0===g[t]||"$"===t[0]||"as"===t||"theme"===t&&g.theme===m||("forwardedAs"===t?v.as=g.forwardedAs:f&&!f(t,y)||(v[t]=g[t],f||"development"!==process.env.NODE_ENV||e(t)||rt.has(t)||!P.has(y)||(rt.add(t),console.warn(`styled-components: it looks like an unknown prop "${t}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));const S=function(e,n,o,s){const r=e.generateAndInjectStyles(n,o,s);return"production"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(r),r}(a,g,p.styleSheet,p.stylis);"production"!==process.env.NODE_ENV&&o.warnTooManyClasses&&o.warnTooManyClasses(S);let w=ie(l,u);return S&&(w+=" "+S),g.className&&(w+=" "+g.className),v[L(y)&&!P.has(y)?"class":"className"]=w,r&&(v.ref=r),n(y,v)}(y,o,s)}g.displayName=h;let y=t.forwardRef(g);return y.attrs=p,y.componentStyle=m,y.displayName=h,y.shouldForwardProp=f,y.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",y.styledComponentId=d,y.target=i?a.target:o,Object.defineProperty(y,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)le(e,n,!0);return e}({},a.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(I(h,d),y.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{!o&&(n[s]=!0,Object.keys(n).length>=200)&&(console.warn(`Over 200 classes were generated for component ${e}${t?` with the id of "${t}"`:""}.\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 <Component />`),o=!0,n={})}})(h,d)),ue(y,()=>`.${y.styledComponentId}`),c&&oe(y,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}function at(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const ct=e=>Object.assign(e,{isCss:!0});function lt(e,...t){if(se(e)||ce(e))return ct(Te(at($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?Te(n):ct(Te(at(n,t)))}function ut(e,t,n=_){if(!t)throw y(1,t);const o=(o,...s)=>e(t,n,lt(o,...s));return o.attrs=o=>ut(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)})),o.withConfig=o=>ut(e,t,Object.assign(Object.assign({},n),o)),o}const ht=e=>ut(it,e),dt=ht;P.forEach(e=>{dt[e]=ht(e)});class pt{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=Me(e),Ie.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,o){const s=this.componentId;if(this.isStatic){if(n.hasNameForId(s,s+e))this.instanceRules.has(e)||this.computeRules(e,t,n,o);else{const r=this.computeRules(e,t,n,o);n.insertRules(s,r.name,r.rules)}return}const r=this.instanceRules.get(e);if(this.computeRules(e,t,n,o),!n.server&&r){const t=r.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,o){const s=ae(Te(this.rules,t,n,o)),r={name:this.componentId+e,rules:o(s,"")};return this.instanceRules.set(e,r),r}rebuildGroup(e){const t=this.componentId;e.clearRules(t),this.instanceRules.forEach(n=>{e.insertRules(t,n.name,n.rules)})}}function ft(e,...n){const o=lt(e,...n),s=`sc-global-${F(JSON.stringify(o))}`,r=new pt(o,s);"production"!==process.env.NODE_ENV&&I(s);const i=e=>{const n=Ze(),i=t.useContext(Qe);let c;{const e=t.useRef(null);null===e.current&&(e.current=n.styleSheet.allocateGSInstance(s)),c=e.current}return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some(e=>"string"==typeof e&&-1!==e.indexOf("@import"))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),n.styleSheet.server&&a(c,e,n.styleSheet,i,n.stylis),t.useLayoutEffect(()=>(n.styleSheet.server||a(c,e,n.styleSheet,i,n.stylis),()=>{r.removeStyles(c,n.styleSheet)}),r.isStatic?[c,n.styleSheet]:[c,e,n.styleSheet,i,n.stylis]),n.styleSheet.server&&r.instanceRules.delete(c),null};function a(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,m,n,s);else{const a=Object.assign(Object.assign({},t),{theme:R(t,o,i.defaultProps)});r.renderStyles(e,a,n,s)}}return t.memo(i)}function mt(e,t,n,o,s){for(const r in e){const i=e[r],a=s?s+"-"+r:r;if("object"==typeof i&&null!==i){const e={};mt(i,t,e,o,a),n[r]=e}else n[r]=o(a,i,r)}}function gt(e,t,n,o){let s="";for(const r in e){const i=e[r],a=t[r],c=o?o+"-"+r:r;"object"==typeof i&&null!==i?"object"==typeof a&&null!==a&&(s+=gt(i,a,n,c)):void 0!==a&&"function"!=typeof a&&(s+="--"+n+c+":"+a+";")}return s}function yt(e,t){var n,o;const s=(null!==(n=null==t?void 0:t.prefix)&&void 0!==n?n:"sc")+"-",r=null!==(o=null==t?void 0:t.selector)&&void 0!==o?o:":root",i=function(e,t){const n={};return mt(e,t,n,(e,n)=>{if("production"!==process.env.NODE_ENV){const t=String(n);let o=0;for(let e=0;e<t.length&&(40===t.charCodeAt(e)?o++:41===t.charCodeAt(e)&&o--,!(o<0));e++);0!==o&&console.warn(`createTheme: value "${t}" at "${e}" contains unbalanced parentheses and may break the var() fallback`)}return"var(--"+t+e+", "+n+")"}),n}(e,s),a=ft`
2
+ ${r} {
3
+ ${t=>gt(e,t.theme,s)}
4
+ }
5
+ `;return Object.assign(i,{GlobalStyle:a,raw:e,resolve(t){if(!h)throw new Error("createTheme.resolve() is client-only");const n=null!=t?t:document.documentElement;return function(e,t,n){const o={};return mt(e,t,o,(e,o)=>n.getPropertyValue("--"+t+e).trim()||o),o}(e,s,getComputedStyle(n))}})}var vt;class St{constructor(e,t){this[vt]=!0,this.inject=(e,t=Ye)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))},this.name=e,this.id=f+e,this.rules=t,N(this.id),ue(this,()=>{throw y(12,String(this.name))})}getName(e=Ye){return this.name+e.hash}}function wt(e,...t){"production"!==process.env.NODE_ENV&&"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.");const n=ae(lt(e,...t)),o=F(n);return new St(o,n)}function bt(e){const n=t.forwardRef((n,o)=>{const s=R(n,t.useContext(Qe),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${z(e)}"`),t.createElement(e,Object.assign(Object.assign({},n),{theme:s,ref:o}))});return n.displayName=`WithTheme(${z(e)})`,oe(n,e)}vt=je;class Nt{constructor({nonce:e}={}){this._emitSheetCSS=()=>{const e=this.instance.toString();if(!e)return"";const t=this.instance.options.nonce||we();return`<style ${ae([t&&`nonce="${t}"`,`${i}="true"`,`${c}="${l}"`].filter(Boolean)," ")}>${e}</style>`},this.getStyleTags=()=>{if(this.sealed)throw y(2);return this._emitSheetCSS()},this.getStyleElement=()=>{if(this.sealed)throw y(2);const e=this.instance.toString();if(!e)return[];const n={[i]:"",[c]:l,dangerouslySetInnerHTML:{__html:e}},o=this.instance.options.nonce||we();return o&&(n.nonce=o),[t.createElement("style",Object.assign({},n,{key:"sc-0-0"}))]},this.seal=()=>{this.sealed=!0},this.instance=new Ie({isServer:!0,nonce:e}),this.sealed=!1}collectStyles(e){if(this.sealed)throw y(2);return t.createElement(Ke,{sheet:this.instance},e)}interleaveWithNodeStream(e){throw y(3)}}const Ct={StyleSheet:Ie,mainSheet:He};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");const Ot=`__sc-${i}__`;"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[Ot]||(window[Ot]=0),1===window[Ot]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."),window[Ot]+=1);export{Nt as ServerStyleSheet,Je as StyleSheetConsumer,Ue as StyleSheetContext,Ke as StyleSheetManager,et as ThemeConsumer,Qe as ThemeContext,nt as ThemeProvider,Ct as __PRIVATE__,ft as createGlobalStyle,yt as createTheme,lt as css,dt as default,re as isStyledComponent,wt as keyframes,dt as styled,tt as useTheme,l as version,bt as withTheme};
2
6
  //# sourceMappingURL=styled-components.browser.esm.js.map