mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
118 KiB
Plaintext
1 line
118 KiB
Plaintext
{"version":3,"file":"jss.js","sources":["../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/is-in-browser/dist/module.js","../../../node_modules/tiny-warning/dist/tiny-warning.esm.js","../src/utils/cloneStyle.js","../src/utils/createRule.js","../../../node_modules/@babel/runtime/helpers/esm/createClass.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../src/utils/toCssValue.js","../src/utils/toCss.js","../src/utils/escape.js","../src/plugins/styleRule.js","../src/plugins/conditionalRule.js","../src/plugins/keyframesRule.js","../src/plugins/keyframeRule.js","../src/plugins/fontFaceRule.js","../src/plugins/viewportRule.js","../src/plugins/simpleRule.js","../src/plugins/index.js","../src/RuleList.js","../src/StyleSheet.js","../src/PluginsRegistry.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../src/SheetsRegistry.js","../src/sheets.js","../src/utils/globalThis.js","../src/utils/moduleId.js","../src/utils/createGenerateId.js","../src/DomRenderer.js","../src/Jss.js","../src/utils/getDynamicStyles.js","../src/SheetsManager.js","../src/index.js"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;\n","import type {JssStyle} from '../types'\n\nconst plainObjectConstrurctor = {}.constructor\n\nexport default function cloneStyle(style: JssStyle): JssStyle {\n if (style == null || typeof style !== 'object') return style\n if (Array.isArray(style)) return style.map(cloneStyle)\n if (style.constructor !== plainObjectConstrurctor) return style\n\n const newStyle = {}\n for (const name in style) {\n newStyle[name] = cloneStyle(style[name])\n }\n return newStyle\n}\n","// @flow\nimport warning from 'tiny-warning'\nimport type {Rule, RuleOptions, JssStyle} from '../types'\nimport cloneStyle from './cloneStyle'\n\n/**\n * Create a rule instance.\n */\nexport default function createRule(\n name: string = 'unnamed',\n decl: JssStyle,\n options: RuleOptions\n): Rule | null {\n const {jss} = options\n const declCopy = cloneStyle(decl)\n\n const rule = jss.plugins.onCreateRule(name, declCopy, options)\n if (rule) return rule\n\n // It is an at-rule and it has no instance.\n if (name[0] === '@') {\n warning(false, `[JSS] Unknown rule ${name}`)\n }\n\n return null\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","// @flow\n\nimport type {FixMeAny} from '../types'\n\nconst join = (value, by) => {\n let result = ''\n for (let i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break\n if (result) result += by\n result += value[i]\n }\n return result\n}\n\ntype ToCssValue = (FixMeAny, boolean | void) => string\n\n/**\n * Converts array values to string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\nconst toCssValue: ToCssValue = (value, ignoreImportant = false) => {\n if (!Array.isArray(value)) return value\n\n let cssValue = ''\n\n // Support space separated values via `[['5px', '10px']]`.\n if (Array.isArray(value[0])) {\n for (let i = 0; i < value.length; i++) {\n if (value[i] === '!important') break\n if (cssValue) cssValue += ', '\n cssValue += join(value[i], ' ')\n }\n } else cssValue = join(value, ', ')\n\n // Add !important, because it was ignored.\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important'\n }\n\n return cssValue\n}\n\nexport default toCssValue\n","// @flow\nimport toCssValue from './toCssValue'\nimport type {ToCssOptions, JssStyle} from '../types'\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\nfunction indentStr(str: string, indent: number): string {\n let result = ''\n for (let index = 0; index < indent; index++) result += ' '\n return result + str\n}\n\n/**\n * Converts a Rule to CSS string.\n */\nexport default function toCss(\n selector?: string,\n style: JssStyle,\n options: ToCssOptions = ({}: any)\n): string {\n let result = ''\n\n if (!style) return result\n\n let {indent = 0} = options\n const {fallbacks} = style\n\n if (selector) indent++\n\n // Apply fallbacks first.\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (let index = 0; index < fallbacks.length; index++) {\n const fallback = fallbacks[index]\n for (const prop in fallback) {\n const value = fallback[prop]\n if (value != null) {\n if (result) result += '\\n'\n result += indentStr(`${prop}: ${toCssValue(value)};`, indent)\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (const prop in fallbacks) {\n const value = fallbacks[prop]\n if (value != null) {\n if (result) result += '\\n'\n result += indentStr(`${prop}: ${toCssValue(value)};`, indent)\n }\n }\n }\n }\n\n for (const prop in style) {\n const value = style[prop]\n if (value != null && prop !== 'fallbacks') {\n if (result) result += '\\n'\n result += indentStr(`${prop}: ${toCssValue(value)};`, indent)\n }\n }\n\n // Allow empty style in this case, because properties will be added dynamically.\n if (!result && !options.allowEmpty) return result\n\n // When rule is being stringified before selector was defined.\n if (!selector) return result\n\n indent--\n\n if (result) result = `\\n${result}\\n`\n\n return indentStr(`${selector} {${result}`, indent) + indentStr('}', indent)\n}\n","const escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g\nconst nativeEscape = typeof CSS !== 'undefined' && CSS.escape\n\nexport default str => (nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1'))\n","// @flow\nimport warning from 'tiny-warning'\nimport toCss from '../utils/toCss'\nimport toCssValue from '../utils/toCssValue'\nimport escape from '../utils/escape'\nimport type {\n CSSStyleRule,\n HTMLElementWithStyleMap,\n ToCssOptions,\n RuleOptions,\n UpdateOptions,\n Renderer as RendererInterface,\n JssStyle,\n JssValue,\n BaseRule\n} from '../types'\n\nexport class BaseStyleRule implements BaseRule {\n type: string = 'style'\n\n key: string\n\n isProcessed: boolean = false\n\n style: JssStyle\n\n renderer: RendererInterface | null\n\n renderable: ?Object\n\n options: RuleOptions\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n const {sheet, Renderer} = options\n this.key = key\n this.options = options\n this.style = style\n if (sheet) this.renderer = sheet.renderer\n else if (Renderer) this.renderer = new Renderer()\n }\n\n /**\n * Get or set a style property.\n */\n prop(name: string, value?: JssValue, options?: UpdateOptions): this | string {\n // It's a getter.\n if (value === undefined) return this.style[name]\n\n // Don't do anything if the value has not changed.\n const force = options ? options.force : false\n if (!force && this.style[name] === value) return this\n\n let newValue = value\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this)\n }\n\n const isEmpty = newValue == null || newValue === false\n const isDefined = name in this.style\n\n // Value is empty and wasn't defined before.\n if (isEmpty && !isDefined && !force) return this\n\n // We are going to remove this value.\n const remove = isEmpty && isDefined\n\n if (remove) delete this.style[name]\n else this.style[name] = newValue\n\n // Renderable is defined if StyleSheet option `link` is true.\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name)\n else this.renderer.setProperty(this.renderable, name, newValue)\n return this\n }\n\n const {sheet} = this.options\n if (sheet && sheet.attached) {\n warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".')\n }\n return this\n }\n}\n\nexport class StyleRule extends BaseStyleRule {\n selectorText: string\n\n id: ?string\n\n renderable: ?CSSStyleRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n super(key, style, options)\n const {selector, scoped, sheet, generateId} = options\n if (selector) {\n this.selectorText = selector\n } else if (scoped !== false) {\n this.id = generateId(this, sheet)\n this.selectorText = `.${escape(this.id)}`\n }\n }\n\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n set selector(selector: string): void {\n if (selector === this.selectorText) return\n\n this.selectorText = selector\n\n const {renderer, renderable} = this\n\n if (!renderable || !renderer) return\n\n const hasChanged = renderer.setSelector(renderable, selector)\n\n // If selector setter is not implemented, rerender the rule.\n if (!hasChanged) {\n renderer.replaceRule(renderable, this)\n }\n }\n\n /**\n * Get selector string.\n */\n get selector(): string {\n return this.selectorText\n }\n\n /**\n * Apply rule to an element inline.\n */\n applyTo(renderable: HTMLElementWithStyleMap): this {\n const {renderer} = this\n if (renderer) {\n const json = this.toJSON()\n for (const prop in json) {\n renderer.setProperty(renderable, prop, json[prop])\n }\n }\n return this\n }\n\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n toJSON(): Object {\n const json = {}\n for (const prop in this.style) {\n const value = this.style[prop]\n if (typeof value !== 'object') json[prop] = value\n else if (Array.isArray(value)) json[prop] = toCssValue(value)\n }\n return json\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n const opts = link ? {...options, allowEmpty: true} : options\n return toCss(this.selectorText, this.style, opts)\n }\n}\n\nexport default {\n onCreateRule(name: string, style: JssStyle, options: RuleOptions): StyleRule | null {\n if (name[0] === '@' || (options.parent && options.parent.type === 'keyframes')) {\n return null\n }\n return new StyleRule(name, style, options)\n }\n}\n","// @flow\nimport RuleList from '../RuleList'\nimport type {CSSMediaRule, Rule, RuleOptions, ToCssOptions, JssStyle, ContainerRule} from '../types'\n\nconst defaultToStringOptions = {\n indent: 1,\n children: true\n}\n\nconst atRegExp = /@([\\w-]+)/\n\n/**\n * Conditional rule for @media, @supports\n */\nexport class ConditionalRule implements ContainerRule {\n type: string = 'conditional'\n\n at: string\n\n key: string\n\n query: string\n\n rules: RuleList\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSMediaRule\n\n constructor(key: string, styles: Object, options: RuleOptions) {\n this.key = key\n const atMatch = key.match(atRegExp)\n this.at = atMatch ? atMatch[1] : 'unknown'\n // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n this.query = options.name || `@${this.at}`\n this.options = options\n this.rules = new RuleList({...options, parent: this})\n\n for (const name in styles) {\n this.rules.add(name, styles[name])\n }\n\n this.rules.process()\n }\n\n /**\n * Get a rule.\n */\n getRule(name: string): Rule {\n return this.rules.get(name)\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.rules.indexOf(rule)\n }\n\n /**\n * Create and register rule, run plugins.\n */\n addRule(name: string, style: JssStyle, options?: RuleOptions): Rule | null {\n const rule = this.rules.add(name, style, options)\n if (!rule) return null\n this.options.jss.plugins.onProcessRule(rule)\n return rule\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions = defaultToStringOptions): string {\n if (options.indent == null) options.indent = defaultToStringOptions.indent\n if (options.children == null) options.children = defaultToStringOptions.children\n if (options.children === false) {\n return `${this.query} {}`\n }\n const children = this.rules.toString(options)\n return children ? `${this.query} {\\n${children}\\n}` : ''\n }\n}\n\nconst keyRegExp = /@media|@supports\\s+/\n\nexport default {\n onCreateRule(key: string, styles: JssStyle, options: RuleOptions): ConditionalRule | null {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null\n }\n}\n","// @flow\nimport warning from 'tiny-warning'\nimport RuleList from '../RuleList'\nimport type {\n CSSKeyframesRule,\n JssStyle,\n RuleOptions,\n ToCssOptions,\n ContainerRule,\n KeyframesMap,\n Plugin\n} from '../types'\nimport escape from '../utils/escape'\n\nconst defaultToStringOptions = {\n indent: 1,\n children: true\n}\n\nconst nameRegExp = /@keyframes\\s+([\\w-]+)/\n\n/**\n * Rule for @keyframes\n */\nexport class KeyframesRule implements ContainerRule {\n type: string = 'keyframes'\n\n at: string = '@keyframes'\n\n key: string\n\n name: string\n\n id: string\n\n rules: RuleList\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSKeyframesRule\n\n constructor(key: string, frames: Object, options: RuleOptions) {\n const nameMatch = key.match(nameRegExp)\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1]\n } else {\n this.name = 'noname'\n warning(false, `[JSS] Bad keyframes name ${key}`)\n }\n this.key = `${this.type}-${this.name}`\n this.options = options\n const {scoped, sheet, generateId} = options\n this.id = scoped === false ? this.name : escape(generateId(this, sheet))\n this.rules = new RuleList({...options, parent: this})\n\n for (const name in frames) {\n this.rules.add(name, frames[name], {\n ...options,\n parent: this\n })\n }\n\n this.rules.process()\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions = defaultToStringOptions): string {\n if (options.indent == null) options.indent = defaultToStringOptions.indent\n if (options.children == null) options.children = defaultToStringOptions.children\n if (options.children === false) {\n return `${this.at} ${this.id} {}`\n }\n let children = this.rules.toString(options)\n if (children) children = `\\n${children}\\n`\n return `${this.at} ${this.id} {${children}}`\n }\n}\n\nconst keyRegExp = /@keyframes\\s+/\n\nconst refRegExp = /\\$([\\w-]+)/g\n\nconst findReferencedKeyframe = (val, keyframes) => {\n if (typeof val === 'string') {\n return val.replace(refRegExp, (match, name) => {\n if (name in keyframes) {\n return keyframes[name]\n }\n\n warning(false, `[JSS] Referenced keyframes rule \"${name}\" is not defined.`)\n\n return match\n })\n }\n\n return val\n}\n\n/**\n * Replace the reference for a animation name.\n */\nconst replaceRef = (style: JssStyle, prop: string, keyframes: KeyframesMap) => {\n const value = style[prop]\n const refKeyframe = findReferencedKeyframe(value, keyframes)\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe\n }\n}\n\nconst plugin: Plugin = {\n onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp.test(key)\n ? new KeyframesRule(key, frames, options)\n : null\n },\n\n // Animation name ref replacer.\n onProcessStyle: (style, rule, sheet) => {\n if (rule.type !== 'style' || !sheet) return style\n\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes)\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes)\n return style\n },\n\n onChangeValue(val, prop, rule) {\n const {sheet} = rule.options\n\n if (!sheet) {\n return val\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes)\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes)\n default:\n return val\n }\n }\n}\n\nexport default plugin\n","// @flow\nimport toCss from '../utils/toCss'\nimport type {JssStyle, RuleOptions, ToCssOptions, CSSKeyframeRule} from '../types'\nimport {BaseStyleRule} from './styleRule'\n\nexport class KeyframeRule extends BaseStyleRule {\n renderable: ?CSSKeyframeRule\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n const opts = link ? {...options, allowEmpty: true} : options\n return toCss(this.key, this.style, opts)\n }\n}\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): KeyframeRule | null {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options)\n }\n return null\n }\n}\n","// @flow\nimport toCss from '../utils/toCss'\nimport type {CSSFontFaceRule, RuleOptions, JssStyle, ToCssOptions, BaseRule} from '../types'\n\nexport class FontFaceRule implements BaseRule {\n type: string = 'font-face'\n\n at: string = '@font-face'\n\n key: string\n\n style: JssStyle\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSFontFaceRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n this.key = key\n this.style = style\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index])\n if (this.style[index + 1]) str += '\\n'\n }\n return str\n }\n\n return toCss(this.at, this.style, options)\n }\n}\n\nconst keyRegExp = /@font-face/\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): FontFaceRule | null {\n return keyRegExp.test(key) ? new FontFaceRule(key, style, options) : null\n }\n}\n","// @flow\nimport toCss from '../utils/toCss'\nimport type {CSSViewportRule, RuleOptions, JssStyle, ToCssOptions, BaseRule} from '../types'\n\nexport class ViewportRule implements BaseRule {\n type: string = 'viewport'\n\n at: string = '@viewport'\n\n key: string\n\n style: JssStyle\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSViewportRule\n\n constructor(key: string, style: JssStyle, options: RuleOptions) {\n this.key = key\n this.style = style\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n toString(options?: ToCssOptions): string {\n return toCss(this.key, this.style, options)\n }\n}\n\nexport default {\n onCreateRule(key: string, style: JssStyle, options: RuleOptions): ViewportRule | null {\n return key === '@viewport' || key === '@-ms-viewport'\n ? new ViewportRule(key, style, options)\n : null\n }\n}\n","// @flow\nimport type {\n CSSCharsetRule,\n CSSImportRule,\n CSSNamespaceRule,\n RuleOptions,\n JssStyle,\n ToCssOptions,\n BaseRule\n} from '../types'\n\nexport class SimpleRule implements BaseRule {\n type: string = 'simple'\n\n key: string\n\n value: string | Array<string>\n\n options: RuleOptions\n\n isProcessed: boolean = false\n\n renderable: ?CSSCharsetRule | CSSImportRule | CSSNamespaceRule\n\n constructor(key: string, value: string, options: RuleOptions) {\n this.key = key\n this.value = value\n this.options = options\n }\n\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n toString(options?: ToCssOptions): string {\n if (Array.isArray(this.value)) {\n let str = ''\n for (let index = 0; index < this.value.length; index++) {\n str += `${this.key} ${this.value[index]};`\n if (this.value[index + 1]) str += '\\n'\n }\n return str\n }\n\n return `${this.key} ${this.value};`\n }\n}\n\nconst keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n}\n\nexport default {\n onCreateRule(key: string, value: JssStyle, options: RuleOptions): SimpleRule | null {\n return key in keysMap ? new SimpleRule(key, value, options) : null\n }\n}\n","// @flow\nimport pluginStyleRule, {StyleRule} from './styleRule'\nimport pluginConditionalRule, {ConditionalRule} from './conditionalRule'\nimport pluginKeyframesRule, {KeyframesRule} from './keyframesRule'\nimport pluginKeyframeRule, {KeyframeRule} from './keyframeRule'\nimport pluginFontFaceRule, {FontFaceRule} from './fontFaceRule'\nimport pluginViewportRule, {ViewportRule} from './viewportRule'\nimport pluginSimpleRule, {SimpleRule} from './simpleRule'\n\nexport const plugins = [\n pluginStyleRule,\n pluginConditionalRule,\n pluginKeyframesRule,\n pluginKeyframeRule,\n pluginFontFaceRule,\n pluginViewportRule,\n pluginSimpleRule\n]\n\nexport {\n StyleRule,\n ConditionalRule,\n KeyframesRule,\n KeyframeRule,\n FontFaceRule,\n ViewportRule,\n SimpleRule\n}\n","// @flow\nimport createRule from './utils/createRule'\nimport {StyleRule, KeyframesRule} from './plugins/index'\nimport type {\n RuleListOptions,\n ToCssOptions,\n Rule,\n RuleOptions,\n JssStyle,\n Classes,\n KeyframesMap,\n UpdateArguments,\n UpdateOptions\n} from './types'\nimport escape from './utils/escape'\n\nconst defaultUpdateOptions = {\n process: true\n}\n\nconst forceUpdateOptions = {\n force: true,\n process: true\n}\n\n/**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\nexport default class RuleList {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n map: {[key: string]: Rule} = {}\n\n // Original styles object.\n raw: {[key: string]: JssStyle} = {}\n\n // Used to ensure correct rules order.\n index: Array<Rule> = []\n\n counter: number = 0\n\n options: RuleListOptions\n\n classes: Classes\n\n keyframes: KeyframesMap\n\n constructor(options: RuleListOptions) {\n this.options = options\n this.classes = options.classes\n this.keyframes = options.keyframes\n }\n\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n add(name: string, decl: JssStyle, ruleOptions?: RuleOptions): Rule | null {\n const {parent, sheet, jss, Renderer, generateId, scoped} = this.options\n const options = {\n classes: this.classes,\n parent,\n sheet,\n jss,\n Renderer,\n generateId,\n scoped,\n name,\n keyframes: this.keyframes,\n selector: undefined,\n ...ruleOptions\n }\n\n // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n let key = name\n if (name in this.raw) {\n key = `${name}-d${this.counter++}`\n }\n\n // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n this.raw[key] = decl\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = `.${escape(this.classes[key])}`\n }\n\n const rule = createRule(key, decl, options)\n\n if (!rule) return null\n\n this.register(rule)\n\n const index = options.index === undefined ? this.index.length : options.index\n this.index.splice(index, 0, rule)\n\n return rule\n }\n\n /**\n * Get a rule.\n */\n get(name: string): Rule {\n return this.map[name]\n }\n\n /**\n * Delete a rule.\n */\n remove(rule: Rule): void {\n this.unregister(rule)\n delete this.raw[rule.key]\n this.index.splice(this.index.indexOf(rule), 1)\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.index.indexOf(rule)\n }\n\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n process(): void {\n const {plugins} = this.options.jss\n // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n this.index.slice(0).forEach(plugins.onProcessRule, plugins)\n }\n\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n register(rule: Rule): void {\n this.map[rule.key] = rule\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule\n if (rule.id) this.classes[rule.key] = rule.id\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id\n }\n }\n\n /**\n * Unregister a rule.\n */\n unregister(rule: Rule): void {\n delete this.map[rule.key]\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector]\n delete this.classes[rule.key]\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name]\n }\n }\n\n /**\n * Update the function values with a new data.\n */\n update(...args: UpdateArguments): void {\n let name\n let data\n let options\n\n if (typeof args[0] === 'string') {\n name = args[0]\n // $FlowFixMe[invalid-tuple-index]\n data = args[1]\n // $FlowFixMe[invalid-tuple-index]\n options = args[2]\n } else {\n data = args[0]\n // $FlowFixMe[invalid-tuple-index]\n options = args[1]\n name = null\n }\n\n if (name) {\n this.updateOne(this.map[name], data, options)\n } else {\n for (let index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options)\n }\n }\n }\n\n /**\n * Execute plugins, update rule props.\n */\n updateOne(rule: Rule, data: Object, options?: UpdateOptions = defaultUpdateOptions) {\n const {\n jss: {plugins},\n sheet\n } = this.options\n\n // It is a rules container like for e.g. ConditionalRule.\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options)\n return\n }\n\n const styleRule: StyleRule = (rule: any)\n const {style} = styleRule\n\n plugins.onUpdate(data, rule, sheet, options)\n\n // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n if (options.process && style && style !== styleRule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(styleRule.style, styleRule, sheet)\n\n // Update and add props.\n for (const prop in styleRule.style) {\n const nextValue = styleRule.style[prop]\n const prevValue = style[prop]\n // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n if (nextValue !== prevValue) {\n styleRule.prop(prop, nextValue, forceUpdateOptions)\n }\n }\n\n // Remove props.\n for (const prop in style) {\n const nextValue = styleRule.style[prop]\n const prevValue = style[prop]\n // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n if (nextValue == null && nextValue !== prevValue) {\n styleRule.prop(prop, null, forceUpdateOptions)\n }\n }\n }\n }\n\n /**\n * Convert rules to a CSS string.\n */\n toString(options?: ToCssOptions): string {\n let str = ''\n const {sheet} = this.options\n const link = sheet ? sheet.options.link : false\n\n for (let index = 0; index < this.index.length; index++) {\n const rule = this.index[index]\n const css = rule.toString(options)\n\n // No need to render an empty rule.\n if (!css && !link) continue\n\n if (str) str += '\\n'\n str += css\n }\n\n return str\n }\n}\n","// @flow\nimport RuleList from './RuleList'\nimport type {\n InternalStyleSheetOptions,\n Rule,\n ToCssOptions,\n RuleOptions,\n StyleSheetOptions,\n JssStyle,\n Classes,\n KeyframesMap,\n JssStyles,\n Renderer,\n UpdateArguments,\n UpdateOptions\n} from './types'\n\nexport default class StyleSheet {\n options: InternalStyleSheetOptions\n\n deployed: boolean\n\n attached: boolean\n\n rules: RuleList\n\n renderer: Renderer | null\n\n classes: Classes\n\n keyframes: KeyframesMap\n\n queue: ?Array<Rule>\n\n constructor(styles: JssStyles, options: StyleSheetOptions) {\n this.attached = false\n this.deployed = false\n this.classes = {}\n this.keyframes = {}\n this.options = {\n ...options,\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n }\n if (options.Renderer) {\n this.renderer = new options.Renderer(this)\n }\n this.rules = new RuleList(this.options)\n\n for (const name in styles) {\n this.rules.add(name, styles[name])\n }\n\n this.rules.process()\n }\n\n /**\n * Attach renderable to the render tree.\n */\n attach(): this {\n if (this.attached) return this\n if (this.renderer) this.renderer.attach()\n this.attached = true\n // Order is important, because we can't use insertRule API if style element is not attached.\n if (!this.deployed) this.deploy()\n return this\n }\n\n /**\n * Remove renderable from render tree.\n */\n detach(): this {\n if (!this.attached) return this\n if (this.renderer) this.renderer.detach()\n this.attached = false\n return this\n }\n\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n addRule(name: string, decl: JssStyle, options?: RuleOptions): Rule | null {\n const {queue} = this\n\n // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n if (this.attached && !queue) this.queue = []\n\n const rule = this.rules.add(name, decl, options)\n\n if (!rule) return null\n\n this.options.jss.plugins.onProcessRule(rule)\n\n if (this.attached) {\n if (!this.deployed) return rule\n // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n if (queue) queue.push(rule)\n else {\n this.insertRule(rule)\n if (this.queue) {\n this.queue.forEach(this.insertRule, this)\n this.queue = undefined\n }\n }\n return rule\n }\n\n // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n this.deployed = false\n\n return rule\n }\n\n /**\n * Insert rule into the StyleSheet\n */\n insertRule(rule: Rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule)\n }\n }\n\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n addRules(styles: JssStyles, options?: RuleOptions): Array<Rule> {\n const added = []\n for (const name in styles) {\n const rule = this.addRule(name, styles[name], options)\n if (rule) added.push(rule)\n }\n return added\n }\n\n /**\n * Get a rule by name.\n */\n getRule(name: string): Rule {\n return this.rules.get(name)\n }\n\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n deleteRule(name: string | Rule): boolean {\n const rule = typeof name === 'object' ? name : this.rules.get(name)\n\n if (\n !rule ||\n // Style sheet was created without link: true and attached, in this case we\n // won't be able to remove the CSS rule from the DOM.\n (this.attached && !rule.renderable)\n ) {\n return false\n }\n\n this.rules.remove(rule)\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable)\n }\n\n return true\n }\n\n /**\n * Get index of a rule.\n */\n indexOf(rule: Rule): number {\n return this.rules.indexOf(rule)\n }\n\n /**\n * Deploy pure CSS string to a renderable.\n */\n deploy(): this {\n if (this.renderer) this.renderer.deploy()\n this.deployed = true\n return this\n }\n\n /**\n * Update the function values with a new data.\n */\n update(...args: UpdateArguments): this {\n this.rules.update(...args)\n return this\n }\n\n /**\n * Updates a single rule.\n */\n updateOne(rule: Rule, data: Object, options?: UpdateOptions): this {\n this.rules.updateOne(rule, data, options)\n return this\n }\n\n /**\n * Convert rules to a CSS string.\n */\n toString(options?: ToCssOptions): string {\n return this.rules.toString(options)\n }\n}\n","// @flow\nimport warning from 'tiny-warning'\nimport type StyleSheet from './StyleSheet'\nimport type {\n Plugin,\n Rule,\n RuleOptions,\n UpdateOptions,\n JssStyle,\n JssValue,\n OnCreateRule,\n OnProcessRule,\n OnProcessStyle,\n OnProcessSheet,\n OnChangeValue,\n OnUpdate\n} from './types'\nimport type {StyleRule, BaseStyleRule} from './plugins/styleRule'\n\ntype Registry = {\n onCreateRule: Array<OnCreateRule>,\n onProcessRule: Array<OnProcessRule>,\n onProcessStyle: Array<OnProcessStyle>,\n onProcessSheet: Array<OnProcessSheet>,\n onChangeValue: Array<OnChangeValue>,\n onUpdate: Array<OnUpdate>\n}\n\nexport default class PluginsRegistry {\n plugins: {\n internal: Array<Plugin>,\n external: Array<Plugin>\n } = {\n internal: [],\n external: []\n }\n\n registry: Registry\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n onCreateRule(name: string, decl: JssStyle, options: RuleOptions): Rule | null {\n for (let i = 0; i < this.registry.onCreateRule.length; i++) {\n const rule = this.registry.onCreateRule[i](name, decl, options)\n if (rule) return rule\n }\n\n return null\n }\n\n /**\n * Call `onProcessRule` hooks.\n */\n onProcessRule(rule: Rule): void {\n if (rule.isProcessed) return\n const {sheet} = rule.options\n for (let i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet)\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet)\n\n rule.isProcessed = true\n }\n\n /**\n * Call `onProcessStyle` hooks.\n */\n onProcessStyle(style: JssStyle, rule: Rule, sheet?: StyleSheet): void {\n for (let i = 0; i < this.registry.onProcessStyle.length; i++) {\n // $FlowFixMe[prop-missing]\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet)\n }\n }\n\n /**\n * Call `onProcessSheet` hooks.\n */\n onProcessSheet(sheet: StyleSheet): void {\n for (let i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet)\n }\n }\n\n /**\n * Call `onUpdate` hooks.\n */\n onUpdate(data: Object, rule: Rule, sheet?: StyleSheet, options: UpdateOptions): void {\n for (let i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options)\n }\n }\n\n /**\n * Call `onChangeValue` hooks.\n */\n onChangeValue(value: JssValue, prop: string, rule: StyleRule | BaseStyleRule): JssValue {\n let processedValue = value\n for (let i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule)\n }\n return processedValue\n }\n\n /**\n * Register a plugin.\n */\n use(newPlugin: Plugin, options: {queue: 'internal' | 'external'} = {queue: 'external'}): void {\n const plugins = this.plugins[options.queue]\n\n // Avoids applying same plugin twice, at least based on ref.\n if (plugins.indexOf(newPlugin) !== -1) {\n return\n }\n\n plugins.push(newPlugin)\n\n this.registry = [...this.plugins.external, ...this.plugins.internal].reduce(\n (registry: Registry, plugin: Plugin) => {\n for (const name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name])\n } else {\n warning(false, `[JSS] Unknown hook \"${name}\".`)\n }\n }\n return registry\n },\n {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n }\n )\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","// @flow\nimport type {ToCssOptions} from './types'\nimport type StyleSheet from './StyleSheet'\n\n/**\n * Sheets registry to access them all at one place.\n */\nexport default class SheetsRegistry {\n registry: Array<StyleSheet> = []\n\n /**\n * Current highest index number.\n */\n get index(): number {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index\n }\n\n /**\n * Register a Style Sheet.\n */\n add(sheet: StyleSheet): void {\n const {registry} = this\n const {index} = sheet.options\n\n if (registry.indexOf(sheet) !== -1) return\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet)\n return\n }\n\n // Find a position.\n for (let i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet)\n return\n }\n }\n }\n\n /**\n * Reset the registry.\n */\n reset(): void {\n this.registry = []\n }\n\n /**\n * Remove a Style Sheet.\n */\n remove(sheet: StyleSheet): void {\n const index = this.registry.indexOf(sheet)\n this.registry.splice(index, 1)\n }\n\n /**\n * Convert all attached sheets to a CSS string.\n */\n toString({attached, ...options}: {|attached?: boolean, ...ToCssOptions|} = {}): string {\n let css = ''\n for (let i = 0; i < this.registry.length; i++) {\n const sheet = this.registry[i]\n if (attached != null && sheet.attached !== attached) {\n continue\n }\n if (css) css += '\\n'\n css += sheet.toString(options)\n }\n return css\n }\n}\n","// @flow\nimport SheetsRegistry from './SheetsRegistry'\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\nconst registry: SheetsRegistry = new SheetsRegistry()\nexport default registry\n","/* eslint-disable */\n\n/**\n * Now that `globalThis` is available on most platforms\n * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility)\n * we check for `globalThis` first. `globalThis` is necessary for jss\n * to run in Agoric's secure version of JavaScript (SES). Under SES,\n * `globalThis` exists, but `window`, `self`, and `Function('return\n * this')()` are all undefined for security reasons.\n *\n * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n */\nexport default (typeof globalThis !== 'undefined'\n ? globalThis\n : typeof window !== 'undefined' && window.Math === Math\n ? window\n : typeof self !== 'undefined' && self.Math === Math\n ? self\n : Function('return this')())\n","import globalThis from './globalThis'\n\nconst ns = '2f1acc6c3a606b082e5eef5e54414ffb'\nif (globalThis[ns] == null) globalThis[ns] = 0\n\n// Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\nexport default globalThis[ns]++\n","// @flow\nimport warning from 'tiny-warning'\nimport type {Rule} from '../types'\nimport StyleSheet from '../StyleSheet'\nimport moduleId from './moduleId'\n\nconst maxRules = 1e10\n\nexport type CreateGenerateIdOptions = {|\n minify: boolean\n|}\nexport type GenerateId = (rule: Rule, sheet?: StyleSheet) => string\n\nexport type CreateGenerateId = (options?: CreateGenerateIdOptions) => GenerateId\n\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\nconst createGenerateId: CreateGenerateId = (options = {}) => {\n let ruleCounter = 0\n\n const generateId: GenerateId = (rule, sheet) => {\n ruleCounter += 1\n\n if (ruleCounter > maxRules) {\n warning(false, `[JSS] You might have a memory leak. Rule counter is at ${ruleCounter}.`)\n }\n\n let jssId = ''\n let prefix = ''\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix\n }\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id)\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return `${prefix || 'c'}${moduleId}${jssId}${ruleCounter}`\n }\n\n return `${prefix + rule.key}-${moduleId}${jssId ? `-${jssId}` : ''}-${ruleCounter}`\n }\n\n return generateId\n}\n\nexport default createGenerateId\n","// @flow\nimport warning from 'tiny-warning'\nimport StyleSheet from './StyleSheet'\nimport sheets from './sheets'\nimport toCssValue from './utils/toCssValue'\nimport type {\n CSSStyleRule,\n CSSMediaRule,\n CSSKeyframesRule,\n CSSKeyframeRule,\n HTMLElementWithStyleMap,\n AnyCSSRule,\n Rule,\n RuleList,\n ContainerRule,\n JssValue,\n InsertionPoint\n} from './types'\n\ntype PriorityOptions = {\n index: number,\n insertionPoint?: InsertionPoint\n}\n\n/**\n * Cache the value from the first time a function is called.\n */\nconst memoize = <Value>(fn: () => Value): (() => Value) => {\n let value\n return () => {\n if (!value) value = fn()\n return value\n }\n}\n\ntype GetPropertyValue = (HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule, string) => string\n\n/**\n * Get a style property value.\n */\nconst getPropertyValue: GetPropertyValue = (cssRule, prop) => {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop)\n }\n return cssRule.style.getPropertyValue(prop)\n } catch (err) {\n // IE may throw if property is unknown.\n return ''\n }\n}\n\ntype SetProperty = (\n HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule,\n string,\n JssValue\n) => boolean\n\n/**\n * Set a style property.\n */\nconst setProperty: SetProperty = (cssRule, prop, value) => {\n try {\n let cssValue = ((value: any): string)\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true)\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important')\n return true\n }\n }\n\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue)\n } else {\n cssRule.style.setProperty(prop, cssValue)\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false\n }\n return true\n}\n\ntype RemoveProperty = (HTMLElementWithStyleMap | CSSStyleRule | CSSKeyframeRule, string) => void\n\n/**\n * Remove a style property.\n */\nconst removeProperty: RemoveProperty = (cssRule, prop) => {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop)\n } else {\n cssRule.style.removeProperty(prop)\n }\n } catch (err) {\n warning(\n false,\n `[JSS] DOMException \"${err.message}\" was thrown. Tried to remove property \"${prop}\".`\n )\n }\n}\n\ntype SetSelector = (CSSStyleRule, string) => boolean\n\n/**\n * Set the selector.\n */\nconst setSelector: SetSelector = (cssRule, selectorText) => {\n cssRule.selectorText = selectorText\n\n // Return false if setter was not successful.\n // Currently works in chrome only.\n return cssRule.selectorText === selectorText\n}\n\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\nconst getHead = memoize((): HTMLElement => (document.querySelector('head'): any))\n\n/**\n * Find attached sheet with an index higher than the passed one.\n */\nfunction findHigherSheet(registry: Array<StyleSheet>, options: PriorityOptions): StyleSheet | null {\n for (let i = 0; i < registry.length; i++) {\n const sheet = registry[i]\n if (\n sheet.attached &&\n sheet.options.index > options.index &&\n sheet.options.insertionPoint === options.insertionPoint\n ) {\n return sheet\n }\n }\n return null\n}\n\n/**\n * Find attached sheet with the highest index.\n */\nfunction findHighestSheet(\n registry: Array<StyleSheet>,\n options: PriorityOptions\n): StyleSheet | null {\n for (let i = registry.length - 1; i >= 0; i--) {\n const sheet = registry[i]\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet\n }\n }\n return null\n}\n\n/**\n * Find a comment with \"jss\" inside.\n */\nfunction findCommentNode(text: string): Node | null {\n const head = getHead()\n for (let i = 0; i < head.childNodes.length; i++) {\n const node = head.childNodes[i]\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node\n }\n }\n return null\n}\n\ntype PrevNode = {\n parent: ?Node,\n node: ?Node\n}\n\n/**\n * Find a node before which we can insert the sheet.\n */\nfunction findPrevNode(options: PriorityOptions): PrevNode | false {\n const {registry} = sheets\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n let sheet = findHigherSheet(registry, options)\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n }\n }\n\n // Otherwise insert after the last attached.\n sheet = findHighestSheet(registry, options)\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n }\n }\n }\n\n // Try to find a comment placeholder if registry is empty.\n const {insertionPoint} = options\n if (insertionPoint && typeof insertionPoint === 'string') {\n const comment = findCommentNode(insertionPoint)\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n }\n }\n\n // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n warning(false, `[JSS] Insertion point \"${insertionPoint}\" not found.`)\n }\n\n return false\n}\n\n/**\n * Insert style element into the DOM.\n */\nfunction insertStyle(style: HTMLElement, options: PriorityOptions) {\n const {insertionPoint} = options\n const nextNode = findPrevNode(options)\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node)\n\n return\n }\n\n // Works with iframes and any node types.\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n // https://stackoverflow.com/questions/41328728/force-casting-in-flow\n const insertionPointElement: HTMLElement = (insertionPoint: any)\n const {parentNode} = insertionPointElement\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling)\n else warning(false, '[JSS] Insertion point is not in the DOM.')\n return\n }\n\n getHead().appendChild(style)\n}\n\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\nconst getNonce = memoize(\n (): ?string => {\n const node = document.querySelector('meta[property=\"csp-nonce\"]')\n return node ? node.getAttribute('content') : null\n }\n)\n\nconst insertRule = (\n container: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule,\n rule: string,\n index: number\n): false | any => {\n try {\n if ('insertRule' in container) {\n const c = ((container: any): CSSStyleSheet)\n c.insertRule(rule, index)\n }\n // Keyframes rule.\n else if ('appendRule' in container) {\n const c = ((container: any): CSSKeyframesRule)\n c.appendRule(rule)\n }\n } catch (err) {\n warning(false, `[JSS] ${err.message}`)\n return false\n }\n return container.cssRules[index]\n}\n\nconst getValidRuleInsertionIndex = (\n container: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule,\n index?: number\n): number => {\n const maxIndex = container.cssRules.length\n // In case previous insertion fails, passed index might be wrong\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n return maxIndex\n }\n return index\n}\n\nconst createStyle = (): HTMLElement => {\n const el = document.createElement('style')\n // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n el.textContent = '\\n'\n return el\n}\n\nexport default class DomRenderer {\n getPropertyValue: GetPropertyValue = getPropertyValue\n\n setProperty: SetProperty = setProperty\n\n removeProperty: RemoveProperty = removeProperty\n\n setSelector: SetSelector = setSelector\n\n // HTMLStyleElement needs fixing https://github.com/facebook/flow/issues/2696\n element: any\n\n sheet: StyleSheet | void\n\n hasInsertedRules: boolean = false\n\n // Will be empty if link: true option is not set, because\n // it is only for use together with insertRule API.\n cssRules: AnyCSSRule[] = []\n\n constructor(sheet?: StyleSheet) {\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet)\n\n this.sheet = sheet\n const {media, meta, element} = this.sheet ? this.sheet.options : {}\n this.element = element || createStyle()\n this.element.setAttribute('data-jss', '')\n if (media) this.element.setAttribute('media', media)\n if (meta) this.element.setAttribute('data-meta', meta)\n const nonce = getNonce()\n if (nonce) this.element.setAttribute('nonce', nonce)\n }\n\n /**\n * Insert style element into render tree.\n */\n attach(): void {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return\n\n insertStyle(this.element, this.sheet.options)\n\n // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n const deployed = Boolean(this.sheet && this.sheet.deployed)\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false\n this.deploy()\n }\n }\n\n /**\n * Remove style element from render tree.\n */\n detach(): void {\n if (!this.sheet) return\n const {parentNode} = this.element\n if (parentNode) parentNode.removeChild(this.element)\n // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed.\n // Though IE will keep them and we need a consistent behavior.\n if (this.sheet.options.link) {\n this.cssRules = []\n this.element.textContent = '\\n'\n }\n }\n\n /**\n * Inject CSS string into element.\n */\n deploy(): void {\n const {sheet} = this\n if (!sheet) return\n if (sheet.options.link) {\n this.insertRules(sheet.rules)\n return\n }\n this.element.textContent = `\\n${sheet.toString()}\\n`\n }\n\n /**\n * Insert RuleList into an element.\n */\n\n insertRules(rules: RuleList, nativeParent?: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule) {\n for (let i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent)\n }\n }\n\n /**\n * Insert a rule into element.\n */\n insertRule(\n rule: Rule,\n index?: number,\n nativeParent?: CSSStyleSheet | CSSMediaRule | CSSKeyframesRule = this.element.sheet\n ): false | CSSStyleSheet | AnyCSSRule {\n if (rule.rules) {\n const parent: ContainerRule = (rule: any)\n let latestNativeParent = nativeParent\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n const insertionIndex = getValidRuleInsertionIndex(nativeParent, index)\n // We need to render the container without children first.\n latestNativeParent = insertRule(\n nativeParent,\n parent.toString({children: false}),\n insertionIndex\n )\n if (latestNativeParent === false) {\n return false\n }\n this.refCssRule(rule, insertionIndex, latestNativeParent)\n }\n this.insertRules(parent.rules, latestNativeParent)\n return latestNativeParent\n }\n\n const ruleStr = rule.toString()\n\n if (!ruleStr) return false\n\n const insertionIndex = getValidRuleInsertionIndex(nativeParent, index)\n const nativeRule = insertRule(nativeParent, ruleStr, insertionIndex)\n if (nativeRule === false) {\n return false\n }\n\n this.hasInsertedRules = true\n this.refCssRule(rule, insertionIndex, nativeRule)\n\n return nativeRule\n }\n\n refCssRule(rule: Rule, index: number, cssRule: any) {\n rule.renderable = cssRule\n // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules\n // like rules inside media queries or keyframes\n if (rule.options.parent instanceof StyleSheet) {\n this.cssRules[index] = cssRule\n }\n }\n\n /**\n * Delete a rule.\n */\n deleteRule(cssRule: AnyCSSRule): boolean {\n const {sheet} = this.element\n const index = this.indexOf(cssRule)\n if (index === -1) return false\n sheet.deleteRule(index)\n this.cssRules.splice(index, 1)\n return true\n }\n\n /**\n * Get index of a CSS Rule.\n */\n indexOf(cssRule: AnyCSSRule): number {\n return this.cssRules.indexOf(cssRule)\n }\n\n /**\n * Generate a new CSS rule and replace the existing one.\n *\n * Only used for some old browsers because they can't set a selector.\n */\n replaceRule(cssRule: AnyCSSRule, rule: Rule): false | CSSStyleSheet | AnyCSSRule {\n const index = this.indexOf(cssRule)\n if (index === -1) return false\n this.element.sheet.deleteRule(index)\n this.cssRules.splice(index, 1)\n return this.insertRule(rule, index)\n }\n\n /**\n * Get all rules elements.\n */\n getRules(): CSSRuleList {\n return this.element.sheet.cssRules\n }\n}\n","// @flow\nimport isInBrowser from 'is-in-browser'\nimport StyleSheet from './StyleSheet'\nimport PluginsRegistry from './PluginsRegistry'\nimport sheets from './sheets'\nimport {plugins as internalPlugins} from './plugins/index'\nimport createGenerateIdDefault from './utils/createGenerateId'\nimport createRule from './utils/createRule'\nimport DomRenderer from './DomRenderer'\nimport type {\n Rule,\n RuleFactoryOptions,\n RuleOptions,\n StyleSheetFactoryOptions,\n Plugin,\n JssOptions,\n InternalJssOptions,\n JssStyle\n} from './types'\nimport type {GenerateId} from './utils/createGenerateId'\n\nlet instanceCounter = 0\n\nexport default class Jss {\n id: number = instanceCounter++\n\n version: string | void = process.env.VERSION\n\n plugins: PluginsRegistry = new PluginsRegistry()\n\n options: InternalJssOptions = {\n id: {minify: false},\n createGenerateId: createGenerateIdDefault,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n }\n\n generateId: GenerateId = createGenerateIdDefault({minify: false})\n\n constructor(options?: JssOptions) {\n for (let i = 0; i < internalPlugins.length; i++) {\n this.plugins.use(internalPlugins[i], {queue: 'internal'})\n }\n this.setup(options)\n }\n\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n setup(options?: JssOptions = {}): this {\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId\n }\n\n if (options.id) {\n this.options.id = {\n ...this.options.id,\n ...options.id\n }\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id)\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer\n }\n\n // eslint-disable-next-line prefer-spread\n if (options.plugins) this.use.apply(this, options.plugins)\n\n return this\n }\n\n /**\n * Create a Style Sheet.\n */\n createStyleSheet(styles: Object, options: StyleSheetFactoryOptions = ({}: any)): StyleSheet {\n let {index} = options\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1\n }\n const sheet = new StyleSheet(styles, {\n ...options,\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index\n })\n this.plugins.onProcessSheet(sheet)\n\n return sheet\n }\n\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n removeStyleSheet(sheet: StyleSheet): this {\n sheet.detach()\n sheets.remove(sheet)\n return this\n }\n\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n createRule(name: string, style?: JssStyle = {}, options?: RuleFactoryOptions = {}): Rule | null {\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n // $FlowFixMe[incompatible-call]\n return this.createRule(undefined, name, style)\n }\n\n // $FlowFixMe[incompatible-type]\n const ruleOptions: RuleOptions = {...options, name, jss: this, Renderer: this.options.Renderer}\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId\n if (!ruleOptions.classes) ruleOptions.classes = {}\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {}\n\n const rule = createRule(name, style, ruleOptions)\n\n if (rule) this.plugins.onProcessRule(rule)\n\n return rule\n }\n\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n use(...plugins: Array<Plugin>): this {\n plugins.forEach(plugin => {\n this.plugins.use(plugin)\n })\n\n return this\n }\n}\n","/**\n * Extracts a styles object with only props that contain function values.\n */\nexport default function getDynamicStyles(styles: Object): Object | null {\n let to = null\n\n for (const key in styles) {\n const value = styles[key]\n const type = typeof value\n\n if (type === 'function') {\n if (!to) to = {}\n to[key] = value\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n const extracted = getDynamicStyles(value)\n if (extracted) {\n if (!to) to = {}\n to[key] = extracted\n }\n }\n }\n\n return to\n}\n","// @flow\nimport warn from 'tiny-warning'\nimport type StyleSheet from './StyleSheet'\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n */\nexport default class SheetsManager {\n length: number = 0\n\n sheets: WeakMap<\n Object,\n {\n refs: number,\n sheet: StyleSheet\n }\n > = new WeakMap()\n\n get size(): number {\n return this.length\n }\n\n get(key: Object): ?StyleSheet {\n const entry = this.sheets.get(key)\n return entry && entry.sheet\n }\n\n add(key: Object, sheet: StyleSheet) {\n if (this.sheets.has(key)) return\n\n this.length++\n\n this.sheets.set(key, {\n sheet,\n refs: 0\n })\n }\n\n manage(key: Object): ?StyleSheet {\n const entry = this.sheets.get(key)\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach()\n }\n\n entry.refs++\n\n return entry.sheet\n }\n\n warn(false, \"[JSS] SheetsManager: can't find sheet to manage\")\n\n return undefined\n }\n\n unmanage(key: Object) {\n const entry = this.sheets.get(key)\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--\n\n if (entry.refs === 0) entry.sheet.detach()\n }\n } else {\n warn(false, \"SheetsManager: can't find sheet to unmanage\")\n }\n }\n}\n","// @flow\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\nimport Jss from './Jss'\nimport type StyleSheet from './StyleSheet'\nimport type {\n ConditionalRule,\n KeyframesRule,\n StyleRule,\n ViewportRule,\n SimpleRule,\n FontFaceRule\n} from './plugins'\nimport type {JssOptions} from './types'\n\n/**\n * Export types for better typing inside plugins and integrations.\n */\nexport type {\n StyleSheetFactoryOptions,\n JssValue,\n JssOptions,\n JssStyle,\n Plugin,\n RuleListOptions,\n Rule,\n Renderer,\n RuleOptions,\n UpdateOptions,\n Classes,\n BaseRule,\n ContainerRule\n} from './types'\nexport type {GenerateId, CreateGenerateId, CreateGenerateIdOptions} from './utils/createGenerateId'\n\nexport type {\n Jss,\n StyleSheet,\n ConditionalRule,\n KeyframesRule,\n StyleRule,\n ViewportRule,\n SimpleRule,\n FontFaceRule\n}\n\n/**\n * Export a constant indicating if this browser has CSSTOM support.\n * https://developers.google.com/web/updates/2018/03/cssom\n */\nexport const hasCSSTOMSupport: boolean = typeof CSS === 'object' && CSS != null && 'number' in CSS\n\n/**\n * Extracts a styles object with only rules that contain function values.\n */\nexport {default as getDynamicStyles} from './utils/getDynamicStyles'\n\n/**\n * Converts JSS array value to a CSS string.\n */\nexport {default as toCssValue} from './utils/toCssValue'\n\n/**\n * Create a rule instance.\n */\nexport {default as createRule} from './utils/createRule'\n\n/**\n * SheetsRegistry for SSR.\n */\nexport {default as SheetsRegistry} from './SheetsRegistry'\n\n/**\n * SheetsManager for react-jss and co.\n */\nexport {default as SheetsManager} from './SheetsManager'\n\n/**\n * RuleList for plugins.\n */\nexport {default as RuleList} from './RuleList'\n\n/**\n * Default global SheetsRegistry instance.\n */\nexport {default as sheets} from './sheets'\n\n/**\n * Class name generator creator.\n */\nexport {default as createGenerateId} from './utils/createGenerateId'\n\n/**\n * Creates a new instance of Jss.\n */\nexport const create = (options?: JssOptions): Jss => new Jss(options)\n\n/**\n * A global Jss instance.\n */\nconst jss: Jss = create()\nexport default jss\n"],"names":["plainObjectConstrurctor","constructor","cloneStyle","style","Array","isArray","map","newStyle","name","createRule","decl","options","jss","declCopy","rule","plugins","onCreateRule","warning","join","value","by","result","i","length","toCssValue","ignoreImportant","cssValue","indentStr","str","indent","index","toCss","selector","fallbacks","fallback","prop","allowEmpty","escapeRegex","nativeEscape","CSS","escape","replace","BaseStyleRule","key","type","isProcessed","renderer","renderable","sheet","Renderer","undefined","force","newValue","process","onChangeValue","isEmpty","isDefined","remove","removeProperty","setProperty","attached","StyleRule","selectorText","id","scoped","generateId","applyTo","json","toJSON","toString","link","opts","hasChanged","setSelector","replaceRule","parent","defaultToStringOptions","children","atRegExp","ConditionalRule","styles","at","query","rules","atMatch","match","RuleList","add","getRule","get","indexOf","addRule","onProcessRule","keyRegExp","test","nameRegExp","KeyframesRule","frames","nameMatch","refRegExp","findReferencedKeyframe","val","keyframes","replaceRef","refKeyframe","plugin","onProcessStyle","KeyframeRule","FontFaceRule","ViewportRule","SimpleRule","keysMap","pluginStyleRule","pluginConditionalRule","pluginKeyframesRule","pluginKeyframeRule","pluginFontFaceRule","pluginViewportRule","pluginSimpleRule","defaultUpdateOptions","forceUpdateOptions","raw","counter","classes","ruleOptions","register","splice","unregister","slice","forEach","update","data","updateOne","styleRule","onUpdate","nextValue","prevValue","css","StyleSheet","deployed","queue","attach","deploy","detach","push","insertRule","addRules","added","deleteRule","PluginsRegistry","internal","external","registry","onProcessSheet","processedValue","use","newPlugin","reduce","SheetsRegistry","reset","globalThis","window","Math","self","Function","ns","maxRules","createGenerateId","ruleCounter","jssId","prefix","classNamePrefix","String","minify","moduleId","memoize","fn","getPropertyValue","cssRule","attributeStyleMap","err","set","delete","message","getHead","document","querySelector","findHigherSheet","insertionPoint","findHighestSheet","findCommentNode","text","head","childNodes","node","nodeType","nodeValue","trim","findPrevNode","sheets","element","parentNode","nextSibling","comment","insertStyle","nextNode","insertBefore","insertionPointElement","appendChild","getNonce","getAttribute","container","c","appendRule","cssRules","getValidRuleInsertionIndex","maxIndex","createStyle","el","createElement","textContent","DomRenderer","hasInsertedRules","media","meta","setAttribute","nonce","Boolean","removeChild","insertRules","nativeParent","latestNativeParent","insertionIndex","refCssRule","ruleStr","nativeRule","getRules","instanceCounter","Jss","version","createGenerateIdDefault","isInBrowser","internalPlugins","setup","apply","createStyleSheet","removeStyleSheet","getDynamicStyles","to","extracted","SheetsManager","WeakMap","entry","has","refs","manage","warn","unmanage","hasCSSTOMSupport","create"],"mappings":";;;;;;EAAe,SAAS,QAAQ,GAAG;EACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,UAAU,MAAM,EAAE;EAChD,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;EAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC;EACA,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;EAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;EAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;EACpC,SAAS;EACT,OAAO;EAC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