styled-components 6.0.0-alpha.5 → 6.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constructors/constructWithOptions.d.ts +27 -14
- package/dist/constructors/css.d.ts +2 -2
- package/dist/constructors/styled.d.ts +178 -178
- package/dist/hoc/withTheme.d.ts +1 -1
- package/dist/native/index.d.ts +29 -53
- package/dist/sheet/Tag.d.ts +3 -3
- package/dist/sheet/dom.d.ts +1 -1
- 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/test/utils.d.ts +178 -178
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +17 -20
- package/dist/utils/checkDynamicCreation.d.ts +1 -1
- package/dist/utils/flatten.d.ts +1 -1
- package/native/dist/constructors/constructWithOptions.d.ts +27 -14
- package/native/dist/constructors/css.d.ts +2 -2
- package/native/dist/constructors/styled.d.ts +178 -178
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/native/index.d.ts +29 -53
- package/native/dist/sheet/Tag.d.ts +3 -3
- package/native/dist/sheet/dom.d.ts +1 -1
- package/native/dist/styled-components.native.cjs.js +404 -468
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +401 -465
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +178 -178
- package/native/dist/types.d.ts +17 -20
- package/native/dist/utils/checkDynamicCreation.d.ts +1 -1
- package/native/dist/utils/flatten.d.ts +1 -1
- package/package.json +25 -29
- package/dist/primitives/index.d.ts +0 -23
- package/primitives/dist/base.d.ts +0 -18
- package/primitives/dist/base.d.ts.map +0 -1
- package/primitives/dist/constants.d.ts +0 -8
- package/primitives/dist/constants.d.ts.map +0 -1
- package/primitives/dist/constructors/constructWithOptions.d.ts +0 -19
- package/primitives/dist/constructors/constructWithOptions.d.ts.map +0 -1
- package/primitives/dist/constructors/createGlobalStyle.d.ts +0 -3
- package/primitives/dist/constructors/createGlobalStyle.d.ts.map +0 -1
- package/primitives/dist/constructors/css.d.ts +0 -4
- package/primitives/dist/constructors/css.d.ts.map +0 -1
- package/primitives/dist/constructors/keyframes.d.ts +0 -3
- package/primitives/dist/constructors/keyframes.d.ts.map +0 -1
- package/primitives/dist/constructors/styled.d.ts +0 -185
- package/primitives/dist/constructors/styled.d.ts.map +0 -1
- package/primitives/dist/dist/base.d.ts +0 -18
- package/primitives/dist/dist/base.d.ts.map +0 -1
- package/primitives/dist/dist/constants.d.ts +0 -9
- package/primitives/dist/dist/constants.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts +0 -20
- package/primitives/dist/dist/constructors/constructWithOptions.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts +0 -4
- package/primitives/dist/dist/constructors/createGlobalStyle.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/css.d.ts +0 -5
- package/primitives/dist/dist/constructors/css.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/keyframes.d.ts +0 -4
- package/primitives/dist/dist/constructors/keyframes.d.ts.map +0 -1
- package/primitives/dist/dist/constructors/styled.d.ts +0 -186
- package/primitives/dist/dist/constructors/styled.d.ts.map +0 -1
- package/primitives/dist/dist/hoc/withTheme.d.ts +0 -4
- package/primitives/dist/dist/hoc/withTheme.d.ts.map +0 -1
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts +0 -2
- package/primitives/dist/dist/hoc/withTheme.spec.d.ts.map +0 -1
- package/primitives/dist/dist/hooks/useTheme.d.ts +0 -4
- package/primitives/dist/dist/hooks/useTheme.d.ts.map +0 -1
- package/primitives/dist/dist/index-standalone.d.ts +0 -3
- package/primitives/dist/dist/index-standalone.d.ts.map +0 -1
- package/primitives/dist/dist/index.d.ts +0 -4
- package/primitives/dist/dist/index.d.ts.map +0 -1
- package/primitives/dist/dist/macro/index.d.ts +0 -3
- package/primitives/dist/dist/macro/index.d.ts.map +0 -1
- package/primitives/dist/dist/macro/test/babel.config.d.ts +0 -1
- package/primitives/dist/dist/macro/test/babel.config.d.ts.map +0 -1
- package/primitives/dist/dist/models/ComponentStyle.d.ts +0 -16
- package/primitives/dist/dist/models/ComponentStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/GlobalStyle.d.ts +0 -12
- package/primitives/dist/dist/models/GlobalStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/InlineStyle.d.ts +0 -7
- package/primitives/dist/dist/models/InlineStyle.d.ts.map +0 -1
- package/primitives/dist/dist/models/Keyframes.d.ts +0 -12
- package/primitives/dist/dist/models/Keyframes.d.ts.map +0 -1
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts +0 -16
- package/primitives/dist/dist/models/ServerStyleSheet.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyleSheetManager.d.ts +0 -22
- package/primitives/dist/dist/models/StyleSheetManager.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyledComponent.d.ts +0 -4
- package/primitives/dist/dist/models/StyledComponent.d.ts.map +0 -1
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts +0 -4
- package/primitives/dist/dist/models/StyledNativeComponent.d.ts.map +0 -1
- package/primitives/dist/dist/models/ThemeProvider.d.ts +0 -18
- package/primitives/dist/dist/models/ThemeProvider.d.ts.map +0 -1
- package/primitives/dist/dist/native/index.d.ts +0 -65
- package/primitives/dist/dist/native/index.d.ts.map +0 -1
- package/primitives/dist/dist/primitives/index.d.ts +0 -23
- package/primitives/dist/dist/primitives/index.d.ts.map +0 -1
- package/primitives/dist/dist/secretInternals.d.ts +0 -6
- package/primitives/dist/dist/secretInternals.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts +0 -5
- package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/GroupedTag.d.ts +0 -12
- package/primitives/dist/dist/sheet/GroupedTag.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Rehydration.d.ts +0 -4
- package/primitives/dist/dist/sheet/Rehydration.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Sheet.d.ts +0 -41
- package/primitives/dist/dist/sheet/Sheet.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/Tag.d.ts +0 -55
- package/primitives/dist/dist/sheet/Tag.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/dom.d.ts +0 -5
- package/primitives/dist/dist/sheet/dom.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/index.d.ts +0 -2
- package/primitives/dist/dist/sheet/index.d.ts.map +0 -1
- package/primitives/dist/dist/sheet/types.d.ts +0 -35
- package/primitives/dist/dist/sheet/types.d.ts.map +0 -1
- package/primitives/dist/dist/test/globals.d.ts +0 -3
- package/primitives/dist/dist/test/globals.d.ts.map +0 -1
- package/primitives/dist/dist/test/utils.d.ts +0 -192
- package/primitives/dist/dist/test/utils.d.ts.map +0 -1
- package/primitives/dist/dist/types.d.ts +0 -121
- package/primitives/dist/dist/types.d.ts.map +0 -1
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts +0 -2
- package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts +0 -2
- package/primitives/dist/dist/utils/checkDynamicCreation.d.ts.map +0 -1
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts +0 -4
- package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
- package/primitives/dist/dist/utils/determineTheme.d.ts +0 -3
- package/primitives/dist/dist/utils/determineTheme.d.ts.map +0 -1
- package/primitives/dist/dist/utils/domElements.d.ts +0 -3
- package/primitives/dist/dist/utils/domElements.d.ts.map +0 -1
- package/primitives/dist/dist/utils/empties.d.ts +0 -4
- package/primitives/dist/dist/utils/empties.d.ts.map +0 -1
- package/primitives/dist/dist/utils/error.d.ts +0 -6
- package/primitives/dist/dist/utils/error.d.ts.map +0 -1
- package/primitives/dist/dist/utils/errors.d.ts +0 -21
- package/primitives/dist/dist/utils/errors.d.ts.map +0 -1
- package/primitives/dist/dist/utils/escape.d.ts +0 -6
- package/primitives/dist/dist/utils/escape.d.ts.map +0 -1
- package/primitives/dist/dist/utils/flatten.d.ts +0 -5
- package/primitives/dist/dist/utils/flatten.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts +0 -2
- package/primitives/dist/dist/utils/generateAlphabeticName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateComponentId.d.ts +0 -2
- package/primitives/dist/dist/utils/generateComponentId.d.ts.map +0 -1
- package/primitives/dist/dist/utils/generateDisplayName.d.ts +0 -3
- package/primitives/dist/dist/utils/generateDisplayName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/getComponentName.d.ts +0 -3
- package/primitives/dist/dist/utils/getComponentName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hash.d.ts +0 -4
- package/primitives/dist/dist/utils/hash.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hoist.d.ts +0 -52
- package/primitives/dist/dist/utils/hoist.d.ts.map +0 -1
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts +0 -15
- package/primitives/dist/dist/utils/hyphenateStyleName.d.ts.map +0 -1
- package/primitives/dist/dist/utils/interleave.d.ts +0 -3
- package/primitives/dist/dist/utils/interleave.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isFunction.d.ts +0 -2
- package/primitives/dist/dist/utils/isFunction.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isPlainObject.d.ts +0 -2
- package/primitives/dist/dist/utils/isPlainObject.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts +0 -2
- package/primitives/dist/dist/utils/isStatelessFunction.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStaticRules.d.ts +0 -3
- package/primitives/dist/dist/utils/isStaticRules.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isStyledComponent.d.ts +0 -3
- package/primitives/dist/dist/utils/isStyledComponent.d.ts.map +0 -1
- package/primitives/dist/dist/utils/isTag.d.ts +0 -3
- package/primitives/dist/dist/utils/isTag.d.ts.map +0 -1
- package/primitives/dist/dist/utils/joinStrings.d.ts +0 -5
- package/primitives/dist/dist/utils/joinStrings.d.ts.map +0 -1
- package/primitives/dist/dist/utils/mixinDeep.d.ts +0 -8
- package/primitives/dist/dist/utils/mixinDeep.d.ts.map +0 -1
- package/primitives/dist/dist/utils/nonce.d.ts +0 -2
- package/primitives/dist/dist/utils/nonce.d.ts.map +0 -1
- package/primitives/dist/dist/utils/stylis.d.ts +0 -10
- package/primitives/dist/dist/utils/stylis.d.ts.map +0 -1
- package/primitives/dist/hoc/withTheme.d.ts +0 -3
- package/primitives/dist/hoc/withTheme.d.ts.map +0 -1
- package/primitives/dist/hoc/withTheme.spec.d.ts +0 -1
- package/primitives/dist/hoc/withTheme.spec.d.ts.map +0 -1
- package/primitives/dist/hooks/useTheme.d.ts +0 -3
- package/primitives/dist/hooks/useTheme.d.ts.map +0 -1
- package/primitives/dist/index-standalone.d.ts +0 -2
- package/primitives/dist/index-standalone.d.ts.map +0 -1
- package/primitives/dist/index.d.ts +0 -4
- package/primitives/dist/index.d.ts.map +0 -1
- package/primitives/dist/macro/index.d.ts +0 -2
- package/primitives/dist/macro/index.d.ts.map +0 -1
- package/primitives/dist/macro/test/babel.config.d.ts +0 -1
- package/primitives/dist/macro/test/babel.config.d.ts.map +0 -1
- package/primitives/dist/models/ComponentStyle.d.ts +0 -15
- package/primitives/dist/models/ComponentStyle.d.ts.map +0 -1
- package/primitives/dist/models/GlobalStyle.d.ts +0 -11
- package/primitives/dist/models/GlobalStyle.d.ts.map +0 -1
- package/primitives/dist/models/InlineStyle.d.ts +0 -6
- package/primitives/dist/models/InlineStyle.d.ts.map +0 -1
- package/primitives/dist/models/Keyframes.d.ts +0 -11
- package/primitives/dist/models/Keyframes.d.ts.map +0 -1
- package/primitives/dist/models/ServerStyleSheet.d.ts +0 -15
- package/primitives/dist/models/ServerStyleSheet.d.ts.map +0 -1
- package/primitives/dist/models/StyleSheetManager.d.ts +0 -21
- package/primitives/dist/models/StyleSheetManager.d.ts.map +0 -1
- package/primitives/dist/models/StyledComponent.d.ts +0 -3
- package/primitives/dist/models/StyledComponent.d.ts.map +0 -1
- package/primitives/dist/models/StyledNativeComponent.d.ts +0 -3
- package/primitives/dist/models/StyledNativeComponent.d.ts.map +0 -1
- package/primitives/dist/models/ThemeProvider.d.ts +0 -39
- package/primitives/dist/models/ThemeProvider.d.ts.map +0 -1
- package/primitives/dist/native/index.d.ts +0 -65
- package/primitives/dist/native/index.d.ts.map +0 -1
- package/primitives/dist/primitives/index.d.ts +0 -23
- package/primitives/dist/primitives/index.d.ts.map +0 -1
- package/primitives/dist/secretInternals.d.ts +0 -5
- package/primitives/dist/secretInternals.d.ts.map +0 -1
- package/primitives/dist/sheet/GroupIDAllocator.d.ts +0 -4
- package/primitives/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
- package/primitives/dist/sheet/GroupedTag.d.ts +0 -11
- package/primitives/dist/sheet/GroupedTag.d.ts.map +0 -1
- package/primitives/dist/sheet/Rehydration.d.ts +0 -3
- package/primitives/dist/sheet/Rehydration.d.ts.map +0 -1
- package/primitives/dist/sheet/Sheet.d.ts +0 -40
- package/primitives/dist/sheet/Sheet.d.ts.map +0 -1
- package/primitives/dist/sheet/Tag.d.ts +0 -54
- package/primitives/dist/sheet/Tag.d.ts.map +0 -1
- package/primitives/dist/sheet/dom.d.ts +0 -4
- package/primitives/dist/sheet/dom.d.ts.map +0 -1
- package/primitives/dist/sheet/index.d.ts +0 -1
- package/primitives/dist/sheet/index.d.ts.map +0 -1
- package/primitives/dist/sheet/types.d.ts +0 -34
- package/primitives/dist/sheet/types.d.ts.map +0 -1
- package/primitives/dist/styled-components-primitives.cjs.js +0 -1292
- package/primitives/dist/styled-components-primitives.cjs.js.map +0 -1
- package/primitives/dist/styled-components-primitives.esm.js +0 -1274
- package/primitives/dist/styled-components-primitives.esm.js.map +0 -1
- package/primitives/dist/test/globals.d.ts +0 -2
- package/primitives/dist/test/globals.d.ts.map +0 -1
- package/primitives/dist/test/utils.d.ts +0 -191
- package/primitives/dist/test/utils.d.ts.map +0 -1
- package/primitives/dist/types.d.ts +0 -143
- package/primitives/dist/types.d.ts.map +0 -1
- package/primitives/dist/utils/addUnitIfNeeded.d.ts +0 -1
- package/primitives/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
- package/primitives/dist/utils/checkDynamicCreation.d.ts +0 -1
- package/primitives/dist/utils/checkDynamicCreation.d.ts.map +0 -1
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts +0 -3
- package/primitives/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
- package/primitives/dist/utils/determineTheme.d.ts +0 -2
- package/primitives/dist/utils/determineTheme.d.ts.map +0 -1
- package/primitives/dist/utils/domElements.d.ts +0 -2
- package/primitives/dist/utils/domElements.d.ts.map +0 -1
- package/primitives/dist/utils/empties.d.ts +0 -3
- package/primitives/dist/utils/empties.d.ts.map +0 -1
- package/primitives/dist/utils/error.d.ts +0 -5
- package/primitives/dist/utils/error.d.ts.map +0 -1
- package/primitives/dist/utils/errors.d.ts +0 -20
- package/primitives/dist/utils/errors.d.ts.map +0 -1
- package/primitives/dist/utils/escape.d.ts +0 -5
- package/primitives/dist/utils/escape.d.ts.map +0 -1
- package/primitives/dist/utils/flatten.d.ts +0 -4
- package/primitives/dist/utils/flatten.d.ts.map +0 -1
- package/primitives/dist/utils/generateAlphabeticName.d.ts +0 -1
- package/primitives/dist/utils/generateAlphabeticName.d.ts.map +0 -1
- package/primitives/dist/utils/generateComponentId.d.ts +0 -1
- package/primitives/dist/utils/generateComponentId.d.ts.map +0 -1
- package/primitives/dist/utils/generateDisplayName.d.ts +0 -2
- package/primitives/dist/utils/generateDisplayName.d.ts.map +0 -1
- package/primitives/dist/utils/getComponentName.d.ts +0 -2
- package/primitives/dist/utils/getComponentName.d.ts.map +0 -1
- package/primitives/dist/utils/hash.d.ts +0 -3
- package/primitives/dist/utils/hash.d.ts.map +0 -1
- package/primitives/dist/utils/hoist.d.ts +0 -51
- package/primitives/dist/utils/hoist.d.ts.map +0 -1
- package/primitives/dist/utils/hyphenateStyleName.d.ts +0 -14
- package/primitives/dist/utils/hyphenateStyleName.d.ts.map +0 -1
- package/primitives/dist/utils/interleave.d.ts +0 -2
- package/primitives/dist/utils/interleave.d.ts.map +0 -1
- package/primitives/dist/utils/isFunction.d.ts +0 -1
- package/primitives/dist/utils/isFunction.d.ts.map +0 -1
- package/primitives/dist/utils/isPlainObject.d.ts +0 -1
- package/primitives/dist/utils/isPlainObject.d.ts.map +0 -1
- package/primitives/dist/utils/isStatelessFunction.d.ts +0 -1
- package/primitives/dist/utils/isStatelessFunction.d.ts.map +0 -1
- package/primitives/dist/utils/isStaticRules.d.ts +0 -2
- package/primitives/dist/utils/isStaticRules.d.ts.map +0 -1
- package/primitives/dist/utils/isStyledComponent.d.ts +0 -2
- package/primitives/dist/utils/isStyledComponent.d.ts.map +0 -1
- package/primitives/dist/utils/isTag.d.ts +0 -2
- package/primitives/dist/utils/isTag.d.ts.map +0 -1
- package/primitives/dist/utils/joinStrings.d.ts +0 -4
- package/primitives/dist/utils/joinStrings.d.ts.map +0 -1
- package/primitives/dist/utils/mixinDeep.d.ts +0 -7
- package/primitives/dist/utils/mixinDeep.d.ts.map +0 -1
- package/primitives/dist/utils/nonce.d.ts +0 -1
- package/primitives/dist/utils/nonce.d.ts.map +0 -1
- package/primitives/dist/utils/stylis.d.ts +0 -9
- package/primitives/dist/utils/stylis.d.ts.map +0 -1
- package/primitives/package.json +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__read as t,__values as n,__assign as r,__rest as o}from"tslib";import i from"@emotion/is-prop-valid";import s,{useRef as a,useState as c,useContext as u,useMemo as l,useEffect as p,createElement as d,useDebugValue as h}from"react";import f from"shallowequal";import{prefixer as y,stringify as m,serialize as v,compile as g,middleware as S,RULESET as w}from"stylis";import b from"@emotion/unitless";var E="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",N="6.0.0-alpha.5",_=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),C={},P=/invalid hook call/i,A=new Set,I=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",i="The component ".concat(n).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",s=console.error;try{var c=!0;console.error=function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];P.test(n)?(c=!1,A.delete(i)):s.apply(void 0,e([n],t(r),!1))},a(),c&&!A.has(i)&&(console.warn(i),A.add(i))}catch(e){P.test(e.message)&&A.delete(i)}finally{console.error=s}}},O=Object.freeze([]),D=Object.freeze({});function R(e,t,n){return void 0===n&&(n=D),e.theme!==n.theme&&e.theme||t||n.theme}var j=["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"],T=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,x=/(^-|-$)/g;function k(e){return e.replace(T,"-").replace(x,"")}var V=/(a)(d)/gi,$=function(e){return String.fromCharCode(e+(e>25?39:97))};function B(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=$(t%52)+n;return($(t%52)+n).replace(V,"$1-$2")}var z,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},F=function(e){return M(5381,e)};function G(e){return B(F(e)>>>0)}function L(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function Y(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var q="function"==typeof Symbol&&Symbol.for,H=q?Symbol.for("react.memo"):60115,W=q?Symbol.for("react.forward_ref"):60112,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},J={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},X=((z={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},z[H]=Z,z);function K(e){return("type"in(t=e)&&t.type.$$typeof)===H?Z:"$$typeof"in e?X[e.$$typeof]:U;var t}var Q=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,ne=Object.getOwnPropertyDescriptor,re=Object.getPrototypeOf,oe=Object.prototype;function ie(e,t,n){if("string"!=typeof t){if(oe){var r=re(t);r&&r!==oe&&ie(e,r,n)}var o=ee(t);te&&(o=o.concat(te(t)));for(var i=K(e),s=K(t),a=0;a<o.length;++a){var c=o[a];if(!(c in J||n&&n[c]||s&&c in s||i&&c in i)){var u=ne(t,c);try{Q(e,c,u)}catch(e){}}}}return e}function se(e){return"object"==typeof e&&"styledComponentId"in e}function ae(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 ce(e,t,n){if(void 0===n&&(n=!1),!n&&!ae(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ce(e[r],t[r]);else if(ae(t))for(var r in t)e[r]=ce(e[r],t[r]);return e}var ue="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,i=e.length;o<i;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function pe(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#".concat(n," for more information.").concat(r.length>0?" Args: ".concat(r.join(", ")):"")):new Error(le.apply(void 0,e([ue[n]],t(r),!1)).trim())}var de=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw pe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}var s=this.indexOfGroup(e+1);if(Array.isArray(t)){i=0;for(var a=t.length;i<a;i++)this.tag.insertRule(s,t[i])&&(this.groupSizes[e]++,s++)}else this.tag.insertRule(s,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat("/*!sc*/\n");return t},e}(),he=new Map,fe=new Map,ye=1,me=function(e){if(he.has(e))return he.get(e);for(;fe.has(ye);)ye++;var t=ye++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw pe(16,"".concat(t));return he.set(e,t),fe.set(t,e),t},ve=("style[".concat(E,"][").concat("data-styled-version",'="').concat(N,'"]'),new RegExp("^".concat(E,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return fe.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),s=t.getGroup(n);if(void 0===i||0===s.length)return"continue";var a="".concat(E,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(s).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},i=0;i<n;i++)o(i);return r});function ge(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(E))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(E,"active"),r.setAttribute("data-styled-version",N);var s=ge();return s&&r.setAttribute("nonce",s),n.insertBefore(r,i),r},we=function(){function e(e){var t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw pe(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}(),be=function(){function e(e){var t=this.element=Se(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),r=this.nodes[e];return this.element.insertBefore(n,r||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}(),Ee=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}(),Ne={isServer:!0,useCSSOMInjection:!_},_e=function(){function e(e,t,n){void 0===e&&(e=D),void 0===t&&(t={}),this.options=r(r({},Ne),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}return e.registerId=function(e){return me(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.isServer,n=e.useCSSOMInjection,r=e.target;return t?new Ee(r):n?new we(r):new be(r)}(this.options),new de(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(me(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(me(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(me(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return ve(this)},e}(),Ce=/^\s*\/\/.*$/gm,Pe=[":","[",".","#"];function Ae(e){var t,n,r,o,i=void 0===e?D:e,s=i.options,a=void 0===s?D:s,c=i.plugins,u=void 0===c?O:c,l=function(e,r,i){return 0===r&&Pe.includes(i[n.length])||i.match(o)?e:".".concat(t)},p=function(e){if(e.type===w&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(r,l)}},d=function(e,i,s,c){void 0===i&&(i=""),void 0===s&&(s=""),void 0===c&&(c="&");var l=e.replace(Ce,"");t=c,n=i,r=new RegExp("\\".concat(n,"\\b"),"g"),o=new RegExp("(\\".concat(n,"\\b){2,}"));var d=u.slice();return(a.prefix||void 0===a.prefix)&&d.unshift(y),d.push(p,m),v(g(s||i?"".concat(s," ").concat(i," { ").concat(l," }"):l),S(d))};return d.hash=u.length?u.reduce((function(e,t){return t.name||pe(15),M(e,t.name)}),5381).toString():"",d}var Ie=s.createContext(void 0),Oe=Ie.Consumer,De=s.createContext(void 0);De.Consumer;var Re=new _e,je=Ae();function Te(){return u(Ie)||Re}function xe(){return u(De)||je}function ke(e){var n=t(c(e.stylisPlugins),2),r=n[0],o=n[1],i=Te(),a=l((function(){var t=i;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]),u=l((function(){return Ae({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return p((function(){f(r,e.stylisPlugins)||o(e.stylisPlugins)}),[e.stylisPlugins]),s.createElement(Ie.Provider,{value:a},s.createElement(De.Provider,{value:u},"production"!==process.env.NODE_ENV?s.Children.only(e.children):e.children))}var Ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=je);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){throw pe(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=je),this.name+e.hash},e}(),$e=/([A-Z])/,Be=/([A-Z])/g,ze=/^ms-/,Me=function(e){return"-".concat(e.toLowerCase())};function Fe(e){return $e.test(e)?e.replace(Be,Me).replace(ze,"-ms-"):e}function Ge(e){return"function"==typeof e}var Le=function(e){return null==e||!1===e||""===e},Ye=function(n,r){var o,i,s=[];for(var a in n)n.hasOwnProperty(a)&&!Le(n[a])&&(Array.isArray(n[a])&&n[a].isCss||Ge(n[a])?s.push("".concat(Fe(a),":"),n[a],";"):ae(n[a])?s.push.apply(s,e([],t(Ye(n[a],a)),!1)):s.push("".concat(Fe(a),": ").concat((o=a,null==(i=n[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||o in b?String(i).trim():"".concat(i,"px")),";")));return r?e(e(["".concat(r," {")],t(s),!1),["}"],!1):s};function qe(n,r,o,i){if(Array.isArray(n)){for(var s=[],a=0,c=n.length,u=void 0;a<c;a+=1)""!==(u=qe(n[a],r,o,i))&&(Array.isArray(u)?s.push.apply(s,e([],t(u),!1)):s.push(u));return s}if(Le(n))return"";if(se(n))return".".concat(n.styledComponentId);if(Ge(n)){if("function"!=typeof(p=n)||p.prototype&&p.prototype.isReactComponent||!r)return n;var l=n;return u=l(r),"production"===process.env.NODE_ENV||"object"!=typeof u||Array.isArray(u)||u instanceof Ve||ae(u)||console.error("".concat(L(l)," 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.")),qe(u,r,o,i)}var p;return n instanceof Ve?o?(n.inject(o,i),n.getName(i)):n:ae(n)?Ye(n):n.toString()}function He(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ge(n)&&!se(n))return!1}return!0}var We=F(N),Ue=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&He(e),this.componentId=t,this.baseHash=M(We,t),this.baseStyle=n,_e.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=qe(this.rules,e,t,n).join(""),s=B(M(this.baseHash,i)>>>0);if(!t.hasNameForId(r,s)){var a=n(i,".".concat(s),void 0,r);t.insertRules(r,s,a)}o.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=M(this.baseHash,n.hash),l="",p=0;p<c;p++){var d=this.rules[p];if("string"==typeof d)l+=d,"production"!==process.env.NODE_ENV&&(u=M(u,d+p));else if(d){var h=qe(d,e,t,n),f=Array.isArray(h)?h.join(""):h;u=M(u,f+p),l+=f}}if(l){var y=B(u>>>0);if(!t.hasNameForId(r,y)){var m=n(l,".".concat(y),void 0,r);t.insertRules(r,y,m)}o.push(y)}}return o.join(" ")},e}(),Je=s.createContext(void 0),Ze=Je.Consumer;function Xe(e){var t=u(Je),n=l((function(){return function(e,t){if(!e)throw pe(14);if(Ge(e)){var n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw pe(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw pe(8);return t?r(r({},t),e):e}(e.theme,t)}),[e.theme,t]);return e.children?s.createElement(Je.Provider,{value:n},e.children):null}var Ke={};function Qe(e,a,c){var l=se(e),p=e,f=!Y(e),y=a.attrs,m=void 0===y?O:y,v=a.componentId,g=void 0===v?function(e,t){var n="string"!=typeof e?"sc":k(e);Ke[n]=(Ke[n]||0)+1;var r="".concat(n,"-").concat(G(N+n+Ke[n]));return t?"".concat(t,"-").concat(r):r}(a.displayName,a.parentComponentId):v,S=a.displayName,w=void 0===S?function(e){return Y(e)?"styled.".concat(e):"Styled(".concat(L(e),")")}(e):S,b=a.displayName&&a.componentId?"".concat(k(a.displayName),"-").concat(a.componentId):a.componentId||g,E=l&&p.attrs?p.attrs.concat(m).filter(Boolean):m,_=a.shouldForwardProp;if(l&&p.shouldForwardProp){var C=p.shouldForwardProp;if(a.shouldForwardProp){var P=a.shouldForwardProp;_=function(e,t,n){return C(e,t,n)&&P(e,t,n)}}else _=C}var A=new Ue(c,b,l?p.componentStyle:void 0),T=A.isStatic&&0===m.length;function x(e,n){return function(e,n,o,s){var a=e.attrs,c=e.componentStyle,l=e.defaultProps,p=e.foldedComponentIds,f=e.shouldForwardProp,y=e.styledComponentId,m=e.target;"production"!==process.env.NODE_ENV&&h(y);var v=R(n,u(Je),l),g=t(function(e,t,n){void 0===e&&(e=D);var o=r(r({},t),{theme:e}),i={};return n.forEach((function(e){var t,n,r,s="function"==typeof e?e(o):e;for(t in s)o[t]=i[t]="className"===t?(n=i[t],r=s[t],n&&r?"".concat(n," ").concat(r):n||r):s[t]})),[o,i]}(v||D,n,a),2),S=g[0],w=g[1],b=function(e,t,n,r){var o=Te(),i=xe(),s=t?e.generateAndInjectStyles(D,o,i):e.generateAndInjectStyles(n,o,i);return"production"!==process.env.NODE_ENV&&h(s),"production"!==process.env.NODE_ENV&&!t&&r&&r(s),s}(c,s,S,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),E=o,N=w.$as||n.$as||w.as||n.as||m,_=Y(N),C=w!==n?r(r({},n),w):n,P={};for(var A in C)"$"!==A[0]&&"as"!==A&&("forwardedAs"===A?P.as=C[A]:(f?f(A,i,N):!_||i(A))&&(P[A]=C[A]));return n.style&&w.style!==n.style&&(P.style=r(r({},n.style),w.style)),P[_&&-1===j.indexOf(N)?"class":"className"]=p.concat(y,b!==y?b:null,n.className,w.className).filter(Boolean).join(" "),P.ref=E,d(N,P)}(V,e,n,T)}x.displayName=w;var V=s.forwardRef(x);return V.attrs=E,V.componentStyle=A,V.displayName=w,V.shouldForwardProp=_,V.foldedComponentIds=l?p.foldedComponentIds.concat(p.styledComponentId):O,V.styledComponentId=b,V.target=l?p.target:e,V.withComponent=function(e){var t=a.componentId,n=o(a,["componentId"]),i=t&&"".concat(t,"-").concat(Y(e)?e:k(L(e)));return Qe(e,r(r({},n),{attrs:E,componentId:i}),c)},Object.defineProperty(V,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=l?function(e){var t,r;void 0===e&&(e={});for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];try{for(var s=n(o),a=s.next();!a.done;a=s.next())ce(e,a.value,!0)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return e}({},p.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(I(w,b),V.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(i,".\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={}}}}(w,b)),V.toString=function(){return".".concat(V.styledComponentId)},f&&ie(V,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),V}function et(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 tt=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function nt(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(Ge(n)||ae(n)){var i=n;return tt(qe(et(O,e([i],t(r),!1))))}var s=n;return 0===r.length&&1===s.length&&"string"==typeof s[0]?s:tt(qe(et(s,r)))}function rt(n,o,i){if(void 0===i&&(i=D),!o)throw pe(1,o);var s=function(r){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];return n(o,i,nt.apply(void 0,e([r],t(s),!1)))};return s.attrs=function(e){return rt(n,o,r(r({},i),{attrs:Array.prototype.concat(i.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return rt(n,o,r(r({},i),e))},s}var ot=function(e){return rt(Qe,e)},it=ot;j.forEach((function(e){it[e]=ot(e)}));var st=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=He(e),_e.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(qe(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&_e.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function at(n){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var c=nt.apply(void 0,e([n],t(o),!1)),l="sc-global-".concat(G(JSON.stringify(c))),p=new st(c,l);"production"!==process.env.NODE_ENV&&I(l);var d=function(e){var t=Te(),n=xe(),r=u(Je),o=a(t.allocateGSInstance(l)).current;return"production"!==process.env.NODE_ENV&&s.Children.count(e.children)&&console.warn("The global style component ".concat(l," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&c.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&&h(o,e,t,r,n),null};function h(e,t,n,o,i){if(p.isStatic)p.renderStyles(e,C,n,i);else{var s=r(r({},t),{theme:R(t,o,d.defaultProps)});p.renderStyles(e,s,n,i)}}return s.memo(d)}function ct(n){for(var r=[],o=1;o<arguments.length;o++)r[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 i=nt.apply(void 0,e([n],t(r),!1)).join(""),s=G(i);return new Ve(s,i)}function ut(e){var t=s.forwardRef((function(t,n){var o=R(t,s.useContext(Je),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 "'.concat(L(e),'"')),s.createElement(e,r({},t,{theme:o,ref:n}))}));return t.displayName="WithTheme(".concat(L(e),")"),ie(t,e)}var lt=function(){return u(Je)},pt=/^\s*<\/[a-z]/i,dt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=ge(),r=[n&&'nonce="'.concat(n,'"'),"".concat(E,'="true"'),"".concat("data-styled-version",'="').concat(N,'"')].filter(Boolean).join(" ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw pe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw pe(2);var n=((t={})[E]="",t["data-styled-version"]=N,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=ge();return o&&(n.nonce=o),[s.createElement("style",r({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new _e({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw pe(2);return s.createElement(ke,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){if(this.sealed)throw pe(2);this.seal();var t=require("stream").Transform,n=e,r=this.instance,o=this._emitSheetCSS,i=new t({transform:function(e,t,n){var i=e.toString(),s=o();if(r.clearTag(),pt.test(i)){var a=i.indexOf(">")+1,c=i.slice(0,a),u=i.slice(a);this.push(c+s+u)}else this.push(s+i);n()}});return n.on("error",(function(e){i.emit("error",e)})),n.pipe(i)},e}(),ht={StyleSheet:_e,mainSheet:Re};"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&&process.env.NODE_ENV;export{dt as ServerStyleSheet,Oe as StyleSheetConsumer,Ie as StyleSheetContext,ke as StyleSheetManager,Ze as ThemeConsumer,Je as ThemeContext,Xe as ThemeProvider,ht as __PRIVATE__,at as createGlobalStyle,nt as css,it as default,se as isStyledComponent,ct as keyframes,lt as useTheme,N as version,ut as withTheme};
|
|
1
|
+
import e from"@emotion/is-prop-valid";import t,{useRef as n,useState as o,useContext as s,useMemo as r,useEffect as i,createElement as a,useDebugValue as c}from"react";import l from"shallowequal";import{prefixer as u,stringify as h,serialize as d,compile as p,middleware as m,RULESET as f}from"stylis";import y from"@emotion/unitless";const g="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="6.0.0-alpha.6",v=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),w={},b=/invalid hook call/i,E=new Set,N=(e,t)=>{if("production"!==process.env.NODE_ENV){const o=`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.`,s=console.error;try{let e=!0;console.error=(t,...n)=>{b.test(t)?(e=!1,E.delete(o)):s(t,...n)},n(),e&&!E.has(o)&&(console.warn(o),E.add(o))}catch(e){b.test(e.message)&&E.delete(o)}finally{console.error=s}}},$=Object.freeze([]),_=Object.freeze({});function C(e,t,n=_){return e.theme!==n.theme&&e.theme||t||n.theme}var P=["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 A=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,I=/(^-|-$)/g;function O(e){return e.replace(A,"-").replace(I,"")}const D=/(a)(d)/gi,R=e=>String.fromCharCode(e+(e>25?39:97));function j(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=R(t%52)+n;return(R(t%52)+n).replace(D,"$1-$2")}const T=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},x=e=>T(5381,e);function k(e){return j(x(e)>>>0)}function V(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function z(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function B(e){return z(e)?`styled.${e}`:`Styled(${V(e)})`}const M="function"==typeof Symbol&&Symbol.for,F=M?Symbol.for("react.memo"):60115,G=M?Symbol.for("react.forward_ref"):60112,L={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Y={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H={[G]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[F]:q};function W(e){return("type"in(t=e)&&t.type.$$typeof)===F?q:"$$typeof"in e?H[e.$$typeof]:L;var t}const U=Object.defineProperty,J=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,Q=Object.prototype;function ee(e,t,n){if("string"!=typeof t){if(Q){const o=K(t);o&&o!==Q&&ee(e,o,n)}let o=J(t);Z&&(o=o.concat(Z(t)));const s=W(e),r=W(t);for(let i=0;i<o.length;++i){const a=o[i];if(!(a in Y||n&&n[a]||r&&a in r||s&&a in s)){const n=X(t,a);try{U(e,a,n)}catch(e){}}}}return e}function te(e){return"object"==typeof e&&"styledComponentId"in e}function ne(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 oe(e,t,n=!1){if(!n&&!ne(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=oe(e[n],t[n]);else if(ne(t))for(const n in t)e[n]=oe(e[n],t[n]);return e}const se="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 re(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}(se[e],...t).trim())}let ie=new Map,ae=new Map,ce=1;const le=e=>{if(ie.has(e))return ie.get(e);for(;ae.has(ce);)ce++;const t=ce++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw re(16,`${t}`);return ie.set(e,t),ae.set(t,e),t},ue=e=>ae.get(e);function he(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}new RegExp(`^${g}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);const de=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(g))return n}})(n),r=void 0!==s?s.nextSibling:null;o.setAttribute(g,"active"),o.setAttribute("data-styled-version","6.0.0-alpha.6");const i=he();return i&&o.setAttribute("nonce",i),n.insertBefore(o,r),o},pe={isServer:!0,useCSSOMInjection:!v};class me{gs;names;options;server;tag;static registerId(e){return le(e)}constructor(e=_,t={},n){this.options={...pe,...e},this.gs=t,this.names=new Map(n),this.server=!!e.isServer,this.server}reconstructWithOptions(e,t=!0){return new me({...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=de(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 re(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=de(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 re(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(le(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(le(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(le(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=ue(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=`${g}.g${s}[id="${n}"]`;let c="";void 0!==r&&r.forEach((e=>{e.length>0&&(c+=`${e},`)})),o+=`${i}${a}{content:"${c}"}/*!sc*/\n`}return o})(this)}}const fe=/^\s*\/\/.*$/gm,ye=[":","[",".","#"];function ge({options:e=_,plugins:t=$}=_){let n,o,s,r;const i=(e,t,s)=>0===t&&ye.includes(s[o.length])||s.match(r)?e:`.${n}`,a=e=>{if(e.type===f&&e.value.includes("&")){const t=e.props;t[0]=t[0].replace(s,i)}},c=(i,c="",l="",f="&")=>{let y=i.replace(fe,"");n=f,o=c,s=new RegExp(`\\${o}\\b`,"g"),r=new RegExp(`(\\${o}\\b){2,}`);const g=t.slice();return(e.prefix||void 0===e.prefix)&&g.unshift(u),g.push(a,h),d(p(l||c?`${l} ${c} { ${y} }`:y),m(g))};return c.hash=t.length?t.reduce(((e,t)=>(t.name||re(15),T(e,t.name))),5381).toString():"",c}const Se=t.createContext(void 0),ve=Se.Consumer,we=t.createContext(void 0);we.Consumer;const be=new me,Ee=ge();function Ne(){return s(Se)||be}function $e(){return s(we)||Ee}function _e(e){const[n,s]=o(e.stylisPlugins),a=Ne(),c=r((()=>{let t=a;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]),u=r((()=>ge({options:{prefix:!e.disableVendorPrefixes},plugins:n})),[e.disableVendorPrefixes,n]);return i((()=>{l(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),t.createElement(Se.Provider,{value:c},t.createElement(we.Provider,{value:u},"production"!==process.env.NODE_ENV?t.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=Ee)=>{const n=this.name+t.hash;e.hasNameForId(this.id,n)||e.insertRules(this.id,n,t(this.rules,n,"@keyframes"))};toString=()=>{throw re(12,String(this.name))};getName(e=Ee){return this.name+e.hash}}const Pe=/([A-Z])/,Ae=/([A-Z])/g,Ie=/^ms-/,Oe=e=>`-${e.toLowerCase()}`;function De(e){return Pe.test(e)?e.replace(Ae,Oe).replace(Ie,"-ms-"):e}function Re(e){return"function"==typeof e}const je=e=>null==e||!1===e||""===e,Te=(e,t)=>{const n=[];for(const t in e)e.hasOwnProperty(t)&&!je(e[t])&&(Array.isArray(e[t])&&e[t].isCss||Re(e[t])?n.push(`${De(t)}:`,e[t],";"):ne(e[t])?n.push(...Te(e[t],t)):n.push(`${De(t)}: ${o=t,s=e[t],null==s||"boolean"==typeof s||""===s?"":"number"!=typeof s||0===s||o in y?String(s).trim():`${s}px`};`));var o,s;return t?[`${t} {`,...n,"}"]:n};function xe(e,t,n,o){if(Array.isArray(e)){const s=[];for(let r,i=0,a=e.length;i<a;i+=1)r=xe(e[i],t,n,o),""!==r&&(Array.isArray(r)?s.push(...r):s.push(r));return s}if(je(e))return"";if(te(e))return`.${e.styledComponentId}`;if(Re(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||ne(r)||console.error(`${V(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.`),xe(r,t,n,o)}}var s;return e instanceof Ce?n?(e.inject(n,o),e.getName(o)):e:ne(e)?Te(e):e.toString()}function ke(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(Re(n)&&!te(n))return!1}return!0}const Ve=x("6.0.0-alpha.6");class ze{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)&&ke(e),this.componentId=t,this.baseHash=T(Ve,t),this.baseStyle=n,me.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=xe(this.rules,e,t,n).join(""),i=j(T(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=T(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=T(i,s+o));else if(s){const r=xe(s,e,t,n),c=Array.isArray(r)?r.join(""):r;i=T(i,c+o),a+=c}}if(a){const e=j(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 Be=t.createContext(void 0),Me=Be.Consumer;function Fe(e){const n=s(Be),o=r((()=>function(e,t){if(!e)throw re(14);if(Re(e)){const n=e(t);if("production"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||"object"!=typeof n))throw re(7);return n}if(Array.isArray(e)||"object"!=typeof e)throw re(8);return t?{...t,...e}:e}(e.theme,n)),[e.theme,n]);return e.children?t.createElement(Be.Provider,{value:o},e.children):null}const Ge={};function Le(e,t){const n="string"!=typeof e?"sc":O(e);Ge[n]=(Ge[n]||0)+1;const o=`${n}-${k("6.0.0-alpha.6"+n+Ge[n])}`;return t?`${t}-${o}`:o}function Ye(n,o,r){const i=te(n),l=n,u=!z(n),{attrs:h=$,componentId:d=Le(o.displayName,o.parentComponentId),displayName:p=B(n)}=o,m=o.displayName&&o.componentId?`${O(o.displayName)}-${o.componentId}`:o.componentId||d,f=i&&l.attrs?l.attrs.concat(h).filter(Boolean):h;let{shouldForwardProp:y}=o;if(i&&l.shouldForwardProp){const e=l.shouldForwardProp;if(o.shouldForwardProp){const t=o.shouldForwardProp;y=(n,o,s)=>e(n,o,s)&&t(n,o,s)}else y=e}const g=new ze(r,m,i?l.componentStyle:void 0),S=g.isStatic&&0===h.length;function v(t,n){return function(t,n,o,r){const{attrs:i,componentStyle:l,defaultProps:u,foldedComponentIds:h,shouldForwardProp:d,styledComponentId:p,target:m}=t;"production"!==process.env.NODE_ENV&&c(p);const f=C(n,s(Be),u),[y,g]=function(e=_,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]}(f||_,n,i),S=function(e,t,n,o){const s=Ne(),r=$e(),i=t?e.generateAndInjectStyles(_,s,r):e.generateAndInjectStyles(n,s,r);return"production"!==process.env.NODE_ENV&&c(i),"production"!==process.env.NODE_ENV&&!t&&o&&o(i),i}(l,r,y,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=o,w=g.$as||n.$as||g.as||n.as||m,b=z(w),E=g!==n?{...n,...g}:n,N={};for(const t in E)"$"!==t[0]&&"as"!==t&&("forwardedAs"===t?N.as=E[t]:(d?d(t,e,w):!b||e(t))&&(N[t]=E[t]));return n.style&&g.style!==n.style&&(N.style={...n.style,...g.style}),N[b&&-1===P.indexOf(w)?"class":"className"]=h.concat(p,S!==p?S:null,n.className,g.className).filter(Boolean).join(" "),N.ref=v,a(w,N)}(w,t,n,S)}v.displayName=p;let w=t.forwardRef(v);return w.attrs=f,w.componentStyle=g,w.displayName=p,w.shouldForwardProp=y,w.foldedComponentIds=i?l.foldedComponentIds.concat(l.styledComponentId):$,w.styledComponentId=m,w.target=i?l.target:n,w.withComponent=function(e){const{componentId:t,...n}=o,s=t&&`${t}-${z(e)?e:O(V(e))}`;return Ye(e,{...n,attrs:f,componentId:s},r)},Object.defineProperty(w,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e={},...t){for(const n of t)oe(e,n,!0);return e}({},l.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(N(p,m),w.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={}}}})(p,m)),w.toString=()=>`.${w.styledComponentId}`,u&&ee(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}function qe(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 He=e=>(Array.isArray(e)&&(e.isCss=!0),e);function We(e,...t){if(Re(e)||ne(e))return He(xe(qe($,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?n:He(xe(qe(n,t)))}function Ue(e,t,n=_){if(!t)throw re(1,t);const o=(o,...s)=>e(t,n,We(o,...s));return o.attrs=o=>Ue(e,t,{...n,attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}),o.withConfig=o=>Ue(e,t,{...n,...o}),o}const Je=e=>Ue(Ye,e),Ze=Je;P.forEach((e=>{Ze[e]=Je(e)}));class Xe{componentId;isStatic;rules;constructor(e,t){this.rules=e,this.componentId=t,this.isStatic=ke(e),me.registerId(this.componentId+1)}createStyles(e,t,n,o){const s=o(xe(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&&me.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)}}function Ke(e,...n){const o=We(e,...n),s=`sc-global-${k(JSON.stringify(o))}`,r=new Xe(o,s);"production"!==process.env.NODE_ENV&&N(s);const i=e=>{const n=Ne(),a=$e(),c=t.useContext(Be),l=t.useRef(n.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),"production"!==process.env.NODE_ENV&&o.some((e=>"string"==typeof e&&-1!==e.indexOf("@import")))&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),n.server&&function(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,w,n,s);else{const a={...t,theme:C(t,o,i.defaultProps)};r.renderStyles(e,a,n,s)}}(l,e,n,c,a),null};return t.memo(i)}function Qe(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=We(e,...t).join(""),o=k(n);return new Ce(o,n)}function et(e){const n=t.forwardRef(((n,o)=>{const s=C(n,t.useContext(Be),e.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${V(e)}"`),t.createElement(e,{...n,theme:s,ref:o})}));return n.displayName=`WithTheme(${V(e)})`,ee(n,e)}const tt=()=>s(Be),nt=/^\s*<\/[a-z]/i;class ot{instance;sealed;constructor(){this.instance=new me({isServer:!0}),this.sealed=!1}_emitSheetCSS=()=>{const e=this.instance.toString(),t=he();return`<style ${[t&&`nonce="${t}"`,`${g}="true"`,'data-styled-version="6.0.0-alpha.6"'].filter(Boolean).join(" ")}>${e}</style>`};collectStyles(e){if(this.sealed)throw re(2);return t.createElement(_e,{sheet:this.instance},e)}getStyleTags=()=>{if(this.sealed)throw re(2);return this._emitSheetCSS()};getStyleElement=()=>{if(this.sealed)throw re(2);const e={[g]:"","data-styled-version":"6.0.0-alpha.6",dangerouslySetInnerHTML:{__html:this.instance.toString()}},n=he();return n&&(e.nonce=n),[t.createElement("style",{...e,key:"sc-0-0"})]};interleaveWithNodeStream(e){if(this.sealed)throw re(2);{this.seal();const{Transform:t}=require("stream"),n=e,{instance:o,_emitSheetCSS:s}=this,r=new t({transform:function(e,t,n){const r=e.toString(),i=s();if(o.clearTag(),nt.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);n()}});return n.on("error",(e=>{r.emit("error",e)})),n.pipe(r)}}seal=()=>{this.sealed=!0}}const st={StyleSheet:me,mainSheet:be};"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&&process.env.NODE_ENV;export{ot as ServerStyleSheet,ve as StyleSheetConsumer,Se as StyleSheetContext,_e as StyleSheetManager,Me as ThemeConsumer,Be as ThemeContext,Fe as ThemeProvider,st as __PRIVATE__,Ke as createGlobalStyle,We as css,Ze as default,te as isStyledComponent,Qe as keyframes,tt as useTheme,S as version,et as withTheme};
|
|
2
2
|
//# sourceMappingURL=styled-components.esm.js.map
|