styled-components 6.0.1 → 6.0.3

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const seedNextClassnames: (names: string[]) => string[];
2
3
  export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget>(tag: Target) => import("../constructors/constructWithOptions").Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
3
4
  a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
package/dist/types.d.ts CHANGED
@@ -4,7 +4,7 @@ import ComponentStyle from './models/ComponentStyle';
4
4
  import { DefaultTheme } from './models/ThemeProvider';
5
5
  import createWarnTooManyClasses from './utils/createWarnTooManyClasses';
6
6
  export { CSS, DefaultTheme };
7
- interface ExoticComponentWithDisplayName<P = any> extends React.ExoticComponent<P> {
7
+ interface ExoticComponentWithDisplayName<P extends object = {}> extends React.ExoticComponent<P> {
8
8
  defaultProps?: Partial<P>;
9
9
  displayName?: string;
10
10
  }
@@ -19,8 +19,11 @@ export type BaseObject = {};
19
19
  export type OmitNever<T> = {
20
20
  [K in keyof T as T[K] extends never ? never : K]: T[K];
21
21
  };
22
+ type FastOmit<T extends object, U extends string | number | symbol> = {
23
+ [K in keyof T as K extends U ? never : K]: T[K];
24
+ };
22
25
  export type Runtime = 'web' | 'native';
23
- export type AnyComponent<P = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
26
+ export type AnyComponent<P extends object = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
24
27
  export type KnownTarget = Exclude<keyof JSX.IntrinsicElements, 'symbol' | 'object'> | AnyComponent;
25
28
  export type WebTarget = string | KnownTarget;
26
29
  export type NativeTarget = AnyComponent;
@@ -101,7 +104,7 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> ex
101
104
  /**
102
105
  * Used by PolymorphicComponent to define prop override cascading order.
103
106
  */
104
- export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithoutRef<ForwardedAsTarget> : {}> = Omit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps> & Omit<ExecutionProps, 'as' | 'forwardedAs'> & {
107
+ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithoutRef<ForwardedAsTarget> : {}> = FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
105
108
  as?: AsTarget;
106
109
  forwardedAs?: ForwardedAsTarget;
107
110
  };
@@ -116,7 +119,7 @@ export interface PolymorphicComponent<R extends Runtime, BaseProps extends objec
116
119
  <AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget>): JSX.Element;
117
120
  }
118
121
  export interface IStyledComponent<R extends Runtime, Props extends object = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
119
- defaultProps?: Partial<Substitute<ExecutionProps, Props>>;
122
+ defaultProps?: ExecutionProps & Partial<Props>;
120
123
  toString: () => string;
121
124
  }
122
125
  export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
@@ -155,4 +158,4 @@ export type StyledObject<Props extends object> = Substitute<Props, CSS.Propertie
155
158
  */
156
159
  export type CSSProp = Interpolation<any>;
157
160
  export type NoInfer<T> = [T][T extends any ? 0 : never];
158
- export type Substitute<A extends object, B extends object> = Omit<A, keyof B> & B;
161
+ export type Substitute<A extends object, B extends object> = FastOmit<A, keyof B> & B;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WebTarget } from '../types';
2
3
  import { Styled } from './constructWithOptions';
3
4
  declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { AnyComponent, ExecutionProps } from '../types';
3
- export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "defaultProps" | "displayName" | "$$typeof" | "propTypes" | "type" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "defaultProps" | "displayName" | "$$typeof" | "propTypes" | "render" : "length" | "defaultProps" | "displayName" | "propTypes" | "contextType" | "contextTypes" | "childContextTypes" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "name" | "type" | "getDefaultProps" | "mixins" | "prototype" | "caller" | "callee" | "arguments" | "arity">]: T[key]; };
3
+ export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & { [key in Exclude<keyof T, T extends React.MemoExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "type" | "compare" : T extends React.ForwardRefExoticComponent<any> ? "propTypes" | "defaultProps" | "displayName" | "$$typeof" | "render" : "length" | "propTypes" | "prototype" | "arguments" | "caller" | "name" | "contextType" | "contextTypes" | "childContextTypes" | "defaultProps" | "displayName" | "getDerivedStateFromProps" | "getDerivedStateFromError" | "type" | "getDefaultProps" | "mixins" | "callee" | "arity">]: T[key]; };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type stylis from 'stylis';
2
3
  import StyleSheet from '../sheet';
