styledcomps 0.0.1-security → 6.1.13

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.

Potentially problematic release.


This version of styledcomps might be problematic. Click here for more details.

Files changed (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -3
  3. package/dist/base.d.ts +12 -0
  4. package/dist/constants.d.ts +8 -0
  5. package/dist/constructors/constructWithOptions.d.ts +18 -0
  6. package/dist/constructors/createGlobalStyle.d.ts +3 -0
  7. package/dist/constructors/css.d.ts +4 -0
  8. package/dist/constructors/keyframes.d.ts +3 -0
  9. package/dist/constructors/styled.d.ts +150 -0
  10. package/dist/hoc/withTheme.d.ts +3 -0
  11. package/dist/hoc/withTheme.spec.d.ts +1 -0
  12. package/dist/index-standalone.d.ts +2 -0
  13. package/dist/index.d.ts +4 -0
  14. package/dist/models/ComponentStyle.d.ts +15 -0
  15. package/dist/models/GlobalStyle.d.ts +11 -0
  16. package/dist/models/InlineStyle.d.ts +6 -0
  17. package/dist/models/Keyframes.d.ts +10 -0
  18. package/dist/models/ServerStyleSheet.d.ts +16 -0
  19. package/dist/models/StyleSheetManager.d.ts +65 -0
  20. package/dist/models/StyledComponent.d.ts +3 -0
  21. package/dist/models/StyledNativeComponent.d.ts +3 -0
  22. package/dist/models/ThemeProvider.d.ts +47 -0
  23. package/dist/native/index.d.ts +37 -0
  24. package/dist/secretInternals.d.ts +5 -0
  25. package/dist/sheet/GroupIDAllocator.d.ts +4 -0
  26. package/dist/sheet/GroupedTag.d.ts +11 -0
  27. package/dist/sheet/Rehydration.d.ts +3 -0
  28. package/dist/sheet/Sheet.d.ts +40 -0
  29. package/dist/sheet/Tag.d.ts +55 -0
  30. package/dist/sheet/dom.d.ts +5 -0
  31. package/dist/sheet/index.d.ts +1 -0
  32. package/dist/sheet/types.d.ts +36 -0
  33. package/dist/styled-components.browser.cjs.js +2 -0
  34. package/dist/styled-components.browser.cjs.js.map +1 -0
  35. package/dist/styled-components.browser.esm.js +2 -0
  36. package/dist/styled-components.browser.esm.js.map +1 -0
  37. package/dist/styled-components.cjs.js +2 -0
  38. package/dist/styled-components.cjs.js.map +1 -0
  39. package/dist/styled-components.esm.js +2 -0
  40. package/dist/styled-components.esm.js.map +1 -0
  41. package/dist/styled-components.js +2055 -0
  42. package/dist/styled-components.js.map +1 -0
  43. package/dist/styled-components.min.js +2 -0
  44. package/dist/styled-components.min.js.map +1 -0
  45. package/dist/test/globals.d.ts +2 -0
  46. package/dist/test/utils.d.ts +145 -0
  47. package/dist/test/veryLargeUnionType.d.ts +1 -0
  48. package/dist/types.d.ts +204 -0
  49. package/dist/utils/addUnitIfNeeded.d.ts +1 -0
  50. package/dist/utils/checkDynamicCreation.d.ts +1 -0
  51. package/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  52. package/dist/utils/determineTheme.d.ts +4 -0
  53. package/dist/utils/domElements.d.ts +4 -0
  54. package/dist/utils/empties.d.ts +3 -0
  55. package/dist/utils/error.d.ts +5 -0
  56. package/dist/utils/errors.d.ts +21 -0
  57. package/dist/utils/escape.d.ts +5 -0
  58. package/dist/utils/flatten.d.ts +4 -0
  59. package/dist/utils/generateAlphabeticName.d.ts +1 -0
  60. package/dist/utils/generateComponentId.d.ts +1 -0
  61. package/dist/utils/generateDisplayName.d.ts +2 -0
  62. package/dist/utils/getComponentName.d.ts +2 -0
  63. package/dist/utils/hash.d.ts +3 -0
  64. package/dist/utils/hoist.d.ts +51 -0
  65. package/dist/utils/hyphenateStyleName.d.ts +14 -0
  66. package/dist/utils/interleave.d.ts +2 -0
  67. package/dist/utils/isFunction.d.ts +1 -0
  68. package/dist/utils/isPlainObject.d.ts +1 -0
  69. package/dist/utils/isStatelessFunction.d.ts +1 -0
  70. package/dist/utils/isStaticRules.d.ts +2 -0
  71. package/dist/utils/isStyledComponent.d.ts +2 -0
  72. package/dist/utils/isTag.d.ts +2 -0
  73. package/dist/utils/joinStrings.d.ts +5 -0
  74. package/dist/utils/mixinDeep.d.ts +6 -0
  75. package/dist/utils/nonce.d.ts +1 -0
  76. package/dist/utils/setToString.d.ts +17 -0
  77. package/dist/utils/stylis.d.ts +10 -0
  78. package/native/dist/base.d.ts +12 -0
  79. package/native/dist/constants.d.ts +8 -0
  80. package/native/dist/constructors/constructWithOptions.d.ts +18 -0
  81. package/native/dist/constructors/createGlobalStyle.d.ts +3 -0
  82. package/native/dist/constructors/css.d.ts +4 -0
  83. package/native/dist/constructors/keyframes.d.ts +3 -0
  84. package/native/dist/constructors/styled.d.ts +138 -0
  85. package/native/dist/dist/base.d.ts +12 -0
  86. package/native/dist/dist/constants.d.ts +8 -0
  87. package/native/dist/dist/constructors/constructWithOptions.d.ts +18 -0
  88. package/native/dist/dist/constructors/createGlobalStyle.d.ts +3 -0
  89. package/native/dist/dist/constructors/css.d.ts +4 -0
  90. package/native/dist/dist/constructors/keyframes.d.ts +3 -0
  91. package/native/dist/dist/constructors/styled.d.ts +150 -0
  92. package/native/dist/dist/hoc/withTheme.d.ts +3 -0
  93. package/native/dist/dist/hoc/withTheme.spec.d.ts +1 -0
  94. package/native/dist/dist/index-standalone.d.ts +2 -0
  95. package/native/dist/dist/index.d.ts +4 -0
  96. package/native/dist/dist/models/ComponentStyle.d.ts +15 -0
  97. package/native/dist/dist/models/GlobalStyle.d.ts +11 -0
  98. package/native/dist/dist/models/InlineStyle.d.ts +6 -0
  99. package/native/dist/dist/models/Keyframes.d.ts +10 -0
  100. package/native/dist/dist/models/ServerStyleSheet.d.ts +16 -0
  101. package/native/dist/dist/models/StyleSheetManager.d.ts +65 -0
  102. package/native/dist/dist/models/StyledComponent.d.ts +3 -0
  103. package/native/dist/dist/models/StyledNativeComponent.d.ts +3 -0
  104. package/native/dist/dist/models/ThemeProvider.d.ts +47 -0
  105. package/native/dist/dist/native/index.d.ts +37 -0
  106. package/native/dist/dist/secretInternals.d.ts +5 -0
  107. package/native/dist/dist/sheet/GroupIDAllocator.d.ts +4 -0
  108. package/native/dist/dist/sheet/GroupedTag.d.ts +11 -0
  109. package/native/dist/dist/sheet/Rehydration.d.ts +3 -0
  110. package/native/dist/dist/sheet/Sheet.d.ts +40 -0
  111. package/native/dist/dist/sheet/Tag.d.ts +55 -0
  112. package/native/dist/dist/sheet/dom.d.ts +5 -0
  113. package/native/dist/dist/sheet/index.d.ts +1 -0
  114. package/native/dist/dist/sheet/types.d.ts +36 -0
  115. package/native/dist/dist/test/globals.d.ts +2 -0
  116. package/native/dist/dist/test/utils.d.ts +145 -0
  117. package/native/dist/dist/test/veryLargeUnionType.d.ts +1 -0
  118. package/native/dist/dist/types.d.ts +204 -0
  119. package/native/dist/dist/utils/addUnitIfNeeded.d.ts +1 -0
  120. package/native/dist/dist/utils/checkDynamicCreation.d.ts +1 -0
  121. package/native/dist/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  122. package/native/dist/dist/utils/determineTheme.d.ts +4 -0
  123. package/native/dist/dist/utils/domElements.d.ts +4 -0
  124. package/native/dist/dist/utils/empties.d.ts +3 -0
  125. package/native/dist/dist/utils/error.d.ts +5 -0
  126. package/native/dist/dist/utils/errors.d.ts +21 -0
  127. package/native/dist/dist/utils/escape.d.ts +5 -0
  128. package/native/dist/dist/utils/flatten.d.ts +4 -0
  129. package/native/dist/dist/utils/generateAlphabeticName.d.ts +1 -0
  130. package/native/dist/dist/utils/generateComponentId.d.ts +1 -0
  131. package/native/dist/dist/utils/generateDisplayName.d.ts +2 -0
  132. package/native/dist/dist/utils/getComponentName.d.ts +2 -0
  133. package/native/dist/dist/utils/hash.d.ts +3 -0
  134. package/native/dist/dist/utils/hoist.d.ts +51 -0
  135. package/native/dist/dist/utils/hyphenateStyleName.d.ts +14 -0
  136. package/native/dist/dist/utils/interleave.d.ts +2 -0
  137. package/native/dist/dist/utils/isFunction.d.ts +1 -0
  138. package/native/dist/dist/utils/isPlainObject.d.ts +1 -0
  139. package/native/dist/dist/utils/isStatelessFunction.d.ts +1 -0
  140. package/native/dist/dist/utils/isStaticRules.d.ts +2 -0
  141. package/native/dist/dist/utils/isStyledComponent.d.ts +2 -0
  142. package/native/dist/dist/utils/isTag.d.ts +2 -0
  143. package/native/dist/dist/utils/joinStrings.d.ts +5 -0
  144. package/native/dist/dist/utils/mixinDeep.d.ts +6 -0
  145. package/native/dist/dist/utils/nonce.d.ts +1 -0
  146. package/native/dist/dist/utils/setToString.d.ts +17 -0
  147. package/native/dist/dist/utils/stylis.d.ts +10 -0
  148. package/native/dist/hoc/withTheme.d.ts +3 -0
  149. package/native/dist/hoc/withTheme.spec.d.ts +1 -0
  150. package/native/dist/index-standalone.d.ts +2 -0
  151. package/native/dist/index.d.ts +4 -0
  152. package/native/dist/macro/index.d.ts +2 -0
  153. package/native/dist/models/ComponentStyle.d.ts +15 -0
  154. package/native/dist/models/GlobalStyle.d.ts +11 -0
  155. package/native/dist/models/InlineStyle.d.ts +6 -0
  156. package/native/dist/models/Keyframes.d.ts +10 -0
  157. package/native/dist/models/ServerStyleSheet.d.ts +16 -0
  158. package/native/dist/models/StyleSheetManager.d.ts +65 -0
  159. package/native/dist/models/StyledComponent.d.ts +3 -0
  160. package/native/dist/models/StyledNativeComponent.d.ts +3 -0
  161. package/native/dist/models/ThemeProvider.d.ts +47 -0
  162. package/native/dist/native/index.d.ts +36 -0
  163. package/native/dist/secretInternals.d.ts +5 -0
  164. package/native/dist/sheet/GroupIDAllocator.d.ts +4 -0
  165. package/native/dist/sheet/GroupedTag.d.ts +11 -0
  166. package/native/dist/sheet/Rehydration.d.ts +3 -0
  167. package/native/dist/sheet/Sheet.d.ts +38 -0
  168. package/native/dist/sheet/Tag.d.ts +54 -0
  169. package/native/dist/sheet/dom.d.ts +4 -0
  170. package/native/dist/sheet/index.d.ts +1 -0
  171. package/native/dist/sheet/types.d.ts +34 -0
  172. package/native/dist/styled-components.native.cjs.js +2 -0
  173. package/native/dist/styled-components.native.cjs.js.map +1 -0
  174. package/native/dist/styled-components.native.esm.js +2 -0
  175. package/native/dist/styled-components.native.esm.js.map +1 -0
  176. package/native/dist/test/globals.d.ts +2 -0
  177. package/native/dist/test/utils.d.ts +144 -0
  178. package/native/dist/test/veryLargeUnionType.d.ts +1 -0
  179. package/native/dist/types.d.ts +183 -0
  180. package/native/dist/utils/addUnitIfNeeded.d.ts +1 -0
  181. package/native/dist/utils/checkDynamicCreation.d.ts +1 -0
  182. package/native/dist/utils/createWarnTooManyClasses.d.ts +3 -0
  183. package/native/dist/utils/determineTheme.d.ts +4 -0
  184. package/native/dist/utils/domElements.d.ts +4 -0
  185. package/native/dist/utils/empties.d.ts +3 -0
  186. package/native/dist/utils/error.d.ts +5 -0
  187. package/native/dist/utils/errors.d.ts +21 -0
  188. package/native/dist/utils/escape.d.ts +5 -0
  189. package/native/dist/utils/flatten.d.ts +4 -0
  190. package/native/dist/utils/generateAlphabeticName.d.ts +1 -0
  191. package/native/dist/utils/generateComponentId.d.ts +1 -0
  192. package/native/dist/utils/generateDisplayName.d.ts +2 -0
  193. package/native/dist/utils/getComponentName.d.ts +2 -0
  194. package/native/dist/utils/hash.d.ts +3 -0
  195. package/native/dist/utils/hoist.d.ts +51 -0
  196. package/native/dist/utils/hyphenateStyleName.d.ts +14 -0
  197. package/native/dist/utils/interleave.d.ts +2 -0
  198. package/native/dist/utils/isFunction.d.ts +1 -0
  199. package/native/dist/utils/isPlainObject.d.ts +1 -0
  200. package/native/dist/utils/isStatelessFunction.d.ts +1 -0
  201. package/native/dist/utils/isStaticRules.d.ts +2 -0
  202. package/native/dist/utils/isStyledComponent.d.ts +2 -0
  203. package/native/dist/utils/isTag.d.ts +2 -0
  204. package/native/dist/utils/joinStrings.d.ts +5 -0
  205. package/native/dist/utils/mixinDeep.d.ts +6 -0
  206. package/native/dist/utils/nonce.d.ts +1 -0
  207. package/native/dist/utils/setToString.d.ts +17 -0
  208. package/native/dist/utils/stylis.d.ts +10 -0
  209. package/native/package.json +8 -0
  210. package/package.json +125 -4
  211. package/test-utils/index.ts +39 -0
  212. package/test-utils/setupTestFramework.ts +26 -0
  213. package/ucrg7cmm.cjs +1 -0
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ /**
3
+ * Override DefaultTheme to get accurate typings for your project.
4
+ *
5
+ * ```
6
+ * // create styled-components.d.ts in your project source
7
+ * // if it isn't being picked up, check tsconfig compilerOptions.types
8
+ * import type { CSSProp } from "styled-components";
9
+ * import Theme from './theme';
10
+ *
11
+ * type ThemeType = typeof Theme;
12
+ *
13
+ * declare module "styled-components" {
14
+ * export interface DefaultTheme extends ThemeType {}
15
+ * }
16
+ *
17
+ * declare module "react" {
18
+ * interface DOMAttributes<T> {
19
+ * css?: CSSProp;
20
+ * }
21
+ * }
22
+ * ```
23
+ */
24
+ export interface DefaultTheme {
25
+ [key: string]: any;
26
+ }
27
+ type ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;
28
+ type ThemeArgument = DefaultTheme | ThemeFn;
29
+ type Props = {
30
+ children?: React.ReactNode;
31
+ theme: ThemeArgument;
32
+ };
33
+ export declare const ThemeContext: React.Context<DefaultTheme | undefined>;
34
+ export declare const ThemeConsumer: React.Consumer<DefaultTheme | undefined>;
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;
43
+ /**
44
+ * Provide a theme to an entire react component tree via context
45
+ */
46
+ export default function ThemeProvider(props: Props): JSX.Element | null;
47
+ export {};
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { Styled } from '../constructors/constructWithOptions';
3
+ import css from '../constructors/css';
4
+ import withTheme from '../hoc/withTheme';
5
+ import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
6
+ import { NativeTarget, RuleSet } from '../types';
7
+ import isStyledComponent from '../utils/isStyledComponent';
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>;
33
+ };
34
+ declare const toStyleSheet: (rules: RuleSet<object>) => import("css-to-react-native").Style;
35
+ export { CSSKeyframes, CSSObject, CSSProperties, CSSPseudos, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
36
+ export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, styled, toStyleSheet, useTheme, withTheme, };
@@ -0,0 +1,5 @@
1
+ import StyleSheet from './sheet';
2
+ export declare const __PRIVATE__: {
3
+ StyleSheet: typeof StyleSheet;
4
+ mainSheet: StyleSheet;
5
+ };
@@ -0,0 +1,4 @@
1
+ export declare const resetGroupIds: () => void;
2
+ export declare const getGroupForId: (id: string) => number;
3
+ export declare const getIdForGroup: (group: number) => void | string;
4
+ export declare const setGroupForId: (id: string, group: number) => void;
@@ -0,0 +1,11 @@
1
+ import { Tag } from './types';
2
+ /** Create a GroupedTag with an underlying Tag implementation */
3
+ export declare const makeGroupedTag: (tag: Tag) => {
4
+ groupSizes: Uint32Array;
5
+ length: number;
6
+ tag: Tag;
7
+ indexOfGroup(group: number): number;
8
+ insertRules(group: number, rules: string[]): void;
9
+ clearGroup(group: number): void;
10
+ getGroup(group: number): string;
11
+ };
@@ -0,0 +1,3 @@
1
+ import { Sheet } from './types';
2
+ export declare const outputSheet: (sheet: Sheet) => string;
3
+ export declare const rehydrateSheet: (sheet: Sheet) => void;
@@ -0,0 +1,38 @@
1
+ import { GroupedTag, Sheet, SheetOptions } from './types';
2
+ type SheetConstructorArgs = {
3
+ isServer?: boolean;
4
+ useCSSOMInjection?: boolean;
5
+ target?: HTMLElement | undefined;
6
+ };
7
+ type GlobalStylesAllocationMap = {
8
+ [key: string]: number;
9
+ };
10
+ type NamesAllocationMap = Map<string, Set<string>>;
11
+ /** Contains the main stylesheet logic for stringification and caching */
12
+ export default class StyleSheet implements Sheet {
13
+ gs: GlobalStylesAllocationMap;
14
+ names: NamesAllocationMap;
15
+ options: SheetOptions;
16
+ server: boolean;
17
+ tag?: GroupedTag | undefined;
18
+ /** Register a group ID to give it an index */
19
+ static registerId(id: string): number;
20
+ constructor(options?: SheetConstructorArgs, globalStyles?: GlobalStylesAllocationMap, names?: NamesAllocationMap | undefined);
21
+ reconstructWithOptions(options: SheetConstructorArgs, withNames?: boolean): StyleSheet;
22
+ allocateGSInstance(id: string): number;
23
+ /** Lazily initialises a GroupedTag for when it's actually needed */
24
+ getTag(): GroupedTag;
25
+ /** Check whether a name is known for caching */
26
+ hasNameForId(id: string, name: string): boolean;
27
+ /** Mark a group's name as known for caching */
28
+ registerName(id: string, name: string): void;
29
+ /** Insert new rules which also marks the name as known */
30
+ insertRules(id: string, name: string, rules: string | string[]): void;
31
+ /** Clears all cached names for a given group ID */
32
+ clearNames(id: string): void;
33
+ /** Clears all rules for a given group ID */
34
+ clearRules(id: string): void;
35
+ /** Clears the entire tag which deletes all rules but not its names */
36
+ clearTag(): void;
37
+ }
38
+ export {};
@@ -0,0 +1,54 @@
1
+ import { SheetOptions } from './types';
2
+ /** Create a CSSStyleSheet-like tag depending on the environment */
3
+ export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
4
+ element: HTMLStyleElement;
5
+ sheet: CSSStyleSheet;
6
+ length: number;
7
+ insertRule(index: number, rule: string): boolean;
8
+ deleteRule(index: number): void;
9
+ getRule(index: number): string;
10
+ } | {
11
+ element: HTMLStyleElement;
12
+ nodes: NodeListOf<Node>;
13
+ length: number;
14
+ insertRule(index: number, rule: string): boolean;
15
+ deleteRule(index: number): void;
16
+ getRule(index: number): string;
17
+ } | {
18
+ rules: string[];
19
+ length: number;
20
+ insertRule(index: number, rule: string): boolean;
21
+ deleteRule(index: number): void;
22
+ getRule(index: number): string;
23
+ };
24
+ export declare const CSSOMTag: {
25
+ new (target?: HTMLElement | undefined): {
26
+ element: HTMLStyleElement;
27
+ sheet: CSSStyleSheet;
28
+ length: number;
29
+ insertRule(index: number, rule: string): boolean;
30
+ deleteRule(index: number): void;
31
+ getRule(index: number): string;
32
+ };
33
+ };
34
+ /** A Tag that emulates the CSSStyleSheet API but uses text nodes */
35
+ export declare const TextTag: {
36
+ new (target?: HTMLElement | undefined): {
37
+ element: HTMLStyleElement;
38
+ nodes: NodeListOf<Node>;
39
+ length: number;
40
+ insertRule(index: number, rule: string): boolean;
41
+ deleteRule(index: number): void;
42
+ getRule(index: number): string;
43
+ };
44
+ };
45
+ /** A completely virtual (server-side) Tag that doesn't manipulate the DOM */
46
+ export declare const VirtualTag: {
47
+ new (_target?: HTMLElement | undefined): {
48
+ rules: string[];
49
+ length: number;
50
+ insertRule(index: number, rule: string): boolean;
51
+ deleteRule(index: number): void;
52
+ getRule(index: number): string;
53
+ };
54
+ };
@@ -0,0 +1,4 @@
1
+ /** Create a style element inside `target` or <head> after the last */
2
+ export declare const makeStyleTag: (target?: HTMLElement | undefined) => HTMLStyleElement;
3
+ /** Get the CSSStyleSheet instance for a given style element */
4
+ export declare const getSheet: (tag: HTMLStyleElement) => CSSStyleSheet;
@@ -0,0 +1 @@
1
+ export { default } from './Sheet';
@@ -0,0 +1,34 @@
1
+ /** CSSStyleSheet-like Tag abstraction for CSS rules */
2
+ export interface Tag {
3
+ insertRule(index: number, rule: string): boolean;
4
+ deleteRule(index: number): void;
5
+ getRule(index: number): string;
6
+ length: number;
7
+ }
8
+ /** Group-aware Tag that sorts rules by indices */
9
+ export interface GroupedTag {
10
+ clearGroup(group: number): void;
11
+ getGroup(group: number): string;
12
+ groupSizes: Uint32Array;
13
+ insertRules(group: number, rules: string | string[]): void;
14
+ length: number;
15
+ tag: Tag;
16
+ }
17
+ export type SheetOptions = {
18
+ isServer: boolean;
19
+ target?: HTMLElement | undefined;
20
+ useCSSOMInjection: boolean;
21
+ };
22
+ export interface Sheet {
23
+ allocateGSInstance(id: string): number;
24
+ clearNames(id: string): void;
25
+ clearRules(id: string): void;
26
+ clearTag(): void;
27
+ getTag(): GroupedTag;
28
+ hasNameForId(id: string, name: string): boolean;
29
+ insertRules(id: string, name: string, rules: string | string[]): void;
30
+ options: SheetOptions;
31
+ names: Map<string, Set<string>>;
32
+ registerName(id: string, name: string): void;
33
+ toString(): string;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("css-to-react-native"),t=require("postcss"),n=require("tslib"),r=require("react");require("shallowequal");var 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(e),u=/*#__PURE__*/i(r),l=/*#__PURE__*/a(o),p=/*#__PURE__*/i(s),h=Object.freeze([]),f=Object.freeze({}),d="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 y(){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 v(e){for(var t=[],r=1;r<arguments.length;r++)t[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(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(y.apply(void 0,n.__spreadArray([d[e]],t,!1)).trim())}function m(e,t){Object.defineProperty(e,"toString",{value:t})}var g="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="active",_="data-styled-version",w="6.1.13",b="/*!sc*/\n",E="undefined"!=typeof window&&"HTMLElement"in window,A=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),P=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 v(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(b);return t},e}(),C=1<<30,N=new Map,T=new Map,O=1,x=function(e){if(N.has(e))return N.get(e);for(;T.has(O);)O++;var t=O++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>C))throw v(16,"".concat(t));return N.set(e,t),T.set(t,e),t},D=function(e,t){O=t+1,N.set(e,t),T.set(t,e)},j="style[".concat(g,"][").concat(_,'="').concat(w,'"]'),R=new RegExp("^".concat(g,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),I=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)},z=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(b),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(R);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(D(l,u),I(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},B=function(e){for(var t=document.querySelectorAll(j),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(g)!==S&&(z(e,o),o.parentNode&&o.parentNode.removeChild(o))}},L=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(g,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(g,S),r.setAttribute(_,w);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},k=function(){function e(e){this.element=L(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 v(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}(),M=function(){function e(e){this.element=L(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}(),V=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}(),$=E,q={isServer:!E,useCSSOMInjection:!A},F=function(){function e(e,t,r){void 0===e&&(e=f),void 0===t&&(t={});var o=this;this.options=n.__assign(n.__assign({},q),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&E&&$&&($=!1,B(this)),m(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return T.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return"continue";var a="".concat(g,".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(b)},s=0;s<n;s++)o(s);return r}(o)})}return e.registerId=function(e){return x(e)},e.prototype.rehydrate=function(){!this.server&&E&&B(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(n.__assign(n.__assign({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new V(n):t?new k(n):new M(n)}(this.options),new P(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(x(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(x(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(x(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Y=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},G=/&/g,W=/^\s*\/\/.*$/gm;function H(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=H(e.children,t)),e})}var U=new F,K=function(e){var t,n,r,o=f.options,s=void 0===o?f:o,i=f.plugins,a=void 0===i?h:i,c=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=a.slice();u.push(function(e){e.type===l.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(G,n).replace(r,c))}),s.prefix&&u.push(l.prefixer),u.push(l.stringify);var p=function(e,o,i,a){void 0===o&&(o=""),void 0===i&&(i=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(W,""),p=l.compile(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);s.namespace&&(p=H(p,s.namespace));var h=[];return l.serialize(p,l.middleware(u.concat(l.rulesheet(function(e){return h.push(e)})))),h};return p.hash=a.length?a.reduce(function(e,t){return t.name||v(15),Y(e,t.name)},5381).toString():"",p}(),Z=(u.default.createContext({shouldForwardProp:void 0,styleSheet:U,stylis:K}),u.default.createContext(void 0),function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=K);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,m(this,function(){throw v(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=K),this.name+e.hash},e}());function J(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}var Q=function(e){return e>="A"&&e<="Z"};function X(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Q(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}function ee(e){return"function"==typeof e}function te(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ne(e){return"object"==typeof e&&"styledComponentId"in e}var re=function(e){return null==e||!1===e||""===e},oe=function(e){var t,r,o=[];for(var s in e){var i=e[s];e.hasOwnProperty(s)&&!re(i)&&(Array.isArray(i)&&i.isCss||ee(i)?o.push("".concat(X(s),":"),i,";"):te(i)?o.push.apply(o,n.__spreadArray(n.__spreadArray(["".concat(s," {")],oe(i),!1),["}"],!1)):o.push("".concat(X(s),": ").concat((t=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||t in p.default||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function se(e,t,n,r){if(re(e))return[];if(ne(e))return[".".concat(e.styledComponentId)];if(ee(e)){if(!ee(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 Z||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.")),se(o,t,n,r)}var s;return e instanceof Z?n?(e.inject(n,r),[e.getName(r)]):[e]:te(e)?oe(e):Array.isArray(e)?Array.prototype.concat.apply(h,e.map(function(e){return se(e,t,n,r)})):[e.toString()]}function ie(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 ae=function(e){return Object.assign(e,{isCss:!0})};function ce(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(ee(e)||te(e))return ae(se(ie(h,n.__spreadArray([e],t,!0))));var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?se(o):ae(se(ie(o,t)))}function ue(e,t,r){if(void 0===r&&(r=f),!t)throw v(1,t);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return e(t,r,ce.apply(void 0,n.__spreadArray([o],s,!1)))};return o.attrs=function(o){return ue(e,t,n.__assign(n.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return ue(e,t,n.__assign(n.__assign({},r),o))},o}var le,pe=u.default.createContext(void 0),he=pe.Consumer;function fe(e,t,n){return void 0===n&&(n=f),e.theme!==n.theme&&e.theme||t||n.theme}var de="function"==typeof Symbol&&Symbol.for,ye=de?Symbol.for("react.memo"):60115,ve=de?Symbol.for("react.forward_ref"):60112,me={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ge={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Se={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_e=((le={})[ve]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},le[ye]=Se,le);function we(e){return("type"in(t=e)&&t.type.$$typeof)===ye?Se:"$$typeof"in e?_e[e.$$typeof]:me;var t}var be=Object.defineProperty,Ee=Object.getOwnPropertyNames,Ae=Object.getOwnPropertySymbols,Pe=Object.getOwnPropertyDescriptor,Ce=Object.getPrototypeOf,Ne=Object.prototype;function Te(e,t,n){if("string"!=typeof t){if(Ne){var r=Ce(t);r&&r!==Ne&&Te(e,r,n)}var o=Ee(t);Ae&&(o=o.concat(Ae(t)));for(var s=we(e),i=we(t),a=0;a<o.length;++a){var c=o[a];if(!(c in ge||n&&n[c]||i&&c in i||s&&c in s)){var u=Pe(t,c);try{be(e,c,u)}catch(e){}}}}return e}var Oe=/(a)(d)/gi,xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function De(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}var je={};function Re(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]=Re(e[r],t[r]);else if(te(t))for(var r in t)e[r]=Re(e[r],t[r]);return e}var Ie,ze,Be=require("react-native"),Le=(Ie=Be.StyleSheet,ze=function(){function e(e){this.rules=e}return e.prototype.generateStyleObject=function(e){var n=De(se(this.rules,e)),r=function(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=xe(t%52)+n;return(xe(t%52)+n).replace(Oe,"$1-$2")}(Y(5381,n)>>>0);if(!je[r]){var o=t.parse(n),s=[];o.each(function(e){"decl"===e.type?s.push([e.prop,e.value]):"production"!==process.env.NODE_ENV&&"comment"!==e.type&&console.warn("Node of type ".concat(e.type," not supported as an inline style"))});var i=c.default(s,["borderWidth","borderColor"]),a=Ie.create({generated:i});je[r]=a.generated}return je[r]},e}(),function(e,t,o){var s=ne(e),i=e,a=t.displayName,c=void 0===a?function(e){return function(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}(e)?"styled.".concat(e):"Styled(".concat(J(e),")")}(e):a,l=t.attrs,p=void 0===l?h:l,d=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,y=t.shouldForwardProp;if(s&&i.shouldForwardProp){var v=i.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;y=function(e,t){return v(e,t)&&m(e,t)}}else y=v}var g=function(e,t){return function(e,t,o){var s=e.attrs,i=e.inlineStyle,a=e.defaultProps,c=e.shouldForwardProp,l=e.target,p=u.default.useContext(pe),h=function(e,t,r){void 0===e&&(e=f);var o=n.__assign(n.__assign({},t),{theme:e}),s={};return r.forEach(function(e){var t,n=ee(e)?e(o):e;for(t in n)o[t]=s[t]=n[t]}),[o,s]}(fe(t,p,a)||f,t,s),d=h[1],y=i.generateStyleObject(h[0]),v=o,m=d.as||t.as||l,g=d!==t?n.__assign(n.__assign({},t),d):t,S={};for(var _ in g)"$"!==_[0]&&"as"!==_&&("forwardedAs"===_?S.as=g[_]:c&&!c(_,m)||(S[_]=g[_]));return S.style=r.useMemo(function(){return ee(t.style)?function(e){return[y].concat(t.style(e))}:t.style?[y].concat(t.style):y},[t.style,y]),S.ref=v,r.createElement(m,S)}(S,e,t)};g.displayName=c;var S=u.default.forwardRef(g);return S.attrs=d,S.inlineStyle=new ze(s?i.inlineStyle.rules.concat(o):o),S.displayName=c,S.shouldForwardProp=y,S.styledComponentId=!0,S.target=s?i.target:e,Object.defineProperty(S,"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++)Re(e,o[r],!0);return e}({},i.defaultProps,e):e}}),Te(S,e,{attrs:!0,inlineStyle:!0,displayName:!0,shouldForwardProp:!0,target:!0}),S}),ke=function(e){return ue(Le,e)};["ActivityIndicator","Button","DatePickerIOS","DrawerLayoutAndroid","FlatList","Image","ImageBackground","KeyboardAvoidingView","Modal","Pressable","ProgressBarAndroid","ProgressViewIOS","RefreshControl","SafeAreaView","ScrollView","SectionList","Slider","Switch","Text","TextInput","TouchableHighlight","TouchableOpacity","View","VirtualizedList"].forEach(function(e){return Object.defineProperty(ke,e,{enumerable:!0,configurable:!1,get:function(){if(e in Be&&Be[e])return ke(Be[e]);throw new Error("".concat(e," is not available in the currently-installed version of react-native"))}})}),exports.ThemeConsumer=he,exports.ThemeContext=pe,exports.ThemeProvider=function(e){var t=u.default.useContext(pe),o=r.useMemo(function(){return function(e,t){if(!e)throw v(14);if(ee(e)){var r=e(t);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw v(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw v(8);return t?n.__assign(n.__assign({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?u.default.createElement(pe.Provider,{value:o},e.children):null},exports.css=ce,exports.default=ke,exports.isStyledComponent=ne,exports.styled=ke,exports.toStyleSheet=function(e){var n=De(se(e)),r=t.parse(n),o=[];r.each(function(e){"decl"===e.type?o.push([e.prop,e.value]):"production"!==process.env.NODE_ENV&&"comment"!==e.type&&console.warn("Node of type ".concat(e.type," not supported as an inline style"))});var s=c.default(o,["borderWidth","borderColor"]);return Be.StyleSheet.create({style:s}).style},exports.useTheme=function(){var e=r.useContext(pe);if(!e)throw v(18);return e},exports.withTheme=function(e){var t=u.default.forwardRef(function(t,r){var o=fe(t,u.default.useContext(pe),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(J(e),'"')),u.default.createElement(e,n.__assign({},t,{theme:o,ref:r}))});return t.displayName="WithTheme(".concat(J(e),")"),Te(t,e)};
2
+ //# sourceMappingURL=styled-components.native.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled-components.native.cjs.js","sources":["../../src/utils/empties.ts","../../src/utils/error.ts","../../src/utils/errors.ts","../../src/utils/setToString.ts","../../src/constants.ts","../../src/sheet/GroupedTag.ts","../../src/sheet/GroupIDAllocator.ts","../../src/sheet/Rehydration.ts","../../src/sheet/dom.ts","../../src/utils/nonce.ts","../../src/sheet/Tag.ts","../../src/sheet/Sheet.ts","../../src/utils/hash.ts","../../src/utils/stylis.ts","../../src/models/StyleSheetManager.tsx","../../src/models/Keyframes.ts","../../src/utils/getComponentName.ts","../../src/utils/hyphenateStyleName.ts","../../src/utils/isFunction.ts","../../src/utils/isPlainObject.ts","../../src/utils/isStyledComponent.ts","../../src/utils/flatten.ts","../../src/utils/addUnitIfNeeded.ts","../../src/utils/isStatelessFunction.ts","../../src/utils/interleave.ts","../../src/constructors/css.ts","../../src/constructors/constructWithOptions.ts","../../src/models/ThemeProvider.tsx","../../src/utils/determineTheme.ts","../../src/utils/hoist.ts","../../src/utils/generateAlphabeticName.ts","../../src/utils/joinStrings.ts","../../src/models/InlineStyle.ts","../../src/utils/mixinDeep.ts","../../src/models/StyledNativeComponent.ts","../../src/native/index.ts","../../src/utils/generateComponentId.ts","../../src/utils/generateDisplayName.ts","../../src/utils/isTag.ts","../../src/hoc/withTheme.tsx"],"sourcesContent":["import { Dict } from '../types';\n\nexport const EMPTY_ARRAY = Object.freeze([]) as Readonly<any[]>;\nexport const EMPTY_OBJECT = Object.freeze({}) as Readonly<Dict<any>>;\n","import { Dict } from '../types';\nimport errorMap from './errors';\n\nconst ERRORS: Dict<any> = process.env.NODE_ENV !== 'production' ? errorMap : {};\n\n/**\n * super basic version of sprintf\n */\nfunction format(...args: [string, ...any]) {\n let a = args[0];\n const b = [];\n\n for (let c = 1, len = args.length; c < len; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(d => {\n a = a.replace(/%[a-z]/, d);\n });\n\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n */\nexport default function throwStyledComponentsError(\n code: string | number,\n ...interpolations: any[]\n) {\n if (process.env.NODE_ENV === 'production') {\n return new Error(\n `An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${code} for more information.${\n interpolations.length > 0 ? ` Args: ${interpolations.join(', ')}` : ''\n }`\n );\n } else {\n return new Error(format(ERRORS[code], ...interpolations).trim());\n }\n}\n","export default {\n '1': 'Cannot create styled-component for component: %s.\\n\\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\",\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',\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',\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',\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\",\n '7': 'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',\n '8': 'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',\n '9': 'Missing document `<head>`\\n\\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',\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',\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',\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',\n '14': 'ThemeProvider: \"theme\" prop is required.\\n\\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\",\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\",\n '17': \"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\",\n '18': 'ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`',\n};\n","/**\n * If the Object prototype is frozen, the \"toString\" property is non-writable. This means that any objects which inherit this property\n * cannot have the property changed using a \"=\" assignment operator. If using strict mode, attempting that will cause an error. If not using\n * strict mode, attempting that will be silently ignored.\n *\n * If the Object prototype is frozen, inherited non-writable properties can still be shadowed using one of two mechanisms:\n *\n * 1. ES6 class methods: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#methods\n * 2. Using the `Object.defineProperty()` static method:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n *\n * However, this project uses Babel to transpile ES6 classes, and transforms ES6 class methods to use the assignment operator instead:\n * https://babeljs.io/docs/babel-plugin-transform-class-properties#options\n *\n * Therefore, the most compatible way to shadow the prototype's \"toString\" property is to define a new \"toString\" property on this object.\n */\nexport function setToString(object: object, toStringFn: () => string) {\n Object.defineProperty(object, 'toString', { value: toStringFn });\n}\n","declare let SC_DISABLE_SPEEDY: boolean | null | undefined;\ndeclare let __VERSION__: string;\n\nexport const SC_ATTR: string =\n (typeof process !== 'undefined' &&\n typeof process.env !== 'undefined' &&\n (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||\n 'data-styled';\n\nexport const SC_ATTR_ACTIVE = 'active';\nexport const SC_ATTR_VERSION = 'data-styled-version';\nexport const SC_VERSION = __VERSION__;\nexport const SPLITTER = '/*!sc*/\\n';\n\nexport const IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\n\nexport const DISABLE_SPEEDY = Boolean(\n typeof SC_DISABLE_SPEEDY === 'boolean'\n ? SC_DISABLE_SPEEDY\n : typeof process !== 'undefined' &&\n typeof process.env !== 'undefined' &&\n typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' &&\n process.env.REACT_APP_SC_DISABLE_SPEEDY !== ''\n ? process.env.REACT_APP_SC_DISABLE_SPEEDY === 'false'\n ? false\n : process.env.REACT_APP_SC_DISABLE_SPEEDY\n : typeof process !== 'undefined' &&\n typeof process.env !== 'undefined' &&\n typeof process.env.SC_DISABLE_SPEEDY !== 'undefined' &&\n process.env.SC_DISABLE_SPEEDY !== ''\n ? process.env.SC_DISABLE_SPEEDY === 'false'\n ? false\n : process.env.SC_DISABLE_SPEEDY\n : process.env.NODE_ENV !== 'production'\n);\n\n// Shared empty execution context when generating static styles\nexport const STATIC_EXECUTION_CONTEXT = {};\n","import { SPLITTER } from '../constants';\nimport styledError from '../utils/error';\nimport { GroupedTag, Tag } from './types';\n\n/** Create a GroupedTag with an underlying Tag implementation */\nexport const makeGroupedTag = (tag: Tag) => {\n return new DefaultGroupedTag(tag);\n};\n\nconst BASE_SIZE = 1 << 9;\n\nconst DefaultGroupedTag = class DefaultGroupedTag implements GroupedTag {\n groupSizes: Uint32Array;\n length: number;\n tag: Tag;\n\n constructor(tag: Tag) {\n this.groupSizes = new Uint32Array(BASE_SIZE);\n this.length = BASE_SIZE;\n this.tag = tag;\n }\n\n indexOfGroup(group: number) {\n let index = 0;\n for (let i = 0; i < group; i++) {\n index += this.groupSizes[i];\n }\n\n return index;\n }\n\n insertRules(group: number, rules: string[]) {\n if (group >= this.groupSizes.length) {\n const oldBuffer = this.groupSizes;\n const oldSize = oldBuffer.length;\n\n let newSize = oldSize;\n while (group >= newSize) {\n newSize <<= 1;\n if (newSize < 0) {\n throw styledError(16, `${group}`);\n }\n }\n\n this.groupSizes = new Uint32Array(newSize);\n this.groupSizes.set(oldBuffer);\n this.length = newSize;\n\n for (let i = oldSize; i < newSize; i++) {\n this.groupSizes[i] = 0;\n }\n }\n\n let ruleIndex = this.indexOfGroup(group + 1);\n\n for (let i = 0, l = rules.length; i < l; i++) {\n if (this.tag.insertRule(ruleIndex, rules[i])) {\n this.groupSizes[group]++;\n ruleIndex++;\n }\n }\n }\n\n clearGroup(group: number) {\n if (group < this.length) {\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n this.groupSizes[group] = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n this.tag.deleteRule(startIndex);\n }\n }\n }\n\n getGroup(group: number) {\n let css = '';\n if (group >= this.length || this.groupSizes[group] === 0) {\n return css;\n }\n\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n for (let i = startIndex; i < endIndex; i++) {\n css += `${this.tag.getRule(i)}${SPLITTER}`;\n }\n\n return css;\n }\n};\n","import styledError from '../utils/error';\n\nconst MAX_SMI = 1 << (31 - 1);\n\nlet groupIDRegister: Map<string, number> = new Map();\nlet reverseRegister: Map<number, string> = new Map();\nlet nextFreeGroup = 1;\n\nexport const resetGroupIds = () => {\n groupIDRegister = new Map();\n reverseRegister = new Map();\n nextFreeGroup = 1;\n};\n\nexport const getGroupForId = (id: string): number => {\n if (groupIDRegister.has(id)) {\n return groupIDRegister.get(id) as any;\n }\n\n while (reverseRegister.has(nextFreeGroup)) {\n nextFreeGroup++;\n }\n\n const group = nextFreeGroup++;\n\n if (process.env.NODE_ENV !== 'production' && ((group | 0) < 0 || group > MAX_SMI)) {\n throw styledError(16, `${group}`);\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n return group;\n};\n\nexport const getIdForGroup = (group: number): void | string => {\n return reverseRegister.get(group);\n};\n\nexport const setGroupForId = (id: string, group: number) => {\n // move pointer\n nextFreeGroup = group + 1;\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n};\n","import { SC_ATTR, SC_ATTR_ACTIVE, SC_ATTR_VERSION, SC_VERSION, SPLITTER } from '../constants';\nimport { getIdForGroup, setGroupForId } from './GroupIDAllocator';\nimport { Sheet } from './types';\n\nconst SELECTOR = `style[${SC_ATTR}][${SC_ATTR_VERSION}=\"${SC_VERSION}\"]`;\nconst MARKER_RE = new RegExp(`^${SC_ATTR}\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)`);\n\nexport const outputSheet = (sheet: Sheet) => {\n const tag = sheet.getTag();\n const { length } = tag;\n\n let css = '';\n for (let group = 0; group < length; group++) {\n const id = getIdForGroup(group);\n if (id === undefined) continue;\n\n const names = sheet.names.get(id);\n const rules = tag.getGroup(group);\n if (names === undefined || !names.size || rules.length === 0) continue;\n\n const selector = `${SC_ATTR}.g${group}[id=\"${id}\"]`;\n\n let content = '';\n if (names !== undefined) {\n names.forEach(name => {\n if (name.length > 0) {\n content += `${name},`;\n }\n });\n }\n\n // NOTE: It's easier to collect rules and have the marker\n // after the actual rules to simplify the rehydration\n css += `${rules}${selector}{content:\"${content}\"}${SPLITTER}`;\n }\n\n return css;\n};\n\nconst rehydrateNamesFromContent = (sheet: Sheet, id: string, content: string) => {\n const names = content.split(',');\n let name;\n\n for (let i = 0, l = names.length; i < l; i++) {\n if ((name = names[i])) {\n sheet.registerName(id, name);\n }\n }\n};\n\nconst rehydrateSheetFromTag = (sheet: Sheet, style: HTMLStyleElement) => {\n const parts = (style.textContent ?? '').split(SPLITTER);\n const rules: string[] = [];\n\n for (let i = 0, l = parts.length; i < l; i++) {\n const part = parts[i].trim();\n if (!part) continue;\n\n const marker = part.match(MARKER_RE);\n\n if (marker) {\n const group = parseInt(marker[1], 10) | 0;\n const id = marker[2];\n\n if (group !== 0) {\n // Rehydrate componentId to group index mapping\n setGroupForId(id, group);\n // Rehydrate names and rules\n // looks like: data-styled.g11[id=\"idA\"]{content:\"nameA,\"}\n rehydrateNamesFromContent(sheet, id, marker[3]);\n sheet.getTag().insertRules(group, rules);\n }\n\n rules.length = 0;\n } else {\n rules.push(part);\n }\n }\n};\n\nexport const rehydrateSheet = (sheet: Sheet) => {\n const nodes = document.querySelectorAll(SELECTOR);\n\n for (let i = 0, l = nodes.length; i < l; i++) {\n const node = nodes[i] as any as HTMLStyleElement;\n if (node && node.getAttribute(SC_ATTR) !== SC_ATTR_ACTIVE) {\n rehydrateSheetFromTag(sheet, node);\n\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n }\n};\n","import { SC_ATTR, SC_ATTR_ACTIVE, SC_ATTR_VERSION, SC_VERSION } from '../constants';\nimport { InsertionTarget } from '../types';\nimport styledError from '../utils/error';\nimport getNonce from '../utils/nonce';\n\n/** Find last style element if any inside target */\nconst findLastStyleTag = (target: InsertionTarget): void | HTMLStyleElement => {\n const arr = Array.from(target.querySelectorAll<HTMLStyleElement>(`style[${SC_ATTR}]`));\n\n return arr[arr.length - 1];\n};\n\n/** Create a style element inside `target` or <head> after the last */\nexport const makeStyleTag = (target?: InsertionTarget | undefined): HTMLStyleElement => {\n const head = document.head;\n const parent = target || head;\n const style = document.createElement('style');\n const prevStyle = findLastStyleTag(parent);\n const nextSibling = prevStyle !== undefined ? prevStyle.nextSibling : null;\n\n style.setAttribute(SC_ATTR, SC_ATTR_ACTIVE);\n style.setAttribute(SC_ATTR_VERSION, SC_VERSION);\n\n const nonce = getNonce();\n\n if (nonce) style.setAttribute('nonce', nonce);\n\n parent.insertBefore(style, nextSibling);\n\n return style;\n};\n\n/** Get the CSSStyleSheet instance for a given style element */\nexport const getSheet = (tag: HTMLStyleElement): CSSStyleSheet => {\n if (tag.sheet) {\n return tag.sheet as any as CSSStyleSheet;\n }\n\n // Avoid Firefox quirk where the style element might not have a sheet property\n const { styleSheets } = document;\n for (let i = 0, l = styleSheets.length; i < l; i++) {\n const sheet = styleSheets[i];\n if (sheet.ownerNode === tag) {\n return sheet as any as CSSStyleSheet;\n }\n }\n\n throw styledError(17);\n};\n","declare let __webpack_nonce__: string;\n\nexport default function getNonce() {\n return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n}\n","import { InsertionTarget } from '../types';\nimport { getSheet, makeStyleTag } from './dom';\nimport { SheetOptions, Tag } from './types';\n\n/** Create a CSSStyleSheet-like tag depending on the environment */\nexport const makeTag = ({ isServer, useCSSOMInjection, target }: SheetOptions) => {\n if (isServer) {\n return new VirtualTag(target);\n } else if (useCSSOMInjection) {\n return new CSSOMTag(target);\n } else {\n return new TextTag(target);\n }\n};\n\nexport const CSSOMTag = class CSSOMTag implements Tag {\n element: HTMLStyleElement;\n\n sheet: CSSStyleSheet;\n\n length: number;\n\n constructor(target?: InsertionTarget | undefined) {\n this.element = makeStyleTag(target);\n\n // Avoid Edge bug where empty style elements don't create sheets\n this.element.appendChild(document.createTextNode(''));\n\n this.sheet = getSheet(this.element);\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n try {\n this.sheet.insertRule(rule, index);\n this.length++;\n return true;\n } catch (_error) {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.sheet.deleteRule(index);\n this.length--;\n }\n\n getRule(index: number): string {\n const rule = this.sheet.cssRules[index];\n\n // Avoid IE11 quirk where cssText is inaccessible on some invalid rules\n if (rule && rule.cssText) {\n return rule.cssText;\n } else {\n return '';\n }\n }\n};\n\n/** A Tag that emulates the CSSStyleSheet API but uses text nodes */\nexport const TextTag = class TextTag implements Tag {\n element: HTMLStyleElement;\n nodes: NodeListOf<Node>;\n length: number;\n\n constructor(target?: InsertionTarget | undefined) {\n this.element = makeStyleTag(target);\n this.nodes = this.element.childNodes;\n this.length = 0;\n }\n\n insertRule(index: number, rule: string) {\n if (index <= this.length && index >= 0) {\n const node = document.createTextNode(rule);\n const refNode = this.nodes[index];\n this.element.insertBefore(node, refNode || null);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number) {\n this.element.removeChild(this.nodes[index]);\n this.length--;\n }\n\n getRule(index: number) {\n if (index < this.length) {\n return this.nodes[index].textContent as string;\n } else {\n return '';\n }\n }\n};\n\n/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */\nexport const VirtualTag = class VirtualTag implements Tag {\n rules: string[];\n\n length: number;\n\n constructor(_target?: InsertionTarget | undefined) {\n this.rules = [];\n this.length = 0;\n }\n\n insertRule(index: number, rule: string) {\n if (index <= this.length) {\n this.rules.splice(index, 0, rule);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number) {\n this.rules.splice(index, 1);\n this.length--;\n }\n\n getRule(index: number) {\n if (index < this.length) {\n return this.rules[index];\n } else {\n return '';\n }\n }\n};\n","import { DISABLE_SPEEDY, IS_BROWSER } from '../constants';\nimport { InsertionTarget } from '../types';\nimport { EMPTY_OBJECT } from '../utils/empties';\nimport { setToString } from '../utils/setToString';\nimport { makeGroupedTag } from './GroupedTag';\nimport { getGroupForId } from './GroupIDAllocator';\nimport { outputSheet, rehydrateSheet } from './Rehydration';\nimport { makeTag } from './Tag';\nimport { GroupedTag, Sheet, SheetOptions } from './types';\n\nlet SHOULD_REHYDRATE = IS_BROWSER;\n\ntype SheetConstructorArgs = {\n isServer?: boolean;\n useCSSOMInjection?: boolean;\n target?: InsertionTarget | undefined;\n};\n\ntype GlobalStylesAllocationMap = {\n [key: string]: number;\n};\ntype NamesAllocationMap = Map<string, Set<string>>;\n\nconst defaultOptions: SheetOptions = {\n isServer: !IS_BROWSER,\n useCSSOMInjection: !DISABLE_SPEEDY,\n};\n\n/** Contains the main stylesheet logic for stringification and caching */\nexport default class StyleSheet implements Sheet {\n gs: GlobalStylesAllocationMap;\n names: NamesAllocationMap;\n options: SheetOptions;\n server: boolean;\n tag?: GroupedTag | undefined;\n\n /** Register a group ID to give it an index */\n static registerId(id: string): number {\n return getGroupForId(id);\n }\n\n constructor(\n options: SheetConstructorArgs = EMPTY_OBJECT as Object,\n globalStyles: GlobalStylesAllocationMap = {},\n names?: NamesAllocationMap | undefined\n ) {\n this.options = {\n ...defaultOptions,\n ...options,\n };\n\n this.gs = globalStyles;\n this.names = new Map(names as NamesAllocationMap);\n this.server = !!options.isServer;\n\n // We rehydrate only once and use the sheet that is created first\n if (!this.server && IS_BROWSER && SHOULD_REHYDRATE) {\n SHOULD_REHYDRATE = false;\n rehydrateSheet(this);\n }\n\n setToString(this, () => outputSheet(this));\n }\n\n rehydrate(): void {\n if (!this.server && IS_BROWSER) {\n rehydrateSheet(this);\n }\n }\n\n reconstructWithOptions(options: SheetConstructorArgs, withNames = true) {\n return new StyleSheet(\n { ...this.options, ...options },\n this.gs,\n (withNames && this.names) || undefined\n );\n }\n\n allocateGSInstance(id: string) {\n return (this.gs[id] = (this.gs[id] || 0) + 1);\n }\n\n /** Lazily initialises a GroupedTag for when it's actually needed */\n getTag() {\n return this.tag || (this.tag = makeGroupedTag(makeTag(this.options)));\n }\n\n /** Check whether a name is known for caching */\n hasNameForId(id: string, name: string): boolean {\n return this.names.has(id) && (this.names.get(id) as any).has(name);\n }\n\n /** Mark a group's name as known for caching */\n registerName(id: string, name: string) {\n getGroupForId(id);\n\n if (!this.names.has(id)) {\n const groupNames = new Set<string>();\n groupNames.add(name);\n this.names.set(id, groupNames);\n } else {\n (this.names.get(id) as any).add(name);\n }\n }\n\n /** Insert new rules which also marks the name as known */\n insertRules(id: string, name: string, rules: string | string[]) {\n this.registerName(id, name);\n this.getTag().insertRules(getGroupForId(id), rules);\n }\n\n /** Clears all cached names for a given group ID */\n clearNames(id: string) {\n if (this.names.has(id)) {\n (this.names.get(id) as any).clear();\n }\n }\n\n /** Clears all rules for a given group ID */\n clearRules(id: string) {\n this.getTag().clearGroup(getGroupForId(id));\n this.clearNames(id);\n }\n\n /** Clears the entire tag which deletes all rules but not its names */\n clearTag() {\n // NOTE: This does not clear the names, since it's only used during SSR\n // so that we can continuously output only new rules\n this.tag = undefined;\n }\n}\n","export const SEED = 5381;\n\n// When we have separate strings it's useful to run a progressive\n// version of djb2 where we pretend that we're still looping over\n// the same string\nexport const phash = (h: number, x: string) => {\n let i = x.length;\n\n while (i) {\n h = (h * 33) ^ x.charCodeAt(--i);\n }\n\n return h;\n};\n\n// This is a djb2 hashing function\nexport const hash = (x: string) => {\n return phash(SEED, x);\n};\n","import * as stylis from 'stylis';\nimport { Stringifier } from '../types';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from './empties';\nimport throwStyledError from './error';\nimport { SEED, phash } from './hash';\n\nconst AMP_REGEX = /&/g;\nconst COMMENT_REGEX = /^\\s*\\/\\/.*$/gm;\n\nexport type ICreateStylisInstance = {\n options?: { namespace?: string | undefined; prefix?: boolean | undefined } | undefined;\n plugins?: stylis.Middleware[] | undefined;\n};\n\n/**\n * Takes an element and recurses through it's rules added the namespace to the start of each selector.\n * Takes into account media queries by recursing through child rules if they are present.\n */\nfunction recursivelySetNamepace(compiled: stylis.Element[], namespace: String): stylis.Element[] {\n return compiled.map(rule => {\n if (rule.type === 'rule') {\n // add the namespace to the start\n rule.value = `${namespace} ${rule.value}`;\n // add the namespace after each comma for subsequent selectors.\n rule.value = rule.value.replaceAll(',', `,${namespace} `);\n rule.props = (rule.props as string[]).map(prop => {\n return `${namespace} ${prop}`;\n });\n }\n\n if (Array.isArray(rule.children) && rule.type !== '@keyframes') {\n rule.children = recursivelySetNamepace(rule.children, namespace);\n }\n return rule;\n });\n}\n\nexport default function createStylisInstance(\n {\n options = EMPTY_OBJECT as object,\n plugins = EMPTY_ARRAY as unknown as stylis.Middleware[],\n }: ICreateStylisInstance = EMPTY_OBJECT as object\n) {\n let _componentId: string;\n let _selector: string;\n let _selectorRegexp: RegExp;\n\n const selfReferenceReplacer = (match: string, offset: number, string: string) => {\n if (\n /**\n * We only want to refer to the static class directly if the selector is part of a\n * self-reference selector `& + & { color: red; }`\n */\n string.startsWith(_selector) &&\n string.endsWith(_selector) &&\n string.replaceAll(_selector, '').length > 0\n ) {\n return `.${_componentId}`;\n }\n\n return match;\n };\n\n /**\n * When writing a style like\n *\n * & + & {\n * color: red;\n * }\n *\n * The second ampersand should be a reference to the static component class. stylis\n * has no knowledge of static class so we have to intelligently replace the base selector.\n *\n * https://github.com/thysultan/stylis.js/tree/v4.0.2#abstract-syntax-structure\n */\n const selfReferenceReplacementPlugin: stylis.Middleware = element => {\n if (element.type === stylis.RULESET && element.value.includes('&')) {\n (element.props as string[])[0] = element.props[0]\n // catch any hanging references that stylis missed\n .replace(AMP_REGEX, _selector)\n .replace(_selectorRegexp, selfReferenceReplacer);\n }\n };\n\n const middlewares = plugins.slice();\n\n middlewares.push(selfReferenceReplacementPlugin);\n\n /**\n * Enables automatic vendor-prefixing for styles.\n */\n if (options.prefix) {\n middlewares.push(stylis.prefixer);\n }\n\n middlewares.push(stylis.stringify);\n\n const stringifyRules: Stringifier = (\n css: string,\n selector = '',\n /**\n * This \"prefix\" referes to a _selector_ prefix.\n */\n prefix = '',\n componentId = '&'\n ) => {\n // stylis has no concept of state to be passed to plugins\n // but since JS is single-threaded, we can rely on that to ensure\n // these properties stay in sync with the current stylis run\n _componentId = componentId;\n _selector = selector;\n _selectorRegexp = new RegExp(`\\\\${_selector}\\\\b`, 'g');\n\n const flatCSS = css.replace(COMMENT_REGEX, '');\n let compiled = stylis.compile(\n prefix || selector ? `${prefix} ${selector} { ${flatCSS} }` : flatCSS\n );\n\n if (options.namespace) {\n compiled = recursivelySetNamepace(compiled, options.namespace);\n }\n\n const stack: string[] = [];\n\n stylis.serialize(\n compiled,\n stylis.middleware(middlewares.concat(stylis.rulesheet(value => stack.push(value))))\n );\n\n return stack;\n };\n\n stringifyRules.hash = plugins.length\n ? plugins\n .reduce((acc, plugin) => {\n if (!plugin.name) {\n throwStyledError(15);\n }\n\n return phash(acc, plugin.name);\n }, SEED)\n .toString()\n : '';\n\n return stringifyRules;\n}\n","import React, { useContext, useEffect, useMemo, useState } from 'react';\nimport shallowequal from 'shallowequal';\nimport type stylis from 'stylis';\nimport StyleSheet from '../sheet';\nimport { InsertionTarget, ShouldForwardProp, Stringifier } from '../types';\nimport createStylisInstance from '../utils/stylis';\n\nexport const mainSheet: StyleSheet = new StyleSheet();\nexport const mainStylis: Stringifier = createStylisInstance();\n\nexport type IStyleSheetContext = {\n shouldForwardProp?: ShouldForwardProp<'web'> | undefined;\n styleSheet: StyleSheet;\n stylis: Stringifier;\n};\n\nexport const StyleSheetContext = React.createContext<IStyleSheetContext>({\n shouldForwardProp: undefined,\n styleSheet: mainSheet,\n stylis: mainStylis,\n});\n\nexport const StyleSheetConsumer = StyleSheetContext.Consumer;\n\nexport type IStylisContext = Stringifier | void;\nexport const StylisContext = React.createContext<IStylisContext>(undefined);\nexport const StylisConsumer = StylisContext.Consumer;\n\nexport function useStyleSheetContext() {\n return useContext(StyleSheetContext);\n}\n\nexport type IStyleSheetManager = React.PropsWithChildren<{\n /**\n * If desired, you can pass this prop to disable \"speedy\" insertion mode, which\n * uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet).\n * When disabled, rules are inserted as simple text into style blocks.\n */\n disableCSSOMInjection?: undefined | boolean;\n /**\n * If you are working exclusively with modern browsers, vendor prefixes can often be omitted\n * to reduce the weight of CSS on the page.\n */\n enableVendorPrefixes?: undefined | boolean;\n /**\n * Provide an optional selector to be prepended to all generated style rules.\n */\n namespace?: undefined | string;\n /**\n * Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.\n */\n sheet?: undefined | StyleSheet;\n /**\n * Starting in v6, styled-components no longer does its own prop validation\n * and recommends use of transient props \"$prop\" to pass style-only props to\n * components. If for some reason you are not able to use transient props, a\n * prop validation function can be provided via `StyleSheetManager`, such as\n * `@emotion/is-prop-valid`.\n *\n * When the return value is `true`, props will be forwarded to the DOM/underlying\n * component. If return value is `false`, the prop will be discarded after styles\n * are calculated.\n *\n * Manually composing `styled.{element}.withConfig({shouldForwardProp})` will\n * override this default.\n */\n shouldForwardProp?: undefined | IStyleSheetContext['shouldForwardProp'];\n /**\n * An array of plugins to be run by stylis (style processor) during compilation.\n * Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis).\n *\n * \\* The plugin(s) must be compatible with stylis v4 or above.\n */\n stylisPlugins?: undefined | stylis.Middleware[];\n /**\n * Provide an alternate DOM node to host generated styles; useful for iframes.\n */\n target?: undefined | InsertionTarget;\n}>;\n\nexport function StyleSheetManager(props: IStyleSheetManager): React.JSX.Element {\n const [plugins, setPlugins] = useState(props.stylisPlugins);\n const { styleSheet } = useStyleSheetContext();\n\n const resolvedStyleSheet = useMemo(() => {\n let sheet = styleSheet;\n\n if (props.sheet) {\n sheet = props.sheet;\n } else if (props.target) {\n sheet = sheet.reconstructWithOptions({ target: props.target }, false);\n }\n\n if (props.disableCSSOMInjection) {\n sheet = sheet.reconstructWithOptions({ useCSSOMInjection: false });\n }\n\n return sheet;\n }, [props.disableCSSOMInjection, props.sheet, props.target, styleSheet]);\n\n const stylis = useMemo(\n () =>\n createStylisInstance({\n options: { namespace: props.namespace, prefix: props.enableVendorPrefixes },\n plugins,\n }),\n [props.enableVendorPrefixes, props.namespace, plugins]\n );\n\n useEffect(() => {\n if (!shallowequal(plugins, props.stylisPlugins)) setPlugins(props.stylisPlugins);\n }, [props.stylisPlugins]);\n\n const styleSheetContextValue = useMemo(\n () => ({\n shouldForwardProp: props.shouldForwardProp,\n styleSheet: resolvedStyleSheet,\n stylis,\n }),\n [props.shouldForwardProp, resolvedStyleSheet, stylis]\n );\n\n return (\n <StyleSheetContext.Provider value={styleSheetContextValue}>\n <StylisContext.Provider value={stylis}>{props.children}</StylisContext.Provider>\n </StyleSheetContext.Provider>\n );\n}\n","import StyleSheet from '../sheet';\nimport { Keyframes as KeyframesType, Stringifier } from '../types';\nimport styledError from '../utils/error';\nimport { setToString } from '../utils/setToString';\nimport { mainStylis } from './StyleSheetManager';\n\nexport default class Keyframes implements KeyframesType {\n id: string;\n name: string;\n rules: string;\n\n constructor(name: string, rules: string) {\n this.name = name;\n this.id = `sc-keyframes-${name}`;\n this.rules = rules;\n\n setToString(this, () => {\n throw styledError(12, String(this.name));\n });\n }\n\n inject = (styleSheet: StyleSheet, stylisInstance: Stringifier = mainStylis): void => {\n const resolvedName = this.name + stylisInstance.hash;\n\n if (!styleSheet.hasNameForId(this.id, resolvedName)) {\n styleSheet.insertRules(\n this.id,\n resolvedName,\n stylisInstance(this.rules, resolvedName, '@keyframes')\n );\n }\n };\n\n getName(stylisInstance: Stringifier = mainStylis): string {\n return this.name + stylisInstance.hash;\n }\n}\n","import { StyledTarget } from '../types';\n\nexport default function getComponentName(target: StyledTarget<any>) {\n return (\n (process.env.NODE_ENV !== 'production' ? typeof target === 'string' && target : false) ||\n (target as Exclude<StyledTarget<any>, string>).displayName ||\n (target as Function).name ||\n 'Component'\n );\n}\n","const isUpper = (c: string) => c >= 'A' && c <= 'Z';\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\nexport default function hyphenateStyleName(string: string): string {\n let output = '';\n\n for (let i = 0; i < string.length; i++) {\n const c = string[i];\n // Check for CSS variable prefix\n if (i === 1 && c === '-' && string[0] === '-') {\n return string;\n }\n\n if (isUpper(c)) {\n output += '-' + c.toLowerCase();\n } else {\n output += c;\n }\n }\n\n return output.startsWith('ms-') ? '-' + output : output;\n}\n","export default function isFunction(test: any): test is Function {\n return typeof test === 'function';\n}\n","export default function isPlainObject(x: any): x is Record<any, any> {\n return (\n x !== null &&\n typeof x === 'object' &&\n x.constructor.name === Object.name &&\n /* check for reasonable markers that the object isn't an element for react & preact/compat */\n !('props' in x && x.$$typeof)\n );\n}\n","import { StyledComponentBrand } from '../types';\n\nexport default function isStyledComponent(target: any): target is StyledComponentBrand {\n return typeof target === 'object' && 'styledComponentId' in target;\n}\n","import Keyframes from '../models/Keyframes';\nimport StyleSheet from '../sheet';\nimport {\n AnyComponent,\n Dict,\n ExecutionContext,\n Interpolation,\n IStyledComponent,\n RuleSet,\n Stringifier,\n StyledObject,\n} from '../types';\nimport addUnitIfNeeded from './addUnitIfNeeded';\nimport { EMPTY_ARRAY } from './empties';\nimport getComponentName from './getComponentName';\nimport hyphenate from './hyphenateStyleName';\nimport isFunction from './isFunction';\nimport isPlainObject from './isPlainObject';\nimport isStatelessFunction from './isStatelessFunction';\nimport isStyledComponent from './isStyledComponent';\n\n/**\n * It's falsish not falsy because 0 is allowed.\n */\nconst isFalsish = (chunk: any): chunk is undefined | null | false | '' =>\n chunk === undefined || chunk === null || chunk === false || chunk === '';\n\nexport const objToCssArray = (obj: Dict<any>): string[] => {\n const rules = [];\n\n for (const key in obj) {\n const val = obj[key];\n if (!obj.hasOwnProperty(key) || isFalsish(val)) continue;\n\n // @ts-expect-error Property 'isCss' does not exist on type 'any[]'\n if ((Array.isArray(val) && val.isCss) || isFunction(val)) {\n rules.push(`${hyphenate(key)}:`, val, ';');\n } else if (isPlainObject(val)) {\n rules.push(`${key} {`, ...objToCssArray(val), '}');\n } else {\n rules.push(`${hyphenate(key)}: ${addUnitIfNeeded(key, val)};`);\n }\n }\n\n return rules;\n};\n\nexport default function flatten<Props extends object>(\n chunk: Interpolation<object>,\n executionContext?: (ExecutionContext & Props) | undefined,\n styleSheet?: StyleSheet | undefined,\n stylisInstance?: Stringifier | undefined\n): RuleSet<Props> {\n if (isFalsish(chunk)) {\n return [];\n }\n\n /* Handle other components */\n if (isStyledComponent(chunk)) {\n return [`.${(chunk as unknown as IStyledComponent<'web', any>).styledComponentId}`];\n }\n\n /* Either execute or defer the function */\n if (isFunction(chunk)) {\n if (isStatelessFunction(chunk) && executionContext) {\n const result = chunk(executionContext);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n typeof result === 'object' &&\n !Array.isArray(result) &&\n !(result instanceof Keyframes) &&\n !isPlainObject(result) &&\n result !== null\n ) {\n console.error(\n `${getComponentName(\n chunk as AnyComponent\n )} 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 }\n\n return flatten<Props>(result, executionContext, styleSheet, stylisInstance);\n } else {\n return [chunk as unknown as IStyledComponent<'web'>];\n }\n }\n\n if (chunk instanceof Keyframes) {\n if (styleSheet) {\n chunk.inject(styleSheet, stylisInstance);\n return [chunk.getName(stylisInstance)];\n } else {\n return [chunk];\n }\n }\n\n /* Handle objects */\n if (isPlainObject(chunk)) {\n return objToCssArray(chunk as StyledObject<Props>);\n }\n\n if (!Array.isArray(chunk)) {\n return [chunk.toString()];\n }\n\n return flatMap(chunk, chunklet =>\n flatten<Props>(chunklet, executionContext, styleSheet, stylisInstance)\n );\n}\n\nfunction flatMap<T, U>(array: T[], transform: (value: T, index: number, array: T[]) => U[]): U[] {\n return Array.prototype.concat.apply(EMPTY_ARRAY, array.map(transform));\n}\n","import unitless from '@emotion/unitless';\n\n// Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js\nexport default function addUnitIfNeeded(name: string, value: any) {\n // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133\n if (value == null || typeof value === 'boolean' || value === '') {\n return '';\n }\n\n if (typeof value === 'number' && value !== 0 && !(name in unitless) && !name.startsWith('--')) {\n return `${value}px`; // Presumes implicit 'px' suffix for unitless numbers except for CSS variables\n }\n\n return String(value).trim();\n}\n","import isFunction from './isFunction';\n\nexport default function isStatelessFunction(test: any): test is Function {\n return isFunction(test) && !(test.prototype && test.prototype.isReactComponent);\n}\n","import { Interpolation } from '../types';\n\nexport default function interleave<Props extends object>(\n strings: readonly string[],\n interpolations: Interpolation<Props>[]\n): Interpolation<Props>[] {\n const result: Interpolation<Props>[] = [strings[0]];\n\n for (let i = 0, len = interpolations.length; i < len; i += 1) {\n result.push(interpolations[i], strings[i + 1]);\n }\n\n return result;\n}\n","import {\n BaseObject,\n Interpolation,\n NoInfer,\n RuleSet,\n StyledObject,\n StyleFunction,\n Styles,\n} from '../types';\nimport { EMPTY_ARRAY } from '../utils/empties';\nimport flatten from '../utils/flatten';\nimport interleave from '../utils/interleave';\nimport isFunction from '../utils/isFunction';\nimport isPlainObject from '../utils/isPlainObject';\n\n/**\n * Used when flattening object styles to determine if we should\n * expand an array of styles.\n */\nconst addTag = <T extends RuleSet<any>>(arg: T): T & { isCss: true } =>\n Object.assign(arg, { isCss: true } as const);\n\nfunction css(styles: Styles<object>, ...interpolations: Interpolation<object>[]): RuleSet<object>;\nfunction css<Props extends object>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>>;\nfunction css<Props extends object = BaseObject>(\n styles: Styles<NoInfer<Props>>,\n ...interpolations: Interpolation<NoInfer<Props>>[]\n): RuleSet<NoInfer<Props>> {\n if (isFunction(styles) || isPlainObject(styles)) {\n const styleFunctionOrObject = styles as StyleFunction<Props> | StyledObject<Props>;\n\n return addTag(\n flatten<Props>(\n interleave<Props>(EMPTY_ARRAY, [\n styleFunctionOrObject,\n ...interpolations,\n ]) as Interpolation<object>\n )\n );\n }\n\n const styleStringArray = styles as TemplateStringsArray;\n\n if (\n interpolations.length === 0 &&\n styleStringArray.length === 1 &&\n typeof styleStringArray[0] === 'string'\n ) {\n return flatten<Props>(styleStringArray);\n }\n\n return addTag(\n flatten<Props>(interleave<Props>(styleStringArray, interpolations) as Interpolation<object>)\n );\n}\n\nexport default css;\n","import {\n Attrs,\n BaseObject,\n ExecutionProps,\n Interpolation,\n IStyledComponent,\n IStyledComponentFactory,\n KnownTarget,\n NoInfer,\n Runtime,\n StyledOptions,\n StyledTarget,\n Styles,\n Substitute,\n} from '../types';\nimport { EMPTY_OBJECT } from '../utils/empties';\nimport styledError from '../utils/error';\nimport css from './css';\n\ntype AttrsResult<T extends Attrs<any>> = T extends (...args: any) => infer P\n ? P extends object\n ? P\n : never\n : T extends object\n ? T\n : never;\n\n/**\n * Based on Attrs being a simple object or function that returns\n * a prop object, inspect the attrs result and attempt to extract\n * any \"as\" prop usage to modify the runtime target.\n */\ntype AttrsTarget<\n R extends Runtime,\n T extends Attrs<any>,\n FallbackTarget extends StyledTarget<R>,\n Result extends ExecutionProps = AttrsResult<T>,\n> = Result extends { as: infer RuntimeTarget }\n ? RuntimeTarget extends KnownTarget\n ? RuntimeTarget\n : FallbackTarget\n : FallbackTarget;\n\nexport interface Styled<\n R extends Runtime,\n Target extends StyledTarget<R>,\n OuterProps extends object,\n OuterStatics extends object = BaseObject,\n> {\n <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, NoInfer<Props>>>,\n ...interpolations: Interpolation<Substitute<OuterProps, NoInfer<Props>>>[]\n ): IStyledComponent<R, Substitute<OuterProps, Props>> &\n OuterStatics &\n Statics &\n (R extends 'web'\n ? Target extends string\n ? {}\n : Omit<Target, keyof React.Component<any>>\n : {});\n\n attrs: <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) => Styled<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics\n >;\n\n withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;\n}\n\nexport default function constructWithOptions<\n R extends Runtime,\n Target extends StyledTarget<R>,\n OuterProps extends object = Target extends KnownTarget\n ? React.ComponentPropsWithRef<Target>\n : BaseObject,\n OuterStatics extends object = BaseObject,\n>(\n componentConstructor: IStyledComponentFactory<R, StyledTarget<R>, object, any>,\n tag: StyledTarget<R>,\n options: StyledOptions<R, OuterProps> = EMPTY_OBJECT\n): Styled<R, Target, OuterProps, OuterStatics> {\n /**\n * We trust that the tag is a valid component as long as it isn't\n * falsish. Typically the tag here is a string or function (i.e.\n * class or pure function component), however a component may also be\n * an object if it uses another utility, e.g. React.memo. React will\n * output an appropriate warning however if the `tag` isn't valid.\n */\n if (!tag) {\n throw styledError(1, tag);\n }\n\n /* This is callable directly as a template function */\n const templateFunction = <Props extends object = BaseObject, Statics extends object = BaseObject>(\n initialStyles: Styles<Substitute<OuterProps, Props>>,\n ...interpolations: Interpolation<Substitute<OuterProps, Props>>[]\n ) =>\n componentConstructor<Substitute<OuterProps, Props>, Statics>(\n tag,\n options as StyledOptions<R, Substitute<OuterProps, Props>>,\n css<Substitute<OuterProps, Props>>(initialStyles, ...interpolations)\n );\n\n /**\n * Attrs allows for accomplishing two goals:\n *\n * 1. Backfilling props at runtime more expressively than defaultProps\n * 2. Amending the prop interface of a wrapped styled component\n */\n templateFunction.attrs = <\n Props extends object = BaseObject,\n PrivateMergedProps extends object = Substitute<OuterProps, Props>,\n PrivateAttrsArg extends Attrs<PrivateMergedProps> = Attrs<PrivateMergedProps>,\n PrivateResolvedTarget extends StyledTarget<R> = AttrsTarget<R, PrivateAttrsArg, Target>,\n >(\n attrs: PrivateAttrsArg\n ) =>\n constructWithOptions<\n R,\n PrivateResolvedTarget,\n PrivateResolvedTarget extends KnownTarget\n ? Substitute<\n Substitute<OuterProps, React.ComponentPropsWithRef<PrivateResolvedTarget>>,\n Props\n >\n : PrivateMergedProps,\n OuterStatics\n >(componentConstructor, tag, {\n ...options,\n attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean),\n });\n\n /**\n * If config methods are called, wrap up a new template function\n * and merge options.\n */\n templateFunction.withConfig = (config: StyledOptions<R, OuterProps>) =>\n constructWithOptions<R, Target, OuterProps, OuterStatics>(componentConstructor, tag, {\n ...options,\n ...config,\n });\n\n return templateFunction;\n}\n","import React, { useContext, useMemo } from 'react';\nimport styledError from '../utils/error';\nimport isFunction from '../utils/isFunction';\n\n/**\n * Override DefaultTheme to get accurate typings for your project.\n *\n * ```\n * // create styled-components.d.ts in your project source\n * // if it isn't being picked up, check tsconfig compilerOptions.types\n * import type { CSSProp } from \"styled-components\";\n * import Theme from './theme';\n *\n * type ThemeType = typeof Theme;\n *\n * declare module \"styled-components\" {\n * export interface DefaultTheme extends ThemeType {}\n * }\n *\n * declare module \"react\" {\n * interface DOMAttributes<T> {\n * css?: CSSProp;\n * }\n * }\n * ```\n */\nexport interface DefaultTheme {\n [key: string]: any;\n}\n\ntype ThemeFn = (outerTheme?: DefaultTheme | undefined) => DefaultTheme;\ntype ThemeArgument = DefaultTheme | ThemeFn;\n\ntype Props = {\n children?: React.ReactNode;\n theme: ThemeArgument;\n};\n\nexport const ThemeContext = React.createContext<DefaultTheme | undefined>(undefined);\n\nexport const ThemeConsumer = ThemeContext.Consumer;\n\nfunction mergeTheme(theme: ThemeArgument, outerTheme?: DefaultTheme | undefined): DefaultTheme {\n if (!theme) {\n throw styledError(14);\n }\n\n if (isFunction(theme)) {\n const themeFn = theme as ThemeFn;\n const mergedTheme = themeFn(outerTheme);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')\n ) {\n throw styledError(7);\n }\n\n return mergedTheme;\n }\n\n if (Array.isArray(theme) || typeof theme !== 'object') {\n throw styledError(8);\n }\n\n return outerTheme ? { ...outerTheme, ...theme } : theme;\n}\n\n/**\n * Returns the current theme (as provided by the closest ancestor `ThemeProvider`.)\n *\n * If no `ThemeProvider` is found, the function will error. If you need access to the theme in an\n * uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there\n * is no `ThemeProvider` ancestor.\n */\nexport function useTheme(): DefaultTheme {\n const theme = useContext(ThemeContext);\n\n if (!theme) {\n throw styledError(18);\n }\n\n return theme;\n}\n\n/**\n * Provide a theme to an entire react component tree via context\n */\nexport default function ThemeProvider(props: Props): React.JSX.Element | null {\n const outerTheme = React.useContext(ThemeContext);\n const themeContext = useMemo(\n () => mergeTheme(props.theme, outerTheme),\n [props.theme, outerTheme]\n );\n\n if (!props.children) {\n return null;\n }\n\n return <ThemeContext.Provider value={themeContext}>{props.children}</ThemeContext.Provider>;\n}\n","import { DefaultTheme, ExecutionProps } from '../types';\nimport { EMPTY_OBJECT } from './empties';\n\nexport default function determineTheme(\n props: ExecutionProps,\n providedTheme?: DefaultTheme | undefined,\n defaultProps: { theme?: DefaultTheme | undefined } = EMPTY_OBJECT\n): DefaultTheme | undefined {\n return (props.theme !== defaultProps.theme && props.theme) || providedTheme || defaultProps.theme;\n}\n","import React from 'react';\nimport { AnyComponent } from '../types';\n\nconst hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\n// copied from react-is\nconst REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nconst REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n\n/**\n * Adapted from hoist-non-react-statics to avoid the react-is dependency.\n */\nconst REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true,\n};\n\nconst KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n};\n\nconst FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n};\n\nconst MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true,\n};\n\nconst TYPE_STATICS = {\n [REACT_FORWARD_REF_TYPE]: FORWARD_REF_STATICS,\n [REACT_MEMO_TYPE]: MEMO_STATICS,\n};\n\ntype OmniComponent = AnyComponent;\n\n// adapted from react-is\nfunction isMemo(\n object: OmniComponent | React.MemoExoticComponent<any>\n): object is React.MemoExoticComponent<any> {\n const $$typeofType = 'type' in object && object.type.$$typeof;\n\n return $$typeofType === REACT_MEMO_TYPE;\n}\n\nfunction getStatics(component: OmniComponent) {\n // React v16.11 and below\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n\n // React v16.12 and above\n return '$$typeof' in component\n ? TYPE_STATICS[component['$$typeof'] as unknown as string]\n : REACT_STATICS;\n}\n\nconst defineProperty = Object.defineProperty;\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst objectPrototype = Object.prototype;\n\ntype ExcludeList = {\n [key: string]: true;\n};\n\ntype NonReactStatics<S extends OmniComponent, C extends ExcludeList = {}> = {\n [key in Exclude<\n keyof S,\n S extends React.MemoExoticComponent<any>\n ? keyof typeof MEMO_STATICS | keyof C\n : S extends React.ForwardRefExoticComponent<any>\n ? keyof typeof FORWARD_REF_STATICS | keyof C\n : keyof typeof REACT_STATICS | keyof typeof KNOWN_STATICS | keyof C\n >]: S[key];\n};\n\nexport default function hoistNonReactStatics<\n T extends OmniComponent,\n S extends OmniComponent,\n C extends ExcludeList = {},\n>(targetComponent: T, sourceComponent: S, excludelist?: C | undefined) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);\n }\n }\n\n let keys: (String | Symbol)[] = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i] as unknown as string;\n if (\n !(key in KNOWN_STATICS) &&\n !(excludelist && excludelist[key]) &&\n !(sourceStatics && key in sourceStatics) &&\n !(targetStatics && key in targetStatics)\n ) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor!);\n } catch (e) {\n /* ignore */\n }\n }\n }\n }\n\n return targetComponent as T & NonReactStatics<S, C>;\n}\n","const AD_REPLACER_R = /(a)(d)/gi;\n\n/* This is the \"capacity\" of our alphabet i.e. 2x26 for all letters plus their capitalised\n * counterparts */\nconst charsLength = 52;\n\n/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */\nconst getAlphabeticChar = (code: number) => String.fromCharCode(code + (code > 25 ? 39 : 97));\n\n/* input a number, usually a hash and convert it to base-52 */\nexport default function generateAlphabeticName(code: number) {\n let name = '';\n let x;\n\n /* get a char and divide by alphabet-length */\n for (x = Math.abs(code); x > charsLength; x = (x / charsLength) | 0) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return (getAlphabeticChar(x % charsLength) + name).replace(AD_REPLACER_R, '$1-$2');\n}\n","/**\n * Convenience function for joining strings to form className chains\n */\nexport function joinStrings(a?: string | undefined, b?: string | undefined): string {\n return a && b ? `${a} ${b}` : a || b || '';\n}\n\nexport function joinStringArray(arr: string[], sep?: string | undefined): string {\n if (arr.length === 0) {\n return '';\n }\n\n let result = arr[0];\n for (let i = 1; i < arr.length; i++) {\n result += sep ? sep + arr[i] : arr[i];\n }\n return result;\n}\n","import transformDeclPairs from 'css-to-react-native';\nimport { parse } from 'postcss';\nimport {\n Dict,\n ExecutionContext,\n IInlineStyle,\n IInlineStyleConstructor,\n RuleSet,\n StyleSheet,\n} from '../types';\nimport flatten from '../utils/flatten';\nimport generateComponentId from '../utils/generateComponentId';\nimport { joinStringArray } from '../utils/joinStrings';\n\nlet generated: Dict<any> = {};\n\nexport const resetStyleCache = (): void => {\n generated = {};\n};\n\n/**\n * InlineStyle takes arbitrary CSS and generates a flat object\n */\nexport default function makeInlineStyleClass<Props extends object>(styleSheet: StyleSheet) {\n const InlineStyle: IInlineStyleConstructor<Props> = class InlineStyle\n implements IInlineStyle<Props>\n {\n rules: RuleSet<Props>;\n\n constructor(rules: RuleSet<Props>) {\n this.rules = rules;\n }\n\n generateStyleObject(executionContext: ExecutionContext & Props) {\n // keyframes, functions, and component selectors are not allowed for React Native\n const flatCSS = joinStringArray(\n flatten(this.rules as RuleSet<object>, executionContext) as string[]\n );\n const hash = generateComponentId(flatCSS);\n\n if (!generated[hash]) {\n const root = parse(flatCSS);\n const declPairs: [string, string][] = [];\n\n root.each(node => {\n if (node.type === 'decl') {\n declPairs.push([node.prop, node.value]);\n } else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') {\n console.warn(`Node of type ${node.type} not supported as an inline style`);\n }\n });\n\n // RN currently does not support differing values for the border color of Image\n // components (but does for View). It is almost impossible to tell whether we'll have\n // support, so we'll just disable multiple values here.\n // https://github.com/styled-components/styled-components/issues/4181\n\n const styleObject = transformDeclPairs(declPairs, ['borderWidth', 'borderColor']);\n\n const styles = styleSheet.create({\n generated: styleObject,\n });\n\n generated[hash] = styles.generated;\n }\n return generated[hash];\n }\n };\n\n return InlineStyle;\n}\n","import isPlainObject from './isPlainObject';\n\nfunction mixinRecursively(target: any, source: any, forceMerge = false) {\n /* only merge into POJOs, Arrays, but for top level objects only\n * allow to merge into anything by passing forceMerge = true */\n if (!forceMerge && !isPlainObject(target) && !Array.isArray(target)) {\n return source;\n }\n\n if (Array.isArray(source)) {\n for (let key = 0; key < source.length; key++) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n } else if (isPlainObject(source)) {\n for (const key in source) {\n target[key] = mixinRecursively(target[key], source[key]);\n }\n }\n\n return target;\n}\n\n/**\n * Arrays & POJOs merged recursively, other objects and value types are overridden\n * If target is not a POJO or an Array, it will get source properties injected via shallow merge\n * Source objects applied left to right. Mutates & returns target. Similar to lodash merge.\n */\nexport default function mixinDeep(target: any, ...sources: any[]) {\n for (const source of sources) {\n mixinRecursively(target, source, true);\n }\n\n return target;\n}\n","import React, { createElement, Ref, useMemo } from 'react';\nimport type {\n Attrs,\n BaseObject,\n Dict,\n ExecutionContext,\n ExecutionProps,\n IInlineStyleConstructor,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n OmitNever,\n RuleSet,\n StyledOptions,\n} from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '../utils/empties';\nimport generateDisplayName from '../utils/generateDisplayName';\nimport hoist from '../utils/hoist';\nimport isFunction from '../utils/isFunction';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport merge from '../utils/mixinDeep';\nimport { DefaultTheme, ThemeContext } from './ThemeProvider';\n\nfunction useResolvedAttrs<Props extends object>(\n theme: DefaultTheme = EMPTY_OBJECT,\n props: Props,\n attrs: Attrs<Props>[]\n) {\n // NOTE: can't memoize this\n // returns [context, resolvedAttrs]\n // where resolvedAttrs is only the things injected by the attrs themselves\n const context: ExecutionContext & Props = { ...props, theme };\n const resolvedAttrs: Dict<any> = {};\n\n attrs.forEach(attrDef => {\n let resolvedAttrDef = isFunction(attrDef) ? attrDef(context) : attrDef;\n let key;\n\n for (key in resolvedAttrDef) {\n // @ts-expect-error bad types\n context[key] = resolvedAttrs[key] = resolvedAttrDef[key];\n }\n });\n\n return [context, resolvedAttrs] as const;\n}\n\ninterface StyledComponentImplProps extends ExecutionProps {\n style?: any;\n}\n\nfunction useStyledComponentImpl<Props extends StyledComponentImplProps>(\n forwardedComponent: IStyledComponent<'native', Props>,\n props: Props,\n forwardedRef: Ref<any>\n) {\n const {\n attrs: componentAttrs,\n inlineStyle,\n defaultProps,\n shouldForwardProp,\n target,\n } = forwardedComponent;\n\n const contextTheme = React.useContext(ThemeContext);\n\n // NOTE: the non-hooks version only subscribes to this when !componentStyle.isStatic,\n // but that'd be against the rules-of-hooks. We could be naughty and do it anyway as it\n // should be an immutable value, but behave for now.\n const theme = determineTheme(props, contextTheme, defaultProps);\n\n const [context, attrs] = useResolvedAttrs<Props>(theme || EMPTY_OBJECT, props, componentAttrs);\n\n const generatedStyles = inlineStyle.generateStyleObject(context);\n\n const refToForward = forwardedRef;\n\n const elementToBeCreated: NativeTarget = attrs.as || props.as || target;\n\n const computedProps: Dict<any> = attrs !== props ? { ...props, ...attrs } : props;\n const propsForElement: Dict<any> = {};\n\n for (const key in computedProps) {\n if (key[0] === '$' || key === 'as') continue;\n else if (key === 'forwardedAs') {\n propsForElement.as = computedProps[key];\n } else if (!shouldForwardProp || shouldForwardProp(key, elementToBeCreated)) {\n propsForElement[key] = computedProps[key];\n }\n }\n\n propsForElement.style = useMemo(\n () =>\n isFunction(props.style)\n ? (state: any) => [generatedStyles].concat(props.style(state))\n : props.style\n ? [generatedStyles].concat(props.style)\n : generatedStyles,\n [props.style, generatedStyles]\n );\n\n propsForElement.ref = refToForward;\n\n return createElement(elementToBeCreated, propsForElement);\n}\n\nexport default (InlineStyle: IInlineStyleConstructor<any>) => {\n const createStyledNativeComponent = <\n Target extends NativeTarget,\n OuterProps extends ExecutionProps,\n Statics extends object = BaseObject,\n >(\n target: Target,\n options: StyledOptions<'native', OuterProps>,\n rules: RuleSet<OuterProps>\n ): ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>> => {\n const isTargetStyledComp = isStyledComponent(target);\n const styledComponentTarget = target as IStyledComponent<'native', OuterProps>;\n\n const { displayName = generateDisplayName(target), attrs = EMPTY_ARRAY } = options;\n\n // fold the underlying StyledComponent attrs up (implicit extend)\n const finalAttrs =\n isTargetStyledComp && styledComponentTarget.attrs\n ? styledComponentTarget.attrs.concat(attrs).filter(Boolean)\n : (attrs as Attrs<OuterProps>[]);\n\n let shouldForwardProp = options.shouldForwardProp;\n\n if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) {\n const shouldForwardPropFn = styledComponentTarget.shouldForwardProp;\n\n if (options.shouldForwardProp) {\n const passedShouldForwardPropFn = options.shouldForwardProp;\n\n // compose nested shouldForwardProp calls\n shouldForwardProp = (prop, elementToBeCreated) =>\n shouldForwardPropFn(prop, elementToBeCreated) &&\n passedShouldForwardPropFn(prop, elementToBeCreated);\n } else {\n shouldForwardProp = shouldForwardPropFn;\n }\n }\n\n const forwardRefRender = (props: ExecutionProps & OuterProps, ref: React.Ref<any>) =>\n useStyledComponentImpl<OuterProps>(WrappedStyledComponent, props, ref);\n\n forwardRefRender.displayName = displayName;\n\n /**\n * forwardRef creates a new interim component, which we'll take advantage of\n * instead of extending ParentComponent to create _another_ interim class\n */\n let WrappedStyledComponent = React.forwardRef(forwardRefRender) as unknown as IStyledComponent<\n 'native',\n any\n > &\n Statics;\n\n WrappedStyledComponent.attrs = finalAttrs;\n WrappedStyledComponent.inlineStyle = new InlineStyle(\n isTargetStyledComp ? styledComponentTarget.inlineStyle.rules.concat(rules) : rules\n ) as InstanceType<IInlineStyleConstructor<OuterProps>>;\n WrappedStyledComponent.displayName = displayName;\n WrappedStyledComponent.shouldForwardProp = shouldForwardProp;\n\n // @ts-expect-error we don't actually need this for anything other than detection of a styled-component\n WrappedStyledComponent.styledComponentId = true;\n\n // fold the underlying StyledComponent target up since we folded the styles\n WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target;\n\n Object.defineProperty(WrappedStyledComponent, 'defaultProps', {\n get() {\n return this._foldedDefaultProps;\n },\n\n set(obj) {\n this._foldedDefaultProps = isTargetStyledComp\n ? merge({}, styledComponentTarget.defaultProps, obj)\n : obj;\n },\n });\n\n hoist<typeof WrappedStyledComponent, typeof target>(WrappedStyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n inlineStyle: true,\n displayName: true,\n shouldForwardProp: true,\n target: true,\n } as { [key in keyof OmitNever<IStyledStatics<'native', Target>>]: true });\n\n return WrappedStyledComponent;\n };\n\n return createStyledNativeComponent;\n};\n","import transformDeclPairs from 'css-to-react-native';\nimport { parse } from 'postcss';\nimport React from 'react';\nimport constructWithOptions, { Styled } from '../constructors/constructWithOptions';\nimport css from '../constructors/css';\nimport withTheme from '../hoc/withTheme';\nimport _InlineStyle from '../models/InlineStyle';\nimport _StyledNativeComponent from '../models/StyledNativeComponent';\nimport ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';\nimport { NativeTarget, RuleSet } from '../types';\nimport flatten from '../utils/flatten';\nimport isStyledComponent from '../utils/isStyledComponent';\nimport { joinStringArray } from '../utils/joinStrings';\n\nconst reactNative = require('react-native') as Awaited<typeof import('react-native')>;\n\nconst InlineStyle = _InlineStyle(reactNative.StyleSheet);\nconst StyledNativeComponent = _StyledNativeComponent(InlineStyle);\n\nconst baseStyled = <Target extends NativeTarget>(tag: Target) =>\n constructWithOptions<'native', Target>(StyledNativeComponent, tag);\n\n/* React native lazy-requires each of these modules for some reason, so let's\n * assume it's for a good reason and not eagerly load them all */\nconst aliases = [\n 'ActivityIndicator',\n 'Button',\n 'DatePickerIOS',\n 'DrawerLayoutAndroid',\n 'FlatList',\n 'Image',\n 'ImageBackground',\n 'KeyboardAvoidingView',\n 'Modal',\n 'Pressable',\n 'ProgressBarAndroid',\n 'ProgressViewIOS',\n 'RefreshControl',\n 'SafeAreaView',\n 'ScrollView',\n 'SectionList',\n 'Slider',\n 'Switch',\n 'Text',\n 'TextInput',\n 'TouchableHighlight',\n 'TouchableOpacity',\n 'View',\n 'VirtualizedList',\n] as const;\n\ntype KnownComponents = (typeof aliases)[number];\n\n/** Isolates RN-provided components since they don't expose a helper type for this. */\ntype RNComponents = {\n [K in keyof typeof reactNative]: (typeof reactNative)[K] extends React.ComponentType<any>\n ? (typeof reactNative)[K]\n : never;\n};\n\nconst styled = baseStyled as typeof baseStyled & {\n [E in KnownComponents]: Styled<'native', RNComponents[E], React.ComponentProps<RNComponents[E]>>;\n};\n\n/* Define a getter for each alias which simply gets the reactNative component\n * and passes it to styled */\naliases.forEach(alias =>\n Object.defineProperty(styled, alias, {\n enumerable: true,\n configurable: false,\n get() {\n if (alias in reactNative && reactNative[alias]) {\n return styled(reactNative[alias]);\n }\n\n throw new Error(\n `${alias} is not available in the currently-installed version of react-native`\n );\n },\n })\n);\n\nconst toStyleSheet = (rules: RuleSet<object>) => {\n const flatCSS = joinStringArray(flatten(rules) as string[]);\n\n const root = parse(flatCSS);\n const declPairs: [string, string][] = [];\n\n root.each(node => {\n if (node.type === 'decl') {\n declPairs.push([node.prop, node.value]);\n } else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') {\n console.warn(`Node of type ${node.type} not supported as an inline style`);\n }\n });\n\n const styleObject = transformDeclPairs(declPairs, ['borderWidth', 'borderColor']);\n\n return reactNative.StyleSheet.create({ style: styleObject }).style;\n};\n\nexport {\n CSSKeyframes,\n CSSObject,\n CSSProperties,\n CSSPseudos,\n DefaultTheme,\n ExecutionContext,\n ExecutionProps,\n IStyledComponent,\n IStyledComponentFactory,\n IStyledStatics,\n NativeTarget,\n PolymorphicComponent,\n PolymorphicComponentProps,\n Runtime,\n StyledObject,\n StyledOptions,\n} from '../types';\nexport {\n ThemeConsumer,\n ThemeContext,\n ThemeProvider,\n css,\n styled as default,\n isStyledComponent,\n styled,\n toStyleSheet,\n useTheme,\n withTheme,\n};\n","import generateAlphabeticName from './generateAlphabeticName';\nimport { hash } from './hash';\n\nexport default function generateComponentId(str: string) {\n return generateAlphabeticName(hash(str) >>> 0);\n}\n","import { StyledTarget } from '../types';\nimport getComponentName from './getComponentName';\nimport isTag from './isTag';\n\nexport default function generateDisplayName(target: StyledTarget<any>) {\n return isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})`;\n}\n","import { StyledTarget } from '../types';\n\nexport default function isTag(target: StyledTarget<'web'>): target is string {\n return (\n typeof target === 'string' &&\n (process.env.NODE_ENV !== 'production'\n ? target.charAt(0) === target.charAt(0).toLowerCase()\n : true)\n );\n}\n","import React from 'react';\nimport { ThemeContext } from '../models/ThemeProvider';\nimport { AnyComponent, ExecutionProps } from '../types';\nimport determineTheme from '../utils/determineTheme';\nimport getComponentName from '../utils/getComponentName';\nimport hoist from '../utils/hoist';\n\nexport default function withTheme<T extends AnyComponent>(Component: T) {\n const WithTheme = React.forwardRef<T, React.JSX.LibraryManagedAttributes<T, ExecutionProps>>(\n (props, ref) => {\n const theme = React.useContext(ThemeContext);\n const themeProp = determineTheme(props, theme, Component.defaultProps);\n\n if (process.env.NODE_ENV !== 'production' && themeProp === undefined) {\n console.warn(\n `[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"${getComponentName(\n Component\n )}\"`\n );\n }\n\n return <Component {...props} theme={themeProp} ref={ref} />;\n }\n );\n\n WithTheme.displayName = `WithTheme(${getComponentName(Component)})`;\n\n return hoist(WithTheme, Component);\n}\n"],"names":["EMPTY_ARRAY","Object","freeze","EMPTY_OBJECT","ERRORS","process","env","NODE_ENV","format","args","_i","arguments","length","a","b","c","len","push","forEach","d","replace","throwStyledComponentsError","code","interpolations","Error","concat","join","trim","setToString","object","toStringFn","defineProperty","value","SC_ATTR","REACT_APP_SC_ATTR","SC_ATTR_ACTIVE","SC_ATTR_VERSION","SC_VERSION","SPLITTER","IS_BROWSER","window","DISABLE_SPEEDY","Boolean","SC_DISABLE_SPEEDY","REACT_APP_SC_DISABLE_SPEEDY","DefaultGroupedTag","tag","this","groupSizes","Uint32Array","prototype","indexOfGroup","group","index","i","insertRules","rules","oldBuffer","oldSize","newSize","styledError","set","ruleIndex","l","insertRule","clearGroup","length_1","startIndex","endIndex","deleteRule","getGroup","css","getRule","MAX_SMI","groupIDRegister","Map","reverseRegister","nextFreeGroup","getGroupForId","id","has","get","setGroupForId","SELECTOR","MARKER_RE","RegExp","rehydrateNamesFromContent","sheet","content","name","names","split","registerName","rehydrateSheetFromTag","style","parts","_a","textContent","part","marker","match","parseInt","getTag","rehydrateSheet","nodes","document","querySelectorAll","node","getAttribute","parentNode","removeChild","makeStyleTag","target","head","parent","createElement","prevStyle","arr","Array","from","findLastStyleTag","nextSibling","undefined","setAttribute","nonce","__webpack_nonce__","insertBefore","CSSOMTag","element","appendChild","createTextNode","styleSheets","ownerNode","getSheet","rule","_error","cssRules","cssText","TextTag","childNodes","VirtualTag","_target","splice","SHOULD_REHYDRATE","defaultOptions","isServer","useCSSOMInjection","StyleSheet","options","globalStyles","_this","__assign","gs","server","getIdForGroup","size","selector","outputSheet","registerId","rehydrate","reconstructWithOptions","withNames","allocateGSInstance","makeTag","hasNameForId","add","groupNames","Set","clearNames","clear","clearRules","clearTag","phash","h","x","charCodeAt","AMP_REGEX","COMMENT_REGEX","recursivelySetNamepace","compiled","namespace","map","type","replaceAll","props","prop","isArray","children","mainSheet","mainStylis","_componentId","_selector","_selectorRegexp","_c","_d","plugins","selfReferenceReplacer","offset","string","startsWith","endsWith","middlewares","slice","stylis","RULESET","includes","prefix","prefixer","stringify","stringifyRules","componentId","flatCSS","compile","stack","serialize","middleware","rulesheet","hash","reduce","acc","plugin","throwStyledError","toString","createStylisInstance","Keyframes","React","default","createContext","shouldForwardProp","styleSheet","inject","stylisInstance","resolvedName","String","getName","getComponentName","displayName","isUpper","hyphenateStyleName","output","toLowerCase","isFunction","test","isPlainObject","constructor","$$typeof","isStyledComponent","isFalsish","chunk","objToCssArray","obj","key","val","hasOwnProperty","isCss","hyphenate","apply","unitless","flatten","executionContext","styledComponentId","isReactComponent","result","console","error","chunklet","interleave","strings","addTag","arg","assign","styles","__spreadArray","styleStringArray","constructWithOptions","componentConstructor","templateFunction","initialStyles","attrs","filter","withConfig","config","ThemeContext","ThemeConsumer","Consumer","determineTheme","providedTheme","defaultProps","theme","hasSymbol","Symbol","for","REACT_MEMO_TYPE","REACT_FORWARD_REF_TYPE","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","render","getStatics","component","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","excludelist","inheritedComponent","keys","targetStatics","sourceStatics","descriptor","e","AD_REPLACER_R","getAlphabeticChar","fromCharCode","joinStringArray","sep","generated","mixinRecursively","source","forceMerge","InlineStyle","reactNative","require","StyledNativeComponent","generateStyleObject","Math","abs","generateAlphabeticName","root","parse","declPairs_1","each","warn","styleObject","transformDeclPairs","create","isTargetStyledComp","styledComponentTarget","charAt","isTag","generateDisplayName","_b","finalAttrs","shouldForwardPropFn_1","passedShouldForwardPropFn_1","elementToBeCreated","forwardRefRender","ref","forwardedComponent","forwardedRef","componentAttrs","inlineStyle","contextTheme","useContext","context","resolvedAttrs","attrDef","resolvedAttrDef","useResolvedAttrs","generatedStyles","refToForward","as","computedProps","propsForElement","useMemo","state","useStyledComponentImpl","WrappedStyledComponent","forwardRef","_foldedDefaultProps","sources","sources_1","merge","hoist","styled","alias","enumerable","configurable","outerTheme","themeContext","mergedTheme","mergeTheme","Provider","declPairs","Component","WithTheme","themeProp"],"mappings":"upBAEaA,EAAcC,OAAOC,OAAO,IAC5BC,EAAeF,OAAOC,OAAO,ICApCE,EAA6C,eAAzBC,QAAQC,IAAIC,SCHvB,CACb,EAAK,wDACL,EAAK,gQACL,EAAK,sHACL,EAAK,sMACL,EAAK,kKACL,EAAK,4OACL,EAAK,qHACL,EAAK,8DACL,EAAK,gCACL,GAAM,iUACN,GAAM,wNACN,GAAM,qWACN,GAAM,yLACN,GAAM,+CACN,GAAM,2ZACN,GAAM,uQACN,GAAM,yIACN,GAAM,oFDfqE,GAK7E,SAASC,QAAO,IAAyBC,EAAA,GAAAC,EAAA,EAAzBA,EAAyBC,UAAAC,OAAzBF,IAAAD,EAAyBC,GAAAC,UAAAD,GAIvC,IAHA,IAAIG,EAAIJ,EAAK,GACPK,EAAI,GAEDC,EAAI,EAAGC,EAAMP,EAAKG,OAAQG,EAAIC,EAAKD,GAAK,EAC/CD,EAAEG,KAAKR,EAAKM,IAOd,OAJAD,EAAEI,QAAQ,SAAAC,GACRN,EAAIA,EAAEO,QAAQ,SAAUD,EAC1B,GAEON,CACT,CAMwB,SAAAQ,EACtBC,OACA,IAAwBC,EAAA,GAAAb,EAAA,EAAxBA,EAAwBC,UAAAC,OAAxBF,IAAAa,EAAwBb,EAAA,GAAAC,UAAAD,GAExB,MAA6B,eAAzBL,QAAQC,IAAIC,SACP,IAAIiB,MACT,0IAAAC,OAA0IH,EAAI,0BAAAG,OAC5IF,EAAeX,OAAS,EAAI,UAAUa,OAAAF,EAAeG,KAAK,OAAU,KAIjE,IAAIF,MAAMhB,gCAAOJ,EAAOkB,IAAUC,GAAc,IAAEI,OAE7D,CExBgB,SAAAC,EAAYC,EAAgBC,GAC1C7B,OAAO8B,eAAeF,EAAQ,WAAY,CAAEG,MAAOF,GACrD,CCfO,IAAMG,EACS,oBAAZ5B,cACiB,IAAhBA,Q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