styled-components 6.0.0-alpha.6 → 6.0.0-beta.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/README.md +2 -2
- package/dist/models/ComponentStyle.d.ts +1 -0
- package/dist/styled-components-macro.cjs.js +1 -1
- package/dist/styled-components-macro.cjs.js.map +1 -1
- package/dist/styled-components-macro.esm.js +1 -1
- package/dist/styled-components-macro.esm.js.map +1 -1
- package/dist/styled-components.browser.cjs.js +1 -1
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +1 -1
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +1 -1
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +1 -1
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +1 -1
- 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/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/stylis.d.ts +2 -1
- package/native/dist/models/ComponentStyle.d.ts +1 -0
- package/native/dist/styled-components.native.cjs.js +439 -400
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +440 -401
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/types.d.ts +1 -1
- package/native/dist/utils/stylis.d.ts +2 -1
- package/package.json +12 -11
- package/test-utils/setupTestFramework.ts +9 -3
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ The `main` branch is under development of the upcoming v6 major version of style
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Utilizing [tagged template literals](https://www.styled-components.com/docs/advanced#tagged-template-literals) (a recent addition to JavaScript) and the [power of CSS](https://www.styled-components.com/docs/api#supported-css), `styled-components` allow you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!
|
|
30
30
|
|
|
31
31
|
```jsx
|
|
32
32
|
const Button = styled.button`
|
|
@@ -130,7 +130,7 @@ If you wish to provide configuration options to the babel plugin similar to how
|
|
|
130
130
|
|
|
131
131
|
## Built with `styled-components`
|
|
132
132
|
|
|
133
|
-
A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There
|
|
133
|
+
A lot of hard work goes into community libraries, projects, and guides. A lot of them make it easier to get started or help you with your next project! There are also a whole lot of interesting apps and sites that people have built using styled-components.
|
|
134
134
|
|
|
135
135
|
Make sure to head over to [awesome-styled-components](https://github.com/styled-components/awesome-styled-components) to see them all! And please contribute and add your own work to the list so others can find it.
|
|
136
136
|
|
|
@@ -8,6 +8,7 @@ export default class ComponentStyle {
|
|
|
8
8
|
baseStyle: ComponentStyle | null | undefined;
|
|
9
9
|
componentId: string;
|
|
10
10
|
isStatic: boolean;
|
|
11
|
+
names: string[];
|
|
11
12
|
rules: RuleSet<any>;
|
|
12
13
|
staticRulesId: string;
|
|
13
14
|
constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/helper-module-imports"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@babel/helper-module-imports"),a=require("@babel/traverse"),o=require("babel-plugin-macros"),r=require("babel-plugin-styled-components");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=/*#__PURE__*/n(a),i=/*#__PURE__*/n(r),l=o.createMacro(function(a){var o,r=a.references,n=a.state,l=a.babel.types,u=a.config,d=void 0===u?{}:u,p=d.importModuleName,c=void 0===p?"styled-components":p,m=e.__rest(d,["importModuleName"]),f=n.file.path;Object.keys(r).forEach(function(e){var a;"default"===e?(a=t.addDefault(f,c,{nameHint:"styled"}),o=a):a=t.addNamed(f,e,c,{nameHint:e}),r[e].forEach(function(e){e.node.name=a.name})});var b=e.__assign(e.__assign({},n),{opts:e.__assign(e.__assign({},m),{topLevelImportPaths:(m.topLevelImportPaths||[]).concat(c)}),customImportName:o});s.default(f.parent,i.default({types:l}).visitor,void 0,b)},{configName:"styledComponents"});exports.default=l;
|
|
2
2
|
//# sourceMappingURL=styled-components-macro.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled-components-macro.cjs.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n // eslint-disable-next-line no-param-reassign\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n configName: 'styledComponents',\n});\n"],"names":["createMacro","references","state","babel","types","
|
|
1
|
+
{"version":3,"file":"styled-components-macro.cjs.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n // eslint-disable-next-line no-param-reassign\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n configName: 'styledComponents',\n});\n"],"names":["createMacro","_a","customImportName","references","state","t","babel","types","_b","config","_c","_d","importModuleName","__rest","program","file","path","Object","keys","forEach","refName","id","addDefault","nameHint","addNamed","referencePath","node","name","stateWithOpts","__assign","opts","topLevelImportPaths","concat","traverse","parent","babelPlugin","visitor","undefined","configName"],"mappings":"mWA+CeA,EAAAA,EAAAA,YAzCf,SAA+BC,GAC7B,IAUIC,EAVJC,EAAUF,EAAAE,WACVC,EAAKH,EAAAG,MACWC,EAACJ,EAAAK,MAAAC,MACjBC,EAAAP,EAAAQ,OAAAC,OAAA,IAAAF,EAAgE,GAAEA,EAAxDG,EAAsCD,EAAAE,iBAAtCA,OAAgB,IAAAD,EAAG,oBAAmBA,EAAKF,EAA7CI,EAAAA,OAAAH,EAAA,CAAA,qBAEFI,EAAUV,EAAMW,KAAKC,KAM3BC,OAAOC,KAAKf,GAAYgB,QAAQ,SAAAC,GAE9B,IAAIC,EACY,YAAZD,GACFC,EAAKC,EAAUA,WAACR,EAASF,EAAkB,CAAEW,SAAU,WACvDrB,EAAmBmB,GAEnBA,EAAKG,EAAAA,SAASV,EAASM,EAASR,EAAkB,CAAEW,SAAUH,IAIhEjB,EAAWiB,GAASD,QAAQ,SAAAM,GAEzBA,EAAcC,KAA0BC,KAAON,EAAGM,SAKvD,IAAMC,EACDC,EAAAA,SAAAA,EAAAA,SAAA,GAAAzB,GACH,CAAA0B,KACKD,EAAAA,SAAAA,EAAAA,SAAA,GAAApB,GACH,CAAAsB,qBAAsBtB,EAAOsB,qBAAuB,IAAIC,OAAOpB,KAEjEV,iBAAgBA,IAElB+B,EAAAA,QAASnB,EAAQoB,OAAQC,EAAAA,QAAY,CAAE5B,MAAOF,IAAK+B,aAASC,EAAWT,IAGvB,CAChDU,WAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__rest as e,__assign as o}from"tslib";import{addDefault as t,addNamed as r}from"@babel/helper-module-imports";import a from"@babel/traverse";import{createMacro as m}from"babel-plugin-macros";import n from"babel-plugin-styled-components";var p=m(function(m){var p,i=m.references,s=m.state,l=m.babel.types,f=m.config,c=void 0===f?{}:f,d=c.importModuleName,b=void 0===d?"styled-components":d,u=e(c,["importModuleName"]),v=s.file.path;Object.keys(i).forEach(function(e){var o;"default"===e?(o=t(v,b,{nameHint:"styled"}),p=o):o=r(v,e,b,{nameHint:e}),i[e].forEach(function(e){e.node.name=o.name})});var y=o(o({},s),{opts:o(o({},u),{topLevelImportPaths:(u.topLevelImportPaths||[]).concat(b)}),customImportName:p});a(v.parent,n({types:l}).visitor,void 0,y)},{configName:"styledComponents"});export{p as default};
|
|
2
2
|
//# sourceMappingURL=styled-components-macro.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled-components-macro.esm.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n // eslint-disable-next-line no-param-reassign\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n configName: 'styledComponents',\n});\n"],"names":["index","createMacro","references","state","babel","types","
|
|
1
|
+
{"version":3,"file":"styled-components-macro.esm.js","sources":["../src/macro/index.ts"],"sourcesContent":["import { types } from '@babel/core';\nimport { addDefault, addNamed } from '@babel/helper-module-imports';\nimport traverse from '@babel/traverse';\nimport { createMacro, MacroParams } from 'babel-plugin-macros';\nimport babelPlugin from 'babel-plugin-styled-components';\n\nfunction styledComponentsMacro({\n references,\n state,\n babel: { types: t },\n config: { importModuleName = 'styled-components', ...config } = {},\n}: MacroParams) {\n const program = state.file.path;\n\n // FIRST STEP : replace `styled-components/macro` by `styled-components\n // references looks like this\n // { default: [path, path], css: [path], ... }\n let customImportName;\n Object.keys(references).forEach(refName => {\n // generate new identifier\n let id: types.Identifier;\n if (refName === 'default') {\n id = addDefault(program, importModuleName, { nameHint: 'styled' });\n customImportName = id;\n } else {\n id = addNamed(program, refName, importModuleName, { nameHint: refName });\n }\n\n // update references with the new identifiers\n references[refName].forEach(referencePath => {\n // eslint-disable-next-line no-param-reassign\n (referencePath.node as types.Identifier).name = id.name;\n });\n });\n\n // SECOND STEP : apply babel-plugin-styled-components to the file\n const stateWithOpts = {\n ...state,\n opts: {\n ...config,\n topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName),\n },\n customImportName,\n };\n traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts);\n}\n\nexport default createMacro(styledComponentsMacro, {\n configName: 'styledComponents',\n});\n"],"names":["index","createMacro","_a","customImportName","references","state","t","babel","types","_b","config","_c","_d","importModuleName","__rest","program","file","path","Object","keys","forEach","refName","id","addDefault","nameHint","addNamed","referencePath","node","name","stateWithOpts","__assign","opts","topLevelImportPaths","concat","traverse","parent","babelPlugin","visitor","undefined","configName"],"mappings":"oPA+CA,IAAeA,EAAAC,EAzCf,SAA+BC,GAC7B,IAUIC,EAVJC,EAAUF,EAAAE,WACVC,EAAKH,EAAAG,MACWC,EAACJ,EAAAK,MAAAC,MACjBC,EAAAP,EAAAQ,OAAAC,OAAA,IAAAF,EAAgE,GAAEA,EAAxDG,EAAsCD,EAAAE,iBAAtCA,OAAgB,IAAAD,EAAG,oBAAmBA,EAAKF,EAA7CI,EAAAH,EAAA,CAAA,qBAEFI,EAAUV,EAAMW,KAAKC,KAM3BC,OAAOC,KAAKf,GAAYgB,QAAQ,SAAAC,GAE9B,IAAIC,EACY,YAAZD,GACFC,EAAKC,EAAWR,EAASF,EAAkB,CAAEW,SAAU,WACvDrB,EAAmBmB,GAEnBA,EAAKG,EAASV,EAASM,EAASR,EAAkB,CAAEW,SAAUH,IAIhEjB,EAAWiB,GAASD,QAAQ,SAAAM,GAEzBA,EAAcC,KAA0BC,KAAON,EAAGM,SAKvD,IAAMC,EACDC,EAAAA,EAAA,GAAAzB,GACH,CAAA0B,KACKD,EAAAA,EAAA,GAAApB,GACH,CAAAsB,qBAAsBtB,EAAOsB,qBAAuB,IAAIC,OAAOpB,KAEjEV,iBAAgBA,IAElB+B,EAASnB,EAAQoB,OAAQC,EAAY,CAAE5B,MAAOF,IAAK+B,aAASC,EAAWT,IAGvB,CAChDU,WAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/is-prop-valid"),t=require("react"),n=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e),a=r(t),l=r(n),c=r(s);const u="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="undefined"!=typeof window&&"HTMLElement"in window,h=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.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={},m=/invalid hook call/i,f=new Set,y=(e,n)=>{if("production"!==process.env.NODE_ENV){const o=`The component ${e}${n?` with the id of "${n}"`:""} has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{m.test(t)?(e=!1,f.delete(o)):s(t,...n)},t.useRef(),e&&!f.has(o)&&(console.warn(o),f.add(o))}catch(e){m.test(e.message)&&f.delete(o)}finally{console.error=s}}},g=Object.freeze([]),S=Object.freeze({});function v(e,t,n=S){return e.theme!==n.theme&&e.theme||t||n.theme}var w=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];const b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}const _=/(a)(d)/gi,C=e=>String.fromCharCode(e+(e>25?39:97));function $(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(_,"$1-$2")}const P=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},A=e=>P(5381,e);function I(e){return $(A(e)>>>0)}function x(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function O(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function R(e){return O(e)?`styled.${e}`:`Styled(${x(e)})`}const D="function"==typeof Symbol&&Symbol.for,T=D?Symbol.for("react.memo"):60115,j=D?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},z={[j]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[T]:M};function B(e){return("type"in(t=e)&&t.type.$$typeof)===T?M:"$$typeof"in e?z[e.$$typeof]:k;var t}const L=Object.defineProperty,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,q=Object.getOwnPropertyDescriptor,Y=Object.getPrototypeOf,H=Object.prototype;function W(e,t,n){if("string"!=typeof t){if(H){const o=Y(t);o&&o!==H&&W(e,o,n)}let o=G(t);F&&(o=o.concat(F(t)));const s=B(e),r=B(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in V||n&&n[a]||r&&a in r||s&&a in s)){const n=q(t,a);try{L(e,a,n)}catch(e){}}}}return e}function U(e){return"object"==typeof e&&"styledComponentId"in e}function J(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function X(e,t,n=!1){if(!n&&!J(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=X(e[n],t[n]);else if(J(t))for(const n in t)e[n]=X(e[n],t[n]);return e}const Z="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 K(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}(Z[e],...t).trim())}let Q=new Map,ee=new Map,te=1;const ne=e=>{if(Q.has(e))return Q.get(e);for(;ee.has(te);)te++;const t=te++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw K(16,`${t}`);return Q.set(e,t),ee.set(t,e),t},oe=e=>ee.get(e),se=(e,t)=>{Q.set(e,t),ee.set(t,e)},re=`style[${u}][data-styled-version="6.0.0-alpha.6"]`,ie=new RegExp(`^${u}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),ae=(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)},le=(e,t)=>{const n=(t.textContent??"").split("/*!sc*/\n"),o=[];for(let t=0,s=n.length;t<s;t++){const s=n[t].trim();if(!s)continue;const r=s.match(ie);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(se(n,t),ae(e,n,r[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(s)}};function ce(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}const ue=e=>{const t=document.head,n=e||t,o=document.createElement("style"),s=(e=>{const{childNodes:t}=e;for(let e=t.length;e>=0;e--){const n=t[e];if(n&&1===n.nodeType&&n.hasAttribute(u))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(u,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.6");const i=ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o};let de=d;const he={isServer:!d,useCSSOMInjection:!h};class pe{gs;names;options;server;tag;static registerId(e){return ne(e)}constructor(e=S,t={},n){this.options={...he,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&d&&de&&(de=!1,(e=>{const t=document.querySelectorAll(re);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&"active"!==o.getAttribute(u)&&(le(e,o),o.parentNode&&o.parentNode.removeChild(o))}})(this))}reconstructWithOptions(e,t=!0){return new pe({...this.options,...e},this.gs,t&&this.names||void 0)}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n})=>e?new class{rules;length;constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(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]:""}}(n):t?new class{element;sheet;length;constructor(e){const t=this.element=ue(e);t.appendChild(document.createTextNode("")),this.sheet=(e=>{if(e.sheet)return e.sheet;const{styleSheets:t}=document;for(let n=0,o=t.length;n<o;n++){const o=t[n];if(o.ownerNode===e)return o}throw K(17)})(t),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 void 0!==t&&"string"==typeof t.cssText?t.cssText:""}}(n):new class{element;nodes;length;constructor(e){const t=this.element=ue(e);this.nodes=t.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(n,o||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:""}}(n))(this.options),new class{groupSizes;length;tag;constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}indexOfGroup(e){let t=0;for(let n=0;n<e;n++)t+=this.groupSizes[n];return 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 K(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);if(Array.isArray(t))for(let o=0,s=t.length;o<s;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++);else this.tag.insertRule(n,t)&&this.groupSizes[e]++}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)}}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)}/*!sc*/\n`;return t}}(e)));var e}hasNameForId(e,t){return this.names.has(e)&&this.names.get(e).has(t)}registerName(e,t){if(ne(e),this.names.has(e))this.names.get(e).add(t);else{const n=new Set;n.add(t),this.names.set(e,n)}}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(ne(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(ne(e)),this.clearNames(e)}clearTag(){this.tag=void 0}toString(){return(e=>{const t=e.getTag(),{length:n}=t;let o="";for(let s=0;s<n;s++){const n=oe(s);if(void 0===n)continue;const r=e.names.get(n),i=t.getGroup(s);if(void 0===r||0===i.length)continue;const a=`${u}.g${s}[id="${n}"]`;let l="";void 0!==r&&r.forEach((e=>{e.length>0&&(l+=`${e},`)})),o+=`${i}${a}{content:"${l}"}/*!sc*/\n`}return o})(this)}}const me=/^\s*\/\/.*$/gm,fe=[":","[",".","#"];function ye({options:e=S,plugins:t=g}=S){let n,s,r,i;const a=(e,t,o)=>0===t&&fe.includes(o[s.length])||o.match(i)?e:`.${n}`,l=e=>{if(e.type===o.RULESET&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(r,a)}},c=(a,c="",u="",d="&")=>{let h=a.replace(me,"");n=d,s=c,r=new RegExp(`\\${s}\\b`,"g"),i=new RegExp(`(\\${s}\\b){2,}`);const p=t.slice();return(e.prefix||void 0===e.prefix)&&p.unshift(o.prefixer),p.push(l,o.stringify),o.serialize(o.compile(u||c?`${u} ${c} { ${h} }`:h),o.middleware(p))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||K(15),P(e,t.name))),5381).toString():"",c}const ge=a.default.createContext(void 0),Se=ge.Consumer,ve=a.default.createContext(void 0);ve.Consumer;const we=new pe,be=ye();function Ee(){return t.useContext(ge)||we}function Ne(){return t.useContext(ve)||be}function _e(e){const[n,o]=t.useState(e.stylisPlugins),s=Ee(),r=t.useMemo((()=>{let 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]),i=t.useMemo((()=>ye({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return t.useEffect((()=>{l.default(n,e.stylisPlugins)||o(e.stylisPlugins)}),[e.stylisPlugins]),a.default.createElement(ge.Provider,{value:r},a.default.createElement(ve.Provider,{value:i},"production"!==process.env.NODE_ENV?a.default.Children.only(e.children):e.children))}class Ce{id;name;rules;constructor(e,t){this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t}inject=(e,t=be)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw K(12,String(this.name))};getName(e=be){return this.name+e.hash}}const $e=/([A-Z])/,Pe=/([A-Z])/g,Ae=/^ms-/,Ie=e=>`-${e.toLowerCase()}`;function xe(e){return $e.test(e)?e.replace(Pe,Ie).replace(Ae,"-ms-"):e}function Oe(e){return"function"==typeof e}const Re=e=>null==e||!1===e||""===e,De=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!Re(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Oe(e[t])?n.push(`${xe(t)}:`,e[t],";"):J(e[t])?n.push(...De(e[t],t)):n.push(`${xe(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in c.default?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function Te(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=Te(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(Re(e))return"";if(U(e))return`.${e.styledComponentId}`;if(Oe(e)){if("function"!=typeof(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return e;{const s=e,r=s(t);return"production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ce||J(r)||console.error(`${x(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.`),Te(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:J(e)?De(e):e.toString()}function je(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Oe(n)&&!U(n))return!1}return!0}const ke=A("6.0.0-alpha.6");class Ve{baseHash;baseStyle;componentId;isStatic;rules;staticRulesId;constructor(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&je(e),this.componentId=t,this.baseHash=P(ke,t),this.baseStyle=n,pe.registerId(t)}generateAndInjectStyles(e,t,n){const{componentId:o}=this,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{const r=Te(this.rules,e,t,n).join(""),i=$(P(this.baseHash,r)>>>0);if(!t.hasNameForId(o,i)){const e=n(r,`.${i}`,void 0,o);t.insertRules(o,i,e)}s.push(i),this.staticRulesId=i}else{const{length:r}=this.rules;let i=P(this.baseHash,n.hash),a="";for(let o=0;o<r;o++){const s=this.rules[o];if("string"==typeof s)a+=s,"production"!==process.env.NODE_ENV&&(i=P(i,s+o));else if(s){const r=Te(s,e,t,n),l=Array.isArray(r)?r.join(""):r;i=P(i,l+o),a+=l}}if(a){const e=$(i>>>0);if(!t.hasNameForId(o,e)){const s=n(a,`.${e}`,void 0,o);t.insertRules(o,e,s)}s.push(e)}}return s.join(" ")}}const Me=a.default.createContext(void 0),ze=Me.Consumer,Be={};function Le(e,t){const n="string"!=typeof e?"sc":N(e);Be[n]=(Be[n]||0)+1;const o=`${n}-${I("6.0.0-alpha.6"+n+Be[n])}`;return t?`${t}-${o}`:o}function Ge(e,n,o){const s=U(e),r=e,l=!O(e),{attrs:c=g,componentId:u=Le(n.displayName,n.parentComponentId),displayName:d=R(e)}=n,h=n.displayName&&n.componentId?`${N(n.displayName)}-${n.componentId}`:n.componentId||u,p=s&&r.attrs?r.attrs.concat(c).filter(Boolean):c;let{shouldForwardProp:m}=n;if(s&&r.shouldForwardProp){const e=r.shouldForwardProp;if(n.shouldForwardProp){const t=n.shouldForwardProp;m=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else m=e}const f=new Ve(o,h,s?r.componentStyle:void 0),b=f.isStatic&&0===c.length;function E(e,n){return function(e,n,o,s){const{attrs:r,componentStyle:a,defaultProps:l,foldedComponentIds:c,shouldForwardProp:u,styledComponentId:d,target:h}=e;"production"!==process.env.NODE_ENV&&t.useDebugValue(d);const p=v(n,t.useContext(Me),l),[m,f]=function(e=S,t,n){const o={...t,theme:e},s={};return n.forEach((e=>{const t="function"==typeof e?e(o):e;let n;for(n in t)o[n]=s[n]="className"===n?(r=s[n],i=t[n],r&&i?`${r} ${i}`:r||i):t[n];var r,i})),[o,s]}(p||S,n,r),y=function(e,n,o,s){const r=Ee(),i=Ne(),a=n?e.generateAndInjectStyles(S,r,i):e.generateAndInjectStyles(o,r,i);return"production"!==process.env.NODE_ENV&&t.useDebugValue(a),"production"!==process.env.NODE_ENV&&!n&&s&&s(a),a}(a,s,m,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,b=f.$as||n.$as||f.as||n.as||h,E=O(b),N=f!==n?{...n,...f}:n,_={};for(const e in N)"$"!==e[0]&&"as"!==e&&("forwardedAs"===e?_.as=N[e]:(u?u(e,i.default,b):!E||i.default(e))&&(_[e]=N[e]));return n.style&&f.style!==n.style&&(_.style={...n.style,...f.style}),_[E&&-1===w.indexOf(b)?"class":"className"]=c.concat(d,y!==d?y:null,n.className,f.className).filter(Boolean).join(" "),_.ref=g,t.createElement(b,_)}(_,e,n,b)}E.displayName=d;let _=a.default.forwardRef(E);return _.attrs=p,_.componentStyle=f,_.displayName=d,_.shouldForwardProp=m,_.foldedComponentIds=s?r.foldedComponentIds.concat(r.styledComponentId):g,_.styledComponentId=h,_.target=s?r.target:e,_.withComponent=function(e){const{componentId:t,...s}=n,r=t&&`${t}-${O(e)?e:N(x(e))}`;return Ge(e,{...s,attrs:p,componentId:r},o)},Object.defineProperty(_,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=s?function(e={},...t){for(const n of t)X(e,n,!0);return e}({},r.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(y(d,h),_.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{if(!o&&(n[s]=!0,Object.keys(n).length>=200)){const s=t?` with the id of "${t}"`:"";console.warn(`Over 200 classes were generated for component ${e}${s}.\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)),_.toString=()=>`.${_.styledComponentId}`,l&&W(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}function Fe(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 qe=e=>(Array.isArray(e)&&(e.isCss=!0),e);function Ye(e,...t){if(Oe(e)||J(e))return qe(Te(Fe(g,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:qe(Te(Fe(n,t)))}function He(e,t,n=S){if(!t)throw K(1,t);const o=(o,...s)=>e(t,n,Ye(o,...s));return o.attrs=o=>He(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>He(e,t,{...n,...o}),o}const We=e=>He(Ge,e),Ue=We;w.forEach((e=>{Ue[e]=We(e)}));class Je{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=je(e),pe.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(Te(this.rules,t,n,o).join(""),""),r=this.componentId+e;n.insertRules(r,r,s)}removeStyles(e,t){t.clearRules(this.componentId+e)}renderStyles(e,t,n,o){e>2&&pe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}const Xe={StyleSheet:pe,mainSheet:we};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||=0,1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1),exports.ServerStyleSheet=class{instance;sealed;constructor(){this.instance=new pe({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=ce();return`<style ${[t&&`nonce="${t}"`,`${u}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw K(2);return a.default.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw K(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw K(2);const e={[u]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},t=ce();return t&&(e.nonce=t),[a.default.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){throw K(3)}seal=()=>{this.sealed=!0}},exports.StyleSheetConsumer=Se,exports.StyleSheetContext=ge,exports.StyleSheetManager=_e,exports.ThemeConsumer=ze,exports.ThemeContext=Me,exports.ThemeProvider=function(e){const n=t.useContext(Me),o=t.useMemo((()=>function(e,t){if(!e)throw K(14);if(Oe(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw K(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw K(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?a.default.createElement(Me.Provider,{value:o},e.children):null},exports.__PRIVATE__=Xe,exports.createGlobalStyle=function(e,...t){const n=Ye(e,...t),o=`sc-global-${I(JSON.stringify(n))}`,s=new Je(n,o);"production"!==process.env.NODE_ENV&&y(o);const r=e=>{const t=Ee(),r=Ne(),l=a.default.useContext(Me),c=a.default.useRef(t.allocateGSInstance(o)).current;return"production"!==process.env.NODE_ENV&&a.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."),t.server&&i(c,e,t,l,r),(a.default.useInsertionEffect||a.default.useLayoutEffect)((()=>{if(!t.server)return i(c,e,t,l,r),()=>s.removeStyles(c,t)}),[c,e,t,l,r]),null};function i(e,t,n,o,i){if(s.isStatic)s.renderStyles(e,p,n,i);else{const a={...t,theme:v(t,o,r.defaultProps)};s.renderStyles(e,a,n,i)}}return a.default.memo(r)},exports.css=Ye,exports.default=Ue,exports.isStyledComponent=U,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=Ye(e,...t).join(""),o=I(n);return new Ce(o,n)},exports.useTheme=()=>t.useContext(Me),exports.version="6.0.0-alpha.6",exports.withTheme=function(e){const t=a.default.forwardRef(((t,n)=>{const o=v(t,a.default.useContext(Me),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 "${x(e)}"`),a.default.createElement(e,{...t,theme:o,ref:n})}));return t.displayName=`WithTheme(${x(e)})`,W(t,e)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),o=require("shallowequal"),r=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/i(t),c=/*#__PURE__*/i(n),u=/*#__PURE__*/i(o),l=/*#__PURE__*/i(s),p="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",d="6.0.0-beta.1",h="undefined"!=typeof window&&"HTMLElement"in window,f=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&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.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),y={},m=/invalid hook call/i,v=new Set,g=function(t,o){if("production"!==process.env.NODE_ENV){var r=o?' with the id of "'.concat(o,'"'):"",s="The component ".concat(t).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];m.test(t)?(a=!1,v.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},n.useRef(),a&&!v.has(s)&&(console.warn(s),v.add(s))}catch(e){m.test(e.message)&&v.delete(s)}finally{console.error=i}}},S=Object.freeze([]),_=Object.freeze({});function w(e,t,n){return void 0===n&&(n=_),e.theme!==n.theme&&e.theme||t||n.theme}var b=["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","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],E=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,N=/(^-|-$)/g;function C(e){return e.replace(E,"-").replace(N,"")}var A=/(a)(d)/gi,P=function(e){return String.fromCharCode(e+(e>25?39:97))};function I(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=P(t%52)+n;return(P(t%52)+n).replace(A,"$1-$2")}var x,O=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},R=function(e){return O(5381,e)};function D(e){return I(R(e)>>>0)}function T(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function j(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var k="function"==typeof Symbol&&Symbol.for,V=k?Symbol.for("react.memo"):60115,M=k?Symbol.for("react.forward_ref"):60112,B={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L=((x={})[M]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x[V]=z,x);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?z:"$$typeof"in e?L[e.$$typeof]:B;var t}var F=Object.defineProperty,q=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,W=Object.getPrototypeOf,U=Object.prototype;function J(e,t,n){if("string"!=typeof t){if(U){var o=W(t);o&&o!==U&&J(e,o,n)}var r=q(t);Y&&(r=r.concat(Y(t)));for(var s=G(e),i=G(t),a=0;a<r.length;++a){var c=r[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var u=H(t,c);try{F(e,c,u)}catch(e){}}}}return e}function X(e){return"object"==typeof e&&"styledComponentId"in e}function Z(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}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 o=0;o<t.length;o++)e[o]=K(e[o],t[o]);else if(Z(t))for(var o in t)e[o]=K(e[o],t[o]);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],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function te(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(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,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw te(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;s++)this.groupSizes[s]=0}var i=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var a=t.length;s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)}else this.tag.insertRule(i,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),oe=new Map,re=new Map,se=1,ie=function(e){if(oe.has(e))return oe.get(e);for(;re.has(se);)se++;var t=se++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw te(16,"".concat(t));return oe.set(e,t),re.set(t,e),t},ae=function(e,t){oe.set(e,t),re.set(t,e)},ce="style[".concat(p,"][").concat("data-styled-version",'="').concat(d,'"]'),ue=new RegExp("^".concat(p,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),le=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o)},pe=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(ue);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(ae(l,u),le(e,l,c[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}};function de(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var he=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var o=t[n];if(o&&1===o.nodeType&&o.hasAttribute(p))return o}}(n),s=void 0!==r?r.nextSibling:null;o.setAttribute(p,"active"),o.setAttribute("data-styled-version",d);var i=de();return i&&o.setAttribute("nonce",i),n.insertBefore(o,s),o},fe=function(){function e(e){var t=this.element=he(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw te(17)}(t),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 void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),ye=function(){function e(e){var t=this.element=he(e);this.nodes=t.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=h,ge={isServer:!h,useCSSOMInjection:!f},Se=function(){function t(t,n,o){void 0===t&&(t=_),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},ge),t),this.gs=n,this.names=new Map(o),this.server=!!t.isServer,!this.server&&h&&ve&&(ve=!1,function(e){for(var t=document.querySelectorAll(ce),n=0,o=t.length;n<o;n++){var r=t[n];r&&"active"!==r.getAttribute(p)&&(pe(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this))}return t.registerId=function(e){return ie(e)},t.prototype.reconstructWithOptions=function(n,o){return void 0===o&&(o=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,o&&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,o="",r=function(n){var r=function(e){return re.get(e)}(n);if(void 0===r)return"continue";var s=e.names.get(r),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(p,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),o+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)r(s);return o}(this)},t}(),_e=/^\s*\/\/.*$/gm,we=[":","[",".","#"];function be(e){var t,n,o,s,i=void 0===e?_:e,a=i.options,c=void 0===a?_:a,u=i.plugins,l=void 0===u?S:u,p=function(e,o,r){return 0===o&&we.includes(r[n.length])||r.match(s)?e:".".concat(t)},d=function(e){if(e.type===r.RULESET&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(o,p)}},h=function(e,i,a,u){void 0===i&&(i=""),void 0===a&&(a=""),void 0===u&&(u="&");var p=e.replace(_e,"");t=u,n=i,o=new RegExp("\\".concat(n,"\\b"),"g"),s=new RegExp("(\\".concat(n,"\\b){2,}"));var h,f,y=l.slice();return(c.prefix||void 0===c.prefix)&&y.unshift(r.prefixer),y.push(d,r.stringify),h=r.compile(a||i?"".concat(a," ").concat(i," { ").concat(p," }"):p),f=r.middleware(y),h.map(function(e,t){return f(e,t,h,f)}).filter(Boolean)};return h.hash=l.length?l.reduce(function(e,t){return t.name||te(15),O(e,t.name)},5381).toString():"",h}var Ee=c.default.createContext(void 0),Ne=Ee.Consumer,Ce=c.default.createContext(void 0),Ae=new Se,Pe=be();function Ie(){return n.useContext(Ee)||Ae}function xe(){return n.useContext(Ce)||Pe}function Oe(e){var t=n.useState(e.stylisPlugins),o=t[0],r=t[1],s=Ie(),i=n.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]),a=n.useMemo(function(){return be({options:{prefix:!e.disableVendorPrefixes},plugins:o})},[e.disableVendorPrefixes,o]);return n.useEffect(function(){u.default(o,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),c.default.createElement(Ee.Provider,{value:i},c.default.createElement(Ce.Provider,{value:a},"production"!==process.env.NODE_ENV?c.default.Children.only(e.children):e.children))}var Re=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Pe);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@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}(),De=/([A-Z])/,Te=/([A-Z])/g,je=/^ms-/,ke=function(e){return"-".concat(e.toLowerCase())};function Ve(e){return De.test(e)?e.replace(Te,ke).replace(je,"-ms-"):e}function Me(e){return"function"==typeof e}var Be=function(e){return null==e||!1===e||""===e},$e=function(t,n){var o,r=[];for(var s in t)t.hasOwnProperty(s)&&!Be(t[s])&&(Array.isArray(t[s])&&t[s].isCss||Me(t[s])?r.push("".concat(Ve(s),":"),t[s],";"):Z(t[s])?r.push.apply(r,$e(t[s],s)):r.push("".concat(Ve(s),": ").concat(null==(o=t[s])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||s in l.default?String(o).trim():"".concat(o,"px"),";")));return n?e.__spreadArray(e.__spreadArray(["".concat(n," {")],r,!0),["}"],!1):r};function ze(e,t,n,o){if(Array.isArray(e)){for(var r=[],s=0,i=e.length,a=void 0;s<i;s+=1)""!==(a=ze(e[s],t,n,o))&&(Array.isArray(a)?r.push.apply(r,a):r.push(a));return r}if(Be(e))return"";if(X(e))return".".concat(e.styledComponentId);if(Me(e)){if("function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t)return e;var c=e;return a=c(t),"production"===process.env.NODE_ENV||"object"!=typeof a||Array.isArray(a)||a instanceof Re||Z(a)||console.error("".concat(T(c)," 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(a,t,n,o)}var u;return e instanceof Re?n?(e.inject(n,o),e.getName(o)):e:Z(e)?$e(e):e.toString()}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Me(n)&&!X(n))return!1}return!0}var Ge=R(d),Fe=function(){function e(e,t,n){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=O(Ge,t),this.baseStyle=n,Se.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))this.names.push(this.staticRulesId);else{var r=ze(this.rules,e,t,n).join(""),s=I(O(this.baseHash,r)>>>0);if(!t.hasNameForId(o,s)){var i=n(r,".".concat(s),void 0,o);t.insertRules(o,s,i)}this.names.push(s),this.staticRulesId=s}else{for(var a=this.rules.length,c=O(this.baseHash,n.hash),u="",l=0;l<a;l++){var p=this.rules[l];if("string"==typeof p)u+=p,"production"!==process.env.NODE_ENV&&(c=O(c,p));else if(p){var d=ze(p,e,t,n),h=Array.isArray(d)?d.join(""):d;c=O(c,h),u+=h}}if(u){var f=I(c>>>0);if(!t.hasNameForId(o,f)){var y=n(u,".".concat(f),void 0,o);t.insertRules(o,f,y)}this.names.push(f)}}return this.names.join(" ")},e}(),qe=c.default.createContext(void 0),Ye=qe.Consumer,He={};function We(t,o,r){var s=X(t),i=t,u=!j(t),l=o.attrs,p=void 0===l?S:l,h=o.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":C(e);He[n]=(He[n]||0)+1;var o="".concat(n,"-").concat(D(d+n+He[n]));return t?"".concat(t,"-").concat(o):o}(o.displayName,o.parentComponentId):h,y=o.displayName,m=void 0===y?function(e){return j(e)?"styled.".concat(e):"Styled(".concat(T(e),")")}(t):y,v=o.displayName&&o.componentId?"".concat(C(o.displayName),"-").concat(o.componentId):o.componentId||f,E=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,N=o.shouldForwardProp;if(s&&i.shouldForwardProp){var A=i.shouldForwardProp;if(o.shouldForwardProp){var P=o.shouldForwardProp;N=function(e,t,n){return A(e,t,n)&&P(e,t,n)}}else N=A}var I=new Fe(r,v,s?i.componentStyle:void 0),x=I.isStatic&&0===p.length;function O(t,o){return function(t,o,r,s){var i=t.attrs,c=t.componentStyle,u=t.defaultProps,l=t.foldedComponentIds,p=t.shouldForwardProp,d=t.styledComponentId,h=t.target;"production"!==process.env.NODE_ENV&&n.useDebugValue(d);var f=function(t,n,o){void 0===t&&(t=_);var r=e.__assign(e.__assign({},n),{theme:t});return o.forEach(function(t){var n,o,s,i="function"==typeof t?t(r):t;for(n in i)r[n]="className"===n?(s=i[n],(o=r[n])&&s?"".concat(o," ").concat(s):o||s):"style"===n?e.__assign(e.__assign({},r[n]),i[n]):i[n]}),r}(w(o,n.useContext(qe),u)||_,o,i),y=function(e,t,o,r){var s=Ie(),i=xe(),a=e.generateAndInjectStyles(t?_:o,s,i);return"production"!==process.env.NODE_ENV&&n.useDebugValue(a),"production"!==process.env.NODE_ENV&&!t&&r&&r(a),a}(c,s,f,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),m=r,v=f.$as||f.as||h,g=j(v),S={};for(var E in f)"$"!==E[0]&&"as"!==E&&"theme"!==E&&("forwardedAs"===E?S.as=f[E]:(p?p(E,a.default,v):!g||a.default(E))&&(S[E]=f[E]));return S[g&&-1===b.indexOf(v)?"class":"className"]=l.concat(d,y!==d?y:null,f.className).filter(Boolean).join(" "),S.ref=m,n.createElement(v,S)}(R,t,o,x)}O.displayName=m;var R=c.default.forwardRef(O);return R.attrs=E,R.componentStyle=I,R.displayName=m,R.shouldForwardProp=N,R.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):S,R.styledComponentId=v,R.target=s?i.target:t,R.withComponent=function(t){var n=o.componentId,s=e.__rest(o,["componentId"]),i=n&&"".concat(n,"-").concat(j(t)?t:C(T(t)));return We(t,e.__assign(e.__assign({},s),{attrs:E,componentId:i}),r)},Object.defineProperty(R,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){void 0===e&&(e={});for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var o=0,r=t;o<r.length;o++)K(e,r[o],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(g(m,v),R.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={}}}}(m,v)),R.toString=function(){return".".concat(R.styledComponentId)},u&&J(R,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),R}function Ue(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var Je=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Xe(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(Me(t)||Z(t)){var r=t;return Je(ze(Ue(S,e.__spreadArray([r],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?s:Je(ze(Ue(s,n)))}function Ze(t,n,o){if(void 0===o&&(o=_),!n)throw te(1,n);var r=function(r){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,o,Xe.apply(void 0,e.__spreadArray([r],s,!1)))};return r.attrs=function(r){return Ze(t,n,e.__assign(e.__assign({},o),{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Ze(t,n,e.__assign(e.__assign({},o),r))},r}var Ke=function(e){return Ze(We,e)},Qe=Ke;b.forEach(function(e){Qe[e]=Ke(e)});var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),Se.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,o){var r=o(ze(this.rules,t,n,o).join(""),""),s=this.componentId+e;n.insertRules(s,s,r)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,o){e>2&&Se.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)},e}(),tt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=de(),o=[n&&'nonce="'.concat(n,'"'),"".concat(p,'="true"'),"".concat("data-styled-version",'="').concat(d,'"')].filter(Boolean).join(" ");return"<style ".concat(o,">").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 o=((n={})[p]="",n["data-styled-version"]=d,n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),r=de();return r&&(o.nonce=r),[c.default.createElement("style",e.__assign({},o,{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 c.default.createElement(Oe,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw te(3)},t}(),nt={StyleSheet:Se,mainSheet:Ae};"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"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]||(window["__styled-components-init__"]=0),1===window["__styled-components-init__"]&&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["__styled-components-init__"]+=1),exports.ServerStyleSheet=tt,exports.StyleSheetConsumer=Ne,exports.StyleSheetContext=Ee,exports.StyleSheetManager=Oe,exports.ThemeConsumer=Ye,exports.ThemeContext=qe,exports.ThemeProvider=function(t){var o=n.useContext(qe),r=n.useMemo(function(){return function(t,n){if(!t)throw te(14);if(Me(t)){var o=t(n);if("production"!==process.env.NODE_ENV&&(null===o||Array.isArray(o)||"object"!=typeof o))throw te(7);return o}if(Array.isArray(t)||"object"!=typeof t)throw te(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,o)},[t.theme,o]);return t.children?c.default.createElement(qe.Provider,{value:r},t.children):null},exports.__PRIVATE__=nt,exports.createGlobalStyle=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r=Xe.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(D(JSON.stringify(r))),i=new et(r,s);"production"!==process.env.NODE_ENV&&g(s);var a=function(e){var t=Ie(),n=xe(),o=c.default.useContext(qe),a=c.default.useRef(t.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&c.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&&r.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.server&&u(a,e,t,o,n),(c.default.useInsertionEffect||c.default.useLayoutEffect)(function(){if(!t.server)return u(a,e,t,o,n),function(){return i.removeStyles(a,t)}},[a,e,t,o,n]),null};function u(t,n,o,r,s){if(i.isStatic)i.renderStyles(t,y,o,s);else{var c=e.__assign(e.__assign({},n),{theme:w(n,r,a.defaultProps)});i.renderStyles(t,c,o,s)}}return c.default.memo(a)},exports.css=Xe,exports.default=Qe,exports.isStyledComponent=X,exports.keyframes=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var r=Xe.apply(void 0,e.__spreadArray([t],n,!1)).join(""),s=D(r);return new Re(s,r)},exports.useTheme=function(){return n.useContext(qe)},exports.version=d,exports.withTheme=function(t){var n=c.default.forwardRef(function(n,o){var r=w(n,c.default.useContext(qe),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===r&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(T(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:r,ref:o}))});return n.displayName="WithTheme(".concat(T(t),")"),J(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|