styled-components 6.4.0-prerelease.0 → 6.4.0-prerelease.2
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.
- package/dist/models/GlobalStyle.d.ts +13 -1
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +87 -31
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/native/dist/dist/models/GlobalStyle.d.ts +13 -1
- package/native/dist/models/GlobalStyle.d.ts +13 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as t}from"tslib";import n from"@emotion/is-prop-valid";import o,{createElement as r}from"react";import s from"@emotion/unitless";import*as i from"stylis";var a="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",c="active",u="data-styled-version",l="6.4.0-prerelease.0",p="/*!sc*/\n",d="undefined"!=typeof window&&"undefined"!=typeof document,h=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),f={},m="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(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function v(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];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(y.apply(void 0,e([m[t]],n,!1)).trim())}var g=1<<30,S=new Map,w=new Map,b=1,N=function(e){if(S.has(e))return S.get(e);for(;w.has(b);)b++;var t=b++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>g))throw v(16,"".concat(t));return S.set(e,t),w.set(t,e),t},E=function(e,t){b=t+1,S.set(e,t),w.set(t,e)},C=/invalid hook call/i,A=new Set,_=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=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];C.test(t)?(a=!1,A.delete(s)):i.apply(void 0,e([t],n,!1))},"function"==typeof o.useState&&o.useState(null),a&&!A.has(s)&&(console.warn(s),A.add(s))}catch(e){C.test(e.message)&&A.delete(s)}finally{console.error=i}}},P=Object.freeze([]),I=Object.freeze({});function O(e,t,n){return void 0===n&&(n=I),e.theme!==n.theme&&e.theme||t||n.theme}var D=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"]),R=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,T=/(^-|-$)/g;function x(e){return e.replace(R,"-").replace(T,"")}var j=/(a)(d)/gi,k=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=k(t%52)+n;return(k(t%52)+n).replace(j,"$1-$2")}var V,F=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},G=function(e){return F(5381,e)};function L(e){return M(G(e)>>>0)}function B(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var $="function"==typeof Symbol&&Symbol.for,Y=$?Symbol.for("react.memo"):60115,W=$?Symbol.for("react.forward_ref"):60112,q={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={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=((V={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:q;var t}var 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){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n)}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<r.length;++a){var c=r[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var u=ee(t,c);try{Z(e,c,u)}catch(e){}}}}return e}function re(e){return"function"==typeof e}function se(e){return"object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(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 ue(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=ue(e[o],t[o]);else if(ce(t))for(var o in t)e[o]=ue(e[o],t[o]);return e}function le(e,t){Object.defineProperty(e,"toString",{value:t})}var pe=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,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw v(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;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),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)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],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+=this.tag.getRule(s)+p;return t},e}(),de="style[".concat(a,"][").concat(u,'="').concat(l,'"]'),he=new RegExp("^".concat(a,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),fe=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},me=function(e){if(!e)return document;if(fe(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(fe(t))return t}return document},ye=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o)},ve=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(p),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(he);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(E(l,u),ye(e,l,c[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},ge=function(e){for(var t=me(e.options.target).querySelectorAll(de),n=0,o=t.length;n<o;n++){var r=t[n];r&&r.getAttribute(a)!==c&&(ve(e,r),r.parentNode&&r.parentNode.removeChild(r))}},Se=!1;function we(){if(!1!==Se)return Se;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Se=e.nonce||e.getAttribute("content")||void 0;var 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}var be=function(e,t){var n=document.head,o=e||n,r=document.createElement("style"),s=function(e){var t=Array.from(e.querySelectorAll("style[".concat(a,"]")));return t[t.length-1]}(o),i=void 0!==s?s.nextSibling:null;r.setAttribute(a,c),r.setAttribute(u,l);var p=t||we();return p&&r.setAttribute("nonce",p),o.insertBefore(r,i),r},Ne=function(){function e(e,t){this.element=be(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,o=0,r=n.length;o<r;o++){var s=n[o];if(s.ownerNode===e)return s}throw v(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}(),Ee=function(){function e(e,t){this.element=be(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}(),Ce=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}(),Ae=d,_e={isServer:!d,useCSSOMInjection:!h},Pe=function(){function e(e,n,o){void 0===e&&(e=I),void 0===n&&(n={});var r=this;this.options=t(t({},_e),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&d&&Ae&&(Ae=!1,ge(this)),le(this,function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return w.get(e)}(n);if(void 0===r)return"continue";var s=e.names.get(r);if(void 0===s||!s.size)return"continue";var i=t.getGroup(n);if(0===i.length)return"continue";var c=a+".g"+n+'[id="'+r+'"]',u="";s.forEach(function(e){e.length>0&&(u+=e+",")}),o+=i+c+'{content:"'+u+'"}'+p},s=0;s<n;s++)r(s);return o}(r)})}return e.registerId=function(e){return N(e)},e.prototype.rehydrate=function(){!this.server&&d&&ge(this)},e.prototype.reconstructWithOptions=function(n,o){void 0===o&&(o=!0);var r=new e(t(t({},this.options),n),this.gs,o&&this.names||void 0);return!this.server&&d&&n.target!==this.options.target&&me(this.options.target)!==me(n.target)&&ge(r),r},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,o=e.nonce;return e.isServer?new Ce(n):t?new Ne(n,o):new Ee(n,o)}(this.options),new pe(e)));var e},e.prototype.hasNameForId=function(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},e.prototype.registerName=function(e,t){N(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(N(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(N(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function Ie(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in s||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Oe=function(e){return e>="A"&&e<="Z"};function De(e){for(var t="",n=0;n<e.length;n++){var o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;Oe(o)?t+="-"+o.toLowerCase():t+=o}return t.startsWith("ms-")?"-"+t:t}var Re=Symbol.for("sc-keyframes");function Te(e){return"object"==typeof e&&null!==e&&Re in e}var xe=function(e){return null==e||!1===e||""===e},je=function(t){var n=[];for(var o in t){var r=t[o];t.hasOwnProperty(o)&&!xe(r)&&(Array.isArray(r)&&r.isCss||re(r)?n.push("".concat(De(o),":"),r,";"):ce(r)?n.push.apply(n,e(e(["".concat(o," {")],je(r),!1),["}"],!1)):n.push("".concat(De(o),": ").concat(Ie(o,r),";")))}return n};function ke(e,t,n,o,r){if(void 0===r&&(r=[]),"string"==typeof e)return e&&r.push(e),r;if(xe(e))return r;if(se(e))return r.push(".".concat(e.styledComponentId)),r;if(re(e)){if(!re(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return r.push(e),r;var s=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof s||Array.isArray(s)||Te(s)||ce(s)||null===s||console.error("".concat(B(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.")),ke(s,t,n,o,r)}var i;if(Te(e))return n?(e.inject(n,o),r.push(e.getName(o))):r.push(e),r;if(ce(e)){for(var a=je(e),c=0;c<a.length;c++)r.push(a[c]);return r}if(!Array.isArray(e))return r.push(e.toString()),r;for(c=0;c<e.length;c++)ke(e[c],t,n,o,r);return r}function Me(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(re(n)&&!se(n))return!1}return!0}var Ve=G(l),Fe=function(){function e(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=F(Ve,t),this.baseStyle=n,Pe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else{var r=ae(ke(this.rules,e,t,n)),s=M(F(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}o=ie(o,s),this.staticRulesId=s}else{for(var a=F(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=F(a,l));else if(l){var p=ae(ke(l,e,t,n));a=F(F(a,String(u)),p),c+=p}}if(c){var d=M(a>>>0);if(!t.hasNameForId(this.componentId,d)){var h=n(c,".".concat(d),void 0,this.componentId);t.insertRules(this.componentId,d,h)}o=ie(o,d)}}return{className:o,css:"undefined"==typeof window?t.getTag().getGroup(N(this.componentId)):""}},e}(),Ge=/&/g,Le=47,Be=42;function ze(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,o=0,r=!1,s=0;s<t;s++){var i=e.charCodeAt(s);if(0!==o||r||i!==Le||e.charCodeAt(s+1)!==Be)if(r)i===Be&&e.charCodeAt(s+1)===Le&&(r=!1,s++);else if(34!==i&&39!==i||0!==s&&92===e.charCodeAt(s-1)){if(0===o)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===o?o=i:o===i&&(o=0);else r=!0,s++}return 0!==n||0!==o}function $e(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=$e(e.children,t)),e})}function Ye(e){var t,n,o,r=void 0===e?I:e,s=r.options,a=void 0===s?I:s,c=r.plugins,u=void 0===c?P:c,l=function(e,o,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},p=u.slice();p.push(function(e){e.type===i.RULESET&&e.value.includes("&")&&(o||(o=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(Ge,n).replace(o,l))}),a.prefix&&p.push(i.prefixer),p.push(i.stringify);var d=[],h=i.middleware(p.concat(i.rulesheet(function(e){return d.push(e)}))),f=function(e,r,s,c){void 0===r&&(r=""),void 0===s&&(s=""),void 0===c&&(c="&"),t=c,n=r,o=void 0;var u=function(e){if(!ze(e))return e;for(var t=e.length,n="",o=0,r=0,s=0,i=!1,a=0;a<t;a++){var c=e.charCodeAt(a);if(0!==s||i||c!==Le||e.charCodeAt(a+1)!==Be)if(i)c===Be&&e.charCodeAt(a+1)===Le&&(i=!1,a++);else if(34!==c&&39!==c||0!==a&&92===e.charCodeAt(a-1)){if(0===s)if(123===c)r++;else if(125===c){if(--r<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++,r=0,a=u-1,o=u;continue}0===r&&(n+=e.substring(o,a+1),o=a+1)}else 59===c&&0===r&&(n+=e.substring(o,a+1),o=a+1)}else 0===s?s=c:s===c&&(s=0);else i=!0,a++}if(o<t){var p=e.substring(o);ze(p)||(n+=p)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],o=0,r=0,s=0,i=0;r<t;){var a=e.charCodeAt(r);if(34!==a&&39!==a||0!==r&&92===e.charCodeAt(r-1))if(0===s)if(a===Le&&r+1<t&&e.charCodeAt(r+1)===Be){for(r+=2;r+1<t&&(e.charCodeAt(r)!==Be||e.charCodeAt(r+1)!==Le);)r++;r+=2}else if(40===a&&r>=3&&108==(32|e.charCodeAt(r-1))&&114==(32|e.charCodeAt(r-2))&&117==(32|e.charCodeAt(r-3)))i=1,r++;else if(i>0)41===a?i--:40===a&&i++,r++;else if(a===Be&&r+1<t&&e.charCodeAt(r+1)===Le)r>o&&n.push(e.substring(o,r)),o=r+=2;else if(a===Le&&r+1<t&&e.charCodeAt(r+1)===Le){for(r>o&&n.push(e.substring(o,r));r<t&&10!==e.charCodeAt(r);)r++;o=r}else r++;else r++;else 0===s?s=a:s===a&&(s=0),r++}return 0===o?e:(o<t&&n.push(e.substring(o)),n.join(""))}(e)),l=i.compile(s||r?"".concat(s," ").concat(r," { ").concat(u," }"):u);return a.namespace&&(l=$e(l,a.namespace)),d=[],i.serialize(l,h),d};return f.hash=u.length?u.reduce(function(e,t){return t.name||v(15),F(e,t.name)},5381).toString():"",f}var We=new Pe,qe=Ye(),He=o.createContext({shouldForwardProp:void 0,styleSheet:We,stylis:qe}),Ue=He.Consumer,Je=o.createContext(void 0);function Xe(){return o.useContext(He)}function Ze(e){if(!o.useMemo)return e.children;var t=Xe().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 Ye({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(He.Provider,{value:s},o.createElement(Je.Provider,{value:r},e.children))}var Ke=o.createContext(void 0),Qe=Ke.Consumer;function et(){var e=o.useContext(Ke);if(!e)throw v(18);return e}function tt(e){var n=o.useContext(Ke),r=o.useMemo(function(){return function(e,n){if(!e)throw v(14);if(re(e)){var o=e(n);if("production"!==process.env.NODE_ENV&&(null===o||Array.isArray(o)||"object"!=typeof o))throw v(7);return o}if(Array.isArray(e)||"object"!=typeof e)throw v(8);return n?t(t({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?o.createElement(Ke.Provider,{value:r},e.children):null}var nt={},ot=new Set;function rt(e,s,i){var a=se(e),c=e,u=!z(e),p=s.attrs,d=void 0===p?P:p,h=s.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":x(e);nt[n]=(nt[n]||0)+1;var o="".concat(n,"-").concat(L(l+n+nt[n]));return t?"".concat(t,"-").concat(o):o}(s.displayName,s.parentComponentId):h,m=s.displayName,y=void 0===m?function(e){return z(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,v=s.displayName&&s.componentId?"".concat(x(s.displayName),"-").concat(s.componentId):s.componentId||f,g=a&&c.attrs?c.attrs.concat(d).filter(Boolean):d,S=s.shouldForwardProp;if(a&&c.shouldForwardProp){var w=c.shouldForwardProp;if(s.shouldForwardProp){var b=s.shouldForwardProp;S=function(e,t){return w(e,t)&&b(e,t)}}else S=w}var N=new Fe(i,v,a?c.componentStyle:void 0);function E(e,s){return function(e,s,i){var a=e.attrs,c=e.componentStyle,u=e.defaultProps,l=e.foldedComponentIds,p=e.styledComponentId,d=e.target,h=o.useContext(Ke),f=Xe(),m=e.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&o.useDebugValue&&o.useDebugValue(p);var y=O(s,h,u)||I,v=function(e,n,o){for(var r,s=t(t({},n),{className:void 0,theme:o}),i=0;i<e.length;i+=1){var a=re(r=e[i])?r(t({},s)):r;for(var c in a)"className"===c?s.className=ie(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=ie(s.className,n.className)),s}(a,s,y),g=v.as||d,S={};for(var w in v)void 0===v[w]||"$"===w[0]||"as"===w||"theme"===w&&v.theme===y||("forwardedAs"===w?S.as=v.forwardedAs:m&&!m(w,g)||(S[w]=v[w],m||"development"!==process.env.NODE_ENV||n(w)||ot.has(w)||!D.has(g)||(ot.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){var n=Xe(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==process.env.NODE_ENV&&o.useDebugValue&&o.useDebugValue(r.className),r}(c,v),N=b.className;"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(N);var E=ie(l,p);return N&&(E+=" "+N),v.className&&(E+=" "+v.className),S[z(g)&&!D.has(g)?"class":"className"]=E,i&&(S.ref=i),r(g,S)}(C,e,s)}E.displayName=y;var C=o.forwardRef(E);return C.attrs=g,C.componentStyle=N,C.displayName=y,C.shouldForwardProp=S,C.foldedComponentIds=a?ie(c.foldedComponentIds,c.styledComponentId):"",C.styledComponentId=v,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 o=0,r=t;o<r.length;o++)ue(e,r[o],!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(y,v),C.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!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 />"),o=!0,n={}}}}(y,v)),le(C,function(){return".".concat(C.styledComponentId)}),u&&oe(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function st(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var it=function(e){return Object.assign(e,{isCss:!0})};function at(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(re(t)||ce(t))return it(ke(st(P,e([t],n,!0))));var r=t;return 0===n.length&&1===r.length&&"string"==typeof r[0]?ke(r):it(ke(st(r,n)))}function ct(n,o,r){if(void 0===r&&(r=I),!o)throw v(1,o);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(o,r,at.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return ct(n,o,t(t({},r),{attrs:Array.prototype.concat(r.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ct(n,o,t(t({},r),e))},s}var ut=function(e){return ct(rt,e)},lt=ut;D.forEach(function(e){lt[e]=ut(e)});var pt,dt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Me(e),Pe.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,o){var r=o(ae(ke(this.rules,t,n,o)),""),s=this.componentId+e;n.insertRules(s,s,r)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,o){e>2&&Pe.registerId(this.componentId+e);var r=this.componentId+e;this.isStatic?n.hasNameForId(r,r)||this.createStyles(e,t,n,o):(this.removeStyles(e,n),this.createStyles(e,t,n,o))},e}();function ht(n){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var i=at.apply(void 0,e([n],r,!1)),a="sc-global-".concat(L(JSON.stringify(i))),c=new dt(i,a);"production"!==process.env.NODE_ENV&&_(a);var u=new WeakMap,l=function(e){var n=Xe(),r=o.useContext(Ke),s=u.get(n.styleSheet);return void 0===s&&(s=n.styleSheet.allocateGSInstance(a),u.set(n.styleSheet,s)),"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."),o.useLayoutEffect(function(){return n.styleSheet.server||function(e,n,o,r,s){if(c.isStatic)c.renderStyles(e,f,o,s);else{var i=t(t({},n),{theme:O(n,r,l.defaultProps)});c.renderStyles(e,i,o,s)}}(s,e,n.styleSheet,r,n.stylis),function(){c.removeStyles(s,n.styleSheet)}},[s,e,n.styleSheet,r,n.stylis]),null};return o.memo(l)}var ft=function(){function e(e,t){var n=this;this[pt]=!0,this.inject=function(e,t){void 0===t&&(t=qe);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,le(this,function(){throw v(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=qe),this.name+e.hash},e}();function mt(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];"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 r=ae(at.apply(void 0,e([t],n,!1))),s=L(r);return new ft(s,r)}function yt(e){var n=o.forwardRef(function(n,r){var s=O(n,o.useContext(Ke),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(B(e),'"')),o.createElement(e,t(t({},n),{theme:s,ref:r}))});return n.displayName="WithTheme(".concat(B(e),")"),oe(n,e)}pt=Re;var vt=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||we(),n=ae([t&&'nonce="'.concat(t,'"'),"".concat(a,'="true"'),"".concat(u,'="').concat(l,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw v(2);return r._emitSheetCSS()},this.getStyleElement=function(){var e;if(r.sealed)throw v(2);var n=r.instance.toString();if(!n)return[];var s=((e={})[a]="",e[u]=l,e.dangerouslySetInnerHTML={__html:n},e),i=r.instance.options.nonce||we();return i&&(s.nonce=i),[o.createElement("style",t({},s,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new Pe({isServer:!0,nonce:n}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw v(2);return o.createElement(Ze,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw v(3)},e}(),gt={StyleSheet:Pe,mainSheet:We};"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 St="__sc-".concat(a,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&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[St]+=1);export{vt as ServerStyleSheet,Ue as StyleSheetConsumer,He as StyleSheetContext,Ze as StyleSheetManager,Qe as ThemeConsumer,Ke as ThemeContext,tt as ThemeProvider,gt as __PRIVATE__,ht as createGlobalStyle,at as css,lt as default,se as isStyledComponent,mt as keyframes,lt as styled,et as useTheme,l as version,yt as withTheme};
|
|
1
|
+
import{__spreadArray as e,__assign as t}from"tslib";import n from"@emotion/is-prop-valid";import r,{createElement as o}from"react";import s from"@emotion/unitless";import*as i from"stylis";var a="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",c="active",u="data-styled-version",l="6.4.0-prerelease.2",p="/*!sc*/\n",h="undefined"!=typeof window&&"undefined"!=typeof document,d=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),f={},m="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(){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 v(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(y.apply(void 0,e([m[t]],n,!1)).trim())}var g=1<<30,S=new Map,w=new Map,b=1,N=function(e){if(S.has(e))return S.get(e);for(;w.has(b);)b++;var t=b++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>g))throw v(16,"".concat(t));return S.set(e,t),w.set(t,e),t},E=function(e,t){b=t+1,S.set(e,t),w.set(t,e)},C=/invalid hook call/i,A=new Set,_=function(t,n){if("production"!==process.env.NODE_ENV){var o=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(o," 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];C.test(t)?(a=!1,A.delete(s)):i.apply(void 0,e([t],n,!1))},"function"==typeof r.useState&&r.useState(null),a&&!A.has(s)&&(console.warn(s),A.add(s))}catch(e){C.test(e.message)&&A.delete(s)}finally{console.error=i}}},P=Object.freeze([]),I=Object.freeze({});function R(e,t,n){return void 0===n&&(n=I),e.theme!==n.theme&&e.theme||t||n.theme}var O=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"]),D=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,T=/(^-|-$)/g;function x(e){return e.replace(D,"-").replace(T,"")}var j=/(a)(d)/gi,k=function(e){return String.fromCharCode(e+(e>25?39:97))};function M(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=k(t%52)+n;return(k(t%52)+n).replace(j,"$1-$2")}var V,G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},F=function(e){return G(5381,e)};function L(e){return M(F(e)>>>0)}function B(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var $="function"==typeof Symbol&&Symbol.for,Y=$?Symbol.for("react.memo"):60115,q=$?Symbol.for("react.forward_ref"):60112,W={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={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=((V={})[q]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:W;var t}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function re(e,t,n){if("string"!=typeof t){if(ne){var r=te(t);r&&r!==ne&&re(e,r,n)}var o=K(t);Q&&(o=o.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<o.length;++a){var c=o[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var u=ee(t,c);try{Z(e,c,u)}catch(e){}}}}return e}function oe(e){return"function"==typeof e}function se(e){return"object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(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 ue(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ue(e[r],t[r]);else if(ce(t))for(var r in t)e[r]=ue(e[r],t[r]);return e}function le(e,t){Object.defineProperty(e,"toString",{value:t})}var pe=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 v(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}(),he="style[".concat(a,"][").concat(u,'="').concat(l,'"]'),de=new RegExp("^".concat(a,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),fe=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},me=function(e){if(!e)return document;if(fe(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(fe(t))return t}return document},ye=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)},ve=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(de);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(E(l,u),ye(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},ge=function(e){for(var t=me(e.options.target).querySelectorAll(he),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(a)!==c&&(ve(e,o),o.parentNode&&o.parentNode.removeChild(o))}},Se=!1;function we(){if(!1!==Se)return Se;if("undefined"!=typeof document){var e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Se=e.nonce||e.getAttribute("content")||void 0;var 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}var be=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(a,"]")));return t[t.length-1]}(r),i=void 0!==s?s.nextSibling:null;o.setAttribute(a,c),o.setAttribute(u,l);var p=t||we();return p&&o.setAttribute("nonce",p),r.insertBefore(o,i),o},Ne=function(){function e(e,t){this.element=be(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 v(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}(),Ee=function(){function e(e,t){this.element=be(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}(),Ce=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}(),Ae=h,_e={isServer:!h,useCSSOMInjection:!d},Pe=function(){function e(e,n,r){void 0===e&&(e=I),void 0===n&&(n={});var o=this;this.options=t(t({},_e),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&h&&Ae&&(Ae=!1,ge(this)),le(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return w.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 c=a+".g"+n+'[id="'+o+'"]',u="";s.forEach(function(e){e.length>0&&(u+=e+",")}),r+=i+c+'{content:"'+u+'"}'+p},s=0;s<n;s++)o(s);return r}(o)})}return e.registerId=function(e){return N(e)},e.prototype.rehydrate=function(){!this.server&&h&&ge(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!this.server&&h&&n.target!==this.options.target&&me(this.options.target)!==me(n.target)&&ge(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 Ce(n):t?new Ne(n,r):new Ee(n,r)}(this.options),new pe(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){N(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(N(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(N(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function Ie(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in s||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Re=function(e){return e>="A"&&e<="Z"};function Oe(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Re(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var De=Symbol.for("sc-keyframes");function Te(e){return"object"==typeof e&&null!==e&&De in e}var xe=function(e){return null==e||!1===e||""===e},je=function(t){var n=[];for(var r in t){var o=t[r];t.hasOwnProperty(r)&&!xe(o)&&(Array.isArray(o)&&o.isCss||oe(o)?n.push("".concat(Oe(r),":"),o,";"):ce(o)?n.push.apply(n,e(e(["".concat(r," {")],je(o),!1),["}"],!1)):n.push("".concat(Oe(r),": ").concat(Ie(r,o),";")))}return n};function ke(e,t,n,r,o){if(void 0===o&&(o=[]),"string"==typeof e)return e&&o.push(e),o;if(xe(e))return o;if(se(e))return o.push(".".concat(e.styledComponentId)),o;if(oe(e)){if(!oe(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)||Te(s)||ce(s)||null===s||console.error("".concat(B(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.")),ke(s,t,n,r,o)}var i;if(Te(e))return n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o;if(ce(e)){for(var a=je(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++)ke(e[c],t,n,r,o);return o}function Me(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!se(n))return!1}return!0}var Ve=F(l),Ge=function(){function e(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=G(Ve,t),this.baseStyle=n,Pe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ie(r,this.staticRulesId);else{var o=ae(ke(this.rules,e,t,n)),s=M(G(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=ie(r,s),this.staticRulesId=s}else{for(var a=G(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=G(a,l));else if(l){var p=ae(ke(l,e,t,n));a=G(G(a,String(u)),p),c+=p}}if(c){var h=M(a>>>0);if(!t.hasNameForId(this.componentId,h)){var d=n(c,".".concat(h),void 0,this.componentId);t.insertRules(this.componentId,h,d)}r=ie(r,h)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(N(this.componentId)):""}},e}(),Fe=/&/g,Le=47,Be=42;function ze(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!==Le||e.charCodeAt(s+1)!==Be)if(o)i===Be&&e.charCodeAt(s+1)===Le&&(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 $e(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=$e(e.children,t)),e})}function Ye(e){var t,n,r,o=void 0===e?I:e,s=o.options,a=void 0===s?I:s,c=o.plugins,u=void 0===c?P:c,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=u.slice();p.push(function(e){e.type===i.RULESET&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(n,"\\b"),"g")),e.props[0]=e.props[0].replace(Fe,n).replace(r,l))}),a.prefix&&p.push(i.prefixer),p.push(i.stringify);var h=[],d=i.middleware(p.concat(i.rulesheet(function(e){return h.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(!ze(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!==Le||e.charCodeAt(a+1)!==Be)if(i)c===Be&&e.charCodeAt(a+1)===Le&&(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 p=e.substring(r);ze(p)||(n+=p)}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===Le&&o+1<t&&e.charCodeAt(o+1)===Be){for(o+=2;o+1<t&&(e.charCodeAt(o)!==Be||e.charCodeAt(o+1)!==Le);)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===Be&&o+1<t&&e.charCodeAt(o+1)===Le)o>r&&n.push(e.substring(r,o)),r=o+=2;else if(a===Le&&o+1<t&&e.charCodeAt(o+1)===Le){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=i.compile(s||o?"".concat(s," ").concat(o," { ").concat(u," }"):u);return a.namespace&&(l=$e(l,a.namespace)),h=[],i.serialize(l,d),h};return f.hash=u.length?u.reduce(function(e,t){return t.name||v(15),G(e,t.name)},5381).toString():"",f}var qe=new Pe,We=Ye(),He=r.createContext({shouldForwardProp:void 0,styleSheet:qe,stylis:We}),Ue=He.Consumer,Je=r.createContext(void 0);function Xe(){return r.useContext(He)}function Ze(e){if(!r.useMemo)return e.children;var t=Xe().styleSheet,n=r.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]),o=r.useMemo(function(){return Ye({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins]),s=r.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:n,stylis:o}},[e.shouldForwardProp,n,o]);return r.createElement(He.Provider,{value:s},r.createElement(Je.Provider,{value:o},e.children))}var Ke=r.createContext(void 0),Qe=Ke.Consumer;function et(){var e=r.useContext(Ke);if(!e)throw v(18);return e}function tt(e){var n=r.useContext(Ke),o=r.useMemo(function(){return function(e,n){if(!e)throw v(14);if(oe(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw v(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw v(8);return n?t(t({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?r.createElement(Ke.Provider,{value:o},e.children):null}var nt={},rt=new Set;function ot(e,s,i){var a=se(e),c=e,u=!z(e),p=s.attrs,h=void 0===p?P:p,d=s.componentId,f=void 0===d?function(e,t){var n="string"!=typeof e?"sc":x(e);nt[n]=(nt[n]||0)+1;var r="".concat(n,"-").concat(L(l+n+nt[n]));return t?"".concat(t,"-").concat(r):r}(s.displayName,s.parentComponentId):d,m=s.displayName,y=void 0===m?function(e){return z(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,v=s.displayName&&s.componentId?"".concat(x(s.displayName),"-").concat(s.componentId):s.componentId||f,g=a&&c.attrs?c.attrs.concat(h).filter(Boolean):h,S=s.shouldForwardProp;if(a&&c.shouldForwardProp){var w=c.shouldForwardProp;if(s.shouldForwardProp){var b=s.shouldForwardProp;S=function(e,t){return w(e,t)&&b(e,t)}}else S=w}var N=new Ge(i,v,a?c.componentStyle:void 0);function E(e,s){return function(e,s,i){var a=e.attrs,c=e.componentStyle,u=e.defaultProps,l=e.foldedComponentIds,p=e.styledComponentId,h=e.target,d=r.useContext(Ke),f=Xe(),m=e.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&r.useDebugValue&&r.useDebugValue(p);var y=R(s,d,u)||I,v=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=oe(o=e[i])?o(t({},s)):o;for(var c in a)"className"===c?s.className=ie(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=ie(s.className,n.className)),s}(a,s,y),g=v.as||h,S={};for(var w in v)void 0===v[w]||"$"===w[0]||"as"===w||"theme"===w&&v.theme===y||("forwardedAs"===w?S.as=v.forwardedAs:m&&!m(w,g)||(S[w]=v[w],m||"development"!==process.env.NODE_ENV||n(w)||rt.has(w)||!O.has(g)||(rt.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){var n=Xe(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return"production"!==process.env.NODE_ENV&&r.useDebugValue&&r.useDebugValue(o.className),o}(c,v),N=b.className;"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(N);var E=ie(l,p);return N&&(E+=" "+N),v.className&&(E+=" "+v.className),S[z(g)&&!O.has(g)?"class":"className"]=E,i&&(S.ref=i),o(g,S)}(C,e,s)}E.displayName=y;var C=r.forwardRef(E);return C.attrs=g,C.componentStyle=N,C.displayName=y,C.shouldForwardProp=S,C.foldedComponentIds=a?ie(c.foldedComponentIds,c.styledComponentId):"",C.styledComponentId=v,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++)ue(e,o[r],!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(_(y,v),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={}}}}(y,v)),le(C,function(){return".".concat(C.styledComponentId)}),u&&re(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function st(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 it=function(e){return Object.assign(e,{isCss:!0})};function at(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(oe(t)||ce(t))return it(ke(st(P,e([t],n,!0))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?ke(o):it(ke(st(o,n)))}function ct(n,r,o){if(void 0===o&&(o=I),!r)throw v(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,at.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return ct(n,r,t(t({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ct(n,r,t(t({},o),e))},s}var ut=function(e){return ct(ot,e)},lt=ut;O.forEach(function(e){lt[e]=ut(e)});var pt,ht=function(){function e(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=Me(e),Pe.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=ae(ke(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 dt(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var i=at.apply(void 0,e([n],o,!1)),a="sc-global-".concat(L(JSON.stringify(i))),c=new ht(i,a);"production"!==process.env.NODE_ENV&&_(a);var u=function(e){var t,n=Xe(),o=r.useContext(Ke),s=r.useRef(null);return null===s.current&&(s.current=n.styleSheet.allocateGSInstance(a)),t=s.current,"production"!==process.env.NODE_ENV&&r.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,o,n.stylis),r.useLayoutEffect(function(){return n.styleSheet.server||l(t,e,n.styleSheet,o,n.stylis),function(){c.removeStyles(t,n.styleSheet)}},[t,e,n.styleSheet,o,n.stylis]),n.styleSheet.server&&c.instanceRules.delete(t),null};function l(e,n,r,o,s){if(c.isStatic)c.renderStyles(e,f,r,s);else{var i=t(t({},n),{theme:R(n,o,u.defaultProps)});c.renderStyles(e,i,r,s)}}return r.memo(u)}var ft=function(){function e(e,t){var n=this;this[pt]=!0,this.inject=function(e,t){void 0===t&&(t=We);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="sc-keyframes-".concat(e),this.rules=t,N(this.id),le(this,function(){throw v(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=We),this.name+e.hash},e}();function mt(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=ae(at.apply(void 0,e([t],n,!1))),s=L(o);return new ft(s,o)}function yt(e){var n=r.forwardRef(function(n,o){var s=R(n,r.useContext(Ke),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(B(e),'"')),r.createElement(e,t(t({},n),{theme:s,ref:o}))});return n.displayName="WithTheme(".concat(B(e),")"),re(n,e)}pt=De;var vt=function(){function e(e){var n=(void 0===e?{}:e).nonce,o=this;this._emitSheetCSS=function(){var e=o.instance.toString();if(!e)return"";var t=o.instance.options.nonce||we(),n=ae([t&&'nonce="'.concat(t,'"'),"".concat(a,'="true"'),"".concat(u,'="').concat(l,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(e,"</style>")},this.getStyleTags=function(){if(o.sealed)throw v(2);return o._emitSheetCSS()},this.getStyleElement=function(){var e;if(o.sealed)throw v(2);var n=o.instance.toString();if(!n)return[];var s=((e={})[a]="",e[u]=l,e.dangerouslySetInnerHTML={__html:n},e),i=o.instance.options.nonce||we();return i&&(s.nonce=i),[r.createElement("style",t({},s,{key:"sc-0-0"}))]},this.seal=function(){o.sealed=!0},this.instance=new Pe({isServer:!0,nonce:n}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw v(2);return r.createElement(Ze,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw v(3)},e}(),gt={StyleSheet:Pe,mainSheet:qe};"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 St="__sc-".concat(a,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&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[St]+=1);export{vt as ServerStyleSheet,Ue as StyleSheetConsumer,He as StyleSheetContext,Ze as StyleSheetManager,Qe as ThemeConsumer,Ke as ThemeContext,tt as ThemeProvider,gt as __PRIVATE__,dt as createGlobalStyle,at as css,lt as default,se as isStyledComponent,mt as keyframes,lt as styled,et as useTheme,l as version,yt as withTheme};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.esm.js.map
|