3
4
  import { ShouldForwardProp, Stringifier } from '../types';
4
5
  export declare const mainSheet: StyleSheet;
@@ -20,20 +21,20 @@ export type IStyleSheetManager = React.PropsWithChildren<{
20
21
  * uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet).
21
22
  * When disabled, rules are inserted as simple text into style blocks.
22
23
  */
23
- disableCSSOMInjection?: boolean;
24
+ disableCSSOMInjection?: undefined | boolean;
24
25
  /**
25
26
  * If you are working exclusively with modern browsers, vendor prefixes can often be omitted
26
27
  * to reduce the weight of CSS on the page.
27
28
  */
28
- enableVendorPrefixes?: boolean;
29
+ enableVendorPrefixes?: undefined | boolean;
29
30
  /**
30
31
  * Provide an optional selector to be prepended to all generated style rules.
31
32
  */
32
- namespace?: string;
33
+ namespace?: undefined | string;
33
34
  /**
34
35
  * Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios.
35
36
  */
36
- sheet?: StyleSheet;
37
+ sheet?: undefined | StyleSheet;
37
38
  /**
38
39
  * Starting in v6, styled-components no longer does its own prop validation
39
40
  * and recommends use of transient props "$prop" to pass style-only props to
@@ -48,17 +49,17 @@ export type IStyleSheetManager = React.PropsWithChildren<{
48
49
  * Manually composing `styled.{element}.withConfig({shouldForwardProp})` will
49
50
  * override this default.
50
51
  */
51
- shouldForwardProp?: IStyleSheetContext['shouldForwardProp'];
52
+ shouldForwardProp?: undefined | IStyleSheetContext['shouldForwardProp'];
52
53
  /**
53
54
  * An array of plugins to be run by stylis (style processor) during compilation.
54
55
  * Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis).
55
56
  *
56
57
  * \* The plugin(s) must be compatible with stylis v4 or above.
57
58
  */
58
- stylisPlugins?: stylis.Middleware[];
59
+ stylisPlugins?: undefined | stylis.Middleware[];
59
60
  /**
60
61
  * Provide an alternate DOM node to host generated styles; useful for iframes.
61
62
  */
62
- target?: HTMLElement;
63
+ target?: undefined | HTMLElement;
63
64
  }>;
