1 line
107 KiB
Plaintext
1 line
107 KiB
Plaintext
{"version":3,"file":"css-vars-ponyfill.esm.min.js","sources":["../node_modules/get-css-data/dist/get-css-data.esm.js","../node_modules/balanced-match/index.js","../src/parse-css.js","../src/parse-vars.js","../src/stringify-css.js","../src/walk-css.js","../src/transform-css.js","../src/index.js"],"sourcesContent":["/*!\n * get-css-data\n * v2.1.0\n * https://github.com/jhildenbiddle/get-css-data\n * (c) 2018-2022 John Hildenbiddle <http://hildenbiddle.com>\n * MIT license\n */\nfunction getUrls(urls) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var settings = {\n mimeType: options.mimeType || null,\n onBeforeSend: options.onBeforeSend || Function.prototype,\n onSuccess: options.onSuccess || Function.prototype,\n onError: options.onError || Function.prototype,\n onComplete: options.onComplete || Function.prototype\n };\n var urlArray = Array.isArray(urls) ? urls : [ urls ];\n var urlQueue = Array.apply(null, Array(urlArray.length)).map((function(x) {\n return null;\n }));\n function isValidCss(text) {\n var isString = typeof text === \"string\";\n var isHTML = isString && text.trim().charAt(0) === \"<\";\n return isString && !isHTML;\n }\n function onError(xhr, urlIndex) {\n settings.onError(xhr, urlArray[urlIndex], urlIndex);\n }\n function onSuccess(responseText, urlIndex) {\n var returnVal = settings.onSuccess(responseText, urlArray[urlIndex], urlIndex);\n responseText = returnVal === false ? \"\" : returnVal || responseText;\n urlQueue[urlIndex] = responseText;\n if (urlQueue.indexOf(null) === -1) {\n settings.onComplete(urlQueue);\n }\n }\n var parser = document.createElement(\"a\");\n urlArray.forEach((function(url, i) {\n parser.setAttribute(\"href\", url);\n parser.href = String(parser.href);\n var isIElte9 = Boolean(document.all && !window.atob);\n var isIElte9CORS = isIElte9 && parser.host.split(\":\")[0] !== location.host.split(\":\")[0];\n if (isIElte9CORS) {\n var isSameProtocol = parser.protocol === location.protocol;\n if (isSameProtocol) {\n var xdr = new XDomainRequest;\n xdr.open(\"GET\", url);\n xdr.timeout = 0;\n xdr.onprogress = Function.prototype;\n xdr.ontimeout = Function.prototype;\n xdr.onload = function() {\n var text = xdr.responseText;\n if (isValidCss(text)) {\n onSuccess(text, i);\n } else {\n onError(xdr, i);\n }\n };\n xdr.onerror = function(err) {\n onError(xdr, i);\n };\n setTimeout((function() {\n xdr.send();\n }), 0);\n } else {\n console.warn(\"Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (\".concat(url, \")\"));\n onError(null, i);\n }\n } else {\n var xhr = new XMLHttpRequest;\n xhr.open(\"GET\", url);\n if (settings.mimeType && xhr.overrideMimeType) {\n xhr.overrideMimeType(settings.mimeType);\n }\n settings.onBeforeSend(xhr, url, i);\n xhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n var text = xhr.responseText;\n if (xhr.status < 400 && isValidCss(text)) {\n onSuccess(text, i);\n } else if (xhr.status === 0 && isValidCss(text)) {\n onSuccess(text, i);\n } else {\n onError(xhr, i);\n }\n }\n };\n xhr.send();\n }\n }));\n}\n\n/**\n * Gets CSS data from <style> and <link> nodes (including @imports), then\n * returns data in order processed by DOM. Allows specifying nodes to\n * include/exclude and filtering CSS data using RegEx.\n *\n * @preserve\n * @param {object} [options] The options object\n * @param {object} [options.rootElement=document] Root element to traverse for\n * <link> and <style> nodes.\n * @param {string} [options.include] CSS selector matching <link> and <style>\n * nodes to include\n * @param {string} [options.exclude] CSS selector matching <link> and <style>\n * nodes to exclude\n * @param {object} [options.filter] Regular expression used to filter node CSS\n * data. Each block of CSS data is tested against the filter,\n * and only matching data is included.\n * @param {boolean} [options.skipDisabled=true] Determines if disabled\n * stylesheets will be skipped while collecting CSS data.\n * @param {boolean} [options.useCSSOM=false] Determines if CSS data will be\n * collected from a stylesheet's runtime values instead of its\n * text content. This is required to get accurate CSS data\n * when a stylesheet has been modified using the deleteRule()\n * or insertRule() methods because these modifications will\n * not be reflected in the stylesheet's text content.\n * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes\n * 1) the XHR object, 2) source node reference, and 3) the\n * source URL as arguments.\n * @param {function} [options.onSuccess] Callback on each CSS node read. Passes\n * 1) CSS text, 2) source node reference, and 3) the source\n * URL as arguments.\n * @param {function} [options.onError] Callback on each error. Passes 1) the XHR\n * object for inspection, 2) soure node reference, and 3) the\n * source URL that failed (either a <link> href or an @import)\n * as arguments\n * @param {function} [options.onComplete] Callback after all nodes have been\n * processed. Passes 1) concatenated CSS text, 2) an array of\n * CSS text in DOM order, and 3) an array of nodes in DOM\n * order as arguments.\n *\n * @example\n *\n * getCssData({\n * rootElement : document,\n * include : 'style,link[rel=\"stylesheet\"]',\n * exclude : '[href=\"skip.css\"]',\n * filter : /red/,\n * skipDisabled: true,\n * useCSSOM : false,\n * onBeforeSend(xhr, node, url) {\n * // ...\n * }\n * onSuccess(cssText, node, url) {\n * // ...\n * }\n * onError(xhr, node, url) {\n * // ...\n * },\n * onComplete(cssText, cssArray, nodeArray) {\n * // ...\n * }\n * });\n */ function getCssData(options) {\n var regex = {\n cssComments: /\\/\\*[\\s\\S]+?\\*\\//g,\n cssImports: /(?:@import\\s*)(?:url\\(\\s*)?(?:['\"])([^'\"]*)(?:['\"])(?:\\s*\\))?(?:[^;]*;)/g\n };\n var settings = {\n rootElement: options.rootElement || document,\n include: options.include || 'style,link[rel=\"stylesheet\"]',\n exclude: options.exclude || null,\n filter: options.filter || null,\n skipDisabled: options.skipDisabled !== false,\n useCSSOM: options.useCSSOM || false,\n onBeforeSend: options.onBeforeSend || Function.prototype,\n onSuccess: options.onSuccess || Function.prototype,\n onError: options.onError || Function.prototype,\n onComplete: options.onComplete || Function.prototype\n };\n var sourceNodes = Array.apply(null, settings.rootElement.querySelectorAll(settings.include)).filter((function(node) {\n return !matchesSelector(node, settings.exclude);\n }));\n var cssArray = Array.apply(null, Array(sourceNodes.length)).map((function(x) {\n return null;\n }));\n function handleComplete() {\n var isComplete = cssArray.indexOf(null) === -1;\n if (isComplete) {\n cssArray.reduce((function(skipIndices, value, i) {\n if (value === \"\") {\n skipIndices.push(i);\n }\n return skipIndices;\n }), []).reverse().forEach((function(skipIndex) {\n return [ sourceNodes, cssArray ].forEach((function(arr) {\n return arr.splice(skipIndex, 1);\n }));\n }));\n var cssText = cssArray.join(\"\");\n settings.onComplete(cssText, cssArray, sourceNodes);\n }\n }\n function handleSuccess(cssText, cssIndex, node, sourceUrl) {\n var returnVal = settings.onSuccess(cssText, node, sourceUrl);\n cssText = returnVal !== undefined && Boolean(returnVal) === false ? \"\" : returnVal || cssText;\n resolveImports(cssText, node, sourceUrl, (function(resolvedCssText, errorData) {\n if (cssArray[cssIndex] === null) {\n errorData.forEach((function(data) {\n return settings.onError(data.xhr, node, data.url);\n }));\n if (!settings.filter || settings.filter.test(resolvedCssText)) {\n cssArray[cssIndex] = resolvedCssText;\n } else {\n cssArray[cssIndex] = \"\";\n }\n handleComplete();\n }\n }));\n }\n function parseImportData(cssText, baseUrl) {\n var ignoreRules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var importData = {};\n importData.rules = (cssText.replace(regex.cssComments, \"\").match(regex.cssImports) || []).filter((function(rule) {\n return ignoreRules.indexOf(rule) === -1;\n }));\n importData.urls = importData.rules.map((function(rule) {\n return rule.replace(regex.cssImports, \"$1\");\n }));\n importData.absoluteUrls = importData.urls.map((function(url) {\n return getFullUrl(url, baseUrl);\n }));\n importData.absoluteRules = importData.rules.map((function(rule, i) {\n var oldUrl = importData.urls[i];\n var newUrl = getFullUrl(importData.absoluteUrls[i], baseUrl);\n return rule.replace(oldUrl, newUrl);\n }));\n return importData;\n }\n function resolveImports(cssText, node, baseUrl, callbackFn) {\n var __errorData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var __errorRules = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n var importData = parseImportData(cssText, baseUrl, __errorRules);\n if (importData.rules.length) {\n getUrls(importData.absoluteUrls, {\n onBeforeSend: function onBeforeSend(xhr, url, urlIndex) {\n settings.onBeforeSend(xhr, node, url);\n },\n onSuccess: function onSuccess(cssText, url, urlIndex) {\n var returnVal = settings.onSuccess(cssText, node, url);\n cssText = returnVal === false ? \"\" : returnVal || cssText;\n var responseImportData = parseImportData(cssText, url, __errorRules);\n responseImportData.rules.forEach((function(rule, i) {\n cssText = cssText.replace(rule, responseImportData.absoluteRules[i]);\n }));\n return cssText;\n },\n onError: function onError(xhr, url, urlIndex) {\n __errorData.push({\n xhr: xhr,\n url: url\n });\n __errorRules.push(importData.rules[urlIndex]);\n resolveImports(cssText, node, baseUrl, callbackFn, __errorData, __errorRules);\n },\n onComplete: function onComplete(responseArray) {\n responseArray.forEach((function(importText, i) {\n cssText = cssText.replace(importData.rules[i], importText);\n }));\n resolveImports(cssText, node, baseUrl, callbackFn, __errorData, __errorRules);\n }\n });\n } else {\n callbackFn(cssText, __errorData);\n }\n }\n if (sourceNodes.length) {\n sourceNodes.forEach((function(node, i) {\n var linkHref = node.getAttribute(\"href\");\n var linkRel = node.getAttribute(\"rel\");\n var isLink = node.nodeName.toLowerCase() === \"link\" && linkHref && linkRel && linkRel.toLowerCase().indexOf(\"stylesheet\") !== -1;\n var isSkip = settings.skipDisabled === false ? false : node.disabled;\n var isStyle = node.nodeName.toLowerCase() === \"style\";\n if (isLink && !isSkip) {\n var isURIScheme = linkHref.indexOf(\"data:text/css\") !== -1;\n if (isURIScheme) {\n var cssText = decodeURIComponent(linkHref.substring(linkHref.indexOf(\",\") + 1));\n if (settings.useCSSOM) {\n cssText = Array.apply(null, node.sheet.cssRules).map((function(rule) {\n return rule.cssText;\n })).join(\"\");\n }\n handleSuccess(cssText, i, node, location.href);\n } else {\n getUrls(linkHref, {\n mimeType: \"text/css\",\n onBeforeSend: function onBeforeSend(xhr, url, urlIndex) {\n settings.onBeforeSend(xhr, node, url);\n },\n onSuccess: function onSuccess(cssText, url, urlIndex) {\n var sourceUrl = getFullUrl(linkHref);\n handleSuccess(cssText, i, node, sourceUrl);\n },\n onError: function onError(xhr, url, urlIndex) {\n cssArray[i] = \"\";\n settings.onError(xhr, node, url);\n handleComplete();\n }\n });\n }\n } else if (isStyle && !isSkip) {\n var _cssText = node.textContent;\n if (settings.useCSSOM) {\n _cssText = Array.apply(null, node.sheet.cssRules).map((function(rule) {\n return rule.cssText;\n })).join(\"\");\n }\n handleSuccess(_cssText, i, node, location.href);\n } else {\n cssArray[i] = \"\";\n handleComplete();\n }\n }));\n } else {\n settings.onComplete(\"\", []);\n }\n}\n\nfunction getFullUrl(url, base) {\n var d = document.implementation.createHTMLDocument(\"\");\n var b = d.createElement(\"base\");\n var a = d.createElement(\"a\");\n d.head.appendChild(b);\n d.body.appendChild(a);\n b.href = base || document.baseURI || (document.querySelector(\"base\") || {}).href || location.href;\n a.href = url;\n return a.href;\n}\n\nfunction matchesSelector(elm, selector) {\n var matches = elm.matches || elm.matchesSelector || elm.webkitMatchesSelector || elm.mozMatchesSelector || elm.msMatchesSelector || elm.oMatchesSelector;\n return matches.call(elm, selector);\n}\n\nexport { getCssData as default };\n//# sourceMappingURL=get-css-data.esm.js.map\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","/**\n * Based on css parser/compiler by NxChg\n * https://github.com/NxtChg/pieces/tree/master/js/css_parser\n */\n\n\n// Dependencies\n// =============================================================================\nimport balanced from 'balanced-match';\n\n\n// Functions\n// =============================================================================\n/**\n * Parses CSS string and generates AST object\n *\n * @param {string} css The CSS string to be converted to an AST\n * @param {object} [options] Options object\n * @param {boolean} [options.preserveStatic=true] Determines if CSS\n * declarations that do not reference a custom property will\n * be preserved in the transformed CSS\n * @param {boolean} [options.removeComments=false] Remove comments from returned\n * object\n * @returns {object}\n */\nfunction parseCss(css, options = {}) {\n const defaults = {\n preserveStatic: true,\n removeComments: false\n };\n const settings = Object.assign({}, defaults, options);\n const errors = [];\n\n // Errors\n // -------------------------------------------------------------------------\n function error(msg) {\n throw new Error(`CSS parse error: ${msg}`);\n }\n\n // RegEx\n // -------------------------------------------------------------------------\n // Match regexp and return captures\n function match(re) {\n const m = re.exec(css);\n\n if (m) {\n css = css.slice(m[0].length);\n\n return m;\n }\n }\n\n function open() {\n return match(/^{\\s*/);\n }\n\n function close() {\n return match(/^}/);\n }\n\n function whitespace() {\n match(/^\\s*/);\n }\n\n // Comments\n // -------------------------------------------------------------------------\n function comment() {\n whitespace();\n\n if (css[0] !== '/' || css[1] !== '*') {\n return;\n }\n\n let i = 2;\n\n while (css[i] && (css[i] !== '*' || css[i + 1] !== '/')) {\n i++;\n }\n\n if (!css[i]) {\n return error('end of comment is missing');\n }\n\n const str = css.slice(2, i);\n\n css = css.slice(i + 2);\n\n return {\n type : 'comment',\n comment: str\n };\n }\n\n function comments() {\n const cmnts = [];\n let c;\n\n while ((c = comment())) {\n cmnts.push(c);\n }\n\n return settings.removeComments ? [] : cmnts;\n }\n\n // Selector\n // -------------------------------------------------------------------------\n function selector() {\n whitespace();\n\n while (css[0] === '}') {\n error('extra closing bracket');\n }\n\n // Match selector\n const m = match(/^((\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[^{])+)/);\n\n if (m) {\n let selector = m[0].trim();\n let selectorItems;\n\n const hasComment = /\\/\\*/.test(selector);\n\n if (hasComment) {\n // Remove comments\n selector = selector.replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '');\n }\n\n const hasCommaInQuotes = /[\"']\\w*,\\w*[\"']/.test(selector);\n\n if (hasCommaInQuotes) {\n // Replace comma in comma-separated lists with marker\n selector = selector.replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function(m) {\n return m.replace(/,/g, '\\u200C');\n });\n }\n\n const hasMultipleSelectors = /,/.test(selector);\n\n // Create array of selectors\n if (hasMultipleSelectors) {\n // From comma-separated list\n selectorItems = selector.split(/\\s*(?![^(]*\\)),\\s*/);\n }\n else {\n selectorItems = [selector];\n }\n\n if (hasCommaInQuotes) {\n // Restore comma in comma-separated lists\n selectorItems = selectorItems.map(function(s) {\n return s.replace(/\\u200C/g, ',');\n });\n }\n\n return selectorItems;\n }\n }\n\n // Declarations\n // -------------------------------------------------------------------------\n function declaration() {\n // Nested @ rule(s)\n if (css[0] === '@') {\n return at_rule();\n }\n\n match(/^([;\\s]*)+/); // ignore empty declarations + whitespace\n\n const comment_regexp = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n let prop = match(/^(\\*?[-#/*\\\\\\w.]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n\n if (!prop) {\n return;\n }\n\n prop = prop[0].trim();\n\n if (!match(/^:\\s*/)) {\n return error('property missing \\':\\'');\n }\n\n // Quotes regex repeats verbatim inside and outside parentheses\n const val = match(/^((?:\\/\\*.*?\\*\\/|'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\((\\s*'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|[^)]*?)\\s*\\)|[^};])+)/);\n const ret = {\n type : 'declaration',\n property: prop.replace(comment_regexp, ''),\n value : val ? val[0].replace(comment_regexp, '').trim() : ''\n };\n\n match(/^[;\\s]*/);\n\n return ret;\n }\n\n function declarations() {\n if (!open()) {\n return error('missing \\'{\\'');\n }\n\n let d;\n let decls = comments();\n\n while ((d = declaration())) {\n decls.push(d);\n decls = decls.concat(comments());\n }\n\n if (!close()) {\n return error('missing \\'}\\'');\n }\n\n return decls;\n }\n\n // Keyframes\n // -------------------------------------------------------------------------\n function keyframe() {\n whitespace();\n\n const vals = [];\n let m;\n\n while ((m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/))) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n\n if (vals.length) {\n return {\n type : 'keyframe',\n values : vals,\n declarations: declarations()\n };\n }\n }\n\n function at_keyframes() {\n let m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) {\n return;\n }\n\n const vendor = m[1];\n\n m = match(/^([-\\w]+)\\s*/);\n\n if (!m) {\n return error('@keyframes missing name');\n }\n\n const name = m[1];\n\n if (!open()) {\n return error('@keyframes missing \\'{\\'');\n }\n\n let frame;\n let frames = comments();\n\n while ((frame = keyframe())) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) {\n return error('@keyframes missing \\'}\\'');\n }\n\n return {\n type : 'keyframes',\n name : name,\n vendor : vendor,\n keyframes: frames\n };\n }\n\n // @ Rules\n // -------------------------------------------------------------------------\n function at_page() {\n const m = match(/^@page */);\n if (m) {\n const sel = selector() || [];\n return { type: 'page', selectors: sel, declarations: declarations() };\n }\n }\n function at_page_margin_box() {\n const m = match(/@(top|bottom|left|right)-(left|center|right|top|middle|bottom)-?(corner)?\\s*/);\n if (m) {\n const name = `${m[1]}-${m[2]}` + (m[3] ? `-${m[3]}` : '');\n return { type: 'page-margin-box', name, declarations: declarations() };\n }\n }\n function at_fontface() {\n const m = match(/^@font-face\\s*/);\n if (m) { return { type: 'font-face', declarations: declarations() }; }\n }\n function at_supports() {\n const m = match(/^@supports *([^{]+)/);\n if (m) { return { type: 'supports', supports: m[1].trim(), rules: rules() }; }\n }\n function at_host() {\n const m = match(/^@host\\s*/);\n if (m) { return { type: 'host', rules: rules() }; }\n }\n function at_media() {\n const m = match(/^@media([^{]+)*/);\n if (m) { return { type: 'media', media: (m[1] || '').trim(), rules: rules() }; }\n }\n function at_custom_m() {\n const m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (m) { return { type: 'custom-media', name: m[1].trim(), media: m[2].trim() }; }\n }\n function at_document() {\n const m = match(/^@([-\\w]+)?document *([^{]+)/);\n if (m) { return { type: 'document', document: m[2].trim(), vendor: m[1] ? m[1].trim() : null, rules: rules() }; }\n }\n function at_x() {\n const m = match(/^@(import|charset|namespace)\\s*([^;]+);/);\n if (m) { return { type: m[1], name: m[2].trim() }; }\n }\n function at_rule() {\n whitespace();\n\n if (css[0] === '@') {\n const ret =\n at_x() ||\n at_fontface() ||\n at_media() ||\n at_keyframes() ||\n at_supports() ||\n at_document() ||\n at_custom_m() ||\n at_host() ||\n at_page() ||\n at_page_margin_box(); // Must be last\n\n if (ret && !settings.preserveStatic) {\n let hasVarFunc = false;\n\n // @page, @font-face\n if (ret.declarations) {\n hasVarFunc = ret.declarations.some(decl => /var\\(/.test(decl.value));\n }\n // @keyframes, @media, @supports, etc.\n else {\n const arr = ret.keyframes || ret.rules || [];\n\n hasVarFunc = arr.some(obj => (obj.declarations || []).some(decl => /var\\(/.test(decl.value)));\n }\n\n return hasVarFunc ? ret : {};\n }\n\n return ret;\n }\n }\n\n // Rules\n // -------------------------------------------------------------------------\n function rule() {\n if (!settings.preserveStatic) {\n const balancedMatch = balanced('{', '}', css);\n\n // Skip rulset if it does not contain a root/host variable\n // declaration or a variable function value\n if (balancedMatch) {\n const hasVarDecl = /:(?:root|host)(?![.:#(])/.test(balancedMatch.pre) && /--\\S*\\s*:/.test(balancedMatch.body);\n const hasVarFunc = /var\\(/.test(balancedMatch.body);\n\n if (!hasVarDecl && !hasVarFunc) {\n css = css.slice(balancedMatch.end + 1);\n\n return {};\n }\n }\n }\n\n const sel = selector() || [];\n const decls = settings.preserveStatic ? declarations() : declarations().filter(decl => {\n const hasVarDecl = sel.some(s => /:(?:root|host)(?![.:#(])/.test(s)) && /^--\\S/.test(decl.property);\n const hasVarFunc = /var\\(/.test(decl.value);\n\n return hasVarDecl || hasVarFunc;\n });\n\n if (!sel.length) {\n error('selector missing');\n }\n\n return {\n type : 'rule',\n selectors : sel,\n declarations: decls\n };\n }\n\n function rules(core) {\n if (!core && !open()) {\n return error('missing \\'{\\'');\n }\n\n let node;\n let rules = comments();\n\n while (css.length && (core || css[0] !== '}') && (node = at_rule() || rule())) {\n if (node.type) {\n rules.push(node);\n }\n\n rules = rules.concat(comments());\n }\n\n if (!core && !close()) {\n return error('missing \\'}\\'');\n }\n\n return rules;\n }\n\n return {\n type: 'stylesheet',\n stylesheet: {\n rules: rules(true),\n errors: errors\n }\n };\n}\n\n\n// Exports\n// =============================================================================\nexport default parseCss;\n","// Dependencies\n// =============================================================================\nimport parseCss from './parse-css';\n\n\n// Functions\n// =============================================================================\n/**\n * Description\n *\n * @param {object|string} cssData CSS data to parse\n * @param {object} [options] Options object\n * @param {object} [options.store={}] CSS variable definitions to include during\n * transformation. Can be used to add new override exisitng definitions.\n * @param {function} [options.onWarning] Callback on each transformation\n * warning. Passes 1) warningMessage as an argument.\n * @returns {object}\n */\nfunction parseVars(cssData, options = {}) {\n const defaults = {\n parseHost: false,\n store : {},\n onWarning() {}\n };\n const settings = Object.assign({}, defaults, options);\n const reVarDeclSelectors = new RegExp(`:${ settings.parseHost ? 'host' : 'root' }$`);\n\n // Convert CSS string to AST\n if (typeof cssData === 'string') {\n cssData = parseCss(cssData, settings);\n }\n\n // Define variables\n cssData.stylesheet.rules.forEach(function(rule) {\n const varNameIndices = [];\n\n if (rule.type !== 'rule' || !rule.selectors.some(s => reVarDeclSelectors.test(s))) {\n return;\n }\n\n rule.declarations.forEach(function(decl, i) {\n const prop = decl.property;\n const value = decl.value;\n\n if (prop && prop.indexOf('--') === 0) {\n settings.store[prop] = value;\n varNameIndices.push(i);\n }\n });\n });\n\n // Return variable store\n return settings.store;\n}\n\n\n// Exports\n// =============================================================================\nexport default parseVars;\n","/**\n * Based on css parser/compiler by NxChg\n * https://github.com/NxtChg/pieces/tree/master/js/css_parser\n */\n\n\n// Functions\n// =============================================================================\n/**\n * Compiles CSS AST to string\n *\n * @param {object} tree CSS AST object\n * @param {string} [delim=''] CSS rule delimiter\n * @param {function} cb Function to be called before each node is processed\n * @returns {string}\n */\nfunction stringifyCss(tree, delim = '', cb) {\n const renderMethods = {\n charset(node) {\n return '@charset ' + node.name + ';';\n },\n comment(node) {\n // Preserve ponyfill marker comments\n return node.comment.indexOf('__CSSVARSPONYFILL') === 0 ? '/*' + node.comment + '*/' : '';\n },\n 'custom-media'(node) {\n return '@custom-media ' + node.name + ' ' + node.media + ';';\n },\n declaration(node) {\n return node.property + ':' + node.value + ';';\n },\n document(node) {\n return '@' + (node.vendor || '') + 'document ' + node.document + '{' + visit(node.rules) + '}';\n },\n 'font-face'(node) {\n return '@font-face' + '{' + visit(node.declarations) + '}';\n },\n host(node) {\n return '@host' + '{' + visit(node.rules) + '}';\n },\n import(node) {\n // FIXED\n return '@import ' + node.name + ';';\n },\n keyframe(node) {\n return node.values.join(',') + '{' + visit(node.declarations) + '}';\n },\n keyframes(node) {\n return '@' + (node.vendor || '') + 'keyframes ' + node.name + '{' + visit(node.keyframes) + '}';\n },\n media(node) {\n return '@media ' + node.media + '{' + visit(node.rules) + '}';\n },\n namespace(node) {\n return '@namespace ' + node.name + ';';\n },\n page(node) {\n return '@page ' + (node.selectors.length ? node.selectors.join(', ') : '') + '{' + visit(node.declarations) + '}';\n },\n 'page-margin-box'(node) {\n return '@' + node.name + '{' + visit(node.declarations) + '}';\n },\n rule(node) {\n const decls = node.declarations;\n\n if (decls.length) {\n return node.selectors.join(',') + '{' + visit(decls) + '}';\n }\n },\n supports(node) {\n // FIXED\n return '@supports ' + node.supports + '{' + visit(node.rules) + '}';\n }\n };\n\n function visit(nodes) {\n let buf = '';\n\n for (let i = 0; i < nodes.length; i++) {\n const n = nodes[i];\n\n if (cb) {\n cb(n);\n }\n\n const txt = renderMethods[n.type](n);\n\n if (txt) {\n buf += txt;\n\n if (txt.length && n.selectors) {\n buf += delim;\n }\n }\n }\n\n return buf;\n }\n\n return visit(tree.stylesheet.rules);\n}\n\n\n// Exports\n// =============================================================================\nexport default stringifyCss;\n","/**\n * Based on rework-visit by reworkcss\n * https://github.com/reworkcss/rework-visit\n */\n\n\n// Functions\n// =============================================================================\n/**\n * Visit `node` declarations recursively and invoke `fn(declarations, node)`.\n *\n * @param {object} node\n * @param {function} fn\n */\nfunction walkCss(node, fn){\n node.rules.forEach(function(rule){\n // @media etc\n if (rule.rules) {\n walkCss(rule, fn);\n\n return;\n }\n\n // keyframes\n if (rule.keyframes) {\n rule.keyframes.forEach(function(keyframe){\n if (keyframe.type === 'keyframe') {\n fn(keyframe.declarations, rule);\n }\n });\n\n return;\n }\n\n // @charset, @import etc\n if (!rule.declarations) {\n return;\n }\n\n fn(rule.declarations, node);\n });\n}\n\n\n// Exports\n// =============================================================================\nexport default walkCss;\n","/**\n * Based on rework-vars by reworkcss\n * https://github.com/reworkcss/rework-vars\n */\n\n\n// Dependencies\n// =============================================================================\nimport balanced from 'balanced-match';\nimport parseCss from './parse-css';\nimport stringifyCss from './stringify-css';\nimport walkCss from './walk-css';\n\n\n// Constants & Variables\n// =============================================================================\nconst VAR_PROP_IDENTIFIER = '--';\nconst VAR_FUNC_IDENTIFIER = 'var';\n\n\n// Functions\n// =============================================================================\n/**\n * Transforms W3C-style CSS variables to static values and returns an updated\n * CSS string.\n *\n * @param {object} cssData CSS text or AST\n * @param {object} [options] Options object\n * @param {boolean} [options.preserveStatic=true] Determines if CSS\n * declarations that do not reference a custom property will\n * be preserved in the transformed CSS\n * @param {boolean} [options.preserveVars=false] Determines if CSS custom\n * property declarations will be preserved in the transformed\n * CSS\n * @param {object} [options.variables={}] CSS variable definitions to include\n * during transformation. Can be used to add new override\n * exisitng definitions.\n * @param {function} [options.onWarning] Callback on each transformation\n * warning. Passes 1) warningMessage as an argument.\n * @returns {string}\n */\nfunction transformCss(cssData, options = {}) {\n const defaults = {\n preserveStatic: true,\n preserveVars : false,\n variables : {},\n onWarning() {}\n };\n const settings = Object.assign({}, defaults, options);\n\n // Convert CSS string to AST\n if (typeof cssData === 'string') {\n cssData = parseCss(cssData, settings);\n }\n\n // Resolve variables\n walkCss(cssData.stylesheet, function(declarations, node) {\n for (let i = 0; i < declarations.length; i++) {\n const decl = declarations[i];\n const type = decl.type;\n const prop = decl.property;\n const value = decl.value;\n\n // Skip comments\n if (type !== 'declaration') {\n continue;\n }\n\n // Remove custom property declarations\n if (!settings.preserveVars && prop && prop.indexOf(VAR_PROP_IDENTIFIER) === 0) {\n declarations.splice(i, 1);\n i--;\n continue;\n }\n\n // Transform custom property functions\n if (value.indexOf(VAR_FUNC_IDENTIFIER + '(') !== -1) {\n let resolvedValue = resolveValue(value, settings);\n\n if (resolvedValue !== decl.value) {\n // Fix nested calc\n resolvedValue = fixNestedCalc(resolvedValue);\n\n // Overwrite value\n if (!settings.preserveVars) {\n decl.value = resolvedValue;\n }\n // Insert new rule with resolved value\n else {\n declarations.splice(i, 0, {\n type : type,\n property: prop,\n value : resolvedValue\n });\n\n // Skip ahead of preserved declaration\n i++;\n }\n }\n }\n }\n });\n\n // Return CSS string\n return stringifyCss(cssData);\n}\n\n\n// Functions (Private)\n// =============================================================================\n/**\n * Removes nested calc keywords for legacy browser compatibility.\n * Example: calc(1 + calc(2 + calc(3 + 3))) => calc(1 + (2 + (3 + 3)))\n *\n * @param {value} string\n */\nfunction fixNestedCalc(value) {\n const reCalcVal = /calc\\(([^)]+)\\)/g;\n\n (value.match(reCalcVal) || []).forEach(match => {\n const newVal = `calc${match.split('calc').join('')}`;\n value = value.replace(match, newVal);\n });\n\n return value;\n}\n\n/**\n * Resolves CSS var() function(s) with `settings.variables` or fallback\n * value(s). Returns original `value` if unable to resolve.\n *\n * @param {string} value String containing CSS var() functions to resolve\n * @param {object} settings Settings object passed from transformCss()\n * @param {string} [__recursiveFallback] Fallback when unable to resolve CSS\n * var() function to a `settings.variables` or fallback value.\n * Allows restoring original var() function from recursive\n * resolveValue() calls.\n * @return {string} CSS value with var() function(s) resolved to\n * `settings.variables` or fallback value.\n *\n * @example\n *\n * resolveValue('10px var(--x) 30px', {'--x':'20px'}, {...settings});\n * // => '10px 20px 30px'\n *\n * resolveValue('10px', {}, {...settings});\n * // => '10px'\n */\nfunction resolveValue(value, settings = {}, __recursiveFallback) {\n if (value.indexOf('var(') === -1) {\n return value;\n }\n\n const valueData = balanced('(', ')', value);\n\n /**\n * Resolves contents of CSS custom property function\n *\n * @param {string} value String containing contents of CSS var() function\n * @returns {string}\n *\n * @example\n *\n * resolveFunc('--x, var(--y, green)')\n * // => obj['--x'] or obj['--y'] or 'green'\n *\n * resolveFunc('--fail')\n * // => 'var(--fail)' when obj['--fail'] does not exist\n */\n function resolveFunc(value) {\n const name = value.split(',')[0].replace(/[\\s\\n\\t]/g, '');\n const fallback = (value.match(/(?:\\s*,\\s*){1}(.*)?/) || [])[1];\n const match = Object.prototype.hasOwnProperty.call(settings.variables, name) ? String(settings.variables[name]) : undefined;\n const replacement = match || (fallback ? String(fallback) : undefined);\n const unresolvedFallback = __recursiveFallback || value;\n\n if (!match) {\n settings.onWarning(`variable \"${name}\" is undefined`);\n }\n\n if (replacement && replacement !== 'undefined' && replacement.length > 0) {\n return resolveValue(replacement, settings, unresolvedFallback);\n }\n else {\n return `var(${unresolvedFallback})`;\n }\n }\n\n // No balanced brace data\n if (!valueData) {\n if (value.indexOf('var(') !== -1) {\n settings.onWarning(`missing closing \")\" in the value \"${value}\"`);\n }\n\n return value;\n }\n // Balanced brace data is var() function\n else if (valueData.pre.slice(-3) === 'var') {\n const isEmptyVarFunc = valueData.body.trim().length === 0;\n\n if (isEmptyVarFunc) {\n settings.onWarning('var() must contain a non-whitespace string');\n\n return value;\n }\n else {\n return (\n valueData.pre.slice(0,-3)\n + resolveFunc(valueData.body)\n + resolveValue(valueData.post, settings)\n );\n }\n }\n // Balanced brace data is NOT var() function\n else {\n return (\n valueData.pre\n + `(${resolveValue(valueData.body, settings)})`\n + resolveValue(valueData.post, settings)\n );\n }\n}\n\n\n// Exports\n// =============================================================================\nexport default transformCss;\n","// Dependencies\n// =============================================================================\nimport getCssData from 'get-css-data';\nimport parseCss from './parse-css';\nimport parseVars from './parse-vars';\nimport stringifyCss from './stringify-css';\nimport transformCss from './transform-css';\n\n\n// Constants & Variables\n// =============================================================================\nconst isBrowser = typeof window !== 'undefined';\nconst isNativeSupport = isBrowser && window.CSS && window.CSS.supports && window.CSS.supports('(--a: 0)');\n\nconst counters = {\n group: 0,\n job : 0\n};\nconst defaults = {\n // Targets\n rootElement : isBrowser ? document : null,\n shadowDOM : false,\n // Sources\n include : 'style,link[rel=stylesheet]',\n exclude : '',\n variables : {}, // cssVars, transformCss\n // Options\n onlyLegacy : true, // cssVars\n preserveStatic: true, // parseCSS\n preserveVars : false, // transformCss\n silent : false, // cssVars\n updateDOM : true, // cssVars\n updateURLs : true, // cssVars\n watch : null, // cssVars\n // Callbacks\n onBeforeSend() {}, // cssVars\n onError() {}, // cssVars\n onWarning() {}, // transformCss\n onSuccess() {}, // cssVars\n onComplete() {}, // cssVars\n onFinally() {} // cssVars\n};\nconst regex = {\n // CSS comments\n cssComments: /\\/\\*[\\s\\S]+?\\*\\//g,\n // CSS keyframes\n // Ex: @keyframes & @-VENDOR-keyframes\n cssKeyframes: /@(?:-\\w*-)?keyframes/,\n // CSS media queries\n // Ex: @media (min-width: 640px) { ... }\n cssMediaQueries: /@media[^{]+\\{([\\s\\S]+?})\\s*}/g,\n // CSS Urls\n // Ex: url('path/to/file')\n cssUrls: /url\\((?!['\"]?(?:data|http|\\/\\/):)['\"]?([^'\")]*)['\"]?\\)/g,\n // CSS root/host rules\n // Ex: :root { ... } or :host { ... }\n cssVarDeclRules: /(?::(?:root|host)(?![.:#(])[\\s,]*[^{]*{\\s*[^}]*})/g,\n // CSS variable declarations (e.g. --color: red;)\n cssVarDecls: /(?:[\\s;]*)(-{2}\\w[\\w-]*)(?:\\s*:\\s*)([^;]*);/g,\n // CSS variable function (e.g. var(--color))\n cssVarFunc: /var\\(\\s*--[\\w-]/,\n // CSS variable root/host declarations and var() function values\n cssVars: /(?:(?::(?:root|host)(?![.:#(])[\\s,]*[^{]*{\\s*[^;]*;*\\s*)|(?:var\\(\\s*))(--[^:)]+)(?:\\s*[:)])/\n};\nconst variableStore = {\n // Parsed DOM values (from <link> and <style> nodes)\n dom : {},\n // Temporary storage for each job\n job : {},\n // Persisted options.variables values\n user: {}\n};\n\n// Flag used to prevent successive ponyfill calls from stacking\nlet cssVarsIsRunning = false;\n\n// Mutation observer reference created via options.watch\nlet cssVarsObserver = null;\n\n// Count used to detect manual removal of [data-cssvars=\"src\"] nodes\nlet cssVarsSrcNodeCount = 0;\n\n// Debounce timer used with options.watch\nlet debounceTimer = null;\n\n// Flag used to indicate if document-level custom property values have been\n// parsed, stored, and ready for use with options.shadowDOM\nlet isShadowDOMReady = false;\n\n\n// Functions\n// =============================================================================\n/**\n * Fetches, parses, and transforms CSS custom properties from specified\n * <style> and <link> elements into static values, then appends a new <style>\n * element with static values to the DOM to provide CSS custom property\n * compatibility for legacy browsers. Also provides a single interface for\n * live updates of runtime values in both modern and legacy browsers.\n *\n * @preserve\n * @param {object} [options] Options object\n * @param {object} [options.rootElement=document] Root element to traverse for\n * <link> and <style> nodes\n * @param {boolean} [options.shadowDOM=false] Determines if shadow DOM <link>\n * and <style> nodes will be processed.\n * @param {string} [options.include=\"style,link[rel=stylesheet]\"] CSS selector\n * matching <link re=\"stylesheet\"> and <style> nodes to\n * process\n * @param {string} [options.exclude] CSS selector matching <link\n * rel=\"stylehseet\"> and <style> nodes to exclude from those\n * matches by options.include\n * @param {object} [options.variables] A map of custom property name/value\n * pairs. Property names can omit or include the leading\n * double-hyphen (—), and values specified will override\n * previous values\n * @param {boolean} [options.onlyLegacy=true] Determines if the ponyfill will\n * only generate legacy-compatible CSS in browsers that lack\n * native support (i.e., legacy browsers)\n * @param {boolean} [options.preserveStatic=true] Determines if CSS\n * declarations that do not reference a custom property will\n * be preserved in the transformed CSS\n * @param {boolean} [options.preserveVars=false] Determines if CSS custom\n * property declarations will be preserved in the transformed\n * CSS\n * @param {boolean} [options.silent=false] Determines if warning and error\n * messages will be displayed on the console\n * @param {boolean} [options.updateDOM=true] Determines if the ponyfill will\n * update the DOM after processing CSS custom properties\n * @param {boolean} [options.updateURLs=true] Determines if relative url()\n * paths will be converted to absolute urls in external CSS\n * @param {boolean} [options.watch=false] Determines if a MutationObserver will\n * be created that will execute the ponyfill when a <link> or\n * <style> DOM mutation is observed\n * @param {function} [options.onBeforeSend] Callback before XHR is sent. Passes\n * 1) the XHR object, 2) source node reference, and 3) the\n * source URL as arguments\n * @param {function} [options.onError] Callback after a CSS parsing error has\n * occurred or an XHR request has failed. Passes 1) an error\n * message, and 2) source node reference, 3) xhr, and 4 url as\n * arguments.\n * @param {function} [options.onWarning] Callback after each CSS parsing warning\n * has occurred. Passes 1) a warning message as an argument.\n * @param {function} [options.onSuccess] Callback after CSS data has been\n * collected from each node and before CSS custom properties\n * have been transformed. Allows modifying the CSS data before\n * it is transformed by returning any string value (or false\n * to skip). Passes 1) CSS text, 2) source node reference, and\n * 3) the source URL as arguments.\n * @param {function} [options.onComplete] Callback after all CSS has been\n * processed, legacy-compatible CSS has been generated, and\n * (optionally) the DOM has been updated. Passes 1) a CSS\n * string with CSS variable values resolved, 2) an array of\n * output <style> node references that have been appended to\n * the DOM, 3) an object containing all custom properies names\n * and values, and 4) the ponyfill execution time in\n * milliseconds.\n * @param {function} [options.onFinally] Callback in modern and legacy browsers\n * after the ponyfill has finished all tasks. Passes 1) a\n * boolean indicating if the last ponyfill call resulted in a\n * style change, 2) a boolean indicating if the current\n * browser provides native support for CSS custom properties,\n * and 3) the ponyfill execution time in milliseconds.\n * @example\n *\n * cssVars({\n * rootElement : document,\n * shadowDOM : false,\n * include : 'style,link[rel=\"stylesheet\"]',\n * exclude : '',\n * variables : {},\n * onlyLegacy : true,\n * preserveStatic: true,\n * preserveVars : false,\n * silent : false,\n * updateDOM : true,\n * updateURLs : true,\n * watch : false,\n * onBeforeSend(xhr, node, url) {},\n * onError(message, node, xhr, url) {},\n * onWarning(message) {},\n * onSuccess(cssText, node, url) {},\n * onComplete(cssText, styleNode, cssVariables, benchmark) {},\n * onFinally(hasChanged, hasNativeSupport, benchmark)\n * });\n */\nfunction cssVars(options = {}) {\n const msgPrefix = 'cssVars(): ';\n const settings = Object.assign({}, defaults, options);\n\n function handleError(message, sourceNode, xhr, url) {\n /* istanbul ignore next */\n if (!settings.silent && window.console) {\n // eslint-disable-next-line\n console.error(`${msgPrefix}${message}\\n`, sourceNode);\n }\n\n settings.onError(message, sourceNode, xhr, url);\n }\n\n function handleWarning(message) {\n /* istanbul ignore next */\n if (!settings.silent && window.console) {\n // eslint-disable-next-line\n console.warn(`${msgPrefix}${message}`);\n }\n\n settings.onWarning(message);\n }\n\n function handleFinally(hasChanged) {\n settings.onFinally(\n Boolean(hasChanged),\n isNativeSupport,\n getTimeStamp() - settings.__benchmark\n );\n }\n\n // Exit if non-browser environment (e.g. Node)\n if (!isBrowser) {\n return;\n }\n\n // Add / recreate MutationObserver\n if (settings.watch) {\n settings.watch = defaults.watch;\n addMutationObserver(settings);\n cssVars(settings);\n return;\n }\n // Disconnect existing MutationObserver\n else if (settings.watch === false && cssVarsObserver) {\n cssVarsObserver.disconnect();\n cssVarsObserver = null;\n }\n\n // If benchmark key is not availalbe, this is a non-recursive call\n if (!settings.__benchmark) {\n // Check flag and debounce to prevent successive call from stacking\n if (cssVarsIsRunning === settings.rootElement) {\n cssVarsDebounced(options);\n return;\n }\n\n const srcNodes = [].slice.call(settings.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars=\"out\"])'));\n\n // Store benchmark start time\n settings.__benchmark = getTimeStamp();\n\n // Exclude previously processed elements\n settings.exclude = [\n // 1. When the ponyfill is called by the MutationObserver, all\n // previously processed nodes are exluded except those that have\n // had their out/skip/src values cleared by the MutationObserver.\n // 2. When the ponyfill is called directly, only output nodes are\n // excluded. This allows the ponyfill to update skip/src nodes\n // after a previously processed link/style node has been removed.\n cssVarsObserver ? '[data-cssvars]:not([data-cssvars=\"\"])' : '[data-cssvars=\"out\"]',\n 'link[disabled]:not([data-cssvars])',\n settings.exclude\n ].filter(selector => selector).join(',');\n\n // Fix malformed custom property names (e.g. \"color\" or \"-color\")\n settings.variables = fixVarNames(settings.variables);\n\n // Reset previously processed <style> nodes if textContent has changed\n srcNodes.forEach(srcNode => {\n const hasStyleCache = srcNode.nodeName.toLowerCase() === 'style' && srcNode.__cssVars.text;\n const hasStyleChanged = hasStyleCache && srcNode.textContent !== srcNode.__cssVars.text;\n\n if (hasStyleCache && hasStyleChanged) {\n srcNode.sheet && (srcNode.sheet.disabled = false);\n srcNode.setAttribute('data-cssvars', '');\n }\n });\n\n // Direct call preparation (i.e. non-MutationObserver call)\n if (!cssVarsObserver) {\n const outNodes = [].slice.call(settings.rootElement.querySelectorAll('[data-cssvars=\"out\"]'));\n\n // Remove orphaned output nodes\n outNodes.forEach(outNode => {\n const dataGroup = outNode.getAttribute('data-cssvars-group');\n const srcNode = dataGroup ? settings.rootElement.querySelector(`[data-cssvars=\"src\"][data-cssvars-group=\"${dataGroup}\"]`) : null;\n\n if (!srcNode) {\n outNode.parentNode.removeChild(outNode);\n }\n });\n\n // Handle removed source nodes\n if (cssVarsSrcNodeCount && (srcNodes.length < cssVarsSrcNodeCount)) {\n // Update source node count\n cssVarsSrcNodeCount = srcNodes.length;\n\n // Reset variableStore\n variableStore.dom = {};\n }\n }\n }\n\n // Verify readyState to ensure all <link> and <style> nodes are available\n if (document.readyState !== 'loading') {\n // Native support\n if (isNativeSupport && settings.onlyLegacy) {\n let hasVarChange = false;\n\n // Apply settings.variables\n if (settings.updateDOM) {\n const targetElm = settings.rootElement.host || (settings.rootElement === document ? document.documentElement : settings.rootElement);\n\n // Set variables using native methods\n Object.keys(settings.variables).forEach(key => {\n const varValue = settings.variables[key];\n\n hasVarChange = hasVarChange || varValue !== getComputedStyle(targetElm).getPropertyValue(key);\n targetElm.style.setProperty(key, varValue);\n });\n }\n\n handleFinally(hasVarChange);\n }\n // Ponyfill: Handle rootElement set to a shadow host or root\n else if (!isShadowDOMReady && (settings.shadowDOM || settings.rootElement.shadowRoot || settings.rootElement.host)) {\n // Get all document-level CSS\n getCssData({\n rootElement : defaults.rootElement,\n include : defaults.include,\n exclude : settings.exclude,\n skipDisabled: false,\n onSuccess(cssText, node, url) {\n const isUserDisabled = (node.sheet || {}).disabled && !node.__cssVars;\n\n if (isUserDisabled) {\n return false;\n }\n\n cssText = cssText\n .replace(regex.cssComments, '')\n .replace(regex.cssMediaQueries, '');\n\n cssText = (cssText.match(regex.cssVarDeclRules) || []).join('');\n\n // Return only matching :root {...} blocks\n return cssText || false;\n },\n onComplete(cssText, cssArray, nodeArray) {\n // Parse variables and store in variableStore. This step\n // ensures that variableStore contains all document-level\n // custom property values for subsequent ponyfill calls.\n parseVars(cssText, {\n store : variableStore.dom,\n onWarning: handleWarning\n });\n\n isShadowDOMReady = true;\n\n // Call the ponyfill again to process the rootElement\n // initially specified. Values stored in variableStore will\n // be used to transform values in shadow host/root elements.\n cssVars(settings);\n }\n });\n }\n // Ponyfill: Process CSS\n else {\n // Set flag to prevent successive call from stacking. Using the\n // rootElement insead of `true` allows simultaneous ponyfill calls\n // using different rootElement values (e.g. document and one-or-more\n // shadowDOM nodes).\n cssVarsIsRunning = settings.rootElement;\n\n getCssData({\n rootElement : settings.rootElement,\n include : settings.include,\n exclude : settings.exclude,\n skipDisabled: false,\n onBeforeSend: settings.onBeforeSend,\n onError(xhr, node, url) {\n const responseUrl = xhr.responseURL || getFullUrl(url, location.href);\n const statusText = xhr.statusText ? `(${xhr.statusText})` : 'Unspecified Error' + (xhr.status === 0 ? ' (possibly CORS related)' : '');\n const errorMsg = `CSS XHR Error: ${responseUrl} ${xhr.status} ${statusText}`;\n\n handleError(errorMsg, node, xhr, responseUrl);\n },\n onSuccess(cssText, node, url) {\n const isUserDisabled = (node.sheet || {}).disabled && !node.__cssVars;\n\n if (isUserDisabled) {\n return false;\n }\n\n const isLink = node.nodeName.toLowerCase() === 'link';\n const isStyleImport = node.nodeName.toLowerCase() === 'style' && cssText !== node.textContent;\n const returnVal = settings.onSuccess(cssText, node, url);\n\n // Use callback return value if provided (skip CSS if false)\n cssText = returnVal !== undefined && Boolean(returnVal) === false ? '' : returnVal || cssText;\n\n // Convert relative url(...) values to absolute\n if (settings.updateURLs && (isLink || isStyleImport)) {\n cssText = fixRelativeCssUrls(cssText, url);\n }\n\n return cssText;\n },\n onComplete(cssText, cssArray, nodeArray = []) {\n const currentVars = Object.assign({}, variableStore.dom, variableStore.user);\n\n let hasVarChange = false;\n\n // Reset temporary variable store\n variableStore.job = {};\n\n // Parse CSS and variables\n nodeArray.forEach((node, i) => {\n const nodeCSS = cssArray[i];\n\n // Node data cache\n node.__cssVars = node.__cssVars || {};\n node.__cssVars.text = nodeCSS;\n\n // Only process CSS contains a custom property\n // declarations or function\n if (regex.cssVars.test(nodeCSS)) {\n try {\n const cssTree = parseCss(nodeCSS, {\n preserveStatic: settings.preserveStatic,\n removeComments: true\n });\n\n // Parse variables\n parseVars(cssTree, {\n parseHost: Boolean(settings.rootElement.host),\n store : variableStore.dom,\n onWarning: handleWarning\n });\n\n // Cache data\n node.__cssVars.tree = cssTree;\n }\n catch(err) {\n handleError(err.message, node);\n }\n }\n });\n\n // Merge DOM values with job values\n Object.assign(variableStore.job, variableStore.dom);\n\n if (settings.updateDOM) {\n // Persist user values\n Object.assign(variableStore.user, settings.variables);\n\n // Merge persisted user values with job values\n Object.assign(variableStore.job, variableStore.user);\n }\n else {\n // Merge persisted and non-persisted user values with job values\n Object.assign(variableStore.job, variableStore.user, settings.variables);\n\n // Update currentVars with non-persisted user values\n Object.assign(currentVars, settings.variables);\n }\n\n // Detect new variable declaration or changed value\n hasVarChange =\n // Ponyfill has been called before with updateDOM\n counters.job > 0 &&\n // New/Change\n Boolean(\n // New declaration\n (Object.keys(variableStore.job).length > Object.keys(currentVars).length) ||\n // Changed declaration value\n Boolean(\n // Previous declarations exist\n Object.keys(currentVars).length &&\n // At least one job value does has changed\n Object.keys(variableStore.job).some(key => variableStore.job[key] !== currentVars[key])\n )\n );\n\n // New variable declaration or modified value detected\n if (hasVarChange) {\n resetCssNodes(settings.rootElement);\n cssVars(settings);\n }\n // No variable changes detected\n else {\n const outCssArray = [];\n const outNodeArray = [];\n\n let hasKeyframesWithVars = false;\n\n // Increment job\n if (settings.updateDOM) {\n counters.job++;\n }\n\n nodeArray.forEach((node, i) => {\n let isSkip = !node.__cssVars.tree;\n\n if (node.__cssVars.tree) {\n try {\n transformCss(node.__cssVars.tree, Object.assign({}, settings, {\n variables: variableStore.job,\n onWarning: handleWarning\n }));\n\n const outCss = stringifyCss(node.__cssVars.tree);\n\n if (settings.updateDOM) {\n const nodeCSS = cssArray[i];\n const hasCSSVarFunc = regex.cssVarFunc.test(nodeCSS);\n\n if (!node.getAttribute('data-cssvars')) {\n node.setAttribute('data-cssvars', 'src');\n }\n\n if (outCss.length && hasCSSVarFunc) {\n const dataGroup = node.getAttribute('data-cssvars-group') || ++counters.group;\n const outCssNoSpaces = outCss.replace(/\\s/g,'');\n const outNode = settings.rootElement.querySelector(`[data-cssvars=\"out\"][data-cssvars-group=\"${dataGroup}\"]`) || document.createElement('style');\n\n hasKeyframesWithVars = hasKeyframesWithVars || regex.cssKeyframes.test(outCss);\n\n // Disable source stylesheet\n if (settings.preserveStatic) {\n node.sheet && (node.sheet.disabled = true);\n }\n\n if (!outNode.hasAttribute('data-cssvars')) {\n outNode.setAttribute('data-cssvars', 'out');\n }\n\n // Non-transformed CSS\n if (outCssNoSpaces === node.textContent.replace(/\\s/g,'')) {\n isSkip = true;\n\n if (outNode && outNode.parentNode) {\n node.removeAttribute('data-cssvars-group');\n outNode.parentNode.removeChild(outNode);\n }\n }\n // Transformed CSS\n else if (outCssNoSpaces !== outNode.textContent.replace(/\\s/g,'')) {\n [node, outNode].forEach(n => {\n n.setAttribute('data-cssvars-job', counters.job);\n n.setAttribute('data-cssvars-group', dataGroup);\n });\n outNode.textContent = outCss;\n outCssArray.push(outCss);\n outNodeArray.push(outNode);\n\n if (!outNode.parentNode) {\n node.parentNode.insertBefore(outNode, node.nextSibling);\n }\n }\n }\n }\n else {\n if (node.textContent.replace(/\\s/g,'') !== outCss) {\n outCssArray.push(outCss);\n }\n }\n }\n catch(err) {\n handleError(err.message, node);\n }\n }\n\n if (isSkip) {\n node.setAttribute('data-cssvars', 'skip');\n }\n\n if (!node.hasAttribute('data-cssvars-job')) {\n node.setAttribute('data-cssvars-job', counters.job);\n }\n });\n\n // Update source node count\n cssVarsSrcNodeCount = settings.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars=\"out\"])').length;\n\n // Process shadow DOM\n if (settings.shadowDOM) {\n const elms = []\n .concat(settings.rootElement)\n .concat([].slice.call(settings.rootElement.querySelectorAll('*')));\n\n // Iterates over all elements in rootElement and calls\n // cssVars on each shadowRoot, passing document-level\n // custom properties as options.variables.\n for (let i = 0, elm; (elm = elms[i]); ++i) {\n if (elm.shadowRoot && elm.shadowRoot.querySelector('style')) {\n const shadowSettings = Object.assign({}, settings, {\n rootElement: elm.shadowRoot\n });\n\n cssVars(shadowSettings);\n }\n }\n }\n\n // Fix keyframes\n if (settings.updateDOM && hasKeyframesWithVars) {\n fixKeyframes(settings.rootElement);\n }\n\n // Reset running flag. Must be done before onComplete\n // callback to avoid a callback error preventing the\n // flag from being reset after the callback.\n cssVarsIsRunning = false;\n\n // Callbacks\n settings.onComplete(\n outCssArray.join(''),\n outNodeArray,\n JSON.parse(JSON.stringify(variableStore.job)),\n getTimeStamp() - settings.__benchmark\n );\n\n handleFinally(outNodeArray.length);\n }\n }\n });\n }\n }\n // Delay function until DOMContentLoaded event is fired\n /* istanbul ignore next */\n else {\n document.addEventListener('DOMContentLoaded', function init(evt) {\n cssVars(options);\n\n document.removeEventListener('DOMContentLoaded', init);\n });\n }\n}\n\n// Ponyfill reset\ncssVars.reset = function() {\n // Reset counters\n counters.job = 0;\n counters.group = 0;\n\n // Reset running flag\n cssVarsIsRunning = false;\n\n // Disconnect MutationObserver\n if (cssVarsObserver) {\n cssVarsObserver.disconnect();\n cssVarsObserver = null;\n }\n\n // Reset source node count\n cssVarsSrcNodeCount = 0;\n\n // Reset debounce timer\n debounceTimer = null;\n\n // Reset shadowDOM ready flag\n isShadowDOMReady = false;\n\n // Reset variable storage\n for (const prop in variableStore) {\n variableStore[prop] = {};\n }\n};\n\n\n// Functions (Private)\n// =============================================================================\n/**\n * Creates mutation observer that executes the ponyfill when a <link> or <style>\n * DOM mutation is observed.\n *\n * @param {object} settings\n */\nfunction addMutationObserver(settings) {\n function isDisabled(node) {\n const isDisabledAttr = isLink(node) && node.hasAttribute('disabled');\n const isDisabledSheet = (node.sheet || {}).disabled;\n\n return isDisabledAttr || isDisabledSheet;\n }\n function isLink(node) {\n const isStylesheet = node.nodeName.toLowerCase() === 'link' && (node.getAttribute('rel') || '').indexOf('stylesheet') !== -1;\n\n return isStylesheet;\n }\n function isStyle(node) {\n return node.nodeName.toLowerCase() === 'style';\n }\n function isValidAttributeMutation(mutation) {\n let isValid = false;\n\n if (mutation.type === 'attributes' && isLink(mutation.target) && !isDisabled(mutation.target)) {\n const isEnabledMutation = mutation.attributeName === 'disabled';\n const isHrefMutation = mutation.attributeName === 'href';\n const isSkipNode = mutation.target.getAttribute('data-cssvars') === 'skip';\n const isSrcNode = mutation.target.getAttribute('data-cssvars') === 'src';\n\n // Enabled\n if (isEnabledMutation) {\n isValid = !isSkipNode && !isSrcNode;\n }\n // Href\n else if (isHrefMutation) {\n if (isSkipNode) {\n mutation.target.setAttribute('data-cssvars', '');\n }\n else if (isSrcNode) {\n resetCssNodes(settings.rootElement, true);\n }\n\n isValid = true;\n }\n }\n\n return isValid;\n }\n function isValidStyleTextMutation(mutation) {\n let isValid = false;\n\n if (mutation.type === 'childList') {\n const isStyleElm = isStyle(mutation.target);\n const isOutNode = mutation.target.getAttribute('data-cssvars') === 'out';\n\n isValid = isStyleElm && !isOutNode;\n }\n\n return isValid;\n }\n function isValidAddMutation(mutation) {\n let isValid = false;\n\n if (mutation.type === 'childList') {\n isValid = [].slice.call(mutation.addedNodes).some(node => {\n const isElm = node.nodeType === 1;\n const hasAttr = isElm && node.hasAttribute('data-cssvars');\n const isStyleWithVars = isStyle(node) && regex.cssVars.test(node.textContent);\n const isValid = !hasAttr && (isLink(node) || isStyleWithVars);\n\n return isValid && !isDisabled(node);\n });\n }\n\n return isValid;\n }\n function isValidRemoveMutation(mutation) {\n let isValid = false;\n\n if (mutation.type === 'childList') {\n isValid = [].slice.call(mutation.removedNodes).some(node => {\n const isElm = node.nodeType === 1;\n const isOutNode = isElm && node.getAttribute('data-cssvars') === 'out';\n const isSrcNode = isElm && node.getAttribute('data-cssvars') === 'src';\n const isValid = isSrcNode;\n\n if (isSrcNode || isOutNode) {\n const dataGroup = node.getAttribute('data-cssvars-group');\n const orphanNode = settings.rootElement.querySelector(`[data-cssvars-group=\"${dataGroup}\"]`);\n\n if (isSrcNode) {\n resetCssNodes(settings.rootElement, true);\n }\n\n if (orphanNode) {\n orphanNode.parentNode.removeChild(orphanNode);\n }\n }\n\n return isValid;\n });\n }\n\n return isValid;\n }\n\n if (!window.MutationObserver) {\n return;\n }\n\n if (cssVarsObserver) {\n cssVarsObserver.disconnect();\n cssVarsObserver = null;\n }\n\n cssVarsObserver = new MutationObserver(function(mutations) {\n const hasValidMutation = mutations.some((mutation) => {\n return (\n isValidAttributeMutation(mutation) ||\n isValidStyleTextMutation(mutation) ||\n isValidAddMutation(mutation) ||\n isValidRemoveMutation(mutation)\n );\n });\n\n if (hasValidMutation) {\n cssVars(settings);\n }\n });\n\n cssVarsObserver.observe(document.documentElement, {\n attributes : true,\n attributeFilter: ['disabled', 'href'],\n childList : true,\n subtree : true\n });\n}\n\n/**\n * Debounces cssVars() calls\n *\n * @param {object} settings\n */\nfunction cssVarsDebounced(settings, delay = 100) {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(function() {\n settings.__benchmark = null;\n cssVars(settings);\n }, delay);\n}\n\n/**\n * Fixes issue with keyframe properties set using CSS custom property not being\n * applied properly in some legacy (IE) and modern (Safari) browsers.\n *\n * @param {object} rootElement\n */\nfunction fixKeyframes(rootElement) {\n const animationNameProp = [\n 'animation-name',\n '-moz-animation-name',\n '-webkit-animation-name'\n ].filter(prop => getComputedStyle(document.body)[prop])[0];\n\n if (animationNameProp) {\n const allNodes = [].slice.call(rootElement.querySelectorAll('*'));\n const keyframeNodes = [];\n const nameMarker = '__CSSVARSPONYFILL-KEYFRAMES__';\n\n // Modify animation name\n for (let i = 0, len = allNodes.length; i < len; i++) {\n const node = allNodes[i];\n const animationName = getComputedStyle(node)[animationNameProp];\n\n if (animationName !== 'none') {\n node.style[animationNameProp] += nameMarker;\n keyframeNodes.push(node);\n }\n }\n\n // Force reflow\n void document.body.offsetHeight;\n\n // Restore animation name\n for (let i = 0, len = keyframeNodes.length; i < len; i++) {\n const nodeStyle = keyframeNodes[i].style;\n\n nodeStyle[animationNameProp] = nodeStyle[animationNameProp].replace(nameMarker, '');\n }\n }\n}\n\n/**\n * Convert relative CSS url(...) values to absolute based on baseUrl\n *\n * @param {string} cssText\n * @param {string} baseUrl\n * @returns {string}\n */\nfunction fixRelativeCssUrls(cssText, baseUrl) {\n const cssUrls = cssText\n // Remove comments\n .replace(regex.cssComments, '')\n // Match url(...) values\n .match(regex.cssUrls) || [];\n\n cssUrls.forEach(cssUrl => {\n const oldUrl = cssUrl.replace(regex.cssUrls, '$1');\n const newUrl = getFullUrl(oldUrl, baseUrl);\n\n cssText = cssText.replace(cssUrl, cssUrl.replace(oldUrl, newUrl));\n });\n\n return cssText;\n}\n\n/**\n * Converts all object property names to leading '--' style\n *\n * @param {object} varObj Object containing CSS custom property name:value pairs\n * @returns {object}\n */\nfunction fixVarNames(varObj = {}) {\n const reLeadingHyphens = /^-{2}/;\n\n return Object.keys(varObj).reduce((obj, value) => {\n const key = reLeadingHyphens.test(value) ? value : `--${value.replace(/^-+/, '')}`;\n\n obj[key] = varObj[value];\n\n return obj;\n }, {});\n}\n\n/**\n * Returns fully qualified URL from relative URL and (optional) base URL\n *\n * @param {string} url\n * @param {string} [base=location.href]\n * @returns {string}\n */\nfunction getFullUrl(url, base = location.href) {\n const d = document.implementation.createHTMLDocument('');\n const b = d.createElement('base');\n const a = d.createElement('a');\n\n d.head.appendChild(b);\n d.body.appendChild(a);\n b.href = base;\n a.href = url;\n\n return a.href;\n}\n\n/**\n * Returns a time stamp in milliseconds\n *\n * @returns {number}\n */\nfunction getTimeStamp() {\n return isBrowser && (window.performance || {}).now ? window.performance.now() : new Date().getTime();\n}\n\nfunction resetCssNodes(rootElement, resetDOMVariableStore = false) {\n const resetNodes = [].slice.call(rootElement.querySelectorAll('[data-cssvars=\"skip\"],[data-cssvars=\"src\"]'));\n\n resetNodes.forEach(node => node.setAttribute('data-cssvars', ''));\n\n if (resetDOMVariableStore) {\n variableStore.dom = {};\n }\n}\n\n\n// Export\n// =============================================================================\nexport default cssVars;\n"],"names":["getUrls","urls","options","settings","mimeType","onBeforeSend","Function","prototype","onSuccess","onError","onComplete","urlArray","Array","isArray","urlQueue","apply","length","map","x","isValidCss","text","isString","isHTML","trim","charAt","xhr","urlIndex","responseText","returnVal","indexOf","parser","document","createElement","forEach","url","i","setAttribute","href","String","Boolean","all","window","atob","host","split","location","protocol","xdr","XDomainRequest","open","timeout","onprogress","ontimeout","onload","onerror","err","setTimeout","send","console","warn","XMLHttpRequest","overrideMimeType","onreadystatechange","readyState","status","balancedMatch","balanced","a","b","str","RegExp","maybeMatch","r","range","start","end","pre","slice","body","post","reg","m","match","begs","beg","left","right","result","ai","bi","push","pop","parseCss","css","defaults","preserveStatic","removeComments","_extends","errors","error","msg","Error","re","exec","close","whitespace","comment","type","comments","c","cmnts","selector","selectorItems","test","replace","hasCommaInQuotes","s","declaration","at_rule","comment_regexp","prop","val","ret","property","value","declarations","d","decls","concat","keyframe","vals","values","at_keyframes","vendor","frame","name","frames","keyframes","at_page","selectors","at_page_margin_box","at_fontface","at_supports","supports","rules","at_host","at_media","media","at_custom_m","at_document","at_x","hasVarFunc","some","decl","obj","rule","hasVarDecl","sel","filter","core","node","stylesheet","parseVars","cssData","parseHost","store","onWarning","reVarDeclSelectors","stringifyCss","tree","delim","cb","arguments","undefined","renderMethods","charset","visit","import","join","namespace","page","nodes","buf","n","txt","walkCss","fn","transformCss","preserveVars","variables","VAR_FUNC_IDENTIFIER","resolvedValue","resolveValue","fixNestedCalc","splice","newVal","__recursiveFallback","valueData","resolveFunc","fallback","Object","hasOwnProperty","call","replacement","unresolvedFallback","isEmptyVarFunc","isBrowser","isNativeSupport","CSS","counters","group","job","rootElement","shadowDOM","include","exclude","onlyLegacy","silent","updateDOM","updateURLs","watch","onFinally","regex","cssComments","cssKeyframes","cssMediaQueries","cssUrls","cssVarDeclRules","cssVarDecls","cssVarFunc","cssVars","variableStore","dom","user","cssVarsIsRunning","cssVarsObserver","cssVarsSrcNodeCount","debounceTimer","isShadowDOMReady","msgPrefix","handleError","message","sourceNode","handleWarning","handleFinally","hasChanged","getTimeStamp","__benchmark","addMutationObserver","disconnect","cssVarsDebounced","srcNodes","querySelectorAll","fixVarNames","srcNode","hasStyleCache","nodeName","toLowerCase","__cssVars","hasStyleChanged","textContent","sheet","disabled","outNodes","outNode","dataGroup","getAttribute","querySelector","parentNode","removeChild","hasVarChange","targetElm","documentElement","keys","key","varValue","getComputedStyle","getPropertyValue","style","setProperty","shadowRoot","getCssData","skipDisabled","cssText","cssArray","nodeArray","responseUrl","responseURL","getFullUrl","statusText","isLink","isStyleImport","fixRelativeCssUrls","currentVars","nodeCSS","cssTree","resetCssNodes","outCssArray","outNodeArray","hasKeyframesWithVars","isSkip","outCss","hasCSSVarFunc","outCssNoSpaces","hasAttribute","removeAttribute","insertBefore","nextSibling","elm","elms","shadowSettings","fixKeyframes","JSON","parse","stringify","addEventListener","init","evt","removeEventListener","isDisabled","isDisabledAttr","isDisabledSheet","isStyle","MutationObserver","mutations","mutation","isValid","target","isEnabledMutation","attributeName","isHrefMutation","isSkipNode","isSrcNode","isValidAttributeMutation","isStyleElm","isOutNode","isValidStyleTextMutation","addedNodes","hasAttr","nodeType","isStyleWithVars","isValidAddMutation","removedNodes","isElm","orphanNode","isValidRemoveMutation","observe","attributes","attributeFilter","childList","subtree","delay","clearTimeout","animationNameProp","allNodes","keyframeNodes","nameMarker","len","offsetHeight","nodeStyle","baseUrl","cssUrl","oldUrl","newUrl","varObj","reLeadingHyphens","reduce","base","implementation","createHTMLDocument","head","appendChild","performance","now","Date","getTime","resetDOMVariableStore","resetNodes","reset"],"mappings":";;;;;;;oOAwBA,SAASA,EAAQC,GAAMC,IAAAA,EAAAA,UAAAA,OAAAA,QAAAA,IAAAA,UAAAA,GAAAA,UAAAA,GAAU,CAAA,EACvBC,EAAW,CACbC,SAAcF,EAAQE,UAAgB,KACtCC,aAAcH,EAAQG,cAAgBC,SAASC,UAC/CC,UAAcN,EAAQM,WAAgBF,SAASC,UAC/CE,QAAcP,EAAQO,SAAgBH,SAASC,UAC/CG,WAAcR,EAAQQ,YAAgBJ,SAASC,WAE7CI,EAAWC,MAAMC,QAAQZ,GAAQA,EAAO,CAACA,GACzCa,EAAWF,MAAMG,MAAM,KAAMH,MAAMD,EAASK,SAASC,KAAI,SAAAC,GAAC,OAAI,QAI3DC,SAAAA,EAAWC,GAChB,IAAMC,EAA2B,iBAATD,EAClBE,EAASD,GAAsC,MAA1BD,EAAKG,OAAOC,OAAO,GAEvCH,OAAAA,IAAaC,EAGxB,SAASb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