nextcloud/core/vendor/css-vars-ponyfill/dist/css-vars-ponyfill.min.js.map

1 line
71 KiB
Plaintext

{"version":3,"file":"css-vars-ponyfill.min.js","sources":["../node_modules/get-css-data/dist/get-css-data.esm.js","../src/merge-deep.js","../node_modules/balanced-match/index.js","../src/parse-css.js","../src/transform-css.js","../src/walk-css.js","../src/stringify-css.js","../src/index.js"],"sourcesContent":["/*!\n * get-css-data\n * v1.3.2\n * https://github.com/jhildenbiddle/get-css-data\n * (c) 2018 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 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 urlArray.forEach(function(url, i) {\n var parser = document.createElement(\"a\");\n parser.setAttribute(\"href\", url);\n parser.href = parser.href;\n var isCrossDomain = parser.host !== location.host;\n var isSameProtocol = parser.protocol === location.protocol;\n if (isCrossDomain && typeof XDomainRequest !== \"undefined\") {\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 onSuccess(xdr.responseText, i);\n };\n xdr.onerror = function(err) {\n onError(xdr, i);\n };\n setTimeout(function() {\n xdr.send();\n }, 0);\n } else {\n console.log(\"Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol\");\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 if (xhr.status === 200) {\n onSuccess(xhr.responseText, 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 {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 {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 * include: 'style,link[rel=\"stylesheet\"]', // default\n * exclude: '[href=\"skip.css\"]',\n * filter : /red/,\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) {\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 include: options.include || 'style,link[rel=\"stylesheet\"]',\n exclude: options.exclude || null,\n filter: options.filter || 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 sourceNodes = Array.apply(null, document.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 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 === 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 === \"LINK\" && linkHref && linkRel && linkRel.toLowerCase() === \"stylesheet\";\n var isStyle = node.nodeName === \"STYLE\";\n if (isLink) {\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, location.href);\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 } else if (isStyle) {\n handleSuccess(node.textContent, i, node, location.href);\n } else {\n cssArray[i] = \"\";\n handleComplete();\n }\n });\n } else {\n settings.onComplete(\"\", []);\n }\n}\n\nfunction getFullUrl(url) {\n var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : location.href;\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;\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 default getCssData;\n//# sourceMappingURL=get-css-data.esm.js.map\n","// Functions\n// =============================================================================\n/**\n * Performs a deep merge of objects and returns new object. Does not modify\n * objects (immutable) and merges arrays via concatenation.\n *\n * @param {...object} objects - Objects to merge\n * @returns {object} New object with merged key/values\n */\nfunction mergeDeep(...objects) {\n const isObject = obj => obj instanceof Object && obj.constructor === Object;\n\n return objects.reduce((prev, obj) => {\n Object.keys(obj).forEach(key => {\n const pVal = prev[key];\n const oVal = obj[key];\n\n // if (Array.isArray(pVal) && Array.isArray(oVal)) {\n // prev[key] = pVal.concat(...oVal);\n // }\n if (isObject(pVal) && isObject(oVal)) {\n prev[key] = mergeDeep(pVal, oVal);\n }\n else {\n prev[key] = oVal;\n }\n });\n\n return prev;\n }, {});\n}\n\n\n// Export\n// =============================================================================\nexport default mergeDeep;\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 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// Functions\n// =============================================================================\n/**\n * Parses CSS string and generates AST object\n *\n * @param {string} css The CSS stringt to be converted to an AST\n * @returns {object}\n */\nfunction cssParse(css) {\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 whitespace() {\n match(/^\\s*/);\n }\n function open() {\n return match(/^{\\s*/);\n }\n function close() {\n return match(/^}/);\n }\n\n // Comments\n // -------------------------------------------------------------------------\n function comment() {\n whitespace();\n\n if (css[0] !== '/' || css[1] !== '*') { return; }\n\n let i = 2;\n while (css[i] && (css[i] !== '*' || css[i + 1] !== '/')) { i++; }\n\n // FIXED\n if (!css[i]) { return error('end of comment is missing'); }\n\n const str = css.slice(2, i);\n css = css.slice(i + 2);\n\n return { type: 'comment', comment: str };\n }\n function comments() {\n const cmnts = [];\n\n let c;\n\n while ((c = comment())) {\n cmnts.push(c);\n }\n return cmnts;\n }\n\n // Selector\n // -------------------------------------------------------------------------\n function selector() {\n whitespace();\n while (css[0] === '}') {\n error('extra closing bracket');\n }\n\n const m = match(/^((\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[^{])+)/);\n\n if (m)\n { return m[0]\n .trim() // remove all comments from selectors\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '')\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function(m) {\n return m.replace(/,/g, '\\u200C');\n })\n .split(/\\s*(?![^(]*\\)),\\s*/)\n .map(function(s) {\n return s.replace(/\\u200C/g, ',');\n }); }\n }\n\n // Declarations\n // -------------------------------------------------------------------------\n function declaration() {\n match(/^([;\\s]*)+/); // ignore empty declarations + whitespace\n\n const comment_regexp = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\n let prop = match(/^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!prop) { return; }\n\n prop = prop[0].trim();\n\n if (!match(/^:\\s*/)) { return error('property missing \\':\\''); }\n\n // Quotes regex repeats verbatim inside and outside parentheses\n const val = match(/^((?:\\/\\*.*?\\*\\/|'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\((\\s*'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|[^)]*?)\\s*\\)|[^};])+)/);\n\n const ret = { type: 'declaration', property: prop.replace(comment_regexp, ''), value: val ? val[0].replace(comment_regexp, '').trim() : '' };\n\n match(/^[;\\s]*/);\n\n return ret;\n }\n function declarations() {\n if (!open()) { return error('missing \\'{\\''); }\n\n let d,\n decls = comments();\n\n while ((d = declaration())) {\n decls.push(d);\n decls = decls.concat(comments());\n }\n\n if (!close()) { return error('missing \\'}\\''); }\n\n return decls;\n }\n\n // Keyframes\n // -------------------------------------------------------------------------\n function keyframe() {\n whitespace();\n\n const vals = [];\n\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) { return { type: 'keyframe', values: vals, declarations: declarations() }; }\n }\n function at_keyframes() {\n let m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) { return; }\n\n const vendor = m[1];\n\n m = match(/^([-\\w]+)\\s*/);\n if (!m) { return error('@keyframes missing name'); } // identifier\n\n const name = m[1];\n\n if (!open()) { return error('@keyframes missing \\'{\\''); }\n\n let frame,\n frames = comments();\n while ((frame = keyframe())) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) { return error('@keyframes missing \\'}\\''); }\n\n return { type: 'keyframes', name: name, vendor: vendor, keyframes: frames };\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_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 // FIXED\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 if (css[0] === '@') { return at_keyframes() || at_supports() || at_host() || at_media() || at_custom_m() || at_page() || at_document() || at_fontface() || at_x(); }\n }\n\n // Rules\n // -------------------------------------------------------------------------\n function rule() {\n const sel = selector() || [];\n if (!sel.length) { error('selector missing'); }\n\n const decls = declarations();\n\n return { type: 'rule', selectors: sel, declarations: decls };\n }\n function rules(core) {\n if (!core && !open()) { return error('missing \\'{\\''); }\n\n let node,\n rules = comments();\n\n while (css.length && (core || css[0] !== '}') && (node = at_rule() || rule())) {\n rules.push(node);\n rules = rules.concat(comments());\n }\n\n if (!core && !close()) { return error('missing \\'}\\''); }\n\n return rules;\n }\n\n return { type: 'stylesheet', stylesheet: { rules: rules(true), errors: errors } };\n}\n\n\n// Exports\n// =============================================================================\nexport default cssParse;\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 mergeDeep from './merge-deep';\nimport parseCss from './parse-css';\nimport stringifyCss from './stringify-css';\nimport walkCss from './walk-css';\n\n\n// Constants & Variables\n// =============================================================================\nconst persistStore = {};\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} cssText CSS containing variable definitions and functions\n * @param {object} [options] Options object\n * @param {boolean} [options.fixNestedCalc=true] Removes nested 'calc' keywords\n * for legacy browser compatibility.\n * @param {boolean} [options.onlyVars=true] Remove declarations that do not\n * contain a CSS variable from the return value. Note that\n * @font-face and @keyframe rules require all declarations to\n * be returned if a CSS variable is used.\n * @param {boolean} [options.persist=false] Persists options.variables,\n * allowing variables set in previous calls to be applied in\n * subsequent calls.\n * @param {boolean} [options.preserve=false] Preserve CSS variable definitions\n * and functions in the return value, allowing \"live\" variable\n * updates via JavaScript to continue working in browsers with\n * native CSS variable support.\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 transformVars(cssText, options = {}) {\n const defaults = {\n fixNestedCalc: true,\n onlyVars : true,\n persist : false,\n preserve : false,\n variables : {},\n onWarning() {}\n };\n const map = {};\n const settings = mergeDeep(defaults, options);\n const varSource = settings.persist ? persistStore : settings.variables;\n\n // Convert cssText to AST (this could throw errors)\n const cssTree = parseCss(cssText);\n\n // Remove non-vars\n if (settings.onlyVars) {\n cssTree.stylesheet.rules = filterVars(cssTree.stylesheet.rules);\n }\n\n // Define variables\n cssTree.stylesheet.rules.forEach(function(rule) {\n const varNameIndices = [];\n\n if (rule.type !== 'rule') {\n return;\n }\n\n // only variables declared for `:root` are supported\n if (rule.selectors.length !== 1 || rule.selectors[0] !== ':root') {\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(VAR_PROP_IDENTIFIER) === 0) {\n map[prop] = value;\n varNameIndices.push(i);\n }\n });\n\n // optionally remove `--*` properties from the rule\n if (!settings.preserve) {\n for (let i = varNameIndices.length - 1; i >= 0; i--) {\n rule.declarations.splice(varNameIndices[i], 1);\n }\n }\n });\n\n // Handle variables defined in settings.variables\n Object.keys(settings.variables).forEach(key => {\n // Convert all property names to leading '--' style\n const prop = `--${key.replace(/^-+/, '')}`;\n const value = settings.variables[key];\n\n // Update settings.variables\n if (key !== prop) {\n settings.variables[prop] = value;\n delete settings.variables[key];\n }\n\n // Store variables so they can be reapplied on subsequent call. For\n // example, if '--myvar' is set on the first call it should continue to\n // be set on each call thereafter (otherwise each call removes the\n // previously set variables).\n if (settings.persist) {\n persistStore[prop] = value;\n }\n });\n\n if (Object.keys(varSource).length) {\n const newRule = {\n declarations: [],\n selectors : [':root'],\n type : 'rule'\n };\n\n Object.keys(varSource).forEach(function(key) {\n // Update internal map value with varSource value\n map[key] = varSource[key];\n\n // Add new declaration to newRule\n newRule.declarations.push({\n type : 'declaration',\n property: key,\n value : varSource[key]\n });\n\n // Add to persistent storage\n if (settings.persist) {\n persistStore[key] = varSource[key];\n }\n });\n\n // Append new :root ruleset\n if (settings.preserve) {\n cssTree.stylesheet.rules.push(newRule);\n }\n }\n\n // Resolve variables\n walkCss(cssTree.stylesheet, function(declarations, node) {\n let decl;\n let resolvedValue;\n let value;\n\n for (let i = 0; i < declarations.length; i++) {\n decl = declarations[i];\n value = decl.value;\n\n // skip comments\n if (decl.type !== 'declaration') {\n continue;\n }\n\n // skip values that don't contain variable functions\n if (!value || value.indexOf(VAR_FUNC_IDENTIFIER + '(') === -1) {\n continue;\n }\n\n resolvedValue = resolveValue(value, map, settings);\n\n if (resolvedValue !== 'undefined') {\n if (!settings.preserve) {\n decl.value = resolvedValue;\n }\n else {\n declarations.splice(i, 0, {\n type : decl.type,\n property: decl.property,\n value : resolvedValue\n });\n\n // skip ahead of preserved declaration\n i++;\n }\n }\n }\n });\n\n // Fix nested calc() values\n if (settings.fixNestedCalc) {\n fixNestedCalc(cssTree.stylesheet.rules);\n }\n\n // Return CSS string\n return stringifyCss(cssTree);\n}\n\n\n// Functions (Private)\n// =============================================================================\n/**\n * Filters rules recursively, retaining only declarations that contain either a\n * CSS variable definition (property) or function (value). Maintains all\n * declarations for @font-face and @keyframes rules that contain a CSS\n * definition or function.\n *\n * @param {array} rules\n * @returns {array}\n */\nfunction filterVars(rules) {\n return rules.filter(rule => {\n // Rule, @font-face, @host, @page\n if (rule.declarations) {\n const declArray = rule.declarations.filter(d => {\n const hasVarProp = d.property && d.property.indexOf(VAR_PROP_IDENTIFIER) === 0;\n const hasVarVal = d.value && d.value.indexOf(VAR_FUNC_IDENTIFIER + '(') > -1;\n\n return hasVarProp || hasVarVal;\n });\n\n // For most rule types the filtered declarations should be applied.\n // @font-face declaratons are unique and require all declarations to\n // be retained if any declaration contains a CSS variable definition\n // or value.\n if (rule.type !== 'font-face') {\n rule.declarations = declArray;\n }\n\n return Boolean(declArray.length);\n }\n // @keyframes\n else if (rule.keyframes) {\n // @keyframe rules require all declarations to be retained if any\n // declaration contains a CSS variable definition or value.\n return Boolean(rule.keyframes.filter(k =>\n Boolean(k.declarations.filter(d => {\n const hasVarProp = d.property && d.property.indexOf(VAR_PROP_IDENTIFIER) === 0;\n const hasVarVal = d.value && d.value.indexOf(VAR_FUNC_IDENTIFIER + '(') > -1;\n\n return hasVarProp || hasVarVal;\n }).length)\n ).length);\n }\n // @document, @media, @supports\n else if (rule.rules) {\n rule.rules = filterVars(rule.rules).filter(r => r.declarations && r.declarations.length);\n\n return Boolean(rule.rules.length);\n }\n\n return true;\n });\n}\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 {array} rules\n */\nfunction fixNestedCalc(rules) {\n const reCalcExp = /(-[a-z]+-)?calc\\(/; // Match \"calc(\" or \"-vendor-calc(\"\n\n rules.forEach(rule => {\n if (rule.declarations) {\n rule.declarations.forEach(decl => {\n let oldValue = decl.value;\n let newValue = '';\n\n while (reCalcExp.test(oldValue)) {\n const rootCalc = balanced('calc(', ')', oldValue || '');\n\n oldValue = oldValue.slice(rootCalc.end);\n\n while (reCalcExp.test(rootCalc.body)) {\n const nestedCalc = balanced(reCalcExp, ')', rootCalc.body);\n\n rootCalc.body = `${nestedCalc.pre}(${nestedCalc.body})${nestedCalc.post}`;\n }\n\n newValue += `${rootCalc.pre}calc(${rootCalc.body}`;\n newValue += !reCalcExp.test(oldValue) ? `)${rootCalc.post}` : '';\n }\n\n decl.value = newValue || decl.value;\n });\n }\n });\n}\n\n/**\n * Resolve CSS variables in a value\n *\n * The second argument to a CSS variable function, if provided, is a fallback\n * value, which is used as the substitution value when the referenced variable\n * is invalid.\n *\n * var(name[, fallback])\n *\n * @param {string} value A property value containing a CSS variable function\n * @param {object} map A map of variable names and values\n * @param {object} settings Settings object passed from transformVars()\n * @return {string} A new value with CSS variables substituted or using fallback\n */\nfunction resolveValue(value, map, settings) {\n // matches `name[, fallback]`, captures 'name' and 'fallback'\n const RE_VAR = /([\\w-]+)(?:\\s*,\\s*)?(.*)?/;\n const balancedParens = balanced('(', ')', value);\n const varStartIndex = value.indexOf('var(');\n const varRef = balanced('(', ')', value.substring(varStartIndex)).body;\n const warningIntro = 'CSS transform warning:';\n\n /* istanbul ignore next */\n if (!balancedParens) {\n settings.onWarning(`${warningIntro} missing closing \")\" in the value \"${value}\"`);\n }\n\n /* istanbul ignore next */\n if (varRef === '') {\n settings.onWarning(`${warningIntro} var() must contain a non-whitespace string`);\n }\n\n const varFunc = VAR_FUNC_IDENTIFIER + '(' + varRef + ')';\n\n const varResult = varRef.replace(RE_VAR, function(_, name, fallback) {\n const replacement = map[name];\n\n if (!replacement && !fallback) {\n settings.onWarning(`${warningIntro} variable \"${name}\" is undefined`);\n }\n\n if (!replacement && fallback) {\n return fallback;\n }\n\n return replacement;\n });\n\n // resolve the variable\n value = value.split(varFunc).join(varResult);\n\n // recursively resolve any remaining variables in the value\n if (value.indexOf(VAR_FUNC_IDENTIFIER + '(') !== -1) {\n value = resolveValue(value, map, settings);\n }\n\n return value;\n}\n\n\n// Exports\n// =============================================================================\nexport default transformVars;\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 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 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","// Dependencies\n// =============================================================================\nimport getCssData from 'get-css-data';\nimport mergeDeep from './merge-deep';\nimport transformCss from './transform-css';\nimport { name as pkgName } from '../package.json';\n\n\n// Constants & Variables\n// =============================================================================\nconst defaults = {\n // Sources\n include : 'style,link[rel=stylesheet]',\n exclude : '',\n // Options\n fixNestedCalc: true, // transformCss\n onlyLegacy : true, // cssVars\n onlyVars : false, // cssVars, transformCss\n preserve : false, // transformCss\n silent : false, // cssVars\n updateDOM : true, // cssVars\n updateURLs : true, // cssVars\n variables : {}, // transformCss\n // Callbacks\n onBeforeSend() {}, // cssVars\n onSuccess() {}, // cssVars\n onWarning() {}, // transformCss\n onError() {}, // cssVars\n onComplete() {} // cssVars\n};\nconst regex = {\n // CSS comments\n cssComments: /\\/\\*[\\s\\S]+?\\*\\//g,\n // CSS url(...) values\n cssUrls: /url\\((?!['\"]?(?:data|http|\\/\\/):)['\"]?([^'\")]*)['\"]?\\)/g,\n // CSS variable :root declarations and var() function values\n cssVars: /(?:(?::root\\s*{\\s*[^;]*;*\\s*)|(?:var\\(\\s*))(--[^:)]+)(?:\\s*[:)])/\n};\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 {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 {boolean} [options.fixNestedCalc=true] Removes nested 'calc' keywords\n * for legacy browser compatibility.\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.onlyVars=false] Determines if CSS rulesets and\n * declarations without a custom property value should be\n * removed from the ponyfill-generated CSS\n * @param {boolean} [options.preserve=false] Determines if the original CSS\n * custom property declaration will be retained in the\n * ponyfill-generated 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 the ponyfill will\n * convert relative url() paths to absolute urls.\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 {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 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.onWarning] Callback after each CSS parsing warning\n * has occurred. Passes 1) a warning message as an argument.\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.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, and 2) a\n * reference to the appended <style> node.\n *\n * @example\n *\n * cssVars({\n * include : 'style,link[rel=\"stylesheet\"]', // default\n * exclude : '',\n * fixNestedCalc: true, // default\n * onlyLegacy : true, // default\n * onlyVars : false, // default\n * preserve : false, // default\n * silent : false, // default\n * updateDOM : true, // default\n * updateURLs : true, // default\n * variables : {\n * // ...\n * },\n * onBeforeSend(xhr, node, url) {\n * // ...\n * }\n * onSuccess(cssText, node, url) {\n * // ...\n * },\n * onWarning(message) {\n * // ...\n * },\n * onError(message, node) {\n * // ...\n * },\n * onComplete(cssText, styleNode) {\n * // ...\n * }\n * });\n */\nfunction cssVars(options = {}) {\n const settings = mergeDeep(defaults, options);\n\n function handleError(message, sourceNode, xhr, url) {\n /* istanbul ignore next */\n if (!settings.silent) {\n // eslint-disable-next-line\n console.error(`${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) {\n // eslint-disable-next-line\n console.warn(message);\n }\n\n settings.onWarning(message);\n }\n\n // Verify readyState to ensure all <link> and <style> nodes are available\n if (document.readyState !== 'loading') {\n const hasNativeSupport = window.CSS && window.CSS.supports && window.CSS.supports('(--a: 0)');\n\n // Lacks native support or onlyLegacy 'false'\n if (!hasNativeSupport || !settings.onlyLegacy) {\n const styleNodeId = pkgName;\n\n getCssData({\n include: settings.include,\n // Always exclude styleNodeId element, which is the generated\n // <style> node containing previously transformed CSS.\n exclude: `#${styleNodeId}` + (settings.exclude ? `,${settings.exclude}` : ''),\n // This filter does a test on each block of CSS. An additional\n // filter is used in the parser to remove individual\n // declarations.\n filter : settings.onlyVars ? regex.cssVars : null,\n onBeforeSend: settings.onBeforeSend,\n onSuccess(cssText, node, url) {\n const returnVal = settings.onSuccess(cssText, node, url);\n\n cssText = returnVal === false ? '' : returnVal || cssText;\n\n // Convert relative url(...) values to absolute\n if (settings.updateURLs) {\n const cssUrls = cssText\n // Remove comments to avoid processing @import in 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, url);\n\n cssText = cssText.replace(cssUrl, cssUrl.replace(oldUrl, newUrl));\n });\n }\n\n return cssText;\n },\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 onComplete(cssText, cssArray, nodeArray) {\n const cssMarker = /\\/\\*__CSSVARSPONYFILL-(\\d+)__\\*\\//g;\n let styleNode = null;\n\n // Concatenate cssArray items, replacing those that do not\n // contain a CSS custom property declaraion or function with\n // a temporary marker . After the CSS is transformed, the\n // markers will be replaced with the matching cssArray item.\n // This optimization is done to avoid processing CSS that\n // will not change as a results of the ponyfill.\n cssText = cssArray.map((css, i) => regex.cssVars.test(css) ? css : `/*__CSSVARSPONYFILL-${i}__*/`).join('');\n\n try {\n cssText = transformCss(cssText, {\n fixNestedCalc: settings.fixNestedCalc,\n onlyVars : settings.onlyVars,\n persist : settings.updateDOM,\n preserve : settings.preserve,\n variables : settings.variables,\n onWarning : handleWarning\n });\n\n let cssMarkerMatch = cssMarker.exec(cssText);\n\n // Replace markers with appropriate cssArray item\n while (cssMarkerMatch !== null) {\n const matchedText = cssMarkerMatch[0];\n const cssArrayIndex = cssMarkerMatch[1];\n\n cssText = cssText.replace(matchedText, cssArray[cssArrayIndex]);\n cssMarkerMatch = cssMarker.exec(cssText);\n }\n\n if (settings.updateDOM && nodeArray && nodeArray.length) {\n const lastNode = nodeArray[nodeArray.length - 1];\n\n styleNode = document.querySelector(`#${styleNodeId}`) || document.createElement('style');\n styleNode.setAttribute('id', styleNodeId);\n\n if (styleNode.textContent !== cssText) {\n styleNode.textContent = cssText;\n }\n\n // Insert <style> element after last nodeArray item\n if (lastNode.nextSibling !== styleNode) {\n lastNode.parentNode.insertBefore(styleNode, lastNode.nextSibling);\n }\n }\n }\n catch(err) {\n let errorThrown = false;\n\n // Iterate cssArray to detect CSS text and node(s)\n // responsibile for error.\n cssArray.forEach((cssText, i) => {\n try {\n cssText = transformCss(cssText, settings);\n }\n catch(err) {\n const errorNode = nodeArray[i - 0];\n\n errorThrown = true;\n handleError(err.message, errorNode);\n }\n });\n\n // In the event the error thrown was not due to\n // transformCss, handle the original error.\n /* istanbul ignore next */\n if (!errorThrown) {\n handleError(err.message || err);\n }\n }\n\n settings.onComplete(cssText, styleNode);\n }\n });\n }\n // Has native support\n else if (hasNativeSupport && settings.updateDOM) {\n // Set variables using native methods\n Object.keys(settings.variables).forEach(key => {\n // Convert all property names to leading '--' style\n const prop = `--${key.replace(/^-+/, '')}`;\n const value = settings.variables[key];\n\n document.documentElement.style.setProperty(prop, value);\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\n// Functions (Private)\n// =============================================================================\n/**\n * Returns fully qualified URL from relative URL and (optional) base URL\n *\n * @param {any} url\n * @param {any} [base=location.href]\n * @returns\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// Export\n// =============================================================================\nexport default cssVars;\n"],"names":["getUrls","urls","options","arguments","length","undefined","settings","mimeType","onBeforeSend","Function","prototype","onSuccess","onError","onComplete","urlArray","Array","isArray","urlQueue","apply","map","x","xhr","urlIndex","responseText","returnVal","indexOf","forEach","url","i","parser","document","createElement","setAttribute","href","isCrossDomain","host","location","isSameProtocol","protocol","XDomainRequest","xdr","open","timeout","onprogress","ontimeout","onload","onerror","err","setTimeout","send","console","log","XMLHttpRequest","overrideMimeType","onreadystatechange","readyState","status","getCssData","regex","cssComments","cssImports","include","exclude","filter","sourceNodes","querySelectorAll","node","elm","selector","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","call","cssArray","handleComplete","cssText","join","handleSuccess","cssIndex","sourceUrl","resolveImports","baseUrl","callbackFn","__errorData","__errorRules","importData","parseImportData","rules","absoluteUrls","responseImportData","rule","replace","absoluteRules","push","responseArray","importText","resolvedCssText","errorData","data","test","ignoreRules","match","getFullUrl","oldUrl","newUrl","linkHref","getAttribute","linkRel","isLink","nodeName","toLowerCase","isStyle","textContent","base","d","implementation","createHTMLDocument","b","a","head","appendChild","body","mergeDeep","isObject","obj","Object","constructor","objects","reduce","prev","keys","pVal","key","oVal","balanced","str","RegExp","maybeMatch","r","range","start","end","pre","slice","post","reg","m","begs","beg","left","right","result","ai","bi","pop","cssParse","css","error","msg","Error","re","exec","whitespace","close","comment","type","comments","cmnts","c","trim","split","s","declaration","comment_regexp","prop","val","ret","property","value","declarations","decls","concat","keyframe","vals","values","at_rule","vendor","name","frame","frames","keyframes","at_keyframes","supports","at_supports","at_host","media","at_media","at_custom_m","selectors","at_page","at_document","at_fontface","at_x","core","sel","stylesheet","errors","persistStore","VAR_PROP_IDENTIFIER","VAR_FUNC_IDENTIFIER","transformVars","reCalcExp","varSource","persist","variables","cssTree","parseCss","onlyVars","filterVars","declArray","hasVarProp","hasVarVal","Boolean","k","varNameIndices","decl","preserve","splice","newRule","walkCss","fn","resolvedValue","resolveValue","fixNestedCalc","oldValue","newValue","rootCalc","nestedCalc","tree","delim","cb","renderMethods","visit","nodes","buf","n","txt","stringifyCss","balancedParens","varStartIndex","varRef","substring","warningIntro","onWarning","varFunc","varResult","_","fallback","replacement","defaults","cssVars","handleError","message","sourceNode","silent","handleWarning","warn","hasNativeSupport","window","CSS","onlyLegacy","updateDOM","documentElement","style","setProperty","styleNodeId","pkgName","updateURLs","cssUrls","cssUrl","responseUrl","responseURL","statusText","nodeArray","cssMarker","styleNode","transformCss","cssMarkerMatch","matchedText","cssArrayIndex","lastNode","querySelector","nextSibling","parentNode","insertBefore","errorThrown","errorNode","addEventListener","init","evt","removeEventListener"],"mappings":";;;;;;;mLAOA,SAASA,EAAQC,GACb,IAAIC,EAAUC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,MACzEG,GACAC,SAAUL,EAAQK,UAAY,KAC9BC,aAAcN,EAAQM,cAAgBC,SAASC,UAC/CC,UAAWT,EAAQS,WAAaF,SAASC,UACzCE,QAASV,EAAQU,SAAWH,SAASC,UACrCG,WAAYX,EAAQW,YAAcJ,SAASC,WAE3CI,EAAWC,MAAMC,QAAQf,GAAQA,GAASA,GAC1CgB,EAAWF,MAAMG,MAAM,KAAMH,MAAMD,EAASV,SAASe,IAAI,SAASC,GAClE,OAAO,OAEX,SAASR,EAAQS,EAAKC,GAClBhB,EAASM,QAAQS,EAAKP,EAASQ,GAAWA,GAE9C,SAASX,EAAUY,EAAcD,GAC7B,IAAIE,EAAYlB,EAASK,UAAUY,EAAcT,EAASQ,GAAWA,GACrEC,GAA6B,IAAdC,EAAsB,GAAKA,GAAaD,EACvDN,EAASK,GAAYC,GACW,IAA5BN,EAASQ,QAAQ,OACjBnB,EAASO,WAAWI,GAG5BH,EAASY,QAAQ,SAASC,EAAKC,GAC3B,IAAIC,EAASC,SAASC,cAAc,KACpCF,EAAOG,aAAa,OAAQL,GAC5BE,EAAOI,KAAOJ,EAAOI,KACrB,IAAIC,EAAgBL,EAAOM,OAASC,SAASD,KACzCE,EAAiBR,EAAOS,WAAaF,SAASE,SAClD,GAAIJ,GAA2C,oBAAnBK,eACxB,GAAIF,EAAgB,CAChB,IAAIG,EAAM,IAAID,eACdC,EAAIC,KAAK,MAAOd,GAChBa,EAAIE,QAAU,EACdF,EAAIG,WAAalC,SAASC,UAC1B8B,EAAII,UAAYnC,SAASC,UACzB8B,EAAIK,OAAS,WACTlC,EAAU6B,EAAIjB,aAAcK,IAEhCY,EAAIM,QAAU,SAASC,GACnBnC,EAAQ4B,EA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