styled-components 6.0.0-rc.3 → 6.0.0-rc.4
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 +16 -42
- package/dist/constructors/css.d.ts +2 -2
- package/dist/constructors/keyframes.d.ts +1 -1
- package/dist/constructors/styled.d.ts +524 -6
- package/dist/hoc/withTheme.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/models/Keyframes.d.ts +0 -1
- package/dist/models/ServerStyleSheet.d.ts +2 -1
- package/dist/models/StyledComponent.d.ts +2 -2
- package/dist/models/StyledNativeComponent.d.ts +2 -2
- package/dist/models/ThemeProvider.d.ts +8 -1
- package/dist/native/index.d.ts +28 -29
- package/dist/sheet/Sheet.d.ts +0 -2
- 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 +90 -38
- 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 +523 -179
- package/dist/types.d.ts +48 -54
- package/dist/utils/errors.d.ts +1 -0
- package/dist/utils/isStyledComponent.d.ts +2 -2
- package/dist/utils/joinStrings.d.ts +1 -1
- package/dist/utils/setToString.d.ts +17 -0
- package/native/dist/constructors/constructWithOptions.d.ts +16 -42
- package/native/dist/constructors/css.d.ts +2 -2
- package/native/dist/constructors/keyframes.d.ts +1 -1
- package/native/dist/constructors/styled.d.ts +524 -6
- package/native/dist/hoc/withTheme.d.ts +1 -1
- package/native/dist/index.d.ts +1 -1
- package/native/dist/models/Keyframes.d.ts +0 -1
- package/native/dist/models/ServerStyleSheet.d.ts +2 -1
- package/native/dist/models/StyledComponent.d.ts +2 -2
- package/native/dist/models/StyledNativeComponent.d.ts +2 -2
- package/native/dist/models/ThemeProvider.d.ts +8 -1
- package/native/dist/native/index.d.ts +28 -29
- package/native/dist/sheet/Sheet.d.ts +0 -2
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.cjs.js.map +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/native/dist/styled-components.native.esm.js.map +1 -1
- package/native/dist/test/utils.d.ts +523 -179
- package/native/dist/types.d.ts +48 -54
- package/native/dist/utils/errors.d.ts +1 -0
- package/native/dist/utils/isStyledComponent.d.ts +2 -2
- package/native/dist/utils/joinStrings.d.ts +1 -1
- package/native/dist/utils/setToString.d.ts +17 -0
- package/package.json +8 -3
- package/test-utils/index.ts +3 -6
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type * as streamInternal from 'stream';
|
|
3
4
|
import { Readable } from 'stream';
|
|
4
5
|
import StyleSheet from '../sheet';
|
|
@@ -9,7 +10,7 @@ export default class ServerStyleSheet {
|
|
|
9
10
|
_emitSheetCSS: () => string;
|
|
10
11
|
collectStyles(children: any): JSX.Element;
|
|
11
12
|
getStyleTags: () => string;
|
|
12
|
-
getStyleElement: () => JSX.Element[];
|
|
13
|
+
getStyleElement: () => React.JSX.Element[];
|
|
13
14
|
interleaveWithNodeStream(input: Readable): streamInternal.Transform;
|
|
14
15
|
seal: () => void;
|
|
15
16
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
|
|
2
|
-
declare function createStyledComponent<Target extends WebTarget,
|
|
1
|
+
import type { BaseObject, IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
|
|
2
|
+
declare function createStyledComponent<Target extends WebTarget, OuterProps extends object, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'web', OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<'web', Target, OuterProps, Statics>>;
|
|
3
3
|
export default createStyledComponent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ExecutionProps, IInlineStyleConstructor, IStyledComponent, IStyledComponentFactory, NativeTarget, RuleSet,
|
|
2
|
-
declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget,
|
|
1
|
+
import type { BaseObject, ExecutionProps, IInlineStyleConstructor, IStyledComponent, IStyledComponentFactory, NativeTarget, RuleSet, StyledOptions } from '../types';
|
|
2
|
+
declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExecutionProps, Statics extends object = BaseObject>(target: Target, options: StyledOptions<"native", OuterProps>, rules: RuleSet<OuterProps>) => IStyledComponent<"native", import("../types").Substitute<OuterProps, object>> & Statics & object;
|
|
3
3
|
export default _default;
|
|
@@ -32,7 +32,14 @@ type Props = {
|
|
|
32
32
|
};
|
|
33
33
|
export declare const ThemeContext: React.Context<DefaultTheme | undefined>;
|
|
34
34
|
export declare const ThemeConsumer: React.Consumer<DefaultTheme | undefined>;
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Returns the current theme (as provided by the closest ancestor `ThemeProvider`.)
|
|
37
|
+
*
|
|
38
|
+
* If no `ThemeProvider` is found, the function will error. If you need access to the theme in an
|
|
39
|
+
* uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there
|
|
40
|
+
* is no `ThemeProvider` ancestor.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useTheme(): DefaultTheme;
|
|
36
43
|
/**
|
|
37
44
|
* Provide a theme to an entire react component tree via context
|
|
38
45
|
*/
|
package/dist/native/index.d.ts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Styled } from '../constructors/constructWithOptions';
|
|
2
3
|
import css from '../constructors/css';
|
|
3
4
|
import withTheme from '../hoc/withTheme';
|
|
4
5
|
import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
|
|
5
|
-
import {
|
|
6
|
+
import { NativeTarget } from '../types';
|
|
6
7
|
import isStyledComponent from '../utils/isStyledComponent';
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
View: Styled<"native", typeof import("react-native").View, {}, never, {}>;
|
|
33
|
-
VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, {}, never, {}>;
|
|
8
|
+
declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
|
|
9
|
+
ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps, import("../types").BaseObject>;
|
|
10
|
+
Button: Styled<"native", typeof import("react-native").Button, import("react-native").ButtonProps, import("../types").BaseObject>;
|
|
11
|
+
DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, import("react-native").DatePickerIOSProps, import("../types").BaseObject>;
|
|
12
|
+
DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, import("react-native").DrawerLayoutAndroidProps, import("../types").BaseObject>;
|
|
13
|
+
FlatList: Styled<"native", typeof import("react-native").FlatList, import("react-native").FlatListProps<unknown>, import("../types").BaseObject>;
|
|
14
|
+
Image: Styled<"native", typeof import("react-native").Image, import("react-native").ImageProps, import("../types").BaseObject>;
|
|
15
|
+
ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, import("react-native").ImageBackgroundProps, import("../types").BaseObject>;
|
|
16
|
+
KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, import("react-native").KeyboardAvoidingViewProps, import("../types").BaseObject>;
|
|
17
|
+
Modal: Styled<"native", typeof import("react-native").Modal, import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps, import("../types").BaseObject>;
|
|
18
|
+
Pressable: Styled<"native", React.ForwardRefExoticComponent<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>>, import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, import("../types").BaseObject>;
|
|
19
|
+
ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, import("react-native").ProgressBarAndroidProps, import("../types").BaseObject>;
|
|
20
|
+
ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, import("react-native").ProgressViewIOSProps, import("../types").BaseObject>;
|
|
21
|
+
RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, import("react-native").RefreshControlProps, import("../types").BaseObject>;
|
|
22
|
+
SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, import("react-native").ViewProps, import("../types").BaseObject>;
|
|
23
|
+
ScrollView: Styled<"native", typeof import("react-native").ScrollView, import("react-native").ScrollViewProps, import("../types").BaseObject>;
|
|
24
|
+
SectionList: Styled<"native", typeof import("react-native").SectionList, import("react-native").SectionListProps<unknown, unknown>, import("../types").BaseObject>;
|
|
25
|
+
Slider: Styled<"native", typeof import("react-native").Slider, import("react-native").SliderProps, import("../types").BaseObject>;
|
|
26
|
+
Switch: Styled<"native", typeof import("react-native").Switch, import("react-native").SwitchProps, import("../types").BaseObject>;
|
|
27
|
+
Text: Styled<"native", typeof import("react-native").Text, import("react-native").TextProps, import("../types").BaseObject>;
|
|
28
|
+
TextInput: Styled<"native", typeof import("react-native").TextInput, import("react-native").TextInputProps, import("../types").BaseObject>;
|
|
29
|
+
TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, import("react-native").TouchableHighlightProps, import("../types").BaseObject>;
|
|
30
|
+
TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, import("react-native").TouchableOpacityProps, import("../types").BaseObject>;
|
|
31
|
+
View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps, import("../types").BaseObject>;
|
|
32
|
+
VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, import("../types").BaseObject>;
|
|
34
33
|
};
|
|
35
|
-
export { DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, Runtime, StyledObject, StyledOptions, } from '../types';
|
|
34
|
+
export { DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
|
|
36
35
|
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
|
|
37
36
|
export { styled, styled as default };
|
package/dist/sheet/Sheet.d.ts
CHANGED
|
@@ -34,7 +34,5 @@ export default class StyleSheet implements Sheet {
|
|
|
34
34
|
clearRules(id: string): void;
|
|
35
35
|
/** Clears the entire tag which deletes all rules but not its names */
|
|
36
36
|
clearTag(): void;
|
|
37
|
-
/** Outputs the current sheet as a CSS string with markers for SSR */
|
|
38
|
-
toString(): string;
|
|
39
37
|
}
|
|
40
38
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("shallowequal"),r=require("stylis"),o=require("@emotion/unitless");function s(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=/*#__PURE__*/s(t),c=/*#__PURE__*/s(n),l=/*#__PURE__*/i(r),u=/*#__PURE__*/s(o),p="undefined"!=typeof process&&void 0!==process.env&&(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&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),f={},y=/invalid hook call/i,m=new Set,v=function(n,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(n).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];y.test(t)?(a=!1,m.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},t.useRef(),a&&!m.has(s)&&(console.warn(s),m.add(s))}catch(e){y.test(e.message)&&m.delete(s)}finally{console.error=i}}},g=Object.freeze([]),S=Object.freeze({});function _(e,t,n){return void 0===n&&(n=S),e.theme!==n.theme&&e.theme||t||n.theme}var w=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),b=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function N(e){return e.replace(b,"-").replace(E,"")}var P=/(a)(d)/gi,C=function(e){return String.fromCharCode(e+(e>25?39:97))};function A(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=C(t%52)+n;return(C(t%52)+n).replace(P,"$1-$2")}var I,O=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},x=function(e){return O(5381,e)};function T(e){return A(x(e)>>>0)}function D(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function R(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var j="function"==typeof Symbol&&Symbol.for,k=j?Symbol.for("react.memo"):60115,V=j?Symbol.for("react.forward_ref"):60112,M={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},F={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},B=((I={})[V]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I[k]=F,I);function $(e){return("type"in(t=e)&&t.type.$$typeof)===k?F:"$$typeof"in e?B[e.$$typeof]:M;var t}var L=Object.defineProperty,G=Object.getOwnPropertyNames,q=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,W=Object.getPrototypeOf,H=Object.prototype;function U(e,t,n){if("string"!=typeof t){if(H){var r=W(t);r&&r!==H&&U(e,r,n)}var o=G(t);q&&(o=o.concat(q(t)));for(var s=$(e),i=$(t),a=0;a<o.length;++a){var c=o[a];if(!(c in z||n&&n[c]||i&&c in i||s&&c in s)){var l=Y(t,c);try{L(e,c,l)}catch(e){}}}}return e}function J(e){return"function"==typeof e}function X(e){return"object"==typeof e&&"styledComponentId"in e}function Z(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function K(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Q(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ee(e,t,n){if(void 0===n&&(n=!1),!n&&!Q(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ee(e[r],t[r]);else if(Q(t))for(var r in t)e[r]=ee(e[r],t[r]);return e}var te="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 ne(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function re(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(ne.apply(void 0,e.__spreadArray([te[t]],n,!1)).trim())}var oe=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 re(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),se=new Map,ie=new Map,ae=1,ce=function(e){if(se.has(e))return se.get(e);for(;ie.has(ae);)ae++;var t=ae++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw re(16,"".concat(t));return se.set(e,t),ie.set(t,e),t},le=function(e,t){se.set(e,t),ie.set(t,e)},ue="style[".concat(p,"][").concat("data-styled-version",'="').concat("6.0.0-rc.3",'"]'),pe=new RegExp("^".concat(p,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),de=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},he=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(pe);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(le(u,l),de(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function fe(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ye=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(p))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(p,"active"),r.setAttribute("data-styled-version","6.0.0-rc.3");var i=fe();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},me=function(){function e(e){this.element=ye(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw re(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),ve=function(){function e(e){this.element=ye(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ge=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}(),Se=d,_e={isServer:!d,useCSSOMInjection:!h},we=function(){function t(t,n,r){void 0===t&&(t=S),void 0===n&&(n={}),this.options=e.__assign(e.__assign({},_e),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&d&&Se&&(Se=!1,function(e){for(var t=document.querySelectorAll(ue),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(p)&&(he(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}return t.registerId=function(e){return ce(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new ge(n):t?new me(n):new ve(n)}(this.options),new oe(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(ce(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(ce(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ce(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t.prototype.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return ie.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(p,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(this)},t}(),be=/&/g,Ee=/^\s*\/\/.*$/gm;function Ne(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ne(e.children,t)),e})}function Pe(e){var t,n,r,o=void 0===e?S:e,s=o.options,i=void 0===s?S:s,a=o.plugins,c=void 0===a?g:a,u=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},p=c.slice();p.push(function(e){e.type===l.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(be,n).replace(r,u))}),i.prefix&&p.push(l.prefixer),p.push(l.stringify);var d=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(Ee,""),u=l.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(u=Ne(u,i.namespace));var d=[];return l.serialize(u,l.middleware(p.concat(l.rulesheet(function(e){return d.push(e)})))),d};return d.hash=c.length?c.reduce(function(e,t){return t.name||re(15),O(e,t.name)},5381).toString():"",d}var Ce=new we,Ae=Pe(),Ie=a.default.createContext({shouldForwardProp:void 0,styleSheet:Ce,stylis:Ae}),Oe=Ie.Consumer,xe=a.default.createContext(void 0);function Te(){return t.useContext(Ie)}function De(e){var n=t.useState(e.stylisPlugins),r=n[0],o=n[1],s=Te().styleSheet,i=t.useMemo(function(){var t=s;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,s]),l=t.useMemo(function(){return Pe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return t.useEffect(function(){c.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),a.default.createElement(Ie.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:l}},a.default.createElement(xe.Provider,{value:l},e.children))}var Re=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ae);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 re(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=Ae),this.name+e.hash},e}(),je=function(e){return e>="A"&&e<="Z"};function ke(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;je(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ve=function(e){return null==e||!1===e||""===e},Me=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ve(i)&&(Array.isArray(i)&&i.isCss||J(i)?o.push("".concat(ke(s),":"),i,";"):Q(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Me(i),!1),["}"],!1)):o.push("".concat(ke(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in u.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function ze(e,t,n,r){if(Ve(e))return[];if(X(e))return[".".concat(e.styledComponentId)];if(J(e)){if(!J(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Re||Q(o)||null===o||console.error("".concat(D(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),ze(o,t,n,r)}var s;return e instanceof Re?n?(e.inject(n,r),[e.getName(r)]):[e]:Q(e)?Me(e):Array.isArray(e)?e.flatMap(function(e){return ze(e,t,n,r)}):[e.toString()]}function Fe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(J(n)&&!X(n))return!1}return!0}var Be=x("6.0.0-rc.3"),$e=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Fe(e),this.componentId=t,this.baseHash=O(Be,t),this.baseStyle=n,we.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Z(r,this.staticRulesId);else{var o=K(ze(this.rules,e,t,n)),s=A(O(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Z(r,s),this.staticRulesId=s}else{for(var a=O(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=O(a,u));else if(u){var p=K(ze(u,e,t,n));a=O(a,p),c+=p}}if(c){var d=A(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=Z(r,d)}}return r},e}(),Le=a.default.createContext(void 0),Ge=Le.Consumer;function qe(){return t.useContext(Le)}var Ye={};function We(n,r,o){var s,i=X(n),c=n,l=!R(n),u=r.componentId,p=void 0===u?function(e,t){var n="string"!=typeof e?"sc":N(e);Ye[n]=(Ye[n]||0)+1;var r="".concat(n,"-").concat(T("6.0.0-rc.3"+n+Ye[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):u,d=r.displayName,h=void 0===d?function(e){return R(e)?"styled.".concat(e):"Styled(".concat(D(e),")")}(n):d,f=null!==(s=r.attrs)&&void 0!==s?s:[],y=r.displayName&&r.componentId?"".concat(N(r.displayName),"-").concat(r.componentId):r.componentId||p,m=i&&c.attrs?c.attrs.concat(f).filter(Boolean):f,g=r.shouldForwardProp;if(i&&c.shouldForwardProp){var b=c.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;g=function(e,t){return b(e,t)&&E(e,t)}}else g=b}var P=new $e(o,y,i?c.componentStyle:void 0),C=P.isStatic&&0===f.length;function A(n,r){return function(n,r,o,s){var i=n.attrs,a=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,p=n.target,d=qe(),h=Te(),f=n.shouldForwardProp||h.shouldForwardProp;"production"!==process.env.NODE_ENV&&t.useDebugValue(u);var y=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=J(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?Z(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=Z(s.className,n.className)),s}(i,r,_(r,d,c)||S),m=y.as||p,v={};for(var g in y)void 0===y[g]||"$"===g[0]||"as"===g||"theme"===g||("forwardedAs"===g?v.as=y.forwardedAs:f&&!f(g,m)||(v[g]=y[g]));var b=function(e,n,r){var o=Te(),s=e.generateAndInjectStyles(n?S:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&t.useDebugValue(s),s}(a,s,y);"production"!==process.env.NODE_ENV&&!s&&n.warnTooManyClasses&&n.warnTooManyClasses(b);var E=Z(l,u);return b&&(E+=" "+b),y.className&&(E+=" "+y.className),v[R(m)&&!w.has(m)?"class":"className"]=E,v.ref=o,t.createElement(m,v)}(I,n,r,C)}A.displayName=h;var I=a.default.forwardRef(A);return I.attrs=m,I.componentStyle=P,I.displayName=h,I.shouldForwardProp=g,I.foldedComponentIds=i?Z(c.foldedComponentIds,c.styledComponentId):"",I.styledComponentId=y,I.target=i?c.target:n,Object.defineProperty(I,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)ee(e,o[r],!0);return e}({},c.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(v(h,y),I.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(h,y)),Object.defineProperty(I,"toString",{value:function(){return".".concat(I.styledComponentId)}}),l&&U(I,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),I}function He(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 Ue=function(e){return Object.assign(e,{isCss:!0})};function Je(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(J(t)||Q(t)){var o=t;return Ue(ze(He(g,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?ze(s):Ue(ze(He(s,n)))}function Xe(t,n,r){if(void 0===r&&(r=S),!n)throw re(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Je.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Xe(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Xe(t,n,e.__assign(e.__assign({},r),o))},o}function Ze(e){return Xe(We,e)}var Ke=Ze;w.forEach(function(e){Ke[e]=Ze(e)});var Qe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Fe(e),we.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(K(ze(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&we.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),et=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=fe(),r=K([n&&'nonce="'.concat(n,'"'),"".concat(p,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.3",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw re(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw re(2);var r=((n={})[p]="",n["data-styled-version"]="6.0.0-rc.3",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=fe();return o&&(r.nonce=o),[a.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new we({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw re(2);return a.default.createElement(De,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw re(3)},t}(),tt={StyleSheet:we,mainSheet:Ce};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var nt="__sc-".concat(p,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[nt]||(window[nt]=0),1===window[nt]&&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[nt]+=1),exports.ServerStyleSheet=et,exports.StyleSheetConsumer=Oe,exports.StyleSheetContext=Ie,exports.StyleSheetManager=De,exports.ThemeConsumer=Ge,exports.ThemeContext=Le,exports.ThemeProvider=function(n){var r=qe(),o=t.useMemo(function(){return function(t,n){if(!t)throw re(14);if(J(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw re(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw re(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?a.default.createElement(Le.Provider,{value:o},n.children):null},exports.__PRIVATE__=tt,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Je.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(T(JSON.stringify(o))),i=new Qe(o,s);"production"!==process.env.NODE_ENV&&v(s);var c=function(e){var t=Te(),n=qe(),r=a.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&a.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.styleSheet.server&&l(r,e,t.styleSheet,n,t.stylis),(a.default.useInsertionEffect||a.default.useLayoutEffect)(function(){if(!t.styleSheet.server)return l(r,e,t.styleSheet,n,t.stylis),function(){return i.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function l(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,f,r,s);else{var a=e.__assign(e.__assign({},n),{theme:_(n,o,c.defaultProps)});i.renderStyles(t,a,r,s)}}return a.default.memo(c)},exports.css=Je,exports.default=Ke,exports.isStyledComponent=X,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=K(Je.apply(void 0,e.__spreadArray([t],n,!1))),s=T(o);return new Re(s,o)},exports.styled=Ke,exports.useTheme=qe,exports.version="6.0.0-rc.3",exports.withTheme=function(t){var n=a.default.forwardRef(function(n,r){var o=_(n,qe(),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(D(t),'"')),a.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(D(t),")"),U(n,t)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/is-prop-valid"),n=require("react"),r=require("shallowequal"),o=require("stylis"),s=require("@emotion/unitless");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=/*#__PURE__*/i(t),l=/*#__PURE__*/i(n),u=/*#__PURE__*/i(r),p=/*#__PURE__*/a(o),d=/*#__PURE__*/i(s),h="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",f="undefined"!=typeof window&&"HTMLElement"in window,y=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),m={},v=/invalid hook call/i,g=new Set,S=function(t,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];v.test(t)?(a=!1,g.delete(s)):i.apply(void 0,e.__spreadArray([t],n,!1))},n.useRef(),a&&!g.has(s)&&(console.warn(s),g.add(s))}catch(e){v.test(e.message)&&g.delete(s)}finally{console.error=i}}},w=Object.freeze([]),_=Object.freeze({});function b(e,t,n){return void 0===n&&(n=_),e.theme!==n.theme&&e.theme||t||n.theme}var E=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),N=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,P=/(^-|-$)/g;function C(e){return e.replace(N,"-").replace(P,"")}var A=/(a)(d)/gi,I=function(e){return String.fromCharCode(e+(e>25?39:97))};function O(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=I(t%52)+n;return(I(t%52)+n).replace(A,"$1-$2")}var x,T=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},D=function(e){return T(5381,e)};function R(e){return O(D(e)>>>0)}function j(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function k(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var M="function"==typeof Symbol&&Symbol.for,V=M?Symbol.for("react.memo"):60115,F=M?Symbol.for("react.forward_ref"):60112,z={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},B={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L=((x={})[F]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},x[V]=B,x);function G(e){return("type"in(t=e)&&t.type.$$typeof)===V?B:"$$typeof"in e?L[e.$$typeof]:z;var t}var q=Object.defineProperty,Y=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,U=Object.getPrototypeOf,J=Object.prototype;function X(e,t,n){if("string"!=typeof t){if(J){var r=U(t);r&&r!==J&&X(e,r,n)}var o=Y(t);W&&(o=o.concat(W(t)));for(var s=G(e),i=G(t),a=0;a<o.length;++a){var c=o[a];if(!(c in $||n&&n[c]||i&&c in i||s&&c in s)){var l=H(t,c);try{q(e,c,l)}catch(e){}}}}return e}function Z(e){return"function"==typeof e}function K(e){return"object"==typeof e&&"styledComponentId"in e}function Q(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ee(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function te(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ne(e,t,n){if(void 0===n&&(n=!1),!n&&!te(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=ne(e[r],t[r]);else if(te(t))for(var r in t)e[r]=ne(e[r],t[r]);return e}function re(e,t){Object.defineProperty(e,"toString",{value:t})}var oe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function ie(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(se.apply(void 0,e.__spreadArray([oe[t]],n,!1)).trim())}var ae=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 ie(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),ce=new Map,le=new Map,ue=1,pe=function(e){if(ce.has(e))return ce.get(e);for(;le.has(ue);)ue++;var t=ue++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw ie(16,"".concat(t));return ce.set(e,t),le.set(t,e),t},de=function(e,t){ce.set(e,t),le.set(t,e)},he="style[".concat(h,"][").concat("data-styled-version",'="').concat("6.0.0-rc.4",'"]'),fe=new RegExp("^".concat(h,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ye=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},me=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(fe);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(de(u,l),ye(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}};function ve(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var ge=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(h))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(h,"active"),r.setAttribute("data-styled-version","6.0.0-rc.4");var i=ve();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Se=function(){function e(e){this.element=ge(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ie(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),we=function(){function e(e){this.element=ge(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_e=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),be=f,Ee={isServer:!f,useCSSOMInjection:!y},Ne=function(){function t(t,n,r){void 0===t&&(t=_),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},Ee),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&f&&be&&(be=!1,function(e){for(var t=document.querySelectorAll(he),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(h)&&(me(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),re(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return le.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(h,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return pe(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new _e(n):t?new Se(n):new we(n)}(this.options),new ae(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(pe(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(pe(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(pe(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),Pe=/&/g,Ce=/^\s*\/\/.*$/gm;function Ae(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ae(e.children,t)),e})}function Ie(e){var t,n,r,o=void 0===e?_:e,s=o.options,i=void 0===s?_:s,a=o.plugins,c=void 0===a?w:a,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===p.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Pe,n).replace(r,l))}),i.prefix&&u.push(p.prefixer),u.push(p.stringify);var d=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(Ce,""),l=p.compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(l=Ae(l,i.namespace));var d=[];return p.serialize(l,p.middleware(u.concat(p.rulesheet(function(e){return d.push(e)})))),d};return d.hash=c.length?c.reduce(function(e,t){return t.name||ie(15),T(e,t.name)},5381).toString():"",d}var Oe=new Ne,xe=Ie(),Te=l.default.createContext({shouldForwardProp:void 0,styleSheet:Oe,stylis:xe}),De=Te.Consumer,Re=l.default.createContext(void 0);function je(){return n.useContext(Te)}function ke(e){var t=n.useState(e.stylisPlugins),r=t[0],o=t[1],s=je().styleSheet,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,s]),a=n.useMemo(function(){return Ie({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);return n.useEffect(function(){u.default(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),l.default.createElement(Te.Provider,{value:{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:a}},l.default.createElement(Re.Provider,{value:a},e.children))}var Me=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,re(this,function(){throw ie(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=xe),this.name+e.hash},e}(),Ve=function(e){return e>="A"&&e<="Z"};function Fe(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Ve(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var ze=function(e){return null==e||!1===e||""===e},$e=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!ze(i)&&(Array.isArray(i)&&i.isCss||Z(i)?o.push("".concat(Fe(s),":"),i,";"):te(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],$e(i),!1),["}"],!1)):o.push("".concat(Fe(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in d.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function Be(e,t,n,r){if(ze(e))return[];if(K(e))return[".".concat(e.styledComponentId)];if(Z(e)){if(!Z(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Me||te(o)||null===o||console.error("".concat(j(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Be(o,t,n,r)}var s;return e instanceof Me?n?(e.inject(n,r),[e.getName(r)]):[e]:te(e)?$e(e):Array.isArray(e)?e.flatMap(function(e){return Be(e,t,n,r)}):[e.toString()]}function Le(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Z(n)&&!K(n))return!1}return!0}var Ge=D("6.0.0-rc.4"),qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Le(e),this.componentId=t,this.baseHash=T(Ge,t),this.baseStyle=n,Ne.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Q(r,this.staticRulesId);else{var o=ee(Be(this.rules,e,t,n)),s=O(T(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Q(r,s),this.staticRulesId=s}else{for(var a=T(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=T(a,u));else if(u){var p=ee(Be(u,e,t,n));a=T(a,p),c+=p}}if(c){var d=O(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=Q(r,d)}}return r},e}(),Ye=l.default.createContext(void 0),We=Ye.Consumer,He={};function Ue(t,r,o){var s=K(t),i=t,a=!k(t),u=r.attrs,p=void 0===u?w:u,d=r.componentId,h=void 0===d?function(e,t){var n="string"!=typeof e?"sc":C(e);He[n]=(He[n]||0)+1;var r="".concat(n,"-").concat(R("6.0.0-rc.4"+n+He[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,f=r.displayName,y=void 0===f?function(e){return k(e)?"styled.".concat(e):"Styled(".concat(j(e),")")}(t):f,m=r.displayName&&r.componentId?"".concat(C(r.displayName),"-").concat(r.componentId):r.componentId||h,v=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,g=r.shouldForwardProp;if(s&&i.shouldForwardProp){var N=i.shouldForwardProp;if(r.shouldForwardProp){var P=r.shouldForwardProp;g=function(e,t){return N(e,t)&&P(e,t)}}else g=N}var A=new qe(o,m,s?i.componentStyle:void 0),I=A.isStatic&&0===p.length;function O(t,r){return function(t,r,o,s){var i=t.attrs,a=t.componentStyle,u=t.defaultProps,p=t.foldedComponentIds,d=t.styledComponentId,h=t.target,f=l.default.useContext(Ye),y=je(),m=t.shouldForwardProp||y.shouldForwardProp;"production"!==process.env.NODE_ENV&&n.useDebugValue(d);var v=function(t,n,r){for(var o,s=e.__assign(e.__assign({},n),{className:void 0,theme:r}),i=0;i<t.length;i+=1){var a=Z(o=t[i])?o(s):o;for(var c in a)s[c]="className"===c?Q(s[c],a[c]):"style"===c?e.__assign(e.__assign({},s[c]),a[c]):a[c]}return n.className&&(s.className=Q(s.className,n.className)),s}(i,r,b(r,f,u)||_),g=v.as||h,S={};for(var w in v)void 0===v[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?S.as=v.forwardedAs:m&&!m(w,g)||(S[w]=v[w],"development"!==process.env.NODE_ENV||c.default(w)||console.warn('styled-components: it looks like an unknown prop "'.concat(w,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)'))));var N=function(e,t,r){var o=je(),s=e.generateAndInjectStyles(t?_:r,o.styleSheet,o.stylis);return"production"!==process.env.NODE_ENV&&n.useDebugValue(s),s}(a,s,v);"production"!==process.env.NODE_ENV&&!s&&t.warnTooManyClasses&&t.warnTooManyClasses(N);var P=Q(p,d);return N&&(P+=" "+N),v.className&&(P+=" "+v.className),S[k(g)&&!E.has(g)?"class":"className"]=P,S.ref=o,n.createElement(g,S)}(x,t,r,I)}O.displayName=y;var x=l.default.forwardRef(O);return x.attrs=v,x.componentStyle=A,x.displayName=y,x.shouldForwardProp=g,x.foldedComponentIds=s?Q(i.foldedComponentIds,i.styledComponentId):"",x.styledComponentId=m,x.target=s?i.target:t,Object.defineProperty(x,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)ne(e,o[r],!0);return e}({},i.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(S(y,m),x.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(y,m)),re(x,function(){return".".concat(x.styledComponentId)}),a&&X(x,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}function Je(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 Xe=function(e){return Object.assign(e,{isCss:!0})};function Ze(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(Z(t)||te(t)){var o=t;return Xe(Be(Je(w,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?Be(s):Xe(Be(Je(s,n)))}function Ke(t,n,r){if(void 0===r&&(r=_),!n)throw ie(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,Ze.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return Ke(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ke(t,n,e.__assign(e.__assign({},r),o))},o}var Qe=function(e){return Ke(Ue,e)},et=Qe;E.forEach(function(e){et[e]=Qe(e)});var tt=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Le(e),Ne.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var o=r(ee(Be(this.rules,t,n,r)),""),s=this.componentId+e;n.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Ne.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),nt=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ve(),r=ee([n&&'nonce="'.concat(n,'"'),"".concat(h,'="true"'),"".concat("data-styled-version",'="').concat("6.0.0-rc.4",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw ie(2);return t._emitSheetCSS()},this.getStyleElement=function(){var n;if(t.sealed)throw ie(2);var r=((n={})[h]="",n["data-styled-version"]="6.0.0-rc.4",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),o=ve();return o&&(r.nonce=o),[l.default.createElement("style",e.__assign({},r,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new Ne({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(e){if(this.sealed)throw ie(2);return l.default.createElement(ke,{sheet:this.instance},e)},t.prototype.interleaveWithNodeStream=function(e){throw ie(3)},t}(),rt={StyleSheet:Ne,mainSheet:Oe};"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var ot="__sc-".concat(h,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[ot]||(window[ot]=0),1===window[ot]&&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[ot]+=1),exports.ServerStyleSheet=nt,exports.StyleSheetConsumer=De,exports.StyleSheetContext=Te,exports.StyleSheetManager=ke,exports.ThemeConsumer=We,exports.ThemeContext=Ye,exports.ThemeProvider=function(t){var r=l.default.useContext(Ye),o=n.useMemo(function(){return function(t,n){if(!t)throw ie(14);if(Z(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw ie(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw ie(8);return n?e.__assign(e.__assign({},n),t):t}(t.theme,r)},[t.theme,r]);return t.children?l.default.createElement(Ye.Provider,{value:o},t.children):null},exports.__PRIVATE__=rt,exports.createGlobalStyle=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Ze.apply(void 0,e.__spreadArray([t],n,!1)),s="sc-global-".concat(R(JSON.stringify(o))),i=new tt(o,s);"production"!==process.env.NODE_ENV&&S(s);var a=function(e){var t=je(),n=l.default.useContext(Ye),r=l.default.useRef(t.styleSheet.allocateGSInstance(s)).current;return"production"!==process.env.NODE_ENV&&l.default.Children.count(e.children)&&console.warn("The global style component ".concat(s," was given child JSX. createGlobalStyle does not render children.")),"production"!==process.env.NODE_ENV&&o.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.styleSheet.server&&c(r,e,t.styleSheet,n,t.stylis),(l.default.useInsertionEffect||l.default.useLayoutEffect)(function(){if(!t.styleSheet.server)return c(r,e,t.styleSheet,n,t.stylis),function(){return i.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function c(t,n,r,o,s){if(i.isStatic)i.renderStyles(t,m,r,s);else{var c=e.__assign(e.__assign({},n),{theme:b(n,o,a.defaultProps)});i.renderStyles(t,c,r,s)}}return l.default.memo(a)},exports.css=Ze,exports.default=et,exports.isStyledComponent=K,exports.keyframes=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=ee(Ze.apply(void 0,e.__spreadArray([t],n,!1))),s=R(o);return new Me(s,o)},exports.styled=et,exports.useTheme=function(){var e=n.useContext(Ye);if(!e)throw ie(18);return e},exports.version="6.0.0-rc.4",exports.withTheme=function(t){var n=l.default.forwardRef(function(n,r){var o=b(n,l.default.useContext(Ye),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(j(t),'"')),l.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(j(t),")"),X(n,t)};
|
|
2
2
|
//# sourceMappingURL=styled-components.browser.cjs.js.map
|