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