styled-components 6.0.0-rc.0 → 6.0.0-rc.1
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/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.js +6 -6
- 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/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("shallowequal"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}var i=/*#__PURE__*/s(t),a=/*#__PURE__*/s(n),c=/*#__PURE__*/s(o),l="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",u="undefined"!=typeof window&&"HTMLElement"in window,p=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),d={},h=/invalid hook call/i,f=new Set,y=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(n).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.",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];h.test(t)?(a=!1,f.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},t.useRef(),a&&!f.has(s)&&(console.warn(s),f.add(s))}catch(e){h.test(e.message)&&f.delete(s)}finally{console.error=i}}},m=Object.freeze([]),v=Object.freeze({});function g(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme}var S=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,w=/(^-|-$)/g;function b(e){return e.replace(_,"-").replace(w,"")}var E=/(a)(d)/gi,N=function(e){return String.fromCharCode(e+(e>25?39:97))};function P(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=N(t%52)+n;return(N(t%52)+n).replace(E,"$1-$2")}var C,A=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},I=function(e){return A(5381,e)};function O(e){return P(I(e)>>>0)}function x(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function T(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var R="function"==typeof Symbol&&Symbol.for,D=R?Symbol.for("react.memo"):60115,j=R?Symbol.for("react.forward_ref"):60112,k={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F=((C={})[j]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},C[D]=M,C);function B(e){return("type"in(t=e)&&t.type.$$typeof)===D?M:"$$typeof"in e?F[e.$$typeof]:k;var t}var $=Object.defineProperty,z=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,q=Object.getPrototypeOf,Y=Object.prototype;function W(e,t,n){if("string"!=typeof t){if(Y){var r=q(t);r&&r!==Y&&W(e,r,n)}var o=z(t);L&&(o=o.concat(L(t)));for(var s=B(e),i=B(t),a=0;a<o.length;++a){var c=o[a];if(!(c in V||n&&n[c]||i&&c in i||s&&c in s)){var l=G(t,c);try{$(e,c,l)}catch(e){}}}}return e}function H(e){return"function"==typeof e}function U(e){return"object"==typeof e&&"styledComponentId"in e}function J(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function X(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Z(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function K(e,t,n){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=K(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=K(e[r],t[r]);return e}var Q="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"}:{};function ee(){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 te(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(ee.apply(void 0,e.__spreadArray([Q[t]],n,!1)).trim())}var ne=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 te(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),re=new Map,oe=new Map,se=1,ie=function(e){if(re.has(e))return re.get(e);for(;oe.has(se);)se++;var t=se++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw te(16,"".concat(t));return re.set(e,t),oe.set(t,e),t},ae=function(e,t){re.set(e,t),oe.set(t,e)},ce="style[".concat(l,"][").concat("data-styled-version",'="').concat("6.0.0-rc.0",'"]'),le=new RegExp("^".concat(l,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ue=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)},pe=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(le);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(ae(u,l),ue(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function de(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var he=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(l))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(l,"active"),r.setAttribute("data-styled-version","6.0.0-rc.0");var i=de();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},fe=function(){function e(e){this.element=he(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw te(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}(),ye=function(){function e(e){this.element=he(e),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}(),me=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(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}(),ve=u,ge={isServer:!u,useCSSOMInjection:!p},Se=function(){function t(t,n,r){void 0===t&&(t=v),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},ge),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&u&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(l)&&(pe(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return t.registerId=function(e){return ie(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new me(n):t?new fe(n):new ye(n)}(this.options),new ne(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(ie(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ie(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ie(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return oe.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(l,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},t}(),_e=/&/g,we=/^\s*\/\/.*$/gm;function be(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=be(e.children,t)),e})}function Ee(e){var t,n,o,s=void 0===e?v:e,i=s.options,a=void 0===i?v:i,c=s.plugins,l=void 0===c?m:c,u=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=l.slice();a.prefix&&p.unshift(r.prefixer),p.push(function(e){e.type===r.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(_e,n).replace(o,u))},r.stringify);var d=function(e,s,i,c){void 0===s&&(s=""),void 0===i&&(i=""),void 0===c&&(c="&"),t=c,n=s,o=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(we,""),u=r.compile(i||s?"".concat(i," ").concat(s," { ").concat(l," }"):l);return a.namespace&&(u=be(u,a.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(u,r.middleware(p))};return d.hash=l.length?l.reduce(function(e,t){return t.name||te(15),A(e,t.name)},5381).toString():"",d}var Ne=new Se,Pe=Ee(),Ce=i.default.createContext({shouldForwardProp:void 0,styleSheet:Ne,stylis:Pe}),Ae=Ce.Consumer,Ie=i.default.createContext(void 0);function Oe(){return t.useContext(Ce)}function xe(e){var n=t.useState(e.stylisPlugins),r=n[0],o=n[1],s=Oe().styleSheet,c=t.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),l=t.useMemo(function(){return Ee({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return t.useEffect(function(){a.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),i.default.createElement(Ce.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:c,stylis:l}},i.default.createElement(Ie.Provider,{value:l},e.children))}var Te=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw te(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),Re=function(e){return e>="A"&&e<="Z"};function De(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 je=function(e){return null==e||!1===e||""===e},ke=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!je(i)&&(Array.isArray(i)&&i.isCss||H(i)?o.push("".concat(De(s),":"),i,";"):Z(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],ke(i),!1),["}"],!1)):o.push("".concat(De(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in c.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function Ve(e,t,n,r){if(je(e))return[];if(U(e))return[".".concat(e.styledComponentId)];if(H(e)){if(!H(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Te||Z(o)||null===o||console.error("".concat(x(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(o,t,n,r)}var s;return e instanceof Te?n?(e.inject(n,r),[e.getName(r)]):[e]:Z(e)?ke(e):Array.isArray(e)?e.flatMap(function(e){return Ve(e,t,n,r)}):[e.toString()]}function Me(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(H(n)&&!U(n))return!1}return!0}var Fe=I("6.0.0-rc.0"),Be=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=A(Fe,t),this.baseStyle=n,Se.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=J(r,this.staticRulesId);else{var o=X(Ve(this.rules,e,t,n)),s=P(A(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=J(r,s),this.staticRulesId=s}else{for(var a=A(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=A(a,u));else if(u){var p=X(Ve(u,e,t,n));a=A(a,p),c+=p}}if(c){var d=P(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=J(r,d)}}return r},e}(),$e=i.default.createContext(void 0),ze=$e.Consumer;function Le(){return t.useContext($e)}var Ge={};function qe(n,r,o){var s=U(n),a=n,c=!T(n),l=r.attrs,u=void 0===l?m:l,p=r.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":b(e);Ge[n]=(Ge[n]||0)+1;var r="".concat(n,"-").concat(O("6.0.0-rc.0"+n+Ge[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,h=r.displayName,f=void 0===h?function(e){return T(e)?"styled.".concat(e):"Styled(".concat(x(e),")")}(n):h,_=r.displayName&&r.componentId?"".concat(b(r.displayName),"-").concat(r.componentId):r.componentId||d,w=s&&a.attrs?a.attrs.concat(u).filter(Boolean):u,E=r.shouldForwardProp;if(s&&a.shouldForwardProp){var N=a.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;E=function(e,t){return N(e,t)&&P(e,t)}}else E=N}var C=new Be(o,_,s?a.componentStyle:void 0),A=C.isStatic&&0===u.length;function I(n,r){return function(n,r,o,s){var i=n.attrs,a=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,p=n.target,d=Le(),h=Oe(),f=n.shouldForwardProp||h.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue(u);var y=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=H(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?J(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=J(s.className,n.className)),s}(i,r,g(r,d,c)||v),m=y.as||p,_={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?_.as=y.forwardedAs:f&&!f(w,m)||(_[w]=y[w]));var b=function(e,n,r){var o=Oe(),s=e.generateAndInjectStyles(n?v:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&t.useDebugValue(s),s}(a,s,y);"production"!==process.env.NODE_ENV&&!s&&n.warnTooManyClasses&&n.warnTooManyClasses(b);var E=J(l,u);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),_[T(m)&&!S.has(m)?"class":"className"]=E,_.ref=o,t.createElement(m,_)}(R,n,r,A)}I.displayName=f;var R=i.default.forwardRef(I);return R.attrs=w,R.componentStyle=C,R.displayName=f,R.shouldForwardProp=E,R.foldedComponentIds=s?J(a.foldedComponentIds,a.styledComponentId):"",R.styledComponentId=_,R.target=s?a.target:n,Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)K(e,o[r],!0);return e}({},a.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(y(f,_),R.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={}}}}(f,_)),Object.defineProperty(R,"toString",{value:function(){return".".concat(R.styledComponentId)}}),c&&W(R,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),R}function Ye(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 We=function(e){return Object.assign(e,{isCss:!0})};function He(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(H(t)||Z(t)){var o=t;return We(Ve(Ye(m,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?Ve(s):We(Ve(Ye(s,n)))}function Ue(t,n,r){if(void 0===r&&(r=v),!n)throw te(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,He.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Ue(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ue(t,n,e.__assign(e.__assign({},r),o))},o}var Je=function(e){return Ue(qe,e)},Xe=Je;S.forEach(function(e){Xe[e]=Je(e)});var Ze=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Me(e),Se.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(X(Ve(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Se.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),Ke=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=de(),r=X([n&&'nonce="'.concat(n,'"'),"".concat(l,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.0",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw te(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw te(2);var r=((n={})[l]="",n["data-styled-version"]="6.0.0-rc.0",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=de();return o&&(r.nonce=o),[i.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Se({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw te(2);return i.default.createElement(xe,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw te(3)},t}(),Qe={StyleSheet:Se,mainSheet:Ne};"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 et="__sc-".concat(l,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[et]||(window[et]=0),1===window[et]&&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://s-c.sh/2BAXzed for more info."),window[et]+=1),exports.ServerStyleSheet=Ke,exports.StyleSheetConsumer=Ae,exports.StyleSheetContext=Ce,exports.StyleSheetManager=xe,exports.ThemeConsumer=ze,exports.ThemeContext=$e,exports.ThemeProvider=function(n){var r=Le(),o=t.useMemo(function(){return function(t,n){if(!t)throw te(14);if(H(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw te(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw te(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?i.default.createElement($e.Provider,{value:o},n.children):null},exports.__PRIVATE__=Qe,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=He.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(O(JSON.stringify(o))),a=new Ze(o,s);"production"!==process.env.NODE_ENV&&y(s);var c=function(e){var t=Oe(),n=Le(),r=i.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&i.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.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."),t.styleSheet.server&&l(r,e,t.styleSheet,n,t.stylis),(i.default.useInsertionEffect||i.default.useLayoutEffect)(function(){if(!t.styleSheet.server)return l(r,e,t.styleSheet,n,t.stylis),function(){return a.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,d,r,s);else{var i=e.__assign(e.__assign({},n),{theme:g(n,o,c.defaultProps)});a.renderStyles(t,i,r,s)}}return i.default.memo(c)},exports.css=He,exports.default=Xe,exports.isStyledComponent=U,exports.keyframes=function(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=X(He.apply(void 0,e.__spreadArray([t],n,!1))),s=O(o);return new Te(s,o)},exports.styled=Xe,exports.useTheme=Le,exports.version="6.0.0-rc.0",exports.withTheme=function(t){var n=i.default.forwardRef(function(n,r){var o=g(n,Le(),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(x(t),'"')),i.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(x(t),")"),W(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("shallowequal"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}var i=/*#__PURE__*/s(t),a=/*#__PURE__*/s(n),c=/*#__PURE__*/s(o),l="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",u="undefined"!=typeof window&&"HTMLElement"in window,p=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),d={},h=/invalid hook call/i,f=new Set,y=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(n).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.",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];h.test(t)?(a=!1,f.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},t.useRef(),a&&!f.has(s)&&(console.warn(s),f.add(s))}catch(e){h.test(e.message)&&f.delete(s)}finally{console.error=i}}},m=Object.freeze([]),v=Object.freeze({});function g(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme}var S=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),_=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,w=/(^-|-$)/g;function b(e){return e.replace(_,"-").replace(w,"")}var E=/(a)(d)/gi,N=function(e){return String.fromCharCode(e+(e>25?39:97))};function P(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=N(t%52)+n;return(N(t%52)+n).replace(E,"$1-$2")}var C,A=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},I=function(e){return A(5381,e)};function O(e){return P(I(e)>>>0)}function x(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function T(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var R="function"==typeof Symbol&&Symbol.for,D=R?Symbol.for("react.memo"):60115,j=R?Symbol.for("react.forward_ref"):60112,k={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},V={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F=((C={})[j]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},C[D]=M,C);function B(e){return("type"in(t=e)&&t.type.$$typeof)===D?M:"$$typeof"in e?F[e.$$typeof]:k;var t}var $=Object.defineProperty,z=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,q=Object.getPrototypeOf,Y=Object.prototype;function W(e,t,n){if("string"!=typeof t){if(Y){var r=q(t);r&&r!==Y&&W(e,r,n)}var o=z(t);L&&(o=o.concat(L(t)));for(var s=B(e),i=B(t),a=0;a<o.length;++a){var c=o[a];if(!(c in V||n&&n[c]||i&&c in i||s&&c in s)){var l=G(t,c);try{$(e,c,l)}catch(e){}}}}return e}function H(e){return"function"==typeof e}function U(e){return"object"==typeof e&&"styledComponentId"in e}function J(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function X(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Z(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function K(e,t,n){if(void 0===n&&(n=!1),!n&&!Z(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=K(e[r],t[r]);else if(Z(t))for(var r in t)e[r]=K(e[r],t[r]);return e}var Q="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"}:{};function ee(){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 te(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(ee.apply(void 0,e.__spreadArray([Q[t]],n,!1)).trim())}var ne=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 te(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),re=new Map,oe=new Map,se=1,ie=function(e){if(re.has(e))return re.get(e);for(;oe.has(se);)se++;var t=se++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw te(16,"".concat(t));return re.set(e,t),oe.set(t,e),t},ae=function(e,t){re.set(e,t),oe.set(t,e)},ce="style[".concat(l,"][").concat("data-styled-version",'="').concat("6.0.0-rc.1",'"]'),le=new RegExp("^".concat(l,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ue=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)},pe=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(le);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(ae(u,l),ue(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function de(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var he=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(l))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(l,"active"),r.setAttribute("data-styled-version","6.0.0-rc.1");var i=de();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},fe=function(){function e(e){this.element=he(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw te(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}(),ye=function(){function e(e){this.element=he(e),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}(),me=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(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}(),ve=u,ge={isServer:!u,useCSSOMInjection:!p},Se=function(){function t(t,n,r){void 0===t&&(t=v),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},ge),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&u&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(l)&&(pe(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return t.registerId=function(e){return ie(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new me(n):t?new fe(n):new ye(n)}(this.options),new ne(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(ie(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ie(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ie(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return oe.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(l,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},t}(),_e=/&/g,we=/^\s*\/\/.*$/gm;function be(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=be(e.children,t)),e})}function Ee(e){var t,n,o,s=void 0===e?v:e,i=s.options,a=void 0===i?v:i,c=s.plugins,l=void 0===c?m:c,u=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=l.slice();a.prefix&&p.unshift(r.prefixer),p.push(function(e){e.type===r.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(_e,n).replace(o,u))},r.stringify);var d=function(e,s,i,c){void 0===s&&(s=""),void 0===i&&(i=""),void 0===c&&(c="&"),t=c,n=s,o=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(we,""),u=r.compile(i||s?"".concat(i," ").concat(s," { ").concat(l," }"):l);return a.namespace&&(u=be(u,a.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(u,r.middleware(p))};return d.hash=l.length?l.reduce(function(e,t){return t.name||te(15),A(e,t.name)},5381).toString():"",d}var Ne=new Se,Pe=Ee(),Ce=i.default.createContext({shouldForwardProp:void 0,styleSheet:Ne,stylis:Pe}),Ae=Ce.Consumer,Ie=i.default.createContext(void 0);function Oe(){return t.useContext(Ce)}function xe(e){var n=t.useState(e.stylisPlugins),r=n[0],o=n[1],s=Oe().styleSheet,c=t.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),l=t.useMemo(function(){return Ee({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return t.useEffect(function(){a.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),i.default.createElement(Ce.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:c,stylis:l}},i.default.createElement(Ie.Provider,{value:l},e.children))}var Te=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw te(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Pe),this.name+e.hash},e}(),Re=function(e){return e>="A"&&e<="Z"};function De(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 je=function(e){return null==e||!1===e||""===e},ke=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!je(i)&&(Array.isArray(i)&&i.isCss||H(i)?o.push("".concat(De(s),":"),i,";"):Z(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],ke(i),!1),["}"],!1)):o.push("".concat(De(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in c.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function Ve(e,t,n,r){if(je(e))return[];if(U(e))return[".".concat(e.styledComponentId)];if(H(e)){if(!H(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Te||Z(o)||null===o||console.error("".concat(x(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(o,t,n,r)}var s;return e instanceof Te?n?(e.inject(n,r),[e.getName(r)]):[e]:Z(e)?ke(e):Array.isArray(e)?e.flatMap(function(e){return Ve(e,t,n,r)}):[e.toString()]}function Me(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(H(n)&&!U(n))return!1}return!0}var Fe=I("6.0.0-rc.1"),Be=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=A(Fe,t),this.baseStyle=n,Se.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=J(r,this.staticRulesId);else{var o=X(Ve(this.rules,e,t,n)),s=P(A(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=J(r,s),this.staticRulesId=s}else{for(var a=A(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=A(a,u));else if(u){var p=X(Ve(u,e,t,n));a=A(a,p),c+=p}}if(c){var d=P(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=J(r,d)}}return r},e}(),$e=i.default.createContext(void 0),ze=$e.Consumer;function Le(){return t.useContext($e)}var Ge={};function qe(n,r,o){var s=U(n),a=n,c=!T(n),l=r.attrs,u=void 0===l?m:l,p=r.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":b(e);Ge[n]=(Ge[n]||0)+1;var r="".concat(n,"-").concat(O("6.0.0-rc.1"+n+Ge[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,h=r.displayName,f=void 0===h?function(e){return T(e)?"styled.".concat(e):"Styled(".concat(x(e),")")}(n):h,_=r.displayName&&r.componentId?"".concat(b(r.displayName),"-").concat(r.componentId):r.componentId||d,w=s&&a.attrs?a.attrs.concat(u).filter(Boolean):u,E=r.shouldForwardProp;if(s&&a.shouldForwardProp){var N=a.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;E=function(e,t){return N(e,t)&&P(e,t)}}else E=N}var C=new Be(o,_,s?a.componentStyle:void 0),A=C.isStatic&&0===u.length;function I(n,r){return function(n,r,o,s){var i=n.attrs,a=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,p=n.target,d=Le(),h=Oe(),f=n.shouldForwardProp||h.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue(u);var y=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=H(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?J(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=J(s.className,n.className)),s}(i,r,g(r,d,c)||v),m=y.as||p,_={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?_.as=y.forwardedAs:f&&!f(w,m)||(_[w]=y[w]));var b=function(e,n,r){var o=Oe(),s=e.generateAndInjectStyles(n?v:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&t.useDebugValue(s),s}(a,s,y);"production"!==process.env.NODE_ENV&&!s&&n.warnTooManyClasses&&n.warnTooManyClasses(b);var E=J(l,u);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),_[T(m)&&!S.has(m)?"class":"className"]=E,_.ref=o,t.createElement(m,_)}(R,n,r,A)}I.displayName=f;var R=i.default.forwardRef(I);return R.attrs=w,R.componentStyle=C,R.displayName=f,R.shouldForwardProp=E,R.foldedComponentIds=s?J(a.foldedComponentIds,a.styledComponentId):"",R.styledComponentId=_,R.target=s?a.target:n,Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)K(e,o[r],!0);return e}({},a.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(y(f,_),R.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={}}}}(f,_)),Object.defineProperty(R,"toString",{value:function(){return".".concat(R.styledComponentId)}}),c&&W(R,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),R}function Ye(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 We=function(e){return Object.assign(e,{isCss:!0})};function He(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(H(t)||Z(t)){var o=t;return We(Ve(Ye(m,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?Ve(s):We(Ve(Ye(s,n)))}function Ue(t,n,r){if(void 0===r&&(r=v),!n)throw te(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,He.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Ue(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ue(t,n,e.__assign(e.__assign({},r),o))},o}var Je=function(e){return Ue(qe,e)},Xe=Je;S.forEach(function(e){Xe[e]=Je(e)});var Ze=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Me(e),Se.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(X(Ve(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Se.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),Ke=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=de(),r=X([n&&'nonce="'.concat(n,'"'),"".concat(l,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.1",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw te(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw te(2);var r=((n={})[l]="",n["data-styled-version"]="6.0.0-rc.1",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=de();return o&&(r.nonce=o),[i.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Se({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw te(2);return i.default.createElement(xe,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw te(3)},t}(),Qe={StyleSheet:Se,mainSheet:Ne};"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 et="__sc-".concat(l,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[et]||(window[et]=0),1===window[et]&&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://s-c.sh/2BAXzed for more info."),window[et]+=1),exports.ServerStyleSheet=Ke,exports.StyleSheetConsumer=Ae,exports.StyleSheetContext=Ce,exports.StyleSheetManager=xe,exports.ThemeConsumer=ze,exports.ThemeContext=$e,exports.ThemeProvider=function(n){var r=Le(),o=t.useMemo(function(){return function(t,n){if(!t)throw te(14);if(H(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw te(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw te(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?i.default.createElement($e.Provider,{value:o},n.children):null},exports.__PRIVATE__=Qe,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=He.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(O(JSON.stringify(o))),a=new Ze(o,s);"production"!==process.env.NODE_ENV&&y(s);var c=function(e){var t=Oe(),n=Le(),r=i.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&i.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.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."),t.styleSheet.server&&l(r,e,t.styleSheet,n,t.stylis),(i.default.useInsertionEffect||i.default.useLayoutEffect)(function(){if(!t.styleSheet.server)return l(r,e,t.styleSheet,n,t.stylis),function(){return a.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,d,r,s);else{var i=e.__assign(e.__assign({},n),{theme:g(n,o,c.defaultProps)});a.renderStyles(t,i,r,s)}}return i.default.memo(c)},exports.css=He,exports.default=Xe,exports.isStyledComponent=U,exports.keyframes=function(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=X(He.apply(void 0,e.__spreadArray([t],n,!1))),s=O(o);return new Te(s,o)},exports.styled=Xe,exports.useTheme=Le,exports.version="6.0.0-rc.1",exports.withTheme=function(t){var n=i.default.forwardRef(function(n,r){var o=g(n,Le(),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(x(t),'"')),i.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(x(t),")"),W(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as t}from"tslib";import n,{useRef as r,useState as o,useMemo as s,useEffect as i,useContext as a,useDebugValue as c,createElement as l}from"react";import u from"shallowequal";import{prefixer as p,stringify as d,RULESET as h,compile as f,middleware as m}from"stylis";import y from"@emotion/unitless";var v="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",g="6.0.0-rc.0",S="undefined"!=typeof window&&"HTMLElement"in window,w=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),b={},E=/invalid hook call/i,N=new Set,P=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.",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];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,e([t],n,!1))},r(),a&&!N.has(s)&&(console.warn(s),N.add(s))}catch(e){E.test(e.message)&&N.delete(s)}finally{console.error=i}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=j(t%52)+n;return(j(t%52)+n).replace(T,"$1-$2")}var k,V=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},M=function(e){return V(5381,e)};function F(e){return x(M(e)>>>0)}function B(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function $(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var z="function"==typeof Symbol&&Symbol.for,L=z?Symbol.for("react.memo"):60115,G=z?Symbol.for("react.forward_ref"):60112,Y={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},W={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H=((k={})[G]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},k[L]=q,k);function U(e){return("type"in(t=e)&&t.type.$$typeof)===L?q:"$$typeof"in e?H[e.$$typeof]:Y;var t}var J=Object.defineProperty,X=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,K=Object.getOwnPropertyDescriptor,Q=Object.getPrototypeOf,ee=Object.prototype;function te(e,t,n){if("string"!=typeof t){if(ee){var r=Q(t);r&&r!==ee&&te(e,r,n)}var o=X(t);Z&&(o=o.concat(Z(t)));for(var s=U(e),i=U(t),a=0;a<o.length;++a){var c=o[a];if(!(c in W||n&&n[c]||i&&c in i||s&&c in s)){var l=K(t,c);try{J(e,c,l)}catch(e){}}}}return e}function ne(e){return"function"==typeof e}function re(e){return"object"==typeof e&&"styledComponentId"in e}function oe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function se(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function ie(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ae(e,t,n){if(void 0===n&&(n=!1),!n&&!ie(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ae(e[r],t[r]);else if(ie(t))for(var r in t)e[r]=ae(e[r],t[r]);return e}var ce="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"}:{};function le(){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 ue(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(le.apply(void 0,e([ce[t]],n,!1)).trim())}var pe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 ue(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),de=new Map,he=new Map,fe=1,me=function(e){if(de.has(e))return de.get(e);for(;he.has(fe);)fe++;var t=fe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ue(16,"".concat(t));return de.set(e,t),he.set(t,e),t},ye=function(e,t){de.set(e,t),he.set(t,e)},ve="style[".concat(v,"][").concat("data-styled-version",'="').concat("6.0.0-rc.0",'"]'),ge=new RegExp("^".concat(v,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Se=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)},we=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ge);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(ye(u,l),Se(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function be(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ee=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(v))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(v,"active"),r.setAttribute("data-styled-version","6.0.0-rc.0");var i=be();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ne=function(){function e(e){this.element=Ee(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ue(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}(),Pe=function(){function e(e){this.element=Ee(e),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&&(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}(),Ce=S,Ie={isServer:!S,useCSSOMInjection:!w},Ae=function(){function e(e,n,r){void 0===e&&(e=C),void 0===n&&(n={}),this.options=t(t({},Ie),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&S&&Ce&&(Ce=!1,function(e){for(var t=document.querySelectorAll(ve),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(v)&&(we(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return e.registerId=function(e){return me(e)},e.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new e(t(t({},this.options),n),this.gs,r&&this.names||void 0)},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;return e.isServer?new _e(n):t?new Ne(n):new Pe(n)}(this.options),new pe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(me(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(me(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(me(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return he.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(v,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},e}(),Oe=/&/g,De=/^\s*\/\/.*$/gm;function Re(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=Re(e.children,t)),e})}function Te(e){var t,n,r,o=void 0===e?C:e,s=o.options,i=void 0===s?C:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();i.prefix&&u.unshift(p),u.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Oe,n).replace(r,l))},d);var y=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(De,""),l=f(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(l=Re(l,i.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(l,m(u))};return y.hash=c.length?c.reduce(function(e,t){return t.name||ue(15),V(e,t.name)},5381).toString():"",y}var je=new Ae,xe=Te(),ke=n.createContext({shouldForwardProp:void 0,styleSheet:je,stylis:xe}),Ve=ke.Consumer,Me=n.createContext(void 0);function Fe(){return a(ke)}function Be(e){var t=o(e.stylisPlugins),r=t[0],a=t[1],c=Fe().styleSheet,l=s(function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,c]),p=s(function(){return Te({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return i(function(){u(r,e.stylisPlugins)||a(e.stylisPlugins)},[e.stylisPlugins]),n.createElement(ke.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:p}},n.createElement(Me.Provider,{value:p},e.children))}var $e=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ue(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=xe),this.name+e.hash},e}(),ze=function(e){return e>="A"&&e<="Z"};function Le(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;ze(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ge=function(e){return null==e||!1===e||""===e},Ye=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ge(i)&&(Array.isArray(i)&&i.isCss||ne(i)?o.push("".concat(Le(s),":"),i,";"):ie(i)?o.push.apply(o,e(e(["".concat(s," {")],Ye(i),!1),["}"],!1)):o.push("".concat(Le(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in y||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function We(e,t,n,r){if(Ge(e))return[];if(re(e))return[".".concat(e.styledComponentId)];if(ne(e)){if(!ne(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof $e||ie(o)||null===o||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.")),We(o,t,n,r)}var s;return e instanceof $e?n?(e.inject(n,r),[e.getName(r)]):[e]:ie(e)?Ye(e):Array.isArray(e)?e.flatMap(function(e){return We(e,t,n,r)}):[e.toString()]}function qe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ne(n)&&!re(n))return!1}return!0}var He=M("6.0.0-rc.0"),Ue=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&qe(e),this.componentId=t,this.baseHash=V(He,t),this.baseStyle=n,Ae.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=oe(r,this.staticRulesId);else{var o=se(We(this.rules,e,t,n)),s=x(V(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=oe(r,s),this.staticRulesId=s}else{for(var a=V(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=V(a,u));else if(u){var p=se(We(u,e,t,n));a=V(a,p),c+=p}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=oe(r,d)}}return r},e}(),Je=n.createContext(void 0),Xe=Je.Consumer;function Ze(){return a(Je)}function Ke(e){var r=Ze(),o=s(function(){return function(e,n){if(!e)throw ue(14);if(ne(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ue(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw ue(8);return n?t(t({},n),e):e}(e.theme,r)},[e.theme,r]);return e.children?n.createElement(Je.Provider,{value:o},e.children):null}var Qe={};function et(e,r,o){var s=re(e),i=e,a=!$(e),u=r.attrs,p=void 0===u?_:u,d=r.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":R(e);Qe[n]=(Qe[n]||0)+1;var r="".concat(n,"-").concat(F("6.0.0-rc.0"+n+Qe[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,f=r.displayName,m=void 0===f?function(e){return $(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):f,y=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||h,v=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,g=r.shouldForwardProp;if(s&&i.shouldForwardProp){var S=i.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;g=function(e,t){return S(e,t)&&w(e,t)}}else g=S}var b=new Ue(o,y,s?i.componentStyle:void 0),E=b.isStatic&&0===p.length;function N(e,n){return function(e,n,r,o){var s=e.attrs,i=e.componentStyle,a=e.defaultProps,u=e.foldedComponentIds,p=e.styledComponentId,d=e.target,h=Ze(),f=Fe(),m=e.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c(p);var 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=ne(o=e[i])?o(s):o;for(var c in a)s[c]="className"===c?oe(s[c],a[c]):"style"===c?t(t({},s[c]),a[c]):a[c]}return n.className&&(s.className=oe(s.className,n.className)),s}(s,n,I(n,h,a)||C),v=y.as||d,g={};for(var S in y)void 0===y[S]||"$"===S[0]||"as"===S||"theme"===S||("forwardedAs"===S?g.as=y.forwardedAs:m&&!m(S,v)||(g[S]=y[S]));var w=function(e,t,n){var r=Fe(),o=e.generateAndInjectStyles(t?C:n,r.styleSheet,r.stylis);return"production"!==process.env.NODE_ENV&&c(o),o}(i,o,y);"production"!==process.env.NODE_ENV&&!o&&e.warnTooManyClasses&&e.warnTooManyClasses(w);var b=oe(u,p);return w&&(b+=" "+w),y.className&&(b+=" "+y.className),g[$(v)&&!A.has(v)?"class":"className"]=b,g.ref=r,l(v,g)}(O,e,n,E)}N.displayName=m;var O=n.forwardRef(N);return O.attrs=v,O.componentStyle=b,O.displayName=m,O.shouldForwardProp=g,O.foldedComponentIds=s?oe(i.foldedComponentIds,i.styledComponentId):"",O.styledComponentId=y,O.target=s?i.target:e,Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)ae(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(P(m,y),O.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={}}}}(m,y)),Object.defineProperty(O,"toString",{value:function(){return".".concat(O.styledComponentId)}}),a&&te(O,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),O}function tt(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 nt=function(e){return Object.assign(e,{isCss:!0})};function rt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ne(t)||ie(t)){var o=t;return nt(We(tt(_,e([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?We(s):nt(We(tt(s,n)))}function ot(n,r,o){if(void 0===o&&(o=C),!r)throw ue(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,rt.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return ot(n,r,t(t({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ot(n,r,t(t({},o),e))},s}var st=function(e){return ot(et,e)},it=st;A.forEach(function(e){it[e]=st(e)});var at=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=qe(e),Ae.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(se(We(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Ae.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function ct(r){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var i=rt.apply(void 0,e([r],o,!1)),a="sc-global-".concat(F(JSON.stringify(i))),c=new at(i,a);"production"!==process.env.NODE_ENV&&P(a);var l=function(e){var t=Fe(),r=Ze(),o=n.useRef(t.styleSheet.allocateGSInstance(a)).current;return"production"!==process.env.NODE_ENV&&n.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."),t.styleSheet.server&&u(o,e,t.styleSheet,r,t.stylis),(n.useInsertionEffect||n.useLayoutEffect)(function(){if(!t.styleSheet.server)return u(o,e,t.styleSheet,r,t.stylis),function(){return c.removeStyles(o,t.styleSheet)}},[o,e,t.styleSheet,r,t.stylis]),null};function u(e,n,r,o,s){if(c.isStatic)c.renderStyles(e,b,r,s);else{var i=t(t({},n),{theme:I(n,o,l.defaultProps)});c.renderStyles(e,i,r,s)}}return n.memo(l)}function lt(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=se(rt.apply(void 0,e([t],n,!1))),s=F(o);return new $e(s,o)}function ut(e){var r=n.forwardRef(function(r,o){var s=I(r,Ze(),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),'"')),n.createElement(e,t({},r,{theme:s,ref:o}))});return r.displayName="WithTheme(".concat(B(e),")"),te(r,e)}var pt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=be(),r=se([n&&'nonce="'.concat(n,'"'),"".concat(v,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.0",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw ue(2);return e._emitSheetCSS()},this.getStyleElement=function(){var r;if(e.sealed)throw ue(2);var o=((r={})[v]="",r["data-styled-version"]="6.0.0-rc.0",r.dangerouslySetInnerHTML={__html:e.instance.toString()},r),s=be();return s&&(o.nonce=s),[n.createElement("style",t({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Ae({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw ue(2);return n.createElement(Be,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw ue(3)},e}(),dt={StyleSheet:Ae,mainSheet:je};"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 ht="__sc-".concat(v,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[ht]||(window[ht]=0),1===window[ht]&&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://s-c.sh/2BAXzed for more info."),window[ht]+=1);export{pt as ServerStyleSheet,Ve as StyleSheetConsumer,ke as StyleSheetContext,Be as StyleSheetManager,Xe as ThemeConsumer,Je as ThemeContext,Ke as ThemeProvider,dt as __PRIVATE__,ct as createGlobalStyle,rt as css,it as default,re as isStyledComponent,lt as keyframes,it as styled,Ze as useTheme,g as version,ut as withTheme};
|
|
1
|
+
import{__spreadArray as e,__assign as t}from"tslib";import n,{useRef as r,useState as o,useMemo as s,useEffect as i,useContext as a,useDebugValue as c,createElement as l}from"react";import u from"shallowequal";import{prefixer as p,stringify as d,RULESET as h,compile as f,middleware as m}from"stylis";import y from"@emotion/unitless";var v="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",g="6.0.0-rc.1",S="undefined"!=typeof window&&"HTMLElement"in window,w=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),b={},E=/invalid hook call/i,N=new Set,P=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.",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];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,e([t],n,!1))},r(),a&&!N.has(s)&&(console.warn(s),N.add(s))}catch(e){E.test(e.message)&&N.delete(s)}finally{console.error=i}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=j(t%52)+n;return(j(t%52)+n).replace(T,"$1-$2")}var k,V=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},M=function(e){return V(5381,e)};function F(e){return x(M(e)>>>0)}function B(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function $(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var z="function"==typeof Symbol&&Symbol.for,L=z?Symbol.for("react.memo"):60115,G=z?Symbol.for("react.forward_ref"):60112,Y={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},W={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H=((k={})[G]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},k[L]=q,k);function U(e){return("type"in(t=e)&&t.type.$$typeof)===L?q:"$$typeof"in e?H[e.$$typeof]:Y;var t}var J=Object.defineProperty,X=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,K=Object.getOwnPropertyDescriptor,Q=Object.getPrototypeOf,ee=Object.prototype;function te(e,t,n){if("string"!=typeof t){if(ee){var r=Q(t);r&&r!==ee&&te(e,r,n)}var o=X(t);Z&&(o=o.concat(Z(t)));for(var s=U(e),i=U(t),a=0;a<o.length;++a){var c=o[a];if(!(c in W||n&&n[c]||i&&c in i||s&&c in s)){var l=K(t,c);try{J(e,c,l)}catch(e){}}}}return e}function ne(e){return"function"==typeof e}function re(e){return"object"==typeof e&&"styledComponentId"in e}function oe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function se(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function ie(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ae(e,t,n){if(void 0===n&&(n=!1),!n&&!ie(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ae(e[r],t[r]);else if(ie(t))for(var r in t)e[r]=ae(e[r],t[r]);return e}var ce="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"}:{};function le(){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 ue(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(le.apply(void 0,e([ce[t]],n,!1)).trim())}var pe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 ue(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),de=new Map,he=new Map,fe=1,me=function(e){if(de.has(e))return de.get(e);for(;he.has(fe);)fe++;var t=fe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ue(16,"".concat(t));return de.set(e,t),he.set(t,e),t},ye=function(e,t){de.set(e,t),he.set(t,e)},ve="style[".concat(v,"][").concat("data-styled-version",'="').concat("6.0.0-rc.1",'"]'),ge=new RegExp("^".concat(v,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Se=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)},we=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(ge);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(ye(u,l),Se(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function be(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ee=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(v))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(v,"active"),r.setAttribute("data-styled-version","6.0.0-rc.1");var i=be();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ne=function(){function e(e){this.element=Ee(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ue(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}(),Pe=function(){function e(e){this.element=Ee(e),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&&(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}(),Ce=S,Ie={isServer:!S,useCSSOMInjection:!w},Ae=function(){function e(e,n,r){void 0===e&&(e=C),void 0===n&&(n={}),this.options=t(t({},Ie),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&S&&Ce&&(Ce=!1,function(e){for(var t=document.querySelectorAll(ve),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(v)&&(we(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return e.registerId=function(e){return me(e)},e.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new e(t(t({},this.options),n),this.gs,r&&this.names||void 0)},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;return e.isServer?new _e(n):t?new Ne(n):new Pe(n)}(this.options),new pe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(me(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(me(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(me(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return he.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(v,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},e}(),Oe=/&/g,De=/^\s*\/\/.*$/gm;function Re(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=Re(e.children,t)),e})}function Te(e){var t,n,r,o=void 0===e?C:e,s=o.options,i=void 0===s?C:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();i.prefix&&u.unshift(p),u.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Oe,n).replace(r,l))},d);var y=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(De,""),l=f(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);return i.namespace&&(l=Re(l,i.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(l,m(u))};return y.hash=c.length?c.reduce(function(e,t){return t.name||ue(15),V(e,t.name)},5381).toString():"",y}var je=new Ae,xe=Te(),ke=n.createContext({shouldForwardProp:void 0,styleSheet:je,stylis:xe}),Ve=ke.Consumer,Me=n.createContext(void 0);function Fe(){return a(ke)}function Be(e){var t=o(e.stylisPlugins),r=t[0],a=t[1],c=Fe().styleSheet,l=s(function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,c]),p=s(function(){return Te({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return i(function(){u(r,e.stylisPlugins)||a(e.stylisPlugins)},[e.stylisPlugins]),n.createElement(ke.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:p}},n.createElement(Me.Provider,{value:p},e.children))}var $e=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ue(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=xe),this.name+e.hash},e}(),ze=function(e){return e>="A"&&e<="Z"};function Le(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;ze(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ge=function(e){return null==e||!1===e||""===e},Ye=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ge(i)&&(Array.isArray(i)&&i.isCss||ne(i)?o.push("".concat(Le(s),":"),i,";"):ie(i)?o.push.apply(o,e(e(["".concat(s," {")],Ye(i),!1),["}"],!1)):o.push("".concat(Le(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in y||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function We(e,t,n,r){if(Ge(e))return[];if(re(e))return[".".concat(e.styledComponentId)];if(ne(e)){if(!ne(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof $e||ie(o)||null===o||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.")),We(o,t,n,r)}var s;return e instanceof $e?n?(e.inject(n,r),[e.getName(r)]):[e]:ie(e)?Ye(e):Array.isArray(e)?e.flatMap(function(e){return We(e,t,n,r)}):[e.toString()]}function qe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ne(n)&&!re(n))return!1}return!0}var He=M("6.0.0-rc.1"),Ue=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&qe(e),this.componentId=t,this.baseHash=V(He,t),this.baseStyle=n,Ae.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=oe(r,this.staticRulesId);else{var o=se(We(this.rules,e,t,n)),s=x(V(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=oe(r,s),this.staticRulesId=s}else{for(var a=V(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=V(a,u));else if(u){var p=se(We(u,e,t,n));a=V(a,p),c+=p}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=oe(r,d)}}return r},e}(),Je=n.createContext(void 0),Xe=Je.Consumer;function Ze(){return a(Je)}function Ke(e){var r=Ze(),o=s(function(){return function(e,n){if(!e)throw ue(14);if(ne(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ue(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw ue(8);return n?t(t({},n),e):e}(e.theme,r)},[e.theme,r]);return e.children?n.createElement(Je.Provider,{value:o},e.children):null}var Qe={};function et(e,r,o){var s=re(e),i=e,a=!$(e),u=r.attrs,p=void 0===u?_:u,d=r.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":R(e);Qe[n]=(Qe[n]||0)+1;var r="".concat(n,"-").concat(F("6.0.0-rc.1"+n+Qe[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,f=r.displayName,m=void 0===f?function(e){return $(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):f,y=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||h,v=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,g=r.shouldForwardProp;if(s&&i.shouldForwardProp){var S=i.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;g=function(e,t){return S(e,t)&&w(e,t)}}else g=S}var b=new Ue(o,y,s?i.componentStyle:void 0),E=b.isStatic&&0===p.length;function N(e,n){return function(e,n,r,o){var s=e.attrs,i=e.componentStyle,a=e.defaultProps,u=e.foldedComponentIds,p=e.styledComponentId,d=e.target,h=Ze(),f=Fe(),m=e.shouldForwardProp||f.shouldForwardProp;"production"!==process.env.NODE_ENV&&c(p);var 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=ne(o=e[i])?o(s):o;for(var c in a)s[c]="className"===c?oe(s[c],a[c]):"style"===c?t(t({},s[c]),a[c]):a[c]}return n.className&&(s.className=oe(s.className,n.className)),s}(s,n,I(n,h,a)||C),v=y.as||d,g={};for(var S in y)void 0===y[S]||"$"===S[0]||"as"===S||"theme"===S||("forwardedAs"===S?g.as=y.forwardedAs:m&&!m(S,v)||(g[S]=y[S]));var w=function(e,t,n){var r=Fe(),o=e.generateAndInjectStyles(t?C:n,r.styleSheet,r.stylis);return"production"!==process.env.NODE_ENV&&c(o),o}(i,o,y);"production"!==process.env.NODE_ENV&&!o&&e.warnTooManyClasses&&e.warnTooManyClasses(w);var b=oe(u,p);return w&&(b+=" "+w),y.className&&(b+=" "+y.className),g[$(v)&&!A.has(v)?"class":"className"]=b,g.ref=r,l(v,g)}(O,e,n,E)}N.displayName=m;var O=n.forwardRef(N);return O.attrs=v,O.componentStyle=b,O.displayName=m,O.shouldForwardProp=g,O.foldedComponentIds=s?oe(i.foldedComponentIds,i.styledComponentId):"",O.styledComponentId=y,O.target=s?i.target:e,Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)ae(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(P(m,y),O.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={}}}}(m,y)),Object.defineProperty(O,"toString",{value:function(){return".".concat(O.styledComponentId)}}),a&&te(O,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),O}function tt(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 nt=function(e){return Object.assign(e,{isCss:!0})};function rt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(ne(t)||ie(t)){var o=t;return nt(We(tt(_,e([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?We(s):nt(We(tt(s,n)))}function ot(n,r,o){if(void 0===o&&(o=C),!r)throw ue(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,rt.apply(void 0,e([t],s,!1)))};return s.attrs=function(e){return ot(n,r,t(t({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ot(n,r,t(t({},o),e))},s}var st=function(e){return ot(et,e)},it=st;A.forEach(function(e){it[e]=st(e)});var at=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=qe(e),Ae.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(se(We(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Ae.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function ct(r){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var i=rt.apply(void 0,e([r],o,!1)),a="sc-global-".concat(F(JSON.stringify(i))),c=new at(i,a);"production"!==process.env.NODE_ENV&&P(a);var l=function(e){var t=Fe(),r=Ze(),o=n.useRef(t.styleSheet.allocateGSInstance(a)).current;return"production"!==process.env.NODE_ENV&&n.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."),t.styleSheet.server&&u(o,e,t.styleSheet,r,t.stylis),(n.useInsertionEffect||n.useLayoutEffect)(function(){if(!t.styleSheet.server)return u(o,e,t.styleSheet,r,t.stylis),function(){return c.removeStyles(o,t.styleSheet)}},[o,e,t.styleSheet,r,t.stylis]),null};function u(e,n,r,o,s){if(c.isStatic)c.renderStyles(e,b,r,s);else{var i=t(t({},n),{theme:I(n,o,l.defaultProps)});c.renderStyles(e,i,r,s)}}return n.memo(l)}function lt(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=se(rt.apply(void 0,e([t],n,!1))),s=F(o);return new $e(s,o)}function ut(e){var r=n.forwardRef(function(r,o){var s=I(r,Ze(),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),'"')),n.createElement(e,t({},r,{theme:s,ref:o}))});return r.displayName="WithTheme(".concat(B(e),")"),te(r,e)}var pt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=be(),r=se([n&&'nonce="'.concat(n,'"'),"".concat(v,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.1",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw ue(2);return e._emitSheetCSS()},this.getStyleElement=function(){var r;if(e.sealed)throw ue(2);var o=((r={})[v]="",r["data-styled-version"]="6.0.0-rc.1",r.dangerouslySetInnerHTML={__html:e.instance.toString()},r),s=be();return s&&(o.nonce=s),[n.createElement("style",t({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Ae({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw ue(2);return n.createElement(Be,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw ue(3)},e}(),dt={StyleSheet:Ae,mainSheet:je};"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 ht="__sc-".concat(v,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[ht]||(window[ht]=0),1===window[ht]&&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://s-c.sh/2BAXzed for more info."),window[ht]+=1);export{pt as ServerStyleSheet,Ve as StyleSheetConsumer,ke as StyleSheetContext,Be as StyleSheetManager,Xe as ThemeConsumer,Je as ThemeContext,Ke as ThemeProvider,dt as __PRIVATE__,ct as createGlobalStyle,rt as css,it as default,re as isStyledComponent,lt as keyframes,it as styled,Ze as useTheme,g as version,ut as withTheme};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("shallowequal"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}var i=/*#__PURE__*/s(t),a=/*#__PURE__*/s(n),c=/*#__PURE__*/s(o),l="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",u=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),p={},d=/invalid hook call/i,h=new Set,f=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(n).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.",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];d.test(t)?(a=!1,h.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},t.useRef(),a&&!h.has(s)&&(console.warn(s),h.add(s))}catch(e){d.test(e.message)&&h.delete(s)}finally{console.error=i}}},y=Object.freeze([]),m=Object.freeze({});function v(e,t,n){return void 0===n&&(n=m),e.theme!==n.theme&&e.theme||t||n.theme}var g=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),S=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,_=/(^-|-$)/g;function w(e){return e.replace(S,"-").replace(_,"")}var b=/(a)(d)/gi,E=function(e){return String.fromCharCode(e+(e>25?39:97))};function N(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=E(t%52)+n;return(E(t%52)+n).replace(b,"$1-$2")}var P,C=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},A=function(e){return C(5381,e)};function I(e){return N(A(e)>>>0)}function O(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function x(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var T="function"==typeof Symbol&&Symbol.for,R=T?Symbol.for("react.memo"):60115,D=T?Symbol.for("react.forward_ref"):60112,j={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},V={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M=((P={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P[R]=V,P);function F(e){return("type"in(t=e)&&t.type.$$typeof)===R?V:"$$typeof"in e?M[e.$$typeof]:j;var t}var $=Object.defineProperty,B=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,L=Object.getPrototypeOf,q=Object.prototype;function Y(e,t,n){if("string"!=typeof t){if(q){var r=L(t);r&&r!==q&&Y(e,r,n)}var o=B(t);z&&(o=o.concat(z(t)));for(var s=F(e),i=F(t),a=0;a<o.length;++a){var c=o[a];if(!(c in k||n&&n[c]||i&&c in i||s&&c in s)){var l=G(t,c);try{$(e,c,l)}catch(e){}}}}return e}function W(e){return"function"==typeof e}function H(e){return"object"==typeof e&&"styledComponentId"in e}function U(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function J(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function X(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Z(e,t,n){if(void 0===n&&(n=!1),!n&&!X(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Z(e[r],t[r]);else if(X(t))for(var r in t)e[r]=Z(e[r],t[r]);return e}var K="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"}:{};function Q(){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 ee(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(Q.apply(void 0,e.__spreadArray([K[t]],n,!1)).trim())}var te=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 ee(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ne=new Map,re=new Map,oe=1,se=function(e){if(ne.has(e))return ne.get(e);for(;re.has(oe);)oe++;var t=oe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ee(16,"".concat(t));return ne.set(e,t),re.set(t,e),t},ie=("style[".concat(l,"][").concat("data-styled-version",'="').concat("6.0.0-rc.0",'"]'),new RegExp("^".concat(l,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return re.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(l,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r});function ae(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(l))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(l,"active"),r.setAttribute("data-styled-version","6.0.0-rc.0");var i=ae();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},le=function(){function e(e){this.element=ce(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ee(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}(),ue=function(){function e(e){this.element=ce(e),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}(),pe=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(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}(),de={isServer:!0,useCSSOMInjection:!u},he=function(){function t(t,n,r){void 0===t&&(t=m),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},de),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer}return t.registerId=function(e){return se(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new pe(n):t?new le(n):new ue(n)}(this.options),new te(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(se(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(se(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return ie(this)},t}(),fe=/&/g,ye=/^\s*\/\/.*$/gm;function me(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=me(e.children,t)),e})}function ve(e){var t,n,o,s=void 0===e?m:e,i=s.options,a=void 0===i?m:i,c=s.plugins,l=void 0===c?y:c,u=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=l.slice();a.prefix&&p.unshift(r.prefixer),p.push(function(e){e.type===r.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(fe,n).replace(o,u))},r.stringify);var d=function(e,s,i,c){void 0===s&&(s=""),void 0===i&&(i=""),void 0===c&&(c="&"),t=c,n=s,o=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ye,""),u=r.compile(i||s?"".concat(i," ").concat(s," { ").concat(l," }"):l);return a.namespace&&(u=me(u,a.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(u,r.middleware(p))};return d.hash=l.length?l.reduce(function(e,t){return t.name||ee(15),C(e,t.name)},5381).toString():"",d}var ge=new he,Se=ve(),_e=i.default.createContext({shouldForwardProp:void 0,styleSheet:ge,stylis:Se}),we=_e.Consumer,be=i.default.createContext(void 0);function Ee(){return t.useContext(_e)}function Ne(e){var n=t.useState(e.stylisPlugins),r=n[0],o=n[1],s=Ee().styleSheet,c=t.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),l=t.useMemo(function(){return ve({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return t.useEffect(function(){a.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),i.default.createElement(_e.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:c,stylis:l}},i.default.createElement(be.Provider,{value:l},e.children))}var Pe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ee(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Se),this.name+e.hash},e}(),Ce=function(e){return e>="A"&&e<="Z"};function Ae(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ce(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ie=function(e){return null==e||!1===e||""===e},Oe=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ie(i)&&(Array.isArray(i)&&i.isCss||W(i)?o.push("".concat(Ae(s),":"),i,";"):X(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Oe(i),!1),["}"],!1)):o.push("".concat(Ae(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in c.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function xe(e,t,n,r){if(Ie(e))return[];if(H(e))return[".".concat(e.styledComponentId)];if(W(e)){if(!W(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Pe||X(o)||null===o||console.error("".concat(O(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.")),xe(o,t,n,r)}var s;return e instanceof Pe?n?(e.inject(n,r),[e.getName(r)]):[e]:X(e)?Oe(e):Array.isArray(e)?e.flatMap(function(e){return xe(e,t,n,r)}):[e.toString()]}function Te(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(W(n)&&!H(n))return!1}return!0}var Re=A("6.0.0-rc.0"),De=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Te(e),this.componentId=t,this.baseHash=C(Re,t),this.baseStyle=n,he.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=U(r,this.staticRulesId);else{var o=J(xe(this.rules,e,t,n)),s=N(C(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=U(r,s),this.staticRulesId=s}else{for(var a=C(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=C(a,u));else if(u){var p=J(xe(u,e,t,n));a=C(a,p),c+=p}}if(c){var d=N(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=U(r,d)}}return r},e}(),je=i.default.createContext(void 0),ke=je.Consumer;function Ve(){return t.useContext(je)}var Me={};function Fe(n,r,o){var s=H(n),a=n,c=!x(n),l=r.attrs,u=void 0===l?y:l,p=r.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":w(e);Me[n]=(Me[n]||0)+1;var r="".concat(n,"-").concat(I("6.0.0-rc.0"+n+Me[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,h=r.displayName,S=void 0===h?function(e){return x(e)?"styled.".concat(e):"Styled(".concat(O(e),")")}(n):h,_=r.displayName&&r.componentId?"".concat(w(r.displayName),"-").concat(r.componentId):r.componentId||d,b=s&&a.attrs?a.attrs.concat(u).filter(Boolean):u,E=r.shouldForwardProp;if(s&&a.shouldForwardProp){var N=a.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;E=function(e,t){return N(e,t)&&P(e,t)}}else E=N}var C=new De(o,_,s?a.componentStyle:void 0),A=C.isStatic&&0===u.length;function T(n,r){return function(n,r,o,s){var i=n.attrs,a=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,p=n.target,d=Ve(),h=Ee(),f=n.shouldForwardProp||h.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue(u);var y=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=W(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?U(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=U(s.className,n.className)),s}(i,r,v(r,d,c)||m),S=y.as||p,_={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?_.as=y.forwardedAs:f&&!f(w,S)||(_[w]=y[w]));var b=function(e,n,r){var o=Ee(),s=e.generateAndInjectStyles(n?m:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&t.useDebugValue(s),s}(a,s,y);"production"!==process.env.NODE_ENV&&!s&&n.warnTooManyClasses&&n.warnTooManyClasses(b);var E=U(l,u);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),_[x(S)&&!g.has(S)?"class":"className"]=E,_.ref=o,t.createElement(S,_)}(R,n,r,A)}T.displayName=S;var R=i.default.forwardRef(T);return R.attrs=b,R.componentStyle=C,R.displayName=S,R.shouldForwardProp=E,R.foldedComponentIds=s?U(a.foldedComponentIds,a.styledComponentId):"",R.styledComponentId=_,R.target=s?a.target:n,Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)Z(e,o[r],!0);return e}({},a.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(f(S,_),R.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={}}}}(S,_)),Object.defineProperty(R,"toString",{value:function(){return".".concat(R.styledComponentId)}}),c&&Y(R,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),R}function $e(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 Be=function(e){return Object.assign(e,{isCss:!0})};function ze(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(W(t)||X(t)){var o=t;return Be(xe($e(y,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?xe(s):Be(xe($e(s,n)))}function Ge(t,n,r){if(void 0===r&&(r=m),!n)throw ee(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ze.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Ge(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ge(t,n,e.__assign(e.__assign({},r),o))},o}var Le=function(e){return Ge(Fe,e)},qe=Le;g.forEach(function(e){qe[e]=Le(e)});var Ye=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Te(e),he.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(J(xe(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&he.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),We=/^\s*<\/[a-z]/i,He=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ae(),r=J([n&&'nonce="'.concat(n,'"'),"".concat(l,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.0",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ee(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ee(2);var r=((n={})[l]="",n["data-styled-version"]="6.0.0-rc.0",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ae();return o&&(r.nonce=o),[i.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new he({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ee(2);return i.default.createElement(Ne,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){if(this.sealed)throw ee(2);this.seal();var t=require("stream").Transform,n=e,r=this.instance,o=this._emitSheetCSS,s=new t({transform:function(e,t,n){var s=e.toString(),i=o();if(r.clearTag(),We.test(s)){var a=s.indexOf(">")+1,c=s.slice(0,a),l=s.slice(a);this.push(c+i+l)}else this.push(i+s);n()}});return n.on("error",function(e){s.emit("error",e)}),n.pipe(s)},t}(),Ue={StyleSheet:he,mainSheet:ge};"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"),"__sc-".concat(l,"__"),"production"!==process.env.NODE_ENV&&process,exports.ServerStyleSheet=He,exports.StyleSheetConsumer=we,exports.StyleSheetContext=_e,exports.StyleSheetManager=Ne,exports.ThemeConsumer=ke,exports.ThemeContext=je,exports.ThemeProvider=function(n){var r=Ve(),o=t.useMemo(function(){return function(t,n){if(!t)throw ee(14);if(W(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ee(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ee(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?i.default.createElement(je.Provider,{value:o},n.children):null},exports.__PRIVATE__=Ue,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=ze.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(I(JSON.stringify(o))),a=new Ye(o,s);"production"!==process.env.NODE_ENV&&f(s);var c=function(e){var t=Ee(),n=Ve(),r=i.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&i.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.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."),t.styleSheet.server&&l(r,e,t.styleSheet,n,t.stylis),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,p,r,s);else{var i=e.__assign(e.__assign({},n),{theme:v(n,o,c.defaultProps)});a.renderStyles(t,i,r,s)}}return i.default.memo(c)},exports.css=ze,exports.default=qe,exports.isStyledComponent=H,exports.keyframes=function(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=J(ze.apply(void 0,e.__spreadArray([t],n,!1))),s=I(o);return new Pe(s,o)},exports.styled=qe,exports.useTheme=Ve,exports.version="6.0.0-rc.0",exports.withTheme=function(t){var n=i.default.forwardRef(function(n,r){var o=v(n,Ve(),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(O(t),'"')),i.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(O(t),")"),Y(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("shallowequal"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}var i=/*#__PURE__*/s(t),a=/*#__PURE__*/s(n),c=/*#__PURE__*/s(o),l="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",u=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),p={},d=/invalid hook call/i,h=new Set,f=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(n).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.",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];d.test(t)?(a=!1,h.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},t.useRef(),a&&!h.has(s)&&(console.warn(s),h.add(s))}catch(e){d.test(e.message)&&h.delete(s)}finally{console.error=i}}},y=Object.freeze([]),m=Object.freeze({});function v(e,t,n){return void 0===n&&(n=m),e.theme!==n.theme&&e.theme||t||n.theme}var g=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),S=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,_=/(^-|-$)/g;function w(e){return e.replace(S,"-").replace(_,"")}var b=/(a)(d)/gi,E=function(e){return String.fromCharCode(e+(e>25?39:97))};function N(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=E(t%52)+n;return(E(t%52)+n).replace(b,"$1-$2")}var P,C=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},A=function(e){return C(5381,e)};function I(e){return N(A(e)>>>0)}function O(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function x(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var T="function"==typeof Symbol&&Symbol.for,R=T?Symbol.for("react.memo"):60115,D=T?Symbol.for("react.forward_ref"):60112,j={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},k={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},V={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M=((P={})[D]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P[R]=V,P);function F(e){return("type"in(t=e)&&t.type.$$typeof)===R?V:"$$typeof"in e?M[e.$$typeof]:j;var t}var $=Object.defineProperty,B=Object.getOwnPropertyNames,z=Object.getOwnPropertySymbols,G=Object.getOwnPropertyDescriptor,L=Object.getPrototypeOf,q=Object.prototype;function Y(e,t,n){if("string"!=typeof t){if(q){var r=L(t);r&&r!==q&&Y(e,r,n)}var o=B(t);z&&(o=o.concat(z(t)));for(var s=F(e),i=F(t),a=0;a<o.length;++a){var c=o[a];if(!(c in k||n&&n[c]||i&&c in i||s&&c in s)){var l=G(t,c);try{$(e,c,l)}catch(e){}}}}return e}function W(e){return"function"==typeof e}function H(e){return"object"==typeof e&&"styledComponentId"in e}function U(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function J(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function X(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Z(e,t,n){if(void 0===n&&(n=!1),!n&&!X(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Z(e[r],t[r]);else if(X(t))for(var r in t)e[r]=Z(e[r],t[r]);return e}var K="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"}:{};function Q(){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 ee(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(Q.apply(void 0,e.__spreadArray([K[t]],n,!1)).trim())}var te=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return 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 ee(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=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},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)}},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+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ne=new Map,re=new Map,oe=1,se=function(e){if(ne.has(e))return ne.get(e);for(;re.has(oe);)oe++;var t=oe++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ee(16,"".concat(t));return ne.set(e,t),re.set(t,e),t},ie=("style[".concat(l,"][").concat("data-styled-version",'="').concat("6.0.0-rc.1",'"]'),new RegExp("^".concat(l,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return re.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(l,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r});function ae(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ce=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(l))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(l,"active"),r.setAttribute("data-styled-version","6.0.0-rc.1");var i=ae();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},le=function(){function e(e){this.element=ce(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ee(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}(),ue=function(){function e(e){this.element=ce(e),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}(),pe=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(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}(),de={isServer:!0,useCSSOMInjection:!u},he=function(){function t(t,n,r){void 0===t&&(t=m),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},de),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer}return t.registerId=function(e){return se(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new pe(n):t?new le(n):new ue(n)}(this.options),new te(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(se(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(se(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return ie(this)},t}(),fe=/&/g,ye=/^\s*\/\/.*$/gm;function me(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=me(e.children,t)),e})}function ve(e){var t,n,o,s=void 0===e?m:e,i=s.options,a=void 0===i?m:i,c=s.plugins,l=void 0===c?y:c,u=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=l.slice();a.prefix&&p.unshift(r.prefixer),p.push(function(e){e.type===r.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(fe,n).replace(o,u))},r.stringify);var d=function(e,s,i,c){void 0===s&&(s=""),void 0===i&&(i=""),void 0===c&&(c="&"),t=c,n=s,o=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ye,""),u=r.compile(i||s?"".concat(i," ").concat(s," { ").concat(l," }"):l);return a.namespace&&(u=me(u,a.namespace)),function(e,t){for(var n=[],r=0,o=void 0;r<e.length;r+=1)(o=t(e[r],r,e,t))&&n.push(o);return n}(u,r.middleware(p))};return d.hash=l.length?l.reduce(function(e,t){return t.name||ee(15),C(e,t.name)},5381).toString():"",d}var ge=new he,Se=ve(),_e=i.default.createContext({shouldForwardProp:void 0,styleSheet:ge,stylis:Se}),we=_e.Consumer,be=i.default.createContext(void 0);function Ee(){return t.useContext(_e)}function Ne(e){var n=t.useState(e.stylisPlugins),r=n[0],o=n[1],s=Ee().styleSheet,c=t.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),l=t.useMemo(function(){return ve({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return t.useEffect(function(){a.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),i.default.createElement(_e.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:c,stylis:l}},i.default.createElement(be.Provider,{value:l},e.children))}var Pe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw ee(12,String(n.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Se),this.name+e.hash},e}(),Ce=function(e){return e>="A"&&e<="Z"};function Ae(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ce(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ie=function(e){return null==e||!1===e||""===e},Oe=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ie(i)&&(Array.isArray(i)&&i.isCss||W(i)?o.push("".concat(Ae(s),":"),i,";"):X(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Oe(i),!1),["}"],!1)):o.push("".concat(Ae(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in c.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function xe(e,t,n,r){if(Ie(e))return[];if(H(e))return[".".concat(e.styledComponentId)];if(W(e)){if(!W(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Pe||X(o)||null===o||console.error("".concat(O(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.")),xe(o,t,n,r)}var s;return e instanceof Pe?n?(e.inject(n,r),[e.getName(r)]):[e]:X(e)?Oe(e):Array.isArray(e)?e.flatMap(function(e){return xe(e,t,n,r)}):[e.toString()]}function Te(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(W(n)&&!H(n))return!1}return!0}var Re=A("6.0.0-rc.1"),De=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Te(e),this.componentId=t,this.baseHash=C(Re,t),this.baseStyle=n,he.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=U(r,this.staticRulesId);else{var o=J(xe(this.rules,e,t,n)),s=N(C(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=U(r,s),this.staticRulesId=s}else{for(var a=C(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=C(a,u));else if(u){var p=J(xe(u,e,t,n));a=C(a,p),c+=p}}if(c){var d=N(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=U(r,d)}}return r},e}(),je=i.default.createContext(void 0),ke=je.Consumer;function Ve(){return t.useContext(je)}var Me={};function Fe(n,r,o){var s=H(n),a=n,c=!x(n),l=r.attrs,u=void 0===l?y:l,p=r.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":w(e);Me[n]=(Me[n]||0)+1;var r="".concat(n,"-").concat(I("6.0.0-rc.1"+n+Me[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):p,h=r.displayName,S=void 0===h?function(e){return x(e)?"styled.".concat(e):"Styled(".concat(O(e),")")}(n):h,_=r.displayName&&r.componentId?"".concat(w(r.displayName),"-").concat(r.componentId):r.componentId||d,b=s&&a.attrs?a.attrs.concat(u).filter(Boolean):u,E=r.shouldForwardProp;if(s&&a.shouldForwardProp){var N=a.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;E=function(e,t){return N(e,t)&&P(e,t)}}else E=N}var C=new De(o,_,s?a.componentStyle:void 0),A=C.isStatic&&0===u.length;function T(n,r){return function(n,r,o,s){var i=n.attrs,a=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,p=n.target,d=Ve(),h=Ee(),f=n.shouldForwardProp||h.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue(u);var y=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=W(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?U(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=U(s.className,n.className)),s}(i,r,v(r,d,c)||m),S=y.as||p,_={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?_.as=y.forwardedAs:f&&!f(w,S)||(_[w]=y[w]));var b=function(e,n,r){var o=Ee(),s=e.generateAndInjectStyles(n?m:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&t.useDebugValue(s),s}(a,s,y);"production"!==process.env.NODE_ENV&&!s&&n.warnTooManyClasses&&n.warnTooManyClasses(b);var E=U(l,u);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),_[x(S)&&!g.has(S)?"class":"className"]=E,_.ref=o,t.createElement(S,_)}(R,n,r,A)}T.displayName=S;var R=i.default.forwardRef(T);return R.attrs=b,R.componentStyle=C,R.displayName=S,R.shouldForwardProp=E,R.foldedComponentIds=s?U(a.foldedComponentIds,a.styledComponentId):"",R.styledComponentId=_,R.target=s?a.target:n,Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?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++)Z(e,o[r],!0);return e}({},a.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(f(S,_),R.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={}}}}(S,_)),Object.defineProperty(R,"toString",{value:function(){return".".concat(R.styledComponentId)}}),c&&Y(R,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),R}function $e(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 Be=function(e){return Object.assign(e,{isCss:!0})};function ze(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(W(t)||X(t)){var o=t;return Be(xe($e(y,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?xe(s):Be(xe($e(s,n)))}function Ge(t,n,r){if(void 0===r&&(r=m),!n)throw ee(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ze.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Ge(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ge(t,n,e.__assign(e.__assign({},r),o))},o}var Le=function(e){return Ge(Fe,e)},qe=Le;g.forEach(function(e){qe[e]=Le(e)});var Ye=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Te(e),he.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(J(xe(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&he.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),We=/^\s*<\/[a-z]/i,He=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ae(),r=J([n&&'nonce="'.concat(n,'"'),"".concat(l,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.1",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ee(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ee(2);var r=((n={})[l]="",n["data-styled-version"]="6.0.0-rc.1",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ae();return o&&(r.nonce=o),[i.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new he({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ee(2);return i.default.createElement(Ne,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){if(this.sealed)throw ee(2);this.seal();var t=require("stream").Transform,n=e,r=this.instance,o=this._emitSheetCSS,s=new t({transform:function(e,t,n){var s=e.toString(),i=o();if(r.clearTag(),We.test(s)){var a=s.indexOf(">")+1,c=s.slice(0,a),l=s.slice(a);this.push(c+i+l)}else this.push(i+s);n()}});return n.on("error",function(e){s.emit("error",e)}),n.pipe(s)},t}(),Ue={StyleSheet:he,mainSheet:ge};"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"),"__sc-".concat(l,"__"),"production"!==process.env.NODE_ENV&&process,exports.ServerStyleSheet=He,exports.StyleSheetConsumer=we,exports.StyleSheetContext=_e,exports.StyleSheetManager=Ne,exports.ThemeConsumer=ke,exports.ThemeContext=je,exports.ThemeProvider=function(n){var r=Ve(),o=t.useMemo(function(){return function(t,n){if(!t)throw ee(14);if(W(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ee(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ee(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?i.default.createElement(je.Provider,{value:o},n.children):null},exports.__PRIVATE__=Ue,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=ze.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(I(JSON.stringify(o))),a=new Ye(o,s);"production"!==process.env.NODE_ENV&&f(s);var c=function(e){var t=Ee(),n=Ve(),r=i.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&i.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.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."),t.styleSheet.server&&l(r,e,t.styleSheet,n,t.stylis),null};function l(t,n,r,o,s){if(a.isStatic)a.renderStyles(t,p,r,s);else{var i=e.__assign(e.__assign({},n),{theme:v(n,o,c.defaultProps)});a.renderStyles(t,i,r,s)}}return i.default.memo(c)},exports.css=ze,exports.default=qe,exports.isStyledComponent=H,exports.keyframes=function(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=J(ze.apply(void 0,e.__spreadArray([t],n,!1))),s=I(o);return new Pe(s,o)},exports.styled=qe,exports.useTheme=Ve,exports.version="6.0.0-rc.1",exports.withTheme=function(t){var n=i.default.forwardRef(function(n,r){var o=v(n,Ve(),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(O(t),'"')),i.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(O(t),")"),Y(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.cjs.js.map
|