64
65
  export declare function StyleSheetManager(props: IStyleSheetManager): JSX.Element;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react");require("shallowequal");var n=require("stylis"),r=require("@emotion/unitless"),o=require("css-to-react-native"),s=require("postcss");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=/*#__PURE__*/i(t),u=/*#__PURE__*/a(n),l=/*#__PURE__*/i(r),p=/*#__PURE__*/i(o),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 g(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(y.apply(void 0,e.__spreadArray([d[t]],n,!1)).trim())}function m(e,t){Object.defineProperty(e,"toString",{value:t})}var v="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="undefined"!=typeof window&&"HTMLElement"in window,_=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),w=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 g(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat("/*!sc*/\n");return t},e}(),b=new Map,E=new Map,P=1,A=function(e){if(b.has(e))return b.get(e);for(;E.has(P);)P++;var t=P++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw g(16,"".concat(t));return b.set(e,t),E.set(t,e),t},C=function(e,t){b.set(e,t),E.set(t,e)},T="style[".concat(v,"][").concat("data-styled-version",'="').concat("6.0.1",'"]'),N=new RegExp("^".concat(v,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),O=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)},x=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(N);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(C(l,u),O(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},D=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){return Array.from(e.querySelectorAll("style[".concat(v,"]"))).at(-1)}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(v,"active"),r.setAttribute("data-styled-version","6.0.1");var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},j=function(){function e(e){this.element=D(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 g(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}(),R=function(){function e(e){this.element=D(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}(),I=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}(),B=S,L={isServer:!S,useCSSOMInjection:!_},z=function(){function t(t,n,r){void 0===t&&(t=f),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},L),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&S&&B&&(B=!1,function(e){for(var t=document.querySelectorAll(T),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(v)&&(x(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),m(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return E.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(v,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return A(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new I(n):t?new j(n):new R(n)}(this.options),new w(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(A(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(A(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(A(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},k=/&/g,V=/^\s*\/\/.*$/gm;function $(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=$(e.children,t)),e})}var q=new z,F=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===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},l=a.slice();l.push(function(e){e.type===u.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(k,n).replace(r,c))}),s.prefix&&l.push(u.prefixer),l.push(u.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(V,""),p=u.compile(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);s.namespace&&(p=$(p,s.namespace));var h=[];return u.serialize(p,u.middleware(l.concat(u.rulesheet(function(e){return h.push(e)})))),h};return p.hash=a.length?a.reduce(function(e,t){return t.name||g(15),M(e,t.name)},5381).toString():"",p}(),Y=(c.default.createContext({shouldForwardProp:void 0,styleSheet:q,stylis:F}),c.default.createContext(void 0),function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=F);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 g(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=F),this.name+e.hash},e}());function G(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}var W=function(e){return e>="A"&&e<="Z"};function H(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;W(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}function U(e){return"function"==typeof e}function K(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Z(e){return"object"==typeof e&&"styledComponentId"in e}var J=function(e){return null==e||!1===e||""===e},Q=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!J(i)&&(Array.isArray(i)&&i.isCss||U(i)?o.push("".concat(H(s),":"),i,";"):K(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Q(i),!1),["}"],!1)):o.push("".concat(H(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in l.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function X(e,t,n,r){if(J(e))return[];if(Z(e))return[".".concat(e.styledComponentId)];if(U(e)){if(!U(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 Y||K(o)||null===o||console.error("".concat(G(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.")),X(o,t,n,r)}var s;return e instanceof Y?n?(e.inject(n,r),[e.getName(r)]):[e]:K(e)?Q(e):Array.isArray(e)?e.flatMap(function(e){return X(e,t,n,r)}):[e.toString()]}function ee(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 te=function(e){return Object.assign(e,{isCss:!0})};function ne(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(U(t)||K(t)){var o=t;return te(X(ee(h,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?X(s):te(X(ee(s,n)))}function re(t,n,r){if(void 0===r&&(r=f),!n)throw g(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ne.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return re(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return re(t,n,e.__assign(e.__assign({},r),o))},o}var oe,se=c.default.createContext(void 0),ie=se.Consumer;function ae(e,t,n){return void 0===n&&(n=f),e.theme!==n.theme&&e.theme||t||n.theme}var ce="function"==typeof Symbol&&Symbol.for,ue=ce?Symbol.for("react.memo"):60115,le=ce?Symbol.for("react.forward_ref"):60112,pe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},he={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},de=((oe={})[le]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oe[ue]=fe,oe);function ye(e){return("type"in(t=e)&&t.type.$$typeof)===ue?fe:"$$typeof"in e?de[e.$$typeof]:pe;var t}var ge=Object.defineProperty,me=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,Se=Object.getOwnPropertyDescriptor,_e=Object.getPrototypeOf,we=Object.prototype;function be(e,t,n){if("string"!=typeof t){if(we){var r=_e(t);r&&r!==we&&be(e,r,n)}var o=me(t);ve&&(o=o.concat(ve(t)));for(var s=ye(e),i=ye(t),a=0;a<o.length;++a){var c=o[a];if(!(c in he||n&&n[c]||i&&c in i||s&&c in s)){var u=Se(t,c);try{ge(e,c,u)}catch(e){}}}}return e}var Ee=/(a)(d)/gi,Pe=function(e){return String.fromCharCode(e+(e>25?39:97))},Ae={};function Ce(e,t,n){if(void 0===n&&(n=!1),!n&&!K(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Ce(e[r],t[r]);else if(K(t))for(var r in t)e[r]=Ce(e[r],t[r]);return e}var Te,Ne,Oe=require("react-native"),xe=(Te=Oe.StyleSheet,Ne=function(){function e(e){this.rules=e}return e.prototype.generateStyleObject=function(e){var t=function(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}(X(this.rules,e)),n=function(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Pe(t%52)+n;return(Pe(t%52)+n).replace(Ee,"$1-$2")}(M(5381,t)>>>0);if(!Ae[n]){var r=s.parse(t),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 i=p.default(o),a=Te.create({generated:i});Ae[n]=a.generated}return Ae[n]},e}(),function(n,r,o){var s=Z(n),i=n,a=r.displayName,u=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(G(e),")")}(n):a,l=r.attrs,p=void 0===l?h:l,d=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,y=r.shouldForwardProp;if(s&&i.shouldForwardProp){var g=i.shouldForwardProp;if(r.shouldForwardProp){var m=r.shouldForwardProp;y=function(e,t){return g(e,t)&&m(e,t)}}else y=g}var v=function(n,r){return function(n,r,o){var s=n.attrs,i=n.inlineStyle,a=n.defaultProps,u=n.shouldForwardProp,l=n.target,p=c.default.useContext(se),h=function(t,n,r){void 0===t&&(t=f);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach(function(e){var t,n=U(e)?e(o):e;for(t in n)o[t]=s[t]=n[t]}),[o,s]}(ae(r,p,a)||f,r,s),d=h[1],y=i.generateStyleObject(h[0]),g=o,m=d.as||r.as||l,v=d!==r?e.__assign(e.__assign({},r),d):r,S={};for(var _ in v)"$"!==_[0]&&"as"!==_&&("forwardedAs"===_?S.as=v[_]:u&&!u(_,m)||(S[_]=v[_]));return S.style=t.useMemo(function(){return U(r.style)?function(e){return[y].concat(r.style(e))}:r.style?[y].concat(r.style):y},[r.style,y]),S.ref=g,t.createElement(m,S)}(S,n,r)};v.displayName=u;var S=c.default.forwardRef(v);return S.attrs=d,S.inlineStyle=new Ne(s?i.inlineStyle.rules.concat(o):o),S.displayName=u,S.shouldForwardProp=y,S.styledComponentId=!0,S.target=s?i.target:n,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++)Ce(e,o[r],!0);return e}({},i.defaultProps,e):e}}),be(S,n,{attrs:!0,inlineStyle:!0,displayName:!0,shouldForwardProp:!0,target:!0}),S}),De=function(e){return re(xe,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(De,e,{enumerable:!0,configurable:!1,get:function(){if(e in Oe&&Oe[e])return De(Oe[e]);throw new Error("".concat(e," is not available in the currently-installed version of react-native"))}})}),exports.ThemeConsumer=ie,exports.ThemeContext=se,exports.ThemeProvider=function(n){var r=c.default.useContext(se),o=t.useMemo(function(){return function(t,n){if(!t)throw g(14);if(U(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw g(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw g(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?c.default.createElement(se.Provider,{value:o},n.children):null},exports.css=ne,exports.default=De,exports.isStyledComponent=Z,exports.styled=De,exports.useTheme=function(){var e=t.useContext(se);if(!e)throw g(18);return e},exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=ae(n,c.default.useContext(se),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(G(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return n.displayName="WithTheme(".concat(G(t),")"),be(n,t)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react");require("shallowequal");var n=require("stylis"),r=require("@emotion/unitless"),o=require("css-to-react-native"),s=require("postcss");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var c=/*#__PURE__*/i(t),u=/*#__PURE__*/a(n),l=/*#__PURE__*/i(r),p=/*#__PURE__*/i(o),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(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(y.apply(void 0,e.__spreadArray([d[t]],n,!1)).trim())}function g(e,t){Object.defineProperty(e,"toString",{value:t})}var m="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",S="undefined"!=typeof window&&"HTMLElement"in window,_=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),w=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("/*!sc*/\n");return t},e}(),E=new Map,b=new Map,A=1,P=function(e){if(E.has(e))return E.get(e);for(;b.has(A);)A++;var t=A++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>1073741824))throw v(16,"".concat(t));return E.set(e,t),b.set(t,e),t},C=function(e,t){E.set(e,t),b.set(t,e)},N="style[".concat(m,"][").concat("data-styled-version",'="').concat("6.0.3",'"]'),O=new RegExp("^".concat(m,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),T=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)},D=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(O);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(C(l,u),T(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(a)}}},x=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(m,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(m,"active"),r.setAttribute("data-styled-version","6.0.3");var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},j=function(){function e(e){this.element=x(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}(),R=function(){function e(e){this.element=x(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}(),I=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}(),B=S,L={isServer:!S,useCSSOMInjection:!_},V=function(){function t(t,n,r){void 0===t&&(t=f),void 0===n&&(n={});var o=this;this.options=e.__assign(e.__assign({},L),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&S&&B&&(B=!1,function(e){for(var t=document.querySelectorAll(N),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(m)&&(D(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),g(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return b.get(e)}(n);if(void 0===o)return"continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||0===i.length)return"continue";var a="".concat(m,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},s=0;s<n;s++)o(s);return r}(o)})}return t.registerId=function(e){return P(e)},t.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=!0),new t(e.__assign(e.__assign({},this.options),n),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new I(n):t?new j(n):new R(n)}(this.options),new w(e)));var e},t.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.prototype.registerName=function(e,t){if(P(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(P(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(P(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t}(),z=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},k=/&/g,M=/^\s*\/\/.*$/gm;function $(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=$(e.children,t)),e})}var q=new V,F=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===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},l=a.slice();l.push(function(e){e.type===u.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(k,n).replace(r,c))}),s.prefix&&l.push(u.prefixer),l.push(u.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(M,""),p=u.compile(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);s.namespace&&(p=$(p,s.namespace));var h=[];return u.serialize(p,u.middleware(l.concat(u.rulesheet(function(e){return h.push(e)})))),h};return p.hash=a.length?a.reduce(function(e,t){return t.name||v(15),z(e,t.name)},5381).toString():"",p}(),Y=(c.default.createContext({shouldForwardProp:void 0,styleSheet:q,stylis:F}),c.default.createContext(void 0),function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=F);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,g(this,function(){throw v(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=F),this.name+e.hash},e}());function G(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}var W=function(e){return e>="A"&&e<="Z"};function H(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;W(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}function U(e){return"function"==typeof e}function K(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Z(e){return"object"==typeof e&&"styledComponentId"in e}var J=function(e){return null==e||!1===e||""===e},Q=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!J(i)&&(Array.isArray(i)&&i.isCss||U(i)?o.push("".concat(H(s),":"),i,";"):K(i)?o.push.apply(o,e.__spreadArray(e.__spreadArray(["".concat(s," {")],Q(i),!1),["}"],!1)):o.push("".concat(H(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in l.default||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return o};function X(e,t,n,r){if(J(e))return[];if(Z(e))return[".".concat(e.styledComponentId)];if(U(e)){if(!U(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 Y||K(o)||null===o||console.error("".concat(G(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.")),X(o,t,n,r)}var s;return e instanceof Y?n?(e.inject(n,r),[e.getName(r)]):[e]:K(e)?Q(e):Array.isArray(e)?Array.prototype.concat.apply(h,e.map(function(e){return X(e,t,n,r)})):[e.toString()]}function ee(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 te=function(e){return Object.assign(e,{isCss:!0})};function ne(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(U(t)||K(t)){var o=t;return te(X(ee(h,e.__spreadArray([o],n,!0))))}var s=t;return 0===n.length&&1===s.length&&"string"==typeof s[0]?X(s):te(X(ee(s,n)))}function re(t,n,r){if(void 0===r&&(r=f),!n)throw v(1,n);var o=function(o){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return t(n,r,ne.apply(void 0,e.__spreadArray([o],s,!1)))};return o.attrs=function(o){return re(t,n,e.__assign(e.__assign({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return re(t,n,e.__assign(e.__assign({},r),o))},o}var oe,se=c.default.createContext(void 0),ie=se.Consumer;function ae(e,t,n){return void 0===n&&(n=f),e.theme!==n.theme&&e.theme||t||n.theme}var ce="function"==typeof Symbol&&Symbol.for,ue=ce?Symbol.for("react.memo"):60115,le=ce?Symbol.for("react.forward_ref"):60112,pe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},he={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},de=((oe={})[le]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oe[ue]=fe,oe);function ye(e){return("type"in(t=e)&&t.type.$$typeof)===ue?fe:"$$typeof"in e?de[e.$$typeof]:pe;var t}var ve=Object.defineProperty,ge=Object.getOwnPropertyNames,me=Object.getOwnPropertySymbols,Se=Object.getOwnPropertyDescriptor,_e=Object.getPrototypeOf,we=Object.prototype;function Ee(e,t,n){if("string"!=typeof t){if(we){var r=_e(t);r&&r!==we&&Ee(e,r,n)}var o=ge(t);me&&(o=o.concat(me(t)));for(var s=ye(e),i=ye(t),a=0;a<o.length;++a){var c=o[a];if(!(c in he||n&&n[c]||i&&c in i||s&&c in s)){var u=Se(t,c);try{ve(e,c,u)}catch(e){}}}}return e}var be=/(a)(d)/gi,Ae=function(e){return String.fromCharCode(e+(e>25?39:97))},Pe={};function Ce(e,t,n){if(void 0===n&&(n=!1),!n&&!K(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Ce(e[r],t[r]);else if(K(t))for(var r in t)e[r]=Ce(e[r],t[r]);return e}var Ne,Oe,Te=require("react-native"),De=(Ne=Te.StyleSheet,Oe=function(){function e(e){this.rules=e}return e.prototype.generateStyleObject=function(e){var t=function(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}(X(this.rules,e)),n=function(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ae(t%52)+n;return(Ae(t%52)+n).replace(be,"$1-$2")}(z(5381,t)>>>0);if(!Pe[n]){var r=s.parse(t),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 i=p.default(o),a=Ne.create({generated:i});Pe[n]=a.generated}return Pe[n]},e}(),function(n,r,o){var s=Z(n),i=n,a=r.displayName,u=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(G(e),")")}(n):a,l=r.attrs,p=void 0===l?h:l,d=s&&i.attrs?i.attrs.concat(p).filter(Boolean):p,y=r.shouldForwardProp;if(s&&i.shouldForwardProp){var v=i.shouldForwardProp;if(r.shouldForwardProp){var g=r.shouldForwardProp;y=function(e,t){return v(e,t)&&g(e,t)}}else y=v}var m=function(n,r){return function(n,r,o){var s=n.attrs,i=n.inlineStyle,a=n.defaultProps,u=n.shouldForwardProp,l=n.target,p=c.default.useContext(se),h=function(t,n,r){void 0===t&&(t=f);var o=e.__assign(e.__assign({},n),{theme:t}),s={};return r.forEach(function(e){var t,n=U(e)?e(o):e;for(t in n)o[t]=s[t]=n[t]}),[o,s]}(ae(r,p,a)||f,r,s),d=h[1],y=i.generateStyleObject(h[0]),v=o,g=d.as||r.as||l,m=d!==r?e.__assign(e.__assign({},r),d):r,S={};for(var _ in m)"$"!==_[0]&&"as"!==_&&("forwardedAs"===_?S.as=m[_]:u&&!u(_,g)||(S[_]=m[_]));return S.style=t.useMemo(function(){return U(r.style)?function(e){return[y].concat(r.style(e))}:r.style?[y].concat(r.style):y},[r.style,y]),S.ref=v,t.createElement(g,S)}(S,n,r)};"production"!==process.env.NODE_ENV&&(m.displayName=u);var S=c.default.forwardRef(m);return S.attrs=d,S.inlineStyle=new Oe(s?i.inlineStyle.rules.concat(o):o),S.shouldForwardProp=y,"production"!==process.env.NODE_ENV&&(S.displayName=u),S.styledComponentId=!0,S.target=s?i.target:n,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++)Ce(e,o[r],!0);return e}({},i.defaultProps,e):e}}),Ee(S,n,{attrs:!0,inlineStyle:!0,displayName:!0,shouldForwardProp:!0,target:!0}),S}),xe=function(e){return re(De,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(xe,e,{enumerable:!0,configurable:!1,get:function(){if(e in Te&&Te[e])return xe(Te[e]);throw new Error("".concat(e," is not available in the currently-installed version of react-native"))}})}),exports.ThemeConsumer=ie,exports.ThemeContext=se,exports.ThemeProvider=function(n){var r=c.default.useContext(se),o=t.useMemo(function(){return function(t,n){if(!t)throw v(14);if(U(t)){var r=t(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw v(7);return r}if(Array.isArray(t)||"object"!=typeof t)throw v(8);return n?e.__assign(e.__assign({},n),t):t}(n.theme,r)},[n.theme,r]);return n.children?c.default.createElement(se.Provider,{value:o},n.children):null},exports.css=ne,exports.default=xe,exports.isStyledComponent=Z,exports.styled=xe,exports.useTheme=function(){var e=t.useContext(se);if(!e)throw v(18);return e},exports.withTheme=function(t){var n=c.default.forwardRef(function(n,r){var o=ae(n,c.default.useContext(se),t.defaultProps);return"production"!==process.env.NODE_ENV&&void 0===o&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(G(t),'"')),c.default.createElement(t,e.__assign({},n,{theme:o,ref:r}))});return"production"!==process.env.NODE_ENV&&(n.displayName="WithTheme(".concat(G(t),")")),Ee(n,t)};
2
2
  //# sourceMappingURL=styled-components.native.cjs.js.map