{
  "version": 3,
  "sources": ["../../../node_modules/picocolors/picocolors.browser.js", "../../../node_modules/postcss/lib/css-syntax-error.js", "../../../node_modules/postcss/lib/symbols.js", "../../../node_modules/postcss/lib/stringifier.js", "../../../node_modules/postcss/lib/stringify.js", "../../../node_modules/postcss/lib/node.js", "../../../node_modules/postcss/lib/declaration.js", "../../../node_modules/@file-services/path/browser-path.js", "../../../node_modules/nanoid/non-secure/index.cjs", "../../../node_modules/postcss/lib/previous-map.js", "../../../node_modules/postcss/lib/input.js", "../../../node_modules/postcss/lib/map-generator.js", "../../../node_modules/postcss/lib/comment.js", "../../../node_modules/postcss/lib/container.js", "../../../node_modules/postcss/lib/document.js", "../../../node_modules/postcss/lib/warn-once.js", "../../../node_modules/postcss/lib/warning.js", "../../../node_modules/postcss/lib/result.js", "../../../node_modules/postcss/lib/tokenize.js", "../../../node_modules/postcss/lib/at-rule.js", "../../../node_modules/postcss/lib/root.js", "../../../node_modules/postcss/lib/list.js", "../../../node_modules/postcss/lib/rule.js", "../../../node_modules/postcss/lib/parser.js", "../../../node_modules/postcss/lib/parse.js", "../../../node_modules/postcss/lib/lazy-result.js", "../../../node_modules/postcss/lib/no-work-result.js", "../../../node_modules/postcss/lib/processor.js", "../../../node_modules/postcss/lib/fromJSON.js", "../../../node_modules/postcss/lib/postcss.js", "../../../node_modules/postcss-selector-parser/dist/util/unesc.js", "../../../node_modules/postcss-selector-parser/dist/util/getProp.js", "../../../node_modules/postcss-selector-parser/dist/util/ensureObject.js", "../../../node_modules/postcss-selector-parser/dist/util/stripComments.js", "../../../node_modules/postcss-selector-parser/dist/util/index.js", "../../../node_modules/postcss-selector-parser/dist/selectors/node.js", "../../../node_modules/postcss-selector-parser/dist/selectors/types.js", "../../../node_modules/postcss-selector-parser/dist/selectors/container.js", "../../../node_modules/postcss-selector-parser/dist/selectors/root.js", "../../../node_modules/postcss-selector-parser/dist/selectors/selector.js", "../../../node_modules/cssesc/cssesc.js", "../../../node_modules/postcss-selector-parser/dist/selectors/className.js", "../../../node_modules/postcss-selector-parser/dist/selectors/comment.js", "../../../node_modules/postcss-selector-parser/dist/selectors/id.js", "../../../node_modules/postcss-selector-parser/dist/selectors/namespace.js", "../../../node_modules/postcss-selector-parser/dist/selectors/tag.js", "../../../node_modules/postcss-selector-parser/dist/selectors/string.js", "../../../node_modules/postcss-selector-parser/dist/selectors/pseudo.js", "../../../node_modules/util-deprecate/browser.js", "../../../node_modules/postcss-selector-parser/dist/selectors/attribute.js", "../../../node_modules/postcss-selector-parser/dist/selectors/universal.js", "../../../node_modules/postcss-selector-parser/dist/selectors/combinator.js", "../../../node_modules/postcss-selector-parser/dist/selectors/nesting.js", "../../../node_modules/postcss-selector-parser/dist/sortAscending.js", "../../../node_modules/postcss-selector-parser/dist/tokenTypes.js", "../../../node_modules/postcss-selector-parser/dist/tokenize.js", "../../../node_modules/postcss-selector-parser/dist/parser.js", "../../../node_modules/postcss-selector-parser/dist/processor.js", "../../../node_modules/postcss-selector-parser/dist/selectors/constructors.js", "../../../node_modules/postcss-selector-parser/dist/selectors/guards.js", "../../../node_modules/postcss-selector-parser/dist/selectors/index.js", "../../../node_modules/postcss-selector-parser/dist/index.js", "../../../node_modules/postcss-nested/index.js", "../../../node_modules/camelcase-css/index-es5.js", "../../../node_modules/postcss-js/objectifier.js", "../../../node_modules/postcss-js/parser.js", "../../../node_modules/postcss-js/process-result.js", "../../../node_modules/postcss-js/async.js", "../../../node_modules/postcss-js/sync.js", "../../../node_modules/postcss-js/index.js", "../../../node_modules/postcss-safe-parser/lib/safe-parser.js", "../../../node_modules/postcss-safe-parser/lib/safe-parse.js", "../../../node_modules/@tokey/core/dist/types.js", "../../../node_modules/@tokey/core/src/core.ts", "../../../node_modules/@tokey/core/src/helpers.ts", "../../../node_modules/@tokey/core/src/seeker.ts", "../../../node_modules/@tokey/core/src/index.ts", "../../../node_modules/@tokey/css-selector-parser/src/tokenizer.ts", "../../../node_modules/@tokey/css-selector-parser/src/helpers.ts", "../../../node_modules/@tokey/css-selector-parser/src/nth-parser.ts", "../../../node_modules/@tokey/css-selector-parser/src/selector-parser.ts", "../../../node_modules/@tokey/css-selector-parser/dist/ast-types.js", "../../../node_modules/@tokey/css-selector-parser/src/stringify.ts", "../../../node_modules/@tokey/css-selector-parser/src/ast-tools/walk.ts", "../../../node_modules/@tokey/css-selector-parser/src/ast-tools/compound.ts", "../../../node_modules/@tokey/css-selector-parser/src/ast-tools/specificity.ts", "../../../node_modules/@tokey/css-selector-parser/src/index.ts", "../../../node_modules/lodash.clonedeep/index.js", "../../../node_modules/@tokey/imports-parser/src/imports-parser.ts", "../../../node_modules/postcss-value-parser/lib/parse.js", "../../../node_modules/postcss-value-parser/lib/walk.js", "../../../node_modules/postcss-value-parser/lib/stringify.js", "../../../node_modules/postcss-value-parser/lib/unit.js", "../../../node_modules/postcss-value-parser/lib/index.js", "../../../node_modules/lodash.clonedeepwith/index.js", "../../../node_modules/fastparse/lib/Parser.js", "../../../node_modules/css-selector-tokenizer/lib/uni-regexp.js", "../../../node_modules/css-selector-tokenizer/lib/parse.js", "../../../node_modules/css-selector-tokenizer/lib/stringify.js", "../../../node_modules/css-selector-tokenizer/lib/parseValues.js", "../../../node_modules/css-selector-tokenizer/lib/stringifyValues.js", "../../../node_modules/css-selector-tokenizer/lib/index.js", "../../../node_modules/@tokey/css-value-parser/src/ast-types.ts", "../../../node_modules/@tokey/css-value-parser/src/units.ts", "../../../node_modules/@tokey/css-value-parser/src/tokenizer.ts", "../../../node_modules/@tokey/css-value-parser/src/value-stringify.ts", "../../../node_modules/@tokey/css-value-parser/src/value-parser.ts", "../../../node_modules/@tokey/css-value-parser/src/define-property.ts", "../../../node_modules/@tokey/css-value-parser/src/properties/background.ts", "../../../node_modules/@tokey/css-value-parser/src/properties/margin.ts", "../../../node_modules/@tokey/css-value-parser/src/value-syntax-parser.ts", "../../../node_modules/@tokey/css-value-parser/src/index.ts", "../../../node_modules/vendor-prefixes/index.js", "../../../node_modules/is-vendor-prefixed/index.js", "../src/index.ts", "../src/cached-process-file.ts", "../../../node_modules/postcss/lib/postcss.mjs", "../src/parser.ts", "../../../node_modules/postcss-js/index.mjs", "../src/diagnostics.ts", "../src/native-reserved-lists.ts", "../src/stylable-utils.ts", "../src/helpers/selector.ts", "../src/helpers/rule.ts", "../src/helpers/custom-selector.ts", "../src/features/st-symbol.ts", "../src/features/feature.ts", "../src/helpers/plugable-record.ts", "../src/features/st-import.ts", "../src/features/diagnostics.ts", "../src/helpers/import.ts", "../src/helpers/string.ts", "../src/helpers/css-custom-property.ts", "../src/features/st-namespace.ts", "../src/murmurhash.ts", "../src/features/st-global.ts", "../src/features/st-scope.ts", "../src/features/st-var.ts", "../src/custom-values.ts", "../src/helpers/value.ts", "../src/stylable-resolver.ts", "../src/functions.ts", "../src/stylable-assets.ts", "../src/process-declaration-functions.ts", "../src/helpers/escape.ts", "../src/features/st-custom-selector.ts", "../src/features/st-custom-state.ts", "../src/helpers/custom-state.ts", "../src/helpers/css-value-seeker.ts", "../src/features/st-mixin.ts", "../src/helpers/mixin.ts", "../src/features/css-class.ts", "../src/helpers/resolve.ts", "../src/helpers/namespace.ts", "../src/features/css-type.ts", "../src/features/css-pseudo-class.ts", "../src/features/css-custom-property.ts", "../src/helpers/global.ts", "../src/features/css-keyframes.ts", "../src/features/css-layer.ts", "../src/features/css-contains.ts", "../src/features/css-media.ts", "../src/features/st-structure.ts", "../src/helpers/deprecation.ts", "../src/stylable-meta.ts", "../src/stylable-processor.ts", "../src/create-stylable-processor.ts", "../src/stylable-transformer.ts", "../src/helpers/eql.ts", "../src/deprecated/postcss-ast-extension.ts", "../../../node_modules/@file-services/resolve/src/dependency-resolver.ts", "../../../node_modules/@file-services/resolve/src/request-resolver.ts", "../src/module-resolver.ts", "../src/visit-meta-css-dependencies.ts", "../src/stylable.ts", "../src/resolve-namespace-factories.ts", "../src/stylable-js-module-source.ts"],
  "sourcesContent": ["var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n", "'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n  constructor(message, line, column, source, file, plugin) {\n    super(message)\n    this.name = 'CssSyntaxError'\n    this.reason = message\n\n    if (file) {\n      this.file = file\n    }\n    if (source) {\n      this.source = source\n    }\n    if (plugin) {\n      this.plugin = plugin\n    }\n    if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n      if (typeof line === 'number') {\n        this.line = line\n        this.column = column\n      } else {\n        this.line = line.line\n        this.column = line.column\n        this.endLine = column.line\n        this.endColumn = column.column\n      }\n    }\n\n    this.setMessage()\n\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, CssSyntaxError)\n    }\n  }\n\n  setMessage() {\n    this.message = this.plugin ? this.plugin + ': ' : ''\n    this.message += this.file ? this.file : '<css input>'\n    if (typeof this.line !== 'undefined') {\n      this.message += ':' + this.line + ':' + this.column\n    }\n    this.message += ': ' + this.reason\n  }\n\n  showSourceCode(color) {\n    if (!this.source) return ''\n\n    let css = this.source\n    if (color == null) color = pico.isColorSupported\n    if (terminalHighlight) {\n      if (color) css = terminalHighlight(css)\n    }\n\n    let lines = css.split(/\\r?\\n/)\n    let start = Math.max(this.line - 3, 0)\n    let end = Math.min(this.line + 2, lines.length)\n\n    let maxWidth = String(end).length\n\n    let mark, aside\n    if (color) {\n      let { bold, gray, red } = pico.createColors(true)\n      mark = text => bold(red(text))\n      aside = text => gray(text)\n    } else {\n      mark = aside = str => str\n    }\n\n    return lines\n      .slice(start, end)\n      .map((line, index) => {\n        let number = start + 1 + index\n        let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n        if (number === this.line) {\n          let spacing =\n            aside(gutter.replace(/\\d/g, ' ')) +\n            line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n          return mark('>') + aside(gutter) + line + '\\n ' + spacing + mark('^')\n        }\n        return ' ' + aside(gutter) + line\n      })\n      .join('\\n')\n  }\n\n  toString() {\n    let code = this.showSourceCode()\n    if (code) {\n      code = '\\n\\n' + code + '\\n'\n    }\n    return this.name + ': ' + this.message + code\n  }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n", "'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n", "'use strict'\n\nconst DEFAULT_RAW = {\n  after: '\\n',\n  beforeClose: '\\n',\n  beforeComment: '\\n',\n  beforeDecl: '\\n',\n  beforeOpen: ' ',\n  beforeRule: '\\n',\n  colon: ': ',\n  commentLeft: ' ',\n  commentRight: ' ',\n  emptyBody: '',\n  indent: '    ',\n  semicolon: false\n}\n\nfunction capitalize(str) {\n  return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n  constructor(builder) {\n    this.builder = builder\n  }\n\n  atrule(node, semicolon) {\n    let name = '@' + node.name\n    let params = node.params ? this.rawValue(node, 'params') : ''\n\n    if (typeof node.raws.afterName !== 'undefined') {\n      name += node.raws.afterName\n    } else if (params) {\n      name += ' '\n    }\n\n    if (node.nodes) {\n      this.block(node, name + params)\n    } else {\n      let end = (node.raws.between || '') + (semicolon ? ';' : '')\n      this.builder(name + params + end, node)\n    }\n  }\n\n  beforeAfter(node, detect) {\n    let value\n    if (node.type === 'decl') {\n      value = this.raw(node, null, 'beforeDecl')\n    } else if (node.type === 'comment') {\n      value = this.raw(node, null, 'beforeComment')\n    } else if (detect === 'before') {\n      value = this.raw(node, null, 'beforeRule')\n    } else {\n      value = this.raw(node, null, 'beforeClose')\n    }\n\n    let buf = node.parent\n    let depth = 0\n    while (buf && buf.type !== 'root') {\n      depth += 1\n      buf = buf.parent\n    }\n\n    if (value.includes('\\n')) {\n      let indent = this.raw(node, null, 'indent')\n      if (indent.length) {\n        for (let step = 0; step < depth; step++) value += indent\n      }\n    }\n\n    return value\n  }\n\n  block(node, start) {\n    let between = this.raw(node, 'between', 'beforeOpen')\n    this.builder(start + between + '{', node, 'start')\n\n    let after\n    if (node.nodes && node.nodes.length) {\n      this.body(node)\n      after = this.raw(node, 'after')\n    } else {\n      after = this.raw(node, 'after', 'emptyBody')\n    }\n\n    if (after) this.builder(after)\n    this.builder('}', node, 'end')\n  }\n\n  body(node) {\n    let last = node.nodes.length - 1\n    while (last > 0) {\n      if (node.nodes[last].type !== 'comment') break\n      last -= 1\n    }\n\n    let semicolon = this.raw(node, 'semicolon')\n    for (let i = 0; i < node.nodes.length; i++) {\n      let child = node.nodes[i]\n      let before = this.raw(child, 'before')\n      if (before) this.builder(before)\n      this.stringify(child, last !== i || semicolon)\n    }\n  }\n\n  comment(node) {\n    let left = this.raw(node, 'left', 'commentLeft')\n    let right = this.raw(node, 'right', 'commentRight')\n    this.builder('/*' + left + node.text + right + '*/', node)\n  }\n\n  decl(node, semicolon) {\n    let between = this.raw(node, 'between', 'colon')\n    let string = node.prop + between + this.rawValue(node, 'value')\n\n    if (node.important) {\n      string += node.raws.important || ' !important'\n    }\n\n    if (semicolon) string += ';'\n    this.builder(string, node)\n  }\n\n  document(node) {\n    this.body(node)\n  }\n\n  raw(node, own, detect) {\n    let value\n    if (!detect) detect = own\n\n    // Already had\n    if (own) {\n      value = node.raws[own]\n      if (typeof value !== 'undefined') return value\n    }\n\n    let parent = node.parent\n\n    if (detect === 'before') {\n      // Hack for first rule in CSS\n      if (!parent || (parent.type === 'root' && parent.first === node)) {\n        return ''\n      }\n\n      // `root` nodes in `document` should use only their own raws\n      if (parent && parent.type === 'document') {\n        return ''\n      }\n    }\n\n    // Floating child without parent\n    if (!parent) return DEFAULT_RAW[detect]\n\n    // Detect style by other nodes\n    let root = node.root()\n    if (!root.rawCache) root.rawCache = {}\n    if (typeof root.rawCache[detect] !== 'undefined') {\n      return root.rawCache[detect]\n    }\n\n    if (detect === 'before' || detect === 'after') {\n      return this.beforeAfter(node, detect)\n    } else {\n      let method = 'raw' + capitalize(detect)\n      if (this[method]) {\n        value = this[method](root, node)\n      } else {\n        root.walk(i => {\n          value = i.raws[own]\n          if (typeof value !== 'undefined') return false\n        })\n      }\n    }\n\n    if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n    root.rawCache[detect] = value\n    return value\n  }\n\n  rawBeforeClose(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length > 0) {\n        if (typeof i.raws.after !== 'undefined') {\n          value = i.raws.after\n          if (value.includes('\\n')) {\n            value = value.replace(/[^\\n]+$/, '')\n          }\n          return false\n        }\n      }\n    })\n    if (value) value = value.replace(/\\S/g, '')\n    return value\n  }\n\n  rawBeforeComment(root, node) {\n    let value\n    root.walkComments(i => {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before\n        if (value.includes('\\n')) {\n          value = value.replace(/[^\\n]+$/, '')\n        }\n        return false\n      }\n    })\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeDecl')\n    } else if (value) {\n      value = value.replace(/\\S/g, '')\n    }\n    return value\n  }\n\n  rawBeforeDecl(root, node) {\n    let value\n    root.walkDecls(i => {\n      if (typeof i.raws.before !== 'undefined') {\n        value = i.raws.before\n        if (value.includes('\\n')) {\n          value = value.replace(/[^\\n]+$/, '')\n        }\n        return false\n      }\n    })\n    if (typeof value === 'undefined') {\n      value = this.raw(node, null, 'beforeRule')\n    } else if (value) {\n      value = value.replace(/\\S/g, '')\n    }\n    return value\n  }\n\n  rawBeforeOpen(root) {\n    let value\n    root.walk(i => {\n      if (i.type !== 'decl') {\n        value = i.raws.between\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawBeforeRule(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && (i.parent !== root || root.first !== i)) {\n        if (typeof i.raws.before !== 'undefined') {\n          value = i.raws.before\n          if (value.includes('\\n')) {\n            value = value.replace(/[^\\n]+$/, '')\n          }\n          return false\n        }\n      }\n    })\n    if (value) value = value.replace(/\\S/g, '')\n    return value\n  }\n\n  rawColon(root) {\n    let value\n    root.walkDecls(i => {\n      if (typeof i.raws.between !== 'undefined') {\n        value = i.raws.between.replace(/[^\\s:]/g, '')\n        return false\n      }\n    })\n    return value\n  }\n\n  rawEmptyBody(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length === 0) {\n        value = i.raws.after\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawIndent(root) {\n    if (root.raws.indent) return root.raws.indent\n    let value\n    root.walk(i => {\n      let p = i.parent\n      if (p && p !== root && p.parent && p.parent === root) {\n        if (typeof i.raws.before !== 'undefined') {\n          let parts = i.raws.before.split('\\n')\n          value = parts[parts.length - 1]\n          value = value.replace(/\\S/g, '')\n          return false\n        }\n      }\n    })\n    return value\n  }\n\n  rawSemicolon(root) {\n    let value\n    root.walk(i => {\n      if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n        value = i.raws.semicolon\n        if (typeof value !== 'undefined') return false\n      }\n    })\n    return value\n  }\n\n  rawValue(node, prop) {\n    let value = node[prop]\n    let raw = node.raws[prop]\n    if (raw && raw.value === value) {\n      return raw.raw\n    }\n\n    return value\n  }\n\n  root(node) {\n    this.body(node)\n    if (node.raws.after) this.builder(node.raws.after)\n  }\n\n  rule(node) {\n    this.block(node, this.rawValue(node, 'selector'))\n    if (node.raws.ownSemicolon) {\n      this.builder(node.raws.ownSemicolon, node, 'end')\n    }\n  }\n\n  stringify(node, semicolon) {\n    /* c8 ignore start */\n    if (!this[node.type]) {\n      throw new Error(\n        'Unknown AST node type ' +\n          node.type +\n          '. ' +\n          'Maybe you need to change PostCSS stringifier.'\n      )\n    }\n    /* c8 ignore stop */\n    this[node.type](node, semicolon)\n  }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n", "'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n  let str = new Stringifier(builder)\n  str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n", "'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\n\nfunction cloneNode(obj, parent) {\n  let cloned = new obj.constructor()\n\n  for (let i in obj) {\n    if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n      /* c8 ignore next 2 */\n      continue\n    }\n    if (i === 'proxyCache') continue\n    let value = obj[i]\n    let type = typeof value\n\n    if (i === 'parent' && type === 'object') {\n      if (parent) cloned[i] = parent\n    } else if (i === 'source') {\n      cloned[i] = value\n    } else if (Array.isArray(value)) {\n      cloned[i] = value.map(j => cloneNode(j, cloned))\n    } else {\n      if (type === 'object' && value !== null) value = cloneNode(value)\n      cloned[i] = value\n    }\n  }\n\n  return cloned\n}\n\nclass Node {\n  constructor(defaults = {}) {\n    this.raws = {}\n    this[isClean] = false\n    this[my] = true\n\n    for (let name in defaults) {\n      if (name === 'nodes') {\n        this.nodes = []\n        for (let node of defaults[name]) {\n          if (typeof node.clone === 'function') {\n            this.append(node.clone())\n          } else {\n            this.append(node)\n          }\n        }\n      } else {\n        this[name] = defaults[name]\n      }\n    }\n  }\n\n  addToError(error) {\n    error.postcssNode = this\n    if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n      let s = this.source\n      error.stack = error.stack.replace(\n        /\\n\\s{4}at /,\n        `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n      )\n    }\n    return error\n  }\n\n  after(add) {\n    this.parent.insertAfter(this, add)\n    return this\n  }\n\n  assign(overrides = {}) {\n    for (let name in overrides) {\n      this[name] = overrides[name]\n    }\n    return this\n  }\n\n  before(add) {\n    this.parent.insertBefore(this, add)\n    return this\n  }\n\n  cleanRaws(keepBetween) {\n    delete this.raws.before\n    delete this.raws.after\n    if (!keepBetween) delete this.raws.between\n  }\n\n  clone(overrides = {}) {\n    let cloned = cloneNode(this)\n    for (let name in overrides) {\n      cloned[name] = overrides[name]\n    }\n    return cloned\n  }\n\n  cloneAfter(overrides = {}) {\n    let cloned = this.clone(overrides)\n    this.parent.insertAfter(this, cloned)\n    return cloned\n  }\n\n  cloneBefore(overrides = {}) {\n    let cloned = this.clone(overrides)\n    this.parent.insertBefore(this, cloned)\n    return cloned\n  }\n\n  error(message, opts = {}) {\n    if (this.source) {\n      let { end, start } = this.rangeBy(opts)\n      return this.source.input.error(\n        message,\n        { column: start.column, line: start.line },\n        { column: end.column, line: end.line },\n        opts\n      )\n    }\n    return new CssSyntaxError(message)\n  }\n\n  getProxyProcessor() {\n    return {\n      get(node, prop) {\n        if (prop === 'proxyOf') {\n          return node\n        } else if (prop === 'root') {\n          return () => node.root().toProxy()\n        } else {\n          return node[prop]\n        }\n      },\n\n      set(node, prop, value) {\n        if (node[prop] === value) return true\n        node[prop] = value\n        if (\n          prop === 'prop' ||\n          prop === 'value' ||\n          prop === 'name' ||\n          prop === 'params' ||\n          prop === 'important' ||\n          /* c8 ignore next */\n          prop === 'text'\n        ) {\n          node.markDirty()\n        }\n        return true\n      }\n    }\n  }\n\n  markDirty() {\n    if (this[isClean]) {\n      this[isClean] = false\n      let next = this\n      while ((next = next.parent)) {\n        next[isClean] = false\n      }\n    }\n  }\n\n  next() {\n    if (!this.parent) return undefined\n    let index = this.parent.index(this)\n    return this.parent.nodes[index + 1]\n  }\n\n  positionBy(opts, stringRepresentation) {\n    let pos = this.source.start\n    if (opts.index) {\n      pos = this.positionInside(opts.index, stringRepresentation)\n    } else if (opts.word) {\n      stringRepresentation = this.toString()\n      let index = stringRepresentation.indexOf(opts.word)\n      if (index !== -1) pos = this.positionInside(index, stringRepresentation)\n    }\n    return pos\n  }\n\n  positionInside(index, stringRepresentation) {\n    let string = stringRepresentation || this.toString()\n    let column = this.source.start.column\n    let line = this.source.start.line\n\n    for (let i = 0; i < index; i++) {\n      if (string[i] === '\\n') {\n        column = 1\n        line += 1\n      } else {\n        column += 1\n      }\n    }\n\n    return { column, line }\n  }\n\n  prev() {\n    if (!this.parent) return undefined\n    let index = this.parent.index(this)\n    return this.parent.nodes[index - 1]\n  }\n\n  rangeBy(opts) {\n    let start = {\n      column: this.source.start.column,\n      line: this.source.start.line\n    }\n    let end = this.source.end\n      ? {\n        column: this.source.end.column + 1,\n        line: this.source.end.line\n      }\n      : {\n        column: start.column + 1,\n        line: start.line\n      }\n\n    if (opts.word) {\n      let stringRepresentation = this.toString()\n      let index = stringRepresentation.indexOf(opts.word)\n      if (index !== -1) {\n        start = this.positionInside(index, stringRepresentation)\n        end = this.positionInside(index + opts.word.length, stringRepresentation)\n      }\n    } else {\n      if (opts.start) {\n        start = {\n          column: opts.start.column,\n          line: opts.start.line\n        }\n      } else if (opts.index) {\n        start = this.positionInside(opts.index)\n      }\n\n      if (opts.end) {\n        end = {\n          column: opts.end.column,\n          line: opts.end.line\n        }\n      } else if (typeof opts.endIndex === 'number') {\n        end = this.positionInside(opts.endIndex)\n      } else if (opts.index) {\n        end = this.positionInside(opts.index + 1)\n      }\n    }\n\n    if (\n      end.line < start.line ||\n      (end.line === start.line && end.column <= start.column)\n    ) {\n      end = { column: start.column + 1, line: start.line }\n    }\n\n    return { end, start }\n  }\n\n  raw(prop, defaultType) {\n    let str = new Stringifier()\n    return str.raw(this, prop, defaultType)\n  }\n\n  remove() {\n    if (this.parent) {\n      this.parent.removeChild(this)\n    }\n    this.parent = undefined\n    return this\n  }\n\n  replaceWith(...nodes) {\n    if (this.parent) {\n      let bookmark = this\n      let foundSelf = false\n      for (let node of nodes) {\n        if (node === this) {\n          foundSelf = true\n        } else if (foundSelf) {\n          this.parent.insertAfter(bookmark, node)\n          bookmark = node\n        } else {\n          this.parent.insertBefore(bookmark, node)\n        }\n      }\n\n      if (!foundSelf) {\n        this.remove()\n      }\n    }\n\n    return this\n  }\n\n  root() {\n    let result = this\n    while (result.parent && result.parent.type !== 'document') {\n      result = result.parent\n    }\n    return result\n  }\n\n  toJSON(_, inputs) {\n    let fixed = {}\n    let emitInputs = inputs == null\n    inputs = inputs || new Map()\n    let inputsNextIndex = 0\n\n    for (let name in this) {\n      if (!Object.prototype.hasOwnProperty.call(this, name)) {\n        /* c8 ignore next 2 */\n        continue\n      }\n      if (name === 'parent' || name === 'proxyCache') continue\n      let value = this[name]\n\n      if (Array.isArray(value)) {\n        fixed[name] = value.map(i => {\n          if (typeof i === 'object' && i.toJSON) {\n            return i.toJSON(null, inputs)\n          } else {\n            return i\n          }\n        })\n      } else if (typeof value === 'object' && value.toJSON) {\n        fixed[name] = value.toJSON(null, inputs)\n      } else if (name === 'source') {\n        let inputId = inputs.get(value.input)\n        if (inputId == null) {\n          inputId = inputsNextIndex\n          inputs.set(value.input, inputsNextIndex)\n          inputsNextIndex++\n        }\n        fixed[name] = {\n          end: value.end,\n          inputId,\n          start: value.start\n        }\n      } else {\n        fixed[name] = value\n      }\n    }\n\n    if (emitInputs) {\n      fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n    }\n\n    return fixed\n  }\n\n  toProxy() {\n    if (!this.proxyCache) {\n      this.proxyCache = new Proxy(this, this.getProxyProcessor())\n    }\n    return this.proxyCache\n  }\n\n  toString(stringifier = stringify) {\n    if (stringifier.stringify) stringifier = stringifier.stringify\n    let result = ''\n    stringifier(this, i => {\n      result += i\n    })\n    return result\n  }\n\n  warn(result, text, opts) {\n    let data = { node: this }\n    for (let i in opts) data[i] = opts[i]\n    return result.warn(text, data)\n  }\n\n  get proxyOf() {\n    return this\n  }\n}\n\nmodule.exports = Node\nNode.default = Node\n", "'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n  constructor(defaults) {\n    if (\n      defaults &&\n      typeof defaults.value !== 'undefined' &&\n      typeof defaults.value !== 'string'\n    ) {\n      defaults = { ...defaults, value: String(defaults.value) }\n    }\n    super(defaults)\n    this.type = 'decl'\n  }\n\n  get variable() {\n    return this.prop.startsWith('--') || this.prop[0] === '$'\n  }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n", "const CHAR_UPPERCASE_A = 65; /* A */\nconst CHAR_LOWERCASE_A = 97; /* a */\nconst CHAR_UPPERCASE_Z = 90; /* Z */\nconst CHAR_LOWERCASE_Z = 122; /* z */\nconst CHAR_DOT = 46; /* . */\nconst CHAR_FORWARD_SLASH = 47; /* / */\nconst CHAR_BACKWARD_SLASH = 92; /* \\ */\nconst CHAR_COLON = 58; /* : */\nconst CHAR_QUESTION_MARK = 63; /* ? */\n\nconst _process = {\n  cwd: function () {\n    return \"/\";\n  },\n  env: {},\n};\n\nfunction valueType(value) {\n  const valueType = typeof value;\n  return valueType === \"object\" && value === null ? \"null\" : valueType;\n}\n\nfunction validateString(value, paramName) {\n  if (typeof value !== \"string\") {\n    throw new TypeError(\n      `[ERR_INVALID_ARG_TYPE]: The \"${paramName}\" argument must be of type string. Received ${valueType(value)}`,\n    );\n  }\n}\n\nfunction isPathSeparator(code) {\n  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n}\n\nfunction isPosixPathSeparator(code) {\n  return code === CHAR_FORWARD_SLASH;\n}\n\nfunction isWindowsDeviceRoot(code) {\n  return (\n    (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) || (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z)\n  );\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n  let res = \"\";\n  let lastSegmentLength = 0;\n  let lastSlash = -1;\n  let dots = 0;\n  let code = 0;\n  for (let i = 0; i <= path.length; ++i) {\n    if (i < path.length) code = path.charCodeAt(i);\n    else if (isPathSeparator(code)) break;\n    else code = CHAR_FORWARD_SLASH;\n\n    if (isPathSeparator(code)) {\n      if (lastSlash === i - 1 || dots === 1) {\n        // NOOP\n      } else if (dots === 2) {\n        if (\n          res.length < 2 ||\n          lastSegmentLength !== 2 ||\n          res.charCodeAt(res.length - 1) !== CHAR_DOT ||\n          res.charCodeAt(res.length - 2) !== CHAR_DOT\n        ) {\n          if (res.length > 2) {\n            const lastSlashIndex = res.lastIndexOf(separator);\n            if (lastSlashIndex === -1) {\n              res = \"\";\n              lastSegmentLength = 0;\n            } else {\n              res = res.slice(0, lastSlashIndex);\n              lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n            }\n            lastSlash = i;\n            dots = 0;\n            continue;\n          } else if (res.length !== 0) {\n            res = \"\";\n            lastSegmentLength = 0;\n            lastSlash = i;\n            dots = 0;\n            continue;\n          }\n        }\n        if (allowAboveRoot) {\n          res += res.length > 0 ? `${separator}..` : \"..\";\n          lastSegmentLength = 2;\n        }\n      } else {\n        if (res.length > 0) res += `${separator}${path.slice(lastSlash + 1, i)}`;\n        else res = path.slice(lastSlash + 1, i);\n        lastSegmentLength = i - lastSlash - 1;\n      }\n      lastSlash = i;\n      dots = 0;\n    } else if (code === CHAR_DOT && dots !== -1) {\n      ++dots;\n    } else {\n      dots = -1;\n    }\n  }\n  return res;\n}\n\nfunction _format(sep, pathObject) {\n  if (pathObject === null || typeof pathObject !== \"object\") {\n    throw new TypeError(\n      `[ERR_INVALID_ARG_TYPE]: The \"pathObject\" argument must be of type object. Received ${valueType(pathObject)}`,\n    );\n  }\n  const dir = pathObject.dir || pathObject.root;\n  const base = pathObject.base || `${pathObject.name || \"\"}${pathObject.ext || \"\"}`;\n  if (!dir) {\n    return base;\n  }\n  return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep}${base}`;\n}\n\nconst win32 = {\n  // path.resolve([from ...], to)\n  resolve(...args) {\n    let resolvedDevice = \"\";\n    let resolvedTail = \"\";\n    let resolvedAbsolute = false;\n\n    for (let i = args.length - 1; i >= -1; i--) {\n      let path;\n      if (i >= 0) {\n        path = args[i];\n        validateString(path, \"path\");\n\n        // Skip empty entries\n        if (path.length === 0) {\n          continue;\n        }\n      } else if (resolvedDevice.length === 0) {\n        path = _process.cwd();\n      } else {\n        // Windows has the concept of drive-specific current working\n        // directories. If we've resolved a drive letter but not yet an\n        // absolute path, get cwd for that drive, or the process cwd if\n        // the drive cwd is not available. We're sure the device is not\n        // a UNC path at this points, because UNC paths are always absolute.\n        path = _process.env[`=${resolvedDevice}`] || _process.cwd();\n\n        // Verify that a cwd was found and that it actually points\n        // to our drive. If not, default to the drive's root.\n        if (\n          path === undefined ||\n          (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&\n            path.charCodeAt(2) === CHAR_BACKWARD_SLASH)\n        ) {\n          path = `${resolvedDevice}\\\\`;\n        }\n      }\n\n      const len = path.length;\n      let rootEnd = 0;\n      let device = \"\";\n      let isAbsolute = false;\n      const code = path.charCodeAt(0);\n\n      // Try to match a root\n      if (len === 1) {\n        if (isPathSeparator(code)) {\n          // `path` contains just a path separator\n          rootEnd = 1;\n          isAbsolute = true;\n        }\n      } else if (isPathSeparator(code)) {\n        // Possible UNC root\n\n        // If we started with a separator, we know we at least have an\n        // absolute path of some kind (UNC or otherwise)\n        isAbsolute = true;\n\n        if (isPathSeparator(path.charCodeAt(1))) {\n          // Matched double path separator at beginning\n          let j = 2;\n          let last = j;\n          // Match 1 or more non-path separators\n          while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n            j++;\n          }\n          if (j < len && j !== last) {\n            const firstPart = path.slice(last, j);\n            // Matched!\n            last = j;\n            // Match 1 or more path separators\n            while (j < len && isPathSeparator(path.charCodeAt(j))) {\n              j++;\n            }\n            if (j < len && j !== last) {\n              // Matched!\n              last = j;\n              // Match 1 or more non-path separators\n              while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n                j++;\n              }\n              if (j === len || j !== last) {\n                // We matched a UNC root\n                device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n                rootEnd = j;\n              }\n            }\n          }\n        } else {\n          rootEnd = 1;\n        }\n      } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n        // Possible device root\n        device = path.slice(0, 2);\n        rootEnd = 2;\n        if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n          // Treat separator following drive name as an absolute path\n          // indicator\n          isAbsolute = true;\n          rootEnd = 3;\n        }\n      }\n\n      if (device.length > 0) {\n        if (resolvedDevice.length > 0) {\n          if (device.toLowerCase() !== resolvedDevice.toLowerCase())\n            // This path points to another device so it is not applicable\n            continue;\n        } else {\n          resolvedDevice = device;\n        }\n      }\n\n      if (resolvedAbsolute) {\n        if (resolvedDevice.length > 0) break;\n      } else {\n        resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\n        resolvedAbsolute = isAbsolute;\n        if (isAbsolute && resolvedDevice.length > 0) {\n          break;\n        }\n      }\n    }\n\n    // At this point the path should be resolved to a full absolute path,\n    // but handle relative paths to be safe (might happen when process.cwd()\n    // fails)\n\n    // Normalize the tail path\n    resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, \"\\\\\", isPathSeparator);\n\n    return resolvedAbsolute ? `${resolvedDevice}\\\\${resolvedTail}` : `${resolvedDevice}${resolvedTail}` || \".\";\n  },\n\n  normalize(path) {\n    validateString(path, \"path\");\n    const len = path.length;\n    if (len === 0) return \".\";\n    let rootEnd = 0;\n    let device;\n    let isAbsolute = false;\n    const code = path.charCodeAt(0);\n\n    // Try to match a root\n    if (len === 1) {\n      // `path` contains just a single char, exit early to avoid\n      // unnecessary work\n      return isPosixPathSeparator(code) ? \"\\\\\" : path;\n    }\n    if (isPathSeparator(code)) {\n      // Possible UNC root\n\n      // If we started with a separator, we know we at least have an absolute\n      // path of some kind (UNC or otherwise)\n      isAbsolute = true;\n\n      if (isPathSeparator(path.charCodeAt(1))) {\n        // Matched double path separator at beginning\n        let j = 2;\n        let last = j;\n        // Match 1 or more non-path separators\n        while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n          j++;\n        }\n        if (j < len && j !== last) {\n          const firstPart = path.slice(last, j);\n          // Matched!\n          last = j;\n          // Match 1 or more path separators\n          while (j < len && isPathSeparator(path.charCodeAt(j))) {\n            j++;\n          }\n          if (j < len && j !== last) {\n            // Matched!\n            last = j;\n            // Match 1 or more non-path separators\n            while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n              j++;\n            }\n            if (j === len) {\n              // We matched a UNC root only\n              // Return the normalized version of the UNC root since there\n              // is nothing left to process\n              return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\n            }\n            if (j !== last) {\n              // We matched a UNC root with leftovers\n              device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n              rootEnd = j;\n            }\n          }\n        }\n      } else {\n        rootEnd = 1;\n      }\n    } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n      // Possible device root\n      device = path.slice(0, 2);\n      rootEnd = 2;\n      if (len > 2 && isPathSeparator(path.charCodeAt(2))) {\n        // Treat separator following drive name as an absolute path\n        // indicator\n        isAbsolute = true;\n        rootEnd = 3;\n      }\n    }\n\n    let tail = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute, \"\\\\\", isPathSeparator) : \"\";\n    if (tail.length === 0 && !isAbsolute) tail = \".\";\n    if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) tail += \"\\\\\";\n    if (device === undefined) {\n      return isAbsolute ? `\\\\${tail}` : tail;\n    }\n    return isAbsolute ? `${device}\\\\${tail}` : `${device}${tail}`;\n  },\n\n  isAbsolute(path) {\n    validateString(path, \"path\");\n    const len = path.length;\n    if (len === 0) return false;\n\n    const code = path.charCodeAt(0);\n    return (\n      isPathSeparator(code) ||\n      // Possible device root\n      (len > 2 && isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON && isPathSeparator(path.charCodeAt(2)))\n    );\n  },\n\n  join(...args) {\n    if (args.length === 0) return \".\";\n\n    let joined;\n    let firstPart;\n    for (let i = 0; i < args.length; ++i) {\n      const arg = args[i];\n      validateString(arg, \"path\");\n      if (arg.length > 0) {\n        if (joined === undefined) joined = firstPart = arg;\n        else joined += `\\\\${arg}`;\n      }\n    }\n\n    if (joined === undefined) return \".\";\n\n    // Make sure that the joined path doesn't start with two slashes, because\n    // normalize() will mistake it for an UNC path then.\n    //\n    // This step is skipped when it is very clear that the user actually\n    // intended to point at an UNC path. This is assumed when the first\n    // non-empty string arguments starts with exactly two slashes followed by\n    // at least one more non-slash character.\n    //\n    // Note that for normalize() to treat a path as an UNC path it needs to\n    // have at least 2 components, so we don't filter for that here.\n    // This means that the user can use join to construct UNC paths from\n    // a server name and a share name; for example:\n    //   path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\')\n    let needsReplace = true;\n    let slashCount = 0;\n    if (isPathSeparator(firstPart.charCodeAt(0))) {\n      ++slashCount;\n      const firstLen = firstPart.length;\n      if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) {\n        ++slashCount;\n        if (firstLen > 2) {\n          if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount;\n          else {\n            // We matched a UNC path in the first part\n            needsReplace = false;\n          }\n        }\n      }\n    }\n    if (needsReplace) {\n      // Find any more consecutive slashes we need to replace\n      while (slashCount < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) {\n        slashCount++;\n      }\n\n      // Replace the slashes if needed\n      if (slashCount >= 2) joined = `\\\\${joined.slice(slashCount)}`;\n    }\n\n    return win32.normalize(joined);\n  },\n\n  // It will solve the relative path from `from` to `to`, for instance:\n  //  from = 'C:\\\\orandea\\\\test\\\\aaa'\n  //  to = 'C:\\\\orandea\\\\impl\\\\bbb'\n  // The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\n  relative(from, to) {\n    validateString(from, \"from\");\n    validateString(to, \"to\");\n\n    if (from === to) return \"\";\n\n    const fromOrig = win32.resolve(from);\n    const toOrig = win32.resolve(to);\n\n    if (fromOrig === toOrig) return \"\";\n\n    from = fromOrig.toLowerCase();\n    to = toOrig.toLowerCase();\n\n    if (from === to) return \"\";\n\n    // Trim any leading backslashes\n    let fromStart = 0;\n    while (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) {\n      fromStart++;\n    }\n    // Trim trailing backslashes (applicable to UNC paths only)\n    let fromEnd = from.length;\n    while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) {\n      fromEnd--;\n    }\n    const fromLen = fromEnd - fromStart;\n\n    // Trim any leading backslashes\n    let toStart = 0;\n    while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) {\n      toStart++;\n    }\n    // Trim trailing backslashes (applicable to UNC paths only)\n    let toEnd = to.length;\n    while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) {\n      toEnd--;\n    }\n    const toLen = toEnd - toStart;\n\n    // Compare paths to find the longest common path from root\n    const length = fromLen < toLen ? fromLen : toLen;\n    let lastCommonSep = -1;\n    let i = 0;\n    for (; i < length; i++) {\n      const fromCode = from.charCodeAt(fromStart + i);\n      if (fromCode !== to.charCodeAt(toStart + i)) break;\n      else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i;\n    }\n\n    // We found a mismatch before the first common path separator was seen, so\n    // return the original `to`.\n    if (i !== length) {\n      if (lastCommonSep === -1) return toOrig;\n    } else {\n      if (toLen > length) {\n        if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\n          // We get here if `from` is the exact base path for `to`.\n          // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\n          return toOrig.slice(toStart + i + 1);\n        }\n        if (i === 2) {\n          // We get here if `from` is the device root.\n          // For example: from='C:\\\\'; to='C:\\\\foo'\n          return toOrig.slice(toStart + i);\n        }\n      }\n      if (fromLen > length) {\n        if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\n          // We get here if `to` is the exact base path for `from`.\n          // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\n          lastCommonSep = i;\n        } else if (i === 2) {\n          // We get here if `to` is the device root.\n          // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\n          lastCommonSep = 3;\n        }\n      }\n      if (lastCommonSep === -1) lastCommonSep = 0;\n    }\n\n    let out = \"\";\n    // Generate the relative path based on the path difference between `to` and\n    // `from`\n    for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n      if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\n        out += out.length === 0 ? \"..\" : \"\\\\..\";\n      }\n    }\n\n    toStart += lastCommonSep;\n\n    // Lastly, append the rest of the destination (`to`) path that comes after\n    // the common path parts\n    if (out.length > 0) return `${out}${toOrig.slice(toStart, toEnd)}`;\n\n    if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart;\n    return toOrig.slice(toStart, toEnd);\n  },\n\n  toNamespacedPath(path) {\n    // Note: this will *probably* throw somewhere.\n    if (typeof path !== \"string\") return path;\n\n    if (path.length === 0) {\n      return \"\";\n    }\n\n    const resolvedPath = win32.resolve(path);\n\n    if (resolvedPath.length <= 2) return path;\n\n    if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\n      // Possible UNC root\n      if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\n        const code = resolvedPath.charCodeAt(2);\n        if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\n          // Matched non-long UNC root, convert the path to a long UNC path\n          return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\n        }\n      }\n    } else if (\n      isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) &&\n      resolvedPath.charCodeAt(1) === CHAR_COLON &&\n      resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH\n    ) {\n      // Matched device root, convert the path to a long UNC path\n      return `\\\\\\\\?\\\\${resolvedPath}`;\n    }\n\n    return path;\n  },\n\n  dirname(path) {\n    validateString(path, \"path\");\n    const len = path.length;\n    if (len === 0) return \".\";\n    let rootEnd = -1;\n    let offset = 0;\n    const code = path.charCodeAt(0);\n\n    if (len === 1) {\n      // `path` contains just a path separator, exit early to avoid\n      // unnecessary work or a dot.\n      return isPathSeparator(code) ? path : \".\";\n    }\n\n    // Try to match a root\n    if (isPathSeparator(code)) {\n      // Possible UNC root\n\n      rootEnd = offset = 1;\n\n      if (isPathSeparator(path.charCodeAt(1))) {\n        // Matched double path separator at beginning\n        let j = 2;\n        let last = j;\n        // Match 1 or more non-path separators\n        while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n          j++;\n        }\n        if (j < len && j !== last) {\n          // Matched!\n          last = j;\n          // Match 1 or more path separators\n          while (j < len && isPathSeparator(path.charCodeAt(j))) {\n            j++;\n          }\n          if (j < len && j !== last) {\n            // Matched!\n            last = j;\n            // Match 1 or more non-path separators\n            while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n              j++;\n            }\n            if (j === len) {\n              // We matched a UNC root only\n              return path;\n            }\n            if (j !== last) {\n              // We matched a UNC root with leftovers\n\n              // Offset by 1 to include the separator after the UNC root to\n              // treat it as a \"normal root\" on top of a (UNC) root\n              rootEnd = offset = j + 1;\n            }\n          }\n        }\n      }\n      // Possible device root\n    } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n      rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2;\n      offset = rootEnd;\n    }\n\n    let end = -1;\n    let matchedSlash = true;\n    for (let i = len - 1; i >= offset; --i) {\n      if (isPathSeparator(path.charCodeAt(i))) {\n        if (!matchedSlash) {\n          end = i;\n          break;\n        }\n      } else {\n        // We saw the first non-path separator\n        matchedSlash = false;\n      }\n    }\n\n    if (end === -1) {\n      if (rootEnd === -1) return \".\";\n\n      end = rootEnd;\n    }\n    return path.slice(0, end);\n  },\n\n  basename(path, ext) {\n    if (ext !== undefined) validateString(ext, \"ext\");\n    validateString(path, \"path\");\n    let start = 0;\n    let end = -1;\n    let matchedSlash = true;\n\n    // Check for a drive letter prefix so as not to mistake the following\n    // path separator as an extra separator at the end of the path that can be\n    // disregarded\n    if (path.length >= 2 && isWindowsDeviceRoot(path.charCodeAt(0)) && path.charCodeAt(1) === CHAR_COLON) {\n      start = 2;\n    }\n\n    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n      if (ext === path) return \"\";\n      let extIdx = ext.length - 1;\n      let firstNonSlashEnd = -1;\n      for (let i = path.length - 1; i >= start; --i) {\n        const code = path.charCodeAt(i);\n        if (isPathSeparator(code)) {\n          // If we reached a path separator that was not part of a set of path\n          // separators at the end of the string, stop now\n          if (!matchedSlash) {\n            start = i + 1;\n            break;\n          }\n        } else {\n          if (firstNonSlashEnd === -1) {\n            // We saw the first non-path separator, remember this index in case\n            // we need it if the extension ends up not matching\n            matchedSlash = false;\n            firstNonSlashEnd = i + 1;\n          }\n          if (extIdx >= 0) {\n            // Try to match the explicit extension\n            if (code === ext.charCodeAt(extIdx)) {\n              if (--extIdx === -1) {\n                // We matched the extension, so mark this as the end of our path\n                // component\n                end = i;\n              }\n            } else {\n              // Extension does not match, so our result is the entire path\n              // component\n              extIdx = -1;\n              end = firstNonSlashEnd;\n            }\n          }\n        }\n      }\n\n      if (start === end) end = firstNonSlashEnd;\n      else if (end === -1) end = path.length;\n      return path.slice(start, end);\n    }\n    for (let i = path.length - 1; i >= start; --i) {\n      if (isPathSeparator(path.charCodeAt(i))) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          start = i + 1;\n          break;\n        }\n      } else if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // path component\n        matchedSlash = false;\n        end = i + 1;\n      }\n    }\n\n    if (end === -1) return \"\";\n    return path.slice(start, end);\n  },\n\n  extname(path) {\n    validateString(path, \"path\");\n    let start = 0;\n    let startDot = -1;\n    let startPart = 0;\n    let end = -1;\n    let matchedSlash = true;\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    let preDotState = 0;\n\n    // Check for a drive letter prefix so as not to mistake the following\n    // path separator as an extra separator at the end of the path that can be\n    // disregarded\n\n    if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {\n      start = startPart = 2;\n    }\n\n    for (let i = path.length - 1; i >= start; --i) {\n      const code = path.charCodeAt(i);\n      if (isPathSeparator(code)) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === CHAR_DOT) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1) startDot = i;\n        else if (preDotState !== 1) preDotState = 1;\n      } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (\n      startDot === -1 ||\n      end === -1 ||\n      // We saw a non-dot character immediately before the dot\n      preDotState === 0 ||\n      // The (right-most) trimmed path component is exactly '..'\n      (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n    ) {\n      return \"\";\n    }\n    return path.slice(startDot, end);\n  },\n\n  format: _format.bind(null, \"\\\\\"),\n\n  parse(path) {\n    validateString(path, \"path\");\n\n    const ret = { root: \"\", dir: \"\", base: \"\", ext: \"\", name: \"\" };\n    if (path.length === 0) return ret;\n\n    const len = path.length;\n    let rootEnd = 0;\n    let code = path.charCodeAt(0);\n\n    if (len === 1) {\n      if (isPathSeparator(code)) {\n        // `path` contains just a path separator, exit early to avoid\n        // unnecessary work\n        ret.root = ret.dir = path;\n        return ret;\n      }\n      ret.base = ret.name = path;\n      return ret;\n    }\n    // Try to match a root\n    if (isPathSeparator(code)) {\n      // Possible UNC root\n\n      rootEnd = 1;\n      if (isPathSeparator(path.charCodeAt(1))) {\n        // Matched double path separator at beginning\n        let j = 2;\n        let last = j;\n        // Match 1 or more non-path separators\n        while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n          j++;\n        }\n        if (j < len && j !== last) {\n          // Matched!\n          last = j;\n          // Match 1 or more path separators\n          while (j < len && isPathSeparator(path.charCodeAt(j))) {\n            j++;\n          }\n          if (j < len && j !== last) {\n            // Matched!\n            last = j;\n            // Match 1 or more non-path separators\n            while (j < len && !isPathSeparator(path.charCodeAt(j))) {\n              j++;\n            }\n            if (j === len) {\n              // We matched a UNC root only\n              rootEnd = j;\n            } else if (j !== last) {\n              // We matched a UNC root with leftovers\n              rootEnd = j + 1;\n            }\n          }\n        }\n      }\n    } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {\n      // Possible device root\n      if (len <= 2) {\n        // `path` contains just a drive root, exit early to avoid\n        // unnecessary work\n        ret.root = ret.dir = path;\n        return ret;\n      }\n      rootEnd = 2;\n      if (isPathSeparator(path.charCodeAt(2))) {\n        if (len === 3) {\n          // `path` contains just a drive root, exit early to avoid\n          // unnecessary work\n          ret.root = ret.dir = path;\n          return ret;\n        }\n        rootEnd = 3;\n      }\n    }\n    if (rootEnd > 0) ret.root = path.slice(0, rootEnd);\n\n    let startDot = -1;\n    let startPart = rootEnd;\n    let end = -1;\n    let matchedSlash = true;\n    let i = path.length - 1;\n\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    let preDotState = 0;\n\n    // Get non-dir info\n    for (; i >= rootEnd; --i) {\n      code = path.charCodeAt(i);\n      if (isPathSeparator(code)) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === CHAR_DOT) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1) startDot = i;\n        else if (preDotState !== 1) preDotState = 1;\n      } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (end !== -1) {\n      if (\n        startDot === -1 ||\n        // We saw a non-dot character immediately before the dot\n        preDotState === 0 ||\n        // The (right-most) trimmed path component is exactly '..'\n        (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n      ) {\n        ret.base = ret.name = path.slice(startPart, end);\n      } else {\n        ret.name = path.slice(startPart, startDot);\n        ret.base = path.slice(startPart, end);\n        ret.ext = path.slice(startDot, end);\n      }\n    }\n\n    // If the directory is the root, use the entire root as the `dir` including\n    // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\n    // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\n    if (startPart > 0 && startPart !== rootEnd) ret.dir = path.slice(0, startPart - 1);\n    else ret.dir = ret.root;\n\n    return ret;\n  },\n\n  sep: \"\\\\\",\n  delimiter: \";\",\n  win32: null,\n  posix: null,\n};\n\nconst posix = {\n  // path.resolve([from ...], to)\n  resolve(...args) {\n    let resolvedPath = \"\";\n    let resolvedAbsolute = false;\n\n    for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n      const path = i >= 0 ? args[i] : _process.cwd();\n\n      validateString(path, \"path\");\n\n      // Skip empty entries\n      if (path.length === 0) {\n        continue;\n      }\n\n      resolvedPath = `${path}/${resolvedPath}`;\n      resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n    }\n\n    // At this point the path should be resolved to a full absolute path, but\n    // handle relative paths to be safe (might happen when process.cwd() fails)\n\n    // Normalize the path\n    resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, \"/\", isPosixPathSeparator);\n\n    if (resolvedAbsolute) {\n      return `/${resolvedPath}`;\n    }\n    return resolvedPath.length > 0 ? resolvedPath : \".\";\n  },\n\n  normalize(path) {\n    validateString(path, \"path\");\n\n    if (path.length === 0) return \".\";\n\n    const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n    const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH;\n\n    // Normalize the path\n    path = normalizeString(path, !isAbsolute, \"/\", isPosixPathSeparator);\n\n    if (path.length === 0) {\n      if (isAbsolute) return \"/\";\n      return trailingSeparator ? \"./\" : \".\";\n    }\n    if (trailingSeparator) path += \"/\";\n\n    return isAbsolute ? `/${path}` : path;\n  },\n\n  isAbsolute(path) {\n    validateString(path, \"path\");\n    return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n  },\n\n  join(...args) {\n    if (args.length === 0) return \".\";\n    let joined;\n    for (let i = 0; i < args.length; ++i) {\n      const arg = args[i];\n      validateString(arg, \"path\");\n      if (arg.length > 0) {\n        if (joined === undefined) joined = arg;\n        else joined += `/${arg}`;\n      }\n    }\n    if (joined === undefined) return \".\";\n    return posix.normalize(joined);\n  },\n\n  relative(from, to) {\n    validateString(from, \"from\");\n    validateString(to, \"to\");\n\n    if (from === to) return \"\";\n\n    // Trim leading forward slashes.\n    from = posix.resolve(from);\n    to = posix.resolve(to);\n\n    if (from === to) return \"\";\n\n    const fromStart = 1;\n    const fromEnd = from.length;\n    const fromLen = fromEnd - fromStart;\n    const toStart = 1;\n    const toLen = to.length - toStart;\n\n    // Compare paths to find the longest common path from root\n    const length = fromLen < toLen ? fromLen : toLen;\n    let lastCommonSep = -1;\n    let i = 0;\n    for (; i < length; i++) {\n      const fromCode = from.charCodeAt(fromStart + i);\n      if (fromCode !== to.charCodeAt(toStart + i)) break;\n      else if (fromCode === CHAR_FORWARD_SLASH) lastCommonSep = i;\n    }\n    if (i === length) {\n      if (toLen > length) {\n        if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) {\n          // We get here if `from` is the exact base path for `to`.\n          // For example: from='/foo/bar'; to='/foo/bar/baz'\n          return to.slice(toStart + i + 1);\n        }\n        if (i === 0) {\n          // We get here if `from` is the root\n          // For example: from='/'; to='/foo'\n          return to.slice(toStart + i);\n        }\n      } else if (fromLen > length) {\n        if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) {\n          // We get here if `to` is the exact base path for `from`.\n          // For example: from='/foo/bar/baz'; to='/foo/bar'\n          lastCommonSep = i;\n        } else if (i === 0) {\n          // We get here if `to` is the root.\n          // For example: from='/foo/bar'; to='/'\n          lastCommonSep = 0;\n        }\n      }\n    }\n\n    let out = \"\";\n    // Generate the relative path based on the path difference between `to`\n    // and `from`.\n    for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n      if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n        out += out.length === 0 ? \"..\" : \"/..\";\n      }\n    }\n\n    // Lastly, append the rest of the destination (`to`) path that comes after\n    // the common path parts.\n    return `${out}${to.slice(toStart + lastCommonSep)}`;\n  },\n\n  toNamespacedPath(path) {\n    // Non-op on posix systems\n    return path;\n  },\n\n  dirname(path) {\n    validateString(path, \"path\");\n    if (path.length === 0) return \".\";\n    const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n    let end = -1;\n    let matchedSlash = true;\n    for (let i = path.length - 1; i >= 1; --i) {\n      if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n        if (!matchedSlash) {\n          end = i;\n          break;\n        }\n      } else {\n        // We saw the first non-path separator\n        matchedSlash = false;\n      }\n    }\n\n    if (end === -1) return hasRoot ? \"/\" : \".\";\n    if (hasRoot && end === 1) return \"//\";\n    return path.slice(0, end);\n  },\n\n  basename(path, ext) {\n    if (ext !== undefined) validateString(ext, \"ext\");\n    validateString(path, \"path\");\n\n    let start = 0;\n    let end = -1;\n    let matchedSlash = true;\n\n    if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n      if (ext === path) return \"\";\n      let extIdx = ext.length - 1;\n      let firstNonSlashEnd = -1;\n      for (let i = path.length - 1; i >= 0; --i) {\n        const code = path.charCodeAt(i);\n        if (code === CHAR_FORWARD_SLASH) {\n          // If we reached a path separator that was not part of a set of path\n          // separators at the end of the string, stop now\n          if (!matchedSlash) {\n            start = i + 1;\n            break;\n          }\n        } else {\n          if (firstNonSlashEnd === -1) {\n            // We saw the first non-path separator, remember this index in case\n            // we need it if the extension ends up not matching\n            matchedSlash = false;\n            firstNonSlashEnd = i + 1;\n          }\n          if (extIdx >= 0) {\n            // Try to match the explicit extension\n            if (code === ext.charCodeAt(extIdx)) {\n              if (--extIdx === -1) {\n                // We matched the extension, so mark this as the end of our path\n                // component\n                end = i;\n              }\n            } else {\n              // Extension does not match, so our result is the entire path\n              // component\n              extIdx = -1;\n              end = firstNonSlashEnd;\n            }\n          }\n        }\n      }\n\n      if (start === end) end = firstNonSlashEnd;\n      else if (end === -1) end = path.length;\n      return path.slice(start, end);\n    }\n    for (let i = path.length - 1; i >= 0; --i) {\n      if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          start = i + 1;\n          break;\n        }\n      } else if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // path component\n        matchedSlash = false;\n        end = i + 1;\n      }\n    }\n\n    if (end === -1) return \"\";\n    return path.slice(start, end);\n  },\n\n  extname(path) {\n    validateString(path, \"path\");\n    let startDot = -1;\n    let startPart = 0;\n    let end = -1;\n    let matchedSlash = true;\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    let preDotState = 0;\n    for (let i = path.length - 1; i >= 0; --i) {\n      const code = path.charCodeAt(i);\n      if (code === CHAR_FORWARD_SLASH) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === CHAR_DOT) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1) startDot = i;\n        else if (preDotState !== 1) preDotState = 1;\n      } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (\n      startDot === -1 ||\n      end === -1 ||\n      // We saw a non-dot character immediately before the dot\n      preDotState === 0 ||\n      // The (right-most) trimmed path component is exactly '..'\n      (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n    ) {\n      return \"\";\n    }\n    return path.slice(startDot, end);\n  },\n\n  format: _format.bind(null, \"/\"),\n\n  parse(path) {\n    validateString(path, \"path\");\n\n    const ret = { root: \"\", dir: \"\", base: \"\", ext: \"\", name: \"\" };\n    if (path.length === 0) return ret;\n    const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;\n    let start;\n    if (isAbsolute) {\n      ret.root = \"/\";\n      start = 1;\n    } else {\n      start = 0;\n    }\n    let startDot = -1;\n    let startPart = 0;\n    let end = -1;\n    let matchedSlash = true;\n    let i = path.length - 1;\n\n    // Track the state of characters (if any) we see before our first dot and\n    // after any path separator we find\n    let preDotState = 0;\n\n    // Get non-dir info\n    for (; i >= start; --i) {\n      const code = path.charCodeAt(i);\n      if (code === CHAR_FORWARD_SLASH) {\n        // If we reached a path separator that was not part of a set of path\n        // separators at the end of the string, stop now\n        if (!matchedSlash) {\n          startPart = i + 1;\n          break;\n        }\n        continue;\n      }\n      if (end === -1) {\n        // We saw the first non-path separator, mark this as the end of our\n        // extension\n        matchedSlash = false;\n        end = i + 1;\n      }\n      if (code === CHAR_DOT) {\n        // If this is our first dot, mark it as the start of our extension\n        if (startDot === -1) startDot = i;\n        else if (preDotState !== 1) preDotState = 1;\n      } else if (startDot !== -1) {\n        // We saw a non-dot and non-path separator before our dot, so we should\n        // have a good chance at having a non-empty extension\n        preDotState = -1;\n      }\n    }\n\n    if (end !== -1) {\n      const start = startPart === 0 && isAbsolute ? 1 : startPart;\n      if (\n        startDot === -1 ||\n        // We saw a non-dot character immediately before the dot\n        preDotState === 0 ||\n        // The (right-most) trimmed path component is exactly '..'\n        (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n      ) {\n        ret.base = ret.name = path.slice(start, end);\n      } else {\n        ret.name = path.slice(start, startDot);\n        ret.base = path.slice(start, end);\n        ret.ext = path.slice(startDot, end);\n      }\n    }\n\n    if (startPart > 0) ret.dir = path.slice(0, startPart - 1);\n    else if (isAbsolute) ret.dir = \"/\";\n\n    return ret;\n  },\n\n  sep: \"/\",\n  delimiter: \":\",\n  win32: null,\n  posix: null,\n};\n\nposix.win32 = win32.win32 = win32;\nposix.posix = win32.posix = posix;\n\n// Legacy internal API, docs-only deprecated: DEP0080\nwin32._makeLong = win32.toNamespacedPath;\nposix._makeLong = posix.toNamespacedPath;\n\nmodule.exports = _process.platform === \"win32\" ? win32 : posix;\n", "let urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n  return (size = defaultSize) => {\n    let id = ''\n    let i = size\n    while (i--) {\n      id += alphabet[(Math.random() * alphabet.length) | 0]\n    }\n    return id\n  }\n}\nlet nanoid = (size = 21) => {\n  let id = ''\n  let i = size\n  while (i--) {\n    id += urlAlphabet[(Math.random() * 64) | 0]\n  }\n  return id\n}\nmodule.exports = { nanoid, customAlphabet }\n", "'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\n\nfunction fromBase64(str) {\n  if (Buffer) {\n    return Buffer.from(str, 'base64').toString()\n  } else {\n    /* c8 ignore next 2 */\n    return window.atob(str)\n  }\n}\n\nclass PreviousMap {\n  constructor(css, opts) {\n    if (opts.map === false) return\n    this.loadAnnotation(css)\n    this.inline = this.startWith(this.annotation, 'data:')\n\n    let prev = opts.map ? opts.map.prev : undefined\n    let text = this.loadMap(opts.from, prev)\n    if (!this.mapFile && opts.from) {\n      this.mapFile = opts.from\n    }\n    if (this.mapFile) this.root = dirname(this.mapFile)\n    if (text) this.text = text\n  }\n\n  consumer() {\n    if (!this.consumerCache) {\n      this.consumerCache = new SourceMapConsumer(this.text)\n    }\n    return this.consumerCache\n  }\n\n  decodeInline(text) {\n    let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n    let baseUri = /^data:application\\/json;base64,/\n    let charsetUri = /^data:application\\/json;charset=utf-?8,/\n    let uri = /^data:application\\/json,/\n\n    if (charsetUri.test(text) || uri.test(text)) {\n      return decodeURIComponent(text.substr(RegExp.lastMatch.length))\n    }\n\n    if (baseCharsetUri.test(text) || baseUri.test(text)) {\n      return fromBase64(text.substr(RegExp.lastMatch.length))\n    }\n\n    let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n    throw new Error('Unsupported source map encoding ' + encoding)\n  }\n\n  getAnnotationURL(sourceMapString) {\n    return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n  }\n\n  isMap(map) {\n    if (typeof map !== 'object') return false\n    return (\n      typeof map.mappings === 'string' ||\n      typeof map._mappings === 'string' ||\n      Array.isArray(map.sections)\n    )\n  }\n\n  loadAnnotation(css) {\n    let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm)\n    if (!comments) return\n\n    // sourceMappingURLs from comments, strings, etc.\n    let start = css.lastIndexOf(comments.pop())\n    let end = css.indexOf('*/', start)\n\n    if (start > -1 && end > -1) {\n      // Locate the last sourceMappingURL to avoid pickin\n      this.annotation = this.getAnnotationURL(css.substring(start, end))\n    }\n  }\n\n  loadFile(path) {\n    this.root = dirname(path)\n    if (existsSync(path)) {\n      this.mapFile = path\n      return readFileSync(path, 'utf-8').toString().trim()\n    }\n  }\n\n  loadMap(file, prev) {\n    if (prev === false) return false\n\n    if (prev) {\n      if (typeof prev === 'string') {\n        return prev\n      } else if (typeof prev === 'function') {\n        let prevPath = prev(file)\n        if (prevPath) {\n          let map = this.loadFile(prevPath)\n          if (!map) {\n            throw new Error(\n              'Unable to load previous source map: ' + prevPath.toString()\n            )\n          }\n          return map\n        }\n      } else if (prev instanceof SourceMapConsumer) {\n        return SourceMapGenerator.fromSourceMap(prev).toString()\n      } else if (prev instanceof SourceMapGenerator) {\n        return prev.toString()\n      } else if (this.isMap(prev)) {\n        return JSON.stringify(prev)\n      } else {\n        throw new Error(\n          'Unsupported previous source map format: ' + prev.toString()\n        )\n      }\n    } else if (this.inline) {\n      return this.decodeInline(this.annotation)\n    } else if (this.annotation) {\n      let map = this.annotation\n      if (file) map = join(dirname(file), map)\n      return this.loadFile(map)\n    }\n  }\n\n  startWith(string, start) {\n    if (!string) return false\n    return string.substr(0, start.length) === start\n  }\n\n  withContent() {\n    return !!(\n      this.consumer().sourcesContent &&\n      this.consumer().sourcesContent.length > 0\n    )\n  }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n", "'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\nlet { isAbsolute, resolve } = require('path')\nlet { nanoid } = require('nanoid/non-secure')\n\nlet terminalHighlight = require('./terminal-highlight')\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n  constructor(css, opts = {}) {\n    if (\n      css === null ||\n      typeof css === 'undefined' ||\n      (typeof css === 'object' && !css.toString)\n    ) {\n      throw new Error(`PostCSS received ${css} instead of CSS string`)\n    }\n\n    this.css = css.toString()\n\n    if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n      this.hasBOM = true\n      this.css = this.css.slice(1)\n    } else {\n      this.hasBOM = false\n    }\n\n    if (opts.from) {\n      if (\n        !pathAvailable ||\n        /^\\w+:\\/\\//.test(opts.from) ||\n        isAbsolute(opts.from)\n      ) {\n        this.file = opts.from\n      } else {\n        this.file = resolve(opts.from)\n      }\n    }\n\n    if (pathAvailable && sourceMapAvailable) {\n      let map = new PreviousMap(this.css, opts)\n      if (map.text) {\n        this.map = map\n        let file = map.consumer().file\n        if (!this.file && file) this.file = this.mapResolve(file)\n      }\n    }\n\n    if (!this.file) {\n      this.id = '<input css ' + nanoid(6) + '>'\n    }\n    if (this.map) this.map.file = this.from\n  }\n\n  error(message, line, column, opts = {}) {\n    let result, endLine, endColumn\n\n    if (line && typeof line === 'object') {\n      let start = line\n      let end = column\n      if (typeof start.offset === 'number') {\n        let pos = this.fromOffset(start.offset)\n        line = pos.line\n        column = pos.col\n      } else {\n        line = start.line\n        column = start.column\n      }\n      if (typeof end.offset === 'number') {\n        let pos = this.fromOffset(end.offset)\n        endLine = pos.line\n        endColumn = pos.col\n      } else {\n        endLine = end.line\n        endColumn = end.column\n      }\n    } else if (!column) {\n      let pos = this.fromOffset(line)\n      line = pos.line\n      column = pos.col\n    }\n\n    let origin = this.origin(line, column, endLine, endColumn)\n    if (origin) {\n      result = new CssSyntaxError(\n        message,\n        origin.endLine === undefined\n          ? origin.line\n          : { column: origin.column, line: origin.line },\n        origin.endLine === undefined\n          ? origin.column\n          : { column: origin.endColumn, line: origin.endLine },\n        origin.source,\n        origin.file,\n        opts.plugin\n      )\n    } else {\n      result = new CssSyntaxError(\n        message,\n        endLine === undefined ? line : { column, line },\n        endLine === undefined ? column : { column: endColumn, line: endLine },\n        this.css,\n        this.file,\n        opts.plugin\n      )\n    }\n\n    result.input = { column, endColumn, endLine, line, source: this.css }\n    if (this.file) {\n      if (pathToFileURL) {\n        result.input.url = pathToFileURL(this.file).toString()\n      }\n      result.input.file = this.file\n    }\n\n    return result\n  }\n\n  fromOffset(offset) {\n    let lastLine, lineToIndex\n    if (!this[fromOffsetCache]) {\n      let lines = this.css.split('\\n')\n      lineToIndex = new Array(lines.length)\n      let prevIndex = 0\n\n      for (let i = 0, l = lines.length; i < l; i++) {\n        lineToIndex[i] = prevIndex\n        prevIndex += lines[i].length + 1\n      }\n\n      this[fromOffsetCache] = lineToIndex\n    } else {\n      lineToIndex = this[fromOffsetCache]\n    }\n    lastLine = lineToIndex[lineToIndex.length - 1]\n\n    let min = 0\n    if (offset >= lastLine) {\n      min = lineToIndex.length - 1\n    } else {\n      let max = lineToIndex.length - 2\n      let mid\n      while (min < max) {\n        mid = min + ((max - min) >> 1)\n        if (offset < lineToIndex[mid]) {\n          max = mid - 1\n        } else if (offset >= lineToIndex[mid + 1]) {\n          min = mid + 1\n        } else {\n          min = mid\n          break\n        }\n      }\n    }\n    return {\n      col: offset - lineToIndex[min] + 1,\n      line: min + 1\n    }\n  }\n\n  mapResolve(file) {\n    if (/^\\w+:\\/\\//.test(file)) {\n      return file\n    }\n    return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n  }\n\n  origin(line, column, endLine, endColumn) {\n    if (!this.map) return false\n    let consumer = this.map.consumer()\n\n    let from = consumer.originalPositionFor({ column, line })\n    if (!from.source) return false\n\n    let to\n    if (typeof endLine === 'number') {\n      to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n    }\n\n    let fromUrl\n\n    if (isAbsolute(from.source)) {\n      fromUrl = pathToFileURL(from.source)\n    } else {\n      fromUrl = new URL(\n        from.source,\n        this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n      )\n    }\n\n    let result = {\n      column: from.column,\n      endColumn: to && to.column,\n      endLine: to && to.line,\n      line: from.line,\n      url: fromUrl.toString()\n    }\n\n    if (fromUrl.protocol === 'file:') {\n      if (fileURLToPath) {\n        result.file = fileURLToPath(fromUrl)\n      } else {\n        /* c8 ignore next 2 */\n        throw new Error(`file: protocol is not available in this PostCSS build`)\n      }\n    }\n\n    let source = consumer.sourceContentFor(from.source)\n    if (source) result.source = source\n\n    return result\n  }\n\n  toJSON() {\n    let json = {}\n    for (let name of ['hasBOM', 'css', 'file', 'id']) {\n      if (this[name] != null) {\n        json[name] = this[name]\n      }\n    }\n    if (this.map) {\n      json.map = { ...this.map }\n      if (json.map.consumerCache) {\n        json.map.consumerCache = undefined\n      }\n    }\n    return json\n  }\n\n  get from() {\n    return this.file || this.id\n  }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n  terminalHighlight.registerInput(Input)\n}\n", "'use strict'\n\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { dirname, relative, resolve, sep } = require('path')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n  constructor(stringify, root, opts, cssString) {\n    this.stringify = stringify\n    this.mapOpts = opts.map || {}\n    this.root = root\n    this.opts = opts\n    this.css = cssString\n    this.originalCSS = cssString\n    this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n    this.memoizedFileURLs = new Map()\n    this.memoizedPaths = new Map()\n    this.memoizedURLs = new Map()\n  }\n\n  addAnnotation() {\n    let content\n\n    if (this.isInline()) {\n      content =\n        'data:application/json;base64,' + this.toBase64(this.map.toString())\n    } else if (typeof this.mapOpts.annotation === 'string') {\n      content = this.mapOpts.annotation\n    } else if (typeof this.mapOpts.annotation === 'function') {\n      content = this.mapOpts.annotation(this.opts.to, this.root)\n    } else {\n      content = this.outputFile() + '.map'\n    }\n    let eol = '\\n'\n    if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n    this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n  }\n\n  applyPrevMaps() {\n    for (let prev of this.previous()) {\n      let from = this.toUrl(this.path(prev.file))\n      let root = prev.root || dirname(prev.file)\n      let map\n\n      if (this.mapOpts.sourcesContent === false) {\n        map = new SourceMapConsumer(prev.text)\n        if (map.sourcesContent) {\n          map.sourcesContent = null\n        }\n      } else {\n        map = prev.consumer()\n      }\n\n      this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n    }\n  }\n\n  clearAnnotation() {\n    if (this.mapOpts.annotation === false) return\n\n    if (this.root) {\n      let node\n      for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n        node = this.root.nodes[i]\n        if (node.type !== 'comment') continue\n        if (node.text.indexOf('# sourceMappingURL=') === 0) {\n          this.root.removeChild(i)\n        }\n      }\n    } else if (this.css) {\n      this.css = this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n    }\n  }\n\n  generate() {\n    this.clearAnnotation()\n    if (pathAvailable && sourceMapAvailable && this.isMap()) {\n      return this.generateMap()\n    } else {\n      let result = ''\n      this.stringify(this.root, i => {\n        result += i\n      })\n      return [result]\n    }\n  }\n\n  generateMap() {\n    if (this.root) {\n      this.generateString()\n    } else if (this.previous().length === 1) {\n      let prev = this.previous()[0].consumer()\n      prev.file = this.outputFile()\n      this.map = SourceMapGenerator.fromSourceMap(prev, {\n        ignoreInvalidMapping: true\n      })\n    } else {\n      this.map = new SourceMapGenerator({\n        file: this.outputFile(),\n        ignoreInvalidMapping: true\n      })\n      this.map.addMapping({\n        generated: { column: 0, line: 1 },\n        original: { column: 0, line: 1 },\n        source: this.opts.from\n          ? this.toUrl(this.path(this.opts.from))\n          : '<no source>'\n      })\n    }\n\n    if (this.isSourcesContent()) this.setSourcesContent()\n    if (this.root && this.previous().length > 0) this.applyPrevMaps()\n    if (this.isAnnotation()) this.addAnnotation()\n\n    if (this.isInline()) {\n      return [this.css]\n    } else {\n      return [this.css, this.map]\n    }\n  }\n\n  generateString() {\n    this.css = ''\n    this.map = new SourceMapGenerator({\n      file: this.outputFile(),\n      ignoreInvalidMapping: true\n    })\n\n    let line = 1\n    let column = 1\n\n    let noSource = '<no source>'\n    let mapping = {\n      generated: { column: 0, line: 0 },\n      original: { column: 0, line: 0 },\n      source: ''\n    }\n\n    let lines, last\n    this.stringify(this.root, (str, node, type) => {\n      this.css += str\n\n      if (node && type !== 'end') {\n        mapping.generated.line = line\n        mapping.generated.column = column - 1\n        if (node.source && node.source.start) {\n          mapping.source = this.sourcePath(node)\n          mapping.original.line = node.source.start.line\n          mapping.original.column = node.source.start.column - 1\n          this.map.addMapping(mapping)\n        } else {\n          mapping.source = noSource\n          mapping.original.line = 1\n          mapping.original.column = 0\n          this.map.addMapping(mapping)\n        }\n      }\n\n      lines = str.match(/\\n/g)\n      if (lines) {\n        line += lines.length\n        last = str.lastIndexOf('\\n')\n        column = str.length - last\n      } else {\n        column += str.length\n      }\n\n      if (node && type !== 'start') {\n        let p = node.parent || { raws: {} }\n        let childless =\n          node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n        if (!childless || node !== p.last || p.raws.semicolon) {\n          if (node.source && node.source.end) {\n            mapping.source = this.sourcePath(node)\n            mapping.original.line = node.source.end.line\n            mapping.original.column = node.source.end.column - 1\n            mapping.generated.line = line\n            mapping.generated.column = column - 2\n            this.map.addMapping(mapping)\n          } else {\n            mapping.source = noSource\n            mapping.original.line = 1\n            mapping.original.column = 0\n            mapping.generated.line = line\n            mapping.generated.column = column - 1\n            this.map.addMapping(mapping)\n          }\n        }\n      }\n    })\n  }\n\n  isAnnotation() {\n    if (this.isInline()) {\n      return true\n    }\n    if (typeof this.mapOpts.annotation !== 'undefined') {\n      return this.mapOpts.annotation\n    }\n    if (this.previous().length) {\n      return this.previous().some(i => i.annotation)\n    }\n    return true\n  }\n\n  isInline() {\n    if (typeof this.mapOpts.inline !== 'undefined') {\n      return this.mapOpts.inline\n    }\n\n    let annotation = this.mapOpts.annotation\n    if (typeof annotation !== 'undefined' && annotation !== true) {\n      return false\n    }\n\n    if (this.previous().length) {\n      return this.previous().some(i => i.inline)\n    }\n    return true\n  }\n\n  isMap() {\n    if (typeof this.opts.map !== 'undefined') {\n      return !!this.opts.map\n    }\n    return this.previous().length > 0\n  }\n\n  isSourcesContent() {\n    if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n      return this.mapOpts.sourcesContent\n    }\n    if (this.previous().length) {\n      return this.previous().some(i => i.withContent())\n    }\n    return true\n  }\n\n  outputFile() {\n    if (this.opts.to) {\n      return this.path(this.opts.to)\n    } else if (this.opts.from) {\n      return this.path(this.opts.from)\n    } else {\n      return 'to.css'\n    }\n  }\n\n  path(file) {\n    if (this.mapOpts.absolute) return file\n    if (file.charCodeAt(0) === 60 /* `<` */) return file\n    if (/^\\w+:\\/\\//.test(file)) return file\n    let cached = this.memoizedPaths.get(file)\n    if (cached) return cached\n\n    let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n    if (typeof this.mapOpts.annotation === 'string') {\n      from = dirname(resolve(from, this.mapOpts.annotation))\n    }\n\n    let path = relative(from, file)\n    this.memoizedPaths.set(file, path)\n\n    return path\n  }\n\n  previous() {\n    if (!this.previousMaps) {\n      this.previousMaps = []\n      if (this.root) {\n        this.root.walk(node => {\n          if (node.source && node.source.input.map) {\n            let map = node.source.input.map\n            if (!this.previousMaps.includes(map)) {\n              this.previousMaps.push(map)\n            }\n          }\n        })\n      } else {\n        let input = new Input(this.originalCSS, this.opts)\n        if (input.map) this.previousMaps.push(input.map)\n      }\n    }\n\n    return this.previousMaps\n  }\n\n  setSourcesContent() {\n    let already = {}\n    if (this.root) {\n      this.root.walk(node => {\n        if (node.source) {\n          let from = node.source.input.from\n          if (from && !already[from]) {\n            already[from] = true\n            let fromUrl = this.usesFileUrls\n              ? this.toFileUrl(from)\n              : this.toUrl(this.path(from))\n            this.map.setSourceContent(fromUrl, node.source.input.css)\n          }\n        }\n      })\n    } else if (this.css) {\n      let from = this.opts.from\n        ? this.toUrl(this.path(this.opts.from))\n        : '<no source>'\n      this.map.setSourceContent(from, this.css)\n    }\n  }\n\n  sourcePath(node) {\n    if (this.mapOpts.from) {\n      return this.toUrl(this.mapOpts.from)\n    } else if (this.usesFileUrls) {\n      return this.toFileUrl(node.source.input.from)\n    } else {\n      return this.toUrl(this.path(node.source.input.from))\n    }\n  }\n\n  toBase64(str) {\n    if (Buffer) {\n      return Buffer.from(str).toString('base64')\n    } else {\n      return window.btoa(unescape(encodeURIComponent(str)))\n    }\n  }\n\n  toFileUrl(path) {\n    let cached = this.memoizedFileURLs.get(path)\n    if (cached) return cached\n\n    if (pathToFileURL) {\n      let fileURL = pathToFileURL(path).toString()\n      this.memoizedFileURLs.set(path, fileURL)\n\n      return fileURL\n    } else {\n      throw new Error(\n        '`map.absolute` option is not available in this PostCSS build'\n      )\n    }\n  }\n\n  toUrl(path) {\n    let cached = this.memoizedURLs.get(path)\n    if (cached) return cached\n\n    if (sep === '\\\\') {\n      path = path.replace(/\\\\/g, '/')\n    }\n\n    let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n    this.memoizedURLs.set(path, url)\n\n    return url\n  }\n}\n\nmodule.exports = MapGenerator\n", "'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'comment'\n  }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n", "'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet Declaration = require('./declaration')\nlet Comment = require('./comment')\nlet Node = require('./node')\n\nlet parse, Rule, AtRule, Root\n\nfunction cleanSource(nodes) {\n  return nodes.map(i => {\n    if (i.nodes) i.nodes = cleanSource(i.nodes)\n    delete i.source\n    return i\n  })\n}\n\nfunction markDirtyUp(node) {\n  node[isClean] = false\n  if (node.proxyOf.nodes) {\n    for (let i of node.proxyOf.nodes) {\n      markDirtyUp(i)\n    }\n  }\n}\n\nclass Container extends Node {\n  append(...children) {\n    for (let child of children) {\n      let nodes = this.normalize(child, this.last)\n      for (let node of nodes) this.proxyOf.nodes.push(node)\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  cleanRaws(keepBetween) {\n    super.cleanRaws(keepBetween)\n    if (this.nodes) {\n      for (let node of this.nodes) node.cleanRaws(keepBetween)\n    }\n  }\n\n  each(callback) {\n    if (!this.proxyOf.nodes) return undefined\n    let iterator = this.getIterator()\n\n    let index, result\n    while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n      index = this.indexes[iterator]\n      result = callback(this.proxyOf.nodes[index], index)\n      if (result === false) break\n\n      this.indexes[iterator] += 1\n    }\n\n    delete this.indexes[iterator]\n    return result\n  }\n\n  every(condition) {\n    return this.nodes.every(condition)\n  }\n\n  getIterator() {\n    if (!this.lastEach) this.lastEach = 0\n    if (!this.indexes) this.indexes = {}\n\n    this.lastEach += 1\n    let iterator = this.lastEach\n    this.indexes[iterator] = 0\n\n    return iterator\n  }\n\n  getProxyProcessor() {\n    return {\n      get(node, prop) {\n        if (prop === 'proxyOf') {\n          return node\n        } else if (!node[prop]) {\n          return node[prop]\n        } else if (\n          prop === 'each' ||\n          (typeof prop === 'string' && prop.startsWith('walk'))\n        ) {\n          return (...args) => {\n            return node[prop](\n              ...args.map(i => {\n                if (typeof i === 'function') {\n                  return (child, index) => i(child.toProxy(), index)\n                } else {\n                  return i\n                }\n              })\n            )\n          }\n        } else if (prop === 'every' || prop === 'some') {\n          return cb => {\n            return node[prop]((child, ...other) =>\n              cb(child.toProxy(), ...other)\n            )\n          }\n        } else if (prop === 'root') {\n          return () => node.root().toProxy()\n        } else if (prop === 'nodes') {\n          return node.nodes.map(i => i.toProxy())\n        } else if (prop === 'first' || prop === 'last') {\n          return node[prop].toProxy()\n        } else {\n          return node[prop]\n        }\n      },\n\n      set(node, prop, value) {\n        if (node[prop] === value) return true\n        node[prop] = value\n        if (prop === 'name' || prop === 'params' || prop === 'selector') {\n          node.markDirty()\n        }\n        return true\n      }\n    }\n  }\n\n  index(child) {\n    if (typeof child === 'number') return child\n    if (child.proxyOf) child = child.proxyOf\n    return this.proxyOf.nodes.indexOf(child)\n  }\n\n  insertAfter(exist, add) {\n    let existIndex = this.index(exist)\n    let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n    existIndex = this.index(exist)\n    for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (existIndex < index) {\n        this.indexes[id] = index + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  insertBefore(exist, add) {\n    let existIndex = this.index(exist)\n    let type = existIndex === 0 ? 'prepend' : false\n    let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()\n    existIndex = this.index(exist)\n    for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (existIndex <= index) {\n        this.indexes[id] = index + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  normalize(nodes, sample) {\n    if (typeof nodes === 'string') {\n      nodes = cleanSource(parse(nodes).nodes)\n    } else if (typeof nodes === 'undefined') {\n      nodes = []\n    } else if (Array.isArray(nodes)) {\n      nodes = nodes.slice(0)\n      for (let i of nodes) {\n        if (i.parent) i.parent.removeChild(i, 'ignore')\n      }\n    } else if (nodes.type === 'root' && this.type !== 'document') {\n      nodes = nodes.nodes.slice(0)\n      for (let i of nodes) {\n        if (i.parent) i.parent.removeChild(i, 'ignore')\n      }\n    } else if (nodes.type) {\n      nodes = [nodes]\n    } else if (nodes.prop) {\n      if (typeof nodes.value === 'undefined') {\n        throw new Error('Value field is missed in node creation')\n      } else if (typeof nodes.value !== 'string') {\n        nodes.value = String(nodes.value)\n      }\n      nodes = [new Declaration(nodes)]\n    } else if (nodes.selector) {\n      nodes = [new Rule(nodes)]\n    } else if (nodes.name) {\n      nodes = [new AtRule(nodes)]\n    } else if (nodes.text) {\n      nodes = [new Comment(nodes)]\n    } else {\n      throw new Error('Unknown node type in node creation')\n    }\n\n    let processed = nodes.map(i => {\n      /* c8 ignore next */\n      if (!i[my]) Container.rebuild(i)\n      i = i.proxyOf\n      if (i.parent) i.parent.removeChild(i)\n      if (i[isClean]) markDirtyUp(i)\n      if (typeof i.raws.before === 'undefined') {\n        if (sample && typeof sample.raws.before !== 'undefined') {\n          i.raws.before = sample.raws.before.replace(/\\S/g, '')\n        }\n      }\n      i.parent = this.proxyOf\n      return i\n    })\n\n    return processed\n  }\n\n  prepend(...children) {\n    children = children.reverse()\n    for (let child of children) {\n      let nodes = this.normalize(child, this.first, 'prepend').reverse()\n      for (let node of nodes) this.proxyOf.nodes.unshift(node)\n      for (let id in this.indexes) {\n        this.indexes[id] = this.indexes[id] + nodes.length\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  push(child) {\n    child.parent = this\n    this.proxyOf.nodes.push(child)\n    return this\n  }\n\n  removeAll() {\n    for (let node of this.proxyOf.nodes) node.parent = undefined\n    this.proxyOf.nodes = []\n\n    this.markDirty()\n\n    return this\n  }\n\n  removeChild(child) {\n    child = this.index(child)\n    this.proxyOf.nodes[child].parent = undefined\n    this.proxyOf.nodes.splice(child, 1)\n\n    let index\n    for (let id in this.indexes) {\n      index = this.indexes[id]\n      if (index >= child) {\n        this.indexes[id] = index - 1\n      }\n    }\n\n    this.markDirty()\n\n    return this\n  }\n\n  replaceValues(pattern, opts, callback) {\n    if (!callback) {\n      callback = opts\n      opts = {}\n    }\n\n    this.walkDecls(decl => {\n      if (opts.props && !opts.props.includes(decl.prop)) return\n      if (opts.fast && !decl.value.includes(opts.fast)) return\n\n      decl.value = decl.value.replace(pattern, callback)\n    })\n\n    this.markDirty()\n\n    return this\n  }\n\n  some(condition) {\n    return this.nodes.some(condition)\n  }\n\n  walk(callback) {\n    return this.each((child, i) => {\n      let result\n      try {\n        result = callback(child, i)\n      } catch (e) {\n        throw child.addToError(e)\n      }\n      if (result !== false && child.walk) {\n        result = child.walk(callback)\n      }\n\n      return result\n    })\n  }\n\n  walkAtRules(name, callback) {\n    if (!callback) {\n      callback = name\n      return this.walk((child, i) => {\n        if (child.type === 'atrule') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (name instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'atrule' && name.test(child.name)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'atrule' && child.name === name) {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkComments(callback) {\n    return this.walk((child, i) => {\n      if (child.type === 'comment') {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkDecls(prop, callback) {\n    if (!callback) {\n      callback = prop\n      return this.walk((child, i) => {\n        if (child.type === 'decl') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (prop instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'decl' && prop.test(child.prop)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'decl' && child.prop === prop) {\n        return callback(child, i)\n      }\n    })\n  }\n\n  walkRules(selector, callback) {\n    if (!callback) {\n      callback = selector\n\n      return this.walk((child, i) => {\n        if (child.type === 'rule') {\n          return callback(child, i)\n        }\n      })\n    }\n    if (selector instanceof RegExp) {\n      return this.walk((child, i) => {\n        if (child.type === 'rule' && selector.test(child.selector)) {\n          return callback(child, i)\n        }\n      })\n    }\n    return this.walk((child, i) => {\n      if (child.type === 'rule' && child.selector === selector) {\n        return callback(child, i)\n      }\n    })\n  }\n\n  get first() {\n    if (!this.proxyOf.nodes) return undefined\n    return this.proxyOf.nodes[0]\n  }\n\n  get last() {\n    if (!this.proxyOf.nodes) return undefined\n    return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n  }\n}\n\nContainer.registerParse = dependant => {\n  parse = dependant\n}\n\nContainer.registerRule = dependant => {\n  Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n  AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n  Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n  if (node.type === 'atrule') {\n    Object.setPrototypeOf(node, AtRule.prototype)\n  } else if (node.type === 'rule') {\n    Object.setPrototypeOf(node, Rule.prototype)\n  } else if (node.type === 'decl') {\n    Object.setPrototypeOf(node, Declaration.prototype)\n  } else if (node.type === 'comment') {\n    Object.setPrototypeOf(node, Comment.prototype)\n  } else if (node.type === 'root') {\n    Object.setPrototypeOf(node, Root.prototype)\n  }\n\n  node[my] = true\n\n  if (node.nodes) {\n    node.nodes.forEach(child => {\n      Container.rebuild(child)\n    })\n  }\n}\n/* c8 ignore stop */\n", "'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n  constructor(defaults) {\n    // type needs to be passed to super, otherwise child roots won't be normalized correctly\n    super({ type: 'document', ...defaults })\n\n    if (!this.nodes) {\n      this.nodes = []\n    }\n  }\n\n  toResult(opts = {}) {\n    let lazy = new LazyResult(new Processor(), this, opts)\n\n    return lazy.stringify()\n  }\n}\n\nDocument.registerLazyResult = dependant => {\n  LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n  Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n", "/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n  if (printed[message]) return\n  printed[message] = true\n\n  if (typeof console !== 'undefined' && console.warn) {\n    console.warn(message)\n  }\n}\n", "'use strict'\n\nclass Warning {\n  constructor(text, opts = {}) {\n    this.type = 'warning'\n    this.text = text\n\n    if (opts.node && opts.node.source) {\n      let range = opts.node.rangeBy(opts)\n      this.line = range.start.line\n      this.column = range.start.column\n      this.endLine = range.end.line\n      this.endColumn = range.end.column\n    }\n\n    for (let opt in opts) this[opt] = opts[opt]\n  }\n\n  toString() {\n    if (this.node) {\n      return this.node.error(this.text, {\n        index: this.index,\n        plugin: this.plugin,\n        word: this.word\n      }).message\n    }\n\n    if (this.plugin) {\n      return this.plugin + ': ' + this.text\n    }\n\n    return this.text\n  }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n", "'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n  constructor(processor, root, opts) {\n    this.processor = processor\n    this.messages = []\n    this.root = root\n    this.opts = opts\n    this.css = undefined\n    this.map = undefined\n  }\n\n  toString() {\n    return this.css\n  }\n\n  warn(text, opts = {}) {\n    if (!opts.plugin) {\n      if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n        opts.plugin = this.lastPlugin.postcssPlugin\n      }\n    }\n\n    let warning = new Warning(text, opts)\n    this.messages.push(warning)\n\n    return warning\n  }\n\n  warnings() {\n    return this.messages.filter(i => i.type === 'warning')\n  }\n\n  get content() {\n    return this.css\n  }\n}\n\nmodule.exports = Result\nResult.default = Result\n", "'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n  let css = input.css.valueOf()\n  let ignore = options.ignoreErrors\n\n  let code, next, quote, content, escape\n  let escaped, escapePos, prev, n, currentToken\n\n  let length = css.length\n  let pos = 0\n  let buffer = []\n  let returned = []\n\n  function position() {\n    return pos\n  }\n\n  function unclosed(what) {\n    throw input.error('Unclosed ' + what, pos)\n  }\n\n  function endOfFile() {\n    return returned.length === 0 && pos >= length\n  }\n\n  function nextToken(opts) {\n    if (returned.length) return returned.pop()\n    if (pos >= length) return\n\n    let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n    code = css.charCodeAt(pos)\n\n    switch (code) {\n      case NEWLINE:\n      case SPACE:\n      case TAB:\n      case CR:\n      case FEED: {\n        next = pos\n        do {\n          next += 1\n          code = css.charCodeAt(next)\n        } while (\n          code === SPACE ||\n          code === NEWLINE ||\n          code === TAB ||\n          code === CR ||\n          code === FEED\n        )\n\n        currentToken = ['space', css.slice(pos, next)]\n        pos = next - 1\n        break\n      }\n\n      case OPEN_SQUARE:\n      case CLOSE_SQUARE:\n      case OPEN_CURLY:\n      case CLOSE_CURLY:\n      case COLON:\n      case SEMICOLON:\n      case CLOSE_PARENTHESES: {\n        let controlChar = String.fromCharCode(code)\n        currentToken = [controlChar, controlChar, pos]\n        break\n      }\n\n      case OPEN_PARENTHESES: {\n        prev = buffer.length ? buffer.pop()[1] : ''\n        n = css.charCodeAt(pos + 1)\n        if (\n          prev === 'url' &&\n          n !== SINGLE_QUOTE &&\n          n !== DOUBLE_QUOTE &&\n          n !== SPACE &&\n          n !== NEWLINE &&\n          n !== TAB &&\n          n !== FEED &&\n          n !== CR\n        ) {\n          next = pos\n          do {\n            escaped = false\n            next = css.indexOf(')', next + 1)\n            if (next === -1) {\n              if (ignore || ignoreUnclosed) {\n                next = pos\n                break\n              } else {\n                unclosed('bracket')\n              }\n            }\n            escapePos = next\n            while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n              escapePos -= 1\n              escaped = !escaped\n            }\n          } while (escaped)\n\n          currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n          pos = next\n        } else {\n          next = css.indexOf(')', pos + 1)\n          content = css.slice(pos, next + 1)\n\n          if (next === -1 || RE_BAD_BRACKET.test(content)) {\n            currentToken = ['(', '(', pos]\n          } else {\n            currentToken = ['brackets', content, pos, next]\n            pos = next\n          }\n        }\n\n        break\n      }\n\n      case SINGLE_QUOTE:\n      case DOUBLE_QUOTE: {\n        quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n        next = pos\n        do {\n          escaped = false\n          next = css.indexOf(quote, next + 1)\n          if (next === -1) {\n            if (ignore || ignoreUnclosed) {\n              next = pos + 1\n              break\n            } else {\n              unclosed('string')\n            }\n          }\n          escapePos = next\n          while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n            escapePos -= 1\n            escaped = !escaped\n          }\n        } while (escaped)\n\n        currentToken = ['string', css.slice(pos, next + 1), pos, next]\n        pos = next\n        break\n      }\n\n      case AT: {\n        RE_AT_END.lastIndex = pos + 1\n        RE_AT_END.test(css)\n        if (RE_AT_END.lastIndex === 0) {\n          next = css.length - 1\n        } else {\n          next = RE_AT_END.lastIndex - 2\n        }\n\n        currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n        pos = next\n        break\n      }\n\n      case BACKSLASH: {\n        next = pos\n        escape = true\n        while (css.charCodeAt(next + 1) === BACKSLASH) {\n          next += 1\n          escape = !escape\n        }\n        code = css.charCodeAt(next + 1)\n        if (\n          escape &&\n          code !== SLASH &&\n          code !== SPACE &&\n          code !== NEWLINE &&\n          code !== TAB &&\n          code !== CR &&\n          code !== FEED\n        ) {\n          next += 1\n          if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n            while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n              next += 1\n            }\n            if (css.charCodeAt(next + 1) === SPACE) {\n              next += 1\n            }\n          }\n        }\n\n        currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n        pos = next\n        break\n      }\n\n      default: {\n        if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n          next = css.indexOf('*/', pos + 2) + 1\n          if (next === 0) {\n            if (ignore || ignoreUnclosed) {\n              next = css.length\n            } else {\n              unclosed('comment')\n            }\n          }\n\n          currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n          pos = next\n        } else {\n          RE_WORD_END.lastIndex = pos + 1\n          RE_WORD_END.test(css)\n          if (RE_WORD_END.lastIndex === 0) {\n            next = css.length - 1\n          } else {\n            next = RE_WORD_END.lastIndex - 2\n          }\n\n          currentToken = ['word', css.slice(pos, next + 1), pos, next]\n          buffer.push(currentToken)\n          pos = next\n        }\n\n        break\n      }\n    }\n\n    pos++\n    return currentToken\n  }\n\n  function back(token) {\n    returned.push(token)\n  }\n\n  return {\n    back,\n    endOfFile,\n    nextToken,\n    position\n  }\n}\n", "'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'atrule'\n  }\n\n  append(...children) {\n    if (!this.proxyOf.nodes) this.nodes = []\n    return super.append(...children)\n  }\n\n  prepend(...children) {\n    if (!this.proxyOf.nodes) this.nodes = []\n    return super.prepend(...children)\n  }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n", "'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'root'\n    if (!this.nodes) this.nodes = []\n  }\n\n  normalize(child, sample, type) {\n    let nodes = super.normalize(child)\n\n    if (sample) {\n      if (type === 'prepend') {\n        if (this.nodes.length > 1) {\n          sample.raws.before = this.nodes[1].raws.before\n        } else {\n          delete sample.raws.before\n        }\n      } else if (this.first !== sample) {\n        for (let node of nodes) {\n          node.raws.before = sample.raws.before\n        }\n      }\n    }\n\n    return nodes\n  }\n\n  removeChild(child, ignore) {\n    let index = this.index(child)\n\n    if (!ignore && index === 0 && this.nodes.length > 1) {\n      this.nodes[1].raws.before = this.nodes[index].raws.before\n    }\n\n    return super.removeChild(child)\n  }\n\n  toResult(opts = {}) {\n    let lazy = new LazyResult(new Processor(), this, opts)\n    return lazy.stringify()\n  }\n}\n\nRoot.registerLazyResult = dependant => {\n  LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n  Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n", "'use strict'\n\nlet list = {\n  comma(string) {\n    return list.split(string, [','], true)\n  },\n\n  space(string) {\n    let spaces = [' ', '\\n', '\\t']\n    return list.split(string, spaces)\n  },\n\n  split(string, separators, last) {\n    let array = []\n    let current = ''\n    let split = false\n\n    let func = 0\n    let inQuote = false\n    let prevQuote = ''\n    let escape = false\n\n    for (let letter of string) {\n      if (escape) {\n        escape = false\n      } else if (letter === '\\\\') {\n        escape = true\n      } else if (inQuote) {\n        if (letter === prevQuote) {\n          inQuote = false\n        }\n      } else if (letter === '\"' || letter === \"'\") {\n        inQuote = true\n        prevQuote = letter\n      } else if (letter === '(') {\n        func += 1\n      } else if (letter === ')') {\n        if (func > 0) func -= 1\n      } else if (func === 0) {\n        if (separators.includes(letter)) split = true\n      }\n\n      if (split) {\n        if (current !== '') array.push(current.trim())\n        current = ''\n        split = false\n      } else {\n        current += letter\n      }\n    }\n\n    if (last || current !== '') array.push(current.trim())\n    return array\n  }\n}\n\nmodule.exports = list\nlist.default = list\n", "'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n  constructor(defaults) {\n    super(defaults)\n    this.type = 'rule'\n    if (!this.nodes) this.nodes = []\n  }\n\n  get selectors() {\n    return list.comma(this.selector)\n  }\n\n  set selectors(values) {\n    let match = this.selector ? this.selector.match(/,\\s*/) : null\n    let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n    this.selector = values.join(sep)\n  }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n", "'use strict'\n\nlet Declaration = require('./declaration')\nlet tokenizer = require('./tokenize')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n  empty: true,\n  space: true\n}\n\nfunction findLastWithPosition(tokens) {\n  for (let i = tokens.length - 1; i >= 0; i--) {\n    let token = tokens[i]\n    let pos = token[3] || token[2]\n    if (pos) return pos\n  }\n}\n\nclass Parser {\n  constructor(input) {\n    this.input = input\n\n    this.root = new Root()\n    this.current = this.root\n    this.spaces = ''\n    this.semicolon = false\n\n    this.createTokenizer()\n    this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n  }\n\n  atrule(token) {\n    let node = new AtRule()\n    node.name = token[1].slice(1)\n    if (node.name === '') {\n      this.unnamedAtrule(node, token)\n    }\n    this.init(node, token[2])\n\n    let type\n    let prev\n    let shift\n    let last = false\n    let open = false\n    let params = []\n    let brackets = []\n\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken()\n      type = token[0]\n\n      if (type === '(' || type === '[') {\n        brackets.push(type === '(' ? ')' : ']')\n      } else if (type === '{' && brackets.length > 0) {\n        brackets.push('}')\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop()\n      }\n\n      if (brackets.length === 0) {\n        if (type === ';') {\n          node.source.end = this.getPosition(token[2])\n          node.source.end.offset++\n          this.semicolon = true\n          break\n        } else if (type === '{') {\n          open = true\n          break\n        } else if (type === '}') {\n          if (params.length > 0) {\n            shift = params.length - 1\n            prev = params[shift]\n            while (prev && prev[0] === 'space') {\n              prev = params[--shift]\n            }\n            if (prev) {\n              node.source.end = this.getPosition(prev[3] || prev[2])\n              node.source.end.offset++\n            }\n          }\n          this.end(token)\n          break\n        } else {\n          params.push(token)\n        }\n      } else {\n        params.push(token)\n      }\n\n      if (this.tokenizer.endOfFile()) {\n        last = true\n        break\n      }\n    }\n\n    node.raws.between = this.spacesAndCommentsFromEnd(params)\n    if (params.length) {\n      node.raws.afterName = this.spacesAndCommentsFromStart(params)\n      this.raw(node, 'params', params)\n      if (last) {\n        token = params[params.length - 1]\n        node.source.end = this.getPosition(token[3] || token[2])\n        node.source.end.offset++\n        this.spaces = node.raws.between\n        node.raws.between = ''\n      }\n    } else {\n      node.raws.afterName = ''\n      node.params = ''\n    }\n\n    if (open) {\n      node.nodes = []\n      this.current = node\n    }\n  }\n\n  checkMissedSemicolon(tokens) {\n    let colon = this.colon(tokens)\n    if (colon === false) return\n\n    let founded = 0\n    let token\n    for (let j = colon - 1; j >= 0; j--) {\n      token = tokens[j]\n      if (token[0] !== 'space') {\n        founded += 1\n        if (founded === 2) break\n      }\n    }\n    // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n    // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n    // And because we need it after that one we do +1 to get the next one.\n    throw this.input.error(\n      'Missed semicolon',\n      token[0] === 'word' ? token[3] + 1 : token[2]\n    )\n  }\n\n  colon(tokens) {\n    let brackets = 0\n    let token, type, prev\n    for (let [i, element] of tokens.entries()) {\n      token = element\n      type = token[0]\n\n      if (type === '(') {\n        brackets += 1\n      }\n      if (type === ')') {\n        brackets -= 1\n      }\n      if (brackets === 0 && type === ':') {\n        if (!prev) {\n          this.doubleColon(token)\n        } else if (prev[0] === 'word' && prev[1] === 'progid') {\n          continue\n        } else {\n          return i\n        }\n      }\n\n      prev = token\n    }\n    return false\n  }\n\n  comment(token) {\n    let node = new Comment()\n    this.init(node, token[2])\n    node.source.end = this.getPosition(token[3] || token[2])\n    node.source.end.offset++\n\n    let text = token[1].slice(2, -2)\n    if (/^\\s*$/.test(text)) {\n      node.text = ''\n      node.raws.left = text\n      node.raws.right = ''\n    } else {\n      let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n      node.text = match[2]\n      node.raws.left = match[1]\n      node.raws.right = match[3]\n    }\n  }\n\n  createTokenizer() {\n    this.tokenizer = tokenizer(this.input)\n  }\n\n  decl(tokens, customProperty) {\n    let node = new Declaration()\n    this.init(node, tokens[0][2])\n\n    let last = tokens[tokens.length - 1]\n    if (last[0] === ';') {\n      this.semicolon = true\n      tokens.pop()\n    }\n\n    node.source.end = this.getPosition(\n      last[3] || last[2] || findLastWithPosition(tokens)\n    )\n    node.source.end.offset++\n\n    while (tokens[0][0] !== 'word') {\n      if (tokens.length === 1) this.unknownWord(tokens)\n      node.raws.before += tokens.shift()[1]\n    }\n    node.source.start = this.getPosition(tokens[0][2])\n\n    node.prop = ''\n    while (tokens.length) {\n      let type = tokens[0][0]\n      if (type === ':' || type === 'space' || type === 'comment') {\n        break\n      }\n      node.prop += tokens.shift()[1]\n    }\n\n    node.raws.between = ''\n\n    let token\n    while (tokens.length) {\n      token = tokens.shift()\n\n      if (token[0] === ':') {\n        node.raws.between += token[1]\n        break\n      } else {\n        if (token[0] === 'word' && /\\w/.test(token[1])) {\n          this.unknownWord([token])\n        }\n        node.raws.between += token[1]\n      }\n    }\n\n    if (node.prop[0] === '_' || node.prop[0] === '*') {\n      node.raws.before += node.prop[0]\n      node.prop = node.prop.slice(1)\n    }\n\n    let firstSpaces = []\n    let next\n    while (tokens.length) {\n      next = tokens[0][0]\n      if (next !== 'space' && next !== 'comment') break\n      firstSpaces.push(tokens.shift())\n    }\n\n    this.precheckMissedSemicolon(tokens)\n\n    for (let i = tokens.length - 1; i >= 0; i--) {\n      token = tokens[i]\n      if (token[1].toLowerCase() === '!important') {\n        node.important = true\n        let string = this.stringFrom(tokens, i)\n        string = this.spacesFromEnd(tokens) + string\n        if (string !== ' !important') node.raws.important = string\n        break\n      } else if (token[1].toLowerCase() === 'important') {\n        let cache = tokens.slice(0)\n        let str = ''\n        for (let j = i; j > 0; j--) {\n          let type = cache[j][0]\n          if (str.trim().indexOf('!') === 0 && type !== 'space') {\n            break\n          }\n          str = cache.pop()[1] + str\n        }\n        if (str.trim().indexOf('!') === 0) {\n          node.important = true\n          node.raws.important = str\n          tokens = cache\n        }\n      }\n\n      if (token[0] !== 'space' && token[0] !== 'comment') {\n        break\n      }\n    }\n\n    let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n    if (hasWord) {\n      node.raws.between += firstSpaces.map(i => i[1]).join('')\n      firstSpaces = []\n    }\n    this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n    if (node.value.includes(':') && !customProperty) {\n      this.checkMissedSemicolon(tokens)\n    }\n  }\n\n  doubleColon(token) {\n    throw this.input.error(\n      'Double colon',\n      { offset: token[2] },\n      { offset: token[2] + token[1].length }\n    )\n  }\n\n  emptyRule(token) {\n    let node = new Rule()\n    this.init(node, token[2])\n    node.selector = ''\n    node.raws.between = ''\n    this.current = node\n  }\n\n  end(token) {\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon\n    }\n    this.semicolon = false\n\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces\n    this.spaces = ''\n\n    if (this.current.parent) {\n      this.current.source.end = this.getPosition(token[2])\n      this.current.source.end.offset++\n      this.current = this.current.parent\n    } else {\n      this.unexpectedClose(token)\n    }\n  }\n\n  endFile() {\n    if (this.current.parent) this.unclosedBlock()\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon\n    }\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces\n    this.root.source.end = this.getPosition(this.tokenizer.position())\n  }\n\n  freeSemicolon(token) {\n    this.spaces += token[1]\n    if (this.current.nodes) {\n      let prev = this.current.nodes[this.current.nodes.length - 1]\n      if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n        prev.raws.ownSemicolon = this.spaces\n        this.spaces = ''\n      }\n    }\n  }\n\n  // Helpers\n\n  getPosition(offset) {\n    let pos = this.input.fromOffset(offset)\n    return {\n      column: pos.col,\n      line: pos.line,\n      offset\n    }\n  }\n\n  init(node, offset) {\n    this.current.push(node)\n    node.source = {\n      input: this.input,\n      start: this.getPosition(offset)\n    }\n    node.raws.before = this.spaces\n    this.spaces = ''\n    if (node.type !== 'comment') this.semicolon = false\n  }\n\n  other(start) {\n    let end = false\n    let type = null\n    let colon = false\n    let bracket = null\n    let brackets = []\n    let customProperty = start[1].startsWith('--')\n\n    let tokens = []\n    let token = start\n    while (token) {\n      type = token[0]\n      tokens.push(token)\n\n      if (type === '(' || type === '[') {\n        if (!bracket) bracket = token\n        brackets.push(type === '(' ? ')' : ']')\n      } else if (customProperty && colon && type === '{') {\n        if (!bracket) bracket = token\n        brackets.push('}')\n      } else if (brackets.length === 0) {\n        if (type === ';') {\n          if (colon) {\n            this.decl(tokens, customProperty)\n            return\n          } else {\n            break\n          }\n        } else if (type === '{') {\n          this.rule(tokens)\n          return\n        } else if (type === '}') {\n          this.tokenizer.back(tokens.pop())\n          end = true\n          break\n        } else if (type === ':') {\n          colon = true\n        }\n      } else if (type === brackets[brackets.length - 1]) {\n        brackets.pop()\n        if (brackets.length === 0) bracket = null\n      }\n\n      token = this.tokenizer.nextToken()\n    }\n\n    if (this.tokenizer.endOfFile()) end = true\n    if (brackets.length > 0) this.unclosedBracket(bracket)\n\n    if (end && colon) {\n      if (!customProperty) {\n        while (tokens.length) {\n          token = tokens[tokens.length - 1][0]\n          if (token !== 'space' && token !== 'comment') break\n          this.tokenizer.back(tokens.pop())\n        }\n      }\n      this.decl(tokens, customProperty)\n    } else {\n      this.unknownWord(tokens)\n    }\n  }\n\n  parse() {\n    let token\n    while (!this.tokenizer.endOfFile()) {\n      token = this.tokenizer.nextToken()\n\n      switch (token[0]) {\n        case 'space':\n          this.spaces += token[1]\n          break\n\n        case ';':\n          this.freeSemicolon(token)\n          break\n\n        case '}':\n          this.end(token)\n          break\n\n        case 'comment':\n          this.comment(token)\n          break\n\n        case 'at-word':\n          this.atrule(token)\n          break\n\n        case '{':\n          this.emptyRule(token)\n          break\n\n        default:\n          this.other(token)\n          break\n      }\n    }\n    this.endFile()\n  }\n\n  precheckMissedSemicolon(/* tokens */) {\n    // Hook for Safe Parser\n  }\n\n  raw(node, prop, tokens, customProperty) {\n    let token, type\n    let length = tokens.length\n    let value = ''\n    let clean = true\n    let next, prev\n\n    for (let i = 0; i < length; i += 1) {\n      token = tokens[i]\n      type = token[0]\n      if (type === 'space' && i === length - 1 && !customProperty) {\n        clean = false\n      } else if (type === 'comment') {\n        prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n        next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n        if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n          if (value.slice(-1) === ',') {\n            clean = false\n          } else {\n            value += token[1]\n          }\n        } else {\n          clean = false\n        }\n      } else {\n        value += token[1]\n      }\n    }\n    if (!clean) {\n      let raw = tokens.reduce((all, i) => all + i[1], '')\n      node.raws[prop] = { raw, value }\n    }\n    node[prop] = value\n  }\n\n  rule(tokens) {\n    tokens.pop()\n\n    let node = new Rule()\n    this.init(node, tokens[0][2])\n\n    node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n    this.raw(node, 'selector', tokens)\n    this.current = node\n  }\n\n  spacesAndCommentsFromEnd(tokens) {\n    let lastTokenType\n    let spaces = ''\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0]\n      if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n      spaces = tokens.pop()[1] + spaces\n    }\n    return spaces\n  }\n\n  // Errors\n\n  spacesAndCommentsFromStart(tokens) {\n    let next\n    let spaces = ''\n    while (tokens.length) {\n      next = tokens[0][0]\n      if (next !== 'space' && next !== 'comment') break\n      spaces += tokens.shift()[1]\n    }\n    return spaces\n  }\n\n  spacesFromEnd(tokens) {\n    let lastTokenType\n    let spaces = ''\n    while (tokens.length) {\n      lastTokenType = tokens[tokens.length - 1][0]\n      if (lastTokenType !== 'space') break\n      spaces = tokens.pop()[1] + spaces\n    }\n    return spaces\n  }\n\n  stringFrom(tokens, from) {\n    let result = ''\n    for (let i = from; i < tokens.length; i++) {\n      result += tokens[i][1]\n    }\n    tokens.splice(from, tokens.length - from)\n    return result\n  }\n\n  unclosedBlock() {\n    let pos = this.current.source.start\n    throw this.input.error('Unclosed block', pos.line, pos.column)\n  }\n\n  unclosedBracket(bracket) {\n    throw this.input.error(\n      'Unclosed bracket',\n      { offset: bracket[2] },\n      { offset: bracket[2] + 1 }\n    )\n  }\n\n  unexpectedClose(token) {\n    throw this.input.error(\n      'Unexpected }',\n      { offset: token[2] },\n      { offset: token[2] + 1 }\n    )\n  }\n\n  unknownWord(tokens) {\n    throw this.input.error(\n      'Unknown word',\n      { offset: tokens[0][2] },\n      { offset: tokens[0][2] + tokens[0][1].length }\n    )\n  }\n\n  unnamedAtrule(node, token) {\n    throw this.input.error(\n      'At-rule without name',\n      { offset: token[2] },\n      { offset: token[2] + token[1].length }\n    )\n  }\n}\n\nmodule.exports = Parser\n", "'use strict'\n\nlet Container = require('./container')\nlet Parser = require('./parser')\nlet Input = require('./input')\n\nfunction parse(css, opts) {\n  let input = new Input(css, opts)\n  let parser = new Parser(input)\n  try {\n    parser.parse()\n  } catch (e) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (e.name === 'CssSyntaxError' && opts && opts.from) {\n        if (/\\.scss$/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse SCSS with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-scss parser'\n        } else if (/\\.sass/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse Sass with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-sass parser'\n        } else if (/\\.less$/i.test(opts.from)) {\n          e.message +=\n            '\\nYou tried to parse Less with ' +\n            'the standard CSS parser; ' +\n            'try again with the postcss-less parser'\n        }\n      }\n    }\n    throw e\n  }\n\n  return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n", "'use strict'\n\nlet { isClean, my } = require('./symbols')\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet Container = require('./container')\nlet Document = require('./document')\nlet warnOnce = require('./warn-once')\nlet Result = require('./result')\nlet parse = require('./parse')\nlet Root = require('./root')\n\nconst TYPE_TO_CLASS_NAME = {\n  atrule: 'AtRule',\n  comment: 'Comment',\n  decl: 'Declaration',\n  document: 'Document',\n  root: 'Root',\n  rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n  AtRule: true,\n  AtRuleExit: true,\n  Comment: true,\n  CommentExit: true,\n  Declaration: true,\n  DeclarationExit: true,\n  Document: true,\n  DocumentExit: true,\n  Once: true,\n  OnceExit: true,\n  postcssPlugin: true,\n  prepare: true,\n  Root: true,\n  RootExit: true,\n  Rule: true,\n  RuleExit: true\n}\n\nconst NOT_VISITORS = {\n  Once: true,\n  postcssPlugin: true,\n  prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n  return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n  let key = false\n  let type = TYPE_TO_CLASS_NAME[node.type]\n  if (node.type === 'decl') {\n    key = node.prop.toLowerCase()\n  } else if (node.type === 'atrule') {\n    key = node.name.toLowerCase()\n  }\n\n  if (key && node.append) {\n    return [\n      type,\n      type + '-' + key,\n      CHILDREN,\n      type + 'Exit',\n      type + 'Exit-' + key\n    ]\n  } else if (key) {\n    return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n  } else if (node.append) {\n    return [type, CHILDREN, type + 'Exit']\n  } else {\n    return [type, type + 'Exit']\n  }\n}\n\nfunction toStack(node) {\n  let events\n  if (node.type === 'document') {\n    events = ['Document', CHILDREN, 'DocumentExit']\n  } else if (node.type === 'root') {\n    events = ['Root', CHILDREN, 'RootExit']\n  } else {\n    events = getEvents(node)\n  }\n\n  return {\n    eventIndex: 0,\n    events,\n    iterator: 0,\n    node,\n    visitorIndex: 0,\n    visitors: []\n  }\n}\n\nfunction cleanMarks(node) {\n  node[isClean] = false\n  if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n  return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n  constructor(processor, css, opts) {\n    this.stringified = false\n    this.processed = false\n\n    let root\n    if (\n      typeof css === 'object' &&\n      css !== null &&\n      (css.type === 'root' || css.type === 'document')\n    ) {\n      root = cleanMarks(css)\n    } else if (css instanceof LazyResult || css instanceof Result) {\n      root = cleanMarks(css.root)\n      if (css.map) {\n        if (typeof opts.map === 'undefined') opts.map = {}\n        if (!opts.map.inline) opts.map.inline = false\n        opts.map.prev = css.map\n      }\n    } else {\n      let parser = parse\n      if (opts.syntax) parser = opts.syntax.parse\n      if (opts.parser) parser = opts.parser\n      if (parser.parse) parser = parser.parse\n\n      try {\n        root = parser(css, opts)\n      } catch (error) {\n        this.processed = true\n        this.error = error\n      }\n\n      if (root && !root[my]) {\n        /* c8 ignore next 2 */\n        Container.rebuild(root)\n      }\n    }\n\n    this.result = new Result(processor, root, opts)\n    this.helpers = { ...postcss, postcss, result: this.result }\n    this.plugins = this.processor.plugins.map(plugin => {\n      if (typeof plugin === 'object' && plugin.prepare) {\n        return { ...plugin, ...plugin.prepare(this.result) }\n      } else {\n        return plugin\n      }\n    })\n  }\n\n  async() {\n    if (this.error) return Promise.reject(this.error)\n    if (this.processed) return Promise.resolve(this.result)\n    if (!this.processing) {\n      this.processing = this.runAsync()\n    }\n    return this.processing\n  }\n\n  catch(onRejected) {\n    return this.async().catch(onRejected)\n  }\n\n  finally(onFinally) {\n    return this.async().then(onFinally, onFinally)\n  }\n\n  getAsyncError() {\n    throw new Error('Use process(css).then(cb) to work with async plugins')\n  }\n\n  handleError(error, node) {\n    let plugin = this.result.lastPlugin\n    try {\n      if (node) node.addToError(error)\n      this.error = error\n      if (error.name === 'CssSyntaxError' && !error.plugin) {\n        error.plugin = plugin.postcssPlugin\n        error.setMessage()\n      } else if (plugin.postcssVersion) {\n        if (process.env.NODE_ENV !== 'production') {\n          let pluginName = plugin.postcssPlugin\n          let pluginVer = plugin.postcssVersion\n          let runtimeVer = this.result.processor.version\n          let a = pluginVer.split('.')\n          let b = runtimeVer.split('.')\n\n          if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n            // eslint-disable-next-line no-console\n            console.error(\n              'Unknown error from PostCSS plugin. Your current PostCSS ' +\n                'version is ' +\n                runtimeVer +\n                ', but ' +\n                pluginName +\n                ' uses ' +\n                pluginVer +\n                '. Perhaps this is the source of the error below.'\n            )\n          }\n        }\n      }\n    } catch (err) {\n      /* c8 ignore next 3 */\n      // eslint-disable-next-line no-console\n      if (console && console.error) console.error(err)\n    }\n    return error\n  }\n\n  prepareVisitors() {\n    this.listeners = {}\n    let add = (plugin, type, cb) => {\n      if (!this.listeners[type]) this.listeners[type] = []\n      this.listeners[type].push([plugin, cb])\n    }\n    for (let plugin of this.plugins) {\n      if (typeof plugin === 'object') {\n        for (let event in plugin) {\n          if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n            throw new Error(\n              `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n                `Try to update PostCSS (${this.processor.version} now).`\n            )\n          }\n          if (!NOT_VISITORS[event]) {\n            if (typeof plugin[event] === 'object') {\n              for (let filter in plugin[event]) {\n                if (filter === '*') {\n                  add(plugin, event, plugin[event][filter])\n                } else {\n                  add(\n                    plugin,\n                    event + '-' + filter.toLowerCase(),\n                    plugin[event][filter]\n                  )\n                }\n              }\n            } else if (typeof plugin[event] === 'function') {\n              add(plugin, event, plugin[event])\n            }\n          }\n        }\n      }\n    }\n    this.hasListener = Object.keys(this.listeners).length > 0\n  }\n\n  async runAsync() {\n    this.plugin = 0\n    for (let i = 0; i < this.plugins.length; i++) {\n      let plugin = this.plugins[i]\n      let promise = this.runOnRoot(plugin)\n      if (isPromise(promise)) {\n        try {\n          await promise\n        } catch (error) {\n          throw this.handleError(error)\n        }\n      }\n    }\n\n    this.prepareVisitors()\n    if (this.hasListener) {\n      let root = this.result.root\n      while (!root[isClean]) {\n        root[isClean] = true\n        let stack = [toStack(root)]\n        while (stack.length > 0) {\n          let promise = this.visitTick(stack)\n          if (isPromise(promise)) {\n            try {\n              await promise\n            } catch (e) {\n              let node = stack[stack.length - 1].node\n              throw this.handleError(e, node)\n            }\n          }\n        }\n      }\n\n      if (this.listeners.OnceExit) {\n        for (let [plugin, visitor] of this.listeners.OnceExit) {\n          this.result.lastPlugin = plugin\n          try {\n            if (root.type === 'document') {\n              let roots = root.nodes.map(subRoot =>\n                visitor(subRoot, this.helpers)\n              )\n\n              await Promise.all(roots)\n            } else {\n              await visitor(root, this.helpers)\n            }\n          } catch (e) {\n            throw this.handleError(e)\n          }\n        }\n      }\n    }\n\n    this.processed = true\n    return this.stringify()\n  }\n\n  runOnRoot(plugin) {\n    this.result.lastPlugin = plugin\n    try {\n      if (typeof plugin === 'object' && plugin.Once) {\n        if (this.result.root.type === 'document') {\n          let roots = this.result.root.nodes.map(root =>\n            plugin.Once(root, this.helpers)\n          )\n\n          if (isPromise(roots[0])) {\n            return Promise.all(roots)\n          }\n\n          return roots\n        }\n\n        return plugin.Once(this.result.root, this.helpers)\n      } else if (typeof plugin === 'function') {\n        return plugin(this.result.root, this.result)\n      }\n    } catch (error) {\n      throw this.handleError(error)\n    }\n  }\n\n  stringify() {\n    if (this.error) throw this.error\n    if (this.stringified) return this.result\n    this.stringified = true\n\n    this.sync()\n\n    let opts = this.result.opts\n    let str = stringify\n    if (opts.syntax) str = opts.syntax.stringify\n    if (opts.stringifier) str = opts.stringifier\n    if (str.stringify) str = str.stringify\n\n    let map = new MapGenerator(str, this.result.root, this.result.opts)\n    let data = map.generate()\n    this.result.css = data[0]\n    this.result.map = data[1]\n\n    return this.result\n  }\n\n  sync() {\n    if (this.error) throw this.error\n    if (this.processed) return this.result\n    this.processed = true\n\n    if (this.processing) {\n      throw this.getAsyncError()\n    }\n\n    for (let plugin of this.plugins) {\n      let promise = this.runOnRoot(plugin)\n      if (isPromise(promise)) {\n        throw this.getAsyncError()\n      }\n    }\n\n    this.prepareVisitors()\n    if (this.hasListener) {\n      let root = this.result.root\n      while (!root[isClean]) {\n        root[isClean] = true\n        this.walkSync(root)\n      }\n      if (this.listeners.OnceExit) {\n        if (root.type === 'document') {\n          for (let subRoot of root.nodes) {\n            this.visitSync(this.listeners.OnceExit, subRoot)\n          }\n        } else {\n          this.visitSync(this.listeners.OnceExit, root)\n        }\n      }\n    }\n\n    return this.result\n  }\n\n  then(onFulfilled, onRejected) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!('from' in this.opts)) {\n        warnOnce(\n          'Without `from` option PostCSS could generate wrong source map ' +\n            'and will not find Browserslist config. Set it to CSS file path ' +\n            'or to `undefined` to prevent this warning.'\n        )\n      }\n    }\n    return this.async().then(onFulfilled, onRejected)\n  }\n\n  toString() {\n    return this.css\n  }\n\n  visitSync(visitors, node) {\n    for (let [plugin, visitor] of visitors) {\n      this.result.lastPlugin = plugin\n      let promise\n      try {\n        promise = visitor(node, this.helpers)\n      } catch (e) {\n        throw this.handleError(e, node.proxyOf)\n      }\n      if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n        return true\n      }\n      if (isPromise(promise)) {\n        throw this.getAsyncError()\n      }\n    }\n  }\n\n  visitTick(stack) {\n    let visit = stack[stack.length - 1]\n    let { node, visitors } = visit\n\n    if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n      stack.pop()\n      return\n    }\n\n    if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n      let [plugin, visitor] = visitors[visit.visitorIndex]\n      visit.visitorIndex += 1\n      if (visit.visitorIndex === visitors.length) {\n        visit.visitors = []\n        visit.visitorIndex = 0\n      }\n      this.result.lastPlugin = plugin\n      try {\n        return visitor(node.toProxy(), this.helpers)\n      } catch (e) {\n        throw this.handleError(e, node)\n      }\n    }\n\n    if (visit.iterator !== 0) {\n      let iterator = visit.iterator\n      let child\n      while ((child = node.nodes[node.indexes[iterator]])) {\n        node.indexes[iterator] += 1\n        if (!child[isClean]) {\n          child[isClean] = true\n          stack.push(toStack(child))\n          return\n        }\n      }\n      visit.iterator = 0\n      delete node.indexes[iterator]\n    }\n\n    let events = visit.events\n    while (visit.eventIndex < events.length) {\n      let event = events[visit.eventIndex]\n      visit.eventIndex += 1\n      if (event === CHILDREN) {\n        if (node.nodes && node.nodes.length) {\n          node[isClean] = true\n          visit.iterator = node.getIterator()\n        }\n        return\n      } else if (this.listeners[event]) {\n        visit.visitors = this.listeners[event]\n        return\n      }\n    }\n    stack.pop()\n  }\n\n  walkSync(node) {\n    node[isClean] = true\n    let events = getEvents(node)\n    for (let event of events) {\n      if (event === CHILDREN) {\n        if (node.nodes) {\n          node.each(child => {\n            if (!child[isClean]) this.walkSync(child)\n          })\n        }\n      } else {\n        let visitors = this.listeners[event]\n        if (visitors) {\n          if (this.visitSync(visitors, node.toProxy())) return\n        }\n      }\n    }\n  }\n\n  warnings() {\n    return this.sync().warnings()\n  }\n\n  get content() {\n    return this.stringify().content\n  }\n\n  get css() {\n    return this.stringify().css\n  }\n\n  get map() {\n    return this.stringify().map\n  }\n\n  get messages() {\n    return this.sync().messages\n  }\n\n  get opts() {\n    return this.result.opts\n  }\n\n  get processor() {\n    return this.result.processor\n  }\n\n  get root() {\n    return this.sync().root\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'LazyResult'\n  }\n}\n\nLazyResult.registerPostcss = dependant => {\n  postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n", "'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\nlet parse = require('./parse')\nconst Result = require('./result')\n\nclass NoWorkResult {\n  constructor(processor, css, opts) {\n    css = css.toString()\n    this.stringified = false\n\n    this._processor = processor\n    this._css = css\n    this._opts = opts\n    this._map = undefined\n    let root\n\n    let str = stringify\n    this.result = new Result(this._processor, root, this._opts)\n    this.result.css = css\n\n    let self = this\n    Object.defineProperty(this.result, 'root', {\n      get() {\n        return self.root\n      }\n    })\n\n    let map = new MapGenerator(str, root, this._opts, css)\n    if (map.isMap()) {\n      let [generatedCSS, generatedMap] = map.generate()\n      if (generatedCSS) {\n        this.result.css = generatedCSS\n      }\n      if (generatedMap) {\n        this.result.map = generatedMap\n      }\n    } else {\n      map.clearAnnotation()\n      this.result.css = map.css\n    }\n  }\n\n  async() {\n    if (this.error) return Promise.reject(this.error)\n    return Promise.resolve(this.result)\n  }\n\n  catch(onRejected) {\n    return this.async().catch(onRejected)\n  }\n\n  finally(onFinally) {\n    return this.async().then(onFinally, onFinally)\n  }\n\n  sync() {\n    if (this.error) throw this.error\n    return this.result\n  }\n\n  then(onFulfilled, onRejected) {\n    if (process.env.NODE_ENV !== 'production') {\n      if (!('from' in this._opts)) {\n        warnOnce(\n          'Without `from` option PostCSS could generate wrong source map ' +\n            'and will not find Browserslist config. Set it to CSS file path ' +\n            'or to `undefined` to prevent this warning.'\n        )\n      }\n    }\n\n    return this.async().then(onFulfilled, onRejected)\n  }\n\n  toString() {\n    return this._css\n  }\n\n  warnings() {\n    return []\n  }\n\n  get content() {\n    return this.result.css\n  }\n\n  get css() {\n    return this.result.css\n  }\n\n  get map() {\n    return this.result.map\n  }\n\n  get messages() {\n    return []\n  }\n\n  get opts() {\n    return this.result.opts\n  }\n\n  get processor() {\n    return this.result.processor\n  }\n\n  get root() {\n    if (this._root) {\n      return this._root\n    }\n\n    let root\n    let parser = parse\n\n    try {\n      root = parser(this._css, this._opts)\n    } catch (error) {\n      this.error = error\n    }\n\n    if (this.error) {\n      throw this.error\n    } else {\n      this._root = root\n      return root\n    }\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'NoWorkResult'\n  }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n", "'use strict'\n\nlet NoWorkResult = require('./no-work-result')\nlet LazyResult = require('./lazy-result')\nlet Document = require('./document')\nlet Root = require('./root')\n\nclass Processor {\n  constructor(plugins = []) {\n    this.version = '8.4.38'\n    this.plugins = this.normalize(plugins)\n  }\n\n  normalize(plugins) {\n    let normalized = []\n    for (let i of plugins) {\n      if (i.postcss === true) {\n        i = i()\n      } else if (i.postcss) {\n        i = i.postcss\n      }\n\n      if (typeof i === 'object' && Array.isArray(i.plugins)) {\n        normalized = normalized.concat(i.plugins)\n      } else if (typeof i === 'object' && i.postcssPlugin) {\n        normalized.push(i)\n      } else if (typeof i === 'function') {\n        normalized.push(i)\n      } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n        if (process.env.NODE_ENV !== 'production') {\n          throw new Error(\n            'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n              'one of the syntax/parser/stringifier options as outlined ' +\n              'in your PostCSS runner documentation.'\n          )\n        }\n      } else {\n        throw new Error(i + ' is not a PostCSS plugin')\n      }\n    }\n    return normalized\n  }\n\n  process(css, opts = {}) {\n    if (\n      !this.plugins.length &&\n      !opts.parser &&\n      !opts.stringifier &&\n      !opts.syntax\n    ) {\n      return new NoWorkResult(this, css, opts)\n    } else {\n      return new LazyResult(this, css, opts)\n    }\n  }\n\n  use(plugin) {\n    this.plugins = this.plugins.concat(this.normalize([plugin]))\n    return this\n  }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n", "'use strict'\n\nlet Declaration = require('./declaration')\nlet PreviousMap = require('./previous-map')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Input = require('./input')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n  if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n  let { inputs: ownInputs, ...defaults } = json\n  if (ownInputs) {\n    inputs = []\n    for (let input of ownInputs) {\n      let inputHydrated = { ...input, __proto__: Input.prototype }\n      if (inputHydrated.map) {\n        inputHydrated.map = {\n          ...inputHydrated.map,\n          __proto__: PreviousMap.prototype\n        }\n      }\n      inputs.push(inputHydrated)\n    }\n  }\n  if (defaults.nodes) {\n    defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n  }\n  if (defaults.source) {\n    let { inputId, ...source } = defaults.source\n    defaults.source = source\n    if (inputId != null) {\n      defaults.source.input = inputs[inputId]\n    }\n  }\n  if (defaults.type === 'root') {\n    return new Root(defaults)\n  } else if (defaults.type === 'decl') {\n    return new Declaration(defaults)\n  } else if (defaults.type === 'rule') {\n    return new Rule(defaults)\n  } else if (defaults.type === 'comment') {\n    return new Comment(defaults)\n  } else if (defaults.type === 'atrule') {\n    return new AtRule(defaults)\n  } else {\n    throw new Error('Unknown node type: ' + json.type)\n  }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n", "'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet LazyResult = require('./lazy-result')\nlet Container = require('./container')\nlet Processor = require('./processor')\nlet stringify = require('./stringify')\nlet fromJSON = require('./fromJSON')\nlet Document = require('./document')\nlet Warning = require('./warning')\nlet Comment = require('./comment')\nlet AtRule = require('./at-rule')\nlet Result = require('./result.js')\nlet Input = require('./input')\nlet parse = require('./parse')\nlet list = require('./list')\nlet Rule = require('./rule')\nlet Root = require('./root')\nlet Node = require('./node')\n\nfunction postcss(...plugins) {\n  if (plugins.length === 1 && Array.isArray(plugins[0])) {\n    plugins = plugins[0]\n  }\n  return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n  let warningPrinted = false\n  function creator(...args) {\n    // eslint-disable-next-line no-console\n    if (console && console.warn && !warningPrinted) {\n      warningPrinted = true\n      // eslint-disable-next-line no-console\n      console.warn(\n        name +\n          ': postcss.plugin was deprecated. Migration guide:\\n' +\n          'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n      )\n      if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n        /* c8 ignore next 7 */\n        // eslint-disable-next-line no-console\n        console.warn(\n          name +\n            ': \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:\\n' +\n            'https://www.w3ctech.com/topic/2226'\n        )\n      }\n    }\n    let transformer = initializer(...args)\n    transformer.postcssPlugin = name\n    transformer.postcssVersion = new Processor().version\n    return transformer\n  }\n\n  let cache\n  Object.defineProperty(creator, 'postcss', {\n    get() {\n      if (!cache) cache = creator()\n      return cache\n    }\n  })\n\n  creator.process = function (css, processOpts, pluginOpts) {\n    return postcss([creator(pluginOpts)]).process(css, processOpts)\n  }\n\n  return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = unesc;\n// Many thanks for this post which made this migration much easier.\n// https://mathiasbynens.be/notes/css-escapes\n\n/**\n * \n * @param {string} str \n * @returns {[string, number]|undefined}\n */\nfunction gobbleHex(str) {\n  var lower = str.toLowerCase();\n  var hex = '';\n  var spaceTerminated = false;\n  for (var i = 0; i < 6 && lower[i] !== undefined; i++) {\n    var code = lower.charCodeAt(i);\n    // check to see if we are dealing with a valid hex char [a-f|0-9]\n    var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;\n    // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point\n    spaceTerminated = code === 32;\n    if (!valid) {\n      break;\n    }\n    hex += lower[i];\n  }\n  if (hex.length === 0) {\n    return undefined;\n  }\n  var codePoint = parseInt(hex, 16);\n  var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF;\n  // Add special case for\n  // \"If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point\"\n  // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point\n  if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) {\n    return [\"\\uFFFD\", hex.length + (spaceTerminated ? 1 : 0)];\n  }\n  return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];\n}\nvar CONTAINS_ESCAPE = /\\\\/;\nfunction unesc(str) {\n  var needToProcess = CONTAINS_ESCAPE.test(str);\n  if (!needToProcess) {\n    return str;\n  }\n  var ret = \"\";\n  for (var i = 0; i < str.length; i++) {\n    if (str[i] === \"\\\\\") {\n      var gobbled = gobbleHex(str.slice(i + 1, i + 7));\n      if (gobbled !== undefined) {\n        ret += gobbled[0];\n        i += gobbled[1];\n        continue;\n      }\n\n      // Retain a pair of \\\\ if double escaped `\\\\\\\\`\n      // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e\n      if (str[i + 1] === \"\\\\\") {\n        ret += \"\\\\\";\n        i++;\n        continue;\n      }\n\n      // if \\\\ is at the end of the string retain it\n      // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb\n      if (str.length === i + 1) {\n        ret += str[i];\n      }\n      continue;\n    }\n    ret += str[i];\n  }\n  return ret;\n}\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = getProp;\nfunction getProp(obj) {\n  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    props[_key - 1] = arguments[_key];\n  }\n  while (props.length > 0) {\n    var prop = props.shift();\n    if (!obj[prop]) {\n      return undefined;\n    }\n    obj = obj[prop];\n  }\n  return obj;\n}\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = ensureObject;\nfunction ensureObject(obj) {\n  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    props[_key - 1] = arguments[_key];\n  }\n  while (props.length > 0) {\n    var prop = props.shift();\n    if (!obj[prop]) {\n      obj[prop] = {};\n    }\n    obj = obj[prop];\n  }\n}\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = stripComments;\nfunction stripComments(str) {\n  var s = \"\";\n  var commentStart = str.indexOf(\"/*\");\n  var lastEnd = 0;\n  while (commentStart >= 0) {\n    s = s + str.slice(lastEnd, commentStart);\n    var commentEnd = str.indexOf(\"*/\", commentStart + 2);\n    if (commentEnd < 0) {\n      return s;\n    }\n    lastEnd = commentEnd + 2;\n    commentStart = str.indexOf(\"/*\", lastEnd);\n  }\n  s = s + str.slice(lastEnd);\n  return s;\n}\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;\nvar _unesc = _interopRequireDefault(require(\"./unesc\"));\nexports.unesc = _unesc[\"default\"];\nvar _getProp = _interopRequireDefault(require(\"./getProp\"));\nexports.getProp = _getProp[\"default\"];\nvar _ensureObject = _interopRequireDefault(require(\"./ensureObject\"));\nexports.ensureObject = _ensureObject[\"default\"];\nvar _stripComments = _interopRequireDefault(require(\"./stripComments\"));\nexports.stripComments = _stripComments[\"default\"];\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _util = require(\"../util\");\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nvar cloneNode = function cloneNode(obj, parent) {\n  if (typeof obj !== 'object' || obj === null) {\n    return obj;\n  }\n  var cloned = new obj.constructor();\n  for (var i in obj) {\n    if (!obj.hasOwnProperty(i)) {\n      continue;\n    }\n    var value = obj[i];\n    var type = typeof value;\n    if (i === 'parent' && type === 'object') {\n      if (parent) {\n        cloned[i] = parent;\n      }\n    } else if (value instanceof Array) {\n      cloned[i] = value.map(function (j) {\n        return cloneNode(j, cloned);\n      });\n    } else {\n      cloned[i] = cloneNode(value, cloned);\n    }\n  }\n  return cloned;\n};\nvar Node = /*#__PURE__*/function () {\n  function Node(opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    Object.assign(this, opts);\n    this.spaces = this.spaces || {};\n    this.spaces.before = this.spaces.before || '';\n    this.spaces.after = this.spaces.after || '';\n  }\n  var _proto = Node.prototype;\n  _proto.remove = function remove() {\n    if (this.parent) {\n      this.parent.removeChild(this);\n    }\n    this.parent = undefined;\n    return this;\n  };\n  _proto.replaceWith = function replaceWith() {\n    if (this.parent) {\n      for (var index in arguments) {\n        this.parent.insertBefore(this, arguments[index]);\n      }\n      this.remove();\n    }\n    return this;\n  };\n  _proto.next = function next() {\n    return this.parent.at(this.parent.index(this) + 1);\n  };\n  _proto.prev = function prev() {\n    return this.parent.at(this.parent.index(this) - 1);\n  };\n  _proto.clone = function clone(overrides) {\n    if (overrides === void 0) {\n      overrides = {};\n    }\n    var cloned = cloneNode(this);\n    for (var name in overrides) {\n      cloned[name] = overrides[name];\n    }\n    return cloned;\n  }\n\n  /**\n   * Some non-standard syntax doesn't follow normal escaping rules for css.\n   * This allows non standard syntax to be appended to an existing property\n   * by specifying the escaped value. By specifying the escaped value,\n   * illegal characters are allowed to be directly inserted into css output.\n   * @param {string} name the property to set\n   * @param {any} value the unescaped value of the property\n   * @param {string} valueEscaped optional. the escaped value of the property.\n   */;\n  _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {\n    if (!this.raws) {\n      this.raws = {};\n    }\n    var originalValue = this[name];\n    var originalEscaped = this.raws[name];\n    this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first.\n    if (originalEscaped || valueEscaped !== value) {\n      this.raws[name] = (originalEscaped || originalValue) + valueEscaped;\n    } else {\n      delete this.raws[name]; // delete any escaped value that was created by the setter.\n    }\n  }\n\n  /**\n   * Some non-standard syntax doesn't follow normal escaping rules for css.\n   * This allows the escaped value to be specified directly, allowing illegal\n   * characters to be directly inserted into css output.\n   * @param {string} name the property to set\n   * @param {any} value the unescaped value of the property\n   * @param {string} valueEscaped the escaped value of the property.\n   */;\n  _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {\n    if (!this.raws) {\n      this.raws = {};\n    }\n    this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.\n    this.raws[name] = valueEscaped;\n  }\n\n  /**\n   * When you want a value to passed through to CSS directly. This method\n   * deletes the corresponding raw value causing the stringifier to fallback\n   * to the unescaped value.\n   * @param {string} name the property to set.\n   * @param {any} value The value that is both escaped and unescaped.\n   */;\n  _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {\n    this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.\n    if (this.raws) {\n      delete this.raws[name];\n    }\n  }\n\n  /**\n   *\n   * @param {number} line The number (starting with 1)\n   * @param {number} column The column number (starting with 1)\n   */;\n  _proto.isAtPosition = function isAtPosition(line, column) {\n    if (this.source && this.source.start && this.source.end) {\n      if (this.source.start.line > line) {\n        return false;\n      }\n      if (this.source.end.line < line) {\n        return false;\n      }\n      if (this.source.start.line === line && this.source.start.column > column) {\n        return false;\n      }\n      if (this.source.end.line === line && this.source.end.column < column) {\n        return false;\n      }\n      return true;\n    }\n    return undefined;\n  };\n  _proto.stringifyProperty = function stringifyProperty(name) {\n    return this.raws && this.raws[name] || this[name];\n  };\n  _proto.valueToString = function valueToString() {\n    return String(this.stringifyProperty(\"value\"));\n  };\n  _proto.toString = function toString() {\n    return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join('');\n  };\n  _createClass(Node, [{\n    key: \"rawSpaceBefore\",\n    get: function get() {\n      var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;\n      if (rawSpace === undefined) {\n        rawSpace = this.spaces && this.spaces.before;\n      }\n      return rawSpace || \"\";\n    },\n    set: function set(raw) {\n      (0, _util.ensureObject)(this, \"raws\", \"spaces\");\n      this.raws.spaces.before = raw;\n    }\n  }, {\n    key: \"rawSpaceAfter\",\n    get: function get() {\n      var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;\n      if (rawSpace === undefined) {\n        rawSpace = this.spaces.after;\n      }\n      return rawSpace || \"\";\n    },\n    set: function set(raw) {\n      (0, _util.ensureObject)(this, \"raws\", \"spaces\");\n      this.raws.spaces.after = raw;\n    }\n  }]);\n  return Node;\n}();\nexports[\"default\"] = Node;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;\nvar TAG = 'tag';\nexports.TAG = TAG;\nvar STRING = 'string';\nexports.STRING = STRING;\nvar SELECTOR = 'selector';\nexports.SELECTOR = SELECTOR;\nvar ROOT = 'root';\nexports.ROOT = ROOT;\nvar PSEUDO = 'pseudo';\nexports.PSEUDO = PSEUDO;\nvar NESTING = 'nesting';\nexports.NESTING = NESTING;\nvar ID = 'id';\nexports.ID = ID;\nvar COMMENT = 'comment';\nexports.COMMENT = COMMENT;\nvar COMBINATOR = 'combinator';\nexports.COMBINATOR = COMBINATOR;\nvar CLASS = 'class';\nexports.CLASS = CLASS;\nvar ATTRIBUTE = 'attribute';\nexports.ATTRIBUTE = ATTRIBUTE;\nvar UNIVERSAL = 'universal';\nexports.UNIVERSAL = UNIVERSAL;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar types = _interopRequireWildcard(require(\"./types\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Container = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Container, _Node);\n  function Container(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    if (!_this.nodes) {\n      _this.nodes = [];\n    }\n    return _this;\n  }\n  var _proto = Container.prototype;\n  _proto.append = function append(selector) {\n    selector.parent = this;\n    this.nodes.push(selector);\n    return this;\n  };\n  _proto.prepend = function prepend(selector) {\n    selector.parent = this;\n    this.nodes.unshift(selector);\n    return this;\n  };\n  _proto.at = function at(index) {\n    return this.nodes[index];\n  };\n  _proto.index = function index(child) {\n    if (typeof child === 'number') {\n      return child;\n    }\n    return this.nodes.indexOf(child);\n  };\n  _proto.removeChild = function removeChild(child) {\n    child = this.index(child);\n    this.at(child).parent = undefined;\n    this.nodes.splice(child, 1);\n    var index;\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n      if (index >= child) {\n        this.indexes[id] = index - 1;\n      }\n    }\n    return this;\n  };\n  _proto.removeAll = function removeAll() {\n    for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {\n      var node = _step.value;\n      node.parent = undefined;\n    }\n    this.nodes = [];\n    return this;\n  };\n  _proto.empty = function empty() {\n    return this.removeAll();\n  };\n  _proto.insertAfter = function insertAfter(oldNode, newNode) {\n    newNode.parent = this;\n    var oldIndex = this.index(oldNode);\n    this.nodes.splice(oldIndex + 1, 0, newNode);\n    newNode.parent = this;\n    var index;\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n      if (oldIndex <= index) {\n        this.indexes[id] = index + 1;\n      }\n    }\n    return this;\n  };\n  _proto.insertBefore = function insertBefore(oldNode, newNode) {\n    newNode.parent = this;\n    var oldIndex = this.index(oldNode);\n    this.nodes.splice(oldIndex, 0, newNode);\n    newNode.parent = this;\n    var index;\n    for (var id in this.indexes) {\n      index = this.indexes[id];\n      if (index <= oldIndex) {\n        this.indexes[id] = index + 1;\n      }\n    }\n    return this;\n  };\n  _proto._findChildAtPosition = function _findChildAtPosition(line, col) {\n    var found = undefined;\n    this.each(function (node) {\n      if (node.atPosition) {\n        var foundChild = node.atPosition(line, col);\n        if (foundChild) {\n          found = foundChild;\n          return false;\n        }\n      } else if (node.isAtPosition(line, col)) {\n        found = node;\n        return false;\n      }\n    });\n    return found;\n  }\n\n  /**\n   * Return the most specific node at the line and column number given.\n   * The source location is based on the original parsed location, locations aren't\n   * updated as selector nodes are mutated.\n   * \n   * Note that this location is relative to the location of the first character\n   * of the selector, and not the location of the selector in the overall document\n   * when used in conjunction with postcss.\n   *\n   * If not found, returns undefined.\n   * @param {number} line The line number of the node to find. (1-based index)\n   * @param {number} col  The column number of the node to find. (1-based index)\n   */;\n  _proto.atPosition = function atPosition(line, col) {\n    if (this.isAtPosition(line, col)) {\n      return this._findChildAtPosition(line, col) || this;\n    } else {\n      return undefined;\n    }\n  };\n  _proto._inferEndPosition = function _inferEndPosition() {\n    if (this.last && this.last.source && this.last.source.end) {\n      this.source = this.source || {};\n      this.source.end = this.source.end || {};\n      Object.assign(this.source.end, this.last.source.end);\n    }\n  };\n  _proto.each = function each(callback) {\n    if (!this.lastEach) {\n      this.lastEach = 0;\n    }\n    if (!this.indexes) {\n      this.indexes = {};\n    }\n    this.lastEach++;\n    var id = this.lastEach;\n    this.indexes[id] = 0;\n    if (!this.length) {\n      return undefined;\n    }\n    var index, result;\n    while (this.indexes[id] < this.length) {\n      index = this.indexes[id];\n      result = callback(this.at(index), index);\n      if (result === false) {\n        break;\n      }\n      this.indexes[id] += 1;\n    }\n    delete this.indexes[id];\n    if (result === false) {\n      return false;\n    }\n  };\n  _proto.walk = function walk(callback) {\n    return this.each(function (node, i) {\n      var result = callback(node, i);\n      if (result !== false && node.length) {\n        result = node.walk(callback);\n      }\n      if (result === false) {\n        return false;\n      }\n    });\n  };\n  _proto.walkAttributes = function walkAttributes(callback) {\n    var _this2 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.ATTRIBUTE) {\n        return callback.call(_this2, selector);\n      }\n    });\n  };\n  _proto.walkClasses = function walkClasses(callback) {\n    var _this3 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.CLASS) {\n        return callback.call(_this3, selector);\n      }\n    });\n  };\n  _proto.walkCombinators = function walkCombinators(callback) {\n    var _this4 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.COMBINATOR) {\n        return callback.call(_this4, selector);\n      }\n    });\n  };\n  _proto.walkComments = function walkComments(callback) {\n    var _this5 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.COMMENT) {\n        return callback.call(_this5, selector);\n      }\n    });\n  };\n  _proto.walkIds = function walkIds(callback) {\n    var _this6 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.ID) {\n        return callback.call(_this6, selector);\n      }\n    });\n  };\n  _proto.walkNesting = function walkNesting(callback) {\n    var _this7 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.NESTING) {\n        return callback.call(_this7, selector);\n      }\n    });\n  };\n  _proto.walkPseudos = function walkPseudos(callback) {\n    var _this8 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.PSEUDO) {\n        return callback.call(_this8, selector);\n      }\n    });\n  };\n  _proto.walkTags = function walkTags(callback) {\n    var _this9 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.TAG) {\n        return callback.call(_this9, selector);\n      }\n    });\n  };\n  _proto.walkUniversals = function walkUniversals(callback) {\n    var _this10 = this;\n    return this.walk(function (selector) {\n      if (selector.type === types.UNIVERSAL) {\n        return callback.call(_this10, selector);\n      }\n    });\n  };\n  _proto.split = function split(callback) {\n    var _this11 = this;\n    var current = [];\n    return this.reduce(function (memo, node, index) {\n      var split = callback.call(_this11, node);\n      current.push(node);\n      if (split) {\n        memo.push(current);\n        current = [];\n      } else if (index === _this11.length - 1) {\n        memo.push(current);\n      }\n      return memo;\n    }, []);\n  };\n  _proto.map = function map(callback) {\n    return this.nodes.map(callback);\n  };\n  _proto.reduce = function reduce(callback, memo) {\n    return this.nodes.reduce(callback, memo);\n  };\n  _proto.every = function every(callback) {\n    return this.nodes.every(callback);\n  };\n  _proto.some = function some(callback) {\n    return this.nodes.some(callback);\n  };\n  _proto.filter = function filter(callback) {\n    return this.nodes.filter(callback);\n  };\n  _proto.sort = function sort(callback) {\n    return this.nodes.sort(callback);\n  };\n  _proto.toString = function toString() {\n    return this.map(String).join('');\n  };\n  _createClass(Container, [{\n    key: \"first\",\n    get: function get() {\n      return this.at(0);\n    }\n  }, {\n    key: \"last\",\n    get: function get() {\n      return this.at(this.length - 1);\n    }\n  }, {\n    key: \"length\",\n    get: function get() {\n      return this.nodes.length;\n    }\n  }]);\n  return Container;\n}(_node[\"default\"]);\nexports[\"default\"] = Container;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _container = _interopRequireDefault(require(\"./container\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Root = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(Root, _Container);\n  function Root(opts) {\n    var _this;\n    _this = _Container.call(this, opts) || this;\n    _this.type = _types.ROOT;\n    return _this;\n  }\n  var _proto = Root.prototype;\n  _proto.toString = function toString() {\n    var str = this.reduce(function (memo, selector) {\n      memo.push(String(selector));\n      return memo;\n    }, []).join(',');\n    return this.trailingComma ? str + ',' : str;\n  };\n  _proto.error = function error(message, options) {\n    if (this._error) {\n      return this._error(message, options);\n    } else {\n      return new Error(message);\n    }\n  };\n  _createClass(Root, [{\n    key: \"errorGenerator\",\n    set: function set(handler) {\n      this._error = handler;\n    }\n  }]);\n  return Root;\n}(_container[\"default\"]);\nexports[\"default\"] = Root;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _container = _interopRequireDefault(require(\"./container\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Selector = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(Selector, _Container);\n  function Selector(opts) {\n    var _this;\n    _this = _Container.call(this, opts) || this;\n    _this.type = _types.SELECTOR;\n    return _this;\n  }\n  return Selector;\n}(_container[\"default\"]);\nexports[\"default\"] = Selector;\nmodule.exports = exports.default;", "/*! https://mths.be/cssesc v3.0.0 by @mathias */\n'use strict';\n\nvar object = {};\nvar hasOwnProperty = object.hasOwnProperty;\nvar merge = function merge(options, defaults) {\n\tif (!options) {\n\t\treturn defaults;\n\t}\n\tvar result = {};\n\tfor (var key in defaults) {\n\t\t// `if (defaults.hasOwnProperty(key) { \u2026 }` is not needed here, since\n\t\t// only recognized option names are used.\n\t\tresult[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];\n\t}\n\treturn result;\n};\n\nvar regexAnySingleEscape = /[ -,\\.\\/:-@\\[-\\^`\\{-~]/;\nvar regexSingleEscape = /[ -,\\.\\/:-@\\[\\]\\^`\\{-~]/;\nvar regexAlwaysEscape = /['\"\\\\]/;\nvar regexExcessiveSpaces = /(^|\\\\+)?(\\\\[A-F0-9]{1,6})\\x20(?![a-fA-F0-9\\x20])/g;\n\n// https://mathiasbynens.be/notes/css-escapes#css\nvar cssesc = function cssesc(string, options) {\n\toptions = merge(options, cssesc.options);\n\tif (options.quotes != 'single' && options.quotes != 'double') {\n\t\toptions.quotes = 'single';\n\t}\n\tvar quote = options.quotes == 'double' ? '\"' : '\\'';\n\tvar isIdentifier = options.isIdentifier;\n\n\tvar firstChar = string.charAt(0);\n\tvar output = '';\n\tvar counter = 0;\n\tvar length = string.length;\n\twhile (counter < length) {\n\t\tvar character = string.charAt(counter++);\n\t\tvar codePoint = character.charCodeAt();\n\t\tvar value = void 0;\n\t\t// If it\u2019s not a printable ASCII character\u2026\n\t\tif (codePoint < 0x20 || codePoint > 0x7E) {\n\t\t\tif (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {\n\t\t\t\t// It\u2019s a high surrogate, and there is a next character.\n\t\t\t\tvar extra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) {\n\t\t\t\t\t// next character is low surrogate\n\t\t\t\t\tcodePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;\n\t\t\t\t} else {\n\t\t\t\t\t// It\u2019s an unmatched surrogate; only append this code unit, in case\n\t\t\t\t\t// the next code unit is the high surrogate of a surrogate pair.\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t} else {\n\t\t\tif (options.escapeEverything) {\n\t\t\t\tif (regexAnySingleEscape.test(character)) {\n\t\t\t\t\tvalue = '\\\\' + character;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t\t}\n\t\t\t} else if (/[\\t\\n\\f\\r\\x0B]/.test(character)) {\n\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t} else if (character == '\\\\' || !isIdentifier && (character == '\"' && quote == character || character == '\\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {\n\t\t\t\tvalue = '\\\\' + character;\n\t\t\t} else {\n\t\t\t\tvalue = character;\n\t\t\t}\n\t\t}\n\t\toutput += value;\n\t}\n\n\tif (isIdentifier) {\n\t\tif (/^-[-\\d]/.test(output)) {\n\t\t\toutput = '\\\\-' + output.slice(1);\n\t\t} else if (/\\d/.test(firstChar)) {\n\t\t\toutput = '\\\\3' + firstChar + ' ' + output.slice(1);\n\t\t}\n\t}\n\n\t// Remove spaces after `\\HEX` escapes that are not followed by a hex digit,\n\t// since they\u2019re redundant. Note that this is only possible if the escape\n\t// sequence isn\u2019t preceded by an odd number of backslashes.\n\toutput = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {\n\t\tif ($1 && $1.length % 2) {\n\t\t\t// It\u2019s not safe to remove the space, so don\u2019t.\n\t\t\treturn $0;\n\t\t}\n\t\t// Strip the space.\n\t\treturn ($1 || '') + $2;\n\t});\n\n\tif (!isIdentifier && options.wrap) {\n\t\treturn quote + output + quote;\n\t}\n\treturn output;\n};\n\n// Expose default options (so they can be overridden globally).\ncssesc.options = {\n\t'escapeEverything': false,\n\t'isIdentifier': false,\n\t'quotes': 'single',\n\t'wrap': false\n};\n\ncssesc.version = '3.0.0';\n\nmodule.exports = cssesc;\n", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _cssesc = _interopRequireDefault(require(\"cssesc\"));\nvar _util = require(\"../util\");\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar ClassName = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(ClassName, _Node);\n  function ClassName(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.CLASS;\n    _this._constructed = true;\n    return _this;\n  }\n  var _proto = ClassName.prototype;\n  _proto.valueToString = function valueToString() {\n    return '.' + _Node.prototype.valueToString.call(this);\n  };\n  _createClass(ClassName, [{\n    key: \"value\",\n    get: function get() {\n      return this._value;\n    },\n    set: function set(v) {\n      if (this._constructed) {\n        var escaped = (0, _cssesc[\"default\"])(v, {\n          isIdentifier: true\n        });\n        if (escaped !== v) {\n          (0, _util.ensureObject)(this, \"raws\");\n          this.raws.value = escaped;\n        } else if (this.raws) {\n          delete this.raws.value;\n        }\n      }\n      this._value = v;\n    }\n  }]);\n  return ClassName;\n}(_node[\"default\"]);\nexports[\"default\"] = ClassName;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Comment = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Comment, _Node);\n  function Comment(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.COMMENT;\n    return _this;\n  }\n  return Comment;\n}(_node[\"default\"]);\nexports[\"default\"] = Comment;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar ID = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(ID, _Node);\n  function ID(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.ID;\n    return _this;\n  }\n  var _proto = ID.prototype;\n  _proto.valueToString = function valueToString() {\n    return '#' + _Node.prototype.valueToString.call(this);\n  };\n  return ID;\n}(_node[\"default\"]);\nexports[\"default\"] = ID;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _cssesc = _interopRequireDefault(require(\"cssesc\"));\nvar _util = require(\"../util\");\nvar _node = _interopRequireDefault(require(\"./node\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Namespace = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Namespace, _Node);\n  function Namespace() {\n    return _Node.apply(this, arguments) || this;\n  }\n  var _proto = Namespace.prototype;\n  _proto.qualifiedName = function qualifiedName(value) {\n    if (this.namespace) {\n      return this.namespaceString + \"|\" + value;\n    } else {\n      return value;\n    }\n  };\n  _proto.valueToString = function valueToString() {\n    return this.qualifiedName(_Node.prototype.valueToString.call(this));\n  };\n  _createClass(Namespace, [{\n    key: \"namespace\",\n    get: function get() {\n      return this._namespace;\n    },\n    set: function set(namespace) {\n      if (namespace === true || namespace === \"*\" || namespace === \"&\") {\n        this._namespace = namespace;\n        if (this.raws) {\n          delete this.raws.namespace;\n        }\n        return;\n      }\n      var escaped = (0, _cssesc[\"default\"])(namespace, {\n        isIdentifier: true\n      });\n      this._namespace = namespace;\n      if (escaped !== namespace) {\n        (0, _util.ensureObject)(this, \"raws\");\n        this.raws.namespace = escaped;\n      } else if (this.raws) {\n        delete this.raws.namespace;\n      }\n    }\n  }, {\n    key: \"ns\",\n    get: function get() {\n      return this._namespace;\n    },\n    set: function set(namespace) {\n      this.namespace = namespace;\n    }\n  }, {\n    key: \"namespaceString\",\n    get: function get() {\n      if (this.namespace) {\n        var ns = this.stringifyProperty(\"namespace\");\n        if (ns === true) {\n          return '';\n        } else {\n          return ns;\n        }\n      } else {\n        return '';\n      }\n    }\n  }]);\n  return Namespace;\n}(_node[\"default\"]);\nexports[\"default\"] = Namespace;\n;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _namespace = _interopRequireDefault(require(\"./namespace\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Tag = /*#__PURE__*/function (_Namespace) {\n  _inheritsLoose(Tag, _Namespace);\n  function Tag(opts) {\n    var _this;\n    _this = _Namespace.call(this, opts) || this;\n    _this.type = _types.TAG;\n    return _this;\n  }\n  return Tag;\n}(_namespace[\"default\"]);\nexports[\"default\"] = Tag;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar String = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(String, _Node);\n  function String(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.STRING;\n    return _this;\n  }\n  return String;\n}(_node[\"default\"]);\nexports[\"default\"] = String;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _container = _interopRequireDefault(require(\"./container\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Pseudo = /*#__PURE__*/function (_Container) {\n  _inheritsLoose(Pseudo, _Container);\n  function Pseudo(opts) {\n    var _this;\n    _this = _Container.call(this, opts) || this;\n    _this.type = _types.PSEUDO;\n    return _this;\n  }\n  var _proto = Pseudo.prototype;\n  _proto.toString = function toString() {\n    var params = this.length ? '(' + this.map(String).join(',') + ')' : '';\n    return [this.rawSpaceBefore, this.stringifyProperty(\"value\"), params, this.rawSpaceAfter].join('');\n  };\n  return Pseudo;\n}(_container[\"default\"]);\nexports[\"default\"] = Pseudo;\nmodule.exports = exports.default;", "\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nexports.unescapeValue = unescapeValue;\nvar _cssesc = _interopRequireDefault(require(\"cssesc\"));\nvar _unesc = _interopRequireDefault(require(\"../util/unesc\"));\nvar _namespace = _interopRequireDefault(require(\"./namespace\"));\nvar _types = require(\"./types\");\nvar _CSSESC_QUOTE_OPTIONS;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar deprecate = require(\"util-deprecate\");\nvar WRAPPED_IN_QUOTES = /^('|\")([^]*)\\1$/;\nvar warnOfDeprecatedValueAssignment = deprecate(function () {}, \"Assigning an attribute a value containing characters that might need to be escaped is deprecated. \" + \"Call attribute.setValue() instead.\");\nvar warnOfDeprecatedQuotedAssignment = deprecate(function () {}, \"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.\");\nvar warnOfDeprecatedConstructor = deprecate(function () {}, \"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.\");\nfunction unescapeValue(value) {\n  var deprecatedUsage = false;\n  var quoteMark = null;\n  var unescaped = value;\n  var m = unescaped.match(WRAPPED_IN_QUOTES);\n  if (m) {\n    quoteMark = m[1];\n    unescaped = m[2];\n  }\n  unescaped = (0, _unesc[\"default\"])(unescaped);\n  if (unescaped !== value) {\n    deprecatedUsage = true;\n  }\n  return {\n    deprecatedUsage: deprecatedUsage,\n    unescaped: unescaped,\n    quoteMark: quoteMark\n  };\n}\nfunction handleDeprecatedContructorOpts(opts) {\n  if (opts.quoteMark !== undefined) {\n    return opts;\n  }\n  if (opts.value === undefined) {\n    return opts;\n  }\n  warnOfDeprecatedConstructor();\n  var _unescapeValue = unescapeValue(opts.value),\n    quoteMark = _unescapeValue.quoteMark,\n    unescaped = _unescapeValue.unescaped;\n  if (!opts.raws) {\n    opts.raws = {};\n  }\n  if (opts.raws.value === undefined) {\n    opts.raws.value = opts.value;\n  }\n  opts.value = unescaped;\n  opts.quoteMark = quoteMark;\n  return opts;\n}\nvar Attribute = /*#__PURE__*/function (_Namespace) {\n  _inheritsLoose(Attribute, _Namespace);\n  function Attribute(opts) {\n    var _this;\n    if (opts === void 0) {\n      opts = {};\n    }\n    _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;\n    _this.type = _types.ATTRIBUTE;\n    _this.raws = _this.raws || {};\n    Object.defineProperty(_this.raws, 'unquoted', {\n      get: deprecate(function () {\n        return _this.value;\n      }, \"attr.raws.unquoted is deprecated. Call attr.value instead.\"),\n      set: deprecate(function () {\n        return _this.value;\n      }, \"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.\")\n    });\n    _this._constructed = true;\n    return _this;\n  }\n\n  /**\n   * Returns the Attribute's value quoted such that it would be legal to use\n   * in the value of a css file. The original value's quotation setting\n   * used for stringification is left unchanged. See `setValue(value, options)`\n   * if you want to control the quote settings of a new value for the attribute.\n   *\n   * You can also change the quotation used for the current value by setting quoteMark.\n   *\n   * Options:\n   *   * quoteMark {'\"' | \"'\" | null} - Use this value to quote the value. If this\n   *     option is not set, the original value for quoteMark will be used. If\n   *     indeterminate, a double quote is used. The legal values are:\n   *     * `null` - the value will be unquoted and characters will be escaped as necessary.\n   *     * `'` - the value will be quoted with a single quote and single quotes are escaped.\n   *     * `\"` - the value will be quoted with a double quote and double quotes are escaped.\n   *   * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark\n   *     over the quoteMark option value.\n   *   * smart {boolean} - if true, will select a quote mark based on the value\n   *     and the other options specified here. See the `smartQuoteMark()`\n   *     method.\n   **/\n  var _proto = Attribute.prototype;\n  _proto.getQuotedValue = function getQuotedValue(options) {\n    if (options === void 0) {\n      options = {};\n    }\n    var quoteMark = this._determineQuoteMark(options);\n    var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];\n    var escaped = (0, _cssesc[\"default\"])(this._value, cssescopts);\n    return escaped;\n  };\n  _proto._determineQuoteMark = function _determineQuoteMark(options) {\n    return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);\n  }\n\n  /**\n   * Set the unescaped value with the specified quotation options. The value\n   * provided must not include any wrapping quote marks -- those quotes will\n   * be interpreted as part of the value and escaped accordingly.\n   */;\n  _proto.setValue = function setValue(value, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    this._value = value;\n    this._quoteMark = this._determineQuoteMark(options);\n    this._syncRawValue();\n  }\n\n  /**\n   * Intelligently select a quoteMark value based on the value's contents. If\n   * the value is a legal CSS ident, it will not be quoted. Otherwise a quote\n   * mark will be picked that minimizes the number of escapes.\n   *\n   * If there's no clear winner, the quote mark from these options is used,\n   * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is\n   * true). If the quoteMark is unspecified, a double quote is used.\n   *\n   * @param options This takes the quoteMark and preferCurrentQuoteMark options\n   * from the quoteValue method.\n   */;\n  _proto.smartQuoteMark = function smartQuoteMark(options) {\n    var v = this.value;\n    var numSingleQuotes = v.replace(/[^']/g, '').length;\n    var numDoubleQuotes = v.replace(/[^\"]/g, '').length;\n    if (numSingleQuotes + numDoubleQuotes === 0) {\n      var escaped = (0, _cssesc[\"default\"])(v, {\n        isIdentifier: true\n      });\n      if (escaped === v) {\n        return Attribute.NO_QUOTE;\n      } else {\n        var pref = this.preferredQuoteMark(options);\n        if (pref === Attribute.NO_QUOTE) {\n          // pick a quote mark that isn't none and see if it's smaller\n          var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;\n          var opts = CSSESC_QUOTE_OPTIONS[quote];\n          var quoteValue = (0, _cssesc[\"default\"])(v, opts);\n          if (quoteValue.length < escaped.length) {\n            return quote;\n          }\n        }\n        return pref;\n      }\n    } else if (numDoubleQuotes === numSingleQuotes) {\n      return this.preferredQuoteMark(options);\n    } else if (numDoubleQuotes < numSingleQuotes) {\n      return Attribute.DOUBLE_QUOTE;\n    } else {\n      return Attribute.SINGLE_QUOTE;\n    }\n  }\n\n  /**\n   * Selects the preferred quote mark based on the options and the current quote mark value.\n   * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`\n   * instead.\n   */;\n  _proto.preferredQuoteMark = function preferredQuoteMark(options) {\n    var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;\n    if (quoteMark === undefined) {\n      quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;\n    }\n    if (quoteMark === undefined) {\n      quoteMark = Attribute.DOUBLE_QUOTE;\n    }\n    return quoteMark;\n  };\n  _proto._syncRawValue = function _syncRawValue() {\n    var rawValue = (0, _cssesc[\"default\"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);\n    if (rawValue === this._value) {\n      if (this.raws) {\n        delete this.raws.value;\n      }\n    } else {\n      this.raws.value = rawValue;\n    }\n  };\n  _proto._handleEscapes = function _handleEscapes(prop, value) {\n    if (this._constructed) {\n      var escaped = (0, _cssesc[\"default\"])(value, {\n        isIdentifier: true\n      });\n      if (escaped !== value) {\n        this.raws[prop] = escaped;\n      } else {\n        delete this.raws[prop];\n      }\n    }\n  };\n  _proto._spacesFor = function _spacesFor(name) {\n    var attrSpaces = {\n      before: '',\n      after: ''\n    };\n    var spaces = this.spaces[name] || {};\n    var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};\n    return Object.assign(attrSpaces, spaces, rawSpaces);\n  };\n  _proto._stringFor = function _stringFor(name, spaceName, concat) {\n    if (spaceName === void 0) {\n      spaceName = name;\n    }\n    if (concat === void 0) {\n      concat = defaultAttrConcat;\n    }\n    var attrSpaces = this._spacesFor(spaceName);\n    return concat(this.stringifyProperty(name), attrSpaces);\n  }\n\n  /**\n   * returns the offset of the attribute part specified relative to the\n   * start of the node of the output string.\n   *\n   * * \"ns\" - alias for \"namespace\"\n   * * \"namespace\" - the namespace if it exists.\n   * * \"attribute\" - the attribute name\n   * * \"attributeNS\" - the start of the attribute or its namespace\n   * * \"operator\" - the match operator of the attribute\n   * * \"value\" - The value (string or identifier)\n   * * \"insensitive\" - the case insensitivity flag;\n   * @param part One of the possible values inside an attribute.\n   * @returns -1 if the name is invalid or the value doesn't exist in this attribute.\n   */;\n  _proto.offsetOf = function offsetOf(name) {\n    var count = 1;\n    var attributeSpaces = this._spacesFor(\"attribute\");\n    count += attributeSpaces.before.length;\n    if (name === \"namespace\" || name === \"ns\") {\n      return this.namespace ? count : -1;\n    }\n    if (name === \"attributeNS\") {\n      return count;\n    }\n    count += this.namespaceString.length;\n    if (this.namespace) {\n      count += 1;\n    }\n    if (name === \"attribute\") {\n      return count;\n    }\n    count += this.stringifyProperty(\"attribute\").length;\n    count += attributeSpaces.after.length;\n    var operatorSpaces = this._spacesFor(\"operator\");\n    count += operatorSpaces.before.length;\n    var operator = this.stringifyProperty(\"operator\");\n    if (name === \"operator\") {\n      return operator ? count : -1;\n    }\n    count += operator.length;\n    count += operatorSpaces.after.length;\n    var valueSpaces = this._spacesFor(\"value\");\n    count += valueSpaces.before.length;\n    var value = this.stringifyProperty(\"value\");\n    if (name === \"value\") {\n      return value ? count : -1;\n    }\n    count += value.length;\n    count += valueSpaces.after.length;\n    var insensitiveSpaces = this._spacesFor(\"insensitive\");\n    count += insensitiveSpaces.before.length;\n    if (name === \"insensitive\") {\n      return this.insensitive ? count : -1;\n    }\n    return -1;\n  };\n  _proto.toString = function toString() {\n    var _this2 = this;\n    var selector = [this.rawSpaceBefore, '['];\n    selector.push(this._stringFor('qualifiedAttribute', 'attribute'));\n    if (this.operator && (this.value || this.value === '')) {\n      selector.push(this._stringFor('operator'));\n      selector.push(this._stringFor('value'));\n      selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) {\n        if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) {\n          attrSpaces.before = \" \";\n        }\n        return defaultAttrConcat(attrValue, attrSpaces);\n      }));\n    }\n    selector.push(']');\n    selector.push(this.rawSpaceAfter);\n    return selector.join('');\n  };\n  _createClass(Attribute, [{\n    key: \"quoted\",\n    get: function get() {\n      var qm = this.quoteMark;\n      return qm === \"'\" || qm === '\"';\n    },\n    set: function set(value) {\n      warnOfDeprecatedQuotedAssignment();\n    }\n\n    /**\n     * returns a single (`'`) or double (`\"`) quote character if the value is quoted.\n     * returns `null` if the value is not quoted.\n     * returns `undefined` if the quotation state is unknown (this can happen when\n     * the attribute is constructed without specifying a quote mark.)\n     */\n  }, {\n    key: \"quoteMark\",\n    get: function get() {\n      return this._quoteMark;\n    }\n\n    /**\n     * Set the quote mark to be used by this attribute's value.\n     * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute\n     * value is updated accordingly.\n     *\n     * @param {\"'\" | '\"' | null} quoteMark The quote mark or `null` if the value should be unquoted.\n     */,\n    set: function set(quoteMark) {\n      if (!this._constructed) {\n        this._quoteMark = quoteMark;\n        return;\n      }\n      if (this._quoteMark !== quoteMark) {\n        this._quoteMark = quoteMark;\n        this._syncRawValue();\n      }\n    }\n  }, {\n    key: \"qualifiedAttribute\",\n    get: function get() {\n      return this.qualifiedName(this.raws.attribute || this.attribute);\n    }\n  }, {\n    key: \"insensitiveFlag\",\n    get: function get() {\n      return this.insensitive ? 'i' : '';\n    }\n  }, {\n    key: \"value\",\n    get: function get() {\n      return this._value;\n    },\n    set:\n    /**\n     * Before 3.0, the value had to be set to an escaped value including any wrapped\n     * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value\n     * is unescaped during parsing and any quote marks are removed.\n     *\n     * Because the ambiguity of this semantic change, if you set `attr.value = newValue`,\n     * a deprecation warning is raised when the new value contains any characters that would\n     * require escaping (including if it contains wrapped quotes).\n     *\n     * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe\n     * how the new value is quoted.\n     */\n    function set(v) {\n      if (this._constructed) {\n        var _unescapeValue2 = unescapeValue(v),\n          deprecatedUsage = _unescapeValue2.deprecatedUsage,\n          unescaped = _unescapeValue2.unescaped,\n          quoteMark = _unescapeValue2.quoteMark;\n        if (deprecatedUsage) {\n          warnOfDeprecatedValueAssignment();\n        }\n        if (unescaped === this._value && quoteMark === this._quoteMark) {\n          return;\n        }\n        this._value = unescaped;\n        this._quoteMark = quoteMark;\n        this._syncRawValue();\n      } else {\n        this._value = v;\n      }\n    }\n  }, {\n    key: \"insensitive\",\n    get: function get() {\n      return this._insensitive;\n    }\n\n    /**\n     * Set the case insensitive flag.\n     * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`\n     * of the attribute is updated accordingly.\n     *\n     * @param {true | false} insensitive true if the attribute should match case-insensitively.\n     */,\n    set: function set(insensitive) {\n      if (!insensitive) {\n        this._insensitive = false;\n\n        // \"i\" and \"I\" can be used in \"this.raws.insensitiveFlag\" to store the original notation.\n        // When setting `attr.insensitive = false` both should be erased to ensure correct serialization.\n        if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) {\n          this.raws.insensitiveFlag = undefined;\n        }\n      }\n      this._insensitive = insensitive;\n    }\n  }, {\n    key: \"attribute\",\n    get: function get() {\n      return this._attribute;\n    },\n    set: function set(name) {\n      this._handleEscapes(\"attribute\", name);\n      this._attribute = name;\n    }\n  }]);\n  return Attribute;\n}(_namespace[\"default\"]);\nexports[\"default\"] = Attribute;\nAttribute.NO_QUOTE = null;\nAttribute.SINGLE_QUOTE = \"'\";\nAttribute.DOUBLE_QUOTE = '\"';\nvar CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {\n  \"'\": {\n    quotes: 'single',\n    wrap: true\n  },\n  '\"': {\n    quotes: 'double',\n    wrap: true\n  }\n}, _CSSESC_QUOTE_OPTIONS[null] = {\n  isIdentifier: true\n}, _CSSESC_QUOTE_OPTIONS);\nfunction defaultAttrConcat(attrValue, attrSpaces) {\n  return \"\" + attrSpaces.before + attrValue + attrSpaces.after;\n}", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _namespace = _interopRequireDefault(require(\"./namespace\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Universal = /*#__PURE__*/function (_Namespace) {\n  _inheritsLoose(Universal, _Namespace);\n  function Universal(opts) {\n    var _this;\n    _this = _Namespace.call(this, opts) || this;\n    _this.type = _types.UNIVERSAL;\n    _this.value = '*';\n    return _this;\n  }\n  return Universal;\n}(_namespace[\"default\"]);\nexports[\"default\"] = Universal;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Combinator = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Combinator, _Node);\n  function Combinator(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.COMBINATOR;\n    return _this;\n  }\n  return Combinator;\n}(_node[\"default\"]);\nexports[\"default\"] = Combinator;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _node = _interopRequireDefault(require(\"./node\"));\nvar _types = require(\"./types\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar Nesting = /*#__PURE__*/function (_Node) {\n  _inheritsLoose(Nesting, _Node);\n  function Nesting(opts) {\n    var _this;\n    _this = _Node.call(this, opts) || this;\n    _this.type = _types.NESTING;\n    _this.value = '&';\n    return _this;\n  }\n  return Nesting;\n}(_node[\"default\"]);\nexports[\"default\"] = Nesting;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = sortAscending;\nfunction sortAscending(list) {\n  return list.sort(function (a, b) {\n    return a - b;\n  });\n}\n;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;\nvar ampersand = 38; // `&`.charCodeAt(0);\nexports.ampersand = ampersand;\nvar asterisk = 42; // `*`.charCodeAt(0);\nexports.asterisk = asterisk;\nvar at = 64; // `@`.charCodeAt(0);\nexports.at = at;\nvar comma = 44; // `,`.charCodeAt(0);\nexports.comma = comma;\nvar colon = 58; // `:`.charCodeAt(0);\nexports.colon = colon;\nvar semicolon = 59; // `;`.charCodeAt(0);\nexports.semicolon = semicolon;\nvar openParenthesis = 40; // `(`.charCodeAt(0);\nexports.openParenthesis = openParenthesis;\nvar closeParenthesis = 41; // `)`.charCodeAt(0);\nexports.closeParenthesis = closeParenthesis;\nvar openSquare = 91; // `[`.charCodeAt(0);\nexports.openSquare = openSquare;\nvar closeSquare = 93; // `]`.charCodeAt(0);\nexports.closeSquare = closeSquare;\nvar dollar = 36; // `$`.charCodeAt(0);\nexports.dollar = dollar;\nvar tilde = 126; // `~`.charCodeAt(0);\nexports.tilde = tilde;\nvar caret = 94; // `^`.charCodeAt(0);\nexports.caret = caret;\nvar plus = 43; // `+`.charCodeAt(0);\nexports.plus = plus;\nvar equals = 61; // `=`.charCodeAt(0);\nexports.equals = equals;\nvar pipe = 124; // `|`.charCodeAt(0);\nexports.pipe = pipe;\nvar greaterThan = 62; // `>`.charCodeAt(0);\nexports.greaterThan = greaterThan;\nvar space = 32; // ` `.charCodeAt(0);\nexports.space = space;\nvar singleQuote = 39; // `'`.charCodeAt(0);\nexports.singleQuote = singleQuote;\nvar doubleQuote = 34; // `\"`.charCodeAt(0);\nexports.doubleQuote = doubleQuote;\nvar slash = 47; // `/`.charCodeAt(0);\nexports.slash = slash;\nvar bang = 33; // `!`.charCodeAt(0);\nexports.bang = bang;\nvar backslash = 92; // '\\\\'.charCodeAt(0);\nexports.backslash = backslash;\nvar cr = 13; // '\\r'.charCodeAt(0);\nexports.cr = cr;\nvar feed = 12; // '\\f'.charCodeAt(0);\nexports.feed = feed;\nvar newline = 10; // '\\n'.charCodeAt(0);\nexports.newline = newline;\nvar tab = 9; // '\\t'.charCodeAt(0);\n\n// Expose aliases primarily for readability.\nexports.tab = tab;\nvar str = singleQuote;\n\n// No good single character representation!\nexports.str = str;\nvar comment = -1;\nexports.comment = comment;\nvar word = -2;\nexports.word = word;\nvar combinator = -3;\nexports.combinator = combinator;", "\"use strict\";\n\nexports.__esModule = true;\nexports.FIELDS = void 0;\nexports[\"default\"] = tokenize;\nvar t = _interopRequireWildcard(require(\"./tokenTypes\"));\nvar _unescapable, _wordDelimiters;\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nvar unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);\nvar wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);\nvar hex = {};\nvar hexChars = \"0123456789abcdefABCDEF\";\nfor (var i = 0; i < hexChars.length; i++) {\n  hex[hexChars.charCodeAt(i)] = true;\n}\n\n/**\n *  Returns the last index of the bar css word\n * @param {string} css The string in which the word begins\n * @param {number} start The index into the string where word's first letter occurs\n */\nfunction consumeWord(css, start) {\n  var next = start;\n  var code;\n  do {\n    code = css.charCodeAt(next);\n    if (wordDelimiters[code]) {\n      return next - 1;\n    } else if (code === t.backslash) {\n      next = consumeEscape(css, next) + 1;\n    } else {\n      // All other characters are part of the word\n      next++;\n    }\n  } while (next < css.length);\n  return next - 1;\n}\n\n/**\n *  Returns the last index of the escape sequence\n * @param {string} css The string in which the sequence begins\n * @param {number} start The index into the string where escape character (`\\`) occurs.\n */\nfunction consumeEscape(css, start) {\n  var next = start;\n  var code = css.charCodeAt(next + 1);\n  if (unescapable[code]) {\n    // just consume the escape char\n  } else if (hex[code]) {\n    var hexDigits = 0;\n    // consume up to 6 hex chars\n    do {\n      next++;\n      hexDigits++;\n      code = css.charCodeAt(next + 1);\n    } while (hex[code] && hexDigits < 6);\n    // if fewer than 6 hex chars, a trailing space ends the escape\n    if (hexDigits < 6 && code === t.space) {\n      next++;\n    }\n  } else {\n    // the next char is part of the current word\n    next++;\n  }\n  return next;\n}\nvar FIELDS = {\n  TYPE: 0,\n  START_LINE: 1,\n  START_COL: 2,\n  END_LINE: 3,\n  END_COL: 4,\n  START_POS: 5,\n  END_POS: 6\n};\nexports.FIELDS = FIELDS;\nfunction tokenize(input) {\n  var tokens = [];\n  var css = input.css.valueOf();\n  var _css = css,\n    length = _css.length;\n  var offset = -1;\n  var line = 1;\n  var start = 0;\n  var end = 0;\n  var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;\n  function unclosed(what, fix) {\n    if (input.safe) {\n      // fyi: this is never set to true.\n      css += fix;\n      next = css.length - 1;\n    } else {\n      throw input.error('Unclosed ' + what, line, start - offset, start);\n    }\n  }\n  while (start < length) {\n    code = css.charCodeAt(start);\n    if (code === t.newline) {\n      offset = start;\n      line += 1;\n    }\n    switch (code) {\n      case t.space:\n      case t.tab:\n      case t.newline:\n      case t.cr:\n      case t.feed:\n        next = start;\n        do {\n          next += 1;\n          code = css.charCodeAt(next);\n          if (code === t.newline) {\n            offset = next;\n            line += 1;\n          }\n        } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);\n        tokenType = t.space;\n        endLine = line;\n        endColumn = next - offset - 1;\n        end = next;\n        break;\n      case t.plus:\n      case t.greaterThan:\n      case t.tilde:\n      case t.pipe:\n        next = start;\n        do {\n          next += 1;\n          code = css.charCodeAt(next);\n        } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);\n        tokenType = t.combinator;\n        endLine = line;\n        endColumn = start - offset;\n        end = next;\n        break;\n\n      // Consume these characters as single tokens.\n      case t.asterisk:\n      case t.ampersand:\n      case t.bang:\n      case t.comma:\n      case t.equals:\n      case t.dollar:\n      case t.caret:\n      case t.openSquare:\n      case t.closeSquare:\n      case t.colon:\n      case t.semicolon:\n      case t.openParenthesis:\n      case t.closeParenthesis:\n        next = start;\n        tokenType = code;\n        endLine = line;\n        endColumn = start - offset;\n        end = next + 1;\n        break;\n      case t.singleQuote:\n      case t.doubleQuote:\n        quote = code === t.singleQuote ? \"'\" : '\"';\n        next = start;\n        do {\n          escaped = false;\n          next = css.indexOf(quote, next + 1);\n          if (next === -1) {\n            unclosed('quote', quote);\n          }\n          escapePos = next;\n          while (css.charCodeAt(escapePos - 1) === t.backslash) {\n            escapePos -= 1;\n            escaped = !escaped;\n          }\n        } while (escaped);\n        tokenType = t.str;\n        endLine = line;\n        endColumn = start - offset;\n        end = next + 1;\n        break;\n      default:\n        if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {\n          next = css.indexOf('*/', start + 2) + 1;\n          if (next === 0) {\n            unclosed('comment', '*/');\n          }\n          content = css.slice(start, next + 1);\n          lines = content.split('\\n');\n          last = lines.length - 1;\n          if (last > 0) {\n            nextLine = line + last;\n            nextOffset = next - lines[last].length;\n          } else {\n            nextLine = line;\n            nextOffset = offset;\n          }\n          tokenType = t.comment;\n          line = nextLine;\n          endLine = nextLine;\n          endColumn = next - nextOffset;\n        } else if (code === t.slash) {\n          next = start;\n          tokenType = code;\n          endLine = line;\n          endColumn = start - offset;\n          end = next + 1;\n        } else {\n          next = consumeWord(css, start);\n          tokenType = t.word;\n          endLine = line;\n          endColumn = next - offset;\n        }\n        end = next + 1;\n        break;\n    }\n\n    // Ensure that the token structure remains consistent\n    tokens.push([tokenType,\n    // [0] Token type\n    line,\n    // [1] Starting line\n    start - offset,\n    // [2] Starting column\n    endLine,\n    // [3] Ending line\n    endColumn,\n    // [4] Ending column\n    start,\n    // [5] Start position / Source index\n    end // [6] End position\n    ]);\n\n    // Reset offset for the next token\n    if (nextOffset) {\n      offset = nextOffset;\n      nextOffset = null;\n    }\n    start = end;\n  }\n  return tokens;\n}", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _root = _interopRequireDefault(require(\"./selectors/root\"));\nvar _selector = _interopRequireDefault(require(\"./selectors/selector\"));\nvar _className = _interopRequireDefault(require(\"./selectors/className\"));\nvar _comment = _interopRequireDefault(require(\"./selectors/comment\"));\nvar _id = _interopRequireDefault(require(\"./selectors/id\"));\nvar _tag = _interopRequireDefault(require(\"./selectors/tag\"));\nvar _string = _interopRequireDefault(require(\"./selectors/string\"));\nvar _pseudo = _interopRequireDefault(require(\"./selectors/pseudo\"));\nvar _attribute = _interopRequireWildcard(require(\"./selectors/attribute\"));\nvar _universal = _interopRequireDefault(require(\"./selectors/universal\"));\nvar _combinator = _interopRequireDefault(require(\"./selectors/combinator\"));\nvar _nesting = _interopRequireDefault(require(\"./selectors/nesting\"));\nvar _sortAscending = _interopRequireDefault(require(\"./sortAscending\"));\nvar _tokenize = _interopRequireWildcard(require(\"./tokenize\"));\nvar tokens = _interopRequireWildcard(require(\"./tokenTypes\"));\nvar types = _interopRequireWildcard(require(\"./selectors/types\"));\nvar _util = require(\"./util\");\nvar _WHITESPACE_TOKENS, _Object$assign;\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nvar WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);\nvar WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));\nfunction tokenStart(token) {\n  return {\n    line: token[_tokenize.FIELDS.START_LINE],\n    column: token[_tokenize.FIELDS.START_COL]\n  };\n}\nfunction tokenEnd(token) {\n  return {\n    line: token[_tokenize.FIELDS.END_LINE],\n    column: token[_tokenize.FIELDS.END_COL]\n  };\n}\nfunction getSource(startLine, startColumn, endLine, endColumn) {\n  return {\n    start: {\n      line: startLine,\n      column: startColumn\n    },\n    end: {\n      line: endLine,\n      column: endColumn\n    }\n  };\n}\nfunction getTokenSource(token) {\n  return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);\n}\nfunction getTokenSourceSpan(startToken, endToken) {\n  if (!startToken) {\n    return undefined;\n  }\n  return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);\n}\nfunction unescapeProp(node, prop) {\n  var value = node[prop];\n  if (typeof value !== \"string\") {\n    return;\n  }\n  if (value.indexOf(\"\\\\\") !== -1) {\n    (0, _util.ensureObject)(node, 'raws');\n    node[prop] = (0, _util.unesc)(value);\n    if (node.raws[prop] === undefined) {\n      node.raws[prop] = value;\n    }\n  }\n  return node;\n}\nfunction indexesOf(array, item) {\n  var i = -1;\n  var indexes = [];\n  while ((i = array.indexOf(item, i + 1)) !== -1) {\n    indexes.push(i);\n  }\n  return indexes;\n}\nfunction uniqs() {\n  var list = Array.prototype.concat.apply([], arguments);\n  return list.filter(function (item, i) {\n    return i === list.indexOf(item);\n  });\n}\nvar Parser = /*#__PURE__*/function () {\n  function Parser(rule, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    this.rule = rule;\n    this.options = Object.assign({\n      lossy: false,\n      safe: false\n    }, options);\n    this.position = 0;\n    this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector;\n    this.tokens = (0, _tokenize[\"default\"])({\n      css: this.css,\n      error: this._errorGenerator(),\n      safe: this.options.safe\n    });\n    var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);\n    this.root = new _root[\"default\"]({\n      source: rootSource\n    });\n    this.root.errorGenerator = this._errorGenerator();\n    var selector = new _selector[\"default\"]({\n      source: {\n        start: {\n          line: 1,\n          column: 1\n        }\n      },\n      sourceIndex: 0\n    });\n    this.root.append(selector);\n    this.current = selector;\n    this.loop();\n  }\n  var _proto = Parser.prototype;\n  _proto._errorGenerator = function _errorGenerator() {\n    var _this = this;\n    return function (message, errorOptions) {\n      if (typeof _this.rule === 'string') {\n        return new Error(message);\n      }\n      return _this.rule.error(message, errorOptions);\n    };\n  };\n  _proto.attribute = function attribute() {\n    var attr = [];\n    var startingToken = this.currToken;\n    this.position++;\n    while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {\n      attr.push(this.currToken);\n      this.position++;\n    }\n    if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {\n      return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]);\n    }\n    var len = attr.length;\n    var node = {\n      source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),\n      sourceIndex: startingToken[_tokenize.FIELDS.START_POS]\n    };\n    if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) {\n      return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]);\n    }\n    var pos = 0;\n    var spaceBefore = '';\n    var commentBefore = '';\n    var lastAdded = null;\n    var spaceAfterMeaningfulToken = false;\n    while (pos < len) {\n      var token = attr[pos];\n      var content = this.content(token);\n      var next = attr[pos + 1];\n      switch (token[_tokenize.FIELDS.TYPE]) {\n        case tokens.space:\n          // if (\n          //     len === 1 ||\n          //     pos === 0 && this.content(next) === '|'\n          // ) {\n          //     return this.expected('attribute', token[TOKEN.START_POS], content);\n          // }\n          spaceAfterMeaningfulToken = true;\n          if (this.options.lossy) {\n            break;\n          }\n          if (lastAdded) {\n            (0, _util.ensureObject)(node, 'spaces', lastAdded);\n            var prevContent = node.spaces[lastAdded].after || '';\n            node.spaces[lastAdded].after = prevContent + content;\n            var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null;\n            if (existingComment) {\n              node.raws.spaces[lastAdded].after = existingComment + content;\n            }\n          } else {\n            spaceBefore = spaceBefore + content;\n            commentBefore = commentBefore + content;\n          }\n          break;\n        case tokens.asterisk:\n          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n            node.operator = content;\n            lastAdded = 'operator';\n          } else if ((!node.namespace || lastAdded === \"namespace\" && !spaceAfterMeaningfulToken) && next) {\n            if (spaceBefore) {\n              (0, _util.ensureObject)(node, 'spaces', 'attribute');\n              node.spaces.attribute.before = spaceBefore;\n              spaceBefore = '';\n            }\n            if (commentBefore) {\n              (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');\n              node.raws.spaces.attribute.before = spaceBefore;\n              commentBefore = '';\n            }\n            node.namespace = (node.namespace || \"\") + content;\n            var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null;\n            if (rawValue) {\n              node.raws.namespace += content;\n            }\n            lastAdded = 'namespace';\n          }\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.dollar:\n          if (lastAdded === \"value\") {\n            var oldRawValue = (0, _util.getProp)(node, 'raws', 'value');\n            node.value += \"$\";\n            if (oldRawValue) {\n              node.raws.value = oldRawValue + \"$\";\n            }\n            break;\n          }\n        // Falls through\n        case tokens.caret:\n          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n            node.operator = content;\n            lastAdded = 'operator';\n          }\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.combinator:\n          if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n            node.operator = content;\n            lastAdded = 'operator';\n          }\n          if (content !== '|') {\n            spaceAfterMeaningfulToken = false;\n            break;\n          }\n          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n            node.operator = content;\n            lastAdded = 'operator';\n          } else if (!node.namespace && !node.attribute) {\n            node.namespace = true;\n          }\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.word:\n          if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals &&\n          // this look-ahead probably fails with comment nodes involved.\n          !node.operator && !node.namespace) {\n            node.namespace = content;\n            lastAdded = 'namespace';\n          } else if (!node.attribute || lastAdded === \"attribute\" && !spaceAfterMeaningfulToken) {\n            if (spaceBefore) {\n              (0, _util.ensureObject)(node, 'spaces', 'attribute');\n              node.spaces.attribute.before = spaceBefore;\n              spaceBefore = '';\n            }\n            if (commentBefore) {\n              (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');\n              node.raws.spaces.attribute.before = commentBefore;\n              commentBefore = '';\n            }\n            node.attribute = (node.attribute || \"\") + content;\n            var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null;\n            if (_rawValue) {\n              node.raws.attribute += content;\n            }\n            lastAdded = 'attribute';\n          } else if (!node.value && node.value !== \"\" || lastAdded === \"value\" && !(spaceAfterMeaningfulToken || node.quoteMark)) {\n            var _unescaped = (0, _util.unesc)(content);\n            var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || '';\n            var oldValue = node.value || '';\n            node.value = oldValue + _unescaped;\n            node.quoteMark = null;\n            if (_unescaped !== content || _oldRawValue) {\n              (0, _util.ensureObject)(node, 'raws');\n              node.raws.value = (_oldRawValue || oldValue) + content;\n            }\n            lastAdded = 'value';\n          } else {\n            var insensitive = content === 'i' || content === \"I\";\n            if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) {\n              node.insensitive = insensitive;\n              if (!insensitive || content === \"I\") {\n                (0, _util.ensureObject)(node, 'raws');\n                node.raws.insensitiveFlag = content;\n              }\n              lastAdded = 'insensitive';\n              if (spaceBefore) {\n                (0, _util.ensureObject)(node, 'spaces', 'insensitive');\n                node.spaces.insensitive.before = spaceBefore;\n                spaceBefore = '';\n              }\n              if (commentBefore) {\n                (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive');\n                node.raws.spaces.insensitive.before = commentBefore;\n                commentBefore = '';\n              }\n            } else if (node.value || node.value === '') {\n              lastAdded = 'value';\n              node.value += content;\n              if (node.raws.value) {\n                node.raws.value += content;\n              }\n            }\n          }\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.str:\n          if (!node.attribute || !node.operator) {\n            return this.error(\"Expected an attribute followed by an operator preceding the string.\", {\n              index: token[_tokenize.FIELDS.START_POS]\n            });\n          }\n          var _unescapeValue = (0, _attribute.unescapeValue)(content),\n            unescaped = _unescapeValue.unescaped,\n            quoteMark = _unescapeValue.quoteMark;\n          node.value = unescaped;\n          node.quoteMark = quoteMark;\n          lastAdded = 'value';\n          (0, _util.ensureObject)(node, 'raws');\n          node.raws.value = content;\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.equals:\n          if (!node.attribute) {\n            return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content);\n          }\n          if (node.value) {\n            return this.error('Unexpected \"=\" found; an operator was already defined.', {\n              index: token[_tokenize.FIELDS.START_POS]\n            });\n          }\n          node.operator = node.operator ? node.operator + content : content;\n          lastAdded = 'operator';\n          spaceAfterMeaningfulToken = false;\n          break;\n        case tokens.comment:\n          if (lastAdded) {\n            if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') {\n              var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || '';\n              var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment;\n              (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded);\n              node.raws.spaces[lastAdded].after = rawLastComment + content;\n            } else {\n              var lastValue = node[lastAdded] || '';\n              var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue;\n              (0, _util.ensureObject)(node, 'raws');\n              node.raws[lastAdded] = rawLastValue + content;\n            }\n          } else {\n            commentBefore = commentBefore + content;\n          }\n          break;\n        default:\n          return this.error(\"Unexpected \\\"\" + content + \"\\\" found.\", {\n            index: token[_tokenize.FIELDS.START_POS]\n          });\n      }\n      pos++;\n    }\n    unescapeProp(node, \"attribute\");\n    unescapeProp(node, \"namespace\");\n    this.newNode(new _attribute[\"default\"](node));\n    this.position++;\n  }\n\n  /**\n   * return a node containing meaningless garbage up to (but not including) the specified token position.\n   * if the token position is negative, all remaining tokens are consumed.\n   *\n   * This returns an array containing a single string node if all whitespace,\n   * otherwise an array of comment nodes with space before and after.\n   *\n   * These tokens are not added to the current selector, the caller can add them or use them to amend\n   * a previous node's space metadata.\n   *\n   * In lossy mode, this returns only comments.\n   */;\n  _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {\n    if (stopPosition < 0) {\n      stopPosition = this.tokens.length;\n    }\n    var startPosition = this.position;\n    var nodes = [];\n    var space = \"\";\n    var lastComment = undefined;\n    do {\n      if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {\n        if (!this.options.lossy) {\n          space += this.content();\n        }\n      } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {\n        var spaces = {};\n        if (space) {\n          spaces.before = space;\n          space = \"\";\n        }\n        lastComment = new _comment[\"default\"]({\n          value: this.content(),\n          source: getTokenSource(this.currToken),\n          sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],\n          spaces: spaces\n        });\n        nodes.push(lastComment);\n      }\n    } while (++this.position < stopPosition);\n    if (space) {\n      if (lastComment) {\n        lastComment.spaces.after = space;\n      } else if (!this.options.lossy) {\n        var firstToken = this.tokens[startPosition];\n        var lastToken = this.tokens[this.position - 1];\n        nodes.push(new _string[\"default\"]({\n          value: '',\n          source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),\n          sourceIndex: firstToken[_tokenize.FIELDS.START_POS],\n          spaces: {\n            before: space,\n            after: ''\n          }\n        }));\n      }\n    }\n    return nodes;\n  }\n\n  /**\n   *\n   * @param {*} nodes\n   */;\n  _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {\n    var _this2 = this;\n    if (requiredSpace === void 0) {\n      requiredSpace = false;\n    }\n    var space = \"\";\n    var rawSpace = \"\";\n    nodes.forEach(function (n) {\n      var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);\n      var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);\n      space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);\n      rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);\n    });\n    if (rawSpace === space) {\n      rawSpace = undefined;\n    }\n    var result = {\n      space: space,\n      rawSpace: rawSpace\n    };\n    return result;\n  };\n  _proto.isNamedCombinator = function isNamedCombinator(position) {\n    if (position === void 0) {\n      position = this.position;\n    }\n    return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;\n  };\n  _proto.namedCombinator = function namedCombinator() {\n    if (this.isNamedCombinator()) {\n      var nameRaw = this.content(this.tokens[this.position + 1]);\n      var name = (0, _util.unesc)(nameRaw).toLowerCase();\n      var raws = {};\n      if (name !== nameRaw) {\n        raws.value = \"/\" + nameRaw + \"/\";\n      }\n      var node = new _combinator[\"default\"]({\n        value: \"/\" + name + \"/\",\n        source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),\n        sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],\n        raws: raws\n      });\n      this.position = this.position + 3;\n      return node;\n    } else {\n      this.unexpected();\n    }\n  };\n  _proto.combinator = function combinator() {\n    var _this3 = this;\n    if (this.content() === '|') {\n      return this.namespace();\n    }\n    // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.\n    var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);\n    if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {\n      var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);\n      if (nodes.length > 0) {\n        var last = this.current.last;\n        if (last) {\n          var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes),\n            space = _this$convertWhitespa.space,\n            rawSpace = _this$convertWhitespa.rawSpace;\n          if (rawSpace !== undefined) {\n            last.rawSpaceAfter += rawSpace;\n          }\n          last.spaces.after += space;\n        } else {\n          nodes.forEach(function (n) {\n            return _this3.newNode(n);\n          });\n        }\n      }\n      return;\n    }\n    var firstToken = this.currToken;\n    var spaceOrDescendantSelectorNodes = undefined;\n    if (nextSigTokenPos > this.position) {\n      spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);\n    }\n    var node;\n    if (this.isNamedCombinator()) {\n      node = this.namedCombinator();\n    } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {\n      node = new _combinator[\"default\"]({\n        value: this.content(),\n        source: getTokenSource(this.currToken),\n        sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]\n      });\n      this.position++;\n    } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {\n      // pass\n    } else if (!spaceOrDescendantSelectorNodes) {\n      this.unexpected();\n    }\n    if (node) {\n      if (spaceOrDescendantSelectorNodes) {\n        var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes),\n          _space = _this$convertWhitespa2.space,\n          _rawSpace = _this$convertWhitespa2.rawSpace;\n        node.spaces.before = _space;\n        node.rawSpaceBefore = _rawSpace;\n      }\n    } else {\n      // descendant combinator\n      var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true),\n        _space2 = _this$convertWhitespa3.space,\n        _rawSpace2 = _this$convertWhitespa3.rawSpace;\n      if (!_rawSpace2) {\n        _rawSpace2 = _space2;\n      }\n      var spaces = {};\n      var raws = {\n        spaces: {}\n      };\n      if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {\n        spaces.before = _space2.slice(0, _space2.length - 1);\n        raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);\n      } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) {\n        spaces.after = _space2.slice(1);\n        raws.spaces.after = _rawSpace2.slice(1);\n      } else {\n        raws.value = _rawSpace2;\n      }\n      node = new _combinator[\"default\"]({\n        value: ' ',\n        source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),\n        sourceIndex: firstToken[_tokenize.FIELDS.START_POS],\n        spaces: spaces,\n        raws: raws\n      });\n    }\n    if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {\n      node.spaces.after = this.optionalSpace(this.content());\n      this.position++;\n    }\n    return this.newNode(node);\n  };\n  _proto.comma = function comma() {\n    if (this.position === this.tokens.length - 1) {\n      this.root.trailingComma = true;\n      this.position++;\n      return;\n    }\n    this.current._inferEndPosition();\n    var selector = new _selector[\"default\"]({\n      source: {\n        start: tokenStart(this.tokens[this.position + 1])\n      },\n      sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]\n    });\n    this.current.parent.append(selector);\n    this.current = selector;\n    this.position++;\n  };\n  _proto.comment = function comment() {\n    var current = this.currToken;\n    this.newNode(new _comment[\"default\"]({\n      value: this.content(),\n      source: getTokenSource(current),\n      sourceIndex: current[_tokenize.FIELDS.START_POS]\n    }));\n    this.position++;\n  };\n  _proto.error = function error(message, opts) {\n    throw this.root.error(message, opts);\n  };\n  _proto.missingBackslash = function missingBackslash() {\n    return this.error('Expected a backslash preceding the semicolon.', {\n      index: this.currToken[_tokenize.FIELDS.START_POS]\n    });\n  };\n  _proto.missingParenthesis = function missingParenthesis() {\n    return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);\n  };\n  _proto.missingSquareBracket = function missingSquareBracket() {\n    return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]);\n  };\n  _proto.unexpected = function unexpected() {\n    return this.error(\"Unexpected '\" + this.content() + \"'. Escaping special characters with \\\\ may help.\", this.currToken[_tokenize.FIELDS.START_POS]);\n  };\n  _proto.unexpectedPipe = function unexpectedPipe() {\n    return this.error(\"Unexpected '|'.\", this.currToken[_tokenize.FIELDS.START_POS]);\n  };\n  _proto.namespace = function namespace() {\n    var before = this.prevToken && this.content(this.prevToken) || true;\n    if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {\n      this.position++;\n      return this.word(before);\n    } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {\n      this.position++;\n      return this.universal(before);\n    }\n    this.unexpectedPipe();\n  };\n  _proto.nesting = function nesting() {\n    if (this.nextToken) {\n      var nextContent = this.content(this.nextToken);\n      if (nextContent === \"|\") {\n        this.position++;\n        return;\n      }\n    }\n    var current = this.currToken;\n    this.newNode(new _nesting[\"default\"]({\n      value: this.content(),\n      source: getTokenSource(current),\n      sourceIndex: current[_tokenize.FIELDS.START_POS]\n    }));\n    this.position++;\n  };\n  _proto.parentheses = function parentheses() {\n    var last = this.current.last;\n    var unbalanced = 1;\n    this.position++;\n    if (last && last.type === types.PSEUDO) {\n      var selector = new _selector[\"default\"]({\n        source: {\n          start: tokenStart(this.tokens[this.position])\n        },\n        sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]\n      });\n      var cache = this.current;\n      last.append(selector);\n      this.current = selector;\n      while (this.position < this.tokens.length && unbalanced) {\n        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n          unbalanced++;\n        }\n        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n          unbalanced--;\n        }\n        if (unbalanced) {\n          this.parse();\n        } else {\n          this.current.source.end = tokenEnd(this.currToken);\n          this.current.parent.source.end = tokenEnd(this.currToken);\n          this.position++;\n        }\n      }\n      this.current = cache;\n    } else {\n      // I think this case should be an error. It's used to implement a basic parse of media queries\n      // but I don't think it's a good idea.\n      var parenStart = this.currToken;\n      var parenValue = \"(\";\n      var parenEnd;\n      while (this.position < this.tokens.length && unbalanced) {\n        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n          unbalanced++;\n        }\n        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n          unbalanced--;\n        }\n        parenEnd = this.currToken;\n        parenValue += this.parseParenthesisToken(this.currToken);\n        this.position++;\n      }\n      if (last) {\n        last.appendToPropertyAndEscape(\"value\", parenValue, parenValue);\n      } else {\n        this.newNode(new _string[\"default\"]({\n          value: parenValue,\n          source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),\n          sourceIndex: parenStart[_tokenize.FIELDS.START_POS]\n        }));\n      }\n    }\n    if (unbalanced) {\n      return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);\n    }\n  };\n  _proto.pseudo = function pseudo() {\n    var _this4 = this;\n    var pseudoStr = '';\n    var startingToken = this.currToken;\n    while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {\n      pseudoStr += this.content();\n      this.position++;\n    }\n    if (!this.currToken) {\n      return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1);\n    }\n    if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) {\n      this.splitWord(false, function (first, length) {\n        pseudoStr += first;\n        _this4.newNode(new _pseudo[\"default\"]({\n          value: pseudoStr,\n          source: getTokenSourceSpan(startingToken, _this4.currToken),\n          sourceIndex: startingToken[_tokenize.FIELDS.START_POS]\n        }));\n        if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n          _this4.error('Misplaced parenthesis.', {\n            index: _this4.nextToken[_tokenize.FIELDS.START_POS]\n          });\n        }\n      });\n    } else {\n      return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]);\n    }\n  };\n  _proto.space = function space() {\n    var content = this.content();\n    // Handle space before and after the selector\n    if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) {\n      return node.type === 'comment';\n    })) {\n      this.spaces = this.optionalSpace(content);\n      this.position++;\n    } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n      this.current.last.spaces.after = this.optionalSpace(content);\n      this.position++;\n    } else {\n      this.combinator();\n    }\n  };\n  _proto.string = function string() {\n    var current = this.currToken;\n    this.newNode(new _string[\"default\"]({\n      value: this.content(),\n      source: getTokenSource(current),\n      sourceIndex: current[_tokenize.FIELDS.START_POS]\n    }));\n    this.position++;\n  };\n  _proto.universal = function universal(namespace) {\n    var nextToken = this.nextToken;\n    if (nextToken && this.content(nextToken) === '|') {\n      this.position++;\n      return this.namespace();\n    }\n    var current = this.currToken;\n    this.newNode(new _universal[\"default\"]({\n      value: this.content(),\n      source: getTokenSource(current),\n      sourceIndex: current[_tokenize.FIELDS.START_POS]\n    }), namespace);\n    this.position++;\n  };\n  _proto.splitWord = function splitWord(namespace, firstCallback) {\n    var _this5 = this;\n    var nextToken = this.nextToken;\n    var word = this.content();\n    while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {\n      this.position++;\n      var current = this.content();\n      word += current;\n      if (current.lastIndexOf('\\\\') === current.length - 1) {\n        var next = this.nextToken;\n        if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {\n          word += this.requiredSpace(this.content(next));\n          this.position++;\n        }\n      }\n      nextToken = this.nextToken;\n    }\n    var hasClass = indexesOf(word, '.').filter(function (i) {\n      // Allow escaped dot within class name\n      var escapedDot = word[i - 1] === '\\\\';\n      // Allow decimal numbers percent in @keyframes\n      var isKeyframesPercent = /^\\d+\\.\\d+%$/.test(word);\n      return !escapedDot && !isKeyframesPercent;\n    });\n    var hasId = indexesOf(word, '#').filter(function (i) {\n      return word[i - 1] !== '\\\\';\n    });\n    // Eliminate Sass interpolations from the list of id indexes\n    var interpolations = indexesOf(word, '#{');\n    if (interpolations.length) {\n      hasId = hasId.filter(function (hashIndex) {\n        return !~interpolations.indexOf(hashIndex);\n      });\n    }\n    var indices = (0, _sortAscending[\"default\"])(uniqs([0].concat(hasClass, hasId)));\n    indices.forEach(function (ind, i) {\n      var index = indices[i + 1] || word.length;\n      var value = word.slice(ind, index);\n      if (i === 0 && firstCallback) {\n        return firstCallback.call(_this5, value, indices.length);\n      }\n      var node;\n      var current = _this5.currToken;\n      var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];\n      var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));\n      if (~hasClass.indexOf(ind)) {\n        var classNameOpts = {\n          value: value.slice(1),\n          source: source,\n          sourceIndex: sourceIndex\n        };\n        node = new _className[\"default\"](unescapeProp(classNameOpts, \"value\"));\n      } else if (~hasId.indexOf(ind)) {\n        var idOpts = {\n          value: value.slice(1),\n          source: source,\n          sourceIndex: sourceIndex\n        };\n        node = new _id[\"default\"](unescapeProp(idOpts, \"value\"));\n      } else {\n        var tagOpts = {\n          value: value,\n          source: source,\n          sourceIndex: sourceIndex\n        };\n        unescapeProp(tagOpts, \"value\");\n        node = new _tag[\"default\"](tagOpts);\n      }\n      _this5.newNode(node, namespace);\n      // Ensure that the namespace is used only once\n      namespace = null;\n    });\n    this.position++;\n  };\n  _proto.word = function word(namespace) {\n    var nextToken = this.nextToken;\n    if (nextToken && this.content(nextToken) === '|') {\n      this.position++;\n      return this.namespace();\n    }\n    return this.splitWord(namespace);\n  };\n  _proto.loop = function loop() {\n    while (this.position < this.tokens.length) {\n      this.parse(true);\n    }\n    this.current._inferEndPosition();\n    return this.root;\n  };\n  _proto.parse = function parse(throwOnParenthesis) {\n    switch (this.currToken[_tokenize.FIELDS.TYPE]) {\n      case tokens.space:\n        this.space();\n        break;\n      case tokens.comment:\n        this.comment();\n        break;\n      case tokens.openParenthesis:\n        this.parentheses();\n        break;\n      case tokens.closeParenthesis:\n        if (throwOnParenthesis) {\n          this.missingParenthesis();\n        }\n        break;\n      case tokens.openSquare:\n        this.attribute();\n        break;\n      case tokens.dollar:\n      case tokens.caret:\n      case tokens.equals:\n      case tokens.word:\n        this.word();\n        break;\n      case tokens.colon:\n        this.pseudo();\n        break;\n      case tokens.comma:\n        this.comma();\n        break;\n      case tokens.asterisk:\n        this.universal();\n        break;\n      case tokens.ampersand:\n        this.nesting();\n        break;\n      case tokens.slash:\n      case tokens.combinator:\n        this.combinator();\n        break;\n      case tokens.str:\n        this.string();\n        break;\n      // These cases throw; no break needed.\n      case tokens.closeSquare:\n        this.missingSquareBracket();\n      case tokens.semicolon:\n        this.missingBackslash();\n      default:\n        this.unexpected();\n    }\n  }\n\n  /**\n   * Helpers\n   */;\n  _proto.expected = function expected(description, index, found) {\n    if (Array.isArray(description)) {\n      var last = description.pop();\n      description = description.join(', ') + \" or \" + last;\n    }\n    var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a';\n    if (!found) {\n      return this.error(\"Expected \" + an + \" \" + description + \".\", {\n        index: index\n      });\n    }\n    return this.error(\"Expected \" + an + \" \" + description + \", found \\\"\" + found + \"\\\" instead.\", {\n      index: index\n    });\n  };\n  _proto.requiredSpace = function requiredSpace(space) {\n    return this.options.lossy ? ' ' : space;\n  };\n  _proto.optionalSpace = function optionalSpace(space) {\n    return this.options.lossy ? '' : space;\n  };\n  _proto.lossySpace = function lossySpace(space, required) {\n    if (this.options.lossy) {\n      return required ? ' ' : '';\n    } else {\n      return space;\n    }\n  };\n  _proto.parseParenthesisToken = function parseParenthesisToken(token) {\n    var content = this.content(token);\n    if (token[_tokenize.FIELDS.TYPE] === tokens.space) {\n      return this.requiredSpace(content);\n    } else {\n      return content;\n    }\n  };\n  _proto.newNode = function newNode(node, namespace) {\n    if (namespace) {\n      if (/^ +$/.test(namespace)) {\n        if (!this.options.lossy) {\n          this.spaces = (this.spaces || '') + namespace;\n        }\n        namespace = true;\n      }\n      node.namespace = namespace;\n      unescapeProp(node, \"namespace\");\n    }\n    if (this.spaces) {\n      node.spaces.before = this.spaces;\n      this.spaces = '';\n    }\n    return this.current.append(node);\n  };\n  _proto.content = function content(token) {\n    if (token === void 0) {\n      token = this.currToken;\n    }\n    return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);\n  };\n  /**\n   * returns the index of the next non-whitespace, non-comment token.\n   * returns -1 if no meaningful token is found.\n   */\n  _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {\n    if (startPosition === void 0) {\n      startPosition = this.position + 1;\n    }\n    var searchPosition = startPosition;\n    while (searchPosition < this.tokens.length) {\n      if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {\n        searchPosition++;\n        continue;\n      } else {\n        return searchPosition;\n      }\n    }\n    return -1;\n  };\n  _createClass(Parser, [{\n    key: \"currToken\",\n    get: function get() {\n      return this.tokens[this.position];\n    }\n  }, {\n    key: \"nextToken\",\n    get: function get() {\n      return this.tokens[this.position + 1];\n    }\n  }, {\n    key: \"prevToken\",\n    get: function get() {\n      return this.tokens[this.position - 1];\n    }\n  }]);\n  return Parser;\n}();\nexports[\"default\"] = Parser;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _parser = _interopRequireDefault(require(\"./parser\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar Processor = /*#__PURE__*/function () {\n  function Processor(func, options) {\n    this.func = func || function noop() {};\n    this.funcRes = null;\n    this.options = options;\n  }\n  var _proto = Processor.prototype;\n  _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    var merged = Object.assign({}, this.options, options);\n    if (merged.updateSelector === false) {\n      return false;\n    } else {\n      return typeof rule !== \"string\";\n    }\n  };\n  _proto._isLossy = function _isLossy(options) {\n    if (options === void 0) {\n      options = {};\n    }\n    var merged = Object.assign({}, this.options, options);\n    if (merged.lossless === false) {\n      return true;\n    } else {\n      return false;\n    }\n  };\n  _proto._root = function _root(rule, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    var parser = new _parser[\"default\"](rule, this._parseOptions(options));\n    return parser.root;\n  };\n  _proto._parseOptions = function _parseOptions(options) {\n    return {\n      lossy: this._isLossy(options)\n    };\n  };\n  _proto._run = function _run(rule, options) {\n    var _this = this;\n    if (options === void 0) {\n      options = {};\n    }\n    return new Promise(function (resolve, reject) {\n      try {\n        var root = _this._root(rule, options);\n        Promise.resolve(_this.func(root)).then(function (transform) {\n          var string = undefined;\n          if (_this._shouldUpdateSelector(rule, options)) {\n            string = root.toString();\n            rule.selector = string;\n          }\n          return {\n            transform: transform,\n            root: root,\n            string: string\n          };\n        }).then(resolve, reject);\n      } catch (e) {\n        reject(e);\n        return;\n      }\n    });\n  };\n  _proto._runSync = function _runSync(rule, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    var root = this._root(rule, options);\n    var transform = this.func(root);\n    if (transform && typeof transform.then === \"function\") {\n      throw new Error(\"Selector processor returned a promise to a synchronous call.\");\n    }\n    var string = undefined;\n    if (options.updateSelector && typeof rule !== \"string\") {\n      string = root.toString();\n      rule.selector = string;\n    }\n    return {\n      transform: transform,\n      root: root,\n      string: string\n    };\n  }\n\n  /**\n   * Process rule into a selector AST.\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {Promise<parser.Root>} The AST of the selector after processing it.\n   */;\n  _proto.ast = function ast(rule, options) {\n    return this._run(rule, options).then(function (result) {\n      return result.root;\n    });\n  }\n\n  /**\n   * Process rule into a selector AST synchronously.\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {parser.Root} The AST of the selector after processing it.\n   */;\n  _proto.astSync = function astSync(rule, options) {\n    return this._runSync(rule, options).root;\n  }\n\n  /**\n   * Process a selector into a transformed value asynchronously\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {Promise<any>} The value returned by the processor.\n   */;\n  _proto.transform = function transform(rule, options) {\n    return this._run(rule, options).then(function (result) {\n      return result.transform;\n    });\n  }\n\n  /**\n   * Process a selector into a transformed value synchronously.\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {any} The value returned by the processor.\n   */;\n  _proto.transformSync = function transformSync(rule, options) {\n    return this._runSync(rule, options).transform;\n  }\n\n  /**\n   * Process a selector into a new selector string asynchronously.\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {string} the selector after processing.\n   */;\n  _proto.process = function process(rule, options) {\n    return this._run(rule, options).then(function (result) {\n      return result.string || result.root.toString();\n    });\n  }\n\n  /**\n   * Process a selector into a new selector string synchronously.\n   *\n   * @param rule {postcss.Rule | string} The css selector to be processed\n   * @param options The options for processing\n   * @returns {string} the selector after processing.\n   */;\n  _proto.processSync = function processSync(rule, options) {\n    var result = this._runSync(rule, options);\n    return result.string || result.root.toString();\n  };\n  return Processor;\n}();\nexports[\"default\"] = Processor;\nmodule.exports = exports.default;", "\"use strict\";\n\nexports.__esModule = true;\nexports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;\nvar _attribute = _interopRequireDefault(require(\"./attribute\"));\nvar _className = _interopRequireDefault(require(\"./className\"));\nvar _combinator = _interopRequireDefault(require(\"./combinator\"));\nvar _comment = _interopRequireDefault(require(\"./comment\"));\nvar _id = _interopRequireDefault(require(\"./id\"));\nvar _nesting = _interopRequireDefault(require(\"./nesting\"));\nvar _pseudo = _interopRequireDefault(require(\"./pseudo\"));\nvar _root = _interopRequireDefault(require(\"./root\"));\nvar _selector = _interopRequireDefault(require(\"./selector\"));\nvar _string = _interopRequireDefault(require(\"./string\"));\nvar _tag = _interopRequireDefault(require(\"./tag\"));\nvar _universal = _interopRequireDefault(require(\"./universal\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar attribute = function attribute(opts) {\n  return new _attribute[\"default\"](opts);\n};\nexports.attribute = attribute;\nvar className = function className(opts) {\n  return new _className[\"default\"](opts);\n};\nexports.className = className;\nvar combinator = function combinator(opts) {\n  return new _combinator[\"default\"](opts);\n};\nexports.combinator = combinator;\nvar comment = function comment(opts) {\n  return new _comment[\"default\"](opts);\n};\nexports.comment = comment;\nvar id = function id(opts) {\n  return new _id[\"default\"](opts);\n};\nexports.id = id;\nvar nesting = function nesting(opts) {\n  return new _nesting[\"default\"](opts);\n};\nexports.nesting = nesting;\nvar pseudo = function pseudo(opts) {\n  return new _pseudo[\"default\"](opts);\n};\nexports.pseudo = pseudo;\nvar root = function root(opts) {\n  return new _root[\"default\"](opts);\n};\nexports.root = root;\nvar selector = function selector(opts) {\n  return new _selector[\"default\"](opts);\n};\nexports.selector = selector;\nvar string = function string(opts) {\n  return new _string[\"default\"](opts);\n};\nexports.string = string;\nvar tag = function tag(opts) {\n  return new _tag[\"default\"](opts);\n};\nexports.tag = tag;\nvar universal = function universal(opts) {\n  return new _universal[\"default\"](opts);\n};\nexports.universal = universal;", "\"use strict\";\n\nexports.__esModule = true;\nexports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;\nexports.isContainer = isContainer;\nexports.isIdentifier = void 0;\nexports.isNamespace = isNamespace;\nexports.isNesting = void 0;\nexports.isNode = isNode;\nexports.isPseudo = void 0;\nexports.isPseudoClass = isPseudoClass;\nexports.isPseudoElement = isPseudoElement;\nexports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;\nvar _types = require(\"./types\");\nvar _IS_TYPE;\nvar IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);\nfunction isNode(node) {\n  return typeof node === \"object\" && IS_TYPE[node.type];\n}\nfunction isNodeType(type, node) {\n  return isNode(node) && node.type === type;\n}\nvar isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);\nexports.isAttribute = isAttribute;\nvar isClassName = isNodeType.bind(null, _types.CLASS);\nexports.isClassName = isClassName;\nvar isCombinator = isNodeType.bind(null, _types.COMBINATOR);\nexports.isCombinator = isCombinator;\nvar isComment = isNodeType.bind(null, _types.COMMENT);\nexports.isComment = isComment;\nvar isIdentifier = isNodeType.bind(null, _types.ID);\nexports.isIdentifier = isIdentifier;\nvar isNesting = isNodeType.bind(null, _types.NESTING);\nexports.isNesting = isNesting;\nvar isPseudo = isNodeType.bind(null, _types.PSEUDO);\nexports.isPseudo = isPseudo;\nvar isRoot = isNodeType.bind(null, _types.ROOT);\nexports.isRoot = isRoot;\nvar isSelector = isNodeType.bind(null, _types.SELECTOR);\nexports.isSelector = isSelector;\nvar isString = isNodeType.bind(null, _types.STRING);\nexports.isString = isString;\nvar isTag = isNodeType.bind(null, _types.TAG);\nexports.isTag = isTag;\nvar isUniversal = isNodeType.bind(null, _types.UNIVERSAL);\nexports.isUniversal = isUniversal;\nfunction isPseudoElement(node) {\n  return isPseudo(node) && node.value && (node.value.startsWith(\"::\") || node.value.toLowerCase() === \":before\" || node.value.toLowerCase() === \":after\" || node.value.toLowerCase() === \":first-letter\" || node.value.toLowerCase() === \":first-line\");\n}\nfunction isPseudoClass(node) {\n  return isPseudo(node) && !isPseudoElement(node);\n}\nfunction isContainer(node) {\n  return !!(isNode(node) && node.walk);\n}\nfunction isNamespace(node) {\n  return isAttribute(node) || isTag(node);\n}", "\"use strict\";\n\nexports.__esModule = true;\nvar _types = require(\"./types\");\nObject.keys(_types).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  if (key in exports && exports[key] === _types[key]) return;\n  exports[key] = _types[key];\n});\nvar _constructors = require(\"./constructors\");\nObject.keys(_constructors).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  if (key in exports && exports[key] === _constructors[key]) return;\n  exports[key] = _constructors[key];\n});\nvar _guards = require(\"./guards\");\nObject.keys(_guards).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  if (key in exports && exports[key] === _guards[key]) return;\n  exports[key] = _guards[key];\n});", "\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\nvar _processor = _interopRequireDefault(require(\"./processor\"));\nvar selectors = _interopRequireWildcard(require(\"./selectors\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar parser = function parser(processor) {\n  return new _processor[\"default\"](processor);\n};\nObject.assign(parser, selectors);\ndelete parser.__esModule;\nvar _default = parser;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;", "const { Rule, AtRule } = require('postcss')\nlet parser = require('postcss-selector-parser')\n\n/**\n * Run a selector string through postcss-selector-parser\n */\nfunction parse(rawSelector, rule) {\n  let nodes\n  try {\n    parser(parsed => {\n      nodes = parsed\n    }).processSync(rawSelector)\n  } catch (e) {\n    if (rawSelector.includes(':')) {\n      throw rule ? rule.error('Missed semicolon') : e\n    } else {\n      throw rule ? rule.error(e.message) : e\n    }\n  }\n  return nodes.at(0)\n}\n\n/**\n * Replaces the \"&\" token in a node's selector with the parent selector\n * similar to what SCSS does.\n *\n * Mutates the nodes list\n */\nfunction interpolateAmpInSelector(nodes, parent) {\n  let replaced = false\n  nodes.each(node => {\n    if (node.type === 'nesting') {\n      let clonedParent = parent.clone({})\n      if (node.value !== '&') {\n        node.replaceWith(\n          parse(node.value.replace('&', clonedParent.toString()))\n        )\n      } else {\n        node.replaceWith(clonedParent)\n      }\n      replaced = true\n    } else if ('nodes' in node && node.nodes) {\n      if (interpolateAmpInSelector(node, parent)) {\n        replaced = true\n      }\n    }\n  })\n  return replaced\n}\n\n/**\n * Combines parent and child selectors, in a SCSS-like way\n */\nfunction mergeSelectors(parent, child) {\n  let merged = []\n  parent.selectors.forEach(sel => {\n    let parentNode = parse(sel, parent)\n\n    child.selectors.forEach(selector => {\n      if (!selector) {\n        return\n      }\n      let node = parse(selector, child)\n      let replaced = interpolateAmpInSelector(node, parentNode)\n      if (!replaced) {\n        node.prepend(parser.combinator({ value: ' ' }))\n        node.prepend(parentNode.clone({}))\n      }\n      merged.push(node.toString())\n    })\n  })\n  return merged\n}\n\n/**\n * Move a child and its preceeding comment(s) to after \"after\"\n */\nfunction breakOut(child, after) {\n  let prev = child.prev()\n  after.after(child)\n  while (prev && prev.type === 'comment') {\n    let nextPrev = prev.prev()\n    after.after(prev)\n    prev = nextPrev\n  }\n  return child\n}\n\nfunction createFnAtruleChilds(bubble) {\n  return function atruleChilds(rule, atrule, bubbling, mergeSels = bubbling) {\n    let children = []\n    atrule.each(child => {\n      if (child.type === 'rule' && bubbling) {\n        if (mergeSels) {\n          child.selectors = mergeSelectors(rule, child)\n        }\n      } else if (child.type === 'atrule' && child.nodes) {\n        if (bubble[child.name]) {\n          atruleChilds(rule, child, mergeSels)\n        } else if (atrule[rootRuleMergeSel] !== false) {\n          children.push(child)\n        }\n      } else {\n        children.push(child)\n      }\n    })\n    if (bubbling) {\n      if (children.length) {\n        let clone = rule.clone({ nodes: [] })\n        for (let child of children) {\n          clone.append(child)\n        }\n        atrule.prepend(clone)\n      }\n    }\n  }\n}\n\nfunction pickDeclarations(selector, declarations, after) {\n  let parent = new Rule({\n    selector,\n    nodes: []\n  })\n  parent.append(declarations)\n  after.after(parent)\n  return parent\n}\n\nfunction atruleNames(defaults, custom) {\n  let list = {}\n  for (let name of defaults) {\n    list[name] = true\n  }\n  if (custom) {\n    for (let name of custom) {\n      list[name.replace(/^@/, '')] = true\n    }\n  }\n  return list\n}\n\nfunction parseRootRuleParams(params) {\n  params = params.trim()\n  let braceBlock = params.match(/^\\((.*)\\)$/)\n  if (!braceBlock) {\n    return { type: 'basic', selector: params }\n  }\n  let bits = braceBlock[1].match(/^(with(?:out)?):(.+)$/)\n  if (bits) {\n    let allowlist = bits[1] === 'with'\n    let rules = Object.fromEntries(\n      bits[2]\n        .trim()\n        .split(/\\s+/)\n        .map(name => [name, true])\n    )\n    if (allowlist && rules.all) {\n      return { type: 'noop' }\n    }\n    let escapes = rule => !!rules[rule]\n    if (rules.all) {\n      escapes = () => true\n    } else if (allowlist) {\n      escapes = rule => (rule === 'all' ? false : !rules[rule])\n    }\n\n    return {\n      type: 'withrules',\n      escapes\n    }\n  }\n  // Unrecognized brace block\n  return { type: 'unknown' }\n}\n\nfunction getAncestorRules(leaf) {\n  let lineage = []\n  let parent = leaf.parent\n\n  while (parent && parent instanceof AtRule) {\n    lineage.push(parent)\n    parent = parent.parent\n  }\n  return lineage\n}\n\nfunction unwrapRootRule(rule) {\n  let escapes = rule[rootRuleEscapes]\n\n  if (!escapes) {\n    rule.after(rule.nodes)\n  } else {\n    let nodes = rule.nodes\n\n    let topEscaped\n    let topEscapedIdx = -1\n    let breakoutLeaf\n    let breakoutRoot\n    let clone\n\n    let lineage = getAncestorRules(rule)\n    lineage.forEach((parent, i) => {\n      if (escapes(parent.name)) {\n        topEscaped = parent\n        topEscapedIdx = i\n        breakoutRoot = clone\n      } else {\n        let oldClone = clone\n        clone = parent.clone({ nodes: [] })\n        oldClone && clone.append(oldClone)\n        breakoutLeaf = breakoutLeaf || clone\n      }\n    })\n\n    if (!topEscaped) {\n      rule.after(nodes)\n    } else if (!breakoutRoot) {\n      topEscaped.after(nodes)\n    } else {\n      let leaf = breakoutLeaf\n      leaf.append(nodes)\n      topEscaped.after(breakoutRoot)\n    }\n\n    if (rule.next() && topEscaped) {\n      let restRoot\n      lineage.slice(0, topEscapedIdx + 1).forEach((parent, i, arr) => {\n        let oldRoot = restRoot\n        restRoot = parent.clone({ nodes: [] })\n        oldRoot && restRoot.append(oldRoot)\n\n        let nextSibs = []\n        let _child = arr[i - 1] || rule\n        let next = _child.next()\n        while (next) {\n          nextSibs.push(next)\n          next = next.next()\n        }\n        restRoot.append(nextSibs)\n      })\n      restRoot && (breakoutRoot || nodes[nodes.length - 1]).after(restRoot)\n    }\n  }\n\n  rule.remove()\n}\n\nconst rootRuleMergeSel = Symbol('rootRuleMergeSel')\nconst rootRuleEscapes = Symbol('rootRuleEscapes')\n\nfunction normalizeRootRule(rule) {\n  let { params } = rule\n  let { type, selector, escapes } = parseRootRuleParams(params)\n  if (type === 'unknown') {\n    throw rule.error(\n      `Unknown @${rule.name} parameter ${JSON.stringify(params)}`\n    )\n  }\n  if (type === 'basic' && selector) {\n    let selectorBlock = new Rule({ selector, nodes: rule.nodes })\n    rule.removeAll()\n    rule.append(selectorBlock)\n  }\n  rule[rootRuleEscapes] = escapes\n  rule[rootRuleMergeSel] = escapes ? !escapes('all') : type === 'noop'\n}\n\nconst hasRootRule = Symbol('hasRootRule')\n\nmodule.exports = (opts = {}) => {\n  let bubble = atruleNames(\n    ['media', 'supports', 'layer', 'container'],\n    opts.bubble\n  )\n  let atruleChilds = createFnAtruleChilds(bubble)\n  let unwrap = atruleNames(\n    [\n      'document',\n      'font-face',\n      'keyframes',\n      '-webkit-keyframes',\n      '-moz-keyframes'\n    ],\n    opts.unwrap\n  )\n  let rootRuleName = (opts.rootRuleName || 'at-root').replace(/^@/, '')\n  let preserveEmpty = opts.preserveEmpty\n\n  return {\n    postcssPlugin: 'postcss-nested',\n\n    Once(root) {\n      root.walkAtRules(rootRuleName, node => {\n        normalizeRootRule(node)\n        root[hasRootRule] = true\n      })\n    },\n\n    Rule(rule) {\n      let unwrapped = false\n      let after = rule\n      let copyDeclarations = false\n      let declarations = []\n\n      rule.each(child => {\n        if (child.type === 'rule') {\n          if (declarations.length) {\n            after = pickDeclarations(rule.selector, declarations, after)\n            declarations = []\n          }\n\n          copyDeclarations = true\n          unwrapped = true\n          child.selectors = mergeSelectors(rule, child)\n          after = breakOut(child, after)\n        } else if (child.type === 'atrule') {\n          if (declarations.length) {\n            after = pickDeclarations(rule.selector, declarations, after)\n            declarations = []\n          }\n          if (child.name === rootRuleName) {\n            unwrapped = true\n            atruleChilds(rule, child, true, child[rootRuleMergeSel])\n            after = breakOut(child, after)\n          } else if (bubble[child.name]) {\n            copyDeclarations = true\n            unwrapped = true\n            atruleChilds(rule, child, true)\n            after = breakOut(child, after)\n          } else if (unwrap[child.name]) {\n            copyDeclarations = true\n            unwrapped = true\n            atruleChilds(rule, child, false)\n            after = breakOut(child, after)\n          } else if (copyDeclarations) {\n            declarations.push(child)\n          }\n        } else if (child.type === 'decl' && copyDeclarations) {\n          declarations.push(child)\n        }\n      })\n\n      if (declarations.length) {\n        after = pickDeclarations(rule.selector, declarations, after)\n      }\n\n      if (unwrapped && preserveEmpty !== true) {\n        rule.raws.semicolon = true\n        if (rule.nodes.length === 0) rule.remove()\n      }\n    },\n\n    RootExit(root) {\n      if (root[hasRootRule]) {\n        root.walkAtRules(rootRuleName, unwrapRootRule)\n        root[hasRootRule] = false\n      }\n    }\n  }\n}\nmodule.exports.postcss = true\n", "\"use strict\";\n\nvar pattern = /-(\\w|$)/g;\n\nvar callback = function callback(dashChar, char) {\n\treturn char.toUpperCase();\n};\n\nvar camelCaseCSS = function camelCaseCSS(property) {\n\tproperty = property.toLowerCase();\n\n\t// NOTE :: IE8's \"styleFloat\" is intentionally not supported\n\tif (property === \"float\") {\n\t\treturn \"cssFloat\";\n\t}\n\t// Microsoft vendor-prefixes are uniquely cased\n\telse if (property.charCodeAt(0) === 45&& property.charCodeAt(1) === 109&& property.charCodeAt(2) === 115&& property.charCodeAt(3) === 45) {\n\t\t\treturn property.substr(1).replace(pattern, callback);\n\t\t} else {\n\t\t\treturn property.replace(pattern, callback);\n\t\t}\n};\n\nmodule.exports = camelCaseCSS;\n", "let camelcase = require('camelcase-css')\n\nlet UNITLESS = {\n  boxFlex: true,\n  boxFlexGroup: true,\n  columnCount: true,\n  flex: true,\n  flexGrow: true,\n  flexPositive: true,\n  flexShrink: true,\n  flexNegative: true,\n  fontWeight: true,\n  lineClamp: true,\n  lineHeight: true,\n  opacity: true,\n  order: true,\n  orphans: true,\n  tabSize: true,\n  widows: true,\n  zIndex: true,\n  zoom: true,\n  fillOpacity: true,\n  strokeDashoffset: true,\n  strokeOpacity: true,\n  strokeWidth: true\n}\n\nfunction atRule(node) {\n  if (typeof node.nodes === 'undefined') {\n    return true\n  } else {\n    return process(node)\n  }\n}\n\nfunction process(node) {\n  let name\n  let result = {}\n\n  node.each(child => {\n    if (child.type === 'atrule') {\n      name = '@' + child.name\n      if (child.params) name += ' ' + child.params\n      if (typeof result[name] === 'undefined') {\n        result[name] = atRule(child)\n      } else if (Array.isArray(result[name])) {\n        result[name].push(atRule(child))\n      } else {\n        result[name] = [result[name], atRule(child)]\n      }\n    } else if (child.type === 'rule') {\n      let body = process(child)\n      if (result[child.selector]) {\n        for (let i in body) {\n          result[child.selector][i] = body[i]\n        }\n      } else {\n        result[child.selector] = body\n      }\n    } else if (child.type === 'decl') {\n      if (child.prop[0] === '-' && child.prop[1] === '-') {\n        name = child.prop\n      } else if (child.parent && child.parent.selector === ':export') {\n        name = child.prop\n      } else {\n        name = camelcase(child.prop)\n      }\n      let value = child.value\n      if (!isNaN(child.value) && UNITLESS[name]) {\n        value = parseFloat(child.value)\n      }\n      if (child.important) value += ' !important'\n      if (typeof result[name] === 'undefined') {\n        result[name] = value\n      } else if (Array.isArray(result[name])) {\n        result[name].push(value)\n      } else {\n        result[name] = [result[name], value]\n      }\n    }\n  })\n  return result\n}\n\nmodule.exports = process\n", "let postcss = require('postcss')\n\nlet IMPORTANT = /\\s*!important\\s*$/i\n\nlet UNITLESS = {\n  'box-flex': true,\n  'box-flex-group': true,\n  'column-count': true,\n  'flex': true,\n  'flex-grow': true,\n  'flex-positive': true,\n  'flex-shrink': true,\n  'flex-negative': true,\n  'font-weight': true,\n  'line-clamp': true,\n  'line-height': true,\n  'opacity': true,\n  'order': true,\n  'orphans': true,\n  'tab-size': true,\n  'widows': true,\n  'z-index': true,\n  'zoom': true,\n  'fill-opacity': true,\n  'stroke-dashoffset': true,\n  'stroke-opacity': true,\n  'stroke-width': true\n}\n\nfunction dashify(str) {\n  return str\n    .replace(/([A-Z])/g, '-$1')\n    .replace(/^ms-/, '-ms-')\n    .toLowerCase()\n}\n\nfunction decl(parent, name, value) {\n  if (value === false || value === null) return\n\n  if (!name.startsWith('--')) {\n    name = dashify(name)\n  }\n\n  if (typeof value === 'number') {\n    if (value === 0 || UNITLESS[name]) {\n      value = value.toString()\n    } else {\n      value += 'px'\n    }\n  }\n\n  if (name === 'css-float') name = 'float'\n\n  if (IMPORTANT.test(value)) {\n    value = value.replace(IMPORTANT, '')\n    parent.push(postcss.decl({ prop: name, value, important: true }))\n  } else {\n    parent.push(postcss.decl({ prop: name, value }))\n  }\n}\n\nfunction atRule(parent, parts, value) {\n  let node = postcss.atRule({ name: parts[1], params: parts[3] || '' })\n  if (typeof value === 'object') {\n    node.nodes = []\n    parse(value, node)\n  }\n  parent.push(node)\n}\n\nfunction parse(obj, parent) {\n  let name, value, node\n  for (name in obj) {\n    value = obj[name]\n    if (value === null || typeof value === 'undefined') {\n      continue\n    } else if (name[0] === '@') {\n      let parts = name.match(/@(\\S+)(\\s+([\\W\\w]*)\\s*)?/)\n      if (Array.isArray(value)) {\n        for (let i of value) {\n          atRule(parent, parts, i)\n        }\n      } else {\n        atRule(parent, parts, value)\n      }\n    } else if (Array.isArray(value)) {\n      for (let i of value) {\n        decl(parent, name, i)\n      }\n    } else if (typeof value === 'object') {\n      node = postcss.rule({ selector: name })\n      parse(value, node)\n      parent.push(node)\n    } else {\n      decl(parent, name, value)\n    }\n  }\n}\n\nmodule.exports = function (obj) {\n  let root = postcss.root()\n  parse(obj, root)\n  return root\n}\n", "let objectify = require('./objectifier')\n\nmodule.exports = function processResult(result) {\n  if (console && console.warn) {\n    result.warnings().forEach(warn => {\n      let source = warn.plugin || 'PostCSS'\n      console.warn(source + ': ' + warn.text)\n    })\n  }\n  return objectify(result.root)\n}\n", "let postcss = require('postcss')\n\nlet processResult = require('./process-result')\nlet parse = require('./parser')\n\nmodule.exports = function async(plugins) {\n  let processor = postcss(plugins)\n  return async input => {\n    let result = await processor.process(input, {\n      parser: parse,\n      from: undefined\n    })\n    return processResult(result)\n  }\n}\n", "let postcss = require('postcss')\n\nlet processResult = require('./process-result')\nlet parse = require('./parser')\n\nmodule.exports = function (plugins) {\n  let processor = postcss(plugins)\n  return input => {\n    let result = processor.process(input, { parser: parse, from: undefined })\n    return processResult(result)\n  }\n}\n", "let objectify = require('./objectifier')\nlet parse = require('./parser')\nlet async = require('./async')\nlet sync = require('./sync')\n\nmodule.exports = {\n  objectify,\n  parse,\n  async,\n  sync\n}\n", "let tokenizer = require('postcss/lib/tokenize')\nlet Comment = require('postcss/lib/comment')\nlet Parser = require('postcss/lib/parser')\n\nclass SafeParser extends Parser {\n  checkMissedSemicolon() {}\n\n  comment(token) {\n    let node = new Comment()\n    this.init(node, token[2])\n    let pos =\n      this.input.fromOffset(token[3]) ||\n      this.input.fromOffset(this.input.css.length - 1)\n    node.source.end = {\n      column: pos.col,\n      line: pos.line,\n      offset: token[3] + 1\n    }\n\n    let text = token[1].slice(2)\n    if (text.slice(-2) === '*/') text = text.slice(0, -2)\n\n    if (/^\\s*$/.test(text)) {\n      node.text = ''\n      node.raws.left = text\n      node.raws.right = ''\n    } else {\n      let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n      node.text = match[2]\n      node.raws.left = match[1]\n      node.raws.right = match[3]\n    }\n  }\n\n  createTokenizer() {\n    this.tokenizer = tokenizer(this.input, { ignoreErrors: true })\n  }\n\n  decl(tokens) {\n    if (tokens.length > 1 && tokens.some(i => i[0] === 'word')) {\n      super.decl(tokens)\n    }\n  }\n\n  doubleColon() {}\n\n  endFile() {\n    if (this.current.nodes && this.current.nodes.length) {\n      this.current.raws.semicolon = this.semicolon\n    }\n    this.current.raws.after = (this.current.raws.after || '') + this.spaces\n\n    while (this.current.parent) {\n      this.current = this.current.parent\n      this.current.raws.after = ''\n    }\n    this.root.source.end = this.getPosition(this.tokenizer.position())\n  }\n\n  precheckMissedSemicolon(tokens) {\n    let colon = this.colon(tokens)\n    if (colon === false) return\n\n    let nextStart, prevEnd\n    for (nextStart = colon - 1; nextStart >= 0; nextStart--) {\n      if (tokens[nextStart][0] === 'word') break\n    }\n    if (nextStart === 0) return\n\n    for (prevEnd = nextStart - 1; prevEnd >= 0; prevEnd--) {\n      if (tokens[prevEnd][0] !== 'space') {\n        prevEnd += 1\n        break\n      }\n    }\n\n    let other = tokens.slice(nextStart)\n    let spaces = tokens.slice(prevEnd, nextStart)\n    tokens.splice(prevEnd, tokens.length - prevEnd)\n    this.spaces = spaces.map(i => i[1]).join('')\n\n    this.decl(other)\n  }\n\n  unclosedBracket() {}\n\n  unexpectedClose() {\n    this.current.raws.after += '}'\n  }\n\n  unknownWord(tokens) {\n    this.spaces += tokens.map(i => i[1]).join('')\n  }\n\n  unnamedAtrule(node) {\n    node.name = ''\n  }\n}\n\nmodule.exports = SafeParser\n", "let { Input } = require('postcss')\n\nlet SafeParser = require('./safe-parser')\n\nmodule.exports = function safeParse(css, opts) {\n  let input = new Input(css, opts)\n\n  let parser = new SafeParser(input)\n  parser.parse()\n\n  return parser.root\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map", "import type { Token } from './types';\n\nexport interface TokyOptions<T extends Token<unknown>> {\n    shouldAddToken(type: T['type'], value: string): boolean;\n    isStringDelimiter(char: string, previousChar: string): boolean;\n    isDelimiter(char: string, previousChar: string): boolean;\n    isWhitespace(char: string): boolean;\n    getCommentStartType(ch: string, source: string, nextCharIndex: number): string;\n    isCommentEnd(\n        inComment: string,\n        ch: string,\n        source: string,\n        nextCharIndex: number,\n        previousChar: string\n    ): boolean;\n    getUnclosedComment(inComment: string): string;\n    createToken(value: string, type: T['type'], start: number, end: number): T;\n    shouldClose?(ch: string, previousChar: string): boolean;\n    offset?: number;\n}\n\nexport function tokenize<T extends Token<unknown>>(\n    source: string,\n    {\n        shouldClose,\n        isDelimiter,\n        isStringDelimiter,\n        isWhitespace,\n        shouldAddToken,\n        createToken,\n        getCommentStartType,\n        isCommentEnd,\n        getUnclosedComment,\n        offset = 0,\n    }: TokyOptions<T>\n): T[] {\n    const tokens: T[] = [];\n    let previousChar = '';\n    let buffer = '';\n    let inComment = '';\n    let inString = '';\n    let start = offset;\n    let nextCharIndex = 0;\n    for (const ch of source) {\n        nextCharIndex += ch.length;\n        if (inString) {\n            buffer += ch;\n            if (ch === inString && previousChar !== '\\\\') {\n                pushBuffer('string');\n                inString = '';\n            }\n        } else if (inComment) {\n            buffer += ch;\n            if (isCommentEnd(inComment, ch, source, nextCharIndex, previousChar)) {\n                pushBuffer(inComment);\n                inComment = '';\n            }\n        } else if ((inComment = getCommentStartType(ch, source, nextCharIndex))) {\n            pushBuffer();\n            buffer += ch;\n        } else if (isStringDelimiter(ch, previousChar)) {\n            pushBuffer();\n            buffer += ch;\n            inString = ch;\n        } else if (isDelimiter(ch, previousChar)) {\n            pushBuffer();\n            buffer += ch;\n            pushBuffer(ch);\n        } else if (isWhitespace(ch) && !isWhitespace(previousChar)) {\n            pushBuffer();\n            buffer += ch;\n        } else if (!isWhitespace(ch) && isWhitespace(previousChar)) {\n            pushBuffer();\n            buffer += ch;\n        } else if(shouldClose?.(ch, previousChar)) {\n            pushBuffer();\n            buffer += ch;\n            pushBuffer(ch);\n        } else {\n            buffer += ch;\n        }\n        previousChar = ch;\n    }\n    if (buffer.length) {\n        if (inComment) {\n            pushBuffer(getUnclosedComment(inComment));\n        } else if (inString) {\n            pushBuffer('unclosed-string');\n        } else {\n            pushBuffer();\n        }\n    }\n    function pushBuffer(type?: T['type']) {\n        if (buffer.length === 0) {\n            return;\n        }\n        const end = start + buffer.length;\n        type = type ?? (buffer.trim().length ? 'text' : 'space');\n        if (shouldAddToken(type, buffer)) {\n            tokens[tokens.length] = createToken(buffer, type, start, end);\n        }\n        start = end;\n        buffer = '';\n    }\n    return tokens;\n}\n", "import type { Token } from './types';\n\n/**\n * Checks if a token type is comment\n */\nexport function isComment(type: string) {\n    return type === 'line-comment' || type === 'multi-comment' || type === 'unclosed-comment';\n}\n\n/**\n * Checks if a token type is string\n */\nexport function isString(type: string) {\n    return type === 'string' || type === 'unclosed-string';\n}\n\n/**\n * Checks for a set of JS strings\n */\nexport const isStringDelimiter = (char: string) => char === `'` || char === `\"` || char === '`';\n\n/**\n * Checks for a set of Whitespace\n */\nexport const isWhitespace = (char: string) =>\n    char === ' ' || char === `\\t` || char === `\\r` || char === '\\n';\n\n/**\n * Creates a basic token\n */\nexport const createToken = <Type extends string>(\n    value: string,\n    type: Type,\n    start: number,\n    end: number\n) => {\n    return {\n        value,\n        type,\n        start,\n        end,\n    };\n};\n\n/**\n * Get JS type of comments for a specific set of start chars when no comment is detected empty string is used\n */\nexport function getJSCommentStartType(\n    ch: string,\n    source: string,\n    nextCharIndex: number\n): '' | 'line-comment' | 'multi-comment' {\n    if (ch === '/' && source[nextCharIndex] === '/') {\n        return 'line-comment';\n    } else {\n        return ch === '/' && source[nextCharIndex] === '*' ? 'multi-comment' : '';\n    }\n}\n\n/**\n * Get CSS type of comments for a specific set of start chars when no comment is detected empty string is used\n */\nexport function getMultilineCommentStartType(\n    ch: string,\n    source: string,\n    nextCharIndex: number\n): '' | 'multi-comment' {\n    return ch === '/' && source[nextCharIndex] === '*' ? 'multi-comment' : '';\n}\n\n/**\n * Given a JS comment type determine if this is the end of the comment\n */\nexport function isCommentEnd(\n    commentType: string,\n    ch: string,\n    _source: string,\n    _nextCharIndex: number,\n    previousChar: string\n): boolean {\n    if (commentType === 'line-comment' && ch === '\\n') {\n        return true;\n    } else if (commentType === 'multi-comment' && ch === '/' && previousChar === '*') {\n        return true;\n    }\n    return false;\n}\n\n/**\n * Get the type of unclosed comment\n */\nexport function getUnclosedComment(commentType: string): 'line-comment' | 'unclosed-comment' {\n    if (commentType === 'line-comment') {\n        return commentType;\n    } else {\n        return 'unclosed-comment';\n    }\n}\n/**\n * Get the text between two token indexes\n * if source is provided it will slice the text from original source\n * otherwise the value of the tokens will be concatenated\n */\nexport function getText(tokens: Token<any>[], startIndex = 0, upToIndex = -1, source?: string) {\n    if (tokens.length === 0) {\n        return '';\n    }\n    if (upToIndex === -1) {\n        upToIndex = tokens.length;\n    }\n\n    if (source) {\n        return source.slice(tokens[startIndex].start, tokens[upToIndex - 1].end);\n    } else {\n        let res = '';\n        for (let i = startIndex; i < upToIndex; i++) {\n            res += tokens[i].value;\n        }\n        return res;\n    }\n}\n\n/**\n * Takes an array of tokens and group them into a single token.\n * If source is provided the value will contain the text between the tokens,\n * instead of the tokens concatenated text.\n */\nexport function groupTokens<Tokens extends Token<any>[], T extends string = 'tokens'>(\n    tokens: Tokens,\n    type: T = 'tokens' as T,\n    source?: string\n) {\n    return {\n        type,\n        start: tokens[0].start,\n        end: tokens[tokens.length - 1].end,\n        value: getText(tokens, undefined, undefined, source),\n        tokens,\n    };\n}\n\n/**\n * Trim tokens from both ends with a matcher function\n */\nexport function trimTokens<Tokens extends Token<any>[]>(\n    tokens: Tokens,\n    shouldTrimToken: (token: Token<any>) => boolean\n) {\n    let start = 0;\n    let end = tokens.length;\n    for (let i = 0; i < tokens.length; i++) {\n        if (shouldTrimToken(tokens[i])) {\n            start = i + 1;\n        } else {\n            break;\n        }\n    }\n    for (let i = tokens.length - 1; i > start; i--) {\n        if (shouldTrimToken(tokens[i])) {\n            end = i;\n        } else {\n            break;\n        }\n    }\n    return tokens.slice(start, end);\n}\n\n/**\n * get last item in array\n */\nexport function last<T>(arr: T[]): T | undefined {\n    return arr[arr.length - 1];\n}\n", "import type { Token } from './types';\n\n/**\n * Minimal token traverse helper used to create structure from tokens\n */\nexport class Seeker<T extends Token<unknown>> {\n    index = -1;\n    constructor(public tokens: T[]) {}\n    next() {\n        this.index++;\n        return this.tokens[this.index] || { type: '' };\n    }\n    back() {\n        this.index--;\n    }\n    peekBack() {\n        return this.tokens[this.index - 1] || { type: '' };\n    }\n    peek(num = 1) {\n        return this.tokens[this.index + num] || { type: '' };\n    }\n    take(type: T['type']) {\n        if (this.peek().type === type) {\n            return this.next();\n        }\n        return undefined;\n    }\n    eat(type: T['type']) {\n        while (this.peek().type === type) {\n            this.index++;\n        }\n        return this;\n    }\n    takeMany(type: T['type']) {\n        const tokens = [];\n        while (this.peek().type === type) {\n            tokens.push(this.next());\n        }\n        return tokens;\n    }\n    flatBlock(start: string, end: string, isEndError?: (token: Token<any>) => boolean) {\n        let token = this.next();\n        if (token.type !== start) {\n            return [];\n        }\n        const block = [];\n        let endIndex;\n        while ((token = this.next())) {\n            if (!token.type) {\n                if (endIndex !== undefined) {\n                    this.index = endIndex - 1;\n                }\n                return;\n            }\n            if (isEndError && isEndError(token)) {\n                endIndex = this.index;\n            }\n            if (token.type === end) {\n                return block;\n            } else {\n                block.push(token);\n            }\n        }\n        return [];\n    }\n    done() {\n        return this.index >= this.tokens.length - 1;\n    }\n    run<A>(\n        handleToken: (token: T, ast: A, source: string, seeker: this) => void | boolean,\n        ast: A,\n        source: string\n    ) {\n        let token;\n        while ((token = this.next()) && token.type) {\n            if (handleToken(token, ast, source, this) === false) {\n                break;\n            }\n        }\n        return ast;\n    }\n}\n", "export * from './types';\nexport * from './core';\nexport * from './helpers';\nexport * from './seeker';\n", "import {\n    tokenize,\n    isStringDelimiter,\n    isWhitespace,\n    createToken,\n    getJSCommentStartType,\n    getMultilineCommentStartType,\n    isCommentEnd,\n    getUnclosedComment,\n} from '@tokey/core';\nimport type { Token, Descriptors } from '@tokey/core';\n\ntype Delimiters =\n    | '['\n    | ']'\n    | '('\n    | ')'\n    | ','\n    | '*'\n    | '|'\n    | ':'\n    | '.'\n    | '#'\n    | '>'\n    | '~'\n    | '+'\n    | '{'\n    | '}'\n    | '&';\n\nexport type CSSSelectorToken = Token<Descriptors | Delimiters>;\n\nexport function tokenizeSelector(source: string, options: { offset?: number } = {}) {\n    const parseLineComments = false; // why would that be a choice?\n    return tokenize<CSSSelectorToken>(source, {\n        isDelimiter,\n        isStringDelimiter(char: string, previousChar: string) {\n            return previousChar !== `\\\\` && isStringDelimiter(char);\n        },\n        isWhitespace,\n        shouldAddToken: () => true,\n        createToken,\n        getCommentStartType: parseLineComments\n            ? getJSCommentStartType\n            : getMultilineCommentStartType,\n        isCommentEnd,\n        getUnclosedComment,\n        offset: options.offset,\n    });\n}\n\nconst isDelimiter = (char: string, previousChar: string) =>\n    previousChar !== '\\\\' &&\n    (char === '[' ||\n        char === ']' ||\n        char === '(' ||\n        char === ')' ||\n        char === ',' ||\n        char === '*' ||\n        char === '|' ||\n        char === ':' ||\n        char === '.' ||\n        char === '#' ||\n        char === '>' ||\n        char === '~' ||\n        char === '+' ||\n        char === '{' ||\n        char === '}' ||\n        char === '&');\n", "import type { CSSSelectorToken } from './tokenizer';\nimport type {\n    Combinator,\n    Comment,\n    Selector,\n    Nth,\n    NamespacedNode,\n    SelectorList,\n    SelectorNode,\n} from './ast-types';\nimport { Token, last } from '@tokey/core';\n\n// create ast nodes\n\nexport function createEmptySelector(): Selector {\n    return {\n        type: 'selector',\n        start: -1,\n        end: -1,\n        before: '',\n        after: '',\n        nodes: [],\n    };\n}\n\nexport function createEmptyNth(): Nth {\n    return {\n        type: 'nth',\n        start: -1,\n        end: -1,\n        before: '',\n        after: '',\n        nodes: [],\n    };\n}\n\nexport function createCombinatorAst({\n    value,\n    type,\n    start,\n    end,\n}: CSSSelectorToken & Token<'space' | '+' | '>' | '~'>): Combinator {\n    return {\n        type: `combinator`,\n        combinator: type,\n        value: type === `space` ? value[0] : value,\n        start,\n        end,\n        before: ``,\n        after: type === `space` ? value.slice(1) : ``,\n        invalid: false,\n    };\n}\n\nexport function createCommentAst({ value, start, end }: CSSSelectorToken): Comment {\n    return {\n        type: `comment`,\n        value,\n        start,\n        end,\n        before: ``,\n        after: ``,\n    };\n}\n\n// type guards\n\nexport function isCombinatorToken(\n    token: CSSSelectorToken\n): token is Token<'space' | '+' | '>' | '~'> {\n    return token.type === 'space' || token.type === '+' || token.type === '>' || token.type === '~';\n}\n\nexport function isNamespacedToken(token: CSSSelectorToken): token is Token<'text' | '*'> {\n    return token.type === `*` || token.type === `text`;\n}\nexport function isNamespacedAst(token: SelectorNode): token is NamespacedNode {\n    return token.type === `universal` || token.type === `type`;\n}\n\n// utils\n\nexport function ensureSelector(selectors: SelectorList, startToken: CSSSelectorToken) {\n    let lastSelector = last(selectors);\n    if (!lastSelector) {\n        lastSelector = createEmptySelector();\n        lastSelector.start = startToken.start;\n        selectors.push(lastSelector);\n    }\n    return lastSelector;\n}\n\nexport function trimCombinators(selector: Selector) {\n    // costly way to turn combinators to before and after.\n    // this can be inlined in the handle token process\n    const nodes = selector.nodes;\n    const firstNode = nodes[0];\n    const lastNode = last(nodes);\n    // remove first space combinator and add to selector before\n    // (going between comment is not required for the start because they are taken care\n    // of during parsing)\n    if (firstNode?.type === 'combinator' && firstNode.combinator === 'space') {\n        selector.nodes.shift();\n        selector.before += firstNode.before + firstNode.value + firstNode.after;\n    }\n    // remove any edge space combinators (last and between comments)\n    if (lastNode && lastNode !== firstNode) {\n        let index = nodes.length - 1;\n        let current = lastNode;\n        let lastComment: Comment | undefined;\n        while (\n            current &&\n            (current.type === `comment` ||\n                (current.type === `combinator` && current.combinator === `space`))\n        ) {\n            if (current.type === `combinator`) {\n                if (!lastComment) {\n                    // attach space to end of selector\n                    selector.nodes.pop();\n                    selector.after += current.before + current.value + current.after;\n                } else {\n                    // attach space to start of comment\n                    selector.nodes.splice(index, 1);\n                    lastComment.before += current.before + current.value + current.after;\n                    lastComment.start = current.start;\n                }\n            } else {\n                lastComment = current;\n            }\n            current = nodes[--index];\n        }\n    }\n}\n", "import type { CSSSelectorToken } from './tokenizer';\nimport type { Nth, NthOf, NthOffset, NthStep } from './ast-types';\nimport { createCommentAst } from './helpers';\nimport { isComment, Seeker, last } from '@tokey/core';\n\nexport class NthParser {\n    static isNthPseudoClass(name: string): boolean {\n        return (\n            name === `nth-child` ||\n            name === `nth-last-child` ||\n            name === `nth-of-type` ||\n            name === `nth-last-of-type`\n        );\n    }\n    /**\n     * check (case insensitive) and returns 2 groups:\n     * 1. plus/minus sign (invalid step value)\n     * 2. odd/even string\n     * [\n     *  `+`|`-`|undefined,\n     *  `odd`|`even`\n     * ]\n     */\n    static oddEvenStep = /([-+]?)(odd|even)/i;\n    /**\n     * check for valid step\n     * starts with optional minus or plus,\n     * ends with 0 or more digits following a `n`/`N` character\n     */\n    static validStep = /^[-+]?\\d*n$/i;\n    /**\n     * check for valid offset\n     * starts with optional minus or plus,\n     * ends with 1 or more digits\n     */\n    static validOffset = /^[-+]?\\d+$/;\n    /**\n     * check for valid start of nth expression\n     * and returns 2 groups:\n     * 1. An: optional minus or plus, 0 or more digits, `n`/`N` character\n     * 2. anything after that\n     */\n    static nthStartExp = /([-+]?\\d*[nN]?)(.*)/;\n\n    public state: 'step' | `dash` | `offset` | `of` | `selector` = `step`;\n    private standaloneDash = false;\n    private ast: Nth['nodes'];\n    constructor(private selectorNode: Nth, private s: Seeker<CSSSelectorToken>) {\n        this.ast = selectorNode.nodes;\n    }\n    public handleToken(token: CSSSelectorToken): boolean {\n        const type = token.type;\n        if (type === `text` || type === `+`) {\n            switch (this.state) {\n                case `step`: {\n                    // pickup 1 or more tokens for `5n` / `+5n` / `+5n-4` / `5`\n                    const nextToken =\n                        type === `+` && this.s.peek().type === `text` ? this.s.next() : undefined;\n                    this.breakFirstChunk({\n                        type: `text`,\n                        value: token.value + (nextToken?.value || ``),\n                        start: token.start,\n                        end: nextToken?.end || token.end,\n                    });\n                    return true;\n                }\n                case `dash`: {\n                    const nextToken =\n                        type === `+` && this.s.peek().type === `text` ? this.s.next() : undefined;\n                    this.pushDash({\n                        type: `text`,\n                        value: token.value + (nextToken?.value || ``),\n                        start: token.start,\n                        end: nextToken?.end || token.end,\n                    });\n                    return true;\n                }\n                case `offset`: {\n                    const nextToken =\n                        type === `+` && this.s.peek().type === `text` ? this.s.next() : undefined;\n                    this.pushOffset({\n                        type: `text`,\n                        value: token.value + (nextToken?.value || ``),\n                        start: token.start,\n                        end: nextToken?.end || token.end,\n                    });\n                    return true;\n                }\n                case `of`: {\n                    this.pushOf(token);\n                    return false;\n                }\n            }\n        } else if (type === `space`) {\n            // improve typing\n            const lastNode = last(this.ast);\n            if (lastNode) {\n                lastNode.after += token.value;\n                lastNode.end += token.value.length;\n            } else {\n                // add initial space to top selector\n                this.selectorNode.before += token.value;\n            }\n            return true;\n        } else if (isComment(type)) {\n            this.ast.push(createCommentAst(token));\n            return true;\n        }\n        // not part of `An+b of`: bail out\n        this.s.back();\n        return false;\n    }\n    /**\n     * first token can only be (minus contained in text):\n     * step: `5n`/`+5n`/`-5n`\n     * step & offset: `5n`/`5n-5\n     */\n    private breakFirstChunk(token: CSSSelectorToken) {\n        const value = token.value;\n        // find odd/even\n        const oddEventMatch = value.match(NthParser.oddEvenStep);\n        if (oddEventMatch) {\n            const isInvalid = !!oddEventMatch[1];\n            this.pushStep(token, isInvalid);\n            return;\n        }\n        // separate valid step start from rest: `-5n-4` / `-5n` / `-4` / `5n-4`\n        const matchValidStart = value.match(NthParser.nthStartExp);\n        if (!matchValidStart) {\n            // invalid step\n            this.pushStep(token);\n        } else {\n            const step = matchValidStart[1];\n            const offset = matchValidStart[2];\n            if (!offset && !step.match(/[nN]+$/) && step.match(NthParser.validOffset)) {\n                // no `n` - just offset\n                this.pushOffset(token);\n            } else if (offset === `-`) {\n                // connected dash: `5n-`\n                this.pushStep({\n                    type: `text`,\n                    value: step,\n                    start: token.start,\n                    end: token.start + step.length,\n                });\n                this.pushDash({\n                    type: `text`,\n                    value: `-`,\n                    start: token.end - 1,\n                    end: token.end,\n                });\n            } else if (offset && !offset.match(/-\\d+/)) {\n                // invalid step: `-3x`\n                this.pushStep(token);\n            } else {\n                // step with potential minus offset: `5n-4`\n                this.pushStep({\n                    type: `text`,\n                    value: step,\n                    start: token.start,\n                    end: token.start + step.length,\n                });\n                if (offset) {\n                    this.pushOffset({\n                        type: `text`,\n                        value: offset,\n                        start: token.end - offset.length,\n                        end: token.end,\n                    });\n                }\n            }\n        }\n    }\n    private pushStep(token: CSSSelectorToken, isInvalid?: boolean) {\n        const value = token.value;\n        const stepNode: NthStep = {\n            type: `nth_step`,\n            value,\n            before: ``,\n            after: ``,\n            start: token.start,\n            end: token.end,\n        };\n        isInvalid = isInvalid !== undefined ? isInvalid : !value.match(NthParser.validStep);\n        if (isInvalid) {\n            stepNode.invalid = true;\n        }\n        this.state = `dash`;\n        this.ast.push(stepNode);\n    }\n    private pushDash(token: CSSSelectorToken) {\n        const value = token.value;\n        if (value === `+` || value === `-`) {\n            this.ast.push({\n                type: `nth_dash`,\n                value: token.value,\n                start: token.start,\n                end: token.end,\n                before: ``,\n                after: ``,\n            });\n            this.standaloneDash = true;\n            this.state = `offset`;\n        } else {\n            this.pushOffset(token);\n        }\n    }\n    private pushOffset(token: CSSSelectorToken) {\n        if (token.value === `of`) {\n            this.pushOf(token);\n        } else {\n            const value = token.value;\n            const offsetNode: NthOffset = {\n                type: `nth_offset`,\n                value,\n                before: ``,\n                after: ``,\n                start: token.start,\n                end: token.end,\n            };\n            if (\n                !value.match(NthParser.validOffset) ||\n                (this.standaloneDash && value.match(/^[-+]/))\n            ) {\n                offsetNode.invalid = true;\n            }\n            this.state = `of`;\n            this.ast.push(offsetNode);\n        }\n    }\n    private pushOf(token: CSSSelectorToken) {\n        const ofNode: NthOf = {\n            type: `nth_of`,\n            value: token.value,\n            before: ``,\n            after: ``,\n            start: token.start,\n            end: token.end,\n        };\n        if (token.value !== `of`) {\n            ofNode.invalid = true;\n        }\n        this.ast.push(ofNode);\n        this.state = `selector`;\n    }\n}\n", "import { tokenizeSelector, CSSSelectorToken } from './tokenizer';\nimport { NthParser } from './nth-parser';\nimport type {\n    Namespace,\n    Combinator,\n    Comment,\n    NamespacedNode,\n    Selector,\n    SelectorList,\n    SelectorNode,\n} from './ast-types';\nimport {\n    createCombinatorAst,\n    createCommentAst,\n    createEmptySelector,\n    createEmptyNth,\n    isCombinatorToken,\n    isNamespacedAst,\n    isNamespacedToken,\n    ensureSelector,\n    trimCombinators,\n} from './helpers';\nimport { isComment, getText, Seeker, last } from '@tokey/core';\n\nexport interface ParseConfig {\n    offset: number;\n}\n\nexport function parseCssSelector(source: string, options: Partial<ParseConfig> = {}) {\n    return parseTokens(source, tokenizeSelector(source, options));\n}\n\nfunction parseTokens(source: string, tokens: CSSSelectorToken[]): SelectorList {\n    return new Seeker(tokens).run<SelectorList>(handleToken, [], source);\n}\n\nfunction handleToken(\n    token: CSSSelectorToken,\n    selectors: SelectorList,\n    source: string,\n    s: Seeker<CSSSelectorToken>\n): void {\n    let t;\n    const currentSelector = ensureSelector(selectors, token);\n    const ast = currentSelector.nodes;\n    if (token.type === '.') {\n        const comments = s.takeMany('multi-comment').map(createCommentAst);\n        const name = s.take('text');\n        ast.push({\n            type: 'class',\n            value: name?.value ?? '',\n            start: token.start,\n            end: name?.end ?? last(comments)?.end ?? token.end,\n            dotComments: comments,\n        });\n    } else if (token.type === ':') {\n        const firstComments = s.takeMany('multi-comment').map(createCommentAst);\n        const type = s.take(':') || token;\n        const isClass = token === type;\n\n        if (isClass) {\n            const name = s.take('text');\n            const endToken = name || last(firstComments) || type;\n            ast.push({\n                type: 'pseudo_class',\n                value: name?.value ?? '',\n                start: token.start,\n                end: name?.end ?? endToken.end,\n                colonComments: firstComments,\n            });\n        } else {\n            const secondComments = s.takeMany('multi-comment').map(createCommentAst);\n            const name = s.take('text');\n            const endToken = name || last(secondComments) || type;\n\n            ast.push({\n                type: 'pseudo_element',\n                value: name?.value ?? '',\n                start: token.start,\n                end: name?.end ?? endToken.end,\n                colonComments: { first: firstComments, second: secondComments },\n            });\n        }\n    } else if (token.type === '[') {\n        const block = s.run(\n            (token, ast) => {\n                ast.push(token);\n                return token.type !== ']';\n            },\n            [token],\n            source\n        );\n        const closed = last(block)?.type === ']';\n        if (closed) {\n            ast.push({\n                type: 'attribute',\n                value: block.length > 2 ? getText(block, 1, block.length - 1, source) : '',\n                start: token.start,\n                end: last(block)?.end ?? token.end,\n            });\n        } else {\n            ast.push({\n                type: 'invalid',\n                value: getText(block, undefined, undefined, source),\n                start: token.start,\n                end: last(block)?.end ?? token.end,\n            });\n        }\n    } else if (isCombinatorToken(token)) {\n        let lastCombinatorAst = createCombinatorAst(token);\n        let lastAst: Combinator | Comment = lastCombinatorAst;\n        // insert token as a combinator\n        ast.push(lastCombinatorAst);\n        // save the insertion point of the first combinator in case it's a space\n        // that might be considered a normal space later and will need to be changed.\n        let initialSpaceCombIndex: number =\n            lastCombinatorAst.combinator === `space` ? ast.length - 1 : -1;\n        /**\n         * take next spaces/combinators/comments:\n         * - combinator/space token:\n         *  - spaces: merge to previous ast node before them\n         *  - previous ast equal to space combinator\n         *    - turn previous ast to the next combinator type\n         *    - merge spaces between them\n         *    - cancel initial space tracking - must be merged with other non space combinator or already canceled\n         *  - initial ast is space (must be comments following it)\n         *    - initial space is first in selector: merge initial ast into the selector before\n         *    - otherwise merge initial ast the comment following it\n         *  - insert an invalid combinator\n         * - comment token: insert to ast\n         */\n        //\n        let next = s.next();\n        while (next) {\n            if (isCombinatorToken(next)) {\n                if (next.type === `space`) {\n                    // add space to the last ast node\n                    lastAst.after += next.value;\n                    lastAst.end = next.end;\n                } else if (lastAst === lastCombinatorAst && lastAst.combinator === 'space') {\n                    // combine next combinator into previous (space)\n                    const nextCombinator = createCombinatorAst(next);\n                    lastCombinatorAst.combinator = nextCombinator.combinator;\n                    lastCombinatorAst.before +=\n                        lastCombinatorAst.after + lastCombinatorAst.value + nextCombinator.before;\n                    lastCombinatorAst.after = nextCombinator.after;\n                    lastCombinatorAst.value = nextCombinator.value;\n                    lastCombinatorAst.end = nextCombinator.end;\n                    // reset initial space\n                    initialSpaceCombIndex = -1;\n                } else if (initialSpaceCombIndex !== -1) {\n                    // merge initial space combinator (classified as combinator before a comment)\n                    const initialSpace = ast[initialSpaceCombIndex] as Combinator;\n                    const spaceValue =\n                        initialSpace.before + initialSpace.value + initialSpace.after;\n                    if (initialSpaceCombIndex === 0) {\n                        // merge to beginning of selector\n                        currentSelector.before += spaceValue;\n                    } else {\n                        // merge to the next comment\n                        const nodeAfterInitial = ast[initialSpaceCombIndex + 1];\n                        if (nodeAfterInitial?.type === `comment`) {\n                            nodeAfterInitial.before += spaceValue;\n                            nodeAfterInitial.start = initialSpace.start;\n                        } else {\n                            // shouldn't happen as initial space is considered as a combinator\n                            // only when a comment is following it and before\n                        }\n                    }\n                    ast.splice(initialSpaceCombIndex, 1);\n                    initialSpaceCombIndex = -1;\n                    // add combinator\n                    lastCombinatorAst = createCombinatorAst(next);\n                    lastAst = lastCombinatorAst;\n                    ast.push(lastCombinatorAst);\n                } else {\n                    // add invalid combinator\n                    lastCombinatorAst = createCombinatorAst(next);\n                    lastCombinatorAst.invalid = true;\n                    lastAst = lastCombinatorAst;\n                    ast.push(lastCombinatorAst);\n                }\n            } else if (isComment(next.type)) {\n                lastAst = createCommentAst(next);\n                ast.push(lastAst);\n            } else {\n                break;\n            }\n            next = s.next();\n        }\n        // put back any unrelated token\n        if (next && !isCombinatorToken(next)) {\n            s.back();\n        }\n    } else if (token.type === 'text') {\n        ast.push({\n            type: 'type',\n            value: token.value,\n            start: token.start,\n            end: token.end,\n        });\n    } else if (token.type === '#') {\n        t = s.take('text');\n        ast.push({\n            type: 'id',\n            value: t?.value ?? '',\n            start: token.start,\n            end: t?.end ?? token.end,\n        });\n    } else if (token.type === '*') {\n        ast.push({\n            type: 'universal',\n            value: '*',\n            start: token.start,\n            end: token.end,\n        });\n    } else if (token.type === '|') {\n        // search backwards compatible namespace in ast\n        let prevAst: NamespacedNode | undefined;\n        let prevInvalidAst: SelectorNode | undefined;\n        const beforeComments: Comment[] = [];\n        for (let i = ast.length - 1; i >= 0; --i) {\n            const current = ast[i];\n            if (isNamespacedAst(current)) {\n                if (current.namespace) {\n                    // already namespaced\n                    prevInvalidAst = current;\n                } else {\n                    // merge with previous\n                    prevAst = current;\n                }\n                break;\n            } else if (\n                current.type === `comment` &&\n                current.before === `` &&\n                current.after === ``\n            ) {\n                beforeComments.unshift(current);\n            } else {\n                prevInvalidAst = current;\n                break;\n            }\n        }\n        // search forward target token\n        let target: CSSSelectorToken | undefined;\n        let searchIndex = 1;\n        const potentialAfterComments: CSSSelectorToken[] = [];\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n            const nextToken = s.peek(searchIndex);\n            if (isComment(nextToken.type)) {\n                potentialAfterComments.push(nextToken);\n            } else if (isNamespacedToken(nextToken)) {\n                target = nextToken;\n                break;\n            } else {\n                // space or end of tokens\n                break;\n            }\n            searchIndex++;\n        }\n        // create/update ast\n        const validNamespace = !prevInvalidAst;\n        const validTarget = !!target;\n        const type = target?.type === `*` ? `universal` : `type`;\n        let invalid: NonNullable<Namespace['invalid']> = ``;\n        // remove before/after pipe comments\n        if (validNamespace) {\n            ast.splice(ast.length - beforeComments.length, beforeComments.length);\n        } else {\n            invalid = `namespace`;\n        }\n        if (validTarget) {\n            potentialAfterComments.forEach(() => s.next());\n            s.next();\n        } else {\n            invalid = invalid ? `namespace,target` : `target`;\n        }\n        // create new ast or modify the prev\n        const nsAst: NamespacedNode =\n            prevAst ||\n            ({\n                type,\n                value: ``,\n                start: token.start,\n                end: target?.end || token.end,\n            } as NamespacedNode);\n        nsAst.type = type;\n        nsAst.namespace = {\n            value: prevAst?.value || ``,\n            beforeComments: validNamespace ? beforeComments : [],\n            afterComments: validTarget ? potentialAfterComments.map(createCommentAst) : [],\n        };\n        nsAst.value = target?.value || ``;\n        nsAst.end = target?.end || token.end;\n        // set invalid\n        if (invalid) {\n            nsAst.namespace.invalid = invalid;\n        }\n        // add ast if not modified\n        if (!prevAst) {\n            ast.push(nsAst);\n        }\n    } else if (token.type === '(') {\n        const prev = last(ast);\n        const res: SelectorList = [];\n        // handle nth selector\n        if (\n            prev &&\n            prev.type === `pseudo_class` &&\n            NthParser.isNthPseudoClass(prev.value) &&\n            s.peek().type !== `)`\n        ) {\n            // collect \"An+B of\" expression\n            const nthSelector = createEmptyNth();\n            nthSelector.start = s.peek().start;\n            res.push(nthSelector as unknown as Selector);\n            const nthParser = new NthParser(nthSelector, s);\n            s.run(\n                (token) => {\n                    if (nthParser.state === `selector`) {\n                        // got to selector, push back and stop\n                        s.back();\n                        return false;\n                    }\n                    return nthParser.handleToken(token);\n                },\n                nthSelector,\n                source\n            );\n            // setup next selector\n            if (s.peek().type !== `)`) {\n                nthSelector.end = last(nthSelector.nodes)?.end || nthSelector.start;\n                // add \"of\" selector\n                const newSelector = createEmptySelector();\n                newSelector.start = nthSelector.end;\n                res.push(newSelector);\n            }\n        }\n        // get all tokens until closed\n        s.run(\n            (token, selectors) => {\n                if (token.type === ')') {\n                    const currentSelector = last(selectors);\n                    if (currentSelector) {\n                        currentSelector.end =\n                            last(currentSelector.nodes)?.end ?? currentSelector.start;\n                    }\n                    return false;\n                }\n                return handleToken(token, selectors, source, s);\n            },\n            res,\n            source\n        );\n\n        const ended = s.peek(0);\n        if (\n            !prev ||\n            'nodes' in prev ||\n            prev.type === 'invalid' ||\n            prev.type === 'combinator' ||\n            prev.type === 'comment' ||\n            prev.type === 'nth_step' ||\n            prev.type === 'nth_dash' ||\n            prev.type === 'nth_offset' ||\n            prev.type === 'nth_of' ||\n            ended.type !== ')'\n        ) {\n            ast.push({\n                type: 'invalid',\n                value: getText([token, ended], undefined, undefined, source),\n                start: token.start,\n                end: ended?.end ?? s.peekBack().end,\n            });\n        } else {\n            const lastSelector = last(res);\n            if (lastSelector) {\n                trimCombinators(lastSelector);\n            }\n            prev.nodes = res;\n            prev.end = ended.end;\n        }\n    } else if (isComment(token.type)) {\n        ast.push(createCommentAst(token));\n    } else if (token.type === ',') {\n        // we ensure at least one selector present\n        const selector = last(selectors)!;\n        selector.end = token.start;\n        trimCombinators(selector);\n        const newSelector = createEmptySelector();\n        if (s.done()) {\n            newSelector.start = token.end;\n            newSelector.end = token.end;\n        } else {\n            newSelector.start = s.peek().start;\n        }\n        selectors.push(newSelector);\n    } else if (token.type === '&') {\n        ast.push({\n            type: 'nesting',\n            value: '&',\n            start: token.start,\n            end: token.end,\n        });\n    } else {\n        ast.push({\n            type: 'invalid',\n            value: token.value,\n            start: token.start,\n            end: token.end,\n        });\n    }\n    if (s.done()) {\n        currentSelector.end = last(currentSelector.nodes)?.end ?? currentSelector.start;\n        trimCombinators(currentSelector);\n    }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ast-types.js.map", "import { NthParser } from './nth-parser';\nimport type {\n    ImmutableId,\n    ImmutableAttribute,\n    ImmutableClass,\n    ImmutableCombinator,\n    ImmutableComment,\n    ImmutableType,\n    ImmutableInvalid,\n    ImmutableNth,\n    ImmutableNthDash,\n    ImmutableNthOf,\n    ImmutableNthOffset,\n    ImmutableNthStep,\n    ImmutablePseudoClass,\n    ImmutablePseudoElement,\n    ImmutableSelector,\n    ImmutableCompoundSelector,\n    ImmutableUniversal,\n    ImmutableNesting,\n    ImmutableSelectorNode,\n    ImmutableSelectorList,\n    ImmutableNthSelectorList,\n    ImmutableFunctionalSelector,\n    ImmutableNamespacedNode,\n} from './ast-types';\n\nexport function stringifySelectorAst(\n    value: ImmutableSelectorNode | ImmutableSelectorList | ImmutableNthSelectorList\n): string {\n    return 'length' in value ? stringifySelectors(value) : stringifyNode(value);\n}\n\ntype Printers = {\n    [K in ImmutableSelectorNode as K['type']]: (node: K) => string;\n};\n\nconst printers: Printers = {\n    id: (node: ImmutableId) => `#${node.value}${stringifyNested(node)}`,\n    class: (node: ImmutableClass) =>\n        `.${node.dotComments.map(stringifyNode).join('')}${node.value}${stringifyNested(node)}`,\n    type: (node: ImmutableType) =>\n        `${stringifyNamespace(node)}${node.value}${stringifyNested(node)}`,\n    combinator: (node: ImmutableCombinator) => `${node.before}${node.value}${node.after}`,\n    attribute: (node: ImmutableAttribute) => `[${node.value}]${stringifyNested(node)}`,\n    pseudo_class: (node: ImmutablePseudoClass) =>\n        `:${node.colonComments.map(stringifyNode).join('')}${node.value}${stringifyNested(node)}`,\n    pseudo_element: (node: ImmutablePseudoElement) =>\n        `:${node.colonComments.first.map(stringifyNode).join('')}:${node.colonComments.second\n            .map(stringifyNode)\n            .join('')}${node.value}${stringifyNested(node)}`,\n    comment: ({ before, value, after }: ImmutableComment) => `${before}${value}${after}`,\n    universal: (node: ImmutableUniversal) =>\n        `${stringifyNamespace(node)}${node.value}${stringifyNested(node)}`,\n    nesting: (node: ImmutableNesting) => `${node.value}${stringifyNested(node)}`,\n    selector: (node: ImmutableSelector) =>\n        `${node.before}${node.nodes.map(stringifyNode).join('')}${node.after}`,\n    compound_selector: (node: ImmutableCompoundSelector) =>\n        `${node.before}${node.nodes.map(stringifyNode).join('')}${node.after}`,\n    invalid: (node: ImmutableInvalid) => node.value,\n    nth: (node: ImmutableNth) =>\n        `${node.before}${node.nodes.map(stringifyNode).join('')}${node.after}`,\n    nth_step: ({ before, value, after }: ImmutableNthStep) => `${before}${value}${after}`,\n    nth_dash: ({ before, value, after }: ImmutableNthDash) => `${before}${value}${after}`,\n    nth_offset: ({ before, value, after }: ImmutableNthOffset) => `${before}${value}${after}`,\n    nth_of: ({ before, value, after }: ImmutableNthOf) => `${before}${value}${after}`,\n};\n\nfunction stringifyNode(node: ImmutableSelectorNode): string {\n    return printers[node.type]?.(node as never) ?? '';\n}\n\nfunction stringifySelectors(selectors: ReadonlyArray<ImmutableSelector | ImmutableNth>) {\n    const result: string[] = [];\n    for (const node of selectors) {\n        result.push(stringifyNode(node));\n    }\n    return result.join(`,`);\n}\n\nfunction stringifyNested(node: ImmutableFunctionalSelector): string {\n    if ('nodes' in node) {\n        if (node.nodes?.length) {\n            if (node.type === `pseudo_class` && NthParser.isNthPseudoClass(node.value)) {\n                const [nthNode, ...selectors] = node.nodes;\n                return `(${stringifyNode(nthNode)}${stringifySelectors(selectors)})`;\n            } else {\n                return `(${stringifySelectors(node.nodes)})`;\n            }\n        } else {\n            return `()`;\n        }\n    }\n    return '';\n}\n\nfunction stringifyNamespace({ namespace }: ImmutableNamespacedNode): string {\n    let ns = ``;\n    if (namespace) {\n        ns += namespace.value;\n        for (const comment of namespace.beforeComments) {\n            ns += printers.comment(comment);\n        }\n        ns += `|`;\n        for (const comment of namespace.afterComments) {\n            ns += printers.comment(comment);\n        }\n    }\n    return ns;\n}\n", "import type {\n    SelectorNode,\n    SelectorList,\n    FunctionalSelector,\n    ImmutableSelectorNode,\n    ImmutableSelectorList,\n} from '../ast-types';\n\nexport interface WalkOptions {\n    visitList?: SelectorNode['type'][];\n    ignoreList?: SelectorNode['type'][];\n}\nexport type WalkVisitor<AST extends SelectorNode | ImmutableSelectorNode> = (\n    node: AST,\n    index: number,\n    nodes: AST[],\n    parents: AST[]\n) => number | undefined | void;\nconst nestEnd = Symbol(`nest-end`);\n\n/**\n * traverse each node of the selector AST from start to end.\n * to control traversal return:\n *  walk.skipNested\n *  walk.skipCurrentSelector\n *  walk.stopAll\n *\n * @param topNode the top AST to traverse down from\n * @param visit function to call for each traversed element\n * @param options provide visitList/ignoreList for traversal\n */\nexport function walk<AST extends SelectorNode | SelectorList>(\n    topNode: AST,\n    visit: WalkVisitor<SelectorNode>,\n    options?: WalkOptions\n): void;\nexport function walk<AST extends ImmutableSelectorNode | ImmutableSelectorList>(\n    topNode: AST,\n    visit: WalkVisitor<ImmutableSelectorNode>,\n    options?: WalkOptions\n): void;\nexport function walk<\n    AST extends SelectorNode | SelectorList | ImmutableSelectorNode | ImmutableSelectorList\n>(\n    topNode: AST,\n    visit: WalkVisitor<SelectorNode> | WalkVisitor<ImmutableSelectorNode>,\n    options: WalkOptions = {}\n): void {\n    // set initial top nodes to traverse\n    const toVisit: Array<SelectorNode | ImmutableSelectorNode | typeof nestEnd> = Array.isArray(\n        topNode\n    )\n        ? [...topNode]\n        : [topNode];\n    // initiate context\n    const context = createWalkContext(topNode);\n    // iterate nodes\n    while (toVisit.length) {\n        const current = toVisit.shift()!;\n        if (current === nestEnd) {\n            // end of nested level\n            context.up();\n            continue;\n        } else if (\n            (!options.ignoreList || !options.ignoreList.includes(current.type)) &&\n            (!options.visitList || options.visitList.includes(current.type))\n        ) {\n            // visit node\n            let skipAmount =\n                (visit(\n                    current as SelectorNode,\n                    context.indexInSelector,\n                    context.nodesInSelector as SelectorNode[],\n                    context.parents as SelectorNode[]\n                ) as number) ?? -1;\n            // point to next selector node\n            context.next();\n\n            // check if to skip nested or current/following selectors\n            if (skipAmount === Infinity) {\n                // stop all: fast bail out\n                return;\n            } else if (skipAmount >= 0) {\n                // skip levels\n                while (skipAmount > 0 && toVisit.length) {\n                    const next = toVisit.shift()!;\n                    if (next === nestEnd) {\n                        skipAmount--;\n                        context.up();\n                    }\n                }\n                continue;\n            }\n        } else {\n            // point to next selector node\n            context.next();\n        }\n        // add nested nodes\n        if (isWithNodes(current)) {\n            context.insertNested(current);\n            toVisit.unshift(...current.nodes, nestEnd);\n        }\n    }\n}\n\ninterface WalkContext<AST> {\n    parents: AST[];\n    indexInSelector: number;\n    nodesInSelector: ReadonlyArray<AST>;\n    up(): void;\n    next(): void;\n    insertNested(node: ContainerWithNodes): void;\n}\nfunction createWalkContext(topNode: SelectorNode | SelectorList): WalkContext<SelectorNode>;\nfunction createWalkContext(\n    topNode: ImmutableSelectorNode | ImmutableSelectorList\n): WalkContext<ImmutableSelectorNode>;\nfunction createWalkContext(\n    topNode: SelectorNode | SelectorList | ImmutableSelectorNode | ImmutableSelectorList\n) {\n    const prevIndex: number[] = [];\n    const prevParents: ImmutableSelectorNode[][] = [[]];\n    const context: WalkContext<SelectorNode | ImmutableSelectorNode> = {\n        parents: [],\n        indexInSelector: 0,\n        nodesInSelector: Array.isArray(topNode)\n            ? topNode\n            : `nodes` in topNode\n            ? topNode.nodes!\n            : ([topNode] as SelectorNode[]),\n        up() {\n            context.parents.pop();\n            context.indexInSelector = prevIndex.shift()!;\n            const currentParents = context.parents;\n            const currentParent = currentParents[currentParents.length - 1];\n            context.nodesInSelector = currentParent ? (currentParent as any).nodes : topNode;\n        },\n        next() {\n            context.indexInSelector++;\n        },\n        insertNested(node) {\n            context.parents = [...context.parents, node];\n            prevParents.push(context.parents);\n            prevIndex.unshift(context.indexInSelector);\n            context.indexInSelector = 0;\n            context.nodesInSelector = node.nodes;\n        },\n    };\n    return context;\n}\n\nwalk.skipNested = 0 as const;\nwalk.skipCurrentSelector = 1 as const;\nwalk.stopAll = Infinity;\n\ntype ContainerWithNodes = FunctionalSelector & { nodes: SelectorNode[] };\nfunction isWithNodes(node: any): node is ContainerWithNodes {\n    return node && `nodes` in node;\n}\n", "import type {\n    SelectorNode,\n    SelectorList,\n    Selector,\n    CompoundSelector,\n    Comment,\n    CommentWithNoSpacing,\n    ImmutableSelector,\n    ImmutableSelectorList,\n    ImmutableSelectorNode,\n} from '../ast-types';\nimport { walk } from './walk';\n\nexport interface GroupCompoundOptions {\n    splitPseudoElements?: boolean;\n    deep?: boolean;\n}\nexport function groupCompoundSelectors<AST extends Selector>(\n    input: AST,\n    options?: GroupCompoundOptions\n): Selector;\nexport function groupCompoundSelectors<AST extends ImmutableSelector>(\n    input: AST,\n    options?: GroupCompoundOptions\n): ImmutableSelector;\nexport function groupCompoundSelectors<AST extends SelectorList>(\n    input: AST,\n    options?: GroupCompoundOptions\n): SelectorList;\nexport function groupCompoundSelectors<AST extends ImmutableSelectorList>(\n    input: AST,\n    options?: GroupCompoundOptions\n): ImmutableSelectorList;\nexport function groupCompoundSelectors<\n    AST extends Selector | ImmutableSelector | SelectorList | ImmutableSelectorList\n>(\n    input: AST,\n    options?: GroupCompoundOptions\n): Selector | ImmutableSelector | SelectorList | ImmutableSelectorList {\n    const context = createCompoundContext(options);\n    walk(input, (node, _index, _nodes, parents) => {\n        if (parents.length === 0 && node.type === `selector`) {\n            // first level: create top level selector\n            context.addSelector(node);\n        } else {\n            // second level: (parents.length === 1)\n            if (options?.deep && `nodes` in node) {\n                // compound nested selectors\n                /* This `nodes` type is hard since it's internal we use any[] here. sorry */\n                const nodes: any[] = [];\n                for (const nested of node.nodes!) {\n                    nodes.push(\n                        nested.type === `selector`\n                            ? groupCompoundSelectors(nested, options)\n                            : nested\n                    );\n                }\n                node = { ...node, nodes };\n            }\n            context.handleNode(node);\n            // don't go deeper - shallow group\n            return walk.skipNested;\n        }\n        return;\n    });\n    return `length` in input ? context.output : context.output[0];\n}\n\ntype CompoundSelectorPart = CompoundSelector['nodes'][number];\nfunction createCompoundContext({ splitPseudoElements = true }: GroupCompoundOptions = {}) {\n    const output: SelectorList = [];\n    let lastSelector: Selector;\n    let lastCompound: CompoundSelector | undefined;\n    let lastCompoundInitialPart: CompoundSelectorPart | undefined;\n    const handleNode = (node: SelectorNode | ImmutableSelectorNode) => {\n        if (node.type === `pseudo_element` && splitPseudoElements === true) {\n            lastCompound = undefined;\n        }\n        if (node.type === `combinator`) {\n            lastSelector.nodes.push(node);\n            lastCompound = undefined;\n        } else if (node.type === `comment` && !isCommentWithNoSpacing(node)) {\n            // comment that breaks compound\n            lastSelector.nodes.push(node);\n            lastCompound = undefined;\n        } else if (\n            node.type === `type` ||\n            node.type === `universal` ||\n            node.type === `class` ||\n            node.type === `id` ||\n            node.type === `attribute` ||\n            node.type === `nesting` ||\n            node.type === `pseudo_class` ||\n            node.type === `pseudo_element` ||\n            node.type === `invalid` ||\n            node.type === `comment` /*no spacing*/\n        ) {\n            // part of compound\n            if (!lastCompound) {\n                // add new compound selector\n                lastCompoundInitialPart = undefined;\n                lastCompound = {\n                    type: `compound_selector`,\n                    start: node.start,\n                    end: node.end,\n                    before: ``,\n                    after: ``,\n                    nodes: [],\n                    invalid: false,\n                };\n                lastSelector.nodes.push(lastCompound);\n            }\n            if (!lastCompound.invalid && node.type !== `comment`) {\n                // validate compound parts after initial\n                if (lastCompoundInitialPart) {\n                    lastCompound.invalid = node.type === `universal` || node.type === `type`;\n                }\n                lastCompoundInitialPart = node as CompoundSelectorPart;\n            }\n            lastCompound.nodes.push(node as CompoundSelectorPart);\n            lastCompound.end = node.end;\n        } else if (node.type === `selector` || node.type === `compound_selector`) {\n            // spread\n            for (const innerNode of node.nodes) {\n                handleNode(innerNode);\n            }\n        } else {\n            // handle out of context nodes\n            lastSelector.nodes.push(node as SelectorNode);\n            lastCompound = undefined;\n        }\n    };\n    return {\n        addSelector(node: Selector | ImmutableSelector) {\n            lastSelector = {\n                type: `selector`,\n                start: node.start,\n                end: node.end,\n                before: `before` in node ? node.before : ``,\n                after: `after` in node ? node.after : ``,\n                nodes: [],\n            };\n            output.push(lastSelector);\n            lastCompound = undefined;\n        },\n        handleNode,\n        output,\n    };\n}\n\nexport function splitCompoundSelectors<AST extends Selector>(input: AST): Selector;\nexport function splitCompoundSelectors<AST extends ImmutableSelector>(\n    input: AST\n): ImmutableSelector;\nexport function splitCompoundSelectors<AST extends SelectorList>(input: AST): SelectorList;\nexport function splitCompoundSelectors<AST extends ImmutableSelectorList>(\n    input: AST\n): ImmutableSelectorList;\nexport function splitCompoundSelectors<AST extends SelectorList | Selector>(\n    input: AST\n): SelectorList | Selector | ImmutableSelector | ImmutableSelectorList {\n    const inputSelectors: SelectorList = Array.isArray(input) ? input : [input];\n    const output: SelectorList = [];\n    for (const inputSelector of inputSelectors) {\n        const outputSelector: Selector = {\n            ...inputSelector,\n            nodes: [],\n        };\n        for (const node of inputSelector.nodes) {\n            if (node.type === `compound_selector`) {\n                outputSelector.nodes.push(...node.nodes);\n            } else {\n                outputSelector.nodes.push(node);\n            }\n        }\n        output.push(outputSelector);\n    }\n    return `length` in input ? output : output[0];\n}\n\nfunction isCommentWithNoSpacing(node: Comment): node is CommentWithNoSpacing {\n    return node.type === `comment` && node.before === `` && node.after === ``;\n}\n", "import type { ImmutableSelectorNode, ImmutablePseudoClass, SelectorNode } from '../ast-types';\nimport { walk } from './walk';\n\nexport type Specificity = [\n    inlineLevel: number,\n    idLevel: number,\n    classOrAttributeLevel: number,\n    typeOrElementLevel: number\n];\nexport function calcSpecificity(ast: ImmutableSelectorNode): Specificity {\n    const result: Specificity = [0, 0, 0, 0];\n    // ToDo: remove casting once immutable walk is supported\n    walk(ast as SelectorNode, (node) => {\n        switch (node.type) {\n            case `type`:\n            case `pseudo_element`:\n                result[3]++;\n                break;\n            case `class`:\n            case `attribute`:\n                result[2]++;\n                break;\n            case `pseudo_class`:\n                if (customPseudoClass[node.value]) {\n                    customPseudoClass[node.value](node, result);\n                    return walk.skipNested;\n                }\n                result[2]++;\n                break;\n            case `id`:\n                result[1]++;\n                break;\n        }\n        return node.type !== `selector` && node.type !== `compound_selector`\n            ? walk.skipNested\n            : undefined;\n    });\n    return result;\n}\n\nconst customPseudoClass: Record<string, (node: ImmutablePseudoClass, result: Specificity) => void> =\n    {\n        not: mostSpecificInnerSelector,\n        is: mostSpecificInnerSelector,\n        has: mostSpecificInnerSelector,\n        where: () => {\n            /* no specificity*/\n        },\n        'nth-child': pseudoClassPlusMostSpecificInnerSelector,\n        'nth-last-child': pseudoClassPlusMostSpecificInnerSelector,\n        'nth-of-type': pseudoClassPlusMostSpecificInnerSelector,\n        'nth-last-of-type': pseudoClassPlusMostSpecificInnerSelector,\n    };\n\nfunction pseudoClassPlusMostSpecificInnerSelector(node: ImmutablePseudoClass, result: Specificity) {\n    result[2]++;\n    mostSpecificInnerSelector(node, result);\n}\nfunction mostSpecificInnerSelector(node: ImmutablePseudoClass, result: Specificity) {\n    if (node.nodes?.length) {\n        let highest: Specificity = [0, 0, 0, 0];\n        for (const selector of node.nodes) {\n            const currentSpecificity = calcSpecificity(selector);\n            if (!highest || compareSpecificity(currentSpecificity, highest) === 1) {\n                highest = currentSpecificity;\n            }\n        }\n        addSpecificity(result, highest);\n    }\n}\n/**\n * compare 2 specificities\n * @param a first specificity\n * @param b second specificity\n * @returns 0 if equal, 1 when a is more specific, -1 when b is more specific\n */\nexport function compareSpecificity(a: Specificity, b: Specificity): -1 | 0 | 1 {\n    for (let i = 0; i < 4; ++i) {\n        const specificityDiff = a[i] - b[i];\n        if (specificityDiff > 0) {\n            return 1;\n        } else if (specificityDiff < 0) {\n            return -1;\n        }\n    }\n    return 0;\n}\n\n/**\n * mutate the first value, adding the second one\n * @param to specificity reference to to\n * @param from specificity amount to add\n */\nfunction addSpecificity(to: Specificity, from: Specificity) {\n    for (let i = 0; i < 4; ++i) {\n        to[i] += from[i];\n    }\n}\n", "export { parseCssSelector } from './selector-parser';\nexport type { ParseConfig } from './selector-parser';\nexport * from './ast-types';\nexport { stringifySelectorAst } from './stringify';\nexport { walk } from './ast-tools/walk';\nexport type { WalkOptions } from './ast-tools/walk';\nexport { groupCompoundSelectors, splitCompoundSelectors } from './ast-tools/compound';\nexport { calcSpecificity, compareSpecificity } from './ast-tools/specificity';\nexport type { Specificity } from './ast-tools/specificity';\n", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n  // Don't return `map.set` because it's not chainable in IE 11.\n  map.set(pair[0], pair[1]);\n  return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n  // Don't return `set.add` because it's not chainable in IE 11.\n  set.add(value);\n  return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n  var result;\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      if (isHostObject(value)) {\n        return object ? value : {};\n      }\n      result = initCloneObject(isFunc ? {} : value);\n      if (!isDeep) {\n        return copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, baseClone, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (!isArr) {\n    var props = isFull ? getAllKeys(value) : keys(value);\n  }\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n  });\n  return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var result = new buffer.constructor(buffer.length);\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n  return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n  return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    assignValue(object, key, newValue === undefined ? source[key] : newValue);\n  }\n  return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return cloneMap(object, isDeep, cloneFunc);\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return cloneSet(object, isDeep, cloneFunc);\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n  return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = cloneDeep;\n", "import {\n    Seeker,\n    tokenize,\n    isComment,\n    isStringDelimiter,\n    isWhitespace,\n    createToken,\n    getJSCommentStartType,\n    isCommentEnd,\n    getUnclosedComment,\n    Token,\n    Descriptors,\n} from '@tokey/core';\n\ntype Delimiters = ',' | ';' | ':' | '{' | '}' | '[' | ']' | '(' | ')' | '*';\n\nexport type CodeToken = Token<Descriptors | Delimiters>;\n\nexport function parseImports(\n    source: string,\n    blockStart = '{',\n    blockEnd = '}',\n    taggedImportSupport = false,\n    strictSemiColon = false\n) {\n    return findImports(\n        tokenize<CodeToken>(source, {\n            isDelimiter,\n            isStringDelimiter,\n            isWhitespace,\n            shouldAddToken,\n            createToken,\n            getCommentStartType: getJSCommentStartType,\n            isCommentEnd,\n            getUnclosedComment,\n        }),\n        blockStart,\n        blockEnd,\n        taggedImportSupport,\n        strictSemiColon\n    );\n}\n\nconst isDelimiter = (char: string) =>\n    char === ';' ||\n    char === '(' ||\n    char === ')' ||\n    char === ',' ||\n    char === '{' ||\n    char === '}' ||\n    char === ':' ||\n    char === '*' ||\n    char === '[' ||\n    char === ']';\n\nconst shouldAddToken = (type: CodeToken['type']) =>\n    type === 'space' || isComment(type) ? false : true;\n\nexport interface ImportValue {\n    star: boolean;\n    defaultName: string | undefined;\n    named: NamedMapping[] | undefined;\n    tagged: Record<string, NamedMapping[] | undefined>;\n    from: string | undefined;\n    errors: string[];\n    start: number;\n    end: number;\n}\n\ntype NamedMapping = [from: string, to: string];\n\nconst isImportBlockEndError = (token: CodeToken) => token.value === 'from' || token.type === ';';\n\nfunction findImports(\n    tokens: CodeToken[],\n    blockStart: string,\n    blockEnd: string,\n    taggedImportSupport = false,\n    strictSemiColon = false\n) {\n    const imports: ImportValue[] = [];\n    const s = new Seeker<CodeToken>(tokens);\n    let token;\n    let t;\n    while ((token = s.next())) {\n        if (!token.type) {\n            break;\n        }\n        if (token.value === 'import') {\n            const startTokenIndex = s.index;\n            const errors = [];\n            let defaultName;\n            let star = false;\n            let named: ImportValue['named'] = undefined;\n            let tagged: ImportValue['tagged'] = {};\n            let from;\n            t = s.next();\n            if (t.type === 'string') {\n                from = t.value.slice(1, -1);\n            } else {\n                if (t.type === 'text') {\n                    if (t.value === 'from') {\n                        s.back();\n                        errors.push('missing name');\n                    } else {\n                        defaultName = t.value;\n                    }\n                } else if (t.type === '*') {\n                    star = true;\n                    const as = s.peek();\n                    if (as.value === 'as') {\n                        s.next();\n                        t = s.peek();\n                        if (t.type === 'text' && t.value !== 'from') {\n                            s.next();\n                            defaultName = t.value;\n                        } else {\n                            errors.push('missing as name');\n                        }\n                    } else {\n                        errors.push('expected as after *');\n                    }\n                } else if (t.type === ',') {\n                    errors.push('missing default name');\n                }\n\n                if (t.type === blockStart) {\n                    if (star) {\n                        errors.push('Invalid named after *');\n                    }\n                    s.back();\n                    const block = s.flatBlock(blockStart, blockEnd, isImportBlockEndError);\n                    if (block) {\n                        const res = processNamedBlock(block, errors, taggedImportSupport);\n                        named = res.named;\n                        tagged = res.tagged;\n                    } else {\n                        errors.push('unclosed block');\n                    }\n                } else {\n                    t = s.peek();\n                    let hasComma = false;\n                    if (t.type === ',') {\n                        hasComma = true;\n                        s.next();\n                        t = s.peek();\n                    }\n                    if (t.type === blockStart) {\n                        if (defaultName && !hasComma) {\n                            errors.push('missing comma after name');\n                        }\n                        if (star) {\n                            errors.push('Invalid named after *');\n                        }\n                        const block = s.flatBlock(blockStart, blockEnd, isImportBlockEndError);\n                        if (block) {\n                            const res = processNamedBlock(block, errors, taggedImportSupport);\n                            named = res.named;\n                            tagged = res.tagged;\n                        } else {\n                            errors.push('unclosed block');\n                        }\n                    } else if (hasComma) {\n                        errors.push('missing named block');\n                    }\n                }\n\n                t = s.next();\n                if (t.value !== 'from') {\n                    s.back();\n                    errors.push('invalid missing from');\n                }\n                t = s.next();\n                if (t.type === 'string') {\n                    from = t.value.slice(1, -1);\n                } else {\n                    s.back(); //?\n                    errors.push('invalid missing source');\n                }\n            }\n            t = s.peek();\n            if (strictSemiColon && t.type !== ';' && !s.done()) {\n                errors.push('missing semicolon');\n            } else if (t.type === ';') {\n                s.next();\n            }\n\n            imports.push({\n                star,\n                defaultName,\n                named,\n                tagged,\n                from,\n                errors,\n                start: s.tokens[startTokenIndex].start,\n                end: s.tokens[s.index].end,\n            });\n        }\n    }\n    return imports;\n}\n\nfunction processNamedBlock(block: CodeToken[], errors: string[], taggedImportSupport: boolean) {\n    const named: [from: string, to: string][] = [];\n    const tagged: Record<string, [from: string, to: string][]> = {};\n    const tokens: CodeToken[] = [];\n\n    for (let i = 0; i < block.length; i++) {\n        const token = block[i];\n        if (block[i + 1]?.type === '(' && taggedImportSupport) {\n            const tagTokens = [];\n            const tagName = block[i];\n            let hasEnded;\n            for (let j = i + 2; j < block.length; j++) {\n                i = j;\n                if (block[j].type === ')') {\n                    hasEnded = true;\n                    break;\n                }\n                tagTokens.push(block[j]);\n            }\n            tagged[tagName.value] = processNamedBlock(tagTokens, errors, false).named;\n            if (tagName.type !== 'text') {\n                errors.push(`invalid tag name: ${tagName.value}`);\n            }\n            if (!hasEnded) {\n                errors.push(`unclosed tagged import \"${tagName.value}\"`);\n            }\n        } else if (token.type === ',') {\n            pushToken();\n        } else {\n            tokens.push(token);\n        }\n    }\n    if (tokens.length) {\n        pushToken();\n    }\n\n    return { named, tagged };\n\n    function pushToken() {\n        if (tokens.length === 1) {\n            const name = tokens[0].value;\n            named.push([name, name]);\n        } else if (tokens.length === 3) {\n            if (tokens[1].value === 'as') {\n                named.push([tokens[0].value, tokens[2].value]);\n            }\n        }\n        tokens.length = 0;\n    }\n}\n\n// REGEXP for import parsing import\\s+(.*?)\\s*,?\\s*(\\{.*?\\})?\\s*(from)?\\s*(['\"].*?['\"]);?\n", "var openParentheses = \"(\".charCodeAt(0);\nvar closeParentheses = \")\".charCodeAt(0);\nvar singleQuote = \"'\".charCodeAt(0);\nvar doubleQuote = '\"'.charCodeAt(0);\nvar backslash = \"\\\\\".charCodeAt(0);\nvar slash = \"/\".charCodeAt(0);\nvar comma = \",\".charCodeAt(0);\nvar colon = \":\".charCodeAt(0);\nvar star = \"*\".charCodeAt(0);\nvar uLower = \"u\".charCodeAt(0);\nvar uUpper = \"U\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar isUnicodeRange = /^[a-f0-9?-]+$/i;\n\nmodule.exports = function(input) {\n  var tokens = [];\n  var value = input;\n\n  var next,\n    quote,\n    prev,\n    token,\n    escape,\n    escapePos,\n    whitespacePos,\n    parenthesesOpenPos;\n  var pos = 0;\n  var code = value.charCodeAt(pos);\n  var max = value.length;\n  var stack = [{ nodes: tokens }];\n  var balanced = 0;\n  var parent;\n\n  var name = \"\";\n  var before = \"\";\n  var after = \"\";\n\n  while (pos < max) {\n    // Whitespaces\n    if (code <= 32) {\n      next = pos;\n      do {\n        next += 1;\n        code = value.charCodeAt(next);\n      } while (code <= 32);\n      token = value.slice(pos, next);\n\n      prev = tokens[tokens.length - 1];\n      if (code === closeParentheses && balanced) {\n        after = token;\n      } else if (prev && prev.type === \"div\") {\n        prev.after = token;\n        prev.sourceEndIndex += token.length;\n      } else if (\n        code === comma ||\n        code === colon ||\n        (code === slash &&\n          value.charCodeAt(next + 1) !== star &&\n          (!parent ||\n            (parent && parent.type === \"function\" && parent.value !== \"calc\")))\n      ) {\n        before = token;\n      } else {\n        tokens.push({\n          type: \"space\",\n          sourceIndex: pos,\n          sourceEndIndex: next,\n          value: token\n        });\n      }\n\n      pos = next;\n\n      // Quotes\n    } else if (code === singleQuote || code === doubleQuote) {\n      next = pos;\n      quote = code === singleQuote ? \"'\" : '\"';\n      token = {\n        type: \"string\",\n        sourceIndex: pos,\n        quote: quote\n      };\n      do {\n        escape = false;\n        next = value.indexOf(quote, next + 1);\n        if (~next) {\n          escapePos = next;\n          while (value.charCodeAt(escapePos - 1) === backslash) {\n            escapePos -= 1;\n            escape = !escape;\n          }\n        } else {\n          value += quote;\n          next = value.length - 1;\n          token.unclosed = true;\n        }\n      } while (escape);\n      token.value = value.slice(pos + 1, next);\n      token.sourceEndIndex = token.unclosed ? next : next + 1;\n      tokens.push(token);\n      pos = next + 1;\n      code = value.charCodeAt(pos);\n\n      // Comments\n    } else if (code === slash && value.charCodeAt(pos + 1) === star) {\n      next = value.indexOf(\"*/\", pos);\n\n      token = {\n        type: \"comment\",\n        sourceIndex: pos,\n        sourceEndIndex: next + 2\n      };\n\n      if (next === -1) {\n        token.unclosed = true;\n        next = value.length;\n        token.sourceEndIndex = next;\n      }\n\n      token.value = value.slice(pos + 2, next);\n      tokens.push(token);\n\n      pos = next + 2;\n      code = value.charCodeAt(pos);\n\n      // Operation within calc\n    } else if (\n      (code === slash || code === star) &&\n      parent &&\n      parent.type === \"function\" &&\n      parent.value === \"calc\"\n    ) {\n      token = value[pos];\n      tokens.push({\n        type: \"word\",\n        sourceIndex: pos - before.length,\n        sourceEndIndex: pos + token.length,\n        value: token\n      });\n      pos += 1;\n      code = value.charCodeAt(pos);\n\n      // Dividers\n    } else if (code === slash || code === comma || code === colon) {\n      token = value[pos];\n\n      tokens.push({\n        type: \"div\",\n        sourceIndex: pos - before.length,\n        sourceEndIndex: pos + token.length,\n        value: token,\n        before: before,\n        after: \"\"\n      });\n      before = \"\";\n\n      pos += 1;\n      code = value.charCodeAt(pos);\n\n      // Open parentheses\n    } else if (openParentheses === code) {\n      // Whitespaces after open parentheses\n      next = pos;\n      do {\n        next += 1;\n        code = value.charCodeAt(next);\n      } while (code <= 32);\n      parenthesesOpenPos = pos;\n      token = {\n        type: \"function\",\n        sourceIndex: pos - name.length,\n        value: name,\n        before: value.slice(parenthesesOpenPos + 1, next)\n      };\n      pos = next;\n\n      if (name === \"url\" && code !== singleQuote && code !== doubleQuote) {\n        next -= 1;\n        do {\n          escape = false;\n          next = value.indexOf(\")\", next + 1);\n          if (~next) {\n            escapePos = next;\n            while (value.charCodeAt(escapePos - 1) === backslash) {\n              escapePos -= 1;\n              escape = !escape;\n            }\n          } else {\n            value += \")\";\n            next = value.length - 1;\n            token.unclosed = true;\n          }\n        } while (escape);\n        // Whitespaces before closed\n        whitespacePos = next;\n        do {\n          whitespacePos -= 1;\n          code = value.charCodeAt(whitespacePos);\n        } while (code <= 32);\n        if (parenthesesOpenPos < whitespacePos) {\n          if (pos !== whitespacePos + 1) {\n            token.nodes = [\n              {\n                type: \"word\",\n                sourceIndex: pos,\n                sourceEndIndex: whitespacePos + 1,\n                value: value.slice(pos, whitespacePos + 1)\n              }\n            ];\n          } else {\n            token.nodes = [];\n          }\n          if (token.unclosed && whitespacePos + 1 !== next) {\n            token.after = \"\";\n            token.nodes.push({\n              type: \"space\",\n              sourceIndex: whitespacePos + 1,\n              sourceEndIndex: next,\n              value: value.slice(whitespacePos + 1, next)\n            });\n          } else {\n            token.after = value.slice(whitespacePos + 1, next);\n            token.sourceEndIndex = next;\n          }\n        } else {\n          token.after = \"\";\n          token.nodes = [];\n        }\n        pos = next + 1;\n        token.sourceEndIndex = token.unclosed ? next : pos;\n        code = value.charCodeAt(pos);\n        tokens.push(token);\n      } else {\n        balanced += 1;\n        token.after = \"\";\n        token.sourceEndIndex = pos + 1;\n        tokens.push(token);\n        stack.push(token);\n        tokens = token.nodes = [];\n        parent = token;\n      }\n      name = \"\";\n\n      // Close parentheses\n    } else if (closeParentheses === code && balanced) {\n      pos += 1;\n      code = value.charCodeAt(pos);\n\n      parent.after = after;\n      parent.sourceEndIndex += after.length;\n      after = \"\";\n      balanced -= 1;\n      stack[stack.length - 1].sourceEndIndex = pos;\n      stack.pop();\n      parent = stack[balanced];\n      tokens = parent.nodes;\n\n      // Words\n    } else {\n      next = pos;\n      do {\n        if (code === backslash) {\n          next += 1;\n        }\n        next += 1;\n        code = value.charCodeAt(next);\n      } while (\n        next < max &&\n        !(\n          code <= 32 ||\n          code === singleQuote ||\n          code === doubleQuote ||\n          code === comma ||\n          code === colon ||\n          code === slash ||\n          code === openParentheses ||\n          (code === star &&\n            parent &&\n            parent.type === \"function\" &&\n            parent.value === \"calc\") ||\n          (code === slash &&\n            parent.type === \"function\" &&\n            parent.value === \"calc\") ||\n          (code === closeParentheses && balanced)\n        )\n      );\n      token = value.slice(pos, next);\n\n      if (openParentheses === code) {\n        name = token;\n      } else if (\n        (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&\n        plus === token.charCodeAt(1) &&\n        isUnicodeRange.test(token.slice(2))\n      ) {\n        tokens.push({\n          type: \"unicode-range\",\n          sourceIndex: pos,\n          sourceEndIndex: next,\n          value: token\n        });\n      } else {\n        tokens.push({\n          type: \"word\",\n          sourceIndex: pos,\n          sourceEndIndex: next,\n          value: token\n        });\n      }\n\n      pos = next;\n    }\n  }\n\n  for (pos = stack.length - 1; pos; pos -= 1) {\n    stack[pos].unclosed = true;\n    stack[pos].sourceEndIndex = value.length;\n  }\n\n  return stack[0].nodes;\n};\n", "module.exports = function walk(nodes, cb, bubble) {\n  var i, max, node, result;\n\n  for (i = 0, max = nodes.length; i < max; i += 1) {\n    node = nodes[i];\n    if (!bubble) {\n      result = cb(node, i, nodes);\n    }\n\n    if (\n      result !== false &&\n      node.type === \"function\" &&\n      Array.isArray(node.nodes)\n    ) {\n      walk(node.nodes, cb, bubble);\n    }\n\n    if (bubble) {\n      cb(node, i, nodes);\n    }\n  }\n};\n", "function stringifyNode(node, custom) {\n  var type = node.type;\n  var value = node.value;\n  var buf;\n  var customResult;\n\n  if (custom && (customResult = custom(node)) !== undefined) {\n    return customResult;\n  } else if (type === \"word\" || type === \"space\") {\n    return value;\n  } else if (type === \"string\") {\n    buf = node.quote || \"\";\n    return buf + value + (node.unclosed ? \"\" : buf);\n  } else if (type === \"comment\") {\n    return \"/*\" + value + (node.unclosed ? \"\" : \"*/\");\n  } else if (type === \"div\") {\n    return (node.before || \"\") + value + (node.after || \"\");\n  } else if (Array.isArray(node.nodes)) {\n    buf = stringify(node.nodes, custom);\n    if (type !== \"function\") {\n      return buf;\n    }\n    return (\n      value +\n      \"(\" +\n      (node.before || \"\") +\n      buf +\n      (node.after || \"\") +\n      (node.unclosed ? \"\" : \")\")\n    );\n  }\n  return value;\n}\n\nfunction stringify(nodes, custom) {\n  var result, i;\n\n  if (Array.isArray(nodes)) {\n    result = \"\";\n    for (i = nodes.length - 1; ~i; i -= 1) {\n      result = stringifyNode(nodes[i], custom) + result;\n    }\n    return result;\n  }\n  return stringifyNode(nodes, custom);\n}\n\nmodule.exports = stringify;\n", "var minus = \"-\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar dot = \".\".charCodeAt(0);\nvar exp = \"e\".charCodeAt(0);\nvar EXP = \"E\".charCodeAt(0);\n\n// Check if three code points would start a number\n// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number\nfunction likeNumber(value) {\n  var code = value.charCodeAt(0);\n  var nextCode;\n\n  if (code === plus || code === minus) {\n    nextCode = value.charCodeAt(1);\n\n    if (nextCode >= 48 && nextCode <= 57) {\n      return true;\n    }\n\n    var nextNextCode = value.charCodeAt(2);\n\n    if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n      return true;\n    }\n\n    return false;\n  }\n\n  if (code === dot) {\n    nextCode = value.charCodeAt(1);\n\n    if (nextCode >= 48 && nextCode <= 57) {\n      return true;\n    }\n\n    return false;\n  }\n\n  if (code >= 48 && code <= 57) {\n    return true;\n  }\n\n  return false;\n}\n\n// Consume a number\n// https://www.w3.org/TR/css-syntax-3/#consume-number\nmodule.exports = function(value) {\n  var pos = 0;\n  var length = value.length;\n  var code;\n  var nextCode;\n  var nextNextCode;\n\n  if (length === 0 || !likeNumber(value)) {\n    return false;\n  }\n\n  code = value.charCodeAt(pos);\n\n  if (code === plus || code === minus) {\n    pos++;\n  }\n\n  while (pos < length) {\n    code = value.charCodeAt(pos);\n\n    if (code < 48 || code > 57) {\n      break;\n    }\n\n    pos += 1;\n  }\n\n  code = value.charCodeAt(pos);\n  nextCode = value.charCodeAt(pos + 1);\n\n  if (code === dot && nextCode >= 48 && nextCode <= 57) {\n    pos += 2;\n\n    while (pos < length) {\n      code = value.charCodeAt(pos);\n\n      if (code < 48 || code > 57) {\n        break;\n      }\n\n      pos += 1;\n    }\n  }\n\n  code = value.charCodeAt(pos);\n  nextCode = value.charCodeAt(pos + 1);\n  nextNextCode = value.charCodeAt(pos + 2);\n\n  if (\n    (code === exp || code === EXP) &&\n    ((nextCode >= 48 && nextCode <= 57) ||\n      ((nextCode === plus || nextCode === minus) &&\n        nextNextCode >= 48 &&\n        nextNextCode <= 57))\n  ) {\n    pos += nextCode === plus || nextCode === minus ? 3 : 2;\n\n    while (pos < length) {\n      code = value.charCodeAt(pos);\n\n      if (code < 48 || code > 57) {\n        break;\n      }\n\n      pos += 1;\n    }\n  }\n\n  return {\n    number: value.slice(0, pos),\n    unit: value.slice(pos)\n  };\n};\n", "var parse = require(\"./parse\");\nvar walk = require(\"./walk\");\nvar stringify = require(\"./stringify\");\n\nfunction ValueParser(value) {\n  if (this instanceof ValueParser) {\n    this.nodes = parse(value);\n    return this;\n  }\n  return new ValueParser(value);\n}\n\nValueParser.prototype.toString = function() {\n  return Array.isArray(this.nodes) ? stringify(this.nodes) : \"\";\n};\n\nValueParser.prototype.walk = function(cb, bubble) {\n  walk(this.nodes, cb, bubble);\n  return this;\n};\n\nValueParser.unit = require(\"./unit\");\n\nValueParser.walk = walk;\n\nValueParser.stringify = stringify;\n\nmodule.exports = ValueParser;\n", "/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n  // Don't return `map.set` because it's not chainable in IE 11.\n  map.set(pair[0], pair[1]);\n  return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n  // Don't return `set.add` because it's not chainable in IE 11.\n  set.add(value);\n  return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  while (++index < length) {\n    if (iteratee(array[index], index, array) === false) {\n      break;\n    }\n  }\n  return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n *  the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n  var index = -1,\n      length = array ? array.length : 0;\n\n  if (initAccum && length) {\n    accumulator = array[++index];\n  }\n  while (++index < length) {\n    accumulator = iteratee(accumulator, array[index], index, array);\n  }\n  return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n  // Many host objects are `Object` objects that can coerce to strings\n  // despite having improperly defined `toString` methods.\n  var result = false;\n  if (value != null && typeof value.toString != 'function') {\n    try {\n      result = !!(value + '');\n    } catch (e) {}\n  }\n  return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n    nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n    Map = getNative(root, 'Map'),\n    Promise = getNative(root, 'Promise'),\n    Set = getNative(root, 'Set'),\n    WeakMap = getNative(root, 'WeakMap'),\n    nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries ? entries.length : 0;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  getMapData(this, key).set(key, value);\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var cache = this.__data__;\n  if (cache instanceof ListCache) {\n    var pairs = cache.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      return this;\n    }\n    cache = this.__data__ = new MapCache(pairs);\n  }\n  cache.set(key, value);\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  // Safari 9 makes `arguments.length` enumerable in strict mode.\n  var result = (isArray(value) || isArguments(value))\n    ? baseTimes(value.length, String)\n    : [];\n\n  var length = result.length,\n      skipIndexes = !!length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    object[key] = value;\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n  return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n  var result;\n  if (customizer) {\n    result = object ? customizer(value, key, object, stack) : customizer(value);\n  }\n  if (result !== undefined) {\n    return result;\n  }\n  if (!isObject(value)) {\n    return value;\n  }\n  var isArr = isArray(value);\n  if (isArr) {\n    result = initCloneArray(value);\n    if (!isDeep) {\n      return copyArray(value, result);\n    }\n  } else {\n    var tag = getTag(value),\n        isFunc = tag == funcTag || tag == genTag;\n\n    if (isBuffer(value)) {\n      return cloneBuffer(value, isDeep);\n    }\n    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n      if (isHostObject(value)) {\n        return object ? value : {};\n      }\n      result = initCloneObject(isFunc ? {} : value);\n      if (!isDeep) {\n        return copySymbols(value, baseAssign(result, value));\n      }\n    } else {\n      if (!cloneableTags[tag]) {\n        return object ? value : {};\n      }\n      result = initCloneByTag(value, tag, baseClone, isDeep);\n    }\n  }\n  // Check for circular references and return its corresponding clone.\n  stack || (stack = new Stack);\n  var stacked = stack.get(value);\n  if (stacked) {\n    return stacked;\n  }\n  stack.set(value, result);\n\n  if (!isArr) {\n    var props = isFull ? getAllKeys(value) : keys(value);\n  }\n  arrayEach(props || value, function(subValue, key) {\n    if (props) {\n      key = subValue;\n      subValue = value[key];\n    }\n    // Recursively populate clone (susceptible to call stack limits).\n    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n  });\n  return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n  return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var result = new buffer.constructor(buffer.length);\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n  return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n  result.lastIndex = regexp.lastIndex;\n  return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n  var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n  return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    assignValue(object, key, newValue === undefined ? source[key] : newValue);\n  }\n  return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n  return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = objectToString.call(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : undefined;\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n  var length = array.length,\n      result = array.constructor(length);\n\n  // Add properties assigned by `RegExp#exec`.\n  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n    result.index = array.index;\n    result.input = array.input;\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n  var Ctor = object.constructor;\n  switch (tag) {\n    case arrayBufferTag:\n      return cloneArrayBuffer(object);\n\n    case boolTag:\n    case dateTag:\n      return new Ctor(+object);\n\n    case dataViewTag:\n      return cloneDataView(object, isDeep);\n\n    case float32Tag: case float64Tag:\n    case int8Tag: case int16Tag: case int32Tag:\n    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n      return cloneTypedArray(object, isDeep);\n\n    case mapTag:\n      return cloneMap(object, isDeep, cloneFunc);\n\n    case numberTag:\n    case stringTag:\n      return new Ctor(object);\n\n    case regexpTag:\n      return cloneRegExp(object);\n\n    case setTag:\n      return cloneSet(object, isDeep, cloneFunc);\n\n    case symbolTag:\n      return cloneSymbol(object);\n  }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  length = length == null ? MAX_SAFE_INTEGER : length;\n  return !!length &&\n    (typeof value == 'number' || reIsUint.test(value)) &&\n    (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n *   if (_.isElement(value)) {\n *     return value.cloneNode(true);\n *   }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n  return baseClone(value, true, true, customizer);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 8-9 which returns 'object' for typed array and other constructors.\n  var tag = isObject(value) ? objectToString.call(value) : '';\n  return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = cloneDeepWith;\n", "/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nfunction ignoreFunction() {}\n\nfunction createReturningFunction(value) {\n\treturn function() {\n\t\treturn value;\n\t};\n}\n\nfunction Parser(states) {\n\tthis.states = this.compileStates(states);\n}\n\nParser.prototype.compileStates = function(states) {\n\tvar result = {};\n\tObject.keys(states).forEach(function(name) {\n\t\tresult[name] = this.compileState(states[name], states);\n\t}, this);\n\treturn result;\n};\n\nParser.prototype.compileState = function(state, states) {\n\tvar regExps = [];\n\tfunction iterator(str, value) {\n\t\tregExps.push({\n\t\t\tgroups: Parser.getGroupCount(str),\n\t\t\tregExp: str,\n\t\t\tvalue: value\n\t\t});\n\t}\n\tfunction processState(statePart) {\n\t\tif(Array.isArray(statePart)) {\n\t\t\tstatePart.forEach(processState);\n\t\t} else if(typeof statePart === \"object\") {\n\t\t\tObject.keys(statePart).forEach(function(key) {\n\t\t\t\titerator(key, statePart[key]);\n\t\t\t});\n\t\t} else if(typeof statePart === \"string\") {\n\t\t\tprocessState(states[statePart]);\n\t\t} else {\n\t\t\tthrow new Error(\"Unexpected 'state' format\");\n\t\t}\n\t}\n\tprocessState(state);\n\tvar total = regExps.map(function(r) {\n\t\treturn \"(\" + r.regExp + \")\";\n\t}).join(\"|\");\n\tvar actions = [];\n\tvar pos = 1;\n\tregExps.forEach(function(r) {\n\t\tvar fn;\n\t\tif(typeof r.value === \"function\") {\n\t\t\tfn = r.value;\n\t\t} else if(typeof r.value === \"string\") {\n\t\t\tfn = createReturningFunction(r.value);\n\t\t} else {\n\t\t\tfn = ignoreFunction;\n\t\t}\n\t\tactions.push({\n\t\t\tname: r.regExp,\n\t\t\tfn: fn,\n\t\t\tpos: pos,\n\t\t\tpos2: pos + r.groups + 1\n\t\t});\n\t\tpos += r.groups + 1;\n\t});\n\treturn {\n\t\tregExp: new RegExp(total, \"g\"),\n\t\tactions: actions\n\t};\n};\n\nParser.getGroupCount = function(regExpStr) {\n\treturn new RegExp(\"(\" + regExpStr + \")|^$\").exec(\"\").length - 2;\n};\n\nParser.prototype.parse = function(initialState, string, context) {\n\tcontext = context || {};\n\tvar currentState = initialState;\n\tvar currentIndex = 0;\n\tfor(;;) {\n\t\tvar state = this.states[currentState];\n\t\tvar regExp = state.regExp;\n\t\tregExp.lastIndex = currentIndex;\n\t\tvar match = regExp.exec(string);\n\t\tif(!match) return context;\n\t\tvar actions = state.actions;\n\t\tcurrentIndex = state.regExp.lastIndex;\n\t\tfor(var i = 0; i < actions.length; i++) {\n\t\t\tvar action = actions[i];\n\t\t\tif(match[action.pos]) {\n\t\t\t\tvar ret = action.fn.apply(context, Array.prototype.slice.call(match, action.pos, action.pos2).concat([state.regExp.lastIndex - match[0].length, match[0].length]));\n\t\t\t\tif(ret) {\n\t\t\t\t\tif(!(ret in this.states))\n\t\t\t\t\t\tthrow new Error(\"State '\" + ret + \"' doesn't exist\");\n\t\t\t\t\tcurrentState = ret;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n};\n\nmodule.exports = Parser;\n", "/* AUTO GENERATED */\nmodule.exports = {\n    \"typeMatchClass\": \"\\\\.((?:\\\\\\\\(?:[\\\\0-\\\\t\\\\x0B\\\\f\\\\x0E-\\\\u2027\\\\u202A-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF])|(?:[\\\\x2DA-Z_a-z\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF]))(?:\\\\\\\\(?:[\\\\0-\\\\t\\\\x0B\\\\f\\\\x0E-\\\\u2027\\\\u202A-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF])|(?:[\\\\x2D0-9A-Z_a-z\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF]))*)\",\n    \"typeMatchId\": \"#((?:\\\\\\\\(?:[\\\\0-\\\\t\\\\x0B\\\\f\\\\x0E-\\\\u2027\\\\u202A-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF])|(?:[\\\\x2DA-Z_a-z\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF]))(?:\\\\\\\\(?:[\\\\0-\\\\t\\\\x0B\\\\f\\\\x0E-\\\\u2027\\\\u202A-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF])|(?:[\\\\x2D0-9A-Z_a-z\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFF]|[\\\\uD800-\\\\uDBFF][\\\\uDC00-\\\\uDFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?:[^\\\\uD800-\\\\uDBFF]|^)[\\\\uDC00-\\\\uDFFF]))*)\",\n    \"identifierEscapeRegexp\": \"(^[\\\\0-,\\\\.-@\\\\[-\\\\^`\\\\{-\\\\x9F]|^\\\\x2D\\\\x2D|[\\\\0-,\\\\.\\\\/:-@\\\\[-\\\\^`\\\\{-\\\\x9F])\"\n}\n", "\"use strict\";\n\nvar Parser = require(\"fastparse\");\nvar uniRegexp = require(\"./uni-regexp\");\n\nfunction unescape(str) {\n\treturn str.replace(/\\\\(.)/g, \"$1\");\n}\n\nfunction commentMatch(match, content) {\n\tthis.selector.nodes.push({\n\t\ttype: \"comment\",\n\t\tcontent: content\n\t});\n}\n\nfunction typeMatch(type) {\n\treturn function(match, name) {\n\t\tthis.selector.nodes.push({\n\t\t\ttype: type,\n\t\t\tname: unescape(name)\n\t\t});\n\t};\n}\n\nfunction pseudoClassStartMatch(match, name) {\n\tvar newToken = {\n\t\ttype: \"pseudo-class\",\n\t\tname: unescape(name),\n\t\tcontent: \"\"\n\t};\n\tthis.selector.nodes.push(newToken);\n\tthis.token = newToken;\n\tthis.brackets = 1;\n\treturn \"inBrackets\";\n}\n\nfunction nestedPseudoClassStartMatch(match, name, after) {\n\tvar newSelector = {\n\t\ttype: \"selector\",\n\t\tnodes: []\n\t};\n\tvar newToken = {\n\t\ttype: \"nested-pseudo-class\",\n\t\tname: unescape(name),\n\t\tnodes: [newSelector]\n\t};\n\tif(after) {\n\t\tnewSelector.before = after;\n\t}\n\tthis.selector.nodes.push(newToken);\n\tthis.stack.push(this.root);\n\tthis.root = newToken;\n\tthis.selector = newSelector;\n}\n\nfunction nestedEnd(match, before) {\n\tif(this.stack.length > 0) {\n\t\tif(before) {\n\t\t\tthis.selector.after = before;\n\t\t}\n\t\tthis.root = this.stack.pop();\n\t\tthis.selector = this.root.nodes[this.root.nodes.length - 1];\n\t} else {\n\t\tthis.selector.nodes.push({\n\t\t\ttype: \"invalid\",\n\t\t\tvalue: match\n\t\t});\n\t}\n}\n\nfunction operatorMatch(match, before, operator, after) {\n\tvar token = {\n\t\ttype: \"operator\",\n\t\toperator: operator\n\t};\n\tif(before) {\n\t\ttoken.before = before;\n\t}\n\tif(after) {\n\t\ttoken.after = after;\n\t}\n\tthis.selector.nodes.push(token);\n}\n\nfunction spacingMatch(match) {\n\tthis.selector.nodes.push({\n\t\ttype: \"spacing\",\n\t\tvalue: match\n\t});\n}\n\nfunction elementMatch(match, namespace, name) {\n\tvar newToken = {\n\t\ttype: \"element\",\n\t\tname: unescape(name)\n\t};\n\n\tif(namespace) {\n\t\tnewToken.namespace = unescape(namespace.substr(0, namespace.length - 1));\n\t}\n\tthis.selector.nodes.push(newToken);\n}\n\nfunction universalMatch(match, namespace) {\n\tvar newToken = {\n\t\ttype: \"universal\"\n\t};\n\tif(namespace) {\n\t\tnewToken.namespace = unescape(namespace.substr(0, namespace.length - 1));\n\t}\n\tthis.selector.nodes.push(newToken);\n}\n\nfunction attributeMatch(match, content) {\n\tthis.selector.nodes.push({\n\t\ttype: \"attribute\",\n\t\tcontent: content\n\t});\n}\n\nfunction invalidMatch(match) {\n\tthis.selector.nodes.push({\n\t\ttype: \"invalid\",\n\t\tvalue: match\n\t});\n}\n\nfunction irrelevantSpacingStartMatch(match) {\n\tthis.selector.before = match;\n}\n\nfunction irrelevantSpacingEndMatch(match) {\n\tthis.selector.after = match;\n}\n\nfunction nextSelectorMatch(match, before, after) {\n\tvar newSelector = {\n\t\ttype: \"selector\",\n\t\tnodes: []\n\t};\n\tif(before) {\n\t\tthis.selector.after = before;\n\t}\n\tif(after) {\n\t\tnewSelector.before = after;\n\t}\n\tthis.root.nodes.push(newSelector);\n\tthis.selector = newSelector;\n}\n\nfunction addToCurrent(match) {\n\tthis.token.content += match;\n}\n\nfunction bracketStart(match) {\n\tthis.token.content += match;\n\tthis.brackets++;\n}\n\nfunction bracketEnd(match) {\n\tif(--this.brackets === 0) {\n\t\treturn \"selector\";\n\t}\n\tthis.token.content += match;\n}\n\nfunction getSelectors() {\n\t// The assignment here is split to preserve the property enumeration order.\n\tvar selectors = {\n\t\t\"/\\\\*([\\\\s\\\\S]*?)\\\\*/\": commentMatch\n\t};\n\t// https://www.w3.org/TR/CSS21/syndata.html#characters\n\t// 4.1.3: identifiers (...) can contain only the characters [a-zA-Z0-9] and\n\t// ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_)\n\t//\n\t// 10ffff is the maximum allowed in current Unicode\n\tselectors[uniRegexp.typeMatchClass] = typeMatch(\"class\");\n\tselectors[uniRegexp.typeMatchId] = typeMatch(\"id\");\n\tvar selectorsSecondHalf = {\n\t\t\":(not|any|-\\\\w+?-any|matches|is|where|has|local|global)\\\\((\\\\s*)\": nestedPseudoClassStartMatch,\n\t\t\":((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])+)\\\\(\": pseudoClassStartMatch,\n\t\t\":((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])+)\": typeMatch(\"pseudo-class\"),\n\t\t\"::((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])+)\": typeMatch(\"pseudo-element\"),\n\t\t\"(\\\\*\\\\|)((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])+)\": elementMatch,\n\t\t\"(\\\\*\\\\|)\\\\*\": universalMatch,\n\t\t\"((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])*\\\\|)?\\\\*\": universalMatch,\n\t\t\"((?:\\\\\\\\.|[A-Za-z_\\\\-0-9])*\\\\|)?((?:\\\\\\\\.|[A-Za-z_\\\\-])(?:\\\\\\\\.|[A-Za-z_\\\\-0-9])*)\": elementMatch,\n\t\t\"\\\\[([^\\\\]]+)\\\\]\": attributeMatch,\n\t\t\"(\\\\s*)\\\\)\": nestedEnd,\n\t\t\"(\\\\s*)((?:\\\\|\\\\|)|(?:>>)|[>+~])(\\\\s*)\": operatorMatch,\n\t\t\"(\\\\s*),(\\\\s*)\": nextSelectorMatch,\n\t\t\"\\\\s+$\": irrelevantSpacingEndMatch,\n\t\t\"^\\\\s+\": irrelevantSpacingStartMatch,\n\t\t\"\\\\s+\": spacingMatch,\n\t\t\".\": invalidMatch\n\t};\n\tvar selector;\n\tfor (selector in selectorsSecondHalf) {\n\t\tif (Object.prototype.hasOwnProperty.call(selectorsSecondHalf, selector)) {\n\t\t\tselectors[selector] = selectorsSecondHalf[selector];\n\t\t}\n\t}\n\treturn selectors;\n}\n\nvar parser = new Parser({\n\tselector: getSelectors(),\n\tinBrackets: {\n\t\t\"/\\\\*[\\\\s\\\\S]*?\\\\*/\": addToCurrent,\n\t\t\"\\\"([^\\\\\\\\\\\"]|\\\\\\\\.)*\\\"\": addToCurrent,\n\t\t\"'([^\\\\\\\\']|\\\\\\\\.)*'\": addToCurrent,\n\t\t\"[^()'\\\"/]+\": addToCurrent,\n\t\t\"\\\\(\": bracketStart,\n\t\t\"\\\\)\": bracketEnd,\n\t\t\".\": addToCurrent\n\t}\n});\n\nfunction parse(str) {\n\tvar selectorNode = {\n\t\ttype: \"selector\",\n\t\tnodes: []\n\t};\n\tvar rootNode = {\n\t\ttype: \"selectors\",\n\t\tnodes: [\n\t\t\tselectorNode\n\t\t]\n\t};\n\tparser.parse(\"selector\", str, {\n\t\tstack: [],\n\t\troot: rootNode,\n\t\tselector: selectorNode\n\t});\n\treturn rootNode;\n}\n\nmodule.exports = parse;\n", "\"use strict\";\n\nvar uniRegexp = require(\"./uni-regexp\");\nvar identifierEscapeRegexp = new RegExp(uniRegexp.identifierEscapeRegexp, \"g\");\n\nfunction escape(str, identifier) {\n\tif(str === \"*\") {\n\t\treturn \"*\";\n\t}\n\tif (identifier) {\n\t\treturn str.replace(identifierEscapeRegexp, \"\\\\$1\");\n\t} else {\n\t\treturn str.replace(/(^[^A-Za-z_\\\\-]|^--|[^A-Za-z_0-9\\\\-])/g, \"\\\\$1\");\n\t}\n}\n\nfunction stringifyWithoutBeforeAfter(tree) {\n\tswitch(tree.type) {\n\tcase \"selectors\":\n\t\treturn tree.nodes.map(stringify).join(\",\");\n\tcase \"selector\":\n\t\treturn tree.nodes.map(stringify).join(\"\");\n\tcase \"element\":\n\t\treturn (typeof tree.namespace === \"string\" ? escape(tree.namespace) + \"|\" : \"\") + escape(tree.name);\n\tcase \"class\":\n\t\treturn \".\" + escape(tree.name, true);\n\tcase \"id\":\n\t\treturn \"#\" + escape(tree.name, true);\n\tcase \"attribute\":\n\t\treturn \"[\" + tree.content + \"]\";\n\tcase \"spacing\":\n\t\treturn tree.value;\n\tcase \"pseudo-class\":\n\t\treturn \":\" + escape(tree.name) + (typeof tree.content === \"string\" ? \"(\" + tree.content + \")\" : \"\");\n\tcase \"nested-pseudo-class\":\n\t\treturn \":\" + escape(tree.name) + \"(\" + tree.nodes.map(stringify).join(\",\") + \")\";\n\tcase \"pseudo-element\":\n\t\treturn \"::\" + escape(tree.name);\n\tcase \"universal\":\n\t\treturn (typeof tree.namespace === \"string\" ? escape(tree.namespace) + \"|\" : \"\") + \"*\";\n\tcase \"operator\":\n\t\treturn tree.operator;\n\tcase \"comment\":\n\t\treturn \"/*\" + tree.content + \"*/\";\n\tcase \"invalid\":\n\t\treturn tree.value;\n\t}\n}\n\n\nfunction stringify(tree) {\n\tvar str = stringifyWithoutBeforeAfter(tree);\n\tif(tree.before) {\n\t\tstr = tree.before + str;\n\t}\n\tif(tree.after) {\n\t\tstr = str + tree.after;\n\t}\n\treturn str;\n}\n\nmodule.exports = stringify;\n", "\"use strict\";\n\nvar Parser = require(\"fastparse\");\n\nfunction commentMatch(match, content) {\n\tthis.value.nodes.push({\n\t\ttype: \"comment\",\n\t\tcontent: content\n\t});\n}\n\nfunction spacingMatch(match) {\n\tvar item = this.value.nodes[this.value.nodes.length - 1];\n\titem.after = (item.after || \"\") + match;\n}\n\nfunction initialSpacingMatch(match) {\n\tthis.value.before = match;\n}\n\nfunction endSpacingMatch(match) {\n\tthis.value.after = match;\n}\n\nfunction unescapeString(content) {\n\treturn content.replace(/\\\\(?:([a-fA-F0-9]{1,6})|(.))/g, function(all, unicode, otherCharacter) {\n\t\tif (otherCharacter) {\n\t\t\treturn otherCharacter;\n\t\t}\n\n\t\tvar C = parseInt(unicode, 16);\n\t\tif(C < 0x10000) {\n\t\t\treturn String.fromCharCode(C);\n\t\t} else {\n\t\t\treturn String.fromCharCode(Math.floor((C - 0x10000) / 0x400) + 0xD800) +\n\t\t\t\tString.fromCharCode((C - 0x10000) % 0x400 + 0xDC00);\n\t\t}\n\t});\n}\n\nfunction stringMatch(match, content) {\n\tvar value = unescapeString(content);\n\tthis.value.nodes.push({\n\t\ttype: \"string\",\n\t\tvalue: value,\n\t\tstringType: match[0]\n\t});\n}\n\nfunction commaMatch(match, spacing) {\n\tvar newValue = {\n\t\ttype: \"value\",\n\t\tnodes: []\n\t};\n\tif(spacing) {\n\t\tnewValue.before = spacing;\n\t}\n\tthis.root.nodes.push(newValue);\n\tthis.value = newValue;\n}\n\nfunction itemMatch(match) {\n\tthis.value.nodes.push({\n\t\ttype: \"item\",\n\t\tname: match\n\t});\n}\n\nfunction nestedItemMatch(match, name, spacing) {\n\tthis.stack.push(this.root);\n\tthis.root = {\n\t\ttype: \"nested-item\",\n\t\tname: name,\n\t\tnodes: [\n\t\t\t{ type: \"value\", nodes: [] }\n\t\t]\n\t};\n\tif(spacing) {\n\t\tthis.root.nodes[0].before = spacing;\n\t}\n\tthis.value.nodes.push(this.root);\n\tthis.value = this.root.nodes[0];\n}\n\nfunction nestedItemEndMatch(match, spacing, remaining) {\n\tif(this.stack.length === 0) {\n\t\tif(spacing) {\n\t\t\tvar item = this.value.nodes[this.value.nodes.length - 1];\n\t\t\titem.after = (item.after || \"\") + spacing;\n\t\t}\n\t\tthis.value.nodes.push({\n\t\t\ttype: \"invalid\",\n\t\t\tvalue: remaining\n\t\t});\n\t} else {\n\t\tif(spacing) {\n\t\t\tthis.value.after = spacing;\n\t\t}\n\t\tthis.root = this.stack.pop();\n\t\tthis.value = this.root.nodes[this.root.nodes.length - 1];\n\t}\n}\n\nfunction urlMatch(match, innerSpacingBefore, content, innerSpacingAfter) {\n\tvar item = {\n\t\ttype: \"url\"\n\t};\n\tif(innerSpacingBefore) {\n\t\titem.innerSpacingBefore = innerSpacingBefore;\n\t}\n\tif(innerSpacingAfter) {\n\t\titem.innerSpacingAfter = innerSpacingAfter;\n\t}\n\tswitch(content[0]) {\n\t\tcase \"\\\"\":\n\t\t\titem.stringType = \"\\\"\";\n\t\t\titem.url = unescapeString(content.substr(1, content.length - 2));\n\t\t\tbreak;\n\t\tcase \"'\":\n\t\t\titem.stringType = \"'\";\n\t\t\titem.url = unescapeString(content.substr(1, content.length - 2));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\titem.url = unescapeString(content);\n\t\t\tbreak;\n\t}\n\tthis.value.nodes.push(item);\n}\n\nvar parser = new Parser({\n\tdecl: {\n\t\t\"^\\\\s+\": initialSpacingMatch,\n\t\t\"/\\\\*([\\\\s\\\\S]*?)\\\\*/\": commentMatch,\n\t\t\"\\\"((?:[^\\\\\\\\\\\"]|\\\\\\\\.)*)\\\"\": stringMatch,\n\t\t\"'((?:[^\\\\\\\\']|\\\\\\\\.)*)'\": stringMatch,\n\t\t\"url\\\\((\\\\s*)(\\\"(?:[^\\\\\\\\\\\"]|\\\\\\\\.)*\\\")(\\\\s*)\\\\)\": urlMatch,\n\t\t\"url\\\\((\\\\s*)('(?:[^\\\\\\\\']|\\\\\\\\.)*')(\\\\s*)\\\\)\": urlMatch,\n\t\t\"url\\\\((\\\\s*)((?:[^\\\\\\\\)'\\\"]|\\\\\\\\.)*)(\\\\s*)\\\\)\": urlMatch,\n\t\t\"([\\\\w-]+)\\\\((\\\\s*)\": nestedItemMatch,\n\t\t\"(\\\\s*)(\\\\))\": nestedItemEndMatch,\n\t\t\",(\\\\s*)\": commaMatch,\n\t\t\"\\\\s+$\": endSpacingMatch,\n\t\t\"\\\\s+\": spacingMatch,\n\t\t\"[^\\\\s,)]+\": itemMatch\n\t}\n});\n\nfunction parseValues(str) {\n\tvar valueNode = {\n\t\ttype: \"value\",\n\t\tnodes: []\n\t};\n\tvar rootNode = {\n\t\ttype: \"values\",\n\t\tnodes: [\n\t\t\tvalueNode\n\t\t]\n\t};\n\tparser.parse(\"decl\", str, {\n\t\tstack: [],\n\t\troot: rootNode,\n\t\tvalue: valueNode\n\t});\n\treturn rootNode;\n}\n\nmodule.exports = parseValues;\n", "\"use strict\";\n\nvar cssesc = require(\"cssesc\");\n\nvar stringify;\n\nfunction escape(str, stringType) {\n\treturn cssesc(str, {\n\t\tquotes: stringType === \"\\\"\" ? \"double\" : \"single\"\n\t});\n}\n\nfunction stringifyWithoutBeforeAfter(tree) {\n\tswitch(tree.type) {\n\tcase \"values\":\n\t\treturn tree.nodes.map(stringify).join(\",\");\n\tcase \"value\":\n\t\treturn tree.nodes.map(stringify).join(\"\");\n\tcase \"item\":\n\t\treturn tree.name;\n\tcase \"nested-item\":\n\t\treturn tree.name + \"(\" + tree.nodes.map(stringify).join(\",\") + \")\";\n\tcase \"invalid\":\n\t\treturn tree.value;\n\tcase \"comment\":\n\t\treturn \"/*\" + tree.content + \"*/\";\n\tcase \"string\":\n\t\tswitch(tree.stringType) {\n\t\tcase \"'\":\n\t\t\treturn \"'\" + escape(tree.value, \"'\") + \"'\";\n\t\tcase \"\\\"\":\n\t\t\treturn \"\\\"\" + escape(tree.value, \"\\\"\") + \"\\\"\";\n\t\t}\n\t\t/* istanbul ignore next */\n\t\tthrow new Error(\"Invalid stringType\");\n\tcase \"url\":\n\t\tvar start = \"url(\" + (tree.innerSpacingBefore || \"\");\n\t\tvar end = (tree.innerSpacingAfter || \"\") + \")\";\n\t\tswitch(tree.stringType) {\n\t\tcase \"'\":\n\t\t\treturn start + \"'\" + tree.url.replace(/(\\\\)/g, \"\\\\$1\").replace(/'/g, \"\\\\'\") + \"'\" + end;\n\t\tcase \"\\\"\":\n\t\t\treturn start + \"\\\"\" + tree.url.replace(/(\\\\)/g, \"\\\\$1\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\" + end;\n\t\tdefault:\n\t\t\treturn start + tree.url.replace(/(\"|'|\\)|\\\\)/g, \"\\\\$1\") + end;\n\t\t}\n\t}\n}\n\n\nstringify = function stringify(tree) {\n\tvar str = stringifyWithoutBeforeAfter(tree);\n\tif(tree.before) {\n\t\tstr = tree.before + str;\n\t}\n\tif(tree.after) {\n\t\tstr = str + tree.after;\n\t}\n\treturn str;\n};\n\nmodule.exports = stringify;\n", "exports.parse = require(\"./parse\");\nexports.stringify = require(\"./stringify\");\nexports.parseValues = require(\"./parseValues\");\nexports.stringifyValues = require(\"./stringifyValues\");\n", "import type {\n    lengthValidUnits,\n    angleValidUnits,\n    frequencyValidUnits,\n    resolutionValidUnits,\n    timeValidUnits,\n} from './units';\n\nexport interface CSSValueAST<TYPE extends string> {\n    type: TYPE;\n    start: number;\n    end: number;\n    value: string;\n}\n\nexport type BaseAstNode =\n    | Literal\n    | CssWideKeyword\n    | Space\n    | Comment\n    | Invalid\n    | CustomIdent\n    | DashedIdent\n    | Call\n    | String\n    | Number\n    | Integer\n    | Length\n    | Angle\n    | Time\n    | Percentage\n    | Frequency\n    | Resolution\n    | Flex\n    | UnknownUnit\n    | Color;\n\n/* types */\n\n// custom\nexport type BuildVarAst = CSSValueAST<`build-var`> & {\n    subType: string;\n    id: string;\n};\nexport type Literal = CSSValueAST<`literal`> & {\n    before: string;\n    after: string;\n};\nexport type CssWideKeyword = CSSValueAST<`css-wide-keyword`> & {\n    value: AnyCase<`inherit` | `unset` | `initial`>;\n};\nexport type Space = CSSValueAST<`space`> & {\n    before: string;\n    after: string;\n};\nexport type Comment = CSSValueAST<`comment`> & {\n    before: string;\n    after: string;\n};\nexport type Call<TYPE extends string = 'call'> = CSSValueAST<TYPE> & {\n    args: CSSValueAST<any>[];\n    before: string;\n    after: string;\n};\ntype Unit<TYPE extends string, UNIT extends string> = CSSValueAST<TYPE> & {\n    unit: UNIT;\n    integer: boolean;\n};\nexport type Invalid = CSSValueAST<`invalid`>;\nexport type UnknownUnit = Unit<`unknown-unit`, string>;\n\n// textual\nexport type CustomIdent = CSSValueAST<`<custom-ident>`>;\nexport type DashedIdent = CSSValueAST<`<dashed-ident>`>;\nexport type String = CSSValueAST<`<string>`>;\nexport type Url = CSSValueAST<`<url>`>;\n// numeric\nexport type Integer = CSSValueAST<`<integer>`>;\nexport type Number = CSSValueAST<`<number>`>;\nexport type Percentage = Unit<`<percentage>`, `%`>;\nexport type Ratio = CSSValueAST<`<ratio>`>;\n// distance\nexport type Length = Unit<`<length>`, AnyCase<(typeof lengthValidUnits)[number]>>;\n// other quantities\nexport type Flex = Unit<`<flex>`, AnyCase<`fr`>>;\nexport type Angle = Unit<`<angle>`, AnyCase<(typeof angleValidUnits)[number]>>;\nexport type Time = Unit<`<time>`, AnyCase<(typeof timeValidUnits)[number]>>;\nexport type Frequency = Unit<`<frequency>`, AnyCase<(typeof frequencyValidUnits)[number]>>;\nexport type Resolution = Unit<`<resolution>`, AnyCase<(typeof resolutionValidUnits)[number]>>;\n// other\nexport type Color = CSSValueAST<`<color>`>;\nexport type Image = CSSValueAST<`<image>`>;\nexport type Position = CSSValueAST<`<position>`>;\n// attribute\nexport type Attribute = CSSValueAST<`<attr()>`>;\n// mathematical\n/* \n<calc()>\n<min()>\n<max()>\n<clamp()>\n<round()>\n<mod()>\n<rem()>\n<sin()>\n<cos()>\n<tan()>\n<asin()>\n<acos()>\n<atan()>\n<atan2()>\n<pow()>\n<sqrt()>\n<hypot()>\n<log()>\n<exp()>\n<abs()>\n<sign()>\n\n<calc-sum>, <calc-product>, <calc-value>, <calc-constant>\n*/\n/////////////////////\ntype AnyCase<T extends string> = string extends T\n    ? string\n    : T extends `${infer F1}${infer F2}${infer R}`\n    ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}`\n    : T extends `${infer F}${infer R}`\n    ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}`\n    : '';\n/////////////////////\n\nexport const invalid = (value: Partial<Invalid>): Invalid => ({\n    start: 0,\n    end: 0,\n    value: ``,\n    ...value,\n    type: `invalid`,\n});\nexport const literal = (value: Partial<Literal>): Literal => ({\n    start: 0,\n    end: 0,\n    before: ``,\n    after: ``,\n    value: ``,\n    ...value,\n    type: `literal`,\n});\nexport const cssWideKeyword = (value: Partial<CssWideKeyword>): CssWideKeyword => ({\n    start: 0,\n    end: 0,\n    value: `initial`,\n    ...value,\n    type: `css-wide-keyword`,\n});\nexport const space = (value: Partial<Space>): Space => ({\n    start: 0,\n    end: 0,\n    before: ``,\n    after: ``,\n    value: ` `,\n    ...value,\n    type: `space`,\n});\nexport const comment = (value: Partial<Comment>): Comment => ({\n    start: 0,\n    end: 0,\n    before: ``,\n    after: ``,\n    value: ``,\n    ...value,\n    type: `comment`,\n});\nexport const customIdent = (value: Partial<CustomIdent>): CustomIdent => ({\n    start: 0,\n    end: 0,\n    value: ``,\n    ...value,\n    type: `<custom-ident>`,\n});\nexport const dashedIdent = (value: Partial<DashedIdent>): DashedIdent => ({\n    start: 0,\n    end: 0,\n    value: `-`,\n    ...value,\n    type: `<dashed-ident>`,\n});\nexport const string = (value: Partial<String>): String => ({\n    start: 0,\n    end: 0,\n    value: `\"\"`,\n    ...value,\n    type: `<string>`,\n});\nexport const integer = (value: Partial<Integer>): Integer => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    ...value,\n    type: `<integer>`,\n});\nexport const number = (value: Partial<Number>): Number => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    ...value,\n    type: `<number>`,\n});\nexport const unknownUnit = (value: Partial<UnknownUnit>): UnknownUnit => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    unit: ``,\n    integer: false,\n    ...value,\n    type: `unknown-unit`,\n});\nexport const length = (value: Partial<Length> & Pick<Length, 'unit'>): Length => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    integer: false,\n    ...value,\n    type: `<length>`,\n});\nexport const angle = (value: Partial<Angle> & Pick<Angle, 'unit'>): Angle => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    integer: false,\n    ...value,\n    type: `<angle>`,\n});\nexport const percentage = (value: Partial<Percentage>): Percentage => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    unit: `%`,\n    integer: false,\n    ...value,\n    type: `<percentage>`,\n});\nexport const flex = (value: Partial<Flex>): Flex => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    unit: `fr`,\n    integer: false,\n    ...value,\n    type: `<flex>`,\n});\nexport const time = (value: Partial<Time> & Pick<Time, 'unit'>): Time => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    integer: false,\n    ...value,\n    type: `<time>`,\n});\nexport const frequency = (value: Partial<Frequency> & Pick<Frequency, 'unit'>): Frequency => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    integer: false,\n    ...value,\n    type: `<frequency>`,\n});\nexport const resolution = (value: Partial<Resolution> & Pick<Resolution, 'unit'>): Resolution => ({\n    start: 0,\n    end: 0,\n    value: `0`,\n    integer: false,\n    ...value,\n    type: `<resolution>`,\n});\nexport const call = (value: Partial<Call>): Call => ({\n    start: 0,\n    end: 0,\n    value: ``,\n    args: value.args || [],\n    before: ``,\n    after: ``,\n    ...value,\n    type: `call`,\n});\nexport const color = (value: Partial<Color>): Color => ({\n    start: 0,\n    end: 0,\n    value: `#000000`,\n    ...value,\n    type: `<color>`,\n});\n", "export const lengthValidUnits = [\n    `px`,\n    `em`,\n    `ex`,\n    `cap`,\n    `ch`,\n    `ic`,\n    `rem`,\n    `lh`,\n    `rlh`,\n    `vw`,\n    `vh`,\n    `vi`,\n    `vb`,\n    `vmin`,\n    `vmax`,\n    `cm`,\n    `mm`,\n    `q`,\n    `in`,\n    `pt`,\n    `pc`,\n] as const;\nexport const angleValidUnits = [`deg`, `grad`, `rad`, `turn`] as const;\nexport const timeValidUnits = [`s`, `ms`] as const;\nexport const frequencyValidUnits = [`hz`, `khz`] as const;\nexport const resolutionValidUnits = [`dpi`, `dpcm`, `dppx`] as const;\n", "import {\n    tokenize,\n    isStringDelimiter,\n    isWhitespace,\n    createToken,\n    getJSCommentStartType,\n    getMultilineCommentStartType,\n    isCommentEnd,\n    getUnclosedComment,\n} from '@tokey/core';\nimport type { Token, Descriptors } from '@tokey/core';\n\ntype Delimiters = '(' | ')' | ',' | '/' | '+' | '-' | '*' | '#' | '.' | '%';\n\nexport type CSSValueToken = Token<Descriptors | Delimiters>;\n\nexport function tokenizeValue(source: string, options: { offset?: number } = {}) {\n    const parseLineComments = false; // why would that be a choice?\n    return tokenize<CSSValueToken>(source, {\n        isDelimiter,\n        isStringDelimiter(char: string, previousChar: string) {\n            return previousChar !== `\\\\` && isStringDelimiter(char);\n        },\n        isWhitespace,\n        shouldAddToken: () => true,\n        createToken,\n        getCommentStartType: parseLineComments\n            ? getJSCommentStartType\n            : getMultilineCommentStartType,\n        isCommentEnd,\n        getUnclosedComment,\n        shouldClose(ch, previousChar) {\n            if (isWhitespace(ch) && isWhitespace(previousChar)) {\n                return false;\n            }\n            if (previousChar === '\\\\') {\n                return false;\n            }\n            const isAllowedChars = /[-_a-zA-Z0-9]/.test(ch);\n            if (isAllowedChars) {\n                return false;\n            }\n            // match css identifier char don't allow non-ascii chars\n            return ch.charCodeAt(0) <= 127;\n        },\n        offset: options.offset,\n    });\n}\n\nconst isDelimiter = (char: string, previousChar: string) =>\n    previousChar !== '\\\\' &&\n    (char === '(' ||\n        char === ')' ||\n        char === '[' ||\n        char === ']' ||\n        char === '<' ||\n        char === '>' ||\n        char === '{' ||\n        char === '}' ||\n        char === '@' ||\n        char === '|' ||\n        char === ':' ||\n        char === ';' ||\n        char === '~' ||\n        char === '&' ||\n        char === ',' ||\n        char === '/' ||\n        char === '+' ||\n        char === '-' ||\n        char === '*' ||\n        char === '#' ||\n        char === '%' ||\n        char === '.');\n", "import type {\n    BaseAstNode,\n    Literal,\n    CssWideKeyword,\n    Space,\n    Comment,\n    String,\n    Number,\n    Call,\n    CustomIdent,\n    DashedIdent,\n    Integer,\n    Angle,\n    Color,\n    Flex,\n    Frequency,\n    Invalid,\n    Length,\n    Percentage,\n    Resolution,\n    Time,\n    UnknownUnit,\n} from './ast-types';\n\nexport function stringifyCSSValue(ast: BaseAstNode | BaseAstNode[]) {\n    if (!Array.isArray(ast)) {\n        return stringifyNode(ast);\n    }\n    let result = ``;\n    for (const node of ast) {\n        result += stringifyNode(node);\n    }\n    return result;\n}\nfunction stringifyNode(node: BaseAstNode) {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n    return stringifyByType[node.type]?.(node as any) || ``;\n}\n\ntype Printers = {\n    [K in BaseAstNode as K['type']]: (node: K) => string;\n};\nconst stringifyByType: Printers = {\n    space: ({ before, value, after }: Space) => before + value + after,\n    literal: ({ before, value, after }: Literal) => before + value + after,\n    'css-wide-keyword': ({ value }: CssWideKeyword) => value,\n    invalid: ({ value }: Invalid) => value,\n    comment: ({ value }: Comment) => value,\n    call: ({ value, before, after, args }: Call) =>\n        `${value}(${before}${stringifyCSSValue(args)}${after})`,\n    '<custom-ident>': ({ value }: CustomIdent) => value,\n    '<dashed-ident>': ({ value }: DashedIdent) => value,\n    '<string>': ({ value }: String) => value,\n    '<number>': ({ value }: Number) => value,\n    '<integer>': ({ value }: Integer) => value,\n    '<length>': ({ value, unit }: Length) => value + unit,\n    '<percentage>': ({ value, unit }: Percentage) => value + unit,\n    '<angle>': ({ value, unit }: Angle) => value + unit,\n    '<time>': ({ value, unit }: Time) => value + unit,\n    '<frequency>': ({ value, unit }: Frequency) => value + unit,\n    '<resolution>': ({ value, unit }: Resolution) => value + unit,\n    '<flex>': ({ value, unit }: Flex) => value + unit,\n    'unknown-unit': ({ value, unit }: UnknownUnit) => value + unit,\n    '<color>': ({ value }: Color) => value,\n};\n", "import {\n    BaseAstNode,\n    customIdent,\n    dashedIdent,\n    literal,\n    cssWideKeyword,\n    space,\n    string,\n    number,\n    unknownUnit,\n    length,\n    percentage,\n    angle,\n    time,\n    flex,\n    call,\n    frequency,\n    resolution,\n    integer,\n    color,\n    invalid,\n    comment,\n} from './ast-types';\nimport {\n    lengthValidUnits,\n    angleValidUnits,\n    timeValidUnits,\n    frequencyValidUnits,\n    resolutionValidUnits,\n} from './units';\nimport { tokenizeValue, CSSValueToken } from './tokenizer';\nimport { stringifyCSSValue } from './value-stringify';\nimport { Seeker, isComment } from '@tokey/core';\n\nexport type ParseResults = Array<BaseAstNode>;\n\nexport function parseCSSValue(\n    source: string,\n    _options?: { parseBuildVar?: () => { id: string; subType: string } }\n): ParseResults {\n    const tokens = tokenizeValue(source);\n    return new Seeker(tokens).run<ParseResults>(handleToken, [], source);\n}\n\nfunction handleToken(\n    token: CSSValueToken,\n    ast: ParseResults,\n    source: string,\n    s: Seeker<CSSValueToken>\n): void {\n    const { type, value, start, end } = token;\n    if (type === `space`) {\n        let firstSpace = value.indexOf(` `);\n        if (firstSpace === -1) {\n            firstSpace = value.indexOf(`\\n`);\n        }\n        if (firstSpace === -1) {\n            firstSpace = value.indexOf(`\\t`);\n        }\n        const before = firstSpace !== -1 ? value.substring(0, firstSpace) : ``;\n        const after = firstSpace !== -1 ? value.substring(firstSpace + 1) : value.substring(1);\n        ast.push(\n            space({\n                value: firstSpace !== -1 ? value[firstSpace] : value[0],\n                start,\n                end,\n                before,\n                after,\n            })\n        );\n    } else if (type === `text` || type === `-`) {\n        // numbers and lengths\n        if (parseNumber(token, ast, source, s)) {\n            return;\n        }\n        const ident = collectIdent(token, ast, source, s);\n        if (s.peek().type === `(`) {\n            // function\n            s.next();\n            const args: ParseResults = [];\n            s.run(\n                (token, args) => {\n                    if (token.type === ')') {\n                        return false;\n                    }\n                    return handleToken(token, args, source, s);\n                },\n                args,\n                source\n            );\n            const before =\n                args.length && args[0].type === `space` ? stringifyCSSValue(args.shift()!) : ``;\n            const after =\n                args.length && args[args.length - 1].type === `space`\n                    ? stringifyCSSValue(args.pop()!)\n                    : ``;\n            ast.push(\n                call({\n                    value: ident,\n                    start,\n                    end: s.peek(0).end,\n                    args,\n                    before,\n                    after,\n                })\n            );\n        } else if (ident.match(/^inherit|unset|initial$/i)) {\n            // css-wide keyword\n            ast.push(\n                cssWideKeyword({\n                    value: ident as any,\n                    start: token.start,\n                    end: s.peek(0).end,\n                })\n            );\n        } else if (ident.match(/^--/)) {\n            // dashed ident\n            ast.push(\n                dashedIdent({\n                    value: ident,\n                    start: token.start,\n                    end: s.peek(0).end,\n                })\n            );\n        } else if (ident.match(/^[-][a-z]|[a-z]/i)) {\n            // custom ident\n            ast.push(\n                customIdent({\n                    value: ident,\n                    start: token.start,\n                    end: s.peek(0).end,\n                })\n            );\n        } else {\n            ast.push(\n                literal({\n                    value: ident,\n                    start,\n                    end: s.peek(0).end,\n                })\n            );\n        }\n    } else if (type === `string`) {\n        ast.push(\n            string({\n                value,\n                start,\n                end,\n            })\n        );\n    } else if (type === `+`) {\n        if (parseNumber(token, ast, source, s)) {\n            return;\n        }\n        ast.push(\n            literal({\n                value,\n                start,\n                end,\n            })\n        );\n    } else if (type === `#`) {\n        const nextToken = s.next(); // #000000\n        const isValidColor =\n            nextToken.type === `text` &&\n            nextToken.value.match(/^[0-9a-f]{3,8}$/i) &&\n            nextToken.value.length !== 5 &&\n            nextToken.value.length !== 7;\n        if (isValidColor) {\n            ast.push(\n                color({\n                    value: value + nextToken.value,\n                    start,\n                    end: nextToken.end,\n                })\n            );\n        } else {\n            s.back();\n            ast.push(\n                invalid({\n                    value: `#`,\n                    start,\n                    end,\n                })\n            );\n        }\n    } else if (type === '.') {\n        if (parseNumber(token, ast, source, s)) {\n            // number parsed\n        } else {\n            ast.push(\n                literal({\n                    start,\n                    end,\n                    value,\n                })\n            );\n        }\n    } else if (isComment(type)) {\n        ast.push(\n            comment({\n                value,\n                start,\n                end,\n            })\n        );\n    } else if (value.length === 1) {\n        /* catches: , / or any other single char value.\n    not sure about this, might be better to break down \n    any multi value token into single literal nodes.\n    */\n        ast.push(\n            literal({\n                start,\n                end,\n                value,\n            })\n        );\n    } else {\n        ast.push(\n            invalid({\n                value,\n                start,\n                end,\n            })\n        );\n    }\n}\n\n/** parse ident **/\nfunction collectIdent(\n    token: CSSValueToken,\n    _ast: ParseResults,\n    _source: string,\n    s: Seeker<CSSValueToken>\n) {\n    let collectedValue = ``;\n    let pickAmount = 0;\n    let current = token;\n    while (current.type === `text` || current.type === `-`) {\n        collectedValue += current.value;\n        pickAmount++;\n        current = s.peek(pickAmount);\n    }\n    s.index += pickAmount - 1;\n    return collectedValue;\n}\n\n/** parse number **/\nfunction parseNumber(\n    token: CSSValueToken,\n    ast: ParseResults,\n    _source: string,\n    s: Seeker<CSSValueToken>\n) {\n    const { value, start } = token;\n    let startMatch = isStartOfNumber(value);\n    if (!startMatch) {\n        return false;\n    }\n    let [numberValue, numberUnit] = startMatch;\n    // check number is a valid full number (e.g. 5em -> [5e, m])\n    if (numberUnit && !isNumber(numberValue)) {\n        const fullNumberMatch = startWithValidNumber(value);\n        if (!fullNumberMatch) {\n            // token is not a valid number: bail out\n            return;\n        }\n        // token is number with a unit\n        [numberValue, numberUnit] = fullNumberMatch;\n    }\n    let peekCount = 1;\n    if (!numberUnit) {\n        // collect potential extra number parts\n        let nextToken = s.peek(peekCount);\n        while (\n            nextToken.type === `-` ||\n            nextToken.type === `+` ||\n            nextToken.type === `.` ||\n            nextToken.type === `%` ||\n            nextToken.type === `text`\n        ) {\n            const nextValue = numberValue + nextToken.value;\n            // const validNumber = isNumber(nextValue);\n            startMatch = isStartOfNumber(nextValue);\n            if (!startMatch) {\n                if (!isNumber(numberValue)) {\n                    // doesn't amount to a number: bail out\n                    return;\n                }\n                // collected a number: stop collection\n                peekCount--;\n                break;\n            }\n            //\n            peekCount++;\n            const [matchedNumber, leftover] = startMatch;\n            numberValue = matchedNumber;\n            if (leftover) {\n                // leftover must be unit: no more number to collect\n                numberUnit = leftover;\n                break;\n            }\n            nextToken = s.peek(peekCount);\n        }\n        // check final collected number\n        if (!isNumber(numberValue)) {\n            // check for partial initial number (e.g 5e with m as unit)\n            const fullNumberMatch = startWithValidNumber(numberValue + numberUnit);\n            if (!fullNumberMatch) {\n                return;\n            }\n            [numberValue, numberUnit] = fullNumberMatch;\n        }\n        // forward index by the tokens used for number value\n        s.index += peekCount - 1;\n        // take potential unit\n        if (!numberUnit && s.peek().type === `text`) {\n            numberUnit = s.next().value;\n        }\n    }\n    const isInteger = numberValue.match(integerRegExp);\n    // add to ast\n    if (numberUnit) {\n        const nodeType =\n            knownUnits[numberUnit.toLowerCase() as keyof typeof knownUnits] || unknownUnit;\n        ast.push(\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            nodeType({\n                value: numberValue,\n                unit: numberUnit,\n                integer: !!isInteger,\n                start,\n                end: s.peek(0).end,\n            } as any)\n        );\n    } else {\n        const nodeType = isInteger ? integer : number;\n        ast.push(\n            nodeType({\n                value: numberValue,\n                start,\n                end: s.peek(0).end,\n            })\n        );\n    }\n    return true;\n}\nconst knownUnits = {\n    '%': percentage,\n    fr: flex,\n    ...lengthValidUnits.reduce((units, unit) => {\n        units[unit] = length;\n        return units;\n    }, {} as Record<(typeof lengthValidUnits)[number], typeof length>),\n    ...angleValidUnits.reduce((units, unit) => {\n        units[unit] = angle;\n        return units;\n    }, {} as Record<(typeof angleValidUnits)[number], typeof angle>),\n    ...timeValidUnits.reduce((units, unit) => {\n        units[unit] = time;\n        return units;\n    }, {} as Record<(typeof timeValidUnits)[number], typeof time>),\n    ...frequencyValidUnits.reduce((units, unit) => {\n        units[unit] = frequency;\n        return units;\n    }, {} as Record<(typeof frequencyValidUnits)[number], typeof frequency>),\n    ...resolutionValidUnits.reduce((units, unit) => {\n        units[unit] = resolution;\n        return units;\n    }, {} as Record<(typeof resolutionValidUnits)[number], typeof resolution>),\n} as const;\n\nconst NumberRegExp = /^[-+]?(\\d+\\.?\\d*|\\d*\\.?\\d+)(e[-+]?\\d+)?/i;\nconst integerRegExp = /^[-+]?\\d+$/i; // one or more decimal digits 0 through 9 (preceded by -/+ ) - https://www.w3.org/TR/css-values-4/#integer-value\nconst validNumberRegex = [\n    /[-+]?(\\d+\\.?\\d*|\\d*\\.?\\d+)(e[-+]?\\d*)?/, // float+exponential\n    /[-+]?\\d+(e[-+]?\\d*)?/, // int+exponential\n    /[-+]/, // sign\n    /[-+]?\\./, // optional-sign+dot\n]\n    .map((r) => r.source)\n    .join(`|`); // join with one-of (\"or\")\n\n/**\n * Return true if the input is a valid number\n * for Example:\n * \"5\", \"+5\", \"-5\", \"55\", \"5.\", \"5.5\", \"5e5\", \"5E5\", \"5.5e55\", \"5e-5\", \"5e+5\"\n * @param value string to test\n * @returns true if value is valid as a number\n */\nfunction isNumber(value: string) {\n    const match = value.match(NumberRegExp);\n    const numVal = match?.[0];\n    return !!numVal && numVal === value;\n}\nfunction isStartOfNumber(value: string): false | [number: string, leftover: string] {\n    const match = value.match(new RegExp(`^(` + validNumberRegex + `)`, `i`));\n    const numVal = match?.[0];\n    return numVal ? [numVal, value.substring(numVal.length)] : false;\n}\nfunction startWithValidNumber(value: string): false | [number: string, leftover: string] {\n    const match = value.match(NumberRegExp);\n    const numVal = match?.[0];\n    return numVal ? [numVal, value.substring(numVal.length)] : false;\n}\n", "import type { CSSValueAST, BuildVarAst } from './ast-types';\nimport type { ParseResults } from './value-parser';\n\nexport function defineProperty<\n    FORMATS extends string,\n    CLASSIFICATIONS extends string,\n    TOP_COMMA extends boolean = false\n>(_config: {\n    name: string;\n    syntax: string;\n    subSyntax?: Record<string, string>;\n    subProperties?: Record<string, ReturnType<typeof defineProperty>>;\n    topLevelCommaSeparation?: TOP_COMMA;\n    formats?: Record<FORMATS, string>;\n    classifications?: Record<\n        CLASSIFICATIONS,\n        | MatchClassification // ToDo: optional default value / required\n        | (TOP_COMMA extends true\n              ? {\n                    match?: MatchClassification;\n                    syntax?: string;\n                    inTopLevelIndex?: (index: number, total: number) => boolean;\n                    cssProperty?: ReturnType<typeof defineProperty>;\n                }\n              : {\n                    match?: MatchClassification;\n                    syntax?: string;\n                    cssProperty?: ReturnType<typeof defineProperty>;\n                })\n    >;\n}): {\n    validate: (ast: CSSValueAST<any>[], options?: ActionParams) => [...errors: string[]];\n    getFormat: (ast: CSSValueAST<any>[], options?: ActionParams) => FORMATS;\n    classify: (\n        ast: CSSValueAST<any>[],\n        options?: ActionParams & { deep?: boolean; ignoreComments?: boolean }\n    ) => TOP_COMMA extends true\n        ? Record<CLASSIFICATIONS, Classification>[]\n        : Record<CLASSIFICATIONS, Classification>;\n} {\n    return {} as any;\n}\n\ndefineProperty.errors = {\n    unexpectedType: (node: CSSValueAST<any>, expectedType: string) =>\n        `expected to get ${expectedType}, but got ${node.type}`,\n    unexpectedComma: () => `unexpected comma`,\n};\n\nexport interface ActionParams {\n    cssVars?: Record<string, CSSValueAST<any>[]>;\n    resolveBuildVar?: (node: BuildVarAst) => CSSValueAST<any>[];\n}\n\ntype MatchClassification = (\n    node: CSSValueAST<any>,\n    info: {\n        index: number;\n        indexOfType: number;\n        amountOfType: number;\n    }\n) => boolean;\n\ntype Classification = {\n    value: CSSValueAST<any>[];\n    resolved: { origin: ParseResults; nodes: CSSValueAST<any>[] }[][]; // ToDo: should probably be more detailed... need to see cases\n    isProperty: boolean;\n};\n", "import { defineProperty } from '../define-property';\n\nexport const background = defineProperty({\n    name: `background`,\n    syntax: `[ <bg-layer> , ]* <final-bg-layer>`,\n    subSyntax: {\n        '<bg-layer>': `<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>`,\n        '<final-bg-layer>': `<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>`,\n    },\n    subProperties: {\n        // ToDo: define and add\n    },\n    topLevelCommaSeparation: true,\n    classifications: {\n        'background-image': () => {\n            return false;\n        },\n        'background-position': () => {\n            return false;\n        },\n        'background-size': {\n            syntax: `<bg-size>`,\n            match: () => true,\n        },\n        'background-repeat': () => {\n            return false;\n        },\n        'background-origin': () => {\n            return false;\n        },\n        'background-clip': () => {\n            return false;\n        },\n        'background-attachment': () => {\n            return false;\n        },\n        'background-color': {\n            inTopLevelIndex: (index, total) => {\n                return index === total - 1;\n            },\n            match: () => {\n                return false;\n            },\n        },\n    },\n});\n", "import { defineProperty } from '../define-property';\n\nconst subMarginPlacements: Record<\n    'top' | 'right' | 'bottom' | 'left',\n    [single: number, two: number, three: number, four: number]\n> = {\n    top: [0, 1, 0, 0],\n    left: [0, 0, 1, 3],\n    bottom: [0, 1, 2, 2],\n    right: [0, 0, 1, 1],\n};\n\nexport const margin = defineProperty({\n    name: `margin`,\n    syntax: `<length>{1,4}`,\n    formats: {\n        all: `<length>`,\n        'horizontal-vertical': `<length><length>`,\n        'top-horizontal-bottom': `<length><length><length>`,\n        'top-right-bottom-left': `<length><length><length><length>`,\n    },\n    classifications: {\n        'margin-top': (_node, { amountOfType, indexOfType }) => {\n            return subMarginPlacements.top[amountOfType - 1] === indexOfType;\n        },\n        'margin-right': (_node, { amountOfType, indexOfType }) => {\n            return subMarginPlacements.right[amountOfType - 1] === indexOfType;\n        },\n        'margin-bottom': (_node, { amountOfType, indexOfType }) => {\n            return subMarginPlacements.bottom[amountOfType - 1] === indexOfType;\n        },\n        'margin-left': (_node, { amountOfType, indexOfType }) => {\n            return subMarginPlacements.left[amountOfType - 1] === indexOfType;\n        },\n    },\n});\n", "import { tokenize, createToken, Token, Seeker, getText, last } from '@tokey/core';\n\ntype RangeMultipliers = '!' | '?' | '+' | '*';\n\ntype Delimiters =\n    | '<'\n    | '>'\n    | '['\n    | ']'\n    | ','\n    | '/'\n    | '|'\n    | '&'\n    | '#'\n    | '('\n    | ')'\n    | '{'\n    | '}'\n    | RangeMultipliers;\n\n/**\n * Add comments\n * allOf, oneOf, anyOf\n */\n\nconst isDelimiter = (char: string) =>\n    char === '<' ||\n    char === '>' ||\n    char === '[' ||\n    char === ']' ||\n    char === ',' ||\n    char === '/' ||\n    char === '|' ||\n    char === '&' ||\n    char === '#' ||\n    char === '(' ||\n    char === ')' ||\n    char === '{' ||\n    char === '}' ||\n    char === '?' ||\n    char === '!' ||\n    char === '*' ||\n    char === '+';\n\ntype ValueSyntaxToken = Token<'space' | 'text' | Delimiters>;\n\nexport const isWhitespace = (char: string) =>\n    char === ' ' || char === `\\t` || char === `\\r` || char === '\\n' || char === '\\f';\n\nexport function parseValueSyntax(source: string) {\n    return parseTokens(\n        tokenize<ValueSyntaxToken>(source, {\n            isDelimiter,\n            isWhitespace,\n            createToken,\n            isStringDelimiter: () => false,\n            shouldAddToken: () => true,\n            getCommentStartType: () => '',\n            isCommentEnd: () => false,\n            getUnclosedComment: () => '',\n        }),\n        source\n    );\n}\n\ntype Range = [min: number, max: number];\n\ninterface Multipliers {\n    range?: Range;\n    list?: boolean;\n}\n\ninterface DataTypeNode {\n    type: 'data-type';\n    name: string;\n    range?: Range;\n    multipliers?: Multipliers;\n}\n\ninterface PropertyNode {\n    type: 'property';\n    name: string;\n    range?: Range;\n    multipliers?: Multipliers;\n}\n\ninterface LiteralNode {\n    type: 'literal';\n    name: string;\n    enclosed: boolean;\n    multipliers?: Multipliers;\n}\n\ninterface KeywordNode {\n    type: 'keyword';\n    name: string;\n    multipliers?: Multipliers;\n}\n\ninterface CombinatorGroup {\n    nodes: ValueSyntaxAstNode[];\n}\n\ninterface JuxtaposingNode extends CombinatorGroup {\n    type: 'juxtaposing';\n}\n\ninterface DoubleAmpersandNode extends CombinatorGroup {\n    type: '&&';\n}\n\ninterface DoubleBarNode extends CombinatorGroup {\n    type: '||';\n}\n\ninterface BarNode extends CombinatorGroup {\n    type: '|';\n}\n\ninterface GroupNode extends CombinatorGroup {\n    type: 'group';\n    multipliers?: Multipliers;\n}\n\ntype Combinators = GroupNode | JuxtaposingNode | DoubleAmpersandNode | DoubleBarNode | BarNode;\n\ntype Components = DataTypeNode | PropertyNode;\nexport type ValueSyntaxAstNode = Components | KeywordNode | LiteralNode | Combinators;\n\nexport function literal(name: string, enclosed = false, multipliers?: Multipliers): LiteralNode {\n    return { type: 'literal', name, enclosed, multipliers };\n}\n\nexport function keyword(name: string, multipliers?: Multipliers): KeywordNode {\n    return { type: 'keyword', name, multipliers };\n}\n\nexport function property(name: string, range?: Range, multipliers?: Multipliers): PropertyNode {\n    return { type: 'property', name, range, multipliers };\n}\n\nexport function dataType(name: string, range?: Range, multipliers?: Multipliers): DataTypeNode {\n    return { type: 'data-type', name, range, multipliers };\n}\n\nexport function group(nodes: ValueSyntaxAstNode[], multipliers?: Multipliers): GroupNode {\n    return { type: 'group', nodes, multipliers };\n}\n\nexport function juxtaposing(nodes: ValueSyntaxAstNode[]): JuxtaposingNode {\n    return { type: 'juxtaposing', nodes };\n}\n\nexport function bar(nodes: ValueSyntaxAstNode[]): BarNode {\n    return { type: '|', nodes };\n}\n\nexport function doubleAmpersand(nodes: ValueSyntaxAstNode[]): DoubleAmpersandNode {\n    return { type: '&&', nodes };\n}\n\nexport function doubleBar(nodes: ValueSyntaxAstNode[]): DoubleBarNode {\n    return { type: '||', nodes };\n}\n\ninterface ParsingContext {\n    ast: ValueSyntaxAstNode[];\n}\n\nfunction parseTokens(tokens: ValueSyntaxToken[], source: string) {\n    const handleToken = (\n        token: ValueSyntaxToken,\n        { ast }: ParsingContext,\n        _source: string,\n        s: Seeker<ValueSyntaxToken>\n    ) => {\n        if (token.type === '<') {\n            let closed = false;\n            s.eat('space');\n            const nameBlock = s.run<ValueSyntaxToken[]>(\n                (node, ast) => {\n                    const { type } = node;\n                    if (type === 'space' || type === '[' || type === '>') {\n                        return false;\n                    } else {\n                        ast.push(node);\n                        return;\n                    }\n                },\n                [],\n                _source\n            );\n            if (nameBlock.length === 0) {\n                throw new Error('missing data type name');\n            }\n            s.back();\n            const name = getText(nameBlock, undefined, undefined, source);\n\n            const type = getLiteralValueType(name);\n            let range: Range | undefined;\n            if (type === 'invalid') {\n                throw new Error('missing data type name');\n            } else {\n                const t = s.eat('space').next();\n                if (t.type === '>') {\n                    closed = true;\n                } else if (t.type === '[') {\n                    const min = s.eat('space').take('text');\n                    const sep = s.eat('space').take(',');\n                    const max = s.eat('space').take('text');\n                    const end = s.eat('space').take(']');\n                    if (min && sep && max && end) {\n                        range = [parseNumber(min.value), parseNumber(max.value)];\n                    } else {\n                        throw new Error('Invalid range');\n                    }\n                    const t = s.eat('space').take('>');\n                    if (t) {\n                        closed = true;\n                    }\n                }\n            }\n            if (!closed) {\n                throw new Error('missing \">\"');\n            }\n            if (type === 'quoted') {\n                ast.push(property(name.slice(1, -1), range));\n            } else {\n                ast.push(dataType(name, range));\n            }\n        } else if (token.type === '[') {\n            const res = s.run(handleToken, { ast: [] }, source);\n            applyPrecedence(res.ast);\n            ast.push(group(res.ast));\n        } else if (token.type === ']') {\n            return false;\n        } else if (token.type === 'text') {\n            const t = getLiteralValueType(token.value);\n            if (t === 'invalid') {\n                if (token.value.startsWith(\"'\")) {\n                    const tokens = s.run(\n                        (token, ast) => {\n                            ast.push(token);\n                            return token.value.endsWith(\"'\") ? false : undefined;\n                        },\n                        [token] as ValueSyntaxToken[],\n                        source\n                    );\n                    if (tokens.length <= 2) {\n                        throw new Error('unclosed or empty literal');\n                    } else {\n                        ast.push(\n                            literal(\n                                getText(tokens, undefined, undefined, source).slice(1, -1),\n                                true\n                            )\n                        );\n                    }\n                } else {\n                    throw new Error('invalid literal');\n                }\n            } else if (t === 'quoted') {\n                ast.push(literal(token.value.slice(1, -1), true));\n            } else {\n                ast.push(keyword(token.value));\n            }\n        } else if (\n            token.type === ',' ||\n            token.type === '/' ||\n            token.type === '(' ||\n            token.type === ')'\n        ) {\n            ast.push(literal(token.value));\n        } else if (token.type === 'space') {\n            s.eat('space');\n        } else if (isRangeMultiplier(token)) {\n            const node = lastParsedNode(ast);\n            if (!node || node.type === 'juxtaposing' || isLowLevelGroup(node)) {\n                throw new Error('unexpected modifier');\n            }\n            node.multipliers ??= {};\n            if (node.multipliers.range) {\n                throw new Error('multiple multipliers on same node');\n            }\n            node.multipliers.range = typeToRange(token.type);\n        } else if (token.type === '{') {\n            if (s.peekBack().type === 'space') {\n                ast.push(literal(token.value, false));\n            } else {\n                const node = lastParsedNode(ast);\n\n                if (!node || isLowLevelGroup(node) || node.type === 'juxtaposing') {\n                    throw new Error('unexpected range modifier');\n                }\n\n                const start = s.eat('space').take('text');\n                if (!start) {\n                    throw new Error('missing range start value');\n                }\n                const sep = s.eat('space').take(',');\n                if (sep) {\n                    const end = s.eat('space').take('text');\n                    const close = s.eat('space').take('}');\n                    if (!close) {\n                        throw new Error('missing }');\n                    }\n\n                    node.multipliers ??= {};\n                    if (node.multipliers.range) {\n                        throw new Error('multiple multipliers on same node');\n                    }\n                    node.multipliers.range = [\n                        parseNumber(start.value),\n                        parseNumber(end?.value ?? '\u221E'),\n                    ];\n                } else {\n                    const close = s.eat('space').take('}');\n                    if (!close) {\n                        throw new Error('missing }');\n                    }\n                    node.multipliers ??= {};\n                    if (node.multipliers.range) {\n                        throw new Error('multiple multipliers on same node');\n                    }\n                    node.multipliers.range = [parseNumber(start.value), parseNumber(start.value)];\n                }\n            }\n        } else if (token.type === '#') {\n            const node = lastParsedNode(ast);\n            if (!node || node.type === 'juxtaposing' || isLowLevelGroup(node)) {\n                throw new Error('unexpected list modifier');\n            }\n            node.multipliers ??= {};\n            node.multipliers.list = true;\n        } else if (token.type === '&') {\n            const nextAnd = s.take('&');\n            if (!nextAnd) {\n                throw new Error('missing &');\n            }\n            ast.push(doubleAmpersand([]));\n        } else if (token.type === '|') {\n            ast.push(s.take('|') ? doubleBar([]) : bar([]));\n        } else if (token.type === '}') {\n            ast.push(literal(token.value, false));\n        } else {\n            throw new Error(`UnHandled ${JSON.stringify(token)}`);\n        }\n\n        applyJuxtaposing(ast);\n\n        return;\n    };\n\n    const results = new Seeker(tokens).run<ParsingContext>(handleToken, { ast: [] }, source);\n\n    applyPrecedence(results.ast);\n\n    return results.ast[0];\n}\n\nfunction lastParsedNode(ast: ValueSyntaxAstNode[]) {\n    const node = last(ast);\n    // assume the parse process in juxtaposing on each step\n    return node?.type === 'juxtaposing' ? last(node.nodes) : node;\n}\n\nfunction applyPrecedence(ast: ValueSyntaxAstNode[]) {\n    const order = ['&&', '||', '|'] as const;\n\n    for (let i = 0; i < order.length; i++) {\n        const type = order[i];\n        for (let j = 0; j < ast.length; j++) {\n            const node = ast[j];\n            if (node.type === type) {\n                const before = ast[j - 1];\n                const after = ast[j + 1];\n                if (!before) {\n                    throw new Error(`missing node before ${type}`);\n                }\n                if (!after) {\n                    throw new Error(`missing node after ${type}`);\n                }\n                if (after.type === type) {\n                    throw new Error('invalid grouping');\n                }\n                if (before.type === type) {\n                    before.nodes.push(after);\n                    ast.splice(j - 1, 3, before);\n                } else {\n                    node.nodes.push(before, after);\n                    ast.splice(j - 1, 3, node);\n                }\n                j--;\n            }\n        }\n    }\n\n    if (ast.length > 1) {\n        throw new Error('could not applyPrecedence');\n    }\n}\n\nfunction parseNumber(value: string): number {\n    if (value === '\u221E') {\n        return Infinity;\n    }\n    if (value === `-\u221E`) {\n        return -Infinity;\n    }\n    // TODO: check for valid number, NaN, more...\n    return parseFloat(value);\n}\n\nfunction isRangeMultiplier(token: ValueSyntaxToken): token is Token<RangeMultipliers> {\n    const { type } = token;\n    return type === '!' || type === '?' || type === '+' || type === '*';\n}\n\nfunction typeToRange(type: RangeMultipliers): [number, number] {\n    switch (type) {\n        case '!':\n            return [1, 1];\n        case '*':\n            return [0, Infinity];\n        case '+':\n            return [1, Infinity];\n        case '?':\n            return [0, 1];\n    }\n}\n\nfunction applyJuxtaposing(ast: ValueSyntaxAstNode[]) {\n    if (ast.length > 1) {\n        const last = ast[ast.length - 1];\n        const prev = ast[ast.length - 2];\n        if (prev.type === 'juxtaposing' && !isLowLevelGroup(last)) {\n            ast.length = ast.length - 1;\n            prev.nodes.push(last);\n        } else if (!isLowLevelGroup(prev) && !isLowLevelGroup(last)) {\n            ast.splice(ast.length - 2, 2, juxtaposing([prev, last]));\n        }\n    }\n}\n\nfunction isLowLevelGroup(\n    node: ValueSyntaxAstNode\n): node is DoubleBarNode | DoubleAmpersandNode | BarNode {\n    const { type } = node;\n    return type === '&&' || type === '|' || type === '||';\n}\n\nexport function stringify(node: ValueSyntaxAstNode): string {\n    const { type } = node;\n    if ('multipliers' in node) {\n        throw new Error('TODO: multipliers');\n    }\n    if (type === 'property') {\n        return `<'${node.name}'${node.range ? ` [${node.range}]` : ''}>`;\n    } else if (type === 'data-type') {\n        return `<${node.name}${node.range ? ` [${node.range}]` : ''}>`;\n    } else if (type === 'literal') {\n        return node.enclosed ? `'${node.name}'` : `${node.name}`;\n    } else if (type === 'group') {\n        return `[ ${node.nodes.map((child) => stringify(child)).join('')} ]`;\n    } else if (type === '&&') {\n        return node.nodes.map((child) => stringify(child)).join(' && ');\n    } else if (type === '||') {\n        return node.nodes.map((child) => stringify(child)).join(' || ');\n    } else if (type === '|') {\n        return node.nodes.map((child) => stringify(child)).join(' | ');\n    } else if (type === 'juxtaposing') {\n        return node.nodes.map((child) => stringify(child)).join(' ');\n    } else if (type === 'keyword') {\n        return node.name;\n    } else {\n        throw new Error(`missing stringify for node ${JSON.stringify(node)}`);\n    }\n}\n\nfunction getLiteralValueType(value: string) {\n    if (value.startsWith(\"'\")) {\n        if (value.endsWith(\"'\") && value.length > 1) {\n            return 'quoted';\n        } else {\n            return 'invalid';\n        }\n    } else {\n        return 'literal';\n    }\n}\n", "export * from './ast-types';\nexport { parseCSSValue } from './value-parser';\nexport { stringifyCSSValue } from './value-stringify';\nexport { defineProperty } from './define-property';\n// properties\nexport { background } from './properties/background';\nexport { margin } from './properties/margin';\n// syntax\nexport { parseValueSyntax } from './value-syntax-parser';\n", "'use strict'\n\nmodule.exports = function vendorPrefixes () {\n  return [\n    '-ms-', 'mso-', // Microsoft\n    '-moz-',\t      // Mozilla\n    '-o-', '-xv-',  // Opera Software\n    '-atsc-',       //\tAdvanced Television Standards Committee\n    '-wap-',        //\tThe WAP Forum\n    '-khtml-',      //\tKDE\n    '-webkit-',     //\tApple\n    'prince-',      //\tYesLogic\n    '-ah-',         //\tAntenna House\n    '-hp-',         //\tHewlett Packard\n    '-ro-',         //\tReal Objects\n    '-rim-',        //\tResearch In Motion\n    '-tc-'          //\tTallComponents\n  ]\n}\n", "const vendorPrefixes = require('vendor-prefixes')\n\nmodule.exports = property => {\n  if (typeof property !== 'string') {\n    throw new TypeError('is-vendor-prefixed expected a string')\n  }\n\n  const regexForPrefixes = new RegExp(\n    '^(' + vendorPrefixes().join('|') + ')([a-z-]+)$',\n    'i'\n  )\n  return regexForPrefixes.test(property)\n}\n", "export { Stylable, StylableConfig } from './stylable';\nexport { Diagnostics, Diagnostic, DiagnosticSeverity } from './diagnostics';\nexport type {\n    StylableSymbol,\n    ClassSymbol,\n    ImportSymbol,\n    ElementSymbol,\n    CSSVarSymbol,\n    VarSymbol,\n    Imported,\n    KeyframesSymbol,\n    MixinReflection,\n    ComputedStVar,\n    FlatComputedStVar,\n} from './features';\nexport { StylableMeta } from './stylable-meta';\nexport type { CSSResolve, JSResolve } from './stylable-resolver';\nexport type { CSSDependency, JSDependency, Dependency } from './visit-meta-css-dependencies';\nexport type { StylableResults, RuntimeStVar } from './stylable-transformer';\n\n// utils\nexport type { MinimalFS } from './cached-process-file';\nexport { noCollisionNamespace } from './resolve-namespace-factories';\nexport {\n    createNamespaceStrategy,\n    defaultNoMatchHandler,\n    defaultNamespaceBuilder,\n    CreateNamespaceOptions,\n    NamespaceBuilder,\n    NamespaceBuilderParams,\n    PackageInfo,\n} from './helpers/namespace';\nexport { processNamespace } from './stylable-processor';\nexport { CustomValueStrategy, createCustomValue } from './custom-values';\nexport { createDefaultResolver } from './module-resolver';\n\n// low-level api\nexport { parseModuleImportStatement, ensureModuleImport } from './helpers/import';\nexport { validateCustomPropertyName } from './helpers/css-custom-property';\n\nexport { generateStylableJSModuleSource } from './stylable-js-module-source';\n", "export type processFn<T> = (fullpath: string, content: string) => T;\n\nexport interface CacheItem<T> {\n    value: T;\n    content: string;\n}\n\nexport interface MinimalFS {\n    readFileSync: (filePath: string, encoding: 'utf8') => string;\n}\n\nexport interface FileProcessor<T> {\n    process: (filePath: string, invalidateCache?: boolean) => T;\n    add: (filePath: string, value: T) => void;\n    processContent: (content: string, filePath: string) => T;\n    cache: Record<string, CacheItem<T>>;\n    postProcessors: Array<(value: T, path: string) => T>;\n}\n\nexport function cachedProcessFile<T = any>(\n    processor: processFn<T>,\n    readFileSync: MinimalFS['readFileSync'],\n    postProcessors: Array<(value: T, path: string) => T> = [],\n    cache: { [key: string]: CacheItem<T> } = {}\n): FileProcessor<T> {\n    function process(filePath: string, invalidateCache = false) {\n        const content = readFileSync(filePath, 'utf8');\n        const cached = cache[filePath];\n        if (invalidateCache || !cached || (cached && cached.content !== content)) {\n            cache[filePath] = {\n                value: processContent(content, filePath),\n                content,\n            };\n        }\n        return cache[filePath].value;\n    }\n\n    function processContent(content: string, filePath: string): T {\n        return postProcessors.reduce<T>(\n            (value, postProcessor) => postProcessor(value, filePath),\n            processor(filePath, content)\n        );\n    }\n\n    function add(filePath: string, value: T) {\n        let content;\n        try {\n            content = readFileSync(filePath, 'utf8');\n        } catch (e) {\n            content = '';\n        }\n        cache[filePath] = {\n            value,\n            content,\n        };\n    }\n\n    return {\n        processContent,\n        postProcessors,\n        cache,\n        process,\n        add,\n    };\n}\n", "import postcss from './postcss.js'\n\nexport default postcss\n\nexport const stringify = postcss.stringify\nexport const fromJSON = postcss.fromJSON\nexport const plugin = postcss.plugin\nexport const parse = postcss.parse\nexport const list = postcss.list\n\nexport const document = postcss.document\nexport const comment = postcss.comment\nexport const atRule = postcss.atRule\nexport const rule = postcss.rule\nexport const decl = postcss.decl\nexport const root = postcss.root\n\nexport const CssSyntaxError = postcss.CssSyntaxError\nexport const Declaration = postcss.Declaration\nexport const Container = postcss.Container\nexport const Processor = postcss.Processor\nexport const Document = postcss.Document\nexport const Comment = postcss.Comment\nexport const Warning = postcss.Warning\nexport const AtRule = postcss.AtRule\nexport const Result = postcss.Result\nexport const Input = postcss.Input\nexport const Rule = postcss.Rule\nexport const Root = postcss.Root\nexport const Node = postcss.Node\n", "import postcss, { ProcessOptions, Root, parse as cssParse } from 'postcss';\nimport postcssNested from 'postcss-nested';\nimport postcssJS from 'postcss-js';\nimport safeParser from 'postcss-safe-parser';\n\nexport type CSSObject = object;\n\nconst processor = postcss([postcssNested()]);\n\nexport function cssObjectToAst(cssObject: CSSObject, sourceFile = '') {\n    const r = processor.process(cssObject, { from: sourceFile, parser: postcssJS });\n    return r.root.type === 'document' ? r.root.nodes[0] : r.root;\n}\n\nexport type CssParser = typeof safeParse;\n\nexport function safeParse(css: string, options: ProcessOptions = { from: 'style.st.css' }): Root {\n    return safeParser(css, options);\n}\n\nexport { cssParse };\n", "import index from './index.js'\n\nexport default index\n\nexport const objectify = index.objectify\nexport const parse = index.parse\nexport const async = index.async\nexport const sync = index.sync\n", "import type * as postcss from 'postcss';\n\nexport type DiagnosticSeverity = 'error' | 'warning' | 'info';\n\nexport interface DiagnosticBase {\n    severity: DiagnosticSeverity;\n    message: string;\n    code: string;\n}\n\nexport interface DiagnosticContext {\n    node: postcss.Node;\n    word?: string;\n    filePath?: string;\n}\n\nexport interface DiagnosticOptions {\n    word?: string;\n}\n\nexport type Diagnostic = DiagnosticBase & DiagnosticContext;\n\nexport class Diagnostics {\n    constructor(public reports: Diagnostic[] = []) {}\n    public report(diagnostic: DiagnosticBase, context: DiagnosticContext) {\n        const node = context.node;\n        this.reports.push({\n            filePath: node.source?.input.from,\n            ...diagnostic,\n            ...context,\n        });\n    }\n}\n\nexport function createDiagnosticReporter<T extends any[]>(\n    code: string,\n    severity: DiagnosticSeverity,\n    message: (...args: T) => string\n) {\n    const func = (...args: T): DiagnosticBase => {\n        return { code, severity, message: message(...args) };\n    };\n\n    func.code = code;\n    func.severity = severity;\n\n    return func;\n}\n", "// MDN reference: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes\nexport const nativePseudoClasses = [\n    'active',\n    'any',\n    'any-link',\n    'checked',\n    'indeterminate',\n    'default',\n    'defined',\n    'dir',\n    'disabled',\n    'empty',\n    'enabled',\n    'first',\n    'first-child',\n    'first-of-type',\n    'fullscreen',\n    'focus',\n    'focus-within',\n    'focus-visible',\n    'has',\n    'hover',\n    'indeterminate',\n    'in-range',\n    'invalid',\n    'is',\n    'lang',\n    'last-child',\n    'last-of-type',\n    'left',\n    'link',\n    'not',\n    'nth-child',\n    'nth-last-child',\n    'nth-last-of-type',\n    'nth-of-type',\n    'only-child',\n    'only-of-type',\n    'optional',\n    'out-of-range',\n    'placeholder-shown',\n    'read-only',\n    'read-write',\n    'required',\n    'right',\n    'root',\n    'scope',\n    'target',\n    'valid',\n    'visited',\n    'where',\n    'user-valid',\n    'user-invalid',\n    'autofill',\n    'modal',\n    'popover-open',\n    'future',\n    'past',\n    'picture-in-picture',\n];\n\nexport const CSSWideKeywords = ['initial', 'inherit', 'unset'];\n\n/**\n * list names of functional pseudo classes\n * - cannot be overridden by custom states\n * - might contain nested selectors\n */\nexport const reservedFunctionalPseudoClasses = [\n    `not`,\n    `any`,\n    `matches`,\n    `is`,\n    `where`,\n    `has`,\n    `host`,\n    `host-context`,\n    `nth-child`,\n    `nth-last-child`,\n    `nth-of-type`,\n    `nth-last-of-type`,\n    // not native\n    `global`,\n    `local`,\n];\nexport const knownPseudoClassesWithNestedSelectors = reservedFunctionalPseudoClasses.filter(\n    (name) => {\n        switch (name) {\n            case `global`:\n            case `local`:\n            case `nth-of-type`:\n            case `nth-last-of-type`:\n                return false;\n        }\n        return true;\n    }\n);\n\nexport const nativePseudoElements = [\n    'after',\n    'backdrop',\n    'before',\n    'cue',\n    'first-letter',\n    'first-line',\n    'grammar-error',\n    'marker',\n    'placeholder',\n    'selection',\n    'slotted',\n    'spelling-error',\n    'file-selector-button',\n    'highlight',\n    'part',\n    'target-text',\n    'view-transition',\n    'view-transition-group',\n    'view-transition-image-pair',\n    'view-transition-new',\n    'view-transition-old',\n];\n\nexport const nativeFunctionsDic: Record<string, { preserveQuotes: boolean }> = {\n    annotation: { preserveQuotes: false },\n    attr: { preserveQuotes: false },\n    blur: { preserveQuotes: false },\n    brightness: { preserveQuotes: false },\n    calc: { preserveQuotes: false },\n    'character-variant': { preserveQuotes: false },\n    circle: { preserveQuotes: false },\n    clamp: { preserveQuotes: false },\n    'conic-gradient': { preserveQuotes: false },\n    constant: { preserveQuotes: false },\n    contrast: { preserveQuotes: false },\n    counter: { preserveQuotes: false },\n    counters: { preserveQuotes: false },\n    'cubic-bezier': { preserveQuotes: false },\n    'drop-shadow': { preserveQuotes: false },\n    ellipse: { preserveQuotes: false },\n    env: { preserveQuotes: false },\n    'fit-content': { preserveQuotes: false },\n    format: { preserveQuotes: false },\n    grayscale: { preserveQuotes: false },\n    hsl: { preserveQuotes: false },\n    hsla: { preserveQuotes: false },\n    'hue-rotate': { preserveQuotes: false },\n    hwb: { preserveQuotes: false },\n    image: { preserveQuotes: false },\n    inset: { preserveQuotes: false },\n    invert: { preserveQuotes: false },\n    leader: { preserveQuotes: false },\n    'light-dark': { preserveQuotes: false },\n    'linear-gradient': { preserveQuotes: false },\n    local: { preserveQuotes: false },\n    matrix: { preserveQuotes: false },\n    matrix3d: { preserveQuotes: false },\n    max: { preserveQuotes: false },\n    min: { preserveQuotes: false },\n    minmax: { preserveQuotes: false },\n    opacity: { preserveQuotes: false },\n    ornaments: { preserveQuotes: false },\n    paint: { preserveQuotes: false },\n    path: { preserveQuotes: true },\n    perspective: { preserveQuotes: false },\n    polygon: { preserveQuotes: false },\n    'radial-gradient': { preserveQuotes: false },\n    rect: { preserveQuotes: false },\n    repeat: { preserveQuotes: false },\n    'repeating-linear-gradient': { preserveQuotes: false },\n    'repeating-radial-gradient': { preserveQuotes: false },\n    'repeating-conic-gradient': { preserveQuotes: false },\n    rgb: { preserveQuotes: false },\n    rgba: { preserveQuotes: false },\n    rotate: { preserveQuotes: false },\n    rotate3d: { preserveQuotes: false },\n    rotateX: { preserveQuotes: false },\n    rotateY: { preserveQuotes: false },\n    rotateZ: { preserveQuotes: false },\n    saturate: { preserveQuotes: false },\n    scale: { preserveQuotes: false },\n    scale3d: { preserveQuotes: false },\n    scaleX: { preserveQuotes: false },\n    scaleY: { preserveQuotes: false },\n    scaleZ: { preserveQuotes: false },\n    scroll: { preserveQuotes: false },\n    view: { preserveQuotes: true },\n    sepia: { preserveQuotes: false },\n    skew: { preserveQuotes: false },\n    skewX: { preserveQuotes: false },\n    skewY: { preserveQuotes: false },\n    steps: { preserveQuotes: false },\n    styleset: { preserveQuotes: false },\n    stylistic: { preserveQuotes: false },\n    swash: { preserveQuotes: false },\n    symbols: { preserveQuotes: false },\n    translate: { preserveQuotes: false },\n    translate3d: { preserveQuotes: false },\n    translateX: { preserveQuotes: false },\n    translateY: { preserveQuotes: false },\n    translateZ: { preserveQuotes: false },\n    url: { preserveQuotes: false },\n    var: { preserveQuotes: false },\n    color: { preserveQuotes: true },\n    'color-mix': { preserveQuotes: true },\n    lab: { preserveQuotes: true },\n    oklab: { preserveQuotes: true },\n    lch: { preserveQuotes: true },\n    oklch: { preserveQuotes: true },\n    supports: { preserveQuotes: true },\n    anchor: { preserveQuotes: true },\n    'anchor-size': { preserveQuotes: true },\n    selector: { preserveQuotes: true /* TODO:transform the nested selector */ },\n    style: { preserveQuotes: true /* TODO: transform the dashed ident property */ },\n    'image-set': { preserveQuotes: true },\n    sin: { preserveQuotes: true },\n    cos: { preserveQuotes: true },\n    tan: { preserveQuotes: true },\n    asin: { preserveQuotes: true },\n    acos: { preserveQuotes: true },\n    atan: { preserveQuotes: true },\n    atan2: { preserveQuotes: true },\n    pow: { preserveQuotes: true },\n    sqrt: { preserveQuotes: true },\n    hypot: { preserveQuotes: true },\n    log: { preserveQuotes: true },\n    exp: { preserveQuotes: true },\n    abs: { preserveQuotes: true },\n    sign: { preserveQuotes: true },\n};\n", "import { isAbsolute } from 'path';\nimport * as postcss from 'postcss';\nimport { createDiagnosticReporter, Diagnostics } from './diagnostics';\nimport type { ImportSymbol, StylableSymbol } from './features';\nimport { isChildOfAtRule, stMixinMarker, isStMixinMarker } from './helpers/rule';\nimport { scopeNestedSelector, parseSelectorWithCache } from './helpers/selector';\n\nexport function isValidDeclaration(decl: postcss.Declaration) {\n    return typeof decl.value === 'string';\n}\n\nexport const utilDiagnostics = {\n    INVALID_MERGE_OF: createDiagnosticReporter(\n        '14001',\n        'error',\n        (mergeValue: string) => `invalid merge of: \\n\"${mergeValue}\"`\n    ),\n    INVALID_RECURSIVE_MIXIN: createDiagnosticReporter(\n        '10010',\n        'error',\n        () => `invalid recursive mixin`\n    ),\n};\n\n// ToDo: move to helpers/mixin\nexport function mergeRules(\n    mixinAst: postcss.Root,\n    rule: postcss.Rule,\n    mixinDecl: postcss.Declaration,\n    report: Diagnostics,\n    useNestingAsAnchor: boolean\n) {\n    let mixinRoot: postcss.Rule | null | 'NoRoot' = null;\n    const nestedInKeyframes = isChildOfAtRule(rule, `keyframes`);\n    const anchorSelector = useNestingAsAnchor ? '&' : '[' + stMixinMarker + ']';\n    const anchorNodeCheck = useNestingAsAnchor ? undefined : isStMixinMarker;\n    mixinAst.walkRules((mixinRule: postcss.Rule) => {\n        if (isChildOfAtRule(mixinRule, 'keyframes')) {\n            return;\n        }\n        if (mixinRule.selector === anchorSelector && !mixinRoot) {\n            if (mixinRule.parent === mixinAst) {\n                mixinRoot = mixinRule;\n            } else {\n                const { selector } = scopeNestedSelector(\n                    parseSelectorWithCache(rule.selector),\n                    parseSelectorWithCache(mixinRule.selector),\n                    false,\n                    anchorNodeCheck\n                );\n                mixinRoot = 'NoRoot';\n                mixinRule.selector = selector;\n            }\n        } else if (!isChildOfMixinRoot(mixinRule, mixinRoot)) {\n            // scope to mixin target if not already scoped by parent\n            const { selector } = scopeNestedSelector(\n                parseSelectorWithCache(rule.selector),\n                parseSelectorWithCache(mixinRule.selector),\n                false,\n                anchorNodeCheck\n            );\n            mixinRule.selector = selector;\n        } else if (mixinRule.selector.includes(anchorSelector)) {\n            // report invalid nested mixin\n            mixinRule.selector = mixinRule.selector.split(anchorSelector).join('&');\n            report?.report(utilDiagnostics.INVALID_RECURSIVE_MIXIN(), {\n                node: rule,\n            });\n        }\n    });\n\n    if (mixinAst.nodes) {\n        let nextRule: postcss.Rule | postcss.AtRule = rule;\n        // TODO: handle rules before and after decl on entry\n        const inlineMixin = !hasNonDeclsBeforeDecl(mixinDecl);\n        const mixInto = inlineMixin ? rule : postcss.rule({ selector: '&' });\n        const mixIntoRule = (node: postcss.AnyNode) => {\n            // mix node into rule\n            if (inlineMixin) {\n                mixInto.insertBefore(mixinDecl, node);\n            } else {\n                // indent first level - doesn't change deep nested\n                node.raws.before = (node.raws.before || '') + '    ';\n                mixInto.append(node);\n            }\n            // mark following decls for nesting\n            if (!nestFollowingDecls && node.type !== 'decl' && hasAnyDeclsAfter(mixinDecl)) {\n                nestFollowingDecls = true;\n            }\n        };\n        let nestFollowingDecls = false;\n        mixinAst.nodes.slice().forEach((node) => {\n            if (node === mixinRoot) {\n                for (const nested of [...node.nodes]) {\n                    mixIntoRule(nested);\n                }\n            } else if (node.type === 'decl') {\n                // stand alone decl - most likely from js mixin\n                mixIntoRule(node);\n            } else if (node.type === 'rule' || node.type === 'atrule') {\n                const valid = !nestedInKeyframes;\n                if (valid) {\n                    if (rule.parent!.last === nextRule) {\n                        rule.parent!.append(node);\n                    } else {\n                        rule.parent!.insertAfter(nextRule, node);\n                    }\n                    nextRule = node;\n                } else {\n                    report?.report(utilDiagnostics.INVALID_MERGE_OF(node.toString()), {\n                        node: rule,\n                    });\n                }\n            }\n        });\n        // add nested mixin to rule body\n        if (mixInto !== rule && mixInto.nodes.length) {\n            mixinDecl.before(mixInto);\n        }\n        // nest following decls if needed\n        if (nestFollowingDecls) {\n            const nestFollowingDecls = postcss.rule({ selector: '&' });\n            while (mixinDecl.next()) {\n                const nextNode = mixinDecl.next()!;\n                nextNode.raws.before = (nextNode.raws.before || '') + '    ';\n                nestFollowingDecls.append(nextNode);\n            }\n            mixinDecl.after(nestFollowingDecls);\n        }\n    }\n\n    return rule;\n}\n\nfunction hasNonDeclsBeforeDecl(decl: postcss.Declaration) {\n    let current: postcss.AnyNode | undefined = decl.prev();\n    while (current) {\n        if (current.type !== 'decl' && current.type !== 'comment') {\n            return true;\n        }\n        current = current.prev();\n    }\n    return false;\n}\nfunction hasAnyDeclsAfter(decl: postcss.Declaration) {\n    let current: postcss.AnyNode | undefined = decl.next();\n    while (current) {\n        if (current.type === 'decl') {\n            return true;\n        }\n        current = current.prev();\n    }\n    return false;\n}\n\nconst isChildOfMixinRoot = (rule: postcss.Rule, mixinRoot: postcss.Rule | null | 'NoRoot') => {\n    let current: postcss.Container | postcss.Document | undefined = rule.parent;\n    while (current) {\n        if (current === mixinRoot) {\n            return true;\n        }\n        current = current.parent;\n    }\n    return false;\n};\n\nexport const sourcePathDiagnostics = {\n    MISSING_SOURCE_FILENAME: createDiagnosticReporter(\n        '17001',\n        'error',\n        () => 'missing source filename'\n    ),\n};\n\nexport function getSourcePath(root: postcss.Root, diagnostics: Diagnostics) {\n    const source = (root.source && root.source.input.file) || '';\n    if (!source) {\n        diagnostics.report(sourcePathDiagnostics.MISSING_SOURCE_FILENAME(), {\n            node: root,\n        });\n    } else if (!isAbsolute(source)) {\n        throw new Error('source filename is not absolute path: \"' + source + '\"');\n    }\n    return source;\n}\n\nexport function getAlias(symbol: StylableSymbol): ImportSymbol | undefined {\n    if (symbol._kind === 'class' || symbol._kind === 'element') {\n        if (!symbol[`-st-extends`]) {\n            return symbol.alias;\n        }\n    }\n\n    return undefined;\n}\n", "import {\n    parseCssSelector,\n    stringifySelectorAst,\n    walk,\n    SelectorNode,\n    PseudoClass,\n    Selector,\n    SelectorList,\n    FunctionalSelector,\n    Class,\n    Attribute,\n    Invalid,\n    ImmutableSelector,\n    ImmutableSelectorList,\n    ImmutableSelectorNode,\n    Combinator,\n} from '@tokey/css-selector-parser';\nimport cloneDeep from 'lodash.clonedeep';\n\nexport const parseSelector = parseCssSelector;\nexport const stringifySelector = stringifySelectorAst;\nexport const walkSelector = walk;\n\n/**\n * parse selectors and cache them\n */\nconst selectorAstCache = new Map<string, ImmutableSelectorList>();\nexport function parseSelectorWithCache(selector: string, options: { clone: true }): SelectorList;\nexport function parseSelectorWithCache(\n    selector: string,\n    options?: { clone?: false }\n): ImmutableSelectorList;\nexport function parseSelectorWithCache(\n    selector: string,\n    options: { clone?: boolean } = {}\n): ImmutableSelectorList {\n    if (!selectorAstCache.has(selector)) {\n        if (selectorAstCache.size > 10000) {\n            selectorAstCache.delete(selectorAstCache.keys().next().value);\n        }\n        selectorAstCache.set(selector, parseCssSelector(selector));\n    }\n    const cachedValue = selectorAstCache.get(selector);\n    return options.clone\n        ? (cloneDeep(cachedValue) as SelectorList)\n        : (cachedValue as ImmutableSelectorList);\n}\n\nexport function cloneSelector<T extends ImmutableSelector | ImmutableSelectorList>(s: T): T {\n    return cloneDeep(s);\n}\n\n/**\n * returns for each selector if it contains only\n * a single class or an element selector.\n */\nexport function isSimpleSelector(selector: string): {\n    isSimple: boolean;\n    type: 'class' | 'type' | 'complex';\n}[] {\n    const selectorList = parseSelectorWithCache(selector);\n    return selectorList.map((selector) => {\n        let foundType = ``;\n        walk(\n            selector,\n            (node) => {\n                if ((node.type !== `class` && node.type !== `type`) || foundType || node.nodes) {\n                    foundType = `complex`;\n                    return walk.stopAll;\n                }\n                foundType = node.type;\n                return;\n            },\n            { ignoreList: [`selector`, `comment`] }\n        );\n        if (foundType === `class` || foundType === `type`) {\n            return { type: foundType, isSimple: true };\n        } else {\n            return { type: `complex`, isSimple: false };\n        }\n    });\n}\n\n/**\n * take an ast node with nested nodes \"XXX(nest1,  nest2)\"\n * and convert it to a flat selector as node: \"nest1, nest2\"\n */\nexport function flattenFunctionalSelector(node: FunctionalSelector): Selector {\n    node.value = ``;\n    return convertToSelector(node);\n}\n\n/**\n * ast convertors\n */\nexport function convertToClass(node: SelectorNode): Class {\n    const castedNode = node as Class;\n    castedNode.type = `class`;\n    castedNode.dotComments = [];\n    return castedNode;\n}\nexport function convertToAttribute(node: SelectorNode): Attribute {\n    const castedNode = node as Attribute;\n    castedNode.type = `attribute`;\n    return castedNode;\n}\nexport function convertToInvalid(node: SelectorNode): Invalid {\n    const castedNode = node as Invalid;\n    castedNode.type = `invalid`;\n    return castedNode;\n}\nexport function convertToSelector(node: SelectorNode): Selector {\n    const castedNode = node as Selector;\n    castedNode.type = `selector`;\n    castedNode.before ||= ``;\n    castedNode.after ||= ``;\n    // ToDo: should this fix castedNode.end?\n    return castedNode;\n}\nexport function convertToPseudoClass(\n    node: SelectorNode,\n    name: string,\n    nestedSelectors?: SelectorList\n): PseudoClass {\n    const castedNode = node as PseudoClass;\n    castedNode.type = 'pseudo_class';\n    castedNode.value = name;\n    castedNode.colonComments = [];\n    if (nestedSelectors) {\n        castedNode.nodes = nestedSelectors;\n    } else {\n        delete castedNode.nodes;\n    }\n    return castedNode;\n}\n\nexport function createCombinatorSelector(partial: Partial<Combinator>): Combinator {\n    const type = partial.combinator || 'space';\n    return {\n        type: `combinator`,\n        combinator: type,\n        value: partial.value ?? (type === 'space' ? ` ` : type),\n        before: partial.before ?? ``,\n        after: partial.after ?? ``,\n        start: partial.start ?? 0,\n        end: partial.end ?? 0,\n        invalid: partial.invalid ?? false,\n    };\n}\n\nexport function isInPseudoClassContext(parents: ReadonlyArray<ImmutableSelectorNode>) {\n    for (const parent of parents) {\n        if (parent.type === `pseudo_class`) {\n            return true;\n        }\n    }\n    return false;\n}\n\nexport function matchTypeAndValue(\n    a: Partial<ImmutableSelectorNode>,\n    b: Partial<ImmutableSelectorNode>\n) {\n    return a.type === b.type && (a as any).value === (b as any).value;\n}\n\nexport function isCompRoot(name: string) {\n    return name.charAt(0).match(/[A-Z]/);\n}\n\nconst isNestedNode = (node: SelectorNode) => node.type === 'nesting';\n/**\n * combine 2 selector lists.\n * - add each scoping selector at the begging of each nested selector\n * - replace any nesting `&` nodes in the nested selector with the scoping selector nodes\n */\nexport function scopeNestedSelector(\n    scopeSelectorAst: ImmutableSelectorList,\n    nestedSelectorAst: ImmutableSelectorList,\n    rootScopeLevel = false,\n    isAnchor: (node: SelectorNode) => boolean = isNestedNode\n): { selector: string; ast: SelectorList } {\n    const resultSelectors: SelectorList = [];\n    nestedSelectorAst.forEach((targetAst) => {\n        scopeSelectorAst.forEach((scopeAst) => {\n            const outputAst = cloneDeep(targetAst) as Selector;\n\n            outputAst.before = scopeAst.before || outputAst.before;\n\n            let first = outputAst.nodes[0];\n            // search first actual first selector part\n            walkSelector(\n                outputAst,\n                (node) => {\n                    first = node;\n                    return walkSelector.stopAll;\n                },\n                { ignoreList: [`selector`] }\n            );\n            // merge scope flags\n            const nestStartWithNesting = first.type === `nesting`;\n            const nestedStartWithGlobal =\n                rootScopeLevel && first.type === `pseudo_class` && first.value === `global`;\n            const nestStartWithScope =\n                rootScopeLevel &&\n                scopeAst.nodes.every((node, i) => {\n                    return matchTypeAndValue(node, outputAst.nodes[i]);\n                });\n            let scopeAlreadyMerged = false;\n            // merge scope into selector\n            walkSelector(outputAst, (node, i, nodes) => {\n                if (isAnchor(node)) {\n                    scopeAlreadyMerged = true;\n                    nodes.splice(i, 1, {\n                        type: `selector`,\n                        nodes: cloneDeep(scopeAst.nodes as SelectorNode[]),\n                        start: node.start,\n                        end: node.end,\n                        after: ``,\n                        before: ``,\n                    });\n                }\n            });\n            // merge scope at the beginning of selector\n            if (\n                first &&\n                !nestStartWithNesting &&\n                !nestStartWithScope &&\n                !nestedStartWithGlobal &&\n                !scopeAlreadyMerged\n            ) {\n                outputAst.nodes.unshift(...cloneDeep(scopeAst.nodes as SelectorNode[]), {\n                    type: `combinator`,\n                    combinator: `space`,\n                    value: ` `,\n                    before: ``,\n                    after: ``,\n                    start: first.start,\n                    end: first.start,\n                    invalid: false,\n                });\n            }\n\n            resultSelectors.push(outputAst);\n        });\n    });\n\n    return {\n        selector: stringifySelector(resultSelectors),\n        ast: resultSelectors,\n    };\n}\n", "import {\n    parseSelectorWithCache,\n    stringifySelector,\n    scopeNestedSelector,\n    walkSelector,\n    convertToSelector,\n    matchTypeAndValue,\n    isSimpleSelector,\n} from './selector';\nimport {\n    Selector,\n    ImmutableSelectorNode,\n    groupCompoundSelectors,\n    SelectorList,\n    SelectorNode,\n} from '@tokey/css-selector-parser';\nimport * as postcss from 'postcss';\nimport { transformInlineCustomSelectors } from './custom-selector';\n\nexport function isChildOfAtRule(rule: postcss.Container, atRuleName: string) {\n    let currentParent = rule.parent;\n    while (currentParent) {\n        if (\n            currentParent.type === 'atrule' &&\n            (currentParent as postcss.AtRule).name === atRuleName\n        ) {\n            return true;\n        }\n        currentParent = currentParent.parent;\n    }\n    return false;\n}\n\nexport function isInConditionalGroup(node: postcss.Rule | postcss.AtRule, includeRoot = true) {\n    // https://www.w3.org/TR/css-conditional-3/#contents-of\n    const parent = node.parent as any;\n    return (\n        parent &&\n        ((includeRoot && parent.type === `root`) ||\n            (parent.type === `atrule` && (parent.name === `media` || parent.name === `supports`)))\n    );\n}\n\nexport function createSubsetAst<T extends postcss.Root | postcss.AtRule | postcss.Rule>(\n    root: postcss.Root | postcss.AtRule | postcss.Rule,\n    selectorPrefix: string,\n    mixinTarget?: T,\n    isRoot = false,\n    getCustomSelector?: (name: string) => SelectorList | undefined,\n    isNestedInMixin = false\n): T {\n    // keyframes on class mixin?\n    const prefixSelectorList = parseSelectorWithCache(selectorPrefix);\n    const prefixType = prefixSelectorList[0].nodes[0];\n    const containsPrefix = containsMatchInFirstChunk.bind(null, prefixType);\n    const mixinRoot = mixinTarget ? mixinTarget : postcss.root();\n    root.nodes?.forEach((node) => {\n        if (node.type === 'decl') {\n            mixinTarget?.append(node.clone());\n        } else if (\n            node.type === `rule` &&\n            (node.selector === ':vars' || node.selector === ':import')\n        ) {\n            // nodes that don't mix\n            return;\n        } else if (node.type === `rule`) {\n            const selectorAst = parseSelectorWithCache(node.selector, { clone: true });\n            let ast = isRoot\n                ? scopeNestedSelector(prefixSelectorList, selectorAst, true).ast\n                : selectorAst;\n            if (getCustomSelector) {\n                ast = transformInlineCustomSelectors(ast, getCustomSelector, () => {\n                    /*don't report*/\n                });\n            }\n            const matchesSelectors =\n                isRoot || isNestedInMixin ? ast : ast.filter((node) => containsPrefix(node));\n\n            if (matchesSelectors.length) {\n                const selector = stringifySelector(\n                    matchesSelectors.map((selectorNode) => {\n                        if (!isRoot) {\n                            selectorNode = fixChunkOrdering(selectorNode, prefixType);\n                        }\n                        replaceTargetWithMixinAnchor(selectorNode, prefixType);\n                        return selectorNode;\n                    })\n                );\n\n                const clonedRule = createSubsetAst(\n                    node,\n                    selectorPrefix,\n                    node.clone({ selector, nodes: [] }),\n                    isRoot,\n                    getCustomSelector,\n                    true /*isNestedInMixin*/\n                );\n                mixinRoot.append(clonedRule);\n            }\n        } else if (node.type === `atrule`) {\n            if (\n                node.name === 'media' ||\n                node.name === 'supports' ||\n                node.name === 'st-scope' ||\n                node.name === 'layer' ||\n                node.name === 'container'\n            ) {\n                let scopeSelector = node.name === 'st-scope' ? node.params : '';\n                let atruleHasMixin = isNestedInMixin || false;\n                if (scopeSelector) {\n                    const ast = parseSelectorWithCache(scopeSelector, { clone: true });\n                    const matchesSelectors = isRoot\n                        ? ast\n                        : ast.filter((node) => containsPrefix(node));\n                    if (matchesSelectors.length) {\n                        atruleHasMixin = true;\n                        scopeSelector = stringifySelector(\n                            matchesSelectors.map((selectorNode) => {\n                                if (!isRoot) {\n                                    selectorNode = fixChunkOrdering(selectorNode, prefixType);\n                                }\n                                replaceTargetWithMixinAnchor(selectorNode, prefixType);\n                                return selectorNode;\n                            })\n                        );\n                    }\n                }\n                const atRuleSubset = createSubsetAst(\n                    node,\n                    selectorPrefix,\n                    postcss.atRule({\n                        params: scopeSelector || node.params,\n                        name: node.name,\n                    }),\n                    isRoot,\n                    getCustomSelector,\n                    atruleHasMixin\n                );\n                if (atRuleSubset.nodes) {\n                    mixinRoot.append(atRuleSubset);\n                }\n            } else if (isRoot) {\n                mixinRoot.append(node.clone());\n            }\n        } else {\n            // TODO: add warn?\n        }\n    });\n\n    return mixinRoot as T;\n}\n\nexport const stMixinMarker = 'st-mixin-marker';\nexport const isStMixinMarker = (node: SelectorNode) =>\n    node.type === 'attribute' && node.value === stMixinMarker;\nfunction replaceTargetWithMixinAnchor(selectorNode: Selector, prefixType: ImmutableSelectorNode) {\n    walkSelector(selectorNode, (node) => {\n        if (matchTypeAndValue(node, prefixType)) {\n            convertToSelector(node).nodes = [\n                {\n                    type: `attribute`,\n                    value: stMixinMarker,\n                    start: node.start,\n                    end: node.end,\n                },\n            ];\n        }\n    });\n}\n\nfunction fixChunkOrdering(selectorNode: Selector, prefixType: ImmutableSelectorNode) {\n    const compound = groupCompoundSelectors(selectorNode, {\n        deep: true,\n        splitPseudoElements: false,\n    });\n    walkSelector(compound, (node) => {\n        if (node.type === `compound_selector`) {\n            const simpleNodes = node.nodes;\n            for (let i = 1; i < simpleNodes.length; i++) {\n                const childNode = simpleNodes[i];\n                if (matchTypeAndValue(childNode, prefixType)) {\n                    const chunk = simpleNodes.splice(i, simpleNodes.length - i);\n                    simpleNodes.unshift(...chunk);\n                    break;\n                }\n            }\n        }\n    });\n    return compound;\n}\n\nfunction containsMatchInFirstChunk(\n    prefixType: ImmutableSelectorNode,\n    selectorNode: ImmutableSelectorNode\n) {\n    let isMatch = false;\n    walkSelector(selectorNode, (node) => {\n        if (node.type === `combinator`) {\n            return walkSelector.stopAll;\n        } else if (node.type === 'pseudo_class') {\n            // handle nested match :is(.mix)\n            if (node.nodes) {\n                for (const innerSelectorNode of node.nodes) {\n                    if (containsMatchInFirstChunk(prefixType, innerSelectorNode)) {\n                        isMatch = true;\n                    }\n                }\n            }\n            return walkSelector.skipNested;\n        } else if (matchTypeAndValue(node, prefixType)) {\n            isMatch = true;\n            return walkSelector.stopAll;\n        }\n        return;\n    });\n    return isMatch;\n}\n\n/** @deprecated internal for transformer  */\nexport function findRule(\n    root: postcss.Root,\n    selector: string,\n    test: any = (statement: any) => statement.prop === `-st-extends`\n): null | postcss.Declaration {\n    let found: any = null;\n    root.walkRules(selector, (rule) => {\n        const declarationIndex = rule.nodes ? rule.nodes.findIndex(test) : -1;\n        const isSimplePerSelector = isSimpleSelector(rule.selector);\n        // This will assume that a selector that contains .a, .b:hover is simple! (for backward compatibility)\n        const isSimple = isSimplePerSelector.reduce((acc, { isSimple }) => {\n            return !isSimple ? false : acc;\n        }, true);\n        if (isSimple && !!~declarationIndex) {\n            found = rule.nodes[declarationIndex];\n        }\n    });\n    return found;\n}\n", "import {\n    PseudoClass,\n    Selector,\n    SelectorList,\n    walk,\n    SelectorNode,\n    parseCssSelector,\n} from '@tokey/css-selector-parser';\nimport cloneDeep from 'lodash.clonedeep';\n\nexport type CustomSelectorMap = Record<string, SelectorList>;\ntype InsertionIter = (progress: boolean) => boolean;\ntype UnknownReport = { type: 'unknown'; origin: string; unknown: string };\ntype CircularReport = { type: 'circular'; path: readonly string[] };\nexport type TransformCustomSelectorReport = UnknownReport | CircularReport;\n\nexport function transformInlineCustomSelectorMap(\n    customSelectors: CustomSelectorMap,\n    report: (data: TransformCustomSelectorReport) => void\n) {\n    const result: CustomSelectorMap = {};\n    const link = (name: string, path: string[]) => {\n        const ast = customSelectors[name];\n        if (!ast) {\n            return;\n        }\n        result[name] = transformInlineCustomSelectors(\n            ast,\n            (nestedName) => {\n                const selector = `:--${nestedName}`;\n                if (path.includes(selector)) {\n                    // loop!: report & preserve source selector\n                    report({ type: 'circular', path });\n                    return parseCssSelector(selector);\n                }\n                if (!result[nestedName]) {\n                    link(nestedName, [...path, selector]);\n                }\n                return result[nestedName];\n            },\n            ({ type, unknown }) => report({ type, origin: name, unknown })\n        );\n    };\n    for (const name of Object.keys(customSelectors)) {\n        link(name, [`:--${name}`]);\n    }\n    return result;\n}\n\nfunction isCustomSelectorNode(node: SelectorNode): node is PseudoClass {\n    return node.type === 'pseudo_class' && node.value.startsWith('--');\n}\n\n/**\n * Takes a list of selectors and a function that returns a selector\n * against a custom selector name.\n *\n * Then search for inline custom selectors (e.g. \":--custom\") and\n * replaces them with the retrieved selectors it receives\n */\nexport function transformInlineCustomSelectors(\n    inputSelectors: SelectorList,\n    getCustomSelector: (name: string) => SelectorList | undefined,\n    report: (data: UnknownReport) => void\n): SelectorList {\n    const result: SelectorList = [];\n    for (const selector of inputSelectors) {\n        result.push(...transformInlineCustomSelector(selector, getCustomSelector, report));\n    }\n    return result;\n}\n\nfunction transformInlineCustomSelector(\n    inputSelector: Selector,\n    getCustomSelector: (name: string) => SelectorList | undefined,\n    report: (data: UnknownReport) => void\n): SelectorList {\n    const insertions: InsertionIter[] = [];\n    // get insertion points\n    walk(inputSelector, (node, index, _nodes, parents) => {\n        if (isCustomSelectorNode(node)) {\n            const name = node.value.slice(2);\n            const targetSelectors = getCustomSelector(name);\n            if (!targetSelectors) {\n                report({ type: 'unknown', origin: '', unknown: name });\n            } else if (targetSelectors.length !== 0) {\n                const parent = parents[parents.length - 1];\n                if (parent && 'nodes' in parent && parent.nodes) {\n                    let selectorIndex = 0;\n                    insertions.push((progress) => {\n                        if (progress) {\n                            selectorIndex++;\n                        }\n                        const overflow = selectorIndex === targetSelectors.length;\n                        if (overflow) {\n                            selectorIndex = 0;\n                        }\n                        const currentSelector = targetSelectors[selectorIndex];\n                        currentSelector.before = currentSelector.after = '';\n                        parent.nodes![index] = currentSelector;\n                        return overflow;\n                    });\n                }\n            }\n        }\n    });\n    // permute selectors\n    const output: SelectorList = [];\n    if (insertions.length) {\n        // save first permutation\n        insertions.forEach((updateSelector) => updateSelector(false));\n        output.push(cloneDeep(inputSelector));\n        // collect rest of permutations\n        let run = true;\n        while (run) {\n            let progressIdx = 0;\n            for (let i = 0; i < insertions.length; ++i) {\n                const updateSelector = insertions[i];\n                const moveToNext = i === progressIdx;\n                const overflow = updateSelector(moveToNext);\n                if (overflow) {\n                    if (progressIdx < insertions.length - 1) {\n                        // advance next insertion point\n                        progressIdx++;\n                    } else {\n                        // finish run over all permutations\n                        run = false;\n                        return output;\n                    }\n                } else {\n                    // no need to update any farther this round\n                    break;\n                }\n            }\n            output.push(cloneDeep(inputSelector));\n        }\n    }\n    return [inputSelector];\n}\n", "import { FeatureContext, createFeature } from './feature';\nimport type { ImportSymbol } from './st-import';\nimport type { VarSymbol } from './st-var';\nimport type { ClassSymbol } from './css-class';\nimport type { ElementSymbol } from './css-type';\nimport type { CSSVarSymbol } from './css-custom-property';\nimport type { KeyframesSymbol } from './css-keyframes';\nimport type { LayerSymbol } from './css-layer';\nimport type { ContainerSymbol } from './css-contains';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport type { StylableMeta } from '../stylable-meta';\nimport type * as postcss from 'postcss';\nimport { createDiagnosticReporter } from '../diagnostics';\n\n// SYMBOLS DEFINITION\n\n// union of all of the symbols\nexport type StylableSymbol =\n    | ImportSymbol\n    | VarSymbol\n    | ClassSymbol\n    | ElementSymbol\n    | CSSVarSymbol\n    | KeyframesSymbol\n    | LayerSymbol\n    | ContainerSymbol;\n// the namespace that each symbol exists on\nconst NAMESPACES = {\n    import: `main`,\n    class: `main`,\n    cssVar: `main`,\n    element: `main`,\n    keyframes: `keyframes`,\n    layer: `layer`,\n    container: `container`,\n    var: `main`,\n} as const;\nexport const readableTypeMap: Record<StylableSymbol['_kind'], string> = {\n    class: 'css class',\n    element: 'css element type',\n    cssVar: 'css custom property',\n    import: 'stylable imported symbol',\n    keyframes: 'css keyframes',\n    layer: 'css layer',\n    container: 'css container name',\n    var: 'stylable var',\n};\n// state structure\nfunction createState(clone?: State): State {\n    return {\n        byNS: {\n            main: clone ? [...clone.byNS.main] : [],\n            keyframes: clone ? [...clone.byNS.keyframes] : [],\n            layer: clone ? [...clone.byNS.layer] : [],\n            container: clone ? [...clone.byNS.container] : [],\n        },\n        byNSFlat: {\n            main: clone ? { ...clone.byNSFlat.main } : {},\n            keyframes: clone ? { ...clone.byNSFlat.keyframes } : {},\n            layer: clone ? { ...clone.byNSFlat.layer } : {},\n            container: clone ? { ...clone.byNSFlat.container } : {},\n        },\n        byType: {\n            import: clone ? { ...clone.byType.import } : {},\n            class: clone ? { ...clone.byType.class } : {},\n            cssVar: clone ? { ...clone.byType.cssVar } : {},\n            element: clone ? { ...clone.byType.element } : {},\n            keyframes: clone ? { ...clone.byType.keyframes } : {},\n            layer: clone ? { ...clone.byType.layer } : {},\n            container: clone ? { ...clone.byType.container } : {},\n            var: clone ? { ...clone.byType.var } : {},\n        },\n        symbolToAst: new WeakMap(),\n    };\n}\n\n// internal types\ntype SymbolTypes = StylableSymbol['_kind'];\ntype filterSymbols<T extends SymbolTypes> = Extract<StylableSymbol, { _kind: T }>;\ntype SymbolMap = {\n    [K in SymbolTypes]: filterSymbols<K>;\n};\ntype SymbolTypeToNamespace = typeof NAMESPACES;\ntype FilterByNamespace<NS extends Namespaces, T extends SymbolTypes = SymbolTypes> = T extends any\n    ? SymbolTypeToNamespace[T] extends NS\n        ? T\n        : never\n    : never;\ntype NamespaceToSymbolType = {\n    [NS in SymbolTypeToNamespace[SymbolTypes]]: FilterByNamespace<NS>;\n};\nexport type Namespaces = keyof NamespaceToSymbolType;\nexport type SymbolByNamespace<NS extends Namespaces> = Extract<\n    StylableSymbol,\n    {\n        _kind: NamespaceToSymbolType[NS];\n    }\n>;\ninterface SymbolDeclaration<NS = Namespaces> {\n    name: string;\n    symbol: filterSymbols<\n        SymbolTypes extends any ? (Namespaces extends NS ? SymbolTypes : any) : any\n    >;\n    ast: postcss.Node | undefined;\n    safeRedeclare: boolean;\n}\ninterface State {\n    byNS: {\n        [NS in Namespaces]: SymbolDeclaration<NS>[];\n    };\n    byNSFlat: {\n        [NS in Namespaces]: Record<string, filterSymbols<NamespaceToSymbolType[NS]>>;\n    };\n    byType: {\n        [T in keyof SymbolMap]: Record<string, SymbolMap[T]>;\n    };\n    symbolToAst: WeakMap<StylableSymbol, postcss.Node>;\n}\n\nconst dataKey = plugableRecord.key<State>('mappedSymbols');\n\nexport const diagnostics = {\n    REDECLARE_SYMBOL: createDiagnosticReporter(\n        '06001',\n        'warning',\n        (name: string) => `redeclare symbol \"${name}\"`\n    ),\n    REDECLARE_ROOT: createDiagnosticReporter(\n        '06002',\n        'error',\n        () => `root is used for the stylesheet and cannot be overridden`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, createState());\n    },\n});\n\n// API\nexport function get<T extends keyof SymbolMap>(meta: StylableMeta, name: string, type?: T) {\n    const { byNSFlat, byType } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return (type ? byType[type][name] : byNSFlat['main'][name]) as filterSymbols<T> | undefined;\n}\n\nexport function getAll<NS extends keyof NamespaceToSymbolType = `main`>(\n    meta: StylableMeta,\n    ns?: NS\n) {\n    const { byNSFlat } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return byNSFlat[ns || `main`] as State['byNSFlat'][NS];\n}\n\nexport function getAllByType<T extends SymbolTypes>(\n    meta: StylableMeta,\n    type: T\n): State['byType'][T] {\n    const { byType } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return byType[type];\n}\n\nexport function addSymbol({\n    context,\n    symbol,\n    node,\n    safeRedeclare = false,\n    localName,\n}: {\n    context: FeatureContext;\n    symbol: StylableSymbol;\n    node?: postcss.Node;\n    safeRedeclare?: boolean;\n    localName?: string;\n}) {\n    const { byNS, byNSFlat, byType, symbolToAst } = plugableRecord.getUnsafe(\n        context.meta.data,\n        dataKey\n    );\n    const name = localName || symbol.name;\n    const typeTable = byType[symbol._kind];\n    const nsName = NAMESPACES[symbol._kind];\n    if (node && name === `root` && nsName === `main` && byNSFlat[nsName][name]) {\n        context.diagnostics.report(diagnostics.REDECLARE_ROOT(), {\n            node,\n            word: `root`,\n        });\n        return;\n    }\n    byNS[nsName].push({ name, symbol, ast: node, safeRedeclare });\n    byNSFlat[nsName][name] = symbol;\n    typeTable[name] = symbol;\n    node && symbolToAst.set(symbol, node);\n    return symbol;\n}\n\nexport function getSymbolAstNode(\n    meta: StylableMeta,\n    symbol: StylableSymbol\n): postcss.Node | undefined {\n    const { symbolToAst } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return symbolToAst.get(symbol);\n}\n\nexport function reportRedeclare(context: FeatureContext) {\n    const { byNS } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    for (const symbols of Object.values(byNS)) {\n        const flat: Record<string, SymbolDeclaration[]> = {};\n        const collisions: Set<string> = new Set();\n        for (const symbolDecl of symbols) {\n            const { name, safeRedeclare } = symbolDecl;\n            flat[name] = flat[name] || [];\n            if (!safeRedeclare && flat[name].length) {\n                collisions.add(name);\n            }\n            flat[name].push(symbolDecl);\n        }\n        for (const name of collisions) {\n            for (const { safeRedeclare, ast } of flat[name]) {\n                if (!safeRedeclare && ast) {\n                    context.diagnostics.report(diagnostics.REDECLARE_SYMBOL(name), {\n                        node: ast,\n                        word: name,\n                    });\n                }\n            }\n        }\n    }\n}\n", "import type { StylableMeta } from '../stylable-meta';\nimport type {\n    InferredSelector,\n    ScopeContext,\n    StylableExports,\n    StylableTransformer,\n} from '../stylable-transformer';\nimport type { StylableResolver, MetaResolvedSymbols } from '../stylable-resolver';\nimport type { StylableEvaluator, EvalValueData } from '../functions';\nimport type * as postcss from 'postcss';\nimport type { ImmutableSelectorNode } from '@tokey/css-selector-parser';\nimport type { Diagnostics } from '../diagnostics';\nimport type { ParsedValue } from '../types';\n\nexport interface FeatureFlags {\n    strictCustomProperty: boolean;\n}\nexport const defaultFeatureFlags: FeatureFlags = {\n    strictCustomProperty: false,\n};\n\nexport type SelectorNodeContext = [\n    index: number,\n    nodes: ImmutableSelectorNode[],\n    parents: ImmutableSelectorNode[]\n];\n\nexport interface FeatureContext {\n    meta: StylableMeta;\n    diagnostics: Diagnostics;\n}\nexport interface FeatureTransformContext extends FeatureContext {\n    resolver: StylableResolver;\n    evaluator: StylableEvaluator;\n    getResolvedSymbols: (meta: StylableMeta) => MetaResolvedSymbols;\n    passedThrough?: string[];\n    inferredSelectorMixin?: InferredSelector;\n}\n\nexport interface NodeTypes {\n    SELECTOR?: any;\n    IMMUTABLE_SELECTOR?: any;\n    RESOLVED?: any;\n}\n\ntype SelectorWalkReturn = number | undefined | void;\n\nexport interface FeatureHooks<T extends NodeTypes = NodeTypes> {\n    metaInit: (context: FeatureContext) => void;\n    analyzeInit: (context: FeatureContext) => void;\n    analyzeAtRule: (options: {\n        context: FeatureContext;\n        atRule: postcss.AtRule;\n        analyzeRule: (\n            rule: postcss.Rule,\n            options: { isScoped: boolean; originalNode: postcss.AtRule | postcss.Rule }\n        ) => boolean;\n    }) => void;\n    analyzeSelectorNode: (options: {\n        context: FeatureContext;\n        node: T['IMMUTABLE_SELECTOR'];\n        topSelectorIndex: number;\n        rule: postcss.Rule;\n        originalNode: postcss.AtRule | postcss.Rule; // used by rules generated from at-rules\n        walkContext: SelectorNodeContext;\n    }) => SelectorWalkReturn;\n    analyzeSelectorDone: (options: {\n        context: FeatureContext;\n        rule: postcss.Rule;\n        originalNode: postcss.AtRule | postcss.Rule; // used by rules generated from at-rules\n    }) => SelectorWalkReturn;\n    analyzeDeclaration: (options: { context: FeatureContext; decl: postcss.Declaration }) => void;\n    analyzeDone: (context: FeatureContext) => void;\n    prepareAST: (options: {\n        context: FeatureTransformContext;\n        node: postcss.ChildNode;\n        toRemove: Array<postcss.Node | (() => void)>;\n    }) => void;\n    transformInit: (options: { context: FeatureTransformContext }) => void;\n    transformResolve: (options: { context: FeatureTransformContext }) => T['RESOLVED'];\n    transformAtRuleNode: (options: {\n        context: FeatureTransformContext;\n        atRule: postcss.AtRule;\n        resolved: T['RESOLVED'];\n        // ToDo: move to FeatureTransformContext\n        transformer: StylableTransformer;\n    }) => void;\n    transformSelectorNode: (options: {\n        context: FeatureTransformContext;\n        node: T['SELECTOR'];\n        selectorContext: Required<ScopeContext>;\n    }) => boolean | void;\n    transformDeclaration: (options: {\n        context: FeatureTransformContext;\n        decl: postcss.Declaration;\n        resolved: T['RESOLVED'];\n    }) => void;\n    transformValue: (options: {\n        context: FeatureTransformContext;\n        node: ParsedValue;\n        data: EvalValueData;\n    }) => void;\n    transformJSExports: (options: { exports: StylableExports; resolved: T['RESOLVED'] }) => void;\n    transformLastPass: (options: {\n        context: FeatureTransformContext;\n        ast: postcss.Root;\n        transformer: StylableTransformer;\n        path: string[];\n    }) => void;\n}\nconst defaultHooks: FeatureHooks<NodeTypes> = {\n    metaInit() {\n        /**/\n    },\n    analyzeInit() {\n        /**/\n    },\n    analyzeAtRule() {\n        /**/\n    },\n    analyzeSelectorNode() {\n        /**/\n    },\n    analyzeSelectorDone() {\n        /**/\n    },\n    analyzeDeclaration() {\n        /**/\n    },\n    analyzeDone() {\n        /**/\n    },\n    prepareAST() {\n        /**/\n    },\n    transformInit() {\n        /**/\n    },\n    transformResolve() {\n        return {};\n    },\n    transformAtRuleNode() {\n        /**/\n    },\n    transformSelectorNode() {\n        /**/\n    },\n    transformDeclaration() {\n        /**/\n    },\n    transformValue() {\n        /**/\n    },\n    transformJSExports() {\n        /**/\n    },\n    transformLastPass() {\n        /**/\n    },\n};\nexport function createFeature<T extends NodeTypes>(\n    hooks: Partial<FeatureHooks<T>>\n): FeatureHooks<T> {\n    return {\n        ...defaultHooks,\n        ...hooks,\n    };\n}\n", "const type = Symbol();\n\nexport type PlugableRecord = Record<Key, unknown>;\nexport type Key<T = unknown> = symbol & { [type]: T };\nexport type Val<K extends Key> = K[typeof type];\n\nexport const plugableRecord = {\n    key<T>(desc: string) {\n        return Symbol(desc) as Key<T>;\n    },\n    set<K extends Key>(map: PlugableRecord, key: K, value: Val<K>) {\n        map[key] = value;\n    },\n    get<K extends Key>(map: PlugableRecord, key: K): Val<K> | undefined {\n        return map[key];\n    },\n    getAssure<K extends Key>(map: PlugableRecord, key: K): Val<K> {\n        if (!map[key]) {\n            throw new Error(`key ${key.description} is missing on map`);\n        }\n        return map[key];\n    },\n    getUnsafe<K extends Key>(map: PlugableRecord, key: K): Val<K> {\n        return map[key];\n    },\n};\n", "import { createFeature, FeatureContext, FeatureTransformContext } from './feature';\nimport { generalDiagnostics } from './diagnostics';\nimport * as STSymbol from './st-symbol';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport {\n    parseStImport,\n    parsePseudoImport,\n    parseImportMessages,\n    tryCollectImportsDeep,\n} from '../helpers/import';\nimport { validateCustomPropertyName } from '../helpers/css-custom-property';\nimport type { StylableMeta } from '../stylable-meta';\nimport path from 'path';\nimport type { ImmutablePseudoClass, PseudoClass } from '@tokey/css-selector-parser';\nimport type * as postcss from 'postcss';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport type { Stylable } from '../stylable';\nimport type { CachedModuleEntity } from '../stylable-resolver';\n\nexport interface ImportSymbol {\n    _kind: 'import';\n    type: 'named' | 'default';\n    name: string;\n    import: Imported;\n    context: string;\n}\n\nexport interface AnalyzedImport {\n    from: string;\n    default: string;\n    named: Record<string, string>;\n    typed: {\n        keyframes: Record<string, string>;\n    };\n}\n\nexport interface Imported {\n    from: string;\n    defaultExport: string;\n    named: Record<string, string>;\n    /**@deprecated use imported.typed.keyframes (remove in stylable 5) */\n    keyframes: Record<string, string>;\n    typed: Record<string, Record<string, string>>;\n    rule: postcss.Rule | postcss.AtRule;\n    request: string;\n    context: string;\n}\n\nexport const PseudoImport = `:import`;\nexport const PseudoImportDecl = {\n    DEFAULT: `-st-default`,\n    NAMED: `-st-named`,\n    FROM: `-st-from`,\n} as const;\n\n/**\n * ImportTypeHook is used as a way to cast imported symbols before resolving their actual type.\n * currently used only for `keyframes` as they are completely on a separate namespace from other symbols.\n *\n * Hooks are registered statically since the features are static and cannot be selected/disabled.\n * If the system will ever change to support picking features dynamically, this mechanism would\n * have to move into the `metaInit` hook.\n */\nexport const ImportTypeHook = new Map<\n    string,\n    (context: FeatureContext, localName: string, importName: string, importDef: Imported) => void\n>();\n\nconst dataKey = plugableRecord.key<Imported[]>('imports');\n\nexport const diagnostics = {\n    ...parseImportMessages,\n    FORBIDDEN_DEF_IN_COMPLEX_SELECTOR: generalDiagnostics.FORBIDDEN_DEF_IN_COMPLEX_SELECTOR,\n    NO_ST_IMPORT_IN_NESTED_SCOPE: createDiagnosticReporter(\n        '05011',\n        'error',\n        () => `cannot use \"@st-import\" inside of nested scope`\n    ),\n    NO_PSEUDO_IMPORT_IN_NESTED_SCOPE: createDiagnosticReporter(\n        '05012',\n        'error',\n        () => `cannot use \":import\" inside of nested scope`\n    ),\n    INVALID_CUSTOM_PROPERTY_AS_VALUE: createDiagnosticReporter(\n        '05013',\n        'error',\n        (name: string, as: string) =>\n            `invalid alias for custom property \"${name}\" as \"${as}\"; custom properties must be prefixed with \"--\" (double-dash)`\n    ),\n    UNKNOWN_IMPORTED_SYMBOL: createDiagnosticReporter(\n        '05015',\n        'error',\n        (name: string, path: string) =>\n            `cannot resolve imported symbol \"${name}\" from stylesheet \"${path}\"`\n    ),\n    UNKNOWN_IMPORTED_FILE: createDiagnosticReporter(\n        '05016',\n        'error',\n        (path: string, error?: unknown) =>\n            `cannot resolve imported file: \"${path}\"${error ? `\\nFailed with:\\n${error}` : ''}`\n    ),\n    UNKNOWN_TYPED_IMPORT: createDiagnosticReporter(\n        '05018',\n        'error',\n        (type: string) => `Unknown type import \"${type}\"`\n    ),\n    NO_DEFAULT_EXPORT: createDiagnosticReporter(\n        '05020',\n        'error',\n        (path: string) => `Native CSS files have no default export. Imported file: \"${path}\"`\n    ),\n    UNSUPPORTED_NATIVE_IMPORT: createDiagnosticReporter(\n        '05021',\n        'warning',\n        () => `Unsupported @import within imported native CSS file`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature<{\n    SELECTOR: PseudoClass;\n    IMMUTABLE_SELECTOR: ImmutablePseudoClass;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, []);\n    },\n    analyzeInit(context) {\n        const imports = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        const dirContext = path.dirname(context.meta.source);\n        // collect shallow imports\n        for (const node of context.meta.sourceAst.nodes) {\n            if (!isImportStatement(node)) {\n                continue;\n            }\n            const parsedImport =\n                node.type === `atrule`\n                    ? parseStImport(node, dirContext, context.diagnostics)\n                    : parsePseudoImport(node, dirContext, context.diagnostics);\n            imports.push(parsedImport);\n            addImportSymbols(parsedImport, context, dirContext);\n        }\n    },\n    analyzeAtRule({ context, atRule }) {\n        if (atRule.name === `st-import` && atRule.parent?.type !== `root`) {\n            context.diagnostics.report(diagnostics.NO_ST_IMPORT_IN_NESTED_SCOPE(), {\n                node: atRule,\n            });\n        } else if (atRule.name === `import` && context.meta.type === 'css') {\n            context.diagnostics.report(diagnostics.UNSUPPORTED_NATIVE_IMPORT(), {\n                node: atRule,\n            });\n        }\n    },\n    analyzeSelectorNode({ context, rule, node }) {\n        if (node.value !== `import`) {\n            return;\n        }\n        if (rule.selector !== `:import`) {\n            context.diagnostics.report(\n                diagnostics.FORBIDDEN_DEF_IN_COMPLEX_SELECTOR(PseudoImport),\n                { node: rule }\n            );\n            return;\n        }\n        if (rule.parent?.type !== `root`) {\n            context.diagnostics.report(diagnostics.NO_PSEUDO_IMPORT_IN_NESTED_SCOPE(), {\n                node: rule,\n            });\n        }\n    },\n    prepareAST({ node, toRemove }) {\n        if (isImportStatement(node)) {\n            toRemove.push(node);\n        }\n    },\n    transformInit({ context }) {\n        validateImports(context);\n        calcCssDepth(context);\n    },\n});\n\n// API\n\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n    public analyze(meta: StylableMeta): AnalyzedImport[] {\n        return getImportStatements(meta).map(({ request, defaultExport, named, keyframes }) => ({\n            from: request,\n            default: defaultExport,\n            named,\n            typed: {\n                keyframes,\n            },\n        }));\n    }\n}\n\nfunction calcCssDepth(context: FeatureTransformContext) {\n    let cssDepth = 1;\n    const deepDependencies = tryCollectImportsDeep(\n        context.resolver,\n        context.meta,\n        new Set(),\n        ({ depth, request }) => {\n            if (request.endsWith('.css')) {\n                cssDepth = Math.max(cssDepth, depth);\n            }\n        },\n        2\n    );\n    context.meta.transformCssDepth = { cssDepth, deepDependencies };\n}\n\nfunction isImportStatement(node: postcss.ChildNode): node is postcss.Rule | postcss.AtRule {\n    return (\n        (node.type === `atrule` && node.name === `st-import`) ||\n        (node.type === `rule` && node.selector === `:import`)\n    );\n}\n\nexport function getImportStatements({ data }: StylableMeta): ReadonlyArray<Imported> {\n    const state = plugableRecord.getUnsafe(data, dataKey);\n    return state;\n}\n\nexport function createImportSymbol(\n    importDef: Imported,\n    type: `default` | `named`,\n    name: string,\n    dirContext: string\n): ImportSymbol {\n    return {\n        _kind: 'import',\n        type: type === 'default' ? `default` : `named`,\n        name: type === `default` ? name : importDef.named[name],\n        import: importDef,\n        context: dirContext,\n    };\n}\n\n// internal\n\nfunction addImportSymbols(importDef: Imported, context: FeatureContext, dirContext: string) {\n    checkForInvalidAsUsage(importDef, context);\n    if (importDef.defaultExport) {\n        STSymbol.addSymbol({\n            context,\n            localName: importDef.defaultExport,\n            symbol: createImportSymbol(importDef, `default`, `default`, dirContext),\n            node: importDef.rule,\n        });\n    }\n    Object.keys(importDef.named).forEach((name) => {\n        STSymbol.addSymbol({\n            context,\n            localName: name,\n            symbol: createImportSymbol(importDef, `named`, name, dirContext),\n            node: importDef.rule,\n        });\n    });\n    // import as typed symbol\n    for (const [type, imports] of Object.entries(importDef.typed)) {\n        const handler = ImportTypeHook.get(type);\n        if (handler) {\n            for (const [localName, importName] of Object.entries(imports)) {\n                handler(context, localName, importName, importDef);\n            }\n        } else {\n            context.diagnostics.report(diagnostics.UNKNOWN_TYPED_IMPORT(type), {\n                node: importDef.rule,\n                word: type,\n            });\n        }\n    }\n}\n\nfunction checkForInvalidAsUsage(importDef: Imported, context: FeatureContext) {\n    for (const [local, imported] of Object.entries(importDef.named)) {\n        if (validateCustomPropertyName(imported) && !validateCustomPropertyName(local)) {\n            context.diagnostics.report(\n                diagnostics.INVALID_CUSTOM_PROPERTY_AS_VALUE(imported, local),\n                { node: importDef.rule }\n            );\n        }\n    }\n}\n\nfunction validateImports(context: FeatureTransformContext) {\n    const imports = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    for (const importObj of imports) {\n        const entity = context.resolver.getModule(importObj);\n        if (!entity.value) {\n            // warn about unknown imported files\n            const fromDecl =\n                importObj.rule.nodes &&\n                importObj.rule.nodes.find(\n                    (decl) => decl.type === 'decl' && decl.prop === PseudoImportDecl.FROM\n                );\n\n            context.diagnostics.report(\n                diagnostics.UNKNOWN_IMPORTED_FILE(importObj.request, getErrorText(entity)),\n                {\n                    node: fromDecl || importObj.rule,\n                    word: importObj.request,\n                }\n            );\n        } else if (entity.kind === 'css') {\n            const meta = entity.value;\n            // propagate some native CSS diagnostics to st-import\n            if (meta.type === 'css') {\n                let foundUnsupportedNativeImport = false;\n                for (const report of meta.diagnostics.reports) {\n                    if (report.code === '05021') {\n                        foundUnsupportedNativeImport = true;\n                        break;\n                    }\n                }\n                if (foundUnsupportedNativeImport) {\n                    context.diagnostics.report(diagnostics.UNSUPPORTED_NATIVE_IMPORT(), {\n                        node: importObj.rule,\n                        word: importObj.defaultExport,\n                    });\n                }\n            }\n            // report unsupported native CSS default import\n            if (meta.type !== 'stylable' && importObj.defaultExport) {\n                context.diagnostics.report(diagnostics.NO_DEFAULT_EXPORT(importObj.request), {\n                    node: importObj.rule,\n                    word: importObj.defaultExport,\n                });\n            }\n            // warn about unknown named imported symbols\n            for (const name in importObj.named) {\n                const origName = importObj.named[name];\n                const resolvedSymbol = context.resolver.resolveImported(importObj, origName);\n                if (resolvedSymbol === null || !resolvedSymbol.symbol) {\n                    const namedDecl =\n                        importObj.rule.nodes &&\n                        importObj.rule.nodes.find(\n                            (decl) => decl.type === 'decl' && decl.prop === PseudoImportDecl.NAMED\n                        );\n\n                    context.diagnostics.report(\n                        diagnostics.UNKNOWN_IMPORTED_SYMBOL(origName, importObj.request),\n                        { node: namedDecl || importObj.rule, word: origName }\n                    );\n                }\n            }\n        } else if (entity.kind === 'js') {\n            // TODO: add diagnostics for JS imports (typeof checks)\n        }\n    }\n}\n\nfunction getErrorText(res: CachedModuleEntity) {\n    if ('error' in res) {\n        const { error } = res;\n        if (typeof error === 'object' && error) {\n            return 'details' in error\n                ? String(error.details)\n                : 'message' in error\n                ? String(error.message)\n                : String(error);\n        }\n        return String(error);\n    }\n    return '';\n}\n", "import { createDiagnosticReporter } from '../diagnostics';\n\nexport const generalDiagnostics = {\n    INVALID_FUNCTIONAL_SELECTOR: createDiagnosticReporter(\n        '00001',\n        'error',\n        (selector: string, type: string) => `\"${selector}\" ${type} is not functional`\n    ),\n    FORBIDDEN_DEF_IN_COMPLEX_SELECTOR: createDiagnosticReporter(\n        '05014',\n        'error',\n        (name: string) => `cannot define \"${name}\" inside a complex selector`\n    ),\n};\n", "import path from 'path';\nimport { parseImports } from '@tokey/imports-parser';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport type { Imported } from '../features';\nimport { Root, decl, Declaration, atRule, rule, Rule, AtRule } from 'postcss';\nimport { stripQuotation } from '../helpers/string';\nimport { isCompRoot } from './selector';\nimport type { ParsedValue } from '../types';\nimport type { StylableMeta } from '../stylable-meta';\nimport type * as postcss from 'postcss';\nimport postcssValueParser, {\n    ParsedValue as PostCSSParsedValue,\n    FunctionNode,\n} from 'postcss-value-parser';\nimport type { StylableResolver } from '../stylable-resolver';\n\nexport const parseImportMessages = {\n    ST_IMPORT_STAR: createDiagnosticReporter(\n        '05001',\n        'error',\n        () => '@st-import * is not supported'\n    ),\n    INVALID_ST_IMPORT_FORMAT: createDiagnosticReporter(\n        '05002',\n        'error',\n        (errors: string[]) => `Invalid @st-import format:\\n - ${errors.join('\\n - ')}`\n    ),\n    ST_IMPORT_EMPTY_FROM: createDiagnosticReporter(\n        '05003',\n        'error',\n        () => '@st-import must specify a valid \"from\" string value'\n    ),\n    EMPTY_IMPORT_FROM: createDiagnosticReporter(\n        '05004',\n        'error',\n        () => '\"-st-from\" cannot be empty'\n    ),\n    MULTIPLE_FROM_IN_IMPORT: createDiagnosticReporter(\n        '05005',\n        'warning',\n        () => `cannot define multiple \"-st-from\" declarations in a single import`\n    ),\n    DEFAULT_IMPORT_IS_LOWER_CASE: createDiagnosticReporter(\n        '05006',\n        'warning',\n        () => 'Default import of a Stylable stylesheet must start with an upper-case letter'\n    ),\n    ILLEGAL_PROP_IN_IMPORT: createDiagnosticReporter(\n        '05007',\n        'warning',\n        (propName: string) => `\"${propName}\" css attribute cannot be used inside :import block`\n    ),\n    FROM_PROP_MISSING_IN_IMPORT: createDiagnosticReporter(\n        '05008',\n        'error',\n        () => `\"-st-from\" is missing in :import block`\n    ),\n    INVALID_NAMED_IMPORT_AS: createDiagnosticReporter(\n        '05009',\n        'error',\n        (name: string) => `Invalid named import \"as\" with name \"${name}\"`\n    ),\n    INVALID_NESTED_KEYFRAMES: createDiagnosticReporter(\n        '05010',\n        'error',\n        (name: string) => `Invalid nested keyframes import \"${name}\"`\n    ),\n    INVALID_NESTED_TYPED_IMPORT: createDiagnosticReporter(\n        '05019',\n        'warning',\n        (type: string, name: string) => `Invalid nested ${type} import \"${name}\"`\n    ),\n};\n\nexport const ensureImportsMessages = {\n    ATTEMPT_OVERRIDE_SYMBOL: createDiagnosticReporter(\n        '16001',\n        'error',\n        (kind: 'default' | 'named' | 'keyframes', origin: string, override: string) =>\n            `Attempt to override existing ${kind} import symbol. ${origin} -> ${override}`\n    ),\n    PATCH_CONTAINS_NEW_IMPORT_IN_NEW_IMPORT_NONE_MODE: createDiagnosticReporter(\n        '16002',\n        'error',\n        () => `Attempt to insert new a import in newImport \"none\" mode`\n    ),\n};\n\nexport function createAtImportProps(\n    importObj: Partial<Pick<Imported, 'named' | 'keyframes' | 'defaultExport' | 'request'>>\n): {\n    name: string;\n    params: string;\n} {\n    const named = Object.entries(importObj.named || {});\n    const keyframes = Object.entries(importObj.keyframes || {});\n    let params = '';\n    if (importObj.defaultExport) {\n        params += importObj.defaultExport;\n    }\n    if (importObj.defaultExport && (named.length || keyframes.length)) {\n        params += ', ';\n    }\n    if (named.length || keyframes.length) {\n        params += '[';\n\n        const namedParts = getNamedImportParts(named);\n        const keyFramesParts = getNamedImportParts(keyframes);\n\n        params += namedParts.join(', ');\n\n        if (keyFramesParts.length) {\n            if (namedParts.length) {\n                params += ', ';\n            }\n            params += `keyframes(${keyFramesParts.join(', ')})`;\n        }\n        params += ']';\n    }\n\n    params += ` from ${JSON.stringify(importObj.request || '')}`;\n    return { name: 'st-import', params };\n}\n\nexport function ensureModuleImport(\n    ast: Root,\n    importPatches: Array<ImportPatch>,\n    options: {\n        newImport: 'none' | 'st-import' | ':import';\n    },\n    diagnostics: Diagnostics = new Diagnostics()\n) {\n    const patches = createImportPatches(ast, importPatches, options, diagnostics);\n    if (!diagnostics.reports.length) {\n        for (const patch of patches) {\n            patch();\n        }\n    }\n    return { diagnostics };\n}\nfunction createImportPatches(\n    ast: Root,\n    importPatches: Array<ImportPatch>,\n    { newImport }: { newImport: 'none' | 'st-import' | ':import' },\n    diagnostics: Diagnostics\n) {\n    const patches: Array<() => void> = [];\n    const handled = new Set<ImportPatch>();\n    for (const node of ast.nodes) {\n        if (node.type === 'atrule' && node.name === 'st-import') {\n            const imported = parseStImport(node, '*', diagnostics);\n            processImports(imported, importPatches, handled, diagnostics);\n            patches.push(() => node.assign(createAtImportProps(imported)));\n        } else if (node.type === 'rule' && node.selector === ':import') {\n            const imported = parsePseudoImport(node, '*', diagnostics);\n            processImports(imported, importPatches, handled, diagnostics);\n\n            patches.push(() => {\n                const named = generateNamedValue(imported);\n                const { defaultDecls, namedDecls } = patchDecls(node, named, imported);\n\n                if (imported.defaultExport) {\n                    ensureSingleDecl(defaultDecls, node, '-st-default', imported.defaultExport);\n                }\n                if (named.length) {\n                    ensureSingleDecl(namedDecls, node, '-st-named', named.join(', '));\n                }\n            });\n        }\n    }\n    if (newImport === 'none') {\n        if (handled.size !== importPatches.length) {\n            diagnostics.report(\n                ensureImportsMessages.PATCH_CONTAINS_NEW_IMPORT_IN_NEW_IMPORT_NONE_MODE(),\n                { node: ast }\n            );\n        }\n        return patches;\n    }\n    if (handled.size === importPatches.length) {\n        return patches;\n    }\n    for (const item of importPatches) {\n        if (handled.has(item)) {\n            continue;\n        }\n        if (!hasDefinitions(item)) {\n            continue;\n        }\n        if (newImport === 'st-import') {\n            patches.push(() => {\n                ast.prepend(\n                    atRule(\n                        createAtImportProps({\n                            defaultExport: item.defaultExport || '',\n                            keyframes: item.keyframes || {},\n                            named: item.named || {},\n                            request: item.request,\n                        })\n                    )\n                );\n            });\n        } else {\n            patches.push(() => {\n                ast.prepend(rule(createPseudoImportProps(item)));\n            });\n        }\n    }\n    return patches;\n}\n\nfunction setImportObjectFrom(importPath: string, dirPath: string, importObj: Imported) {\n    if (!path.isAbsolute(importPath) && !importPath.startsWith('.')) {\n        importObj.request = importPath;\n        importObj.from = importPath;\n    } else {\n        importObj.request = importPath;\n        importObj.from =\n            path.posix && path.posix.isAbsolute(dirPath) // browser has no posix methods\n                ? path.posix.resolve(dirPath, importPath)\n                : path.resolve(dirPath, importPath);\n    }\n}\n\nexport function parseModuleImportStatement(\n    node: AtRule | Rule,\n    context: string,\n    diagnostics: Diagnostics\n) {\n    if (node.type === 'atrule') {\n        return parseStImport(node, context, diagnostics);\n    } else {\n        return parsePseudoImport(node, context, diagnostics);\n    }\n}\n\nexport function parseStImport(atRule: AtRule, context: string, diagnostics: Diagnostics) {\n    const keyframes = {};\n    const importObj: Imported = {\n        defaultExport: '',\n        from: '',\n        request: '',\n        named: {},\n        rule: atRule,\n        context,\n        keyframes,\n        typed: {\n            keyframes,\n        },\n    };\n    const imports = parseImports(`import ${atRule.params}`, '[', ']', true)[0];\n\n    if (imports && imports.star) {\n        diagnostics.report(parseImportMessages.ST_IMPORT_STAR(), { node: atRule });\n    } else {\n        setImportObjectFrom(imports.from || '', context, importObj);\n\n        importObj.defaultExport = imports.defaultName || '';\n        if (\n            importObj.defaultExport &&\n            !isCompRoot(importObj.defaultExport) &&\n            importObj.from.endsWith(`.css`)\n        ) {\n            diagnostics.report(parseImportMessages.DEFAULT_IMPORT_IS_LOWER_CASE(), {\n                node: atRule,\n                word: importObj.defaultExport,\n            });\n        }\n        if (imports.tagged) {\n            for (const [kind, namedTyped] of Object.entries(imports.tagged)) {\n                if (!namedTyped) {\n                    continue;\n                }\n                for (const [impName, impAsName] of namedTyped) {\n                    importObj.typed[kind] ??= {};\n                    importObj.typed[kind][impAsName] = impName;\n                }\n            }\n        }\n        if (imports.named) {\n            for (const [impName, impAsName] of imports.named) {\n                importObj.named[impAsName] = impName;\n            }\n        }\n        if (imports.errors.length) {\n            diagnostics.report(parseImportMessages.INVALID_ST_IMPORT_FORMAT(imports.errors), {\n                node: atRule,\n            });\n        } else if (!imports.from?.trim()) {\n            diagnostics.report(parseImportMessages.ST_IMPORT_EMPTY_FROM(), { node: atRule });\n        }\n    }\n\n    return importObj;\n}\n\nexport function parsePseudoImport(rule: Rule, context: string, diagnostics: Diagnostics) {\n    let fromExists = false;\n    const keyframes = {};\n    const importObj: Imported = {\n        defaultExport: '',\n        from: '',\n        request: '',\n        named: {},\n        keyframes,\n        typed: {\n            keyframes,\n        },\n        rule,\n        context,\n    };\n\n    rule.walkDecls((decl) => {\n        switch (decl.prop) {\n            case `-st-from`: {\n                const importPath = stripQuotation(decl.value);\n                if (!importPath.trim()) {\n                    diagnostics.report(parseImportMessages.EMPTY_IMPORT_FROM(), { node: decl });\n                }\n\n                if (fromExists) {\n                    diagnostics.report(parseImportMessages.MULTIPLE_FROM_IN_IMPORT(), {\n                        node: rule,\n                    });\n                }\n\n                setImportObjectFrom(importPath, context, importObj);\n                fromExists = true;\n                break;\n            }\n            case `-st-default`:\n                importObj.defaultExport = decl.value;\n                if (!isCompRoot(importObj.defaultExport) && importObj.from.endsWith(`.css`)) {\n                    diagnostics.report(parseImportMessages.DEFAULT_IMPORT_IS_LOWER_CASE(), {\n                        node: decl,\n                        word: importObj.defaultExport,\n                    });\n                }\n                break;\n            case `-st-named`:\n                {\n                    const { typedMap, namedMap } = parsePseudoImportNamed(\n                        decl.value,\n                        decl,\n                        diagnostics\n                    );\n                    importObj.named = namedMap;\n                    importObj.keyframes = typedMap.keyframes || {};\n                    importObj.typed = typedMap;\n                }\n                break;\n            default:\n                diagnostics.report(parseImportMessages.ILLEGAL_PROP_IN_IMPORT(decl.prop), {\n                    node: decl,\n                    word: decl.prop,\n                });\n                break;\n        }\n    });\n\n    if (!importObj.from) {\n        diagnostics.report(parseImportMessages.FROM_PROP_MISSING_IN_IMPORT(), {\n            node: rule,\n        });\n    }\n    return importObj;\n}\n\nexport function parsePseudoImportNamed(\n    value: string,\n    node: postcss.Declaration | postcss.AtRule,\n    diagnostics: Diagnostics\n) {\n    const namedMap: Record<string, string> = {};\n    const typedMap: Record<string, Record<string, string>> = {};\n    if (value) {\n        handleNamedTokens(postcssValueParser(value), namedMap, typedMap, node, diagnostics);\n    }\n    return { namedMap, typedMap };\n}\n\nfunction createPseudoImportProps(\n    item: Partial<Pick<Imported, 'named' | 'keyframes' | 'defaultExport' | 'request'>>\n) {\n    const nodes = [];\n    const named = generateNamedValue(item);\n    if (item.request) {\n        nodes.push(decl({ prop: '-st-from', value: JSON.stringify(item.request) }));\n    }\n    if (item.defaultExport) {\n        nodes.push(\n            decl({\n                prop: '-st-default',\n                value: item.defaultExport,\n            })\n        );\n    }\n    if (named.length) {\n        nodes.push(\n            decl({\n                prop: '-st-named',\n                value: named.join(', '),\n            })\n        );\n    }\n\n    return {\n        selector: ':import',\n        nodes,\n    };\n}\n\nfunction patchDecls(node: Rule, named: string[], pseudoImport: Imported) {\n    const namedDecls: Declaration[] = [];\n    const defaultDecls: Declaration[] = [];\n    for (const decl of node.nodes) {\n        if (decl.type !== 'decl') {\n            continue;\n        }\n        if (decl.prop === '-st-named') {\n            decl.assign({ value: named.join(', ') });\n            namedDecls.push(decl);\n        } else if (decl.prop === '-st-default') {\n            decl.assign({ value: pseudoImport.defaultExport });\n            defaultDecls.push(decl);\n        }\n    }\n    return { defaultDecls, namedDecls };\n}\n\nfunction ensureSingleDecl(decls: Declaration[], node: Rule, prop: string, value: string) {\n    if (!decls.length) {\n        node.append(decl({ prop, value }));\n    } else if (decls.length > 1) {\n        // remove duplicates keep last one\n        for (let i = 0; i < decls.length - 1; i++) {\n            decls[i].remove();\n        }\n    }\n}\n\nfunction getNamedImportParts(named: [string, string][]) {\n    const parts: string[] = [];\n    for (const [as, name] of named) {\n        if (as === name) {\n            parts.push(name);\n        } else {\n            parts.push(`${name} as ${as}`);\n        }\n    }\n\n    return parts;\n}\n\ntype ImportPatch = Partial<Pick<Imported, 'defaultExport' | 'named' | 'keyframes'>> &\n    Pick<Imported, 'request'>;\n\nfunction generateNamedValue({\n    named = {},\n    keyframes = {},\n}: Partial<Pick<Imported, 'named' | 'keyframes'>>) {\n    const namedParts = getNamedImportParts(Object.entries(named));\n    const keyframesParts = getNamedImportParts(Object.entries(keyframes));\n    if (keyframesParts.length) {\n        namedParts.push(`keyframes(${keyframesParts.join(', ')})`);\n    }\n    return namedParts;\n}\n\nfunction hasDefinitions({\n    named = {},\n    keyframes = {},\n    defaultExport,\n}: Partial<Pick<Imported, 'named' | 'keyframes' | 'defaultExport'>>) {\n    return defaultExport || Object.keys(named).length || Object.keys(keyframes).length;\n}\n\nfunction processImports(\n    imported: Imported,\n    importPatches: Array<ImportPatch>,\n    handled: Set<ImportPatch>,\n    diagnostics: Diagnostics\n) {\n    const ops = ['named', 'keyframes'] as const;\n    for (const patch of importPatches) {\n        if (handled.has(patch)) {\n            continue;\n        }\n        if (imported.request === patch.request) {\n            for (const op of ops) {\n                const patchBucket = patch[op];\n                if (!patchBucket) {\n                    continue;\n                }\n                for (const [asName, symbol] of Object.entries(patchBucket)) {\n                    const currentSymbol = imported[op][asName];\n                    if (currentSymbol === symbol) {\n                        continue;\n                    } else if (currentSymbol) {\n                        diagnostics.report(\n                            ensureImportsMessages.ATTEMPT_OVERRIDE_SYMBOL(\n                                op,\n                                currentSymbol === asName\n                                    ? currentSymbol\n                                    : `${currentSymbol} as ${asName}`,\n                                symbol === asName ? symbol : `${symbol} as ${asName}`\n                            ),\n                            {\n                                node: imported.rule,\n                            }\n                        );\n                    } else {\n                        imported[op][asName] = symbol;\n                    }\n                }\n            }\n\n            if (patch.defaultExport) {\n                if (!imported.defaultExport) {\n                    imported.defaultExport = patch.defaultExport;\n                } else if (imported.defaultExport !== patch.defaultExport) {\n                    diagnostics.report(\n                        ensureImportsMessages.ATTEMPT_OVERRIDE_SYMBOL(\n                            'default',\n                            imported.defaultExport,\n                            patch.defaultExport\n                        ),\n                        {\n                            node: imported.rule,\n                        }\n                    );\n                }\n            }\n            handled.add(patch);\n        }\n    }\n}\n\nfunction handleNamedTokens(\n    tokens: PostCSSParsedValue | FunctionNode,\n    mainBucket: Record<string, string>,\n    typedBuckets: Record<string, Record<string, string>> | null,\n    node: postcss.Declaration | postcss.AtRule,\n    diagnostics: Diagnostics\n) {\n    const { nodes } = tokens;\n    for (let i = 0; i < nodes.length; i++) {\n        const token = nodes[i];\n        if (token.type === 'word') {\n            const space = nodes[i + 1];\n            const as = nodes[i + 2];\n            const spaceAfter = nodes[i + 3];\n            const asName = nodes[i + 4];\n            if (isImportAs(space, as)) {\n                if (spaceAfter?.type === 'space' && asName?.type === 'word') {\n                    mainBucket[asName.value] = token.value;\n                    i += 4; //ignore next 4 tokens\n                } else {\n                    i += !asName ? 3 : 2;\n                    diagnostics.report(parseImportMessages.INVALID_NAMED_IMPORT_AS(token.value), {\n                        node,\n                    });\n                    continue;\n                }\n            } else {\n                mainBucket[token.value] = token.value;\n            }\n        } else if (token.type === 'function') {\n            if (!typedBuckets) {\n                diagnostics.report(\n                    parseImportMessages.INVALID_NESTED_TYPED_IMPORT(\n                        token.value,\n                        postcssValueParser.stringify(token)\n                    ),\n                    { node }\n                );\n            } else {\n                typedBuckets[token.value] ??= {};\n                handleNamedTokens(token, typedBuckets[token.value], null, node, diagnostics);\n            }\n        }\n    }\n}\n\nfunction isImportAs(space: ParsedValue, as: ParsedValue) {\n    return space?.type === 'space' && as?.type === 'word' && as?.value === 'as';\n}\n\ntype ImportEvent = {\n    context: string;\n    request: string;\n    resolved: string;\n    depth: number;\n};\n\nexport function tryCollectImportsDeep(\n    resolver: StylableResolver,\n    meta: StylableMeta,\n    imports = new Set<string>(),\n    onImport: undefined | ((e: ImportEvent) => void) = undefined,\n    depth = 1,\n    origin = meta.source\n) {\n    for (const { context, request } of meta.getImportStatements()) {\n        try {\n            const resolved = resolver.resolvePath(context, request);\n            if (resolved === origin) {\n                continue;\n            }\n            onImport?.({ context, request, resolved, depth });\n\n            if (!imports.has(resolved)) {\n                imports.add(resolved);\n                if (resolved.endsWith('.st.css')) {\n                    tryCollectImportsDeep(\n                        resolver,\n                        resolver.analyze(resolved),\n                        imports,\n                        onImport,\n                        depth + 1,\n                        origin\n                    );\n                }\n            }\n        } catch {\n            /** */\n        }\n    }\n    return imports;\n}\n", "/* eslint-disable no-control-regex */\nexport function stripQuotation(str: string) {\n    return str.replace(/^['\"](.*?)['\"]$/g, '$1');\n}\n\nexport function filename2varname(filename: string) {\n    return string2varname(\n        filename\n            // remove extension (eg. .css)\n            .replace(/(?=.*)\\.\\w+$/, '')\n            // remove potential .st extension prefix\n            .replace(/\\.st$/, '')\n    );\n}\n\nexport function string2varname(str: string) {\n    return (\n        str\n            // allow only letters, numbers, dashes, underscores, and non-ascii\n            .replace(/[\\x00-\\x7F]+/gm, (matchAscii) => {\n                return matchAscii.replace(/[^0-9a-zA-Z_-]/gm, '');\n            })\n            // replace multiple dashes with single dash\n            .replace(/--+/gm, '-')\n            // replace multiple underscores with single underscore\n            .replace(/__+/gm, '_')\n            // remove leading digits from start\n            .replace(/^\\d+/gm, '')\n    );\n}\n", "import type * as postcss from 'postcss';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport { stripQuotation } from '../helpers/string';\n\nconst UNIVERSAL_SYNTAX_DEFINITION = '*';\nconst AT_PROPERTY_DISCRIPTOR_LIST = ['initial-value', 'syntax', 'inherits'];\n\ninterface AtPropertyValidationResponse {\n    valid: boolean;\n}\n\nexport const atPropertyValidationWarnings = {\n    MISSING_REQUIRED_DESCRIPTOR: createDiagnosticReporter(\n        '01001',\n        'error',\n        (descriptorName: string) => `@property rules require a \"${descriptorName}\" descriptor`\n    ),\n    MISSING_REQUIRED_INITIAL_VALUE_DESCRIPTOR: createDiagnosticReporter(\n        '01002',\n        'warning',\n        () =>\n            '@property \"initial-value\" descriptor is optional only if the \"syntax\" is the universal syntax definition, otherwise the descriptor is required'\n    ),\n    INVALID_DESCRIPTOR_TYPE: createDiagnosticReporter(\n        '01003',\n        'error',\n        (descriptorType: string) =>\n            `@property does not support descriptor of type \"${descriptorType}\"`\n    ),\n    INVALID_DESCRIPTOR_NAME: createDiagnosticReporter(\n        '01004',\n        'error',\n        (descriptorName: string) =>\n            `@property does not support descriptor named \"${descriptorName}\"`\n    ),\n};\n\nexport function validateAtProperty(\n    atRule: postcss.AtRule,\n    diagnostics: Diagnostics\n): AtPropertyValidationResponse {\n    const name = atRule.params;\n    const atPropertyValues: Map<string, string> = new Map();\n\n    if (!atRule.nodes?.length) {\n        return {\n            valid: true,\n        };\n    }\n\n    for (const node of atRule.nodes) {\n        if (node.type !== 'decl') {\n            if (node.type === 'atrule' || node.type === 'rule') {\n                diagnostics.report(\n                    atPropertyValidationWarnings.INVALID_DESCRIPTOR_TYPE(node.type),\n                    {\n                        node,\n                        word: 'params' in node ? node.params : node.selector,\n                    }\n                );\n            }\n\n            continue;\n        }\n\n        if (!AT_PROPERTY_DISCRIPTOR_LIST.includes(node.prop)) {\n            diagnostics.report(atPropertyValidationWarnings.INVALID_DESCRIPTOR_NAME(node.prop), {\n                node,\n                word: node.prop,\n            });\n\n            continue;\n        }\n\n        atPropertyValues.set(node.prop, stripQuotation(node.value));\n    }\n\n    if (!atPropertyValues.has('syntax')) {\n        diagnostics.report(atPropertyValidationWarnings.MISSING_REQUIRED_DESCRIPTOR('syntax'), {\n            node: atRule,\n            word: name,\n        });\n\n        return {\n            valid: false,\n        };\n    }\n\n    if (!atPropertyValues.has('inherits')) {\n        diagnostics.report(atPropertyValidationWarnings.MISSING_REQUIRED_DESCRIPTOR('inherits'), {\n            node: atRule,\n            word: name,\n        });\n\n        return {\n            valid: false,\n        };\n    }\n\n    if (\n        !atPropertyValues.has('initial-value') &&\n        atPropertyValues.get('syntax') !== UNIVERSAL_SYNTAX_DEFINITION\n    ) {\n        diagnostics.report(\n            atPropertyValidationWarnings.MISSING_REQUIRED_INITIAL_VALUE_DESCRIPTOR(),\n            {\n                node: atRule,\n                word: name,\n            }\n        );\n\n        return {\n            valid: false,\n        };\n    }\n\n    return {\n        valid: true,\n    };\n}\n\nexport function validateCustomPropertyName(value: string) {\n    return value.startsWith('--');\n}\n\nexport function generateScopedCSSVar(namespace: string, varName: string) {\n    return `--${namespace}-${varName}`;\n}\n", "import path from 'path';\nimport { createFeature, FeatureContext } from './feature';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport { filename2varname, string2varname } from '../helpers/string';\nimport { stripQuotation } from '../helpers/string';\nimport valueParser from 'postcss-value-parser';\nimport { murmurhash3_32_gc } from '../murmurhash';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport type { AtRule } from 'postcss';\n\nexport const diagnostics = {\n    INVALID_NAMESPACE_DEF: createDiagnosticReporter(\n        '11007',\n        'error',\n        () => 'invalid @st-namespace'\n    ),\n    EMPTY_NAMESPACE_DEF: createDiagnosticReporter(\n        '11008',\n        'error',\n        () => '@st-namespace must contain at least one character or digit'\n    ),\n    EXTRA_DEFINITION: createDiagnosticReporter(\n        '11012',\n        'error',\n        () => '@st-namespace must contain a single string definition'\n    ),\n    INVALID_NAMESPACE_VALUE: createDiagnosticReporter(\n        '11013',\n        'error',\n        () => '@st-namespace must contain only letters, numbers or dashes'\n    ),\n    INVALID_NAMESPACE_REFERENCE: createDiagnosticReporter(\n        '11010',\n        'error',\n        () => 'st-namespace-reference dose not have any value'\n    ),\n    NATIVE_OVERRIDE_DEPRECATION: createDiagnosticReporter(\n        '11014',\n        'info',\n        () => '@namespace will stop working in version 6, use @st-namespace instead'\n    ),\n};\n\nconst dataKey = plugableRecord.key<{\n    namespaces: string[];\n    usedNativeNamespace: string[];\n    usedNativeNamespaceNodes: AtRule[];\n    foundStNamespace: boolean;\n}>('namespace');\n\n// HOOKS\n\nexport const hooks = createFeature({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {\n            namespaces: [],\n            usedNativeNamespace: [],\n            usedNativeNamespaceNodes: [],\n            foundStNamespace: false,\n        });\n    },\n    analyzeAtRule({ context, atRule }) {\n        const isSTNamespace = atRule.name === 'st-namespace';\n        const isNamespace = atRule.name === 'namespace';\n        if (!isSTNamespace && !isNamespace) {\n            return;\n        }\n        const data = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        if (data.foundStNamespace && isNamespace) {\n            // ignore @namespace once @st-namespace was found\n            return;\n        }\n        const diag = isSTNamespace ? context.diagnostics : undefined;\n        const match = parseNamespace(atRule, diag);\n        if (match) {\n            data.namespaces.push(match);\n            if (isNamespace) {\n                data.usedNativeNamespace.push(atRule.params);\n                data.usedNativeNamespaceNodes.push(atRule);\n            } else {\n                // clear @namespace matches once @st-namespace if found\n                data.usedNativeNamespace.length = 0;\n                data.usedNativeNamespaceNodes.length = 0;\n                // mark to prevent any further @namespace collection\n                data.foundStNamespace = true;\n            }\n        }\n    },\n    analyzeDone(context) {\n        const { usedNativeNamespaceNodes } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        for (const node of usedNativeNamespaceNodes) {\n            context.diagnostics.report(diagnostics.NATIVE_OVERRIDE_DEPRECATION(), {\n                node,\n            });\n        }\n    },\n    prepareAST({ context, node, toRemove }) {\n        // remove @st-namespace or @namespace that was used as @st-namespace\n        const { usedNativeNamespace } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        if (\n            node.type === 'atrule' &&\n            (node.name === 'st-namespace' ||\n                (node.name === 'namespace' && usedNativeNamespace.includes(node.params)))\n        ) {\n            toRemove.push(node);\n        }\n    },\n});\n\n// API\n\nexport function parseNamespace(node: AtRule, diag?: Diagnostics): string | undefined {\n    const { nodes } = valueParser(node.params);\n    if (!nodes.length) {\n        // empty params (not even empty quotes)\n        diag?.report(diagnostics.EMPTY_NAMESPACE_DEF(), { node });\n        return;\n    }\n    let isInvalid = false;\n    let namespace: string | undefined = undefined;\n    for (const valueNode of nodes) {\n        switch (valueNode.type) {\n            case 'string': {\n                if (namespace === undefined) {\n                    // first namespace\n                    if (!isInvalid) {\n                        namespace = stripQuotation(valueNode.value);\n                    }\n                } else {\n                    // extra definition - mark as invalid and clear namespace\n                    diag?.report(diagnostics.EXTRA_DEFINITION(), {\n                        node,\n                        word: valueParser.stringify(valueNode),\n                    });\n                    isInvalid = true;\n                    namespace = undefined;\n                }\n                break;\n            }\n            case 'comment':\n            case 'space':\n                // do nothing\n                break;\n            default: {\n                // invalid definition - mark as invalid and clear namespace\n                diag?.report(diagnostics.EXTRA_DEFINITION(), {\n                    node,\n                    word: valueParser.stringify(valueNode),\n                });\n                isInvalid = true;\n                namespace = undefined;\n            }\n        }\n    }\n    if (namespace === undefined) {\n        // no namespace found\n        diag?.report(diagnostics.INVALID_NAMESPACE_DEF(), {\n            node,\n        });\n        return;\n    }\n    if (namespace !== undefined && namespace.trim() === '') {\n        // empty namespace found\n        diag?.report(diagnostics.EMPTY_NAMESPACE_DEF(), {\n            node,\n        });\n        return;\n    }\n    // check namespace is a valid ident start with no conflicts with stylable namespacing\n    const transformedNamespace = string2varname(namespace);\n    if (namespace !== transformedNamespace) {\n        // invalid namespace found\n        diag?.report(diagnostics.INVALID_NAMESPACE_VALUE(), {\n            node,\n            word: namespace,\n        });\n        return;\n    }\n    return namespace;\n}\n\nexport function defaultProcessNamespace(namespace: string, origin: string, _source?: string) {\n    return namespace + murmurhash3_32_gc(origin); // .toString(36);\n}\n\nexport function setMetaNamespace(\n    context: FeatureContext,\n    resolveNamespace: typeof defaultProcessNamespace\n): void {\n    const meta = context.meta;\n    // resolve namespace\n    const { namespaces } = plugableRecord.getUnsafe(meta.data, dataKey);\n    const namespace =\n        namespaces[namespaces.length - 1] || filename2varname(path.basename(meta.source)) || 's';\n    // resolve path origin\n    let pathToSource: string | undefined;\n    let length = meta.sourceAst.nodes.length;\n    while (length--) {\n        const node = meta.sourceAst.nodes[length];\n        if (node.type === 'comment' && node.text.includes('st-namespace-reference')) {\n            const i = node.text.indexOf('=');\n            if (i === -1) {\n                context.diagnostics.report(diagnostics.INVALID_NAMESPACE_REFERENCE(), {\n                    node,\n                });\n            } else {\n                pathToSource = stripQuotation(node.text.slice(i + 1));\n            }\n            break;\n        }\n    }\n    // generate final namespace\n    meta.namespace = resolveNamespace(\n        namespace,\n        pathToSource ? path.resolve(path.dirname(meta.source), pathToSource) : meta.source,\n        meta.source\n    );\n}\n", "/* eslint-disable no-fallthrough */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n/**\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\nexport function murmurhash3_32_gc(key: string, seed = 0) {\n    const remainder = key.length & 3; // key.length % 4\n    const bytes = key.length - remainder;\n    const c1 = 0xcc9e2d51;\n    const c2 = 0x1b873593;\n    let h1 = seed;\n    let i = 0;\n    let k1 = 0;\n    let h1b = 0;\n    while (i < bytes) {\n        k1 =\n            (key.charCodeAt(i) & 0xff) |\n            ((key.charCodeAt(++i) & 0xff) << 8) |\n            ((key.charCodeAt(++i) & 0xff) << 16) |\n            ((key.charCodeAt(++i) & 0xff) << 24);\n        ++i;\n\n        k1 = ((k1 & 0xffff) * c1 + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 = ((k1 & 0xffff) * c2 + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n\n        h1 ^= k1;\n        h1 = (h1 << 13) | (h1 >>> 19);\n        h1b = ((h1 & 0xffff) * 5 + ((((h1 >>> 16) * 5) & 0xffff) << 16)) & 0xffffffff;\n        h1 = (h1b & 0xffff) + 0x6b64 + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16);\n    }\n\n    k1 = 0;\n    switch (remainder) {\n        // @ts-expect-error\n        case 3:\n            k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;\n        // @ts-expect-error\n        case 2:\n            k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;\n        case 1:\n            k1 ^= key.charCodeAt(i) & 0xff;\n\n            k1 = ((k1 & 0xffff) * c1 + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n            k1 = (k1 << 15) | (k1 >>> 17);\n            k1 = ((k1 & 0xffff) * c2 + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n            h1 ^= k1;\n    }\n\n    h1 ^= key.length;\n\n    h1 ^= h1 >>> 16;\n    h1 = ((h1 & 0xffff) * 0x85ebca6b + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n    h1 ^= h1 >>> 13;\n    h1 = ((h1 & 0xffff) * 0xc2b2ae35 + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16)) & 0xffffffff;\n    h1 ^= h1 >>> 16;\n\n    return h1 >>> 0;\n}\n", "import { createFeature } from './feature';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport {\n    walkSelector,\n    stringifySelector,\n    parseSelectorWithCache,\n    flattenFunctionalSelector,\n    isCompRoot,\n} from '../helpers/selector';\nimport type { StylableMeta } from '../stylable-meta';\nimport type { ImmutableSelectorNode, SelectorList } from '@tokey/css-selector-parser';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport type * as postcss from 'postcss';\n\nconst dataKey = plugableRecord.key<{\n    rules: Map<\n        postcss.Rule | postcss.AtRule,\n        {\n            isGlobal: boolean;\n            checkedRule: postcss.AtRule | postcss.Rule;\n            topLevelSelectorsFlags: boolean[];\n        }\n    >;\n}>('globals');\n\nexport const diagnostics = {\n    UNSUPPORTED_MULTI_SELECTOR_IN_GLOBAL: createDiagnosticReporter(\n        '04001',\n        'error',\n        () => `unsupported multi selector in :global()`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature<{ IMMUTABLE_SELECTOR: ImmutableSelectorNode }>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, { rules: new Map() });\n    },\n    analyzeSelectorNode({ context, node, topSelectorIndex, rule, originalNode }) {\n        const { rules } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        if (node.type === 'selector' || node.type === 'combinator' || node.type === 'comment') {\n            return;\n        }\n        if (!rules.has(originalNode)) {\n            rules.set(originalNode, {\n                isGlobal: true,\n                checkedRule: rule,\n                topLevelSelectorsFlags: [],\n            });\n        }\n        const ruleData = rules.get(originalNode)!;\n        if (node.type === 'pseudo_class' && node.value === `global`) {\n            // mark selector as global only if it isn't set\n            ruleData.topLevelSelectorsFlags[topSelectorIndex] ??= true;\n            if (node.nodes && node.nodes?.length > 1) {\n                context.diagnostics.report(diagnostics.UNSUPPORTED_MULTI_SELECTOR_IN_GLOBAL(), {\n                    node: rule,\n                    word: stringifySelector(node.nodes),\n                });\n            }\n            return walkSelector.skipNested;\n        } else if (node.type === 'universal' || (node.type === 'type' && !isCompRoot(node.value))) {\n            // mark selector as global only if it isn't set\n            ruleData.topLevelSelectorsFlags[topSelectorIndex] ??= true;\n        } else {\n            // mark selector as local if it has a local selector\n            ruleData.topLevelSelectorsFlags[topSelectorIndex] = false;\n        }\n        return;\n    },\n    analyzeSelectorDone({ context, originalNode }) {\n        const { rules } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        const data = rules.get(originalNode);\n        if (!data) {\n            return;\n        }\n        // require at least one global selector in rule selectors\n        if (!data.topLevelSelectorsFlags.find((isGlobal) => isGlobal)) {\n            data.isGlobal = false;\n            return;\n        }\n\n        // rule is global if it doesn't have any local parents\n        let parent: postcss.Container | postcss.Document | undefined = originalNode.parent;\n        while (parent) {\n            const parentData = rules.get(parent as postcss.Rule);\n            if (parentData) {\n                // quick resolution: parent calculated first\n                data.isGlobal = parentData.isGlobal;\n                break;\n            }\n            // keep searching\n            parent = parent.parent;\n        }\n    },\n    transformInit({ context }) {\n        context.meta.globals = {};\n    },\n    transformLastPass({ context: { meta }, ast }) {\n        ast.walkRules((r) => {\n            if (!r.selector.includes(`:global(`)) {\n                return;\n            }\n            const selectorAst = parseSelectorWithCache(r.selector, { clone: true });\n            walkSelector(unwrapPseudoGlobals(selectorAst), (inner) => {\n                if (inner.type === 'class') {\n                    meta.globals[inner.value] = true;\n                }\n            });\n            r.selector = stringifySelector(selectorAst);\n        });\n    },\n});\n\n// API\n\nexport function getGlobalRules(meta: StylableMeta) {\n    const { rules } = plugableRecord.getUnsafe(meta.data, dataKey);\n    const globalRules: postcss.Rule[] = [];\n    for (const [rule, { isGlobal, checkedRule }] of rules) {\n        if (isGlobal && checkedRule === rule && rule.type === 'rule') {\n            globalRules.push(rule);\n        }\n    }\n    return globalRules;\n}\n\nexport function unwrapPseudoGlobals(selectorAst: SelectorList) {\n    const collectedGlobals: SelectorList = [];\n    walkSelector(selectorAst, (node) => {\n        if (node.type === 'pseudo_class' && node.value === 'global') {\n            if (node.nodes?.length === 1) {\n                collectedGlobals.push(flattenFunctionalSelector(node));\n            }\n            return walkSelector.skipNested;\n        }\n        return;\n    });\n    return collectedGlobals;\n}\n", "import { createFeature } from './feature';\nimport { parseSelectorWithCache, scopeNestedSelector } from '../helpers/selector';\nimport type { Stylable } from '../stylable';\nimport type { ImmutablePseudoClass } from '@tokey/css-selector-parser';\nimport * as postcss from 'postcss';\nimport type { SRule } from '../deprecated/postcss-ast-extension';\n\nexport const diagnostics = {\n    // INVALID_SCOPING: createDiagnosticReporter(\n    //     '11009',\n    //     'error',\n    //     () => '\"@st-scope\" requires a valid selector or empty value'\n    // ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature<{ IMMUTABLE_SELECTOR: ImmutablePseudoClass }>({\n    analyzeAtRule({ context, atRule, analyzeRule }) {\n        if (!isStScopeStatement(atRule)) {\n            return;\n        }\n        // notice: any value from params would be taken as a scoping\n        // selector to be prepended to nested selectors\n        analyzeRule(\n            postcss.rule({\n                selector: atRule.params,\n                source: atRule.source,\n            }),\n            {\n                isScoped: true,\n                originalNode: atRule,\n            }\n        );\n        context.meta.scopes.push(atRule);\n    },\n    prepareAST({ node, toRemove }) {\n        // called with experimentalSelectorInference=false\n        // flatten @st-scope before transformation\n        if (isStScopeStatement(node)) {\n            flattenScope(node);\n            toRemove.push(() => node.replaceWith(node.nodes || []));\n        }\n    },\n    transformAtRuleNode({ context: { meta, inferredSelectorMixin }, atRule, transformer }) {\n        if (isStScopeStatement(atRule)) {\n            const { selector, inferredSelector } = transformer.scopeSelector(\n                meta,\n                atRule.params,\n                atRule,\n                undefined,\n                inferredSelectorMixin\n            );\n            // transform selector in params\n            atRule.params = selector;\n            // track selector context for nested selector nodes\n            transformer.containerInferredSelectorMap.set(atRule, inferredSelector);\n        }\n    },\n    transformLastPass({ ast }) {\n        // called with experimentalSelectorInference=true\n        // flatten @st-scope after transformation\n        const toRemove = [];\n        for (const node of ast.nodes) {\n            if (isStScopeStatement(node)) {\n                flattenScope(node);\n                toRemove.push(() => node.replaceWith(node.nodes || []));\n            }\n        }\n        toRemove.forEach((remove) => remove());\n    },\n});\n\n// API\n\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n    public getStScope(rule: postcss.Rule) {\n        return getStScope(rule);\n    }\n}\n\nexport function isStScopeStatement(node: any): node is postcss.AtRule {\n    return node.type === 'atrule' && node.name === 'st-scope';\n}\n\nfunction flattenScope(atRule: postcss.AtRule) {\n    const scopeSelector = atRule.params;\n    if (scopeSelector) {\n        atRule.walkRules((rule) => {\n            rule.selector = scopeNestedSelector(\n                parseSelectorWithCache(scopeSelector),\n                parseSelectorWithCache(rule.selector)\n            ).selector;\n            (rule as SRule).stScopeSelector = atRule.params;\n        });\n    }\n}\n\nfunction getStScope(rule: postcss.Rule): postcss.AtRule | undefined {\n    let current: postcss.Container | postcss.Document = rule;\n    while (current?.parent) {\n        current = current.parent;\n        if (isStScopeStatement(current) && current.parent?.type === 'root') {\n            return current;\n        }\n    }\n    return;\n}\n", "import { createFeature, FeatureContext, FeatureTransformContext } from './feature';\nimport { unbox, Box, deprecatedStFunctions, boxString } from '../custom-values';\nimport { generalDiagnostics } from './diagnostics';\nimport * as STSymbol from './st-symbol';\nimport type { StylableMeta } from '../stylable-meta';\nimport { createSymbolResolverWithCache, CSSResolve } from '../stylable-resolver';\nimport { EvalValueData, EvalValueResult, StylableEvaluator } from '../functions';\nimport { isChildOfAtRule } from '../helpers/rule';\nimport { walkSelector } from '../helpers/selector';\nimport { stringifyFunction, getStringValue, strategies } from '../helpers/value';\nimport { stripQuotation } from '../helpers/string';\nimport type { ImmutablePseudoClass, PseudoClass } from '@tokey/css-selector-parser';\nimport type * as postcss from 'postcss';\nimport { processDeclarationFunctions } from '../process-declaration-functions';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport type { ParsedValue } from '../types';\nimport type { Stylable } from '../stylable';\nimport type { RuntimeStVar } from '../stylable-transformer';\nimport postcssValueParser from 'postcss-value-parser';\n\nexport interface VarSymbol {\n    _kind: 'var';\n    name: string;\n    value: string;\n    text: string;\n    valueType: string | null;\n    node: postcss.Node;\n}\n\nexport type CustomValueInput = Box<\n    string,\n    CustomValueInput | Record<string, CustomValueInput | string> | Array<CustomValueInput | string>\n>;\n\nexport interface ComputedStVar {\n    value: RuntimeStVar;\n    diagnostics: Diagnostics;\n    input: CustomValueInput;\n    source: {\n        meta: StylableMeta;\n        start: postcss.Position;\n        end: postcss.Position;\n    };\n}\n\nexport interface FlatComputedStVar {\n    value: string;\n    path: string[];\n    source: ComputedStVar['source'];\n}\n\nexport const diagnostics = {\n    FORBIDDEN_DEF_IN_COMPLEX_SELECTOR: generalDiagnostics.FORBIDDEN_DEF_IN_COMPLEX_SELECTOR,\n    NO_VARS_DEF_IN_ST_SCOPE: createDiagnosticReporter(\n        '07002',\n        'error',\n        () => `cannot define \":vars\" inside of \"@st-scope\"`\n    ),\n    DEPRECATED_ST_FUNCTION_NAME: createDiagnosticReporter(\n        '07003',\n        'info',\n        (name: string, alternativeName: string) =>\n            `\"${name}\" is deprecated, use \"${alternativeName}\"`\n    ),\n    CYCLIC_VALUE: createDiagnosticReporter(\n        '07004',\n        'error',\n        (cyclicChain: string[]) =>\n            `Cyclic value definition detected: \"${cyclicChain\n                .map((s, i) => (i === cyclicChain.length - 1 ? '\u21BB ' : i === 0 ? '\u2192 ' : '\u21AA ') + s)\n                .join('\\n')}\"`\n    ),\n    MISSING_VAR_IN_VALUE: createDiagnosticReporter(\n        '07005',\n        'error',\n        () => `invalid value() with no var identifier`\n    ),\n    COULD_NOT_RESOLVE_VALUE: createDiagnosticReporter(\n        '07006',\n        'error',\n        (args?: string) =>\n            `cannot resolve value function${args ? ` using the arguments provided: \"${args}\"` : ''}`\n    ),\n    MULTI_ARGS_IN_VALUE: createDiagnosticReporter(\n        '07007',\n        'error',\n        (args: string) => `value function accepts only a single argument: \"value(${args})\"`\n    ),\n    CANNOT_USE_AS_VALUE: createDiagnosticReporter(\n        '07008',\n        'error',\n        (type: string, varName: string) => `${type} \"${varName}\" cannot be used as a variable`\n    ),\n    CANNOT_USE_JS_AS_VALUE: createDiagnosticReporter(\n        '07009',\n        'error',\n        (type: string, varName: string) =>\n            `JavaScript ${type} import \"${varName}\" cannot be used as a variable`\n    ),\n    UNKNOWN_VAR: createDiagnosticReporter(\n        '07010',\n        'error',\n        (name: string) => `unknown var \"${name}\"`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature<{\n    SELECTOR: PseudoClass;\n    IMMUTABLE_SELECTOR: ImmutablePseudoClass;\n    RESOLVED: Record<string, EvalValueResult>;\n}>({\n    analyzeSelectorNode({ context, node, rule }) {\n        if (node.type !== `pseudo_class` || node.value !== `vars`) {\n            return;\n        }\n        // make sure `:vars` is the only selector\n        if (rule.selector === `:vars`) {\n            if (isChildOfAtRule(rule, `st-scope`)) {\n                context.diagnostics.report(diagnostics.NO_VARS_DEF_IN_ST_SCOPE(), { node: rule });\n            } else {\n                collectVarSymbols(context, rule);\n            }\n            // stop further walk into `:vars {}`\n            return walkSelector.stopAll;\n        } else {\n            context.diagnostics.report(diagnostics.FORBIDDEN_DEF_IN_COMPLEX_SELECTOR(`:vars`), {\n                node: rule,\n            });\n        }\n        return;\n    },\n    prepareAST({ node, toRemove }) {\n        if (node.type === 'rule' && node.selector === ':vars') {\n            toRemove.push(node);\n        }\n    },\n    transformResolve({ context }) {\n        // Resolve local vars\n        const resolved: Record<string, any> = {};\n        const symbols = STSymbol.getAllByType(context.meta, `var`);\n        // Temporarily don't report issues here // ToDo: move reporting here (from value() transformation)\n        const noDaigContext = {\n            ...context,\n            diagnostics: new Diagnostics(),\n        };\n        for (const name of Object.keys(symbols)) {\n            const symbol = symbols[name];\n            const evaluated = context.evaluator.evaluateValue(noDaigContext, {\n                // ToDo: change to `value(${name})` in order to fix overrides in exports\n                value: stripQuotation(symbol.text),\n                meta: context.meta,\n                node: symbol.node,\n            });\n            resolved[name] = evaluated;\n        }\n        return resolved;\n    },\n    transformValue({ context, node, data }) {\n        evaluateValueCall(context, node, data);\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const [name, { topLevelType, outputValue }] of Object.entries(resolved)) {\n            exports.stVars[name] = topLevelType ? unbox(topLevelType) : outputValue;\n        }\n    },\n});\n\n// API\n\nexport function get(meta: StylableMeta, name: string): VarSymbol | undefined {\n    return STSymbol.get(meta, name, `var`);\n}\n\n// Stylable StVar Public APIs\n\nconst UNKNOWN_LOCATION = Object.freeze({\n    offset: -1,\n    line: -1,\n    column: -1,\n} as const);\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n\n    public getComputed(meta: StylableMeta) {\n        const topLevelDiagnostics = new Diagnostics();\n        const getResolvedSymbols = createSymbolResolverWithCache(\n            this.stylable.resolver,\n            topLevelDiagnostics\n        );\n        const evaluator = new StylableEvaluator({ getResolvedSymbols });\n\n        const { var: stVars } = getResolvedSymbols(meta);\n\n        const computed: Record<string, ComputedStVar> = {};\n\n        for (const [localName, resolvedVar] of Object.entries(stVars)) {\n            const diagnostics = new Diagnostics();\n            const { outputValue, topLevelType, runtimeValue } = evaluator.evaluateValue(\n                {\n                    resolver: this.stylable.resolver,\n                    evaluator,\n                    meta,\n                    diagnostics,\n                },\n                {\n                    meta: resolvedVar.meta,\n                    value: stripQuotation(resolvedVar.symbol.text),\n                    node: resolvedVar.symbol.node,\n                }\n            );\n\n            const computedStVar: ComputedStVar = {\n                value: runtimeValue ?? outputValue,\n                input: topLevelType ?? unbox(outputValue, false),\n                diagnostics,\n                source: {\n                    meta: resolvedVar.meta,\n                    start: resolvedVar.symbol.node.source?.start || UNKNOWN_LOCATION,\n                    end: resolvedVar.symbol.node.source?.end || UNKNOWN_LOCATION,\n                },\n            };\n\n            computed[localName] = computedStVar;\n        }\n\n        return computed;\n    }\n\n    public flatten(meta: StylableMeta) {\n        const computed = this.getComputed(meta);\n\n        const flatStVars: FlatComputedStVar[] = [];\n\n        for (const [symbol, stVar] of Object.entries(computed)) {\n            flatStVars.push(...this.flatSingle(stVar.input, [symbol], stVar.source));\n        }\n\n        return flatStVars;\n    }\n\n    private flatSingle(input: CustomValueInput, path: string[], source: ComputedStVar['source']) {\n        const currentVars: FlatComputedStVar[] = [];\n\n        if (input.flatValue) {\n            currentVars.push({\n                value: input.flatValue,\n                path,\n                source,\n            });\n        }\n\n        if (typeof input.value === `object` && input.value !== null) {\n            for (const [key, innerInput] of Object.entries(input.value)) {\n                currentVars.push(\n                    ...this.flatSingle(\n                        typeof innerInput === 'string' ? boxString(innerInput) : innerInput,\n                        [...path, key],\n                        source\n                    )\n                );\n            }\n        }\n\n        return currentVars;\n    }\n}\n\nexport function parseVarsFromExpr(expr: string) {\n    const nameSet = new Set<string>();\n    postcssValueParser(expr).walk((node) => {\n        if (node.type === 'function' && node.value === 'value') {\n            for (const argNode of node.nodes) {\n                switch (argNode.type) {\n                    case 'word':\n                        nameSet.add(argNode.value);\n                        return;\n                    case 'div':\n                        if (argNode.value === ',') {\n                            return;\n                        }\n                }\n            }\n        }\n    });\n    return nameSet;\n}\n\nfunction collectVarSymbols(context: FeatureContext, rule: postcss.Rule) {\n    rule.walkDecls((decl) => {\n        warnOnDeprecatedCustomValues(context, decl);\n\n        // check type annotation\n        let type = null;\n        const prev = decl.prev() as postcss.Comment;\n        if (prev && prev.type === 'comment') {\n            const typeMatch = prev.text.match(/^@type (.+)$/);\n            if (typeMatch) {\n                type = typeMatch[1];\n            }\n        }\n        // add symbol\n        const name = decl.prop;\n        STSymbol.addSymbol({\n            context,\n            symbol: {\n                _kind: 'var',\n                name,\n                value: '',\n                text: decl.value,\n                node: decl,\n                valueType: type,\n            },\n            node: decl,\n        });\n    });\n}\n\nfunction warnOnDeprecatedCustomValues(context: FeatureContext, decl: postcss.Declaration) {\n    processDeclarationFunctions(\n        decl,\n        (node) => {\n            if (node.type === 'nested-item' && deprecatedStFunctions[node.name]) {\n                const { alternativeName } = deprecatedStFunctions[node.name];\n                context.diagnostics.report(\n                    diagnostics.DEPRECATED_ST_FUNCTION_NAME(node.name, alternativeName),\n                    {\n                        node: decl,\n                        word: node.name,\n                    }\n                );\n            }\n        },\n        false\n    );\n}\n\nfunction evaluateValueCall(\n    context: FeatureTransformContext,\n    parsedNode: ParsedValue,\n    data: EvalValueData\n): void {\n    const { stVarOverride, value, node } = data;\n    const passedThrough = context.passedThrough || [];\n    const parsedArgs = strategies.args(parsedNode).map((x) => x.value);\n    const varName = parsedArgs[0];\n    const restArgs = parsedArgs.slice(1);\n\n    // check var not empty\n    if (!varName) {\n        if (node) {\n            context.diagnostics.report(diagnostics.MISSING_VAR_IN_VALUE(), {\n                node,\n                word: getStringValue(parsedNode),\n            });\n        }\n    } else if (parsedArgs.length >= 1) {\n        // override with value\n        if (stVarOverride?.[varName]) {\n            parsedNode.resolvedValue = stVarOverride?.[varName];\n            return;\n        }\n        // check cyclic\n        const refUniqID = createUniqID(data.meta.source, varName);\n        if (passedThrough.includes(refUniqID)) {\n            // TODO: move diagnostic to original value usage instead of the end of the cyclic chain\n            handleCyclicValues(context, passedThrough, refUniqID, data.node, value, parsedNode);\n            return;\n        }\n        // resolve\n        const resolvedSymbols = context.getResolvedSymbols(data.meta);\n        const resolvedVar = resolvedSymbols.var[varName];\n        const resolvedVarSymbol = resolvedVar?.symbol;\n        const possibleNonSTVarSymbol = STSymbol.get(context.meta, varName);\n        if (resolvedVarSymbol) {\n            const { outputValue, topLevelType, typeError } = context.evaluator.evaluateValue(\n                { ...context, passedThrough: passedThrough.concat(refUniqID) },\n                {\n                    ...data,\n                    value: stripQuotation(resolvedVarSymbol.text),\n                    args: restArgs,\n                    node: resolvedVarSymbol.node,\n                    meta: resolvedVar.meta,\n                    rootArgument: varName,\n                    initialNode: node,\n                }\n            );\n            // report errors\n            if (node) {\n                const argsAsString = parsedArgs.join(', ');\n                if (!typeError && !topLevelType && parsedArgs.length > 1) {\n                    context.diagnostics.report(diagnostics.MULTI_ARGS_IN_VALUE(argsAsString), {\n                        node,\n                    });\n                }\n            }\n\n            parsedNode.resolvedValue = context.evaluator.valueHook\n                ? context.evaluator.valueHook(outputValue, varName, true, passedThrough)\n                : outputValue;\n        } else if (possibleNonSTVarSymbol) {\n            const type = resolvedSymbols.mainNamespace[varName];\n            if (type === `js`) {\n                const deepResolve = resolvedSymbols.js[varName];\n                const jsValue = deepResolve.symbol;\n                if (typeof jsValue === 'string') {\n                    parsedNode.resolvedValue = context.evaluator.valueHook\n                        ? context.evaluator.valueHook(jsValue, varName, false, passedThrough)\n                        : jsValue;\n                } else if (node) {\n                    // unsupported Javascript value\n                    // ToDo: provide actual exported id (default/named as x)\n                    context.diagnostics.report(\n                        diagnostics.CANNOT_USE_JS_AS_VALUE(typeof jsValue, varName),\n                        {\n                            node,\n                            word: varName,\n                        }\n                    );\n                }\n            } else if (type) {\n                // report mismatch type\n                const deepResolve = resolvedSymbols[type][varName];\n                let finalResolve: CSSResolve = {\n                    _kind: `css`,\n                    meta: data.meta,\n                    symbol: possibleNonSTVarSymbol,\n                };\n                if (deepResolve instanceof Array) {\n                    // take the deep resolved in order to\n                    // print the actual mismatched type\n                    finalResolve = deepResolve[deepResolve.length - 1];\n                } else if (deepResolve._kind === `css`) {\n                    finalResolve = deepResolve;\n                }\n                reportUnsupportedSymbolInValue(context, varName, finalResolve, node);\n            } else if (node) {\n                // report unknown var\n                context.diagnostics.report(diagnostics.UNKNOWN_VAR(varName), {\n                    node,\n                    word: varName,\n                });\n            }\n        } else if (node) {\n            context.diagnostics.report(diagnostics.UNKNOWN_VAR(varName), {\n                node,\n                word: varName,\n            });\n        }\n    }\n}\n\nexport function resolveReferencedVarNames(\n    context: Pick<FeatureTransformContext, 'meta' | 'resolver'>,\n    initialName: string\n) {\n    const refNames = new Set<string>();\n    const varsToCheck: { meta: StylableMeta; name: string }[] = [\n        { meta: context.meta, name: initialName },\n    ];\n    const checked = new Set<string>();\n    while (varsToCheck.length) {\n        const { meta, name } = varsToCheck.shift()!;\n        const contextualId = meta.source + '/' + name;\n        if (!checked.has(contextualId)) {\n            checked.add(contextualId);\n            refNames.add(name);\n            const symbol = STSymbol.get(meta, name);\n            switch (symbol?._kind) {\n                case 'var':\n                    parseVarsFromExpr(symbol.text).forEach((refName) =>\n                        varsToCheck.push({\n                            meta,\n                            name: refName,\n                        })\n                    );\n                    break;\n                case 'import': {\n                    const resolved = context.resolver.deepResolve(symbol);\n                    if (resolved?._kind === 'css' && resolved.symbol?._kind === 'var') {\n                        varsToCheck.push({ meta: resolved.meta, name: resolved.symbol.name });\n                    }\n                    break;\n                }\n            }\n        }\n    }\n    return refNames;\n}\n\nfunction reportUnsupportedSymbolInValue(\n    context: FeatureTransformContext,\n    name: string,\n    resolve: CSSResolve,\n    node: postcss.Node | undefined\n) {\n    const symbol = resolve.symbol;\n    const errorKind = symbol._kind === 'class' && symbol[`-st-root`] ? 'stylesheet' : symbol._kind;\n    if (node) {\n        context.diagnostics.report(diagnostics.CANNOT_USE_AS_VALUE(errorKind, name), {\n            node,\n            word: name,\n        });\n    }\n}\n\nfunction handleCyclicValues(\n    context: FeatureTransformContext,\n    passedThrough: string[],\n    refUniqID: string,\n    node: postcss.Node | undefined,\n    value: string,\n    parsedNode: ParsedValue\n) {\n    if (node) {\n        const cyclicChain = passedThrough.map((variable) => variable || '');\n        cyclicChain.push(refUniqID);\n        context.diagnostics.report(diagnostics.CYCLIC_VALUE(cyclicChain), {\n            node,\n            word: refUniqID, // ToDo: check word is path+var and not var name\n        });\n    }\n    return stringifyFunction(value, parsedNode);\n}\n\nfunction createUniqID(source: string, varName: string) {\n    return `${source}: ${varName}`;\n}\n", "import cloneDeepWith from 'lodash.clonedeepwith';\nimport postcssValueParser from 'postcss-value-parser';\nimport { getFormatterArgs, getNamedArgs, getStringValue } from './helpers/value';\nimport type { ParsedValue } from './types';\n\nexport class CustomValueError extends Error {\n    constructor(message: string, public fallbackValue: string) {\n        super(message);\n    }\n}\n\nexport interface Box<Type extends string, Value> {\n    type: Type;\n    value: Value;\n    flatValue: string | undefined;\n}\n\nexport function box<Type extends string, Value>(\n    type: Type,\n    value: Value,\n    flatValue?: string\n): Box<Type, Value> {\n    return {\n        type,\n        value,\n        flatValue,\n    };\n}\n\nexport function boxString(value: string) {\n    return box('st-string', value, value);\n}\n\nexport function unbox<B extends Box<string, unknown>>(\n    boxed: B | string,\n    unboxPrimitives = true,\n    customValues?: CustomTypes,\n    node?: ParsedValue\n): any {\n    if (typeof boxed === 'string') {\n        return unboxPrimitives ? boxed : boxString(boxed);\n    } else if (typeof boxed === 'object' && boxed) {\n        const customValue = customValues?.[boxed.type];\n        let value = boxed.value;\n        if (customValue?.flattenValue && node) {\n            value = customValue.getValue([], boxed, node, customValues!);\n        }\n        return cloneDeepWith(value, (v) => unbox(v, unboxPrimitives, customValues, node));\n    }\n}\n\nexport interface BoxedValueMap {\n    [k: string]: string | Box<string, unknown>;\n}\n\nexport type BoxedValueArray = Array<string | Box<string, unknown>>;\n\ntype CustomTypes = Record<string, CustomValueExtension<any>>;\n\nexport interface CustomValueExtension<T> {\n    flattenValue?: FlattenValue<T>;\n    evalVarAst(\n        valueAst: ParsedValue,\n        customTypes: {\n            [typeID: string]: CustomValueExtension<unknown>;\n        },\n        boxPrimitive?: boolean\n    ): Box<string, T>;\n    getValue(\n        path: string[],\n        value: Box<string, T>,\n        node: ParsedValue,\n        customTypes: CustomTypes\n    ): string;\n}\n\nfunction createStArrayCustomFunction() {\n    return createCustomValue<BoxedValueArray, BoxedValueArray>({\n        processArgs: (node, customTypes, boxPrimitive) => {\n            return CustomValueStrategy.args(node, customTypes, boxPrimitive);\n        },\n        createValue: (args) => {\n            return args;\n        },\n        getValue: (value, index) => value[parseInt(index, 10)],\n    });\n}\n\nfunction createStMapCustomFunction() {\n    return createCustomValue<BoxedValueMap, BoxedValueMap>({\n        processArgs: (node, customTypes, boxPrimitive) => {\n            return CustomValueStrategy.named(node, customTypes, boxPrimitive);\n        },\n        createValue: (args) => {\n            return args;\n        },\n        getValue: (value, index) => value[index],\n    });\n}\n\nexport const stTypes: CustomTypes = {\n    /** @deprecated - use `st-array` */\n    stArray: createStArrayCustomFunction().register('stArray'),\n    /** @deprecated - use `st-map` */\n    stMap: createStMapCustomFunction().register('stMap'),\n    'st-array': createStArrayCustomFunction().register('st-array'),\n    'st-map': createStMapCustomFunction().register('st-map'),\n    'st-string': createStMapCustomFunction().register('st-string'),\n} as const;\n\nexport const deprecatedStFunctions: Record<string, { alternativeName: string }> = {\n    stArray: {\n        alternativeName: 'st-array',\n    },\n    stMap: {\n        alternativeName: 'st-map',\n    },\n};\n\nexport const CustomValueStrategy = {\n    args: (fnNode: ParsedValue, customTypes: CustomTypes, boxPrimitive?: boolean) => {\n        const pathArgs = getFormatterArgs(fnNode);\n        const outputArray = [];\n        for (const arg of pathArgs) {\n            const parsedArg = postcssValueParser(arg).nodes[0];\n            const ct = parsedArg.type === 'function' && parsedArg.value;\n            const resolvedValue =\n                typeof ct === 'string' && customTypes[ct]\n                    ? customTypes[ct].evalVarAst(parsedArg, customTypes, boxPrimitive)\n                    : unbox(arg, !boxPrimitive);\n            outputArray.push(resolvedValue);\n        }\n        return outputArray;\n    },\n    named: (fnNode: ParsedValue, customTypes: CustomTypes, boxPrimitive?: boolean) => {\n        const outputMap: BoxedValueMap = {};\n        const s = getNamedArgs(fnNode);\n        for (const [prop, space, ...valueNodes] of s) {\n            if (space.type !== 'space') {\n                // TODO: error catch\n                throw new Error('Invalid argument');\n            }\n            let resolvedValue;\n            if (valueNodes.length === 0) {\n                // TODO: error\n            } else {\n                const nonComments = valueNodes.filter((node) => node.type !== 'comment');\n                if (nonComments.length === 1) {\n                    const valueNode = nonComments[0];\n                    resolvedValue = valueNode.resolvedValue;\n\n                    if (!resolvedValue) {\n                        const ct = customTypes[valueNode.value];\n                        if (valueNode.type === 'function' && ct) {\n                            resolvedValue = ct.evalVarAst(valueNode, customTypes, boxPrimitive);\n                        } else {\n                            resolvedValue = unbox(getStringValue(valueNode), !boxPrimitive);\n                        }\n                    } else if (typeof resolvedValue === 'string') {\n                        const parsedArg = postcssValueParser(resolvedValue).nodes[0];\n                        const ct = parsedArg.type === 'function' && parsedArg.value;\n                        resolvedValue =\n                            typeof ct === 'string' && customTypes[ct]\n                                ? customTypes[ct].evalVarAst(parsedArg, customTypes, boxPrimitive)\n                                : unbox(resolvedValue, !boxPrimitive);\n                    }\n                } else {\n                    resolvedValue = unbox(getStringValue(valueNodes), !boxPrimitive);\n                }\n            }\n\n            if (resolvedValue) {\n                outputMap[prop.value] = resolvedValue;\n            }\n        }\n        return outputMap;\n    },\n};\n\nexport interface JSValueExtension<Value> {\n    _kind: 'CustomValue';\n    register(localTypeSymbol: string): CustomValueExtension<Value>;\n}\n\ntype FlattenValue<Value> = (v: Box<string, Value>) => {\n    parts: Array<string | Box<string, unknown>>;\n    delimiter: ',' | ' ';\n};\n\ninterface ExtensionApi<Value, Args> {\n    processArgs: (fnNode: ParsedValue, customTypes: CustomTypes, boxPrimitive?: boolean) => Args;\n    createValue: (args: Args) => Value;\n    getValue: (v: Value, key: string) => string | Box<string, unknown>;\n    flattenValue?: FlattenValue<Value>;\n}\n\nexport function createCustomValue<Value, Args>({\n    processArgs,\n    createValue,\n    flattenValue,\n    getValue,\n}: ExtensionApi<Value, Args>): JSValueExtension<Value> {\n    return {\n        _kind: 'CustomValue',\n        register(localTypeSymbol: string) {\n            return {\n                flattenValue,\n                evalVarAst(fnNode: ParsedValue, customTypes: CustomTypes, boxPrimitive?: boolean) {\n                    const args = processArgs(fnNode, customTypes, boxPrimitive);\n                    const value = createValue(args);\n                    let flatValue: string | undefined;\n\n                    if (flattenValue) {\n                        flatValue = getFlatValue(\n                            flattenValue,\n                            box(localTypeSymbol, value),\n                            fnNode,\n                            customTypes\n                        );\n                    }\n\n                    return box(localTypeSymbol, value, flatValue);\n                },\n                getValue(\n                    path: string[],\n                    obj: Box<string, Value>,\n                    fallbackNode: ParsedValue, // TODO: add test\n                    customTypes: CustomTypes\n                ): string {\n                    if (path.length === 0) {\n                        if (flattenValue) {\n                            return getFlatValue(flattenValue, obj, fallbackNode, customTypes);\n                        } else {\n                            const stringifiedValue = getStringValue([fallbackNode]);\n\n                            throw new CustomValueError(\n                                `/* Error trying to flat -> */${stringifiedValue}`,\n                                stringifiedValue\n                            );\n                        }\n                    }\n                    const value = getValue(obj.value, path[0]);\n                    return getBoxValue(path.slice(1), value, fallbackNode, customTypes);\n                },\n            };\n        },\n    };\n}\n\nfunction getFlatValue<Value>(\n    flattenValue: FlattenValue<Value>,\n    obj: Box<string, Value>,\n    fallbackNode: ParsedValue,\n    customTypes: CustomTypes\n) {\n    const { delimiter, parts } = flattenValue(obj);\n    return parts.map((v) => getBoxValue([], v, fallbackNode, customTypes)).join(delimiter);\n}\n\nfunction getBoxValue(\n    path: string[],\n    value: string | Box<string, unknown>,\n    node: ParsedValue,\n    customTypes: CustomTypes\n): string {\n    if (typeof value === 'string' || value.type === 'st-string') {\n        return unbox(value, true, customTypes);\n    } else if (value && customTypes[value.type]) {\n        return customTypes[value.type].getValue(path, value, node, customTypes);\n    } else {\n        throw new Error('Unknown Type ' + JSON.stringify(value));\n        // return JSON.stringify(value);\n    }\n}\n\nexport function isCustomValue(symbol: any): symbol is JSValueExtension<unknown> {\n    return symbol?._kind === 'CustomValue';\n}\n", "import type { ParsedValue } from '../types';\nimport postcssValueParser from 'postcss-value-parser';\nimport type { Node as ValueNode } from 'postcss-value-parser';\nimport { createDiagnosticReporter, DiagnosticBase } from '../diagnostics';\n\nexport type ReportWarning = (diagnostic: DiagnosticBase, options?: { word: string }) => void;\n\nexport const valueDiagnostics = {\n    INVALID_NAMED_PARAMS: createDiagnosticReporter(\n        '13001',\n        'error',\n        () => `invalid named parameters (e.g. \"func(name value, [name value, ...])\")`\n    ),\n    MISSING_REQUIRED_FORMATTER_ARG: createDiagnosticReporter(\n        '13002',\n        'error',\n        (node: ParsedValue, argIndex: number) =>\n            `${postcssValueParser.stringify(\n                node as postcssValueParser.Node\n            )}: argument at index ${argIndex} is empty`\n    ),\n};\n\nexport function getNamedArgs(node: ParsedValue) {\n    const args: ParsedValue[][] = [];\n    if (node.nodes.length) {\n        args.push([]);\n        node.nodes.forEach((node: any) => {\n            if (node.type === 'div') {\n                args.push([]);\n            } else {\n                const {\n                    sourceIndex: _sourceIndex,\n                    sourceEndIndex: _sourceEndIndex,\n                    ...clone\n                } = node;\n                args[args.length - 1].push(clone);\n            }\n        });\n    }\n\n    // handle trailing comma\n    return args.length && args[args.length - 1].length === 0 ? args.slice(0, -1) : args;\n}\n\nexport function stringifyFunction(name: string, parsedNode: ParsedValue, perserveQuotes = false) {\n    return `${name}(${getFormatterArgs(parsedNode, false, undefined, perserveQuotes).join(', ')})`;\n}\n\nexport function getFormatterArgs(\n    node: ParsedValue,\n    allowComments = false,\n    reportWarning?: ReportWarning,\n    preserveQuotes = false\n) {\n    const argsResult = [];\n    let currentArg = '';\n    let argIndex = 0;\n    for (const currentNode of node.nodes) {\n        if (currentNode.type === 'div' && currentNode.value === ',') {\n            checkEmptyArg();\n            argIndex++;\n            argsResult.push(currentArg.trim());\n            currentArg = '';\n        } else if (currentNode.type === 'comment') {\n            if (allowComments) {\n                currentArg +=\n                    currentNode.resolvedValue || postcssValueParser.stringify(currentNode);\n            }\n        } else if (currentNode.type === 'string') {\n            currentArg += preserveQuotes\n                ? postcssValueParser.stringify(currentNode)\n                : currentNode.value;\n        } else {\n            currentArg += currentNode.resolvedValue || postcssValueParser.stringify(currentNode);\n        }\n    }\n    checkEmptyArg();\n    argsResult.push(currentArg.trim());\n\n    let i = argsResult.length;\n    while (i--) {\n        if (argsResult[i] === '') {\n            argsResult.pop();\n        } else {\n            return argsResult;\n        }\n    }\n    return argsResult;\n\n    function checkEmptyArg() {\n        if (reportWarning && argsResult.length && currentArg.trim() === '') {\n            reportWarning(valueDiagnostics.MISSING_REQUIRED_FORMATTER_ARG(node, argIndex));\n        }\n    }\n}\n\nexport function getStringValue(nodes: ParsedValue | ParsedValue[]): string {\n    return postcssValueParser.stringify(nodes as postcssValueParser.Node, (node) => {\n        if ((node as ParsedValue).resolvedValue !== undefined) {\n            return (node as ParsedValue).resolvedValue as string | undefined;\n        } else {\n            // TODO: warn\n            return undefined;\n        }\n    });\n}\n\nexport function listOptions(node: any) {\n    return groupValues(node.nodes)\n        .map((nodes: any) =>\n            postcssValueParser.stringify(nodes, (n: any) => {\n                if (n.type === 'div') {\n                    return null;\n                } else if (n.type === 'string') {\n                    return n.value;\n                } else {\n                    return undefined;\n                }\n            })\n        )\n        .filter((x: string) => typeof x === 'string');\n}\n\nexport function groupValues(nodes: ValueNode[], divType = 'div') {\n    const grouped: ValueNode[][] = [];\n    let current: ValueNode[] = [];\n\n    nodes.forEach((n: any) => {\n        if (n.type === divType) {\n            grouped.push(current);\n            current = [];\n        } else {\n            current.push(n);\n        }\n    });\n\n    const last = grouped[grouped.length - 1];\n\n    if ((last && last !== current && current.length) || (!last && current.length)) {\n        grouped.push(current);\n    }\n    return grouped;\n}\n\nexport function validateAllowedNodesUntil(\n    node: ParsedValue,\n    i: number,\n    untilType = 'div',\n    allowed = ['comment']\n) {\n    i = 1;\n    let current = node.nodes[i];\n    while (current && current.type !== untilType) {\n        if (!allowed.includes(current.type)) {\n            return false;\n        }\n        i++;\n        current = node.nodes[i];\n    }\n\n    return true;\n}\n\nexport const strategies = {\n    named: (node: any, reportWarning?: ReportWarning) => {\n        const named: Record<string, string> = {};\n        getNamedArgs(node).forEach((mixinArgsGroup) => {\n            const argsDivider = mixinArgsGroup[1];\n            if (mixinArgsGroup.length < 3 || (argsDivider && argsDivider.type !== 'space')) {\n                if (reportWarning) {\n                    const argValue = mixinArgsGroup[0];\n                    reportWarning(valueDiagnostics.INVALID_NAMED_PARAMS(), {\n                        word: argValue.value,\n                    });\n                }\n                return;\n            }\n            named[mixinArgsGroup[0].value] = stringifyParam(mixinArgsGroup.slice(2));\n        });\n        return named;\n    },\n    args: (node: any, reportWarning?: ReportWarning) => {\n        return getFormatterArgs(node, true, reportWarning).map((value) => ({ value }));\n    },\n};\n\nfunction stringifyParam(nodes: any) {\n    return postcssValueParser.stringify(nodes, (n: any) => {\n        if (n.type === 'function') {\n            return postcssValueParser.stringify(n);\n        } else if (n.type === 'div') {\n            return null;\n        } else if (n.type === 'string') {\n            return n.value;\n        } else {\n            return undefined;\n        }\n    });\n}\n", "import type { FileProcessor } from './cached-process-file';\nimport type { Diagnostics } from './diagnostics';\nimport type { StylableMeta } from './stylable-meta';\nimport {\n    ImportSymbol,\n    ClassSymbol,\n    ElementSymbol,\n    Imported,\n    StylableSymbol,\n    CSSClass,\n    STSymbol,\n    VarSymbol,\n    CSSVarSymbol,\n    KeyframesSymbol,\n    LayerSymbol,\n    ContainerSymbol,\n    CSSKeyframes,\n    CSSLayer,\n    CSSContains,\n    STStructure,\n} from './features';\nimport { findRule } from './helpers/rule';\nimport type { ModuleResolver } from './types';\nimport { CustomValueExtension, isCustomValue, stTypes } from './custom-values';\n\nexport type JsModule = {\n    default?: unknown;\n    [key: string]: unknown;\n};\n\nexport interface InvalidCachedModule {\n    kind: 'js' | 'css';\n    value: null;\n    error: unknown;\n    request: string;\n    context: string;\n    resolvedPath: string | undefined;\n}\n\nexport interface CachedStylableMeta {\n    resolvedPath: string;\n    kind: 'css';\n    value: StylableMeta;\n}\n\nexport interface CachedJsModule {\n    resolvedPath: string;\n    kind: 'js';\n    value: JsModule;\n}\n\nexport interface ResolveOnly {\n    resolvedPath: string;\n    kind: 'resolve';\n    value: null;\n}\n\nexport type CachedModuleEntity =\n    | InvalidCachedModule\n    | CachedStylableMeta\n    | CachedJsModule\n    | ResolveOnly;\n\nexport type StylableResolverCache = Map<string, CachedModuleEntity>;\n\nexport interface CSSResolveMaybe<\n    T extends StylableSymbol | STStructure.PartSymbol = StylableSymbol\n> {\n    _kind: 'css';\n    symbol: T | undefined;\n    meta: StylableMeta;\n}\nexport interface CSSResolve<T extends StylableSymbol | STStructure.PartSymbol = StylableSymbol> {\n    _kind: 'css';\n    symbol: T;\n    meta: StylableMeta;\n}\nexport function isValidCSSResolve(resolved: CSSResolveMaybe): resolved is CSSResolve {\n    return resolved.symbol !== undefined;\n}\nexport type CSSResolvePath = Array<CSSResolve<ClassSymbol | ElementSymbol>>;\n\nexport interface JSResolve {\n    _kind: 'js';\n    symbol: unknown;\n    meta: null;\n}\n\nexport interface MetaResolvedSymbols {\n    mainNamespace: Record<string, StylableSymbol['_kind'] | 'js'>;\n    class: Record<string, Array<CSSResolve<ClassSymbol | ElementSymbol>>>;\n    element: Record<string, Array<CSSResolve<ClassSymbol | ElementSymbol>>>;\n    var: Record<string, CSSResolve<VarSymbol>>;\n    js: Record<string, JSResolve>;\n    customValues: Record<string, CustomValueExtension<any>>;\n    cssVar: Record<string, CSSResolve<CSSVarSymbol>>;\n    keyframes: Record<string, CSSResolve<KeyframesSymbol>>;\n    layer: Record<string, CSSResolve<LayerSymbol>>;\n    container: Record<string, CSSResolve<ContainerSymbol>>;\n    import: Record<string, CSSResolve<ImportSymbol>>;\n}\n\nexport type ReportError = (\n    res: CSSResolveMaybe | JSResolve | null,\n    extend: ImportSymbol | ClassSymbol | ElementSymbol,\n    extendPath: Array<CSSResolve<ClassSymbol | ElementSymbol>>,\n    meta: StylableMeta,\n    name: string,\n    isElement: boolean\n) => void;\n\nfunction isInPath(\n    extendPath: Array<CSSResolve<ClassSymbol | ElementSymbol>>,\n    { symbol: { name: name1 }, meta: { source: source1 } }: CSSResolve<ClassSymbol | ElementSymbol>\n) {\n    return extendPath.find(({ symbol: { name }, meta: { source } }) => {\n        return name1 === name && source === source1;\n    });\n}\n\n// this is a safe cache key delimiter for all OS;\nconst safePathDelimiter = ';:';\n\nexport class StylableResolver {\n    constructor(\n        protected fileProcessor: FileProcessor<StylableMeta>,\n        protected requireModule: (resolvedPath: string) => any,\n        protected moduleResolver: ModuleResolver,\n        protected cache?: StylableResolverCache\n    ) {}\n    public getModule({\n        context,\n        request,\n    }: Pick<Imported, 'context' | 'request'>): CachedModuleEntity {\n        let entity: CachedModuleEntity;\n        let resolvedPath: string | undefined;\n\n        const key = cacheKey(context, request);\n\n        if (this.cache?.has(key)) {\n            const entity = this.cache.get(key)!;\n            if (entity.kind === 'resolve') {\n                resolvedPath = entity.resolvedPath;\n            } else {\n                return entity;\n            }\n        }\n\n        try {\n            resolvedPath ||= this.moduleResolver(context, request);\n        } catch (error) {\n            entity = {\n                kind: request.endsWith('css') ? 'css' : 'js',\n                value: null,\n                error,\n                request,\n                context,\n                resolvedPath: undefined,\n            };\n            this.cache?.set(key, entity);\n            return entity;\n        }\n\n        if (resolvedPath.endsWith('.css')) {\n            const kind = 'css';\n            try {\n                entity = { kind, value: this.fileProcessor.process(resolvedPath), resolvedPath };\n            } catch (error) {\n                entity = { kind, value: null, error, request, context, resolvedPath };\n            }\n        } else {\n            const kind = 'js';\n            try {\n                entity = { kind, value: this.requireModule(resolvedPath), resolvedPath };\n            } catch (error) {\n                entity = { kind, value: null, error, request, context, resolvedPath };\n            }\n        }\n\n        this.cache?.set(key, entity);\n\n        return entity;\n    }\n    public analyze(filePath: string) {\n        return this.fileProcessor.process(filePath);\n    }\n    public resolvePath(directoryPath: string, request: string): string {\n        const key = cacheKey(directoryPath, request);\n        let resolvedPath = this.cache?.get(key)?.resolvedPath;\n        if (resolvedPath !== undefined) {\n            return resolvedPath;\n        }\n        resolvedPath = this.moduleResolver(directoryPath, request);\n        this.cache?.set(key, {\n            resolvedPath,\n            value: null,\n            kind: 'resolve',\n        });\n        return resolvedPath;\n    }\n    public resolveImported(\n        imported: Imported,\n        name: string,\n        subtype: 'mappedSymbols' | 'mappedKeyframes' | STSymbol.Namespaces = 'mappedSymbols'\n    ): CSSResolveMaybe | JSResolve | null {\n        const res = this.getModule(imported);\n        if (res.value === null) {\n            return null;\n        }\n\n        if (res.kind === 'css') {\n            const { value: meta } = res;\n            const namespace =\n                subtype === `mappedSymbols`\n                    ? `main`\n                    : subtype === 'mappedKeyframes'\n                    ? `keyframes`\n                    : subtype;\n            name = !name && namespace === `main` ? meta.root : name;\n            const symbol = STSymbol.getAll(meta, namespace)[name];\n            return {\n                _kind: 'css',\n                symbol,\n                meta,\n            };\n        } else {\n            const { value: jsModule } = res;\n            return {\n                _kind: 'js',\n                symbol: !name ? jsModule.default || jsModule : jsModule[name],\n                meta: null,\n            };\n        }\n    }\n    public resolveImport(importSymbol: ImportSymbol) {\n        const name = importSymbol.type === 'named' ? importSymbol.name : '';\n        return this.resolveImported(importSymbol.import, name);\n    }\n    public resolve(maybeImport: StylableSymbol | undefined): CSSResolveMaybe | JSResolve | null {\n        if (!maybeImport || maybeImport._kind !== 'import') {\n            if (\n                maybeImport &&\n                maybeImport._kind !== 'var' &&\n                maybeImport._kind !== 'cssVar' &&\n                maybeImport._kind !== 'keyframes' &&\n                maybeImport._kind !== 'layer' &&\n                maybeImport._kind !== 'container'\n            ) {\n                if (maybeImport.alias && !maybeImport[`-st-extends`]) {\n                    maybeImport = maybeImport.alias;\n                } else if (maybeImport[`-st-extends`]) {\n                    maybeImport = maybeImport[`-st-extends`];\n                } else {\n                    return null;\n                }\n            } else if (maybeImport && maybeImport._kind === 'cssVar') {\n                if (maybeImport.alias) {\n                    maybeImport = maybeImport.alias;\n                } else {\n                    return null;\n                }\n            } else {\n                return null;\n            }\n        }\n        if (!maybeImport || maybeImport._kind !== 'import') {\n            return null;\n        }\n        return this.resolveImport(maybeImport);\n    }\n    public deepResolve(\n        maybeImport: StylableSymbol | undefined,\n        path: StylableSymbol[] = []\n    ): CSSResolveMaybe | JSResolve | null {\n        let resolved = this.resolve(maybeImport);\n        while (\n            resolved &&\n            resolved._kind === 'css' &&\n            resolved.symbol &&\n            resolved.symbol._kind === 'import'\n        ) {\n            resolved = this.resolve(resolved.symbol);\n        }\n        if (resolved && resolved.symbol && resolved.meta) {\n            if (\n                ((resolved.symbol._kind === 'class' || resolved.symbol._kind === 'element') &&\n                    resolved.symbol.alias &&\n                    !resolved.symbol[`-st-extends`]) ||\n                (resolved.symbol._kind === 'cssVar' && resolved.symbol.alias)\n            ) {\n                if (path.includes(resolved.symbol)) {\n                    return { _kind: 'css', symbol: resolved.symbol, meta: resolved.meta };\n                }\n                path.push(resolved.symbol);\n                return this.deepResolve(resolved.symbol.alias, path);\n            }\n        }\n        return resolved;\n    }\n    public resolveSymbolOrigin(\n        symbol: StylableSymbol | undefined,\n        meta: StylableMeta,\n        path: StylableSymbol[] = []\n    ): CSSResolve | null {\n        if (!symbol || !meta) {\n            return null;\n        }\n        if (symbol._kind === 'element' || symbol._kind === 'class') {\n            if (path.includes(symbol)) {\n                return { meta, symbol, _kind: 'css' };\n            }\n            path.push(symbol);\n            const isAliasOnly = symbol.alias && !symbol[`-st-extends`];\n            return isAliasOnly\n                ? this.resolveSymbolOrigin(symbol.alias, meta, path)\n                : { meta, symbol, _kind: 'css' };\n        } else if (symbol._kind === 'cssVar') {\n            if (path.includes(symbol)) {\n                return { meta, symbol, _kind: 'css' };\n            }\n        } else if (symbol._kind === 'import') {\n            const resolved = this.resolveImport(symbol);\n            if (resolved && resolved.symbol && resolved._kind === 'css') {\n                return this.resolveSymbolOrigin(resolved.symbol, resolved.meta, path);\n            } else {\n                return null;\n            }\n        }\n        return null;\n    }\n    public resolveSymbols(meta: StylableMeta, diagnostics: Diagnostics) {\n        const resolvedSymbols: MetaResolvedSymbols = {\n            mainNamespace: {},\n            class: {},\n            element: {},\n            var: {},\n            js: {},\n            customValues: { ...stTypes },\n            keyframes: {},\n            layer: {},\n            container: {},\n            cssVar: {},\n            import: {},\n        };\n        // resolve main namespace\n        for (const [name, symbol] of Object.entries(meta.getAllSymbols())) {\n            let deepResolved: CSSResolveMaybe | JSResolve | null;\n            if (symbol._kind === `import` || (symbol._kind === `cssVar` && symbol.alias)) {\n                deepResolved = this.deepResolve(symbol);\n                if (!deepResolved || !deepResolved.symbol) {\n                    // diagnostics for unresolved imports are reported\n                    // as part of st-import validateImports\n                    continue;\n                } else if (deepResolved?._kind === `js`) {\n                    resolvedSymbols.js[name] = deepResolved;\n                    resolvedSymbols.mainNamespace[name] = `js`;\n\n                    const customValueSymbol = deepResolved.symbol;\n                    if (isCustomValue(customValueSymbol)) {\n                        resolvedSymbols.customValues[name] = customValueSymbol.register(name);\n                    }\n\n                    continue;\n                } else if (\n                    symbol._kind !== `cssVar` &&\n                    (deepResolved.symbol._kind === `class` ||\n                        deepResolved.symbol._kind === `element`)\n                ) {\n                    // virtual alias\n                    deepResolved = {\n                        _kind: `css`,\n                        meta,\n                        symbol: CSSClass.createSymbol({ name, alias: symbol }),\n                    };\n                }\n            } else {\n                deepResolved = { _kind: `css`, meta, symbol };\n            }\n            // deepResolved symbol is resolved by this point\n            switch (deepResolved.symbol!._kind) {\n                case `class`:\n                    resolvedSymbols.class[name] = this.resolveExtends(\n                        meta,\n                        deepResolved.symbol!,\n                        false,\n                        validateClassResolveExtends(\n                            meta,\n                            name,\n                            diagnostics,\n                            deepResolved as CSSResolve<ClassSymbol>\n                        )\n                    );\n                    break;\n                case `element`:\n                    resolvedSymbols.element[name] = this.resolveExtends(meta, name, true);\n                    break;\n                case `var`:\n                    resolvedSymbols.var[name] = deepResolved as CSSResolve<VarSymbol>;\n                    break;\n                case `cssVar`:\n                    resolvedSymbols.cssVar[name] = deepResolved as CSSResolve<CSSVarSymbol>;\n                    break;\n            }\n            resolvedSymbols.mainNamespace[name] = deepResolved.symbol!._kind;\n        }\n        // resolve keyframes\n        for (const [name, symbol] of Object.entries(CSSKeyframes.getAll(meta))) {\n            const result = resolveByNamespace(meta, symbol, this, 'keyframes');\n            if (result) {\n                resolvedSymbols.keyframes[name] = {\n                    _kind: `css`,\n                    meta: result.meta,\n                    symbol: result.symbol,\n                };\n            }\n        }\n        // resolve layers\n        for (const [name, symbol] of Object.entries(CSSLayer.getAll(meta))) {\n            const result = resolveByNamespace(meta, symbol, this, 'layer');\n            if (result) {\n                resolvedSymbols.layer[name] = {\n                    _kind: `css`,\n                    meta: result.meta,\n                    symbol: result.symbol,\n                };\n            }\n        }\n        // resolve containers\n        for (const [name, symbol] of Object.entries(CSSContains.getAll(meta))) {\n            const result = resolveByNamespace(meta, symbol, this, 'container');\n            if (result) {\n                resolvedSymbols.container[name] = {\n                    _kind: `css`,\n                    meta: result.meta,\n                    symbol: result.symbol,\n                };\n            }\n        }\n        return resolvedSymbols;\n    }\n    public resolveExtends(\n        meta: StylableMeta,\n        nameOrSymbol: string | ClassSymbol | ElementSymbol,\n        isElement = false,\n        reportError?: ReportError\n    ): CSSResolvePath {\n        const name = typeof nameOrSymbol === `string` ? nameOrSymbol : nameOrSymbol.name;\n        const symbol =\n            typeof nameOrSymbol === `string`\n                ? isElement\n                    ? meta.getTypeElement(nameOrSymbol)\n                    : meta.getClass(nameOrSymbol)\n                : nameOrSymbol;\n\n        if (!symbol) {\n            return [];\n        }\n\n        let current = {\n            _kind: 'css' as const,\n            symbol,\n            meta,\n        };\n        const extendPath: Array<CSSResolve<ClassSymbol | ElementSymbol>> = [];\n\n        while (current?.symbol) {\n            if (isInPath(extendPath, current)) {\n                break;\n            }\n\n            extendPath.push(current);\n\n            const parent = current.symbol[`-st-extends`] || current.symbol.alias;\n\n            if (parent) {\n                if (parent._kind === 'import') {\n                    const res = this.resolve(parent);\n                    if (\n                        res &&\n                        res._kind === 'css' &&\n                        res.symbol &&\n                        (res.symbol._kind === 'element' || res.symbol._kind === 'class')\n                    ) {\n                        const { _kind, meta, symbol } = res;\n                        current = {\n                            _kind,\n                            meta,\n                            symbol,\n                        };\n                    } else {\n                        if (reportError) {\n                            reportError(res, parent, extendPath, meta, name, isElement);\n                        }\n                        break;\n                    }\n                } else {\n                    current = { _kind: 'css', symbol: parent, meta: current.meta };\n                }\n            } else {\n                break;\n            }\n        }\n\n        return extendPath;\n    }\n}\n\nfunction cacheKey(context: string, request: string) {\n    return `${context}${safePathDelimiter}${request}`;\n}\n\nfunction validateClassResolveExtends(\n    meta: StylableMeta,\n    name: string,\n    diagnostics: Diagnostics,\n    deepResolved: CSSResolve<ClassSymbol>\n): ReportError | undefined {\n    return (res, extend) => {\n        const decl = findRule(meta.sourceAst, '.' + name);\n        if (decl) {\n            // ToDo: move to STExtends\n            if (res && res._kind === 'js') {\n                diagnostics.report(CSSClass.diagnostics.CANNOT_EXTEND_JS(), {\n                    node: decl,\n                    word: decl.value,\n                });\n            } else if (res && !res.symbol) {\n                diagnostics.report(CSSClass.diagnostics.CANNOT_EXTEND_UNKNOWN_SYMBOL(extend.name), {\n                    node: decl,\n                    word: decl.value,\n                });\n            } else {\n                diagnostics.report(CSSClass.diagnostics.IMPORT_ISNT_EXTENDABLE(), {\n                    node: decl,\n                    word: decl.value,\n                });\n            }\n        } else {\n            if (deepResolved.symbol.alias) {\n                meta.sourceAst.walkRules(new RegExp('\\\\.' + name), (rule) => {\n                    diagnostics.report(CSSClass.diagnostics.UNKNOWN_IMPORT_ALIAS(name), {\n                        node: rule,\n                        word: name,\n                    });\n                    return false;\n                });\n            }\n        }\n    };\n}\n\nexport function createSymbolResolverWithCache(\n    resolver: StylableResolver,\n    diagnostics: Diagnostics\n) {\n    const cache = new WeakMap<StylableMeta, MetaResolvedSymbols>();\n    return (meta: StylableMeta): MetaResolvedSymbols => {\n        let symbols = cache.get(meta);\n        if (!symbols) {\n            symbols = resolver.resolveSymbols(meta, diagnostics);\n            cache.set(meta, symbols);\n        }\n        return symbols;\n    };\n}\n\nfunction resolveByNamespace<NS extends STSymbol.Namespaces>(\n    meta: StylableMeta,\n    symbol: StylableSymbol,\n    resolver: StylableResolver,\n    type: NS\n): CSSResolve<STSymbol.SymbolByNamespace<NS>> | undefined {\n    const current = { meta, symbol };\n    while ('import' in current.symbol && current.symbol.import) {\n        const res = resolver.resolveImported(current.symbol.import, current.symbol.name, type);\n        if (res?._kind === 'css' && res.symbol?._kind === type) {\n            ({ meta: current.meta, symbol: current.symbol } = res);\n        } else {\n            return undefined;\n        }\n    }\n    if (current.symbol?._kind === type) {\n        return current as CSSResolve<STSymbol.SymbolByNamespace<typeof type>>;\n    }\n    return undefined;\n}\n", "import { dirname, relative } from 'path';\nimport postcssValueParser from 'postcss-value-parser';\nimport type * as postcss from 'postcss';\nimport { createDiagnosticReporter, Diagnostics } from './diagnostics';\nimport { nativeFunctionsDic } from './native-reserved-lists';\nimport { assureRelativeUrlPrefix } from './stylable-assets';\nimport type { StylableMeta } from './stylable-meta';\nimport {\n    StylableResolver,\n    createSymbolResolverWithCache,\n    MetaResolvedSymbols,\n} from './stylable-resolver';\nimport type { replaceValueHook, RuntimeStVar, StylableTransformer } from './stylable-transformer';\nimport { getFormatterArgs, getStringValue, stringifyFunction } from './helpers/value';\nimport { unescapeCSS } from './helpers/escape';\nimport type { ParsedValue } from './types';\nimport type { FeatureTransformContext } from './features/feature';\nimport { CSSCustomProperty, STVar } from './features';\nimport { unbox, CustomValueError } from './custom-values';\n\nexport interface EvalValueData {\n    value: string;\n    node?: postcss.Node;\n    meta: StylableMeta;\n    stVarOverride?: Record<string, string> | null;\n    args?: string[];\n    rootArgument?: string;\n    initialNode?: postcss.Node;\n}\n\nexport interface EvalValueResult {\n    topLevelType: any;\n    runtimeValue: RuntimeStVar;\n    outputValue: string;\n    typeError?: Error;\n}\n\nexport class StylableEvaluator {\n    public stVarOverride: Record<string, string> | null | undefined;\n    public getResolvedSymbols: (meta: StylableMeta) => MetaResolvedSymbols;\n    public valueHook?: replaceValueHook;\n    constructor(options: {\n        stVarOverride?: Record<string, string> | null;\n        valueHook?: replaceValueHook;\n        getResolvedSymbols: (meta: StylableMeta) => MetaResolvedSymbols;\n    }) {\n        this.valueHook = options.valueHook;\n        this.stVarOverride = options.stVarOverride;\n        this.getResolvedSymbols = options.getResolvedSymbols;\n    }\n    evaluateValue(\n        context: Omit<FeatureTransformContext, 'getResolvedSymbols'>,\n        data: Omit<EvalValueData, 'passedThrough' | 'valueHook'>\n    ) {\n        return processDeclarationValue(\n            context.resolver,\n            this.getResolvedSymbols,\n            data.value,\n            data.meta,\n            data.node,\n            data.stVarOverride || this.stVarOverride,\n            this.valueHook,\n            context.diagnostics,\n            context.passedThrough,\n            data.args,\n            data.rootArgument,\n            data.initialNode\n        );\n    }\n}\n\n// old API\n\nexport const functionDiagnostics = {\n    FAIL_TO_EXECUTE_FORMATTER: createDiagnosticReporter(\n        '15001',\n        'error',\n        (resolvedValue: string, message: string) =>\n            `failed to execute formatter \"${resolvedValue}\" with error: \"${message}\"`\n    ),\n    UNKNOWN_FORMATTER: createDiagnosticReporter(\n        '15002',\n        'error',\n        (name: string) => `cannot find native function or custom formatter called ${name}`\n    ),\n};\n\nexport function resolveArgumentsValue(\n    options: Record<string, string>,\n    transformer: StylableTransformer,\n    meta: StylableMeta,\n    diagnostics: Diagnostics,\n    node: postcss.Node,\n    variableOverride?: Record<string, string>,\n    path?: string[]\n) {\n    const resolvedArgs = {} as Record<string, string>;\n    for (const k in options) {\n        resolvedArgs[k] = evalDeclarationValue(\n            transformer.resolver,\n            unescapeCSS(options[k]),\n            meta,\n            node,\n            variableOverride,\n            transformer.replaceValueHook,\n            diagnostics,\n            path,\n            undefined\n        );\n    }\n    return resolvedArgs;\n}\n\nexport function processDeclarationValue(\n    resolver: StylableResolver,\n    getResolvedSymbols: (meta: StylableMeta) => MetaResolvedSymbols,\n    value: string,\n    meta: StylableMeta,\n    node?: postcss.Node,\n    variableOverride?: Record<string, string> | null,\n    valueHook?: replaceValueHook,\n    diagnostics: Diagnostics = new Diagnostics(),\n    passedThrough: string[] = [],\n    args: string[] = [],\n    rootArgument?: string,\n    initialNode?: postcss.Node\n): EvalValueResult {\n    const evaluator = new StylableEvaluator({\n        stVarOverride: variableOverride,\n        valueHook,\n        getResolvedSymbols,\n    });\n    const resolvedSymbols = getResolvedSymbols(meta);\n    const parsedValue: any = postcssValueParser(value);\n    parsedValue.walk((parsedNode: ParsedValue) => {\n        const { type, value } = parsedNode;\n        if (type === `function`) {\n            if (value === 'value') {\n                STVar.hooks.transformValue({\n                    context: {\n                        meta,\n                        diagnostics,\n                        resolver,\n                        evaluator,\n                        getResolvedSymbols,\n                        passedThrough,\n                    },\n                    data: {\n                        value,\n                        node,\n                        meta,\n                        stVarOverride: variableOverride,\n                        args,\n                        rootArgument,\n                        initialNode,\n                    },\n                    node: parsedNode,\n                });\n            } else if (value === '') {\n                parsedNode.resolvedValue = stringifyFunction(value, parsedNode);\n            } else if (resolvedSymbols.customValues[value]) {\n                // no op resolved at the bottom\n            } else if (value === 'url') {\n                // postcss-value-parser treats url differently:\n                // https://github.com/TrySound/postcss-value-parser/issues/34\n                const url = parsedNode.nodes[0];\n                if ((url.type === 'word' || url.type === 'string') && url.value.startsWith('~')) {\n                    const sourceDir = dirname(meta.source);\n                    url.value = assureRelativeUrlPrefix(\n                        relative(\n                            sourceDir,\n                            resolver.resolvePath(sourceDir, url.value.slice(1))\n                        ).replace(/\\\\/gm, '/')\n                    );\n                }\n            } else if (value === 'format') {\n                // preserve native format function arg quotation\n                parsedNode.resolvedValue = stringifyFunction(value, parsedNode, true);\n            } else if (resolvedSymbols.js[value]) {\n                const formatter = resolvedSymbols.js[value];\n                const formatterArgs = getFormatterArgs(parsedNode);\n                try {\n                    // ToDo: check if function instead of calling on a non function\n                    parsedNode.resolvedValue = (formatter.symbol as (...args: any[]) => any)(\n                        ...formatterArgs\n                    );\n                    if (evaluator.valueHook && typeof parsedNode.resolvedValue === 'string') {\n                        parsedNode.resolvedValue = evaluator.valueHook(\n                            parsedNode.resolvedValue,\n                            { name: parsedNode.value, args: formatterArgs },\n                            true,\n                            passedThrough\n                        );\n                    }\n                } catch (error) {\n                    parsedNode.resolvedValue = stringifyFunction(value, parsedNode);\n                    if (diagnostics && node) {\n                        diagnostics.report(\n                            functionDiagnostics.FAIL_TO_EXECUTE_FORMATTER(\n                                parsedNode.resolvedValue,\n                                (error as Error)?.message\n                            ),\n                            {\n                                node,\n                                word: (node as postcss.Declaration).value,\n                            }\n                        );\n                    }\n                }\n            } else if (value === 'var') {\n                CSSCustomProperty.hooks.transformValue({\n                    context: {\n                        meta,\n                        diagnostics,\n                        resolver,\n                        evaluator,\n                        getResolvedSymbols,\n                        passedThrough,\n                    },\n                    data: {\n                        value,\n                        node,\n                        meta,\n                        stVarOverride: variableOverride,\n                        args,\n                        rootArgument,\n                        initialNode,\n                    },\n                    node: parsedNode,\n                });\n            } else if (nativeFunctionsDic[value]) {\n                const { preserveQuotes } = nativeFunctionsDic[value];\n                parsedNode.resolvedValue = stringifyFunction(value, parsedNode, preserveQuotes);\n            } else if (node) {\n                parsedNode.resolvedValue = stringifyFunction(value, parsedNode);\n                diagnostics.report(functionDiagnostics.UNKNOWN_FORMATTER(value), {\n                    node,\n                    word: value,\n                });\n            }\n        }\n    }, true);\n\n    let outputValue = '';\n    let topLevelType = null;\n    let runtimeValue = null;\n    let typeError: Error | undefined = undefined;\n    for (const n of parsedValue.nodes) {\n        if (n.type === 'function') {\n            const matchingType = resolvedSymbols.customValues[n.value];\n\n            if (matchingType) {\n                try {\n                    topLevelType = matchingType.evalVarAst(n, resolvedSymbols.customValues, true);\n                    runtimeValue = unbox(topLevelType, true, resolvedSymbols.customValues, n);\n                    try {\n                        outputValue += matchingType.getValue(\n                            args,\n                            topLevelType,\n                            n,\n                            resolvedSymbols.customValues\n                        );\n                    } catch (error) {\n                        if (error instanceof CustomValueError) {\n                            outputValue += error.fallbackValue;\n                        } else {\n                            throw error;\n                        }\n                    }\n                } catch (e) {\n                    typeError = e as Error;\n\n                    const invalidNode = initialNode || node;\n\n                    if (invalidNode) {\n                        diagnostics.report(\n                            STVar.diagnostics.COULD_NOT_RESOLVE_VALUE(\n                                [...(rootArgument ? [rootArgument] : []), ...args].join(', ')\n                            ),\n                            {\n                                node: invalidNode,\n                                word: value,\n                            }\n                        );\n                    } else {\n                        // TODO: catch broken variable resolutions without a node\n                    }\n                }\n            } else {\n                outputValue += getStringValue([n]);\n            }\n        } else {\n            outputValue += getStringValue([n]);\n        }\n    }\n    return { outputValue, topLevelType, typeError, runtimeValue };\n}\n\nexport function evalDeclarationValue(\n    resolver: StylableResolver,\n    value: string,\n    meta: StylableMeta,\n    node?: postcss.Node,\n    variableOverride?: Record<string, string> | null,\n    valueHook?: replaceValueHook,\n    diagnostics?: Diagnostics,\n    passedThrough: string[] = [],\n    args: string[] = [],\n    getResolvedSymbols: (meta: StylableMeta) => MetaResolvedSymbols = createSymbolResolverWithCache(\n        resolver,\n        diagnostics || new Diagnostics()\n    )\n): string {\n    return processDeclarationValue(\n        resolver,\n        getResolvedSymbols,\n        value,\n        meta,\n        node,\n        variableOverride,\n        valueHook,\n        diagnostics,\n        passedThrough,\n        args\n    ).outputValue;\n}\n", "import path from 'path';\nimport type * as postcss from 'postcss';\nimport { processDeclarationFunctions } from './process-declaration-functions';\n\nfunction isExternal(url: string) {\n    return url === '' || url.startsWith('data:') || isUrl(url);\n}\n\nfunction isUrl(maybeUrl: string) {\n    maybeUrl = maybeUrl.trim();\n    if (maybeUrl.includes(' ')) {\n        return false;\n    }\n    try {\n        new URL(maybeUrl);\n        return true;\n    } catch {\n        return false;\n    }\n}\n\nexport function isAsset(url: string) {\n    return !isExternal(url);\n}\n\nexport function isRelativeNativeCss(fullPath: string) {\n    return (\n        fullPath.endsWith('.css') &&\n        !fullPath.endsWith('.st.css') &&\n        !fullPath.includes(path.sep + 'node_modules' + path.sep) &&\n        !isUrl(fullPath)\n    );\n}\n\nexport function makeAbsolute(\n    host: {\n        join: (...paths: string[]) => string;\n        isAbsolute: (path: string) => boolean;\n    },\n    resourcePath: string,\n    rootContext: string,\n    moduleContext: string\n) {\n    const isAbs = host.isAbsolute(resourcePath);\n    let abs: string;\n    if (isExternal(resourcePath) || resourcePath.startsWith('~')) {\n        abs = resourcePath;\n    } else if (isAbs && resourcePath.startsWith('/')) {\n        abs = host.join(rootContext, resourcePath);\n    } else if (isAbs) {\n        abs = resourcePath;\n    } else {\n        abs = host.join(moduleContext, resourcePath);\n    }\n    return abs;\n}\n\nexport function fixRelativeUrls(ast: postcss.Root, originPath: string, targetPath: string) {\n    ast.walkDecls((decl) => {\n        processDeclarationFunctions(\n            decl,\n            (node) => {\n                if (node.type === 'url') {\n                    if (!node.url || !isAsset(node.url) || !node.url.startsWith('.')) {\n                        return;\n                    }\n                    const url = path\n                        .join(\n                            path.relative(path.dirname(targetPath), path.dirname(originPath)),\n                            node.url\n                        )\n                        .replace(/\\\\/gm, '/');\n                    node.url = assureRelativeUrlPrefix(url);\n                }\n            },\n            true\n        );\n    });\n}\n\nexport function assureRelativeUrlPrefix(url: string) {\n    return !url.startsWith('./') && !url.startsWith('../') ? './' + url : url;\n}\n", "import type { Declaration } from 'postcss';\nimport { AnyValueNode, parseValues, stringifyValues } from 'css-selector-tokenizer';\n\nexport type OnFunction = (node: AnyValueNode, level: number) => void;\n\nexport function processDeclarationFunctions(\n    decl: Declaration,\n    onFunction: OnFunction,\n    transform = false\n) {\n    const ast = parseValues(decl.value);\n\n    ast.nodes.forEach((node) => findFunction(node, onFunction, 1));\n\n    if (transform) {\n        decl.value = stringifyValues(ast);\n    }\n}\n\nfunction findFunction(node: AnyValueNode, onFunctionNode: OnFunction, level: number) {\n    switch (node.type) {\n        case 'value':\n        case 'values':\n            onFunctionNode(node, level);\n            node.nodes.forEach((child) => findFunction(child, onFunctionNode, level));\n            break;\n        case 'url':\n        case 'item':\n            onFunctionNode(node, level);\n            break;\n        case 'nested-item':\n            onFunctionNode(node, level);\n            node.nodes.forEach((child) => findFunction(child, onFunctionNode, level + 1));\n            break;\n    }\n}\n", "import cssesc from 'cssesc';\n\nexport function unescapeCSS(text: string) {\n    return text.replace(/\\\\(.)/g, `$1`);\n}\n\nexport function namespaceEscape(name: string, namespace: string) {\n    return namespace ? cssesc(namespace, { isIdentifier: true }) + `__` + name : name;\n}\n", "import { plugableRecord } from '../helpers/plugable-record';\nimport { createFeature } from './feature';\nimport {\n    transformInlineCustomSelectorMap,\n    transformInlineCustomSelectors,\n    CustomSelectorMap,\n} from '../helpers/custom-selector';\nimport { parseSelectorWithCache } from '../helpers/selector';\nimport * as postcss from 'postcss';\nimport { SelectorList, stringifySelectorAst } from '@tokey/css-selector-parser';\nimport type { StylableMeta } from '../stylable-meta';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\n\nexport const diagnostics = {\n    UNKNOWN_CUSTOM_SELECTOR: createDiagnosticReporter(\n        '18001',\n        'error',\n        (selector: string) => `The selector '${selector}' is undefined`\n    ),\n};\n\ninterface AnalyzedCustomSelector {\n    selector: string;\n    ast: SelectorList;\n    isScoped: boolean;\n    def: postcss.AtRule;\n}\n\nconst dataKey = plugableRecord.key<Record<string, AnalyzedCustomSelector>>('st-custom-selector');\n\nexport const CUSTOM_SELECTOR_RE = /:--[\\w-]+/g;\n\n// HOOKS\n\nexport const hooks = createFeature({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {});\n    },\n    analyzeAtRule({ context, atRule, analyzeRule }) {\n        const params = atRule.params.split(/\\s/);\n        const customSelector = params.shift();\n        if (customSelector && customSelector.match(CUSTOM_SELECTOR_RE)) {\n            const selector = atRule.params.replace(customSelector, '').trim();\n            const ast = parseSelectorWithCache(selector, { clone: true });\n            const isScoped = analyzeRule(postcss.rule({ selector, source: atRule.source }), {\n                isScoped: false,\n                originalNode: atRule,\n            });\n            const analyzed = plugableRecord.getUnsafe(context.meta.data, dataKey);\n            const name = customSelector.slice(3);\n            analyzed[name] = { selector, ast, isScoped, def: atRule };\n        } else {\n            // TODO: add warn there are two types one is not valid name and the other is empty name.\n        }\n    },\n    analyzeDone(context) {\n        const analyzed = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        const customSelectors: CustomSelectorMap = {};\n        for (const [name, data] of Object.entries(analyzed)) {\n            customSelectors[name] = data.ast;\n        }\n        const inlined = transformInlineCustomSelectorMap(customSelectors, (report) => {\n            if (report.type === 'unknown' && analyzed[report.origin]) {\n                const unknownSelector = `:--${report.unknown}`;\n                context.diagnostics.report(diagnostics.UNKNOWN_CUSTOM_SELECTOR(unknownSelector), {\n                    node: analyzed[report.origin].def,\n                    word: unknownSelector,\n                });\n            } else if (report.type === 'circular') {\n                // ToDo: report error\n            }\n        });\n        // cache inlined selector\n        for (const [name, ast] of Object.entries(inlined)) {\n            analyzed[name].ast = ast;\n            analyzed[name].selector = stringifySelectorAst(ast);\n        }\n    },\n    prepareAST({ context, node, toRemove }) {\n        // called with experimentalSelectorInference=false\n        // split selectors & remove definitions\n        if (node.type === 'rule' && node.selector.match(CUSTOM_SELECTOR_RE)) {\n            node.selector = transformCustomSelectorInline(context.meta, node.selector, {\n                diagnostics: context.diagnostics,\n                node,\n            });\n        } else if (node.type === 'atrule' && node.name === 'custom-selector') {\n            toRemove.push(node);\n        }\n    },\n    transformSelectorNode({ context, selectorContext, node }) {\n        const customSelector =\n            node.value.startsWith('--') &&\n            getCustomSelectorExpended(context.meta, node.value.slice(2));\n        if (customSelector) {\n            const mappedSelectorAst = parseSelectorWithCache(customSelector, { clone: true });\n            const mappedContext = selectorContext.createNestedContext(mappedSelectorAst);\n            selectorContext.scopeSelectorAst(mappedContext);\n            const inferredSelector = selectorContext.experimentalSelectorInference\n                ? mappedContext.inferredMultipleSelectors\n                : mappedContext.inferredSelector;\n            selectorContext.setNextSelectorScope(inferredSelector, node); // doesn't add to the resolved elements\n            if (selectorContext.transform) {\n                selectorContext.transformIntoMultiSelector(node, mappedSelectorAst);\n            }\n        }\n        return !!customSelector;\n    },\n    transformAtRuleNode({ atRule }) {\n        if (atRule.name === 'custom-selector') {\n            atRule.remove();\n        }\n    },\n});\n\n// API\n\nexport function isScoped(meta: StylableMeta, name: string) {\n    const analyzed = plugableRecord.getUnsafe(meta.data, dataKey);\n    return analyzed[name]?.isScoped;\n}\n\nexport function getCustomSelector(meta: StylableMeta, name: string): SelectorList | undefined {\n    return plugableRecord.getUnsafe(meta.data, dataKey)[name]?.ast;\n}\nexport function getCustomSelectors(meta: StylableMeta) {\n    const analyzed = plugableRecord.getUnsafe(meta.data, dataKey);\n    return Object.entries(analyzed).reduce((acc, [name, { ast }]) => {\n        acc[name] = ast;\n        return acc;\n    }, {} as Record<string, AnalyzedCustomSelector['ast']>);\n}\n\nexport function getCustomSelectorExpended(meta: StylableMeta, name: string): string | undefined {\n    const analyzed = plugableRecord.getUnsafe(meta.data, dataKey);\n    return analyzed[name]?.selector;\n}\n\nexport function getCustomSelectorNames(meta: StylableMeta): string[] {\n    const analyzed = plugableRecord.getUnsafe(meta.data, dataKey);\n    return Object.keys(analyzed).map((name) => `:--${name}`);\n}\n\nexport function transformCustomSelectorInline(\n    meta: StylableMeta,\n    selector: string,\n    options: { diagnostics?: Diagnostics; node?: postcss.Node } = {}\n) {\n    const ast = parseSelectorWithCache(selector, { clone: true });\n    const analyzed = plugableRecord.getUnsafe(meta.data, dataKey);\n    const inlined = transformInlineCustomSelectors(\n        ast,\n        (name) => analyzed[name]?.ast,\n        (report) => {\n            if (options.diagnostics && options.node) {\n                const unknownSelector = `:--${report.unknown}`;\n                options.diagnostics.report(diagnostics.UNKNOWN_CUSTOM_SELECTOR(unknownSelector), {\n                    node: options.node,\n                    word: unknownSelector,\n                });\n            }\n        }\n    );\n    return stringifySelectorAst(inlined);\n}\n", "import { createFeature } from './feature';\nimport {\n    stateDiagnostics,\n    parsePseudoStates,\n    parseStateValue,\n    transformPseudoClassToCustomState,\n    booleanStateDelimiter,\n    stateMiddleDelimiter,\n    stateWithParamDelimiter,\n    createBooleanStateClassName,\n    createStateWithParamClassName,\n    systemValidators,\n    validationErrors as sysValidationErrors,\n    resolveStateParam,\n    isTemplateState,\n    MappedStates,\n} from '../helpers/custom-state';\n\nexport interface HasStates {\n    '-st-states': MappedStates;\n}\n\nexport const diagnostics = {\n    ...stateDiagnostics,\n};\n\n// HOOKS\n\nexport const hooks = createFeature({});\n\nconst delimiters = {\n    booleanStateDelimiter,\n    stateMiddleDelimiter,\n    stateWithParamDelimiter,\n};\nexport {\n    parsePseudoStates,\n    parseStateValue,\n    transformPseudoClassToCustomState,\n    delimiters,\n    createBooleanStateClassName,\n    createStateWithParamClassName,\n    systemValidators,\n    sysValidationErrors,\n    resolveStateParam,\n    isTemplateState,\n    MappedStates,\n};\n", "import type * as postcss from 'postcss';\nimport postcssValueParser, {\n    type Node as ValueNode,\n    type FunctionNode,\n} from 'postcss-value-parser';\nimport cssesc from 'cssesc';\nimport type { PseudoClass, SelectorList, SelectorNode } from '@tokey/css-selector-parser';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport {\n    parseSelectorWithCache,\n    stringifySelector,\n    convertToClass,\n    convertToInvalid,\n    convertToSelector,\n} from './selector';\nimport { groupValues, listOptions } from './value';\nimport { stripQuotation } from './string';\nimport { evalDeclarationValue } from '../functions';\nimport type { StylableMeta } from '../stylable-meta';\nimport type { StylableResolver } from '../stylable-resolver';\nimport type { ParsedValue } from '../types';\nimport { CSSClass } from '../features';\nimport { reservedFunctionalPseudoClasses } from '../native-reserved-lists';\nimport { BaseAstNode, stringifyCSSValue } from '@tokey/css-value-parser';\nimport { findCustomIdent, findNextCallNode } from './css-value-seeker';\n\nexport interface MappedStates {\n    [s: string]: StateParsedValue | string | TemplateStateParsedValue | null;\n}\nexport interface TemplateStateParsedValue {\n    type: 'template';\n    template: string;\n    params: [StateParsedValue];\n}\nexport interface StateParsedValue {\n    type: string;\n    defaultValue?: string;\n    arguments: StateArguments;\n}\nexport interface StateTypeValidator {\n    name: string;\n    args: string[];\n}\n\ntype StateArguments = Array<StateTypeValidator | string>;\n\nexport const stateMiddleDelimiter = '-';\nexport const booleanStateDelimiter = '--';\nexport const stateWithParamDelimiter = booleanStateDelimiter + stateMiddleDelimiter;\n\nexport const stateDiagnostics = {\n    MISSING_TYPE_OR_TEMPLATE: createDiagnosticReporter(\n        '08000',\n        'error',\n        (name: string) => `pseudo-state \"${name}\" missing type or template`\n    ),\n    UNKNOWN_STATE_TYPE: createDiagnosticReporter(\n        '08002',\n        'error',\n        (name: string, type: string) =>\n            `pseudo-state \"${name}\" defined with unknown type: \"${type}\"`\n    ),\n    TOO_MANY_STATE_TYPES: createDiagnosticReporter(\n        '08003',\n        'error',\n        (name: string, types: string[]) =>\n            `pseudo-state \"${name}(${types.join(', ')})\" definition must be of a single type`\n    ),\n    NO_STATE_TYPE_GIVEN: createDiagnosticReporter(\n        '08005',\n        'warning',\n        (name: string) =>\n            `pseudo-state \"${name}\" expected a definition of a single type, but received none`\n    ),\n    TOO_MANY_ARGS_IN_VALIDATOR: createDiagnosticReporter(\n        '08006',\n        'error',\n        (name: string, validator: string, args: string[]) =>\n            `pseudo-state \"${name}\" expected \"${validator}\" validator to receive a single argument, but it received \"${args.join(\n                ', '\n            )}\"`\n    ),\n    STATE_STARTS_WITH_HYPHEN: createDiagnosticReporter(\n        '08007',\n        'error',\n        (name: string) =>\n            `state \"${name}\" declaration cannot begin with a \"${stateMiddleDelimiter}\" character`\n    ),\n    RESERVED_NATIVE_STATE: createDiagnosticReporter(\n        '08008',\n        'warning',\n        (name: string) => `state \"${name}\" is reserved for native pseudo-class`\n    ),\n    DEFAULT_PARAM_FAILS_VALIDATION: createDiagnosticReporter(\n        '08010',\n        'error',\n        (stateName: string, defaultValue: string, errors: string[]) =>\n            `pseudo-state \"${stateName}\" default value \"${defaultValue}\" failed validation:\\n${errors.join(\n                '\\n'\n            )}`\n    ),\n    NO_STATE_ARGUMENT_GIVEN: createDiagnosticReporter(\n        '08004',\n        'error',\n        (name: string, type: string) =>\n            `pseudo-state \"${name}\" expected argument of type \"${type}\" but got none`\n    ),\n    FAILED_STATE_VALIDATION: createDiagnosticReporter(\n        '08009',\n        'error',\n        (name: string, actualParam: string, errors: string[]) =>\n            [\n                `pseudo-state \"${name}\" with parameter \"${actualParam}\" failed validation:`,\n                ...errors,\n            ].join('\\n')\n    ),\n    TEMPLATE_MISSING_PLACEHOLDER: createDiagnosticReporter(\n        '08011',\n        'warning',\n        (state: string, template: string) =>\n            `pseudo-state \"${state}\" template \"${template}\" is missing a placeholder, use \"$0\" to set the parameter insertion place`\n    ),\n    TEMPLATE_MULTI_PARAMETERS: createDiagnosticReporter(\n        '08012',\n        'error',\n        (state: string) => `pseudo-state \"${state}\" template only supports a single parameter`\n    ),\n    TEMPLATE_MISSING_PARAMETER: createDiagnosticReporter(\n        '08013',\n        'error',\n        (state: string) => `pseudo-state \"${state}\" template expected a parameter definition`\n    ),\n    UNSUPPORTED_MULTI_SELECTOR: createDiagnosticReporter(\n        '08014',\n        'error',\n        (state: string, finalSelector: string) =>\n            `pseudo-state \"${state}\" resulted in an unsupported multi selector \"${finalSelector}\"`\n    ),\n    UNSUPPORTED_COMPLEX_SELECTOR: createDiagnosticReporter(\n        '08015',\n        'error',\n        (state: string, finalSelector: string) =>\n            `pseudo-state \"${state}\" resulted in an unsupported complex selector \"${finalSelector}\"`\n    ),\n    INVALID_SELECTOR: createDiagnosticReporter(\n        '08016',\n        'error',\n        (state: string, finalSelector: string) =>\n            `pseudo-state \"${state}\" resulted in an invalid selector \"${finalSelector}\"`\n    ),\n    UNSUPPORTED_INITIAL_SELECTOR: createDiagnosticReporter(\n        '08017',\n        'error',\n        (state: string, finalSelector: string) =>\n            `pseudo-state \"${state}\" result cannot start with a type or universal selector \"${finalSelector}\"`\n    ),\n    NO_PARAM_REQUIRED: createDiagnosticReporter(\n        '08018',\n        'error',\n        (name: string, param: string) =>\n            `pseudo-state \"${name}\" accepts no parameter, but received \"${param}\"`\n    ),\n};\n\n// parse\n\nexport function parsePseudoStates(\n    value: string,\n    decl: postcss.Declaration,\n    diagnostics: Diagnostics\n) {\n    const mappedStates: MappedStates = {};\n    const ast = postcssValueParser(value);\n    const statesSplitByComma = groupValues(ast.nodes);\n\n    statesSplitByComma.forEach((workingState: ParsedValue[]) => {\n        const [stateDefinition, ...stateDefault] = workingState;\n        const stateName = stateDefinition.value;\n        if (!validateStateName(stateName, diagnostics, decl)) {\n            return;\n        }\n\n        if (stateDefinition.type === 'function') {\n            resolveStateType(\n                stateDefinition as FunctionNode,\n                mappedStates,\n                stateDefault,\n                diagnostics,\n                decl\n            );\n        } else if (stateDefinition.type === 'word') {\n            resolveBooleanState(mappedStates, stateDefinition);\n        } else {\n            // TODO: Invalid state, edge case needs warning\n        }\n    });\n\n    return mappedStates;\n}\nfunction validateStateName(name: string, diagnostics: Diagnostics, node: postcss.Node) {\n    if (name.startsWith('-')) {\n        diagnostics.report(stateDiagnostics.STATE_STARTS_WITH_HYPHEN(name), {\n            node: node,\n            word: name,\n        });\n    } else if (reservedFunctionalPseudoClasses.includes(name)) {\n        diagnostics.report(stateDiagnostics.RESERVED_NATIVE_STATE(name), {\n            node: node,\n            word: name,\n        });\n        return false;\n    }\n    return true;\n}\nexport function parseStateValue(\n    value: BaseAstNode[],\n    node: postcss.Node,\n    diagnostics: Diagnostics\n): [amountTaken: number, stateDef: MappedStates[string] | undefined] {\n    let stateName = '';\n    let stateDef: MappedStates[string] = null; /*boolean*/\n    let amountTaken = 0;\n    const customIdentResult = findCustomIdent(value, 0);\n    const [amountToName, nameNode] = customIdentResult[0]\n        ? customIdentResult\n        : findNextCallNode(value, 0);\n    if (nameNode && validateStateName(nameNode.value, diagnostics, node)) {\n        amountTaken += amountToName;\n        stateName = nameNode.value;\n        // state with parameter\n        if (nameNode.type === 'call') {\n            // take all of the definition since default value takes the rest\n            amountTaken = value.length;\n            // ToDo: translate resolveStateType to tokey and remove the double parsing\n            const postcssStateValue = postcssValueParser(\n                stringifyCSSValue(value.slice(amountToName - 1))\n            );\n            // get state definition\n            const [stateDefinition, ...stateDefault] = postcssStateValue.nodes;\n            const stateMap: MappedStates = {};\n            resolveStateType(\n                stateDefinition as FunctionNode,\n                stateMap,\n                stateDefault,\n                diagnostics,\n                node as postcss.Declaration // ToDo: change to accept any postcss node\n            );\n            if (stateMap[stateName]) {\n                stateDef = stateMap[stateName];\n            }\n        }\n    }\n    if (stateName) {\n        return [amountTaken, stateDef];\n    }\n    return [0, undefined];\n}\nfunction resolveBooleanState(mappedStates: MappedStates, stateDefinition: ParsedValue) {\n    const currentState = mappedStates[stateDefinition.value];\n    if (!currentState) {\n        mappedStates[stateDefinition.value] = null; // add boolean state\n    } else {\n        // TODO: warn with such name already exists\n    }\n}\nfunction resolveStateType(\n    stateDefinition: FunctionNode,\n    mappedStates: MappedStates,\n    stateDefault: ParsedValue[],\n    diagnostics: Diagnostics,\n    decl: postcss.Declaration\n) {\n    const stateName = stateDefinition.value;\n    if (stateDefinition.nodes.length === 0) {\n        resolveBooleanState(mappedStates, stateDefinition);\n\n        diagnostics.report(stateDiagnostics.NO_STATE_TYPE_GIVEN(stateName), {\n            node: decl,\n            word: decl.value,\n        });\n\n        return;\n    }\n    const { paramType, argsFirstNode, argsFullValue } = collectStateArgsDef(stateDefinition.nodes);\n\n    if (!paramType) {\n        diagnostics.report(stateDiagnostics.MISSING_TYPE_OR_TEMPLATE(stateName), {\n            node: decl,\n        });\n        return;\n    }\n\n    if (paramType?.type === 'string') {\n        defineTemplateState(\n            stateName,\n            paramType,\n            argsFirstNode,\n            argsFullValue,\n            mappedStates,\n            diagnostics,\n            decl\n        );\n    } else {\n        if (argsFullValue.length > 1) {\n            diagnostics.report(\n                stateDiagnostics.TOO_MANY_STATE_TYPES(\n                    stateName,\n                    argsFirstNode.map((argNode) =>\n                        argNode ? postcssValueParser.stringify(argNode) : ''\n                    )\n                ),\n                {\n                    node: decl,\n                    word: decl.value,\n                }\n            );\n        }\n        defineParamState(\n            stateName,\n            paramType,\n            stateDefault,\n            mappedStates,\n            diagnostics,\n            stateDefinition,\n            decl\n        );\n    }\n}\nfunction defineTemplateState(\n    stateName: string,\n    templateDef: postcssValueParser.StringNode,\n    argsFirstNode: (postcssValueParser.Node | undefined)[],\n    argsFullValue: postcssValueParser.Node[][],\n    mappedStates: MappedStates,\n    diagnostics: Diagnostics,\n    decl: postcss.Declaration\n) {\n    const template = stripQuotation(postcssValueParser.stringify(templateDef));\n    if (argsFullValue.length === 1) {\n        // simple template with no params\n        const selectorStr = template.trim().replace(/\\\\[\"']/g, '\"');\n        const selectorAst = parseSelectorWithCache(selectorStr, { clone: true });\n        if (\n            !validateTemplateSelector({\n                stateName,\n                selectorStr,\n                selectorAst,\n                cssNode: decl,\n                diagnostics,\n            })\n        ) {\n            return;\n        } else {\n            mappedStates[stateName] = selectorStr;\n        }\n    } else if (argsFullValue.length === 2) {\n        // single parameter template\n        if (!template.includes('$0')) {\n            diagnostics.report(stateDiagnostics.TEMPLATE_MISSING_PLACEHOLDER(stateName, template), {\n                node: decl,\n                word: template,\n            });\n        }\n\n        const paramFullDef = argsFullValue[1];\n        const paramTypeDef = argsFirstNode[1];\n        if (!paramTypeDef) {\n            diagnostics.report(stateDiagnostics.TEMPLATE_MISSING_PARAMETER(stateName), {\n                node: decl,\n            });\n            return;\n        }\n        const param = createStateParamDef(\n            stateName + ' parameter',\n            paramTypeDef,\n            paramFullDef.splice(paramFullDef.indexOf(paramTypeDef) + 1),\n            diagnostics,\n            decl\n        );\n        if (!param) {\n            // UNKNOWN_STATE_TYPE reported in createStateParamDef\n            return;\n        }\n\n        const templateStateType: TemplateStateParsedValue = {\n            type: 'template',\n            template,\n            params: [param],\n        };\n\n        mappedStates[stateName] = templateStateType;\n    } else {\n        // unsupported multiple params\n        diagnostics.report(stateDiagnostics.TEMPLATE_MULTI_PARAMETERS(stateName), {\n            node: decl,\n        });\n    }\n}\nfunction defineParamState(\n    stateName: string,\n    paramType: postcssValueParser.Node,\n    stateDefault: ParsedValue[],\n    mappedStates: MappedStates,\n    diagnostics: Diagnostics,\n    stateDefinition: FunctionNode,\n    decl: postcss.Declaration\n) {\n    if (paramType.value === 'boolean') {\n        // explicit boolean // ToDo: remove support\n        resolveBooleanState(mappedStates, stateDefinition);\n    } else {\n        const stateParamDef = createStateParamDef(\n            stateName,\n            paramType,\n            stateDefault,\n            diagnostics,\n            decl\n        );\n        if (stateParamDef) {\n            mappedStates[stateName] = stateParamDef;\n        }\n    }\n}\nfunction createStateParamDef(\n    stateName: string,\n    typeDef: postcssValueParser.Node,\n    stateDefault: ParsedValue[],\n    diagnostics: Diagnostics,\n    decl: postcss.Declaration\n): StateParsedValue | undefined {\n    const type = typeDef.value;\n    if (type in systemValidators && (typeDef.type === 'function' || typeDef.type === 'word')) {\n        const stateType: StateParsedValue = {\n            type,\n            arguments: [],\n            defaultValue: postcssValueParser\n                .stringify(stateDefault as postcssValueParser.Node[])\n                .trim(),\n        };\n        if (typeDef.type === 'function' && typeDef.nodes.length > 0) {\n            resolveArguments(typeDef, stateType, stateName, diagnostics, decl);\n        }\n        return stateType;\n    } else {\n        const srcValue = postcssValueParser.stringify(typeDef);\n        diagnostics.report(stateDiagnostics.UNKNOWN_STATE_TYPE(stateName, srcValue), {\n            node: decl,\n            word: srcValue,\n        });\n        return;\n    }\n}\nfunction collectStateArgsDef(nodes: ValueNode[]) {\n    const argsFullValue: ValueNode[][] = [];\n    const argsFirstNode: Array<ValueNode | undefined> = [];\n    let collectedArg: ValueNode[] = [];\n    let firstActualValue: ValueNode | undefined = undefined;\n\n    for (const node of nodes) {\n        if (node.type === 'div') {\n            argsFullValue.push(collectedArg);\n            argsFirstNode.push(firstActualValue);\n            collectedArg = [];\n            firstActualValue = undefined;\n        } else {\n            collectedArg.push(node);\n            if (!firstActualValue && node.type !== 'space' && node.type !== 'comment') {\n                firstActualValue = node;\n            }\n        }\n    }\n\n    if (collectedArg.length) {\n        argsFullValue.push(collectedArg);\n        argsFirstNode.push(firstActualValue);\n    }\n\n    const paramType = argsFirstNode[0];\n\n    return { paramType, argsFullValue, argsFirstNode };\n}\nfunction resolveArguments(\n    paramType: ParsedValue,\n    stateType: StateParsedValue,\n    name: string,\n    diagnostics: Diagnostics,\n    decl: postcss.Declaration\n) {\n    const separatedByComma = groupValues(paramType.nodes);\n\n    separatedByComma.forEach((group) => {\n        const validator = group[0];\n        if (validator.type === 'function') {\n            const args = listOptions(validator);\n            if (args.length > 1) {\n                diagnostics.report(\n                    stateDiagnostics.TOO_MANY_ARGS_IN_VALIDATOR(name, validator.value, args),\n                    {\n                        node: decl,\n                        word: decl.value,\n                    }\n                );\n            } else {\n                stateType.arguments.push({\n                    name: validator.value,\n                    args,\n                });\n            }\n        } else if (validator.type === 'string' || validator.type === 'word') {\n            stateType.arguments.push(validator.value);\n        }\n    });\n}\n\n// validation\n\nexport interface StateResult {\n    res: string;\n    errors: string[] | null;\n}\n\nexport const validationErrors = {\n    string: {\n        STRING_TYPE_VALIDATION_FAILED: (actualParam: string) =>\n            `\"${actualParam}\" should be of type string`,\n        REGEX_VALIDATION_FAILED: (regex: string, actualParam: string) =>\n            `expected \"${actualParam}\" to match regex \"${regex}\"`,\n        CONTAINS_VALIDATION_FAILED: (shouldContain: string, actualParam: string) =>\n            `expected \"${actualParam}\" to contain string \"${shouldContain}\"`,\n        MIN_LENGTH_VALIDATION_FAILED: (length: string, actualParam: string) =>\n            `expected \"${actualParam}\" to be of length longer than or equal to ${length}`,\n        MAX_LENGTH_VALIDATION_FAILED: (length: string, actualParam: string) =>\n            `expected \"${actualParam}\" to be of length shorter than or equal to ${length}`,\n        UKNOWN_VALIDATOR: (name: string) => `encountered unknown string validator \"${name}\"`,\n    },\n    number: {\n        NUMBER_TYPE_VALIDATION_FAILED: (actualParam: string) =>\n            `expected \"${actualParam}\" to be of type number`,\n        MIN_VALIDATION_FAILED: (actualParam: string, min: string) =>\n            `expected \"${actualParam}\" to be larger than or equal to ${min}`,\n        MAX_VALIDATION_FAILED: (actualParam: string, max: string) =>\n            `expected \"${actualParam}\" to be lesser then or equal to ${max}`,\n        MULTIPLE_OF_VALIDATION_FAILED: (actualParam: string, multipleOf: string) =>\n            `expected \"${actualParam}\" to be a multiple of ${multipleOf}`,\n        UKNOWN_VALIDATOR: (name: string) => `encountered unknown number validator \"${name}\"`,\n    },\n    enum: {\n        ENUM_TYPE_VALIDATION_FAILED: (actualParam: string, options: string[]) =>\n            `expected \"${actualParam}\" to be one of the options: \"${options.join(', ')}\"`,\n        NO_OPTIONS_DEFINED: () => `expected enum to be defined with one option or more`,\n    },\n};\n\nexport type SubValidator = (value: string, ...rest: string[]) => StateResult;\n\nexport interface StateParamType {\n    subValidators?: Record<string, SubValidator>;\n    validate(\n        value: any,\n        args: StateArguments,\n        resolveParam: any,\n        validateDefinition: boolean,\n        validateValue: boolean\n    ): StateResult;\n}\n\nexport const systemValidators: Record<string, StateParamType> = {\n    string: {\n        validate(\n            value: any,\n            validators: StateArguments,\n            resolveParam: (s: string) => string,\n            validateDefinition,\n            validateValue\n        ) {\n            const res = value;\n            const errors: string[] = [];\n\n            if (validateValue && typeof value !== 'string') {\n                errors.push(validationErrors.string.STRING_TYPE_VALIDATION_FAILED(value));\n            }\n\n            if (validators.length > 0) {\n                validators.forEach((validatorMeta) => {\n                    if (typeof validatorMeta === 'object') {\n                        if (this.subValidators && this.subValidators[validatorMeta.name]) {\n                            const subValidator = this.subValidators[validatorMeta.name];\n\n                            const validationRes = subValidator(\n                                value,\n                                resolveParam(validatorMeta.args[0])\n                            );\n\n                            if (validateValue && validationRes.errors) {\n                                errors.push(...validationRes.errors);\n                            }\n                        } else if (validateDefinition) {\n                            errors.push(\n                                validationErrors.string.UKNOWN_VALIDATOR(validatorMeta.name)\n                            );\n                        }\n                    }\n                });\n            }\n\n            return { res, errors: errors.length ? errors : null };\n        },\n        subValidators: {\n            regex: (value: string, regex: string) => {\n                const r = new RegExp(regex);\n                const valid = r.test(value);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.string.REGEX_VALIDATION_FAILED(regex, value)],\n                };\n            },\n            contains: (value: string, checkedValue: string) => {\n                const valid = !!~value.indexOf(checkedValue);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.string.CONTAINS_VALIDATION_FAILED(checkedValue, value)],\n                };\n            },\n            minLength: (value: string, length: string) => {\n                const valid = value.length >= Number(length);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.string.MIN_LENGTH_VALIDATION_FAILED(length, value)],\n                };\n            },\n            maxLength: (value: string, length: string) => {\n                const valid = value.length <= Number(length);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.string.MAX_LENGTH_VALIDATION_FAILED(length, value)],\n                };\n            },\n        },\n    },\n    number: {\n        validate(\n            value: any,\n            validators: StateArguments,\n            resolveParam: (s: string) => string,\n            validateDefinition,\n            validateValue\n        ) {\n            const res = value;\n            const errors: string[] = [];\n\n            if (isNaN(value)) {\n                if (validateValue) {\n                    errors.push(validationErrors.number.NUMBER_TYPE_VALIDATION_FAILED(value));\n                }\n            } else if (validators.length > 0) {\n                validators.forEach((validatorMeta) => {\n                    if (typeof validatorMeta === 'object') {\n                        if (this.subValidators && this.subValidators[validatorMeta.name]) {\n                            const subValidator = this.subValidators[validatorMeta.name];\n\n                            const validationRes = subValidator(\n                                value,\n                                resolveParam(validatorMeta.args[0])\n                            );\n\n                            if (validateValue && validationRes.errors) {\n                                errors.push(...validationRes.errors);\n                            }\n                        } else if (validateDefinition) {\n                            errors.push(\n                                validationErrors.number.UKNOWN_VALIDATOR(validatorMeta.name)\n                            );\n                        }\n                    }\n                });\n            }\n\n            return { res, errors: errors.length ? errors : null };\n        },\n        subValidators: {\n            min: (value: string, minValue: string) => {\n                const valid = Number(value) >= Number(minValue);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.number.MIN_VALIDATION_FAILED(value, minValue)],\n                };\n            },\n            max: (value: string, maxValue: string) => {\n                const valid = Number(value) <= Number(maxValue);\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [validationErrors.number.MAX_VALIDATION_FAILED(value, maxValue)],\n                };\n            },\n            multipleOf: (value: string, multipleOf: string) => {\n                const valid = Number(value) % Number(multipleOf) === 0;\n\n                return {\n                    res: value,\n                    errors: valid\n                        ? null\n                        : [\n                              validationErrors.number.MULTIPLE_OF_VALIDATION_FAILED(\n                                  value,\n                                  multipleOf\n                              ),\n                          ],\n                };\n            },\n        },\n    },\n    enum: {\n        validate(\n            value: any,\n            options: StateArguments,\n            resolveParam: (s: string) => string,\n            validateDefinition,\n            validateValue\n        ) {\n            const res = value;\n            const errors: string[] = [];\n\n            const stringOptions: string[] = [];\n\n            if (options.length) {\n                const isOneOf = options.some((option) => {\n                    if (typeof option === 'string') {\n                        stringOptions.push(option);\n                        return resolveParam(option) === value;\n                    }\n                    return true;\n                });\n                if (validateValue && !isOneOf) {\n                    errors.push(\n                        validationErrors.enum.ENUM_TYPE_VALIDATION_FAILED(value, stringOptions)\n                    );\n                }\n            } else if (validateDefinition) {\n                errors.push(validationErrors.enum.NO_OPTIONS_DEFINED());\n            }\n\n            return { res, errors: errors.length ? errors : null };\n        },\n    },\n};\n\nexport function validateRuleStateDefinition(\n    selector: string,\n    selectorNode: postcss.Rule | postcss.AtRule,\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics\n) {\n    const selectorAst = parseSelectorWithCache(selector);\n    if (selectorAst.length && selectorAst.length === 1) {\n        const singleSelectorAst = selectorAst[0];\n        const selectorChunk = singleSelectorAst.nodes;\n        if (selectorChunk.length === 1 && selectorChunk[0].type === 'class') {\n            const className = selectorChunk[0].value;\n            const classMeta = CSSClass.get(meta, className);\n            const states = classMeta?.[`-st-states`];\n\n            if (states && classMeta._kind === 'class') {\n                for (const stateName in states) {\n                    // TODO: Sort out types\n                    const state = states[stateName];\n                    if (state && typeof state === 'object') {\n                        const stateParam = isTemplateState(state) ? state.params[0] : state;\n                        const { errors } = validateStateArgument(\n                            stateParam,\n                            meta,\n                            stateParam.defaultValue || '',\n                            resolver,\n                            diagnostics,\n                            selectorNode,\n                            true,\n                            !!stateParam.defaultValue\n                        );\n                        if (errors && selectorNode.nodes) {\n                            for (const node of selectorNode.nodes) {\n                                if (node.type === 'decl' && node.prop === `-st-states`) {\n                                    diagnostics.report(\n                                        stateDiagnostics.DEFAULT_PARAM_FAILS_VALIDATION(\n                                            stateName,\n                                            stateParam.defaultValue || '',\n                                            errors\n                                        ),\n                                        {\n                                            node: node,\n                                            word: node.value,\n                                        }\n                                    );\n                                    break;\n                                }\n                            }\n                        }\n                    }\n                }\n            } else {\n                // TODO: error state on non-class\n            }\n        }\n    }\n}\n\nexport function validateStateArgument(\n    stateAst: StateParsedValue,\n    meta: StylableMeta,\n    value: string,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode?: postcss.Node,\n    validateDefinition?: boolean,\n    validateValue = true\n) {\n    const resolvedValidations: StateResult = {\n        res: resolveParam(\n            meta,\n            resolver,\n            diagnostics,\n            selectorNode,\n            value || stateAst.defaultValue\n        ),\n        errors: null,\n    };\n\n    const { type: paramType } = stateAst;\n    const validator = systemValidators[paramType];\n\n    try {\n        if (resolvedValidations.res || validateDefinition) {\n            const { errors } = validator.validate(\n                resolvedValidations.res,\n                stateAst.arguments,\n                resolveParam.bind(null, meta, resolver, diagnostics, selectorNode),\n                !!validateDefinition,\n                validateValue\n            );\n            resolvedValidations.errors = errors;\n        }\n    } catch (error) {\n        // TODO: warn about validation throwing exception\n    }\n\n    return resolvedValidations;\n}\n\n// transform\n\nexport function transformPseudoClassToCustomState(\n    stateDef: MappedStates[string],\n    meta: StylableMeta,\n    name: string,\n    stateNode: PseudoClass,\n    namespace: string,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode?: postcss.Node\n) {\n    if (stateDef === null || typeof stateDef === 'string') {\n        if (stateNode.nodes && selectorNode) {\n            diagnostics.report(\n                stateDiagnostics.NO_PARAM_REQUIRED(name, stringifySelector(stateNode.nodes)),\n                {\n                    node: selectorNode,\n                    word: stringifySelector(stateNode),\n                }\n            );\n        }\n        if (stateDef === null) {\n            // boolean\n            convertToClass(stateNode).value = createBooleanStateClassName(name, namespace);\n        } else {\n            // static template selector\n            // simply concat global mapped selector - ToDo: maybe change to 'selector'\n            convertToInvalid(stateNode).value = stateDef;\n        }\n        delete stateNode.nodes;\n    } else if (typeof stateDef === 'object') {\n        if (isTemplateState(stateDef)) {\n            convertTemplateState(\n                meta,\n                resolver,\n                diagnostics,\n                selectorNode,\n                stateNode,\n                stateDef,\n                name\n            );\n        } else {\n            resolveStateValue(\n                meta,\n                resolver,\n                diagnostics,\n                selectorNode,\n                stateNode,\n                stateDef,\n                name,\n                namespace\n            );\n        }\n    }\n}\nexport function isTemplateState(state: MappedStates[string]): state is TemplateStateParsedValue {\n    return !!state && typeof state === 'object' && state.type === 'template';\n}\n\nexport function createBooleanStateClassName(stateName: string, namespace: string) {\n    const escapedNamespace = cssesc(namespace, { isIdentifier: true });\n    return `${escapedNamespace}${booleanStateDelimiter}${stateName}`;\n}\n\nexport function createStateWithParamClassName(stateName: string, namespace: string, param: string) {\n    const escapedNamespace = cssesc(namespace, { isIdentifier: true });\n    return `${escapedNamespace}${stateWithParamDelimiter}${stateName}${resolveStateParam(\n        param,\n        true\n    )}`;\n}\n\nexport function resolveStateParam(param: string, escape = false) {\n    const result = `${stateMiddleDelimiter}${param.length}${stateMiddleDelimiter}${param.replace(\n        /\\s/gm,\n        '_'\n    )}`;\n    // adding/removing initial `s` to indicate that it's not the first param of the identifier\n    return escape ? cssesc(`s` + result, { isIdentifier: true }).slice(1) : result;\n}\nfunction convertTemplateState(\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode: postcss.Node | undefined,\n    stateNode: PseudoClass,\n    stateParamDef: TemplateStateParsedValue,\n    name: string\n) {\n    const paramStateDef = stateParamDef.params[0];\n    const resolvedParam = getParamInput(\n        meta,\n        resolver,\n        diagnostics,\n        selectorNode,\n        stateNode,\n        paramStateDef,\n        name\n    );\n\n    validateParam(meta, resolver, diagnostics, selectorNode, paramStateDef, resolvedParam, name);\n\n    const strippedParam = stripQuotation(resolvedParam);\n    transformMappedStateWithParam({\n        stateName: name,\n        template: stateParamDef.template,\n        param: strippedParam,\n        node: stateNode,\n        selectorNode: selectorNode,\n        diagnostics,\n    });\n}\nfunction getParamInput(\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode: postcss.Node | undefined,\n    stateNode: PseudoClass,\n    stateParamDef: StateParsedValue,\n    name: string\n) {\n    const inputValue =\n        stateNode.nodes && stateNode.nodes.length ? stringifySelector(stateNode.nodes) : ``;\n    const resolvedParam = resolveParam(\n        meta,\n        resolver,\n        diagnostics,\n        selectorNode,\n        inputValue ? inputValue : stateParamDef.defaultValue\n    );\n\n    if (selectorNode && !inputValue && !stateParamDef.defaultValue) {\n        diagnostics.report(stateDiagnostics.NO_STATE_ARGUMENT_GIVEN(name, stateParamDef.type), {\n            node: selectorNode,\n            word: name,\n        });\n    }\n    return resolvedParam;\n}\nfunction validateParam(\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode: postcss.Node | undefined,\n    stateParamDef: StateParsedValue,\n    resolvedParam: string,\n    name: string\n) {\n    const validator = systemValidators[stateParamDef.type];\n\n    let stateParamOutput: StateResult | undefined;\n    try {\n        stateParamOutput = validator.validate(\n            resolvedParam,\n            stateParamDef.arguments,\n            resolveParam.bind(null, meta, resolver, diagnostics, selectorNode),\n            false,\n            true\n        );\n    } catch (e) {\n        // TODO: warn about validation throwing exception\n    }\n\n    if (stateParamOutput !== undefined) {\n        if (stateParamOutput.res !== resolvedParam) {\n            resolvedParam = stateParamOutput.res;\n        }\n\n        if (selectorNode && stateParamOutput.errors) {\n            diagnostics.report(\n                stateDiagnostics.FAILED_STATE_VALIDATION(\n                    name,\n                    resolvedParam,\n                    stateParamOutput.errors\n                ),\n                {\n                    node: selectorNode,\n                    word: resolvedParam,\n                }\n            );\n        }\n    }\n}\nfunction resolveStateValue(\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    selectorNode: postcss.Node | undefined,\n    stateNode: PseudoClass,\n    stateParamDef: StateParsedValue,\n    name: string,\n    namespace: string\n) {\n    const resolvedParam = getParamInput(\n        meta,\n        resolver,\n        diagnostics,\n        selectorNode,\n        stateNode,\n        stateParamDef,\n        name\n    );\n\n    validateParam(meta, resolver, diagnostics, selectorNode, stateParamDef, resolvedParam, name);\n\n    const strippedParam = stripQuotation(resolvedParam);\n    convertToClass(stateNode).value = createStateWithParamClassName(name, namespace, strippedParam);\n    delete stateNode.nodes;\n}\n\nfunction transformMappedStateWithParam({\n    stateName,\n    template,\n    param,\n    node,\n    selectorNode,\n    diagnostics,\n}: {\n    stateName: string;\n    template: string;\n    param: string;\n    node: PseudoClass;\n    selectorNode?: postcss.Node;\n    diagnostics: Diagnostics;\n}) {\n    const selectorStr = template.replace(/\\$0/g, param);\n    const selectorAst = parseSelectorWithCache(selectorStr, { clone: true });\n    if (\n        !validateTemplateSelector({\n            stateName,\n            selectorStr,\n            selectorAst,\n            cssNode: selectorNode,\n            diagnostics,\n        })\n    ) {\n        return;\n    }\n    convertToSelector(node).nodes = selectorAst[0].nodes;\n}\n\nfunction validateTemplateSelector({\n    stateName,\n    selectorStr,\n    selectorAst,\n    cssNode,\n    diagnostics,\n}: {\n    stateName: string;\n    selectorStr: string;\n    selectorAst: SelectorList;\n    cssNode?: postcss.Node;\n    diagnostics: Diagnostics;\n}): boolean {\n    if (selectorAst.length > 1) {\n        if (cssNode) {\n            diagnostics.report(\n                stateDiagnostics.UNSUPPORTED_MULTI_SELECTOR(stateName, selectorStr),\n                {\n                    node: cssNode,\n                }\n            );\n        }\n        return false;\n    } else {\n        const firstSelector = selectorAst[0].nodes.find(({ type }) => type !== 'comment');\n        if (firstSelector?.type === 'type' || firstSelector?.type === 'universal') {\n            if (cssNode) {\n                diagnostics.report(\n                    stateDiagnostics.UNSUPPORTED_INITIAL_SELECTOR(stateName, selectorStr),\n                    {\n                        node: cssNode,\n                    }\n                );\n            }\n            return false;\n        }\n        let unexpectedSelector: undefined | SelectorNode = undefined;\n        for (const node of selectorAst[0].nodes) {\n            if (node.type === 'combinator' || node.type === 'invalid') {\n                unexpectedSelector = node;\n                break;\n            }\n        }\n        if (unexpectedSelector) {\n            if (cssNode) {\n                switch (unexpectedSelector.type) {\n                    case 'combinator':\n                        diagnostics.report(\n                            stateDiagnostics.UNSUPPORTED_COMPLEX_SELECTOR(stateName, selectorStr),\n                            {\n                                node: cssNode,\n                            }\n                        );\n                        break;\n                    case 'invalid':\n                        diagnostics.report(\n                            stateDiagnostics.INVALID_SELECTOR(stateName, selectorStr),\n                            {\n                                node: cssNode,\n                            }\n                        );\n                        break;\n                }\n            }\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction resolveParam(\n    meta: StylableMeta,\n    resolver: StylableResolver,\n    diagnostics: Diagnostics,\n    node?: postcss.Node,\n    nodeContent?: string\n) {\n    const defaultStringValue = '';\n    const param = nodeContent || defaultStringValue;\n    return evalDeclarationValue(resolver, param, meta, node, undefined, undefined, diagnostics);\n}\n", "import type { BaseAstNode, Call, CustomIdent, Literal } from '@tokey/css-value-parser';\n\nexport interface FindAstOptions {\n    stopOnFail: boolean;\n    ignoreWhitespace: boolean;\n    ignoreComments: boolean;\n    stopOnMatch?: (node: BaseAstNode, index: number, nodes: BaseAstNode[]) => boolean;\n    name?: string;\n}\n\ntype FindAstResult<T extends BaseAstNode> = [\n    takenNodeAmount: number,\n    matchedNode: T | undefined,\n    inspectedAmount: number\n];\n\nexport function findAnything(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n) {\n    return findValueAstNode(value, startIndex, () => true, options);\n}\n\nexport function findFatArrow(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<Literal & { value: '>' }> {\n    const [amountToEql, _eqlNode, eqlNodeInspectAmount] = findLiteral(value, startIndex, {\n        ...options,\n        name: '=',\n    });\n    if (amountToEql) {\n        const nextNode = value[startIndex + amountToEql];\n        if (isExactLiteral(nextNode, '>')) {\n            return [amountToEql + 1, nextNode, amountToEql + 1];\n        }\n    }\n    return [0, undefined, eqlNodeInspectAmount];\n}\nexport function isExactLiteral<T extends string>(\n    token: BaseAstNode,\n    name: T\n): token is Literal & { value: '>' } {\n    return token && token.type === 'literal' && token.value === name;\n}\nexport function findNextClassNode(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<CustomIdent> {\n    const name = options?.name || '';\n    let index = startIndex;\n    while (index < value.length) {\n        const [amountToDot, _dotNode] = findLiteral(value, index, { ...options, name: '.' });\n        if (amountToDot) {\n            index += amountToDot;\n            const [amountToName, nameNode] = findCustomIdent(value, index, {\n                name,\n                stopOnFail: true,\n            });\n            if (amountToName) {\n                return [amountToDot + amountToName, nameNode, index - startIndex + 1];\n            }\n        }\n        if (options?.stopOnFail) {\n            break;\n        }\n        index++;\n    }\n    return [0, undefined, value.length - startIndex];\n}\nexport function findNextPseudoClassNode(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<CustomIdent | Call> {\n    const name = options?.name || '';\n    let index = startIndex;\n    while (index < value.length) {\n        const [amountToColon] = findLiteral(value, index, { ...options, name: ':' });\n        if (amountToColon) {\n            index += amountToColon;\n            const nameOptions: FindAstOptions = {\n                name,\n                stopOnFail: true,\n                ignoreComments: true,\n                ignoreWhitespace: false,\n            };\n            const [amountToName, nameNode] = findCustomIdent(value, index, nameOptions);\n\n            if (amountToName) {\n                return [amountToColon + amountToName, nameNode, index - startIndex + 1];\n            } else {\n                const [amountToCall, callNode] = findNextCallNode(value, index, nameOptions);\n                if (amountToCall) {\n                    return [amountToColon + amountToCall, callNode, index - startIndex + 1];\n                } else {\n                    break;\n                }\n            }\n        } else if (options?.stopOnFail) {\n            break;\n        } else {\n            index++;\n        }\n    }\n    return [0, undefined, value.length - startIndex];\n}\n\nexport function findPseudoElementNode(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<CustomIdent | Call> {\n    let index = startIndex;\n    while (index < value.length) {\n        // first colon\n        const [amountToColon] = findLiteral(value, index, { ...options, name: ':' }); // second colon\n        if (amountToColon) {\n            index += amountToColon; // name\n            const [amountToSecondColon] = findLiteral(value, index, {\n                ...options,\n                name: ':',\n                stopOnFail: true,\n                ignoreWhitespace: false,\n            });\n            if (amountToSecondColon) {\n                index += amountToSecondColon;\n                const [amountToName, nameNode] = findCustomIdent(value, index, {\n                    ...options,\n                    stopOnFail: true,\n                });\n                if (nameNode) {\n                    return [\n                        index - startIndex + amountToName,\n                        nameNode,\n                        index - startIndex + amountToName,\n                    ];\n                }\n            }\n        }\n        if (options?.stopOnFail) {\n            break;\n        }\n        index++;\n    }\n    return [0, undefined, index - startIndex];\n}\n\nexport function findLiteral(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<Literal> {\n    const name = options?.name || '';\n    return findValueAstNode<Literal>(\n        value,\n        startIndex,\n        (node) => node.type === 'literal' && (!name || node.value === name),\n        options\n    );\n}\nexport function findCustomIdent(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<CustomIdent> {\n    const name = options?.name || '';\n    return findValueAstNode<CustomIdent>(\n        value,\n        startIndex,\n        (node) => node.type === '<custom-ident>' && (!name || node.value === name),\n        options\n    );\n}\nexport function findNextCallNode(\n    value: BaseAstNode[],\n    startIndex: number,\n    options?: Partial<FindAstOptions>\n): FindAstResult<Call> {\n    const name = options?.name || '';\n    return findValueAstNode(\n        value,\n        startIndex,\n        (node) => node.type === 'call' && (!name || node.value === name),\n        options\n    );\n}\n\nexport function findValueAstNode<T extends BaseAstNode>(\n    valueAst: BaseAstNode[],\n    startIndex: number,\n    check: (node: BaseAstNode) => boolean,\n    {\n        stopOnFail = true,\n        ignoreWhitespace = true,\n        ignoreComments = true,\n        stopOnMatch,\n    }: Partial<FindAstOptions> = {}\n): FindAstResult<T> {\n    let index = startIndex;\n    while (index < valueAst.length) {\n        const node = valueAst[index];\n        if (ignoreComments && node.type === 'comment') {\n            // continue;\n        } else if (ignoreWhitespace && node.type === 'space') {\n            // continue;\n        } else if (check(node)) {\n            return [index - startIndex + 1, node as T, index - startIndex + 1];\n        } else if (stopOnFail || stopOnMatch?.(node, index, valueAst)) {\n            break;\n        }\n        index++;\n    }\n    return [0, undefined, index - startIndex];\n}\n", "import { createFeature, FeatureTransformContext } from './feature';\nimport * as STSymbol from './st-symbol';\nimport type { ImportSymbol } from './st-import';\nimport * as STCustomSelector from './st-custom-selector';\nimport * as STVar from './st-var';\nimport type { ElementSymbol } from './css-type';\nimport type { ClassSymbol } from './css-class';\nimport { createSubsetAst, isStMixinMarker } from '../helpers/rule';\nimport { scopeNestedSelector } from '../helpers/selector';\nimport { mixinHelperDiagnostics, parseStMixin, parseStPartialMixin } from '../helpers/mixin';\nimport { resolveArgumentsValue } from '../functions';\nimport { cssObjectToAst } from '../parser';\nimport * as postcss from 'postcss';\nimport postcssValueParser, { FunctionNode, WordNode } from 'postcss-value-parser';\nimport { fixRelativeUrls } from '../stylable-assets';\nimport { isValidDeclaration, mergeRules, utilDiagnostics } from '../stylable-utils';\nimport type { StylableMeta } from '../stylable-meta';\nimport type { CSSResolve, MetaResolvedSymbols } from '../stylable-resolver';\nimport type { StylableTransformer } from '../stylable-transformer';\nimport { dirname } from 'path';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport type { Stylable } from '../stylable';\nimport { parseCssSelector } from '@tokey/css-selector-parser';\n\nexport interface MixinValue {\n    type: string;\n    options: Array<{ value: string }> | Record<string, string>;\n    partial?: boolean;\n    valueNode?: FunctionNode | WordNode;\n    originDecl: postcss.Declaration;\n}\n\nexport type ValidMixinSymbols = ImportSymbol | ClassSymbol | ElementSymbol;\n\nexport type AnalyzedMixin =\n    | {\n          valid: true;\n          data: MixinValue;\n          symbol: ValidMixinSymbols;\n      }\n    | {\n          valid: false;\n          data: MixinValue;\n          symbol: Exclude<STSymbol.StylableSymbol, ValidMixinSymbols> | undefined;\n      };\n\nexport type MixinReflection =\n    | {\n          name: string;\n          kind: 'css-fragment';\n          args: Record<string, string>[];\n          optionalArgs: Map<string, { name: string }>;\n      }\n    | { name: string; kind: 'js-func'; args: string[]; func: (...args: any[]) => any }\n    | { name: string; kind: 'invalid'; args: string };\n\nexport const MixinType = {\n    ALL: `-st-mixin`,\n    PARTIAL: `-st-partial-mixin`,\n} as const;\n\nexport const diagnostics = {\n    VALUE_CANNOT_BE_STRING: mixinHelperDiagnostics.VALUE_CANNOT_BE_STRING,\n    INVALID_NAMED_PARAMS: mixinHelperDiagnostics.INVALID_NAMED_PARAMS,\n    INVALID_MERGE_OF: utilDiagnostics.INVALID_MERGE_OF,\n    INVALID_RECURSIVE_MIXIN: utilDiagnostics.INVALID_RECURSIVE_MIXIN,\n    PARTIAL_MIXIN_MISSING_ARGUMENTS: createDiagnosticReporter(\n        '10001',\n        'error',\n        (type: string) =>\n            `\"${MixinType.PARTIAL}\" can only be used with override arguments provided, missing overrides on \"${type}\"`\n    ),\n    UNKNOWN_MIXIN: createDiagnosticReporter(\n        '10002',\n        'error',\n        (name: string) => `unknown mixin: \"${name}\"`\n    ),\n    OVERRIDE_MIXIN: createDiagnosticReporter(\n        '10003',\n        'warning',\n        (mixinType: string) => `override ${mixinType} on same rule`\n    ),\n    FAILED_TO_APPLY_MIXIN: createDiagnosticReporter(\n        '10004',\n        'error',\n        (error: string) => `could not apply mixin: ${error}`\n    ),\n    JS_MIXIN_NOT_A_FUNC: createDiagnosticReporter(\n        '10005',\n        'error',\n        () => `js mixin must be a function`\n    ),\n    UNSUPPORTED_MIXIN_SYMBOL: createDiagnosticReporter(\n        '10007',\n        'error',\n        (name: string, symbolType: STSymbol.StylableSymbol['_kind']) =>\n            `cannot mix unsupported symbol \"${name}\" of type \"${STSymbol.readableTypeMap[symbolType]}\"`\n    ),\n    CIRCULAR_MIXIN: createDiagnosticReporter(\n        '10006',\n        'error',\n        (circularPaths: string[]) => `circular mixin found: ${circularPaths.join(' --> ')}`\n    ),\n    UNKNOWN_ARG: createDiagnosticReporter(\n        '10009',\n        'warning',\n        (argName) => `unknown mixin argument \"${argName}\"`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature({\n    transformSelectorNode({ selectorContext, node }) {\n        const isMarker = isStMixinMarker(node);\n        if (isMarker) {\n            selectorContext.setNextSelectorScope(\n                selectorContext.inferredSelectorMixin,\n                node,\n                node.value\n            );\n        }\n        return isMarker;\n    },\n    transformLastPass({ context, ast, transformer, path }) {\n        ast.walkRules((rule) => appendMixins(context, transformer, rule, path));\n    },\n});\n\n// API\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n    public resolveExpr(\n        meta: StylableMeta,\n        expr: string,\n        {\n            diagnostics = new Diagnostics(),\n            resolveOptionalArgs = false,\n        }: { diagnostics?: Diagnostics; resolveOptionalArgs?: boolean } = {}\n    ) {\n        const resolvedSymbols = this.stylable.resolver.resolveSymbols(meta, diagnostics);\n        const { mainNamespace } = resolvedSymbols;\n        const analyzedMixins = collectDeclMixins(\n            { meta, diagnostics },\n            resolvedSymbols,\n            postcss.decl({ prop: '-st-mixin', value: expr }),\n            (mixinSymbolName) => (mainNamespace[mixinSymbolName] === 'js' ? 'args' : 'named')\n        );\n        const result: MixinReflection[] = [];\n        for (const { data } of analyzedMixins) {\n            const name = data.type;\n            const symbolKind = mainNamespace[name];\n            if (symbolKind === 'class' || symbolKind === 'element') {\n                const mixRef: MixinReflection = {\n                    name,\n                    kind: 'css-fragment',\n                    args: [],\n                    optionalArgs: new Map(),\n                };\n                for (const [argName, argValue] of Object.entries(data.options)) {\n                    mixRef.args.push({ [argName]: argValue });\n                }\n                if (resolveOptionalArgs) {\n                    const varMap = new Map<string, { name: string }>();\n                    const resolveChain = resolvedSymbols[symbolKind][name];\n                    getCSSMixinRoots(meta, resolveChain, ({ mixinRoot }) => {\n                        const names = new Set<string>();\n                        collectOptionalArgs(\n                            { meta, resolver: this.stylable.resolver },\n                            mixinRoot,\n                            names\n                        );\n                        names.forEach((name) => varMap.set(name, { name }));\n                    });\n                    mixRef.optionalArgs = varMap;\n                }\n                result.push(mixRef);\n            } else if (\n                symbolKind === 'js' &&\n                typeof resolvedSymbols.js[name].symbol === 'function'\n            ) {\n                const mixRef: MixinReflection = {\n                    name,\n                    kind: 'js-func',\n                    args: [],\n                    func: resolvedSymbols.js[name].symbol as (...args: any[]) => any,\n                };\n                for (const arg of Object.values(data.options)) {\n                    mixRef.args.push(arg.value);\n                }\n                result.push(mixRef);\n            } else {\n                result.push({\n                    name,\n                    kind: 'invalid',\n                    args:\n                        data.valueNode?.type === 'function'\n                            ? postcssValueParser.stringify(data.valueNode.nodes)\n                            : '',\n                });\n            }\n        }\n        return result;\n    }\n    public scopeNestedSelector(scopeSelector: string, nestSelector: string): string {\n        return scopeNestedSelector(parseCssSelector(scopeSelector), parseCssSelector(nestSelector))\n            .selector;\n    }\n}\n\nfunction appendMixins(\n    context: FeatureTransformContext,\n    transformer: StylableTransformer,\n    rule: postcss.Rule,\n    path: string[] = []\n) {\n    const [decls, mixins] = collectRuleMixins(context, rule);\n    if (!mixins || mixins.length === 0) {\n        return;\n    }\n    for (const mixin of mixins) {\n        if (mixin.valid) {\n            appendMixin(context, { transformer, mixDef: mixin, rule, path });\n        }\n    }\n    for (const mixinDecl of decls) {\n        mixinDecl.remove();\n    }\n}\n\nfunction collectRuleMixins(\n    context: FeatureTransformContext,\n    rule: postcss.Rule\n): [decls: postcss.Declaration[], mixins: AnalyzedMixin[]] {\n    let mixins: AnalyzedMixin[] = [];\n    const resolvedSymbols = context.getResolvedSymbols(context.meta);\n    const { mainNamespace } = resolvedSymbols;\n    const decls: postcss.Declaration[] = [];\n    for (const node of rule.nodes) {\n        if (\n            node.type === 'decl' &&\n            (node.prop === `-st-mixin` || node.prop === `-st-partial-mixin`)\n        ) {\n            decls.push(node);\n            mixins = collectDeclMixins(\n                context,\n                resolvedSymbols,\n                node,\n                (mixinSymbolName) => {\n                    return mainNamespace[mixinSymbolName] === 'js' ? 'args' : 'named';\n                },\n                mixins\n            );\n        }\n    }\n    return [decls, mixins];\n}\n\nfunction collectDeclMixins(\n    context: Pick<FeatureTransformContext, 'meta' | 'diagnostics'>,\n    resolvedSymbols: MetaResolvedSymbols,\n    decl: postcss.Declaration,\n    paramSignature: (mixinSymbolName: string) => 'named' | 'args',\n    previousMixins?: AnalyzedMixin[]\n): AnalyzedMixin[] {\n    const { meta } = context;\n    let mixins: AnalyzedMixin[] = [];\n    const parser =\n        decl.prop === MixinType.ALL\n            ? parseStMixin\n            : decl.prop === MixinType.PARTIAL\n            ? parseStPartialMixin\n            : null;\n    if (!parser) {\n        return previousMixins || mixins;\n    }\n\n    parser(decl, paramSignature, context.diagnostics, /*emitStrategyDiagnostics*/ true).forEach(\n        (mixin) => {\n            const mixinRefSymbol = STSymbol.get(meta, mixin.type);\n            const symbolName = mixin.type;\n            const resolvedType = resolvedSymbols.mainNamespace[symbolName];\n            if (\n                resolvedType &&\n                ((resolvedType === 'js' &&\n                    typeof resolvedSymbols.js[symbolName].symbol === 'function') ||\n                    resolvedType === 'class' ||\n                    resolvedType === 'element')\n            ) {\n                mixins.push({\n                    valid: true,\n                    data: mixin,\n                    symbol: mixinRefSymbol as ValidMixinSymbols,\n                });\n                if (mixin.partial && Object.keys(mixin.options).length === 0) {\n                    context.diagnostics.report(\n                        diagnostics.PARTIAL_MIXIN_MISSING_ARGUMENTS(mixin.type),\n                        {\n                            node: decl,\n                            word: mixin.type,\n                        }\n                    );\n                }\n            } else {\n                mixins.push({\n                    valid: false,\n                    data: mixin,\n                    symbol: mixinRefSymbol as\n                        | Exclude<STSymbol.StylableSymbol, ValidMixinSymbols>\n                        | undefined,\n                });\n                if (resolvedType === 'js') {\n                    context.diagnostics.report(diagnostics.JS_MIXIN_NOT_A_FUNC(), {\n                        node: decl,\n                        word: mixin.type,\n                    });\n                } else if (resolvedType) {\n                    context.diagnostics.report(\n                        diagnostics.UNSUPPORTED_MIXIN_SYMBOL(mixin.type, resolvedType),\n                        {\n                            node: decl,\n                            word: mixin.type,\n                        }\n                    );\n                } else {\n                    context.diagnostics.report(diagnostics.UNKNOWN_MIXIN(mixin.type), {\n                        node: decl,\n                        word: mixin.type,\n                    });\n                }\n            }\n        }\n    );\n\n    if (previousMixins) {\n        const partials = previousMixins.filter((r) => r.data.partial);\n        const nonPartials = previousMixins.filter((r) => !r.data.partial);\n        const isInPartial = decl.prop === MixinType.PARTIAL;\n        if (\n            (partials.length && decl.prop === MixinType.PARTIAL) ||\n            (nonPartials.length && decl.prop === MixinType.ALL)\n        ) {\n            context.diagnostics.report(diagnostics.OVERRIDE_MIXIN(decl.prop), { node: decl });\n        }\n        if (partials.length && nonPartials.length) {\n            mixins = isInPartial ? nonPartials.concat(mixins) : partials.concat(mixins);\n        } else if (partials.length) {\n            mixins = isInPartial ? mixins : partials.concat(mixins);\n        } else if (nonPartials.length) {\n            mixins = isInPartial ? nonPartials.concat(mixins) : mixins;\n        }\n    }\n    return mixins;\n}\n\ninterface ApplyMixinContext {\n    transformer: StylableTransformer;\n    mixDef: AnalyzedMixin & { valid: true };\n    rule: postcss.Rule;\n    path: string[];\n}\n\nfunction appendMixin(context: FeatureTransformContext, config: ApplyMixinContext) {\n    if (checkRecursive(context, config)) {\n        return;\n    }\n    const resolvedSymbols = context.getResolvedSymbols(context.meta);\n    const symbolName = config.mixDef.data.type;\n    const resolvedType = resolvedSymbols.mainNamespace[symbolName];\n    if (resolvedType === `class` || resolvedType === `element`) {\n        const resolveChain = resolvedSymbols[resolvedType][symbolName];\n        handleCSSMixin(context, config, resolveChain);\n        return;\n    } else if (resolvedType === `js`) {\n        const jsValue = resolvedSymbols.js[symbolName].symbol;\n        if (typeof jsValue === 'function') {\n            try {\n                handleJSMixin(context, config, jsValue as (...args: any[]) => any);\n            } catch (e) {\n                context.diagnostics.report(diagnostics.FAILED_TO_APPLY_MIXIN(String(e)), {\n                    node: config.rule,\n                    word: config.mixDef.data.type,\n                });\n                return;\n            }\n        }\n        return;\n    }\n}\n\nfunction checkRecursive(\n    { meta, diagnostics: report }: FeatureTransformContext,\n    { mixDef, path, rule }: ApplyMixinContext\n) {\n    const symbolName =\n        mixDef.symbol.name === meta.root\n            ? mixDef.symbol._kind === 'class'\n                ? meta.root\n                : 'default'\n            : mixDef.data.type;\n    const isRecursive = path.includes(symbolName + ' from ' + meta.source);\n    if (isRecursive) {\n        // Todo: add test verifying word\n        report.report(diagnostics.CIRCULAR_MIXIN(path), {\n            node: rule,\n            word: symbolName,\n        });\n        return true;\n    }\n    return false;\n}\n\nfunction handleJSMixin(\n    context: FeatureTransformContext,\n    config: ApplyMixinContext,\n    mixinFunction: (...args: any[]) => any\n) {\n    const stVarOverride = context.evaluator.stVarOverride || {};\n    const meta = context.meta;\n    const mixDef = config.mixDef;\n    const res = mixinFunction((mixDef.data.options as any[]).map((v) => v.value));\n    const mixinRoot = cssObjectToAst(res);\n\n    mixinRoot.walkDecls((decl) => {\n        if (!isValidDeclaration(decl)) {\n            decl.value = String(decl);\n        }\n    });\n\n    config.transformer.transformAst(mixinRoot, meta, undefined, stVarOverride, [], true);\n    const mixinPath = (mixDef.symbol as ImportSymbol).import.request;\n    fixRelativeUrls(\n        mixinRoot,\n        context.resolver.resolvePath(dirname(meta.source), mixinPath),\n        meta.source\n    );\n\n    mergeRules(mixinRoot, config.rule, mixDef.data.originDecl, context.diagnostics, true);\n}\n\nfunction handleCSSMixin(\n    context: FeatureTransformContext,\n    config: ApplyMixinContext,\n    resolveChain: CSSResolve<ClassSymbol | ElementSymbol>[]\n) {\n    const mixDef = config.mixDef;\n    const isPartial = mixDef.data.partial;\n    const namedArgs = mixDef.data.options as Record<string, string>;\n    const overrideKeys = Object.keys(namedArgs);\n\n    if (isPartial && overrideKeys.length === 0) {\n        return;\n    }\n\n    const optionalArgs = new Set<string>();\n    const roots = getCSSMixinRoots(\n        context.meta,\n        resolveChain,\n        ({ mixinRoot, resolved, isRootMixin }) => {\n            const stVarOverride = context.evaluator.stVarOverride || {};\n            const mixDef = config.mixDef;\n            const namedArgs = mixDef.data.options as Record<string, string>;\n\n            if (mixDef.data.partial) {\n                filterPartialMixinDecl(context.meta, mixinRoot, Object.keys(namedArgs));\n            }\n\n            // resolve override args\n            const resolvedArgs = resolveArgumentsValue(\n                namedArgs,\n                config.transformer,\n                context.meta,\n                context.diagnostics,\n                mixDef.data.originDecl,\n                stVarOverride,\n                config.path\n            );\n            collectOptionalArgs(\n                { meta: resolved.meta, resolver: context.resolver },\n                mixinRoot,\n                optionalArgs\n            );\n            // transform mixin\n            const mixinMeta: StylableMeta = resolved.meta;\n            const symbolName =\n                isRootMixin && resolved.meta !== context.meta ? 'default' : mixDef.data.type;\n            config.transformer.transformAst(\n                mixinRoot,\n                mixinMeta,\n                undefined,\n                resolvedArgs,\n                config.path.concat(symbolName + ' from ' + context.meta.source),\n                true,\n                config.transformer.createInferredSelector(mixinMeta, {\n                    name: resolved.symbol.name,\n                    type: resolved.symbol._kind,\n                })\n            );\n            fixRelativeUrls(mixinRoot, resolved.meta.source, context.meta.source);\n        }\n    );\n\n    for (const overrideArg of overrideKeys) {\n        if (!optionalArgs.has(overrideArg)) {\n            context.diagnostics.report(diagnostics.UNKNOWN_ARG(overrideArg), {\n                node: mixDef.data.originDecl,\n                word: overrideArg,\n            });\n        }\n    }\n\n    if (roots.length === 1) {\n        mergeRules(\n            roots[0],\n            config.rule,\n            mixDef.data.originDecl,\n            config.transformer.diagnostics,\n            false\n        );\n    } else if (roots.length > 1) {\n        const mixinRoot = postcss.root();\n        roots.forEach((root) => mixinRoot.prepend(...root.nodes));\n        mergeRules(\n            mixinRoot,\n            config.rule,\n            mixDef.data.originDecl,\n            config.transformer.diagnostics,\n            false\n        );\n    }\n}\n\nfunction collectOptionalArgs(\n    context: Pick<FeatureTransformContext, 'meta' | 'resolver'>,\n    mixinRoot: postcss.Root,\n    optionalArgs: Set<string> = new Set()\n) {\n    mixinRoot.walk((node) => {\n        const value = node.type === 'decl' ? node.value : node.type === 'atrule' ? node.params : '';\n        const varNames = STVar.parseVarsFromExpr(value);\n        for (const name of varNames) {\n            for (const refName of STVar.resolveReferencedVarNames(context, name)) {\n                optionalArgs.add(refName);\n            }\n        }\n    });\n}\n\nfunction getCSSMixinRoots(\n    contextMeta: StylableMeta,\n    resolveChain: CSSResolve<ClassSymbol | ElementSymbol>[],\n    processMixinRoot: (data: {\n        mixinRoot: postcss.Root;\n        resolved: CSSResolve<ClassSymbol | ElementSymbol>;\n        isRootMixin: boolean;\n    }) => void\n) {\n    const roots = [];\n    for (const resolved of resolveChain) {\n        const isRootMixin = resolved.symbol.name === resolved.meta.root;\n        const mixinRoot = createSubsetAst<postcss.Root>(\n            resolved.meta.sourceAst,\n            (resolved.symbol._kind === 'class' ? '.' : '') + resolved.symbol.name,\n            undefined,\n            isRootMixin,\n            (name) => STCustomSelector.getCustomSelector(contextMeta, name)\n        );\n        processMixinRoot({ mixinRoot, resolved, isRootMixin });\n        roots.push(mixinRoot);\n        if (resolved.symbol[`-st-extends`]) {\n            break;\n        }\n    }\n    return roots;\n}\n\n/** we assume that mixinRoot is freshly created nodes from the ast */\nfunction filterPartialMixinDecl(\n    meta: StylableMeta,\n    mixinRoot: postcss.Root,\n    overrideKeys: string[]\n) {\n    let regexp: RegExp;\n    const overrideSet = new Set(overrideKeys);\n    let size;\n    do {\n        size = overrideSet.size;\n        regexp = new RegExp(`value\\\\((\\\\s*${Array.from(overrideSet).join('\\\\s*)|(\\\\s*')}\\\\s*)\\\\)`);\n        for (const { text, name } of Object.values(meta.getAllStVars())) {\n            if (!overrideSet.has(name) && text.match(regexp)) {\n                overrideSet.add(name);\n            }\n        }\n    } while (overrideSet.size !== size);\n\n    mixinRoot.walkDecls((decl) => {\n        if (!decl.value.match(regexp)) {\n            const parent = decl.parent;\n            decl.remove();\n            if (parent?.nodes?.length === 0) {\n                parent.remove();\n            }\n        }\n    });\n}\n", "import { createDiagnosticReporter, DiagnosticBase, Diagnostics } from '../diagnostics';\nimport { strategies, valueDiagnostics } from './value';\nimport type { MixinValue } from '../features';\nimport type * as postcss from 'postcss';\nimport postcssValueParser from 'postcss-value-parser';\n\nexport const mixinHelperDiagnostics = {\n    INVALID_NAMED_PARAMS: valueDiagnostics.INVALID_NAMED_PARAMS,\n    VALUE_CANNOT_BE_STRING: createDiagnosticReporter(\n        '10008',\n        'error',\n        () => 'value can not be a string (remove quotes?)'\n    ),\n};\n\nexport function parseStMixin(\n    mixinNode: postcss.Declaration,\n    strategy: (type: string) => 'named' | 'args',\n    diagnostics?: Diagnostics,\n    emitStrategyDiagnostics = true\n) {\n    const ast = postcssValueParser(mixinNode.value);\n    const mixins: Array<MixinValue> = [];\n\n    function reportWarning(diagnostic: DiagnosticBase, options?: { word: string }) {\n        if (emitStrategyDiagnostics) {\n            diagnostics?.report(diagnostic, { ...options, node: mixinNode });\n        }\n    }\n\n    ast.nodes.forEach((node) => {\n        if (node.type === 'function') {\n            mixins.push({\n                type: node.value,\n                options: strategies[strategy(node.value)](node, reportWarning),\n                valueNode: node,\n                originDecl: mixinNode,\n            });\n        } else if (node.type === 'word') {\n            mixins.push({\n                type: node.value,\n                options: strategy(node.value) === 'named' ? {} : [],\n                valueNode: node,\n                originDecl: mixinNode,\n            });\n        } else if (node.type === 'string') {\n            diagnostics?.report(mixinHelperDiagnostics.VALUE_CANNOT_BE_STRING(), {\n                node: mixinNode,\n                word: mixinNode.value,\n            });\n        }\n    });\n\n    return mixins;\n}\nexport function parseStPartialMixin(\n    mixinNode: postcss.Declaration,\n    strategy: (type: string) => 'named' | 'args',\n    report?: Diagnostics,\n    emitStrategyDiagnostics?: boolean\n) {\n    return parseStMixin(mixinNode, strategy, report, emitStrategyDiagnostics).map((mixin) => {\n        mixin.partial = true;\n        return mixin;\n    });\n}\n", "import { createFeature, FeatureContext, FeatureTransformContext } from './feature';\nimport { generalDiagnostics } from './diagnostics';\nimport * as STSymbol from './st-symbol';\nimport type { StylableSymbol } from './st-symbol';\nimport type { ImportSymbol } from './st-import';\nimport type { ElementSymbol } from './css-type';\nimport type * as STStructure from './st-structure';\nimport * as STCustomState from './st-custom-state';\nimport { getOriginDefinition } from '../helpers/resolve';\nimport { namespace } from '../helpers/namespace';\nimport { namespaceEscape, unescapeCSS } from '../helpers/escape';\nimport { getNamedArgs } from '../helpers/value';\nimport {\n    convertToClass,\n    stringifySelector,\n    isSimpleSelector,\n    parseSelectorWithCache,\n    convertToPseudoClass,\n    convertToSelector,\n} from '../helpers/selector';\nimport { getAlias } from '../stylable-utils';\nimport type { StylableMeta } from '../stylable-meta';\nimport { validateRuleStateDefinition } from '../helpers/custom-state';\nimport type { Stylable } from '../stylable';\nimport {\n    ImmutableClass,\n    Class,\n    SelectorNode,\n    ImmutableSelectorNode,\n    stringifySelectorAst,\n    SelectorNodes,\n} from '@tokey/css-selector-parser';\nimport * as postcss from 'postcss';\nimport { basename } from 'path';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport postcssValueParser from 'postcss-value-parser';\nimport { plugableRecord } from '../helpers/plugable-record';\n\nexport interface StPartDirectives extends STStructure.HasParts, Partial<STCustomState.HasStates> {\n    '-st-root'?: boolean;\n    '-st-extends'?: ImportSymbol | ClassSymbol | ElementSymbol;\n    '-st-global'?: SelectorNode[];\n}\n\nconst stPartDirectives = {\n    '-st-root': true,\n    '-st-states': true,\n    '-st-extends': true,\n    '-st-global': true,\n} as const;\n\nexport interface ClassSymbol extends StPartDirectives {\n    _kind: 'class';\n    name: string;\n    alias?: ImportSymbol;\n    scoped?: string; // ToDo: check if in use\n}\n\nexport const diagnostics = {\n    INVALID_FUNCTIONAL_SELECTOR: generalDiagnostics.INVALID_FUNCTIONAL_SELECTOR,\n    UNSCOPED_CLASS: createDiagnosticReporter(\n        '00002',\n        'warning',\n        (name: string) =>\n            `unscoped class \"${name}\" will affect all elements of the same type in the document`\n    ),\n    STATE_DEFINITION_IN_ELEMENT: createDiagnosticReporter(\n        '11002',\n        'error',\n        () => 'cannot define pseudo states inside a type selector'\n    ),\n    STATE_DEFINITION_IN_COMPLEX: createDiagnosticReporter(\n        '11003',\n        'error',\n        () => 'cannot define pseudo states inside complex selectors'\n    ),\n    OVERRIDE_TYPED_RULE: createDiagnosticReporter(\n        '11006',\n        'warning',\n        (key: string, name: string) => `override \"${key}\" on typed rule \"${name}\"`\n    ),\n    CANNOT_RESOLVE_EXTEND: createDiagnosticReporter(\n        '11004',\n        'error',\n        (name: string) => `cannot resolve '-st-extends' type for '${name}'`\n    ),\n    CANNOT_EXTEND_IN_COMPLEX: createDiagnosticReporter(\n        '11005',\n        'error',\n        () => `cannot define \"-st-extends\" inside a complex selector`\n    ),\n    EMPTY_ST_GLOBAL: createDiagnosticReporter(\n        '00003',\n        'error',\n        () => `-st-global must contain a valid selector`\n    ),\n    UNSUPPORTED_MULTI_SELECTORS_ST_GLOBAL: createDiagnosticReporter(\n        '00004',\n        'error',\n        () => `unsupported multi selector in -st-global`\n    ),\n    UNSUPPORTED_COMPLEX_SELECTOR: createDiagnosticReporter(\n        '00010',\n        'error',\n        () => `unsupported complex selector`\n    ),\n    IMPORT_ISNT_EXTENDABLE: createDiagnosticReporter(\n        '00005',\n        'error',\n        () => 'import is not extendable'\n    ),\n    CANNOT_EXTEND_UNKNOWN_SYMBOL: createDiagnosticReporter(\n        '00006',\n        'error',\n        (name: string) => `cannot extend unknown symbol \"${name}\"`\n    ),\n    CANNOT_EXTEND_JS: createDiagnosticReporter(\n        '00007',\n        'error',\n        () => 'JS import is not extendable'\n    ),\n    UNKNOWN_IMPORT_ALIAS: createDiagnosticReporter(\n        '00008',\n        'error',\n        (name: string) => `cannot use alias for unknown import \"${name}\"`\n    ),\n    DISABLED_DIRECTIVE: createDiagnosticReporter(\n        '00009',\n        'error',\n        (className: string, directive: keyof typeof stPartDirectives) => {\n            const alternative =\n                directive === '-st-extends'\n                    ? ` use \"@st .${className} :is(.base)\" instead`\n                    : directive === '-st-global'\n                    ? `use \"@st .${className} => :global(<selector>)\" instead`\n                    : directive === '-st-states'\n                    ? `use \"@st .${className} { @st .state; }\" instead`\n                    : '';\n            return `cannot use ${directive} on .${className} since class is defined with \"@st\" - ${alternative}`;\n        }\n    ),\n};\n\nconst dataKey = plugableRecord.key<{\n    classesDefinedWithAtSt: Set<string>;\n}>('st-structure');\n\n// HOOKS\n\nexport const hooks = createFeature<{\n    SELECTOR: Class;\n    IMMUTABLE_SELECTOR: ImmutableClass;\n    RESOLVED: Record<string, { classes: string; isLocal: boolean }>;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {\n            classesDefinedWithAtSt: new Set<string>(),\n        });\n    },\n    analyzeSelectorNode({ context, node, rule }): void {\n        if (node.nodes) {\n            // error on functional class\n            context.diagnostics.report(\n                diagnostics.INVALID_FUNCTIONAL_SELECTOR(`.` + node.value, `class`),\n                {\n                    node: rule,\n                    word: stringifySelector(node),\n                }\n            );\n        }\n        addClass(context, node.value, rule);\n    },\n    analyzeDeclaration({ context, decl }) {\n        if (context.meta.type === 'stylable' && isDirectiveDeclaration(decl)) {\n            handleDirectives(context, decl);\n        }\n    },\n    transformResolve({ context }) {\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        const locals: Record<string, { classes: string; isLocal: boolean }> = {};\n        for (const [localName, resolved] of Object.entries(resolvedSymbols.class)) {\n            const exportedClasses = [];\n            let first = true;\n            // collect list of css classes for exports\n            for (const { meta, symbol } of resolved) {\n                if (!first && symbol[`-st-root`]) {\n                    // extended stylesheet root: stop collection as root is expected to\n                    // be placed by inner component, for example in <Button class={classes.primaryBtn} />\n                    // `primaryBtn` shouldn't contain `button__root` as it is placed by the Button component\n                    break;\n                }\n                first = false;\n                if (symbol[`-st-global`]) {\n                    // collect global override just in case of\n                    // compound set of CSS classes\n                    let isOnlyClasses = true;\n                    const globalClasses = symbol[`-st-global`].reduce<string[]>(\n                        (globalClasses, node) => {\n                            if (node.type === `class`) {\n                                globalClasses.push(node.value);\n                                context.meta.globals[node.value] = true;\n                            } else {\n                                isOnlyClasses = false;\n                            }\n                            return globalClasses;\n                        },\n                        []\n                    );\n                    if (isOnlyClasses) {\n                        exportedClasses.push(...globalClasses);\n                    }\n                    continue;\n                }\n                if (symbol.alias && !symbol[`-st-extends`]) {\n                    continue;\n                }\n                exportedClasses.push(namespace(symbol.name, meta.namespace));\n            }\n            const classNames = unescapeCSS(exportedClasses.join(' '));\n            if (classNames) {\n                const directResolve = resolved[0];\n                const isLocal = directResolve.meta === context.meta && !directResolve.symbol.alias;\n                locals[localName] = { classes: classNames, isLocal };\n            }\n        }\n        return locals;\n    },\n    transformSelectorNode({ context, selectorContext, node }) {\n        const { originMeta, resolver } = selectorContext;\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        const resolved = resolvedSymbols.class[node.value] || [\n            // used to namespace classes from js mixins since js mixins\n            // are scoped in the context of the mixed-in stylesheet\n            // which might not have a definition for the mixed-in class\n            { _kind: 'css', meta: originMeta, symbol: createSymbol({ name: node.value }) },\n        ];\n        selectorContext.setNextSelectorScope(resolved, node, node.value);\n        const { symbol, meta } = getOriginDefinition(resolved);\n        if (selectorContext.originMeta === meta && symbol[`-st-states`]) {\n            // ToDo: refactor out to transformer validation phase\n            validateRuleStateDefinition(\n                selectorContext.selectorStr,\n                selectorContext.ruleOrAtRule,\n                context.meta,\n                resolver,\n                context.diagnostics\n            );\n        }\n        if (selectorContext.transform) {\n            namespaceClass(meta, symbol, node);\n        }\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const [localName, { classes, isLocal }] of Object.entries(resolved)) {\n            if (isLocal) {\n                exports.classes[localName] = classes;\n            }\n        }\n    },\n});\n\n// API\n\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n    public transformIntoSelector(meta: StylableMeta, name: string): string | undefined {\n        const localSymbol = STSymbol.get(meta, name);\n        const resolved =\n            localSymbol?._kind === 'import'\n                ? this.stylable.resolver.deepResolve(localSymbol)\n                : { _kind: 'css', meta, symbol: localSymbol };\n\n        if (resolved?._kind !== 'css' || resolved.symbol?._kind !== 'class') {\n            return undefined;\n        }\n\n        const node: Class = {\n            type: 'class',\n            value: '',\n            start: 0,\n            end: 0,\n            dotComments: [],\n        };\n        namespaceClass(resolved.meta, resolved.symbol, node, false);\n        return stringifySelectorAst(node);\n    }\n}\n\nexport function get(meta: StylableMeta, name: string): ClassSymbol | undefined {\n    return STSymbol.get(meta, name, `class`);\n}\n\nexport function getAll(meta: StylableMeta): Record<string, ClassSymbol> {\n    return STSymbol.getAllByType(meta, `class`);\n}\n\nexport function createSymbol(input: Partial<ClassSymbol> & { name: string }): ClassSymbol {\n    const parts = input['-st-parts'] || {};\n    return { ...input, _kind: 'class', '-st-parts': parts };\n}\n\nexport function addClass(context: FeatureContext, name: string, rule?: postcss.Node): ClassSymbol {\n    let symbol = STSymbol.get(context.meta, name, `class`);\n    if (!symbol) {\n        let alias = STSymbol.get(context.meta, name);\n        if (alias && alias._kind !== 'import') {\n            alias = undefined;\n        }\n        symbol = STSymbol.addSymbol({\n            context,\n            symbol: createSymbol({ name, alias }),\n            node: rule,\n            safeRedeclare: !!alias,\n        }) as ClassSymbol;\n    }\n    // mark native css as global\n    if (context.meta.type === 'css' && !symbol['-st-global']) {\n        symbol['-st-global'] = [\n            {\n                type: 'class',\n                value: name,\n                dotComments: [],\n                start: 0,\n                end: 0,\n            },\n        ];\n    }\n    return symbol;\n}\n\nexport function namespaceClass(\n    meta: StylableMeta,\n    symbol: StylableSymbol,\n    node: SelectorNode, // ToDo: check this is the correct type, should this be inline selector?\n    wrapInGlobal = true\n) {\n    if (`-st-global` in symbol && symbol[`-st-global`]) {\n        // change node to `-st-global` value\n        if (wrapInGlobal) {\n            const globalMappedNodes = symbol[`-st-global`];\n            convertToPseudoClass(node, 'global', [\n                {\n                    type: 'selector',\n                    nodes: globalMappedNodes,\n                    after: '',\n                    before: '',\n                    end: 0,\n                    start: 0,\n                },\n            ]);\n        } else {\n            const flatNode = convertToSelector(node);\n            const globalMappedNodes = symbol[`-st-global`];\n            flatNode.nodes = globalMappedNodes;\n        }\n    } else {\n        node = convertToClass(node);\n        node.value = namespaceEscape(symbol.name, meta.namespace);\n    }\n}\nfunction getNamespacedClass(meta: StylableMeta, symbol: StylableSymbol) {\n    if (`-st-global` in symbol && symbol[`-st-global`]) {\n        const selector = symbol[`-st-global`];\n        return stringifySelectorAst(selector as any);\n    } else {\n        return '.' + namespaceEscape(symbol.name, meta.namespace);\n    }\n}\n\nexport function addDevRules({ getResolvedSymbols, meta }: FeatureTransformContext) {\n    const resolvedSymbols = getResolvedSymbols(meta);\n    for (const resolved of Object.values(resolvedSymbols.class)) {\n        const a = resolved[0];\n        if (resolved.length > 1 && a.symbol['-st-extends']) {\n            const b = resolved[resolved.length - 1];\n            meta.targetAst!.append(\n                createWarningRule(\n                    '.' + b.symbol.name,\n                    getNamespacedClass(b.meta, b.symbol),\n                    basename(b.meta.source),\n                    '.' + a.symbol.name,\n                    getNamespacedClass(a.meta, a.symbol),\n                    basename(a.meta.source)\n                )\n            );\n        }\n    }\n}\n\nexport function createWarningRule(\n    extendedNode: string,\n    scopedExtendedNode: string,\n    extendedFile: string,\n    extendingNode: string,\n    scopedExtendingNode: string,\n    extendingFile: string\n) {\n    const message = `\"class extending component '${extendingNode} => ${scopedExtendingNode}' in stylesheet '${extendingFile}' was set on a node that does not extend '${extendedNode} => ${scopedExtendedNode}' from stylesheet '${extendedFile}'\" !important`;\n    return postcss.rule({\n        raws: { between: ' ' },\n        selector: `${scopedExtendingNode}:not(${scopedExtendedNode})::before`,\n        nodes: [\n            postcss.decl({\n                prop: 'content',\n                value: message,\n            }),\n            postcss.decl({\n                prop: 'display',\n                value: `block !important`,\n            }),\n            postcss.decl({\n                prop: 'font-family',\n                value: `monospace !important`,\n            }),\n            postcss.decl({\n                prop: 'background-color',\n                value: `red !important`,\n            }),\n            postcss.decl({\n                prop: 'color',\n                value: `white !important`,\n            }),\n        ],\n    });\n}\n\nexport function validateClassScoping({\n    context,\n    classSymbol,\n    locallyScoped,\n    reportUnscoped,\n    node,\n    nodes,\n    index,\n    rule,\n}: {\n    context: FeatureContext;\n    classSymbol: ClassSymbol;\n    locallyScoped: boolean;\n    reportUnscoped: boolean;\n    node: ImmutableClass;\n    nodes: ImmutableSelectorNode[];\n    index: number;\n    rule: postcss.Rule;\n}): boolean {\n    if (context.meta.type !== 'stylable') {\n        // ignore in native CSS\n        return true;\n    }\n    if (!classSymbol.alias) {\n        return true;\n    } else if (locallyScoped === false) {\n        if (checkForScopedNodeAfter(context, rule, nodes, index) === false) {\n            if (reportUnscoped) {\n                context.diagnostics.report(diagnostics.UNSCOPED_CLASS(node.value), {\n                    node: rule,\n                    word: node.value,\n                });\n            }\n            return false;\n        } else {\n            return true;\n        }\n    }\n    return locallyScoped;\n}\n\n// ToDo: support more complex cases (e.g. `:is`)\nexport function checkForScopedNodeAfter(\n    context: FeatureContext,\n    rule: postcss.Rule,\n    nodes: ImmutableSelectorNode[],\n    index: number\n) {\n    for (let i = index + 1; i < nodes.length; i++) {\n        const node = nodes[i];\n        if (!node) {\n            // ToDo: can this get here???\n            break;\n        }\n        if (node.type === 'combinator') {\n            break;\n        }\n        if (node.type === 'class') {\n            const name = node.value;\n            const classSymbol = addClass(context, name, rule);\n            if (classSymbol && !classSymbol.alias) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nfunction isDirectiveDeclaration(\n    decl: postcss.Declaration\n): decl is postcss.Declaration & { prop: keyof typeof stPartDirectives } {\n    return decl.prop in stPartDirectives;\n}\nexport function disableDirectivesForClass(context: FeatureContext, className: string) {\n    // ToDo: move directive analyze to @st-structure\n    // called when class is defined with @st\n    const { classesDefinedWithAtSt } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    classesDefinedWithAtSt.add(className);\n}\n\nfunction handleDirectives(\n    context: FeatureContext,\n    decl: postcss.Declaration & { prop: keyof typeof stPartDirectives }\n) {\n    const rule = decl.parent as postcss.Rule;\n    if (rule?.type !== 'rule') {\n        return;\n    }\n    const isSimplePerSelector = isSimpleSelector(rule.selector);\n    const type = isSimplePerSelector.reduce((accType, { type }) => {\n        return !accType ? type : accType !== type ? `complex` : type;\n    }, `` as (typeof isSimplePerSelector)[number]['type']);\n    const isSimple = type !== `complex`;\n\n    const { classesDefinedWithAtSt } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    if (type === 'class' && classesDefinedWithAtSt.has(rule.selector.replace('.', ''))) {\n        context.diagnostics.report(\n            diagnostics.DISABLED_DIRECTIVE(rule.selector.replace('.', ''), decl.prop),\n            {\n                node: decl,\n            }\n        );\n        return;\n    } else if (decl.prop === `-st-states`) {\n        if (isSimple && type !== 'type') {\n            extendTypedRule(\n                context,\n                decl,\n                rule.selector,\n                `-st-states`,\n                STCustomState.parsePseudoStates(decl.value, decl, context.diagnostics)\n            );\n        } else {\n            if (type === 'type') {\n                context.diagnostics.report(diagnostics.STATE_DEFINITION_IN_ELEMENT(), {\n                    node: decl,\n                });\n            } else {\n                context.diagnostics.report(diagnostics.STATE_DEFINITION_IN_COMPLEX(), {\n                    node: decl,\n                });\n            }\n        }\n    } else if (decl.prop === `-st-extends`) {\n        if (isSimple) {\n            const parsed = parseStExtends(decl.value);\n            const symbolName = parsed.types[0] && parsed.types[0].symbolName;\n\n            const extendsRefSymbol = STSymbol.get(context.meta, symbolName)!;\n            if (\n                (extendsRefSymbol &&\n                    (extendsRefSymbol._kind === 'import' ||\n                        extendsRefSymbol._kind === 'class' ||\n                        extendsRefSymbol._kind === 'element')) ||\n                decl.value === context.meta.root\n            ) {\n                extendTypedRule(\n                    context,\n                    decl,\n                    rule.selector,\n                    `-st-extends`,\n                    getAlias(extendsRefSymbol) || extendsRefSymbol\n                );\n            } else {\n                context.diagnostics.report(diagnostics.CANNOT_RESOLVE_EXTEND(decl.value), {\n                    node: decl,\n                    word: decl.value,\n                });\n            }\n        } else {\n            context.diagnostics.report(diagnostics.CANNOT_EXTEND_IN_COMPLEX(), {\n                node: decl,\n            });\n        }\n    } else if (decl.prop === `-st-global`) {\n        if (isSimple && type !== 'type') {\n            // set class global mapping\n            const name = rule.selector.replace('.', '');\n            const classSymbol = get(context.meta, name);\n            if (classSymbol) {\n                const globalSelectorAst = parseStGlobal(context, decl);\n                if (globalSelectorAst) {\n                    classSymbol[`-st-global`] = globalSelectorAst;\n                }\n            }\n        } else {\n            // TODO: diagnostics - scoped on none class\n        }\n    }\n}\n\nexport function extendTypedRule(\n    context: FeatureContext,\n    node: postcss.Node,\n    selector: string,\n    key: keyof StPartDirectives,\n    value: any\n) {\n    const name = selector.replace('.', '');\n    const typedRule = STSymbol.get(context.meta, name) as ClassSymbol | ElementSymbol;\n    if (typedRule && typedRule[key]) {\n        context.diagnostics.report(diagnostics.OVERRIDE_TYPED_RULE(key, name), {\n            node,\n            word: name,\n        });\n    }\n    if (typedRule) {\n        typedRule[key] = value;\n    }\n}\n\nexport interface ArgValue {\n    type: string;\n    value: string;\n}\nexport interface ExtendsValue {\n    symbolName: string;\n    args: ArgValue[][] | null;\n}\n\nexport function parseStExtends(value: string) {\n    const ast = postcssValueParser(value);\n    const types: ExtendsValue[] = [];\n\n    ast.walk((node) => {\n        if (node.type === 'function') {\n            const args = getNamedArgs(node);\n\n            types.push({\n                symbolName: node.value,\n                args,\n            });\n\n            return false;\n        } else if (node.type === 'word') {\n            types.push({\n                symbolName: node.value,\n                args: null,\n            });\n        }\n        return undefined;\n    }, false);\n\n    return {\n        ast,\n        types,\n    };\n}\nfunction parseStGlobal(\n    context: FeatureContext,\n    decl: postcss.Declaration\n): SelectorNodes | undefined {\n    const selector = parseSelectorWithCache(decl.value.replace(/^['\"]/, '').replace(/['\"]$/, ''), {\n        clone: true,\n    });\n    if (!selector[0]) {\n        context.diagnostics.report(diagnostics.EMPTY_ST_GLOBAL(), {\n            node: decl,\n        });\n        return;\n    } else if (selector.length > 1) {\n        context.diagnostics.report(diagnostics.UNSUPPORTED_MULTI_SELECTORS_ST_GLOBAL(), {\n            node: decl,\n        });\n        return;\n    } else {\n        for (const node of selector[0].nodes) {\n            if (node.type === 'combinator') {\n                context.diagnostics.report(diagnostics.UNSUPPORTED_COMPLEX_SELECTOR(), {\n                    node: decl,\n                });\n                return;\n            }\n        }\n    }\n    return selector[0].nodes;\n}\n", "import type { ClassSymbol, ElementSymbol, STStructure } from '../features';\nimport type { CSSResolve } from '../stylable-resolver';\n\nexport function getOriginDefinition<T extends ClassSymbol | ElementSymbol | STStructure.PartSymbol>(\n    resolved: CSSResolve<T>[]\n) {\n    for (const r of resolved) {\n        const { symbol } = r;\n        if (symbol._kind === 'class' || symbol._kind === 'element') {\n            if (symbol.alias && !symbol[`-st-extends`]) {\n                continue;\n            } else {\n                return r;\n            }\n        }\n    }\n    return resolved[0];\n}\n", "import { murmurhash3_32_gc } from '../murmurhash';\n\nexport const namespaceDelimiter = '__';\nexport function namespace(name: string, namespace: string) {\n    return namespace ? namespace + namespaceDelimiter + name : name;\n}\n\nexport interface PackageInfo {\n    name: string;\n    version: string;\n    dirPath: string;\n}\n\nexport interface NamespaceBuilderParams {\n    hashSalt: string;\n    prefix: string;\n    namespace: string;\n    paths: {\n        file: string;\n        origin: string;\n    };\n    packageInfo: PackageInfo;\n}\n\nexport interface NamespaceBuilder {\n    (options: NamespaceBuilderParams):\n        | {\n              namespace: string;\n              hashPart: string;\n          }\n        | undefined\n        | null;\n}\n\nexport interface CreateNamespaceOptions {\n    prefix?: string;\n    hashSalt?: string;\n    hashFragment?: 'full' | 'minimal' | number;\n    buildNamespace?: NamespaceBuilder;\n    getPackageInfo?: (filePath: string) => PackageInfo;\n    handleNoMatch?: (\n        strict: boolean,\n        namespace: string,\n        filePath: string,\n        usedByMap: Map<string, string>\n    ) => string;\n    hashSeparator?: string;\n    strict?: boolean;\n    hashFn?: (i: string) => string | number;\n    normalizePath: (dirPath: string, filePath: string) => string;\n}\n\nfunction defaultGetPackageInfo() {\n    return {\n        name: '',\n        version: '0.0.0',\n        dirPath: '',\n    };\n}\n\nexport function defaultNamespaceBuilder({\n    prefix,\n    namespace,\n    hashSalt,\n    paths,\n    packageInfo,\n}: NamespaceBuilderParams) {\n    return {\n        namespace: prefix + namespace,\n        hashPart: hashSalt + packageInfo.name + '@' + packageInfo.version + '/' + paths.origin,\n    };\n}\n\nexport function defaultNoMatchHandler(\n    strict: boolean,\n    ns: string,\n    stylesheetPath: string,\n    usedByMap: Map<string, string>\n): string {\n    const usedBy = usedByMap.get(ns);\n    throw new Error(\n        `Could not create namespace for:\\n${stylesheetPath}\\nthe last valid namespace tried was ${JSON.stringify(\n            ns\n        )}${usedBy ? ` that was used by:\\n${usedBy}\\n` : strict ? ' ' : ''}${\n            strict ? 'running on strict mode' : ''\n        }`\n    );\n}\n\nexport function createNamespaceStrategy(options: CreateNamespaceOptions) {\n    const {\n        prefix = '',\n        hashSalt = '',\n        hashFragment = 'minimal',\n        buildNamespace = defaultNamespaceBuilder,\n        getPackageInfo = defaultGetPackageInfo,\n        handleNoMatch = defaultNoMatchHandler,\n        hashSeparator = '-',\n        strict = false,\n        hashFn = murmurhash3_32_gc,\n        normalizePath,\n    } = options;\n\n    const usedNamespaces = new Map<string, string>();\n\n    return (\n        namespace: string,\n        stylesheetOriginPath: string,\n        stylesheetPath: string = stylesheetOriginPath\n    ) => {\n        const packageInfo = getPackageInfo(stylesheetPath);\n        const buildNamespaceParams = {\n            prefix,\n            hashSalt,\n            namespace,\n            paths: {\n                file: packageInfo.dirPath\n                    ? normalizePath(packageInfo.dirPath, stylesheetPath)\n                    : stylesheetPath,\n                origin: packageInfo.dirPath\n                    ? normalizePath(packageInfo.dirPath, stylesheetOriginPath)\n                    : stylesheetOriginPath,\n            },\n            packageInfo,\n        };\n        const { namespace: resultNs, hashPart } =\n            buildNamespace(buildNamespaceParams) ?? defaultNamespaceBuilder(buildNamespaceParams);\n\n        const hashStr = hashFn(hashPart).toString();\n\n        let i =\n            typeof hashFragment === 'number'\n                ? hashFragment\n                : hashFragment === 'full'\n                ? hashStr.length\n                : 0;\n\n        let finalNamespace = '';\n        while (i <= hashStr.length) {\n            const hashSlice = hashStr.slice(0, i);\n            finalNamespace = resultNs + (hashSlice ? hashSeparator + hashSlice : '');\n            const usedBy = usedNamespaces.get(finalNamespace);\n            if (!usedBy) {\n                usedNamespaces.set(finalNamespace, stylesheetPath);\n                return finalNamespace;\n            }\n            if (usedBy === stylesheetPath) {\n                return finalNamespace;\n            } else if (strict) {\n                return handleNoMatch(strict, finalNamespace, stylesheetPath, usedNamespaces);\n            }\n            i++;\n        }\n\n        return handleNoMatch(strict, finalNamespace, stylesheetPath, usedNamespaces);\n    };\n}\n", "import { createFeature, FeatureContext } from './feature';\nimport { generalDiagnostics } from './diagnostics';\nimport * as STSymbol from './st-symbol';\nimport type { ImportSymbol } from './st-import';\nimport * as CSSClass from './css-class';\nimport type { StylableMeta } from '../stylable-meta';\nimport { isCompRoot, stringifySelector } from '../helpers/selector';\nimport { getOriginDefinition } from '../helpers/resolve';\nimport type { Type, ImmutableType, ImmutableSelectorNode } from '@tokey/css-selector-parser';\nimport type * as postcss from 'postcss';\nimport { createDiagnosticReporter } from '../diagnostics';\n\n// ToDo: should probably consider removing StylableDirectives from this symbol\nexport interface ElementSymbol extends CSSClass.StPartDirectives {\n    _kind: 'element';\n    name: string;\n    alias?: ImportSymbol;\n}\n\nexport const diagnostics = {\n    INVALID_FUNCTIONAL_SELECTOR: generalDiagnostics.INVALID_FUNCTIONAL_SELECTOR,\n    UNSCOPED_TYPE_SELECTOR: createDiagnosticReporter(\n        `03001`,\n        'warning',\n        (name: string) =>\n            `unscoped type selector \"${name}\" will affect all elements of the same type in the document`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature<{\n    SELECTOR: Type;\n    IMMUTABLE_SELECTOR: ImmutableType;\n}>({\n    analyzeSelectorNode({ context, node, rule, walkContext: [_index, _nodes] }): void {\n        if (node.nodes) {\n            // error on functional type\n            context.diagnostics.report(\n                diagnostics.INVALID_FUNCTIONAL_SELECTOR(node.value, `type`),\n                {\n                    node: rule,\n                    word: stringifySelector(node),\n                }\n            );\n        }\n        addType(context, node.value, rule);\n    },\n    transformSelectorNode({ context, node, selectorContext }): void {\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        let resolved = resolvedSymbols.element[node.value];\n        if (!resolved) {\n            const resolvedClass = resolvedSymbols.class[node.value];\n            if (resolvedClass?.length > 1 && resolvedClass[0].symbol.alias) {\n                // fallback to imported class alias for case that no actual\n                // type selector was found in the source rules, but transform is\n                // called with such selector externally (this happens for invalid selectors\n                // during language service completions)\n                resolved = resolvedSymbols.class[node.value];\n            } else {\n                // provides resolution for native elements\n                // that are not collected by parts\n                // or elements that are added by js mixin\n                resolved = [\n                    {\n                        _kind: 'css',\n                        meta: context.meta,\n                        symbol: createSymbol({ name: '*' }),\n                    },\n                ];\n            }\n        }\n        selectorContext.setNextSelectorScope(resolved, node, node.value);\n        // native node does not resolve e.g. div\n        if (selectorContext.transform && resolved && resolved.length > 1) {\n            const { symbol, meta } = getOriginDefinition(resolved);\n            if (symbol._kind === 'class') {\n                CSSClass.namespaceClass(meta, symbol, node);\n            } else {\n                node.value = symbol.name;\n            }\n        }\n    },\n});\n\n// API\n\nexport function get(meta: StylableMeta, name: string): ElementSymbol | undefined {\n    return STSymbol.get(meta, name, `element`);\n}\n\nexport function getAll(meta: StylableMeta): Record<string, ElementSymbol> {\n    return STSymbol.getAllByType(meta, `element`);\n}\n\nexport function createSymbol(input: Partial<ElementSymbol> & { name: string }): ElementSymbol {\n    const parts = input['-st-parts'] || {};\n    return { ...input, _kind: 'element', '-st-parts': parts };\n}\n\nexport function addType(context: FeatureContext, name: string, rule?: postcss.Rule): ElementSymbol {\n    const typeSymbol = STSymbol.get(context.meta, name, `element`);\n    if (!typeSymbol && isCompRoot(name)) {\n        let alias = STSymbol.get(context.meta, name);\n        if (alias && alias._kind !== 'import') {\n            alias = undefined;\n        }\n        STSymbol.addSymbol({\n            context,\n            symbol: createSymbol({ name, alias }),\n            node: rule,\n            safeRedeclare: !!alias,\n        });\n    }\n    return STSymbol.get(context.meta, name, `element`)!;\n}\n\nexport function validateTypeScoping({\n    context,\n    locallyScoped,\n    reportUnscoped,\n    node,\n    nodes,\n    index,\n    rule,\n}: {\n    context: FeatureContext;\n    locallyScoped: boolean;\n    reportUnscoped: boolean;\n    node: ImmutableType;\n    nodes: ImmutableSelectorNode[];\n    index: number;\n    rule: postcss.Rule;\n}): boolean {\n    if (context.meta.type !== 'stylable') {\n        // ignore in native CSS\n        return true;\n    }\n    if (locallyScoped === false) {\n        if (CSSClass.checkForScopedNodeAfter(context, rule, nodes, index) === false) {\n            if (reportUnscoped) {\n                context.diagnostics.report(diagnostics.UNSCOPED_TYPE_SELECTOR(node.value), {\n                    node: rule,\n                    word: node.value,\n                });\n            }\n            return false;\n        } else {\n            locallyScoped = true;\n        }\n    }\n    return locallyScoped;\n}\n", "import { createFeature } from './feature';\nimport { nativePseudoClasses } from '../native-reserved-lists';\nimport * as STCustomState from './st-custom-state';\nimport * as CSSType from './css-type';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport type { Selector } from '@tokey/css-selector-parser';\nimport isVendorPrefixed from 'is-vendor-prefixed';\n\nexport const diagnostics = {\n    UNKNOWN_STATE_USAGE: createDiagnosticReporter(\n        '08001',\n        'error',\n        (name: string) => `unknown pseudo-class \"${name}\"`\n    ),\n};\n\n// HOOKS\n\nexport const hooks = createFeature({\n    transformSelectorNode({ context, selectorContext }) {\n        const { inferredSelector, node, ruleOrAtRule, scopeSelectorAst } = selectorContext;\n        if (node.type !== 'pseudo_class') {\n            return;\n        }\n        // find matching custom state\n        const name = node.value;\n        const inferredState = inferredSelector.getPseudoClasses({ name })[name];\n        const foundCustomState = !!inferredState;\n        if (inferredState) {\n            if (selectorContext.transform) {\n                STCustomState.transformPseudoClassToCustomState(\n                    inferredState.state,\n                    inferredState.meta,\n                    node.value,\n                    node,\n                    inferredState.meta.namespace,\n                    context.resolver,\n                    context.diagnostics,\n                    ruleOrAtRule\n                );\n            }\n        }\n\n        // handle nested pseudo classes\n        if (node.nodes && !foundCustomState) {\n            if (node.value === 'global') {\n                // ignore `:st-global` since it is handled after the mixin transformation\n                if (selectorContext.experimentalSelectorInference) {\n                    selectorContext.setNextSelectorScope(\n                        [\n                            {\n                                _kind: 'css',\n                                meta: context.meta,\n                                symbol: CSSType.createSymbol({ name: '*' }),\n                            },\n                        ],\n                        node\n                    );\n                }\n                return;\n            } else {\n                const hasSubSelectors = node.value.match(\n                    /not|any|-\\w+?-any|matches|is|where|has|local|nth-child|nth-last-child/\n                );\n                // pickup all nested selectors except nth initial selector\n                const innerSelectors = (\n                    node.nodes[0] && node.nodes[0].type === `nth` ? node.nodes.slice(1) : node.nodes\n                ) as Selector[];\n                const nestedContext = selectorContext.createNestedContext(\n                    innerSelectors,\n                    selectorContext.inferredSelector\n                );\n                scopeSelectorAst(nestedContext);\n                // change selector inference\n                if (hasSubSelectors && innerSelectors.length) {\n                    if (\n                        selectorContext.experimentalSelectorInference &&\n                        !node.value.match(/not|has/)\n                    ) {\n                        // set inferred to subject of nested selectors + prev compound\n                        const prevNode = selectorContext.lastInferredSelectorNode;\n                        if (prevNode && prevNode.type !== 'combinator') {\n                            nestedContext.inferredMultipleSelectors.add(\n                                selectorContext.inferredSelector\n                            );\n                        }\n                        selectorContext.setNextSelectorScope(\n                            nestedContext.inferredMultipleSelectors,\n                            node\n                        );\n                    }\n                    // legacy: delegate elements of first selector\n                    selectorContext.elements[selectorContext.selectorIndex].push(\n                        ...nestedContext.elements[0]\n                    );\n                }\n            }\n        }\n        // warn unknown state\n        if (\n            !foundCustomState &&\n            !nativePseudoClasses.includes(node.value) &&\n            !isVendorPrefixed(node.value) &&\n            !selectorContext.isDuplicateStScopeDiagnostic()\n        ) {\n            context.diagnostics.report(diagnostics.UNKNOWN_STATE_USAGE(node.value), {\n                node: ruleOrAtRule,\n                word: node.value,\n            });\n        }\n    },\n});\n", "import { createFeature, FeatureContext, FeatureTransformContext } from './feature';\nimport * as STSymbol from './st-symbol';\nimport type { ImportSymbol } from './st-import';\nimport {\n    validateAtProperty,\n    validateCustomPropertyName,\n    generateScopedCSSVar,\n    atPropertyValidationWarnings,\n} from '../helpers/css-custom-property';\nimport type { Stylable } from '../stylable';\nimport { validateAllowedNodesUntil, stringifyFunction } from '../helpers/value';\nimport { globalValue, GLOBAL_FUNC } from '../helpers/global';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\nimport type { StylableMeta } from '../stylable-meta';\nimport {\n    type StylableResolver,\n    type CSSResolve,\n    createSymbolResolverWithCache,\n} from '../stylable-resolver';\nimport type * as postcss from 'postcss';\n// ToDo: refactor out - parse once and pass to hooks\nimport postcssValueParser, { WordNode } from 'postcss-value-parser';\nexport interface CSSVarSymbol {\n    _kind: 'cssVar';\n    name: string;\n    global: boolean;\n    alias: ImportSymbol | undefined;\n}\n\nexport const diagnostics = {\n    ...atPropertyValidationWarnings,\n    ILLEGAL_CSS_VAR_USE: createDiagnosticReporter(\n        '01005',\n        'error',\n        (name: string) =>\n            `a custom css property must begin with \"--\" (double-dash), but received \"${name}\"`\n    ),\n    ILLEGAL_CSS_VAR_ARGS: createDiagnosticReporter(\n        '01006',\n        'error',\n        (name: string) =>\n            `custom property \"${name}\" usage (var()) must receive comma separated values`\n    ),\n    DEPRECATED_ST_GLOBAL_CUSTOM_PROPERTY: createDiagnosticReporter(\n        '01007',\n        'info',\n        () =>\n            `\"st-global-custom-property\" is deprecated and will be removed in the next version. Use \"@property\" with ${GLOBAL_FUNC}`\n    ),\n    GLOBAL_CSS_VAR_MISSING_COMMA: createDiagnosticReporter(\n        '01008',\n        'error',\n        (name: string) =>\n            `\"@st-global-custom-property\" received the value \"${name}\", but its values must be comma separated`\n    ),\n    ILLEGAL_GLOBAL_CSS_VAR: createDiagnosticReporter(\n        '01009',\n        'error',\n        (name: string) =>\n            `\"@st-global-custom-property\" received the value \"${name}\", but it must begin with \"--\" (double-dash)`\n    ),\n    MISSING_PROP_NAME: createDiagnosticReporter(\n        '01010',\n        'error',\n        () => `missing custom property name for \"var(--[PROP NAME])\"`\n    ),\n    UNDEFINED_CSS_CUSTOM_PROP: createDiagnosticReporter(\n        '01011',\n        'error',\n        (name) =>\n            `Undefined \"${name}\" custom property. Please define the property using '@property' or import it with '@st-import' when 'strictCustomProperty' is enabled.`\n    ),\n};\n\nconst dataKey = plugableRecord.key<{\n    stCustomGlobalProperty: Record<string, CSSVarSymbol>;\n    typedDefinitions: Record<string, postcss.AtRule[]>;\n}>('custom-property');\n\n// HOOKS\n\ninterface ResolvedSymbols {\n    localToGlobal: Record<string, string>;\n    locals: Set<string>;\n}\n\nexport const hooks = createFeature<{\n    RESOLVED: ResolvedSymbols;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {\n            stCustomGlobalProperty: {},\n            typedDefinitions: {},\n        });\n    },\n    analyzeInit(context) {\n        // ToDo: move to `STImport.ImportTypeHook`\n        for (const [symbolName, symbol] of Object.entries(\n            STSymbol.getAllByType(context.meta, `import`)\n        )) {\n            if (validateCustomPropertyName(symbolName)) {\n                const importSymbol = STSymbol.get(context.meta, symbolName, `import`);\n                if (!importSymbol) {\n                    console.warn(\n                        `imported symbol \"${symbolName}\" not found on \"${context.meta.source}\"`\n                    );\n                    continue;\n                }\n                addCSSProperty({\n                    context,\n                    node: symbol.import.rule,\n                    name: symbolName,\n                    global: false,\n                    final: true,\n                    alias: importSymbol,\n                });\n            }\n        }\n    },\n    analyzeAtRule({ context, atRule }) {\n        const isStylable = context.meta.type === 'stylable';\n        if (atRule.name === `property`) {\n            let name = atRule.params;\n            let global = !isStylable;\n            // check global\n            const globalVarName = isStylable ? globalValue(name) : undefined;\n            if (globalVarName !== undefined) {\n                name = globalVarName.trim();\n                global = true;\n            }\n            const { stCustomGlobalProperty, typedDefinitions } = plugableRecord.getUnsafe(\n                context.meta.data,\n                dataKey\n            );\n            // handle conflict with deprecated `@st-global-custom-property`\n            if (stCustomGlobalProperty[name]) {\n                global = true;\n            }\n            addCSSProperty({\n                context,\n                node: atRule,\n                name,\n                global,\n                final: true,\n            });\n            validateAtProperty(atRule, context.diagnostics);\n            // save reference to runtime definitions\n            if (atRule.nodes) {\n                typedDefinitions[name] ??= [];\n                typedDefinitions[name].push(atRule);\n            }\n        } else if (atRule.name === `st-global-custom-property` && isStylable) {\n            analyzeDeprecatedStGlobalCustomProperty(context, atRule);\n        }\n    },\n    analyzeDeclaration({ context, decl }) {\n        // register prop\n        if (validateCustomPropertyName(decl.prop)) {\n            addCSSProperty({\n                context,\n                node: decl,\n                name: decl.prop,\n                global: context.meta.type === 'css',\n                final: false,\n            });\n        }\n        // register value\n        if (decl.value.includes('var(')) {\n            analyzeDeclValueVarCalls(context, decl);\n        }\n    },\n    prepareAST({ context, node, toRemove }) {\n        if (\n            node.type === `atrule` &&\n            node.name === 'st-global-custom-property' &&\n            context.meta.type === 'stylable'\n        ) {\n            toRemove.push(node);\n        }\n    },\n    transformResolve({ context: { meta, getResolvedSymbols } }) {\n        const customPropsMapping: ResolvedSymbols = {\n            localToGlobal: {},\n            locals: new Set(),\n        };\n        const resolvedSymbols = getResolvedSymbols(meta);\n        for (const [localVarName, localSymbol] of Object.entries(\n            STSymbol.getAllByType(meta, `cssVar`)\n        )) {\n            const resolve = resolveFinalSymbol(meta, localSymbol, resolvedSymbols);\n            customPropsMapping.localToGlobal[localVarName] = getTransformedName(resolve);\n            if (resolve.meta === meta) {\n                customPropsMapping.locals.add(localVarName);\n            }\n        }\n\n        return customPropsMapping;\n    },\n    transformAtRuleNode({ context, atRule, resolved }) {\n        if (atRule.name !== `property`) {\n            return;\n        }\n\n        if (atRule.nodes?.length) {\n            const propName = globalValue(atRule.params) || atRule.params;\n            if (resolved.localToGlobal[propName]) {\n                atRule.params = resolved.localToGlobal[propName] || atRule.params;\n            }\n        } else if (context.meta.type === 'stylable') {\n            // remove `@property` with no body\n            atRule.remove();\n        }\n    },\n    transformDeclaration({ decl, resolved }) {\n        decl.prop = resolved.localToGlobal[decl.prop] || decl.prop;\n    },\n    transformValue({ node, data: { meta }, context: { getResolvedSymbols } }) {\n        const { value } = node;\n        const varWithPrefix = node.nodes[0]?.value || ``;\n        if (validateCustomPropertyName(varWithPrefix)) {\n            transformPropertyIdent(meta, node.nodes[0], getResolvedSymbols);\n        }\n        // handle default values - ToDo: check if required\n        if (node.nodes.length > 2) {\n            node.resolvedValue = stringifyFunction(value, node);\n        }\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const varName of resolved.locals) {\n            exports.vars[varName.slice(2)] = resolved.localToGlobal[varName];\n        }\n    },\n});\n\n// API\n\nexport function transformPropertyIdent(\n    meta: StylableMeta,\n    node: WordNode,\n    getResolvedSymbols: FeatureTransformContext['getResolvedSymbols']\n) {\n    const varWithPrefix = node.value || '';\n    const resolvedSymbols = getResolvedSymbols(meta);\n    const localSymbol = STSymbol.get(meta, varWithPrefix, `cssVar`);\n    if (localSymbol) {\n        node.value = getTransformedName(resolveFinalSymbol(meta, localSymbol, resolvedSymbols));\n    }\n}\n\nexport function get(meta: StylableMeta, name: string): CSSVarSymbol | undefined {\n    return STSymbol.get(meta, name, `cssVar`);\n}\n\nfunction resolveFinalSymbol(\n    meta: StylableMeta,\n    localSymbol: CSSVarSymbol,\n    resolvedSymbols: ReturnType<FeatureTransformContext['getResolvedSymbols']>\n) {\n    return (\n        resolvedSymbols.cssVar[localSymbol.name] || {\n            // fallback to local namespace\n            _kind: `css`,\n            symbol: localSymbol,\n            meta,\n        }\n    );\n}\n\nexport function addCSSProperty({\n    context,\n    node,\n    name,\n    global,\n    final,\n    alias,\n}: {\n    context: FeatureContext;\n    node: postcss.Declaration | postcss.AtRule | postcss.Rule;\n    name: string;\n    global: boolean;\n    final: boolean;\n    alias?: ImportSymbol;\n}) {\n    // validate indent\n    if (!validateCustomPropertyName(name)) {\n        context.diagnostics.report(diagnostics.ILLEGAL_CSS_VAR_USE(name), {\n            node,\n            word: name,\n        });\n        return;\n    }\n    // usages bailout: addition of weak definition reference `--x: var(--x)`\n    if (!final) {\n        const existing = STSymbol.get(context.meta, name, `cssVar`);\n        if (existing) {\n            // already defined\n            return;\n            // eslint-disable-next-line no-constant-condition\n        } else if (context.meta.type === 'stylable' && context.meta.flags.strictCustomProperty) {\n            // strict mode\n            context.diagnostics.report(diagnostics.UNDEFINED_CSS_CUSTOM_PROP(name), {\n                node,\n                word: name,\n            });\n        }\n    }\n\n    // define symbol\n    STSymbol.addSymbol({\n        context,\n        symbol: {\n            _kind: 'cssVar',\n            name: name,\n            global,\n            alias,\n        },\n        safeRedeclare: !final || !!alias,\n        node,\n    });\n}\n\nconst UNKNOWN_LOCATION = Object.freeze({\n    offset: -1,\n    line: -1,\n    column: -1,\n});\n\nexport class StylablePublicApi {\n    constructor(private stylable: Stylable) {}\n\n    public getProperties(meta: StylableMeta) {\n        const results: Record<\n            string,\n            {\n                meta: StylableMeta;\n                localName: string;\n                targetName: string;\n                source: {\n                    meta: StylableMeta;\n                    start: postcss.Position;\n                    end: postcss.Position;\n                };\n            }\n        > = {};\n\n        const topLevelDiagnostics = new Diagnostics();\n        const getResolvedSymbols = createSymbolResolverWithCache(\n            this.stylable.resolver,\n            topLevelDiagnostics\n        );\n        const { cssVar } = getResolvedSymbols(meta);\n        for (const [name, symbol] of Object.entries(cssVar)) {\n            const defAst = STSymbol.getSymbolAstNode(symbol.meta, symbol.symbol);\n            results[name] = {\n                meta: symbol.meta,\n                localName: symbol.symbol.name,\n                targetName: getTransformedName(symbol),\n                source: {\n                    meta: symbol.meta,\n                    start: defAst?.source?.start || UNKNOWN_LOCATION,\n                    end: defAst?.source?.end || UNKNOWN_LOCATION,\n                },\n            };\n        }\n\n        return results;\n    }\n}\n\nfunction analyzeDeclValueVarCalls(context: FeatureContext, decl: postcss.Declaration) {\n    const parsed = postcssValueParser(decl.value);\n    parsed.walk((node) => {\n        if (node.type === 'function' && node.value === 'var' && node.nodes) {\n            const varName = node.nodes[0];\n            if (!varName) {\n                context.diagnostics.report(diagnostics.MISSING_PROP_NAME(), {\n                    node: decl,\n                });\n                return;\n            }\n\n            if (!validateAllowedNodesUntil(node, 1)) {\n                const args = postcssValueParser.stringify(node.nodes);\n                context.diagnostics.report(diagnostics.ILLEGAL_CSS_VAR_ARGS(args), {\n                    node: decl,\n                    word: args,\n                });\n            }\n\n            addCSSProperty({\n                context,\n                name: postcssValueParser.stringify(varName)?.trim() || ``,\n                node: decl,\n                global: context.meta.type === 'css',\n                final: false,\n            });\n        }\n    });\n}\n\nfunction analyzeDeprecatedStGlobalCustomProperty(context: FeatureContext, atRule: postcss.AtRule) {\n    // report deprecation\n    context.diagnostics.report(diagnostics.DEPRECATED_ST_GLOBAL_CUSTOM_PROPERTY(), {\n        node: atRule,\n    });\n    //\n    const cssVarsByComma = atRule.params.split(',');\n    const cssVarsBySpacing = atRule.params\n        .trim()\n        .split(/\\s+/g)\n        .filter((s) => s !== ',');\n\n    if (cssVarsBySpacing.length > cssVarsByComma.length) {\n        context.diagnostics.report(diagnostics.GLOBAL_CSS_VAR_MISSING_COMMA(atRule.params), {\n            node: atRule,\n            word: atRule.params,\n        });\n        return;\n    }\n\n    for (const entry of cssVarsByComma) {\n        const name = entry.trim();\n        if (validateCustomPropertyName(name)) {\n            // ToDo: change to modify global instead of override\n            addCSSProperty({\n                context,\n                node: atRule,\n                name,\n                global: true,\n                final: true,\n            });\n            // keep track of defined props through `@st-custom-global-property` in order\n            // to not override the default with following `@property` definitions\n            const { stCustomGlobalProperty } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n            stCustomGlobalProperty[name] = STSymbol.get(context.meta, name, `cssVar`)!;\n        } else {\n            context.diagnostics.report(diagnostics.ILLEGAL_GLOBAL_CSS_VAR(name), {\n                node: atRule,\n                word: name,\n            });\n        }\n    }\n}\n\nexport function getRuntimeTypedDefinitionNames(meta: StylableMeta) {\n    const { typedDefinitions } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return Object.keys(typedDefinitions);\n}\nexport function getTransformedName({ symbol, meta }: CSSResolve<CSSVarSymbol>) {\n    return symbol.global ? symbol.name : generateScopedCSSVar(meta.namespace, symbol.name.slice(2));\n}\n\nexport function scopeCSSVar(resolver: StylableResolver, meta: StylableMeta, symbolName: string) {\n    const importedVar = resolver.deepResolve(STSymbol.get(meta, symbolName));\n    if (\n        importedVar &&\n        importedVar._kind === 'css' &&\n        importedVar.symbol &&\n        importedVar.symbol._kind === 'cssVar'\n    ) {\n        importedVar;\n        return getTransformedName(importedVar as CSSResolve<CSSVarSymbol>);\n    }\n    const cssVar = STSymbol.get(meta, symbolName, `cssVar`);\n    return cssVar?.global ? symbolName : generateScopedCSSVar(meta.namespace, symbolName.slice(2));\n}\n", "import type { FunctionNode } from 'postcss-value-parser';\n\nexport const PROPERTY = `-st-global`;\nexport const GLOBAL_FUNC = 'st-global';\n\nconst globalValueRegExp = new RegExp(`^${GLOBAL_FUNC}\\\\((.*?)\\\\)$`);\n\nexport function globalValue(str: string) {\n    const match = str.match(globalValueRegExp);\n    return match?.[1];\n}\n\nexport function globalValueFromFunctionNode(funcNode: FunctionNode) {\n    if (funcNode.value !== GLOBAL_FUNC) {\n        return;\n    }\n    let globalValue = '';\n    let unknownInput = false;\n    for (const { type, value } of funcNode.nodes) {\n        if (type === 'word') {\n            globalValue = value;\n        } else if (type === 'comment' || type === 'space') {\n            // allow comments & spaced: do nothing\n        } else {\n            unknownInput = true;\n        }\n    }\n    return unknownInput ? undefined : globalValue;\n}\n", "import { createFeature, FeatureContext } from './feature';\nimport * as STSymbol from './st-symbol';\nimport * as STImport from './st-import';\nimport type { Imported } from './st-import';\nimport type { StylableMeta } from '../stylable-meta';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport { isInConditionalGroup } from '../helpers/rule';\nimport { namespace } from '../helpers/namespace';\nimport { globalValue, GLOBAL_FUNC } from '../helpers/global';\nimport type * as postcss from 'postcss';\nimport postcssValueParser from 'postcss-value-parser';\nimport { createDiagnosticReporter } from '../diagnostics';\n\nexport interface KeyframesSymbol {\n    _kind: 'keyframes';\n    alias: string;\n    name: string;\n    import?: Imported;\n    global?: boolean;\n}\n\nexport interface KeyframesResolve {\n    meta: StylableMeta;\n    symbol: KeyframesSymbol;\n}\n\nexport const reservedKeyFrames = [\n    'none',\n    'inherited',\n    'initial',\n    'unset',\n    /* single-timing-function */\n    'linear',\n    'ease',\n    'ease-in',\n    'ease-in-out',\n    'ease-out',\n    'step-start',\n    'step-end',\n    'start',\n    'end',\n    /* single-animation-iteration-count */\n    'infinite',\n    /* single-animation-direction */\n    'normal',\n    'reverse',\n    'alternate',\n    'alternate-reverse',\n    /* single-animation-fill-mode */\n    'forwards',\n    'backwards',\n    'both',\n    /* single-animation-play-state */\n    'running',\n    'paused',\n];\n\nexport const diagnostics = {\n    ILLEGAL_KEYFRAMES_NESTING: createDiagnosticReporter(\n        '02001',\n        'error',\n        () => `illegal nested \"@keyframes\"`\n    ),\n    MISSING_KEYFRAMES_NAME: createDiagnosticReporter(\n        '02002',\n        'error',\n        () => '\"@keyframes\" missing parameter'\n    ),\n    MISSING_KEYFRAMES_NAME_INSIDE_GLOBAL: createDiagnosticReporter(\n        '02003',\n        'error',\n        () => `\"@keyframes\" missing parameter inside \"${GLOBAL_FUNC}()\"`\n    ),\n    KEYFRAME_NAME_RESERVED: createDiagnosticReporter(\n        '02004',\n        'error',\n        (name: string) => `keyframes \"${name}\" is reserved`\n    ),\n    UNKNOWN_IMPORTED_KEYFRAMES: createDiagnosticReporter(\n        '02005',\n        'error',\n        (name: string, path: string) =>\n            `cannot resolve imported keyframes \"${name}\" from stylesheet \"${path}\"`\n    ),\n};\n\nconst dataKey = plugableRecord.key<{\n    statements: postcss.AtRule[];\n    paths: Record<string, string[]>;\n    imports: string[];\n}>('keyframes');\n\n// HOOKS\n\nSTImport.ImportTypeHook.set(`keyframes`, (context, localName, importName, importDef) => {\n    addKeyframes({\n        context,\n        name: localName,\n        importName,\n        ast: importDef.rule,\n        importDef,\n    });\n});\n\ninterface ResolvedSymbols {\n    record: Record<string, KeyframesResolve>;\n    locals: Set<string>;\n}\n\nexport const hooks = createFeature<{\n    RESOLVED: ResolvedSymbols;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, { statements: [], paths: {}, imports: [] });\n    },\n    analyzeAtRule({ context, atRule }) {\n        let { params: name } = atRule;\n        // check nesting validity\n        if (!isInConditionalGroup(atRule, true)) {\n            context.diagnostics.report(diagnostics.ILLEGAL_KEYFRAMES_NESTING(), { node: atRule });\n            return;\n        }\n        // save keyframes declarations\n        const { statements: keyframesAsts } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        keyframesAsts.push(atRule);\n        // validate name\n        if (!name) {\n            context.diagnostics.report(diagnostics.MISSING_KEYFRAMES_NAME(), { node: atRule });\n            return;\n        }\n        //\n        const isStylable = context.meta.type === 'stylable';\n        let global: boolean | undefined;\n        const globalName = isStylable ? globalValue(name) : undefined;\n        if (globalName !== undefined) {\n            name = globalName;\n            global = true;\n        }\n        if (name === '') {\n            context.diagnostics.report(diagnostics.MISSING_KEYFRAMES_NAME_INSIDE_GLOBAL(), {\n                node: atRule,\n            });\n            return;\n        }\n        if (reservedKeyFrames.includes(name)) {\n            context.diagnostics.report(diagnostics.KEYFRAME_NAME_RESERVED(name), {\n                node: atRule,\n                word: name,\n            });\n        }\n        addKeyframes({\n            context,\n            name,\n            importName: name,\n            ast: atRule,\n            global: isStylable ? global : true,\n        });\n    },\n    transformResolve({ context }) {\n        const symbols = STSymbol.getAllByType(context.meta, `keyframes`);\n        const resolved: ResolvedSymbols = {\n            record: {},\n            locals: new Set(),\n        };\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        for (const [name, symbol] of Object.entries(symbols)) {\n            const res = resolvedSymbols.keyframes[name];\n            if (res) {\n                resolved.record[name] = res;\n                if (res.meta === context.meta) {\n                    resolved.locals.add(name);\n                }\n            } else if (symbol.import) {\n                context.diagnostics.report(\n                    diagnostics.UNKNOWN_IMPORTED_KEYFRAMES(symbol.name, symbol.import.request),\n                    {\n                        node: symbol.import.rule,\n                        word: symbol.name,\n                    }\n                );\n            }\n        }\n        return resolved;\n    },\n    transformAtRuleNode({ context, atRule, resolved }) {\n        const globalName =\n            context.meta.type === 'stylable' ? globalValue(atRule.params) : undefined;\n        const name = globalName ?? atRule.params;\n        if (!name) {\n            return;\n        }\n        const resolve = resolved.record[name];\n        /* js keyframes mixins won't have resolved keyframes */\n        atRule.params = resolve\n            ? getTransformedName(resolve)\n            : globalName ?? namespace(name, context.meta.namespace);\n    },\n    transformDeclaration({ decl, resolved }) {\n        const parsed = postcssValueParser(decl.value);\n        // ToDo: improve by correctly parse & identify `animation-name`\n        // ToDo: handle symbols from js mixin\n        parsed.nodes.forEach((node) => {\n            const resolve = resolved.record[node.value];\n            const scoped = resolve && getTransformedName(resolve);\n            if (scoped) {\n                node.value = scoped;\n            }\n        });\n        decl.value = parsed.toString();\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const name of resolved.locals) {\n            exports.keyframes[name] = getTransformedName(resolved.record[name]);\n        }\n    },\n});\n\n// API\n\nexport function getKeyframesStatements({ data }: StylableMeta): ReadonlyArray<postcss.AtRule> {\n    const { statements } = plugableRecord.getUnsafe(data, dataKey);\n    return statements;\n}\n\nexport function get(meta: StylableMeta, name: string): KeyframesSymbol | undefined {\n    return STSymbol.get(meta, name, `keyframes`);\n}\n\nexport function getAll(meta: StylableMeta): Record<string, KeyframesSymbol> {\n    return STSymbol.getAllByType(meta, `keyframes`);\n}\n\nfunction addKeyframes({\n    context,\n    name,\n    importName,\n    ast,\n    global,\n    importDef,\n}: {\n    context: FeatureContext;\n    name: string;\n    importName: string;\n    ast: postcss.AtRule | postcss.Rule;\n    global?: boolean;\n    importDef?: Imported;\n}) {\n    /**\n     * keyframes are safe to redeclare in case they are unique within their context (applied\n     * in different times/cases), for example 2 keyframes statements can override each other\n     * if 1 is applied on the root (always) and the other in @media (on some condition).\n     *\n     * > in case keyframes are imported, then no local keyframes\n     * > are allowed to override them (will report a warning).\n     */\n    const isFirstInPath = addKeyframesDeclaration(context.meta, name, ast, !!importDef);\n    // first must not be `safeRedeclare`\n    const safeRedeclare = isFirstInPath && !!STSymbol.get(context.meta, name, `keyframes`);\n    // fields are confusing in this symbol:\n    // name: the import name if imported OR the local name\n    // alias: the local name\n    STSymbol.addSymbol({\n        context,\n        node: ast,\n        localName: name,\n        symbol: {\n            _kind: 'keyframes',\n            alias: name,\n            name: importName,\n            global,\n            import: importDef,\n        },\n        safeRedeclare,\n    });\n}\n\nfunction addKeyframesDeclaration(\n    meta: StylableMeta,\n    name: string,\n    origin: postcss.AtRule | postcss.Rule,\n    isImported: boolean\n) {\n    let path = ``;\n    let current = origin.parent;\n    while (current) {\n        if (current.type === `rule`) {\n            path += ` -> ` + (current as postcss.Rule).selector;\n        } else if (current.type === `atrule`) {\n            path +=\n                ` -> ` +\n                (current as postcss.AtRule).name +\n                ` ` +\n                (current as postcss.AtRule).params;\n        }\n        current = current.parent as any;\n    }\n    const { paths, imports } = plugableRecord.getUnsafe(meta.data, dataKey);\n    if (!paths[path]) {\n        paths[path] = [];\n    }\n    const isFirstInPath = !paths[path].includes(name);\n    const isImportedBefore = imports.includes(name);\n    paths[path].push(name);\n    if (isImported) {\n        imports.push(name);\n    }\n    return isFirstInPath && !isImportedBefore;\n}\n\nfunction getTransformedName({ symbol, meta }: KeyframesResolve) {\n    return symbol.global ? symbol.alias : namespace(symbol.alias, meta.namespace);\n}\n", "import { createFeature, FeatureContext } from './feature';\nimport * as STSymbol from './st-symbol';\nimport * as STImport from './st-import';\nimport type { StylableMeta } from '../stylable-meta';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport { namespace } from '../helpers/namespace';\nimport { globalValueFromFunctionNode, GLOBAL_FUNC } from '../helpers/global';\nimport { CSSWideKeywords } from '../native-reserved-lists';\nimport valueParser from 'postcss-value-parser';\nimport type * as postcss from 'postcss';\nimport { createDiagnosticReporter, Diagnostics } from '../diagnostics';\n\nexport interface LayerSymbol {\n    _kind: 'layer';\n    name: string;\n    alias: string;\n    global?: boolean;\n    import?: STImport.Imported;\n}\nexport interface ResolvedLayer {\n    meta: StylableMeta;\n    symbol: LayerSymbol;\n}\n\nexport const diagnostics = {\n    MISSING_LAYER_NAME_INSIDE_GLOBAL: createDiagnosticReporter(\n        '19001',\n        'warning',\n        () => `\"@layer\" missing parameter inside \"${GLOBAL_FUNC}()\"`\n    ),\n    LAYER_SORT_STATEMENT_WITH_STYLE: createDiagnosticReporter(\n        '19002',\n        'error',\n        () => `\"@layer\" ordering statement cannot have a style block`\n    ),\n    RESERVED_KEYWORD: createDiagnosticReporter(\n        '19003',\n        'error',\n        (name: string) => `\"@layer\" name cannot be reserved word \"${name}\"`\n    ),\n    NOT_IDENT: createDiagnosticReporter(\n        '19004',\n        'error',\n        (name: string) => `\"@layer\" expected ident, but got \"${name}\"`\n    ),\n    RECONFIGURE_IMPORTED: createDiagnosticReporter(\n        '19005',\n        'error',\n        (name: string) => `cannot reconfigure imported layer \"${name}\"`\n    ),\n    UNKNOWN_IMPORTED_LAYER: createDiagnosticReporter(\n        '19006',\n        'error',\n        (name: string, path: string) =>\n            `cannot resolve imported layer \"${name}\" from stylesheet \"${path}\"`\n    ),\n};\n\nconst dataKey = plugableRecord.key<{\n    analyzedParams: Record<\n        string,\n        {\n            names: string[];\n            transformNames: (getTransformedName: (name: string) => string) => string;\n        }\n    >;\n    layerDefs: Record<string, postcss.AtRule | postcss.Rule>;\n}>('layer');\n\n// HOOKS\n\nSTImport.ImportTypeHook.set(`layer`, (context, localName, importName, importDef) => {\n    addLayer({\n        context,\n        name: localName,\n        importName,\n        ast: importDef.rule,\n        global: false,\n        importDef,\n    });\n});\n\ninterface ResolvedSymbols {\n    record: Record<string, ResolvedLayer>;\n    locals: Set<string>;\n}\n\nexport const hooks = createFeature<{\n    RESOLVED: ResolvedSymbols;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, { analyzedParams: {}, layerDefs: {} });\n    },\n    analyzeAtRule({ context, atRule }) {\n        if (!atRule.params) {\n            return;\n        }\n        if (atRule.name === 'import') {\n            // native css import\n            analyzeCSSImportLayer(context, atRule);\n        } else if (atRule.name === 'layer') {\n            // layer atrule\n            const analyzeMetaData = plugableRecord.getUnsafe(context.meta.data, dataKey);\n            const analyzedParams = parseLayerParams(\n                atRule.params,\n                context.diagnostics,\n                atRule,\n                context.meta.type === 'stylable'\n            );\n            if (analyzedParams.multiple && atRule.nodes) {\n                context.diagnostics.report(diagnostics.LAYER_SORT_STATEMENT_WITH_STYLE(), {\n                    node: atRule,\n                });\n            }\n            // cache params\n            analyzeMetaData.analyzedParams[atRule.params] = analyzedParams;\n            // cache symbols\n            for (const name of analyzedParams.names) {\n                addLayer({\n                    context,\n                    name,\n                    importName: name,\n                    global: !!analyzedParams.globals[name] || context.meta.type === 'css',\n                    ast: atRule,\n                });\n            }\n        }\n    },\n    transformResolve({ context }) {\n        const symbols = STSymbol.getAllByType(context.meta, `layer`);\n        const resolved: ResolvedSymbols = {\n            record: {},\n            locals: new Set(),\n        };\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        for (const [name, symbol] of Object.entries(symbols)) {\n            const res = resolvedSymbols.layer[name];\n            if (res) {\n                resolved.record[name] = res;\n                if (res.meta === context.meta) {\n                    resolved.locals.add(name);\n                }\n            } else if (symbol.import) {\n                context.diagnostics.report(\n                    diagnostics.UNKNOWN_IMPORTED_LAYER(symbol.name, symbol.import.request),\n                    {\n                        node: symbol.import.rule,\n                        word: symbol.name,\n                    }\n                );\n            }\n        }\n        return resolved;\n    },\n    transformAtRuleNode({ context, atRule, resolved }) {\n        if (!atRule.params) {\n            return;\n        }\n        if (atRule.name === 'import') {\n            // native css import\n            transformCSSImportLayer(context, atRule, resolved.record);\n        } else if (atRule.name === 'layer') {\n            // layer atrule\n            const { analyzedParams } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n            const analyzed = analyzedParams[atRule.params];\n            if (analyzed) {\n                atRule.params = analyzed.transformNames((name) => {\n                    const resolve = resolved.record[name];\n                    return resolve ? getTransformedName(resolved.record[name]) : name;\n                });\n            }\n        }\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const name of resolved.locals) {\n            exports.layers[name] = getTransformedName(resolved.record[name]);\n        }\n    },\n});\n\n// API\n\nexport function get(meta: StylableMeta, name: string): LayerSymbol | undefined {\n    return STSymbol.get(meta, name, `layer`);\n}\nexport function getAll(meta: StylableMeta): Record<string, LayerSymbol> {\n    return STSymbol.getAllByType(meta, `layer`);\n}\nexport function getDefinition(\n    meta: StylableMeta,\n    name: string\n): postcss.AtRule | postcss.Rule | undefined {\n    const analyzeMetaData = plugableRecord.getUnsafe(meta.data, dataKey);\n    return analyzeMetaData.layerDefs[name];\n}\n\nfunction parseLayerParams(\n    params: string,\n    report: Diagnostics,\n    atRule: postcss.AtRule,\n    isStylable: boolean\n) {\n    const names: string[] = [];\n    const globals: Record<string, true> = {};\n    let readyForName = true;\n    let multiple = false;\n    const ast = valueParser(params).nodes;\n    const namedNodeRefs: Record<string, valueParser.Node[]> = {};\n    for (let i = 0; i < ast.length; ++i) {\n        const node = ast[i];\n        const { type, value } = node;\n        if (type === 'word') {\n            if (readyForName) {\n                const layers: valueParser.WordNode[] = [];\n                for (const name of getDotSeparatedNames(value)) {\n                    // ToDo: handle name duplications\n                    const splittedLayer = { ...node, value: name };\n                    if (layers.length) {\n                        layers.push({ ...node, value: '.' });\n                    }\n                    layers.push(splittedLayer);\n                    namedNodeRefs[name] ??= [];\n                    namedNodeRefs[name].push(splittedLayer);\n                    names.push(name);\n                }\n                readyForName = false;\n                ast.splice(i, 1, ...layers);\n            }\n        } else if (type === 'function' && value === GLOBAL_FUNC && readyForName && isStylable) {\n            const globalName = globalValueFromFunctionNode(node);\n            if (globalName) {\n                namedNodeRefs[globalName] ??= [];\n                namedNodeRefs[globalName].push(node);\n                names.push(globalName);\n                globals[globalName] = true;\n            } else if (globalName === '') {\n                report.report(diagnostics.MISSING_LAYER_NAME_INSIDE_GLOBAL(), { node: atRule });\n            }\n            readyForName = false;\n        } else if (type === 'div' && value === ',') {\n            readyForName = true;\n            multiple = true;\n        } else if (type === 'comment') {\n            // doesn't change meaning: do nothing\n        } else {\n            readyForName = false;\n            const source = valueParser.stringify(node);\n            report.report(diagnostics.NOT_IDENT(source), { node: atRule, word: source });\n        }\n    }\n    return {\n        names,\n        globals,\n        multiple,\n        transformNames(getTransformedName: (name: string) => string) {\n            for (const [name, nodes] of Object.entries(namedNodeRefs)) {\n                const transformedName = getTransformedName(name);\n                for (const modifiedNode of nodes) {\n                    if (modifiedNode.type === 'function') {\n                        // mutate to word - this is safe since this node is not exposed\n                        (modifiedNode as any).type = 'word';\n                    }\n                    modifiedNode.value = transformedName;\n                }\n            }\n            return valueParser.stringify(ast);\n        },\n    };\n}\n\nfunction getDotSeparatedNames(value: string) {\n    if (!value.includes('.')) {\n        return [value];\n    }\n    const names = [];\n    let lastIndex = 0;\n    for (let index = 0; index < value.length; ++index) {\n        const char = value[index];\n        switch (char) {\n            case '.': {\n                if (value[index - 1] !== '\\\\') {\n                    names.push(value.substring(lastIndex, index));\n                    lastIndex = index + 1;\n                }\n                break;\n            }\n        }\n    }\n    if (lastIndex <= value.length - 1) {\n        names.push(value.substring(lastIndex, value.length));\n    }\n    return names;\n}\n\nfunction analyzeCSSImportLayer(context: FeatureContext, importAtRule: postcss.AtRule) {\n    const ast = valueParser(importAtRule.params).nodes;\n    for (let i = 0; i < ast.length; ++i) {\n        const node = ast[i];\n        const { type, value } = node;\n        if (type === 'function' && value === 'layer' && node.nodes.length) {\n            for (const nestedNode of node.nodes) {\n                if (nestedNode.type === 'word') {\n                    for (const name of getDotSeparatedNames(nestedNode.value)) {\n                        addLayer({\n                            context,\n                            name,\n                            importName: name,\n                            ast: importAtRule,\n                            global: false,\n                        });\n                    }\n                }\n            }\n        }\n    }\n}\nfunction transformCSSImportLayer(\n    _context: FeatureContext,\n    importAtRule: postcss.AtRule,\n    resolved: Record<string, ResolvedLayer>\n) {\n    const ast = valueParser(importAtRule.params).nodes;\n    for (let i = 0; i < ast.length; ++i) {\n        const node = ast[i];\n        const { type, value } = node;\n        if (type === 'function' && value === 'layer' && node.nodes.length) {\n            for (const nestedNode of node.nodes) {\n                const { type, value } = nestedNode;\n                if (type === 'word') {\n                    nestedNode.value = getDotSeparatedNames(value)\n                        .map((name) => {\n                            const resolve = resolved[name];\n                            return resolve ? getTransformedName(resolved[name]) : name;\n                        })\n                        .join('.');\n                }\n            }\n        }\n    }\n    importAtRule.params = valueParser.stringify(ast);\n}\n\nfunction getTransformedName({ symbol, meta }: ResolvedLayer) {\n    return symbol.global ? symbol.alias : namespace(symbol.alias, meta.namespace);\n}\n\nfunction addLayer({\n    context,\n    name,\n    importName,\n    ast,\n    global,\n    importDef,\n}: {\n    context: FeatureContext;\n    name: string;\n    importName: string;\n    ast: postcss.AtRule | postcss.Rule;\n    global: boolean;\n    importDef?: STImport.Imported;\n}) {\n    const definedSymbol = STSymbol.get(context.meta, name, 'layer');\n    if (!definedSymbol) {\n        if (CSSWideKeywords.includes(name)) {\n            // keep\n            global = true;\n            context.diagnostics.report(diagnostics.RESERVED_KEYWORD(name), {\n                node: ast,\n                word: name,\n            });\n        }\n        const analyzeMetaData = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        analyzeMetaData.layerDefs[name] = ast;\n        STSymbol.addSymbol({\n            context,\n            node: ast,\n            localName: name,\n            symbol: {\n                _kind: 'layer',\n                name: importName,\n                alias: name,\n                global,\n                import: importDef,\n            },\n            safeRedeclare: false,\n        });\n    } else if (!definedSymbol.import && global) {\n        definedSymbol.global = true;\n    } else if (definedSymbol.import && global) {\n        context.diagnostics.report(diagnostics.RECONFIGURE_IMPORTED(name), {\n            node: ast,\n            word: name,\n        });\n    }\n}\n", "import { createFeature, FeatureContext } from './feature';\nimport * as STSymbol from './st-symbol';\nimport * as STImport from './st-import';\nimport * as CSSCustomProperty from './css-custom-property';\nimport type { StylableMeta } from '../stylable-meta';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport { plugableRecord } from '../helpers/plugable-record';\nimport { namespace } from '../helpers/namespace';\nimport { globalValueFromFunctionNode, GLOBAL_FUNC } from '../helpers/global';\nimport valueParser, { WordNode } from 'postcss-value-parser';\nimport type * as postcss from 'postcss';\n\nexport interface ContainerSymbol {\n    _kind: 'container';\n    name: string;\n    alias: string;\n    global?: boolean;\n    import?: STImport.Imported;\n}\n\nexport interface ResolvedContainer {\n    meta: StylableMeta;\n    symbol: ContainerSymbol;\n}\n\nexport const diagnostics = {\n    UNEXPECTED_DECL_VALUE: createDiagnosticReporter(\n        '20001',\n        'error',\n        (value: string) => `unexpected value: ${value}`\n    ),\n    UNKNOWN_DECL_TYPE: createDiagnosticReporter(\n        '20002',\n        'error',\n        (value: string) => `unknown container type: ${value}`\n    ),\n    MISSING_DECL_TYPE: createDiagnosticReporter(\n        '20003',\n        'error',\n        () => `missing container shorthand type`\n    ),\n    INVALID_CONTAINER_NAME: createDiagnosticReporter(\n        '20004',\n        'error',\n        (value: string) => `invalid container name: ${value}`\n    ),\n    UNRESOLVED_CONTAINER_NAME: createDiagnosticReporter(\n        '20005',\n        'error',\n        (value: string) => `unresolved container name: ${value}`\n    ),\n    UNKNOWN_IMPORTED_CONTAINER: createDiagnosticReporter(\n        '20006',\n        'error',\n        (name: string, path: string) =>\n            `cannot resolve imported container name \"${name}\" from stylesheet \"${path}\"`\n    ),\n    MISSING_CONTAINER_NAME_INSIDE_GLOBAL: createDiagnosticReporter(\n        '20007',\n        'warning',\n        () => `Missing container name inside \"${GLOBAL_FUNC}()\"`\n    ),\n    UNEXPECTED_DEFINITION: createDiagnosticReporter(\n        '20008',\n        'error',\n        (def: string) => `Unexpected value in container definition: \"${def}\"\"`\n    ),\n};\n\ninterface ParsedNames {\n    containers: Array<{ name: string; global: boolean }>;\n    transformNames: (getTransformedName: (name: string) => string) => string;\n}\n\nconst dataKey = plugableRecord.key<{\n    'container-name': Record<string, ParsedNames>;\n    container: Record<string, ParsedNames>;\n    definitions: Record<string, postcss.Declaration | postcss.AtRule | postcss.Rule>;\n}>('container');\n\n// HOOKS\n\nSTImport.ImportTypeHook.set(`container`, (context, localName, importName, importDef) => {\n    addContainer({\n        context,\n        name: localName,\n        importName,\n        ast: importDef.rule,\n        global: false,\n        importDef,\n        forceDefinition: true,\n    });\n});\n\ninterface ResolvedSymbols {\n    record: Record<string, ResolvedContainer>;\n    locals: Set<string>;\n}\n\nexport const hooks = createFeature<{\n    RESOLVED: ResolvedSymbols;\n}>({\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {\n            'container-name': {},\n            container: {},\n            definitions: {},\n        });\n    },\n    analyzeDeclaration({ context, decl }) {\n        const prop = decl.prop.toLowerCase();\n        if (prop !== 'container-name' && prop !== 'container') {\n            return;\n        }\n        const analyzed = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        const bucket = analyzed[prop];\n        const value = decl.value;\n        if (bucket[value]) {\n            return;\n        }\n        const parsed = (bucket[value] = parseContainerDecl(decl, context));\n        for (const { name, global } of parsed.containers) {\n            addContainer({\n                context,\n                ast: decl,\n                name,\n                importName: name,\n                global,\n                forceDefinition: false,\n            });\n        }\n    },\n    analyzeAtRule({ context, atRule }) {\n        const ast = valueParser(atRule.params).nodes;\n        let name = '';\n        let global = false;\n        let searchForContainerName = true;\n        let searchForLogicalOp = false;\n        for (const node of ast) {\n            if (node.type === 'comment' || node.type === 'space') {\n                // do nothing\n                continue;\n            } else if (searchForContainerName && node.type === 'word') {\n                searchForContainerName = false;\n                searchForLogicalOp = true;\n                name = node.value;\n            } else if (\n                searchForContainerName &&\n                node.type === 'function' &&\n                node.value === GLOBAL_FUNC\n            ) {\n                searchForContainerName = false;\n                searchForLogicalOp = true;\n                name = globalValueFromFunctionNode(node) || '';\n                global = true;\n            } else if (node.type === 'function' && node.value === 'style') {\n                searchForContainerName = false;\n                searchForLogicalOp = true;\n                // check for custom properties\n                for (const queryNode of node.nodes) {\n                    if (queryNode.type === 'word' && queryNode.value.startsWith('--')) {\n                        CSSCustomProperty.addCSSProperty({\n                            context,\n                            node: atRule,\n                            name: queryNode.value,\n                            global: context.meta.type === 'css',\n                            final: false,\n                        });\n                    }\n                }\n            } else if (\n                node.type !== 'function' &&\n                (!searchForLogicalOp || (node.type === 'word' && !logicalOpNames[node.value]))\n            ) {\n                const def = valueParser.stringify(node);\n                context.diagnostics.report(diagnostics.UNEXPECTED_DEFINITION(def), {\n                    node: atRule,\n                    word: def,\n                });\n                break;\n            }\n        }\n        if (name && !atRule.nodes) {\n            // treat @container with no body as definition\n            if (invalidContainerNames[name]) {\n                context.diagnostics.report(diagnostics.INVALID_CONTAINER_NAME(name), {\n                    node: atRule,\n                    word: name,\n                });\n            }\n            addContainer({\n                context,\n                ast: atRule,\n                name,\n                importName: name,\n                global,\n                forceDefinition: true,\n            });\n        }\n    },\n    transformResolve({ context }) {\n        const symbols = STSymbol.getAllByType(context.meta, `container`);\n        const resolved: ResolvedSymbols = {\n            record: {},\n            locals: new Set(),\n        };\n        const resolvedSymbols = context.getResolvedSymbols(context.meta);\n        for (const [name, symbol] of Object.entries(symbols)) {\n            const res = resolvedSymbols.container[name];\n            if (res) {\n                resolved.record[name] = res;\n                if (res.meta === context.meta) {\n                    resolved.locals.add(name);\n                }\n            } else if (symbol.import) {\n                context.diagnostics.report(\n                    diagnostics.UNKNOWN_IMPORTED_CONTAINER(symbol.name, symbol.import.request),\n                    {\n                        node: symbol.import.rule,\n                        word: symbol.name,\n                    }\n                );\n            }\n        }\n        return resolved;\n    },\n    transformDeclaration({ context, decl, resolved }) {\n        const prop = decl.prop.toLowerCase();\n        if (prop !== 'container-name' && prop !== 'container') {\n            return;\n        }\n        const analyzed = plugableRecord.getUnsafe(context.meta.data, dataKey);\n        const bucket = analyzed[prop];\n        const value = decl.value;\n        decl.value = bucket[value].transformNames((name) => {\n            const resolve = resolved.record[name];\n            return resolve ? getTransformedName(resolved.record[name]) : name;\n        });\n    },\n    transformAtRuleNode({ context, atRule, resolved }) {\n        if (!atRule.nodes) {\n            // remove definition only @container\n            atRule.remove();\n            return;\n        }\n        const ast = valueParser(atRule.params).nodes;\n        let changed = false;\n        let searchForContainerName = true;\n        search: for (const node of ast) {\n            if (node.type === 'comment' || node.type === 'space') {\n                // do nothing\n            } else if (node.type === 'word' && searchForContainerName) {\n                const resolve = resolved.record[node.value];\n                if (resolve) {\n                    node.value = getTransformedName(resolve);\n                    changed = true;\n                } else {\n                    context.diagnostics.report(diagnostics.UNRESOLVED_CONTAINER_NAME(node.value), {\n                        node: atRule,\n                        word: node.value,\n                    });\n                }\n                break search;\n            } else if (\n                node.type === 'function' &&\n                node.value === GLOBAL_FUNC &&\n                searchForContainerName\n            ) {\n                const globalName = globalValueFromFunctionNode(node) || '';\n                if (globalName) {\n                    changed = true;\n                    const wordNode: WordNode = node as any;\n                    wordNode.type = 'word';\n                    wordNode.value = globalName;\n                }\n            } else if (node.type === 'function' && node.value === 'style') {\n                // check for custom properties\n                searchForContainerName = false;\n                for (const queryNode of node.nodes) {\n                    if (queryNode.type === 'word' && queryNode.value.startsWith('--')) {\n                        changed = true;\n                        CSSCustomProperty.transformPropertyIdent(\n                            context.meta,\n                            queryNode,\n                            context.getResolvedSymbols\n                        );\n                    }\n                }\n            }\n        }\n        if (changed) {\n            atRule.params = valueParser.stringify(ast);\n        }\n        atRule.params = context.evaluator.evaluateValue(context, {\n            value: atRule.params,\n            meta: context.meta,\n            node: atRule,\n            initialNode: atRule,\n        }).outputValue;\n    },\n    transformJSExports({ exports, resolved }) {\n        for (const name of resolved.locals) {\n            exports.containers[name] = getTransformedName(resolved.record[name]);\n        }\n    },\n});\n\nconst invalidContainerNames: Record<string, true> = {\n    none: true,\n    and: true,\n    not: true,\n    or: true,\n};\nconst logicalOpNames: Record<string, true> = {\n    and: true,\n    not: true,\n    or: true,\n};\n\nfunction parseContainerDecl(decl: postcss.Declaration, context: FeatureContext): ParsedNames {\n    const { prop, value } = decl;\n    const containers: Array<{ name: string; global: boolean }> = [];\n    const namedNodeRefs: Record<string, valueParser.Node[]> = {};\n    const ast = valueParser(value).nodes;\n    let noneFound = false;\n    const checkNextName = (node: valueParser.Node) => {\n        const { type, value } = node;\n        if (type === 'comment' || type === 'space') {\n            // do nothing\n        } else if (type === 'word' || (type === 'function' && value === GLOBAL_FUNC)) {\n            const global = type === 'function';\n            const name = global ? globalValueFromFunctionNode(node) || '' : node.value;\n            if (global && !name) {\n                context.diagnostics.report(diagnostics.MISSING_CONTAINER_NAME_INSIDE_GLOBAL(), {\n                    node: decl,\n                });\n            }\n            if (name === 'none') {\n                noneFound = true;\n                return;\n            }\n            if (!global) {\n                containers.push({ name, global });\n                namedNodeRefs[name] ??= [];\n                namedNodeRefs[name].push(node);\n            } else {\n                // mutate to word - this is safe since this node is not exposed\n                (node as any).type = 'word';\n                (node as any).value = name;\n            }\n            if (invalidContainerNames[name]) {\n                context.diagnostics.report(diagnostics.INVALID_CONTAINER_NAME(name), {\n                    node: decl,\n                    word: name,\n                });\n            }\n        } else {\n            const word = valueParser.stringify(node);\n            context.diagnostics.report(diagnostics.UNEXPECTED_DECL_VALUE(word), {\n                node: decl,\n                word,\n            });\n            return false;\n        }\n        return true;\n    };\n    if (prop.toLowerCase() === 'container-name') {\n        for (const node of ast) {\n            const continueParse = checkNextName(node);\n            if (!continueParse) {\n                break;\n            }\n        }\n    } else {\n        let nextExpected: 'name' | 'type' | '' = 'name';\n        for (const node of ast) {\n            const { type, value } = node;\n\n            if (type === 'comment' || type === 'space') {\n                // do nothing\n            } else if (nextExpected === 'name') {\n                if (type === 'div' && value === '/') {\n                    nextExpected = 'type';\n                } else {\n                    const continueParse = checkNextName(node);\n                    if (!continueParse) {\n                        break;\n                    }\n                }\n            } else if (type === 'word' && nextExpected === 'type') {\n                if (value !== 'normal' && value !== 'size' && value !== 'inline-size') {\n                    context.diagnostics.report(diagnostics.UNKNOWN_DECL_TYPE(value), {\n                        node: decl,\n                        word: value,\n                    });\n                }\n                nextExpected = '';\n            } else {\n                const word = valueParser.stringify(node);\n                context.diagnostics.report(diagnostics.UNEXPECTED_DECL_VALUE(word), {\n                    node: decl,\n                    word,\n                });\n            }\n        }\n        if (nextExpected === 'type') {\n            context.diagnostics.report(diagnostics.MISSING_DECL_TYPE(), {\n                node: decl,\n            });\n        }\n    }\n    if (containers.length > 0 && noneFound) {\n        context.diagnostics.report(diagnostics.INVALID_CONTAINER_NAME('none'), {\n            node: decl,\n            word: 'none',\n        });\n    }\n    return {\n        containers,\n        transformNames(getTransformedName: (name: string) => string) {\n            for (const [name, nodes] of Object.entries(namedNodeRefs)) {\n                const transformedName = getTransformedName(name);\n                for (const modifiedNode of nodes) {\n                    if (modifiedNode.type === 'function') {\n                        // mutate to word - this is safe since this node is not exposed\n                        (modifiedNode as any).type = 'word';\n                    }\n                    modifiedNode.value = transformedName;\n                }\n            }\n            return valueParser.stringify(ast);\n        },\n    };\n}\n\n// API\n\nexport function get(meta: StylableMeta, name: string): ContainerSymbol | undefined {\n    return STSymbol.get(meta, name, `container`);\n}\nexport function getAll(meta: StylableMeta): Record<string, ContainerSymbol> {\n    return STSymbol.getAllByType(meta, `container`);\n}\nexport function getDefinition(\n    meta: StylableMeta,\n    name: string\n): postcss.Declaration | postcss.AtRule | postcss.Rule | undefined {\n    const { definitions } = plugableRecord.getUnsafe(meta.data, dataKey);\n    return definitions[name];\n}\n\nfunction getTransformedName({ symbol, meta }: ResolvedContainer) {\n    return symbol.global ? symbol.alias : namespace(symbol.alias, meta.namespace);\n}\n\nfunction addContainer({\n    context,\n    name,\n    importName,\n    ast,\n    global,\n    importDef,\n    forceDefinition,\n}: {\n    context: FeatureContext;\n    name: string;\n    importName: string;\n    ast: postcss.Declaration | postcss.AtRule | postcss.Rule;\n    global: boolean;\n    importDef?: STImport.Imported;\n    forceDefinition: boolean;\n}) {\n    const { definitions } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    const definedSymbol = STSymbol.get(context.meta, name, 'container');\n    const isFirst = !definedSymbol;\n    if (forceDefinition || isFirst) {\n        if (context.meta.type !== 'stylable') {\n            global = true;\n        }\n        definitions[name] = ast;\n        STSymbol.addSymbol({\n            context,\n            node: ast,\n            localName: name,\n            symbol: {\n                _kind: 'container',\n                name: importName,\n                alias: name,\n                global,\n                import: importDef,\n            },\n            safeRedeclare: false,\n        });\n    }\n}\n", "import { createFeature } from './feature';\n\n// HOOKS\n\nexport const hooks = createFeature({\n    transformAtRuleNode({ atRule, context }) {\n        if (atRule.name !== 'media') {\n            return;\n        }\n        atRule.params = context.evaluator.evaluateValue(context, {\n            value: atRule.params,\n            meta: context.meta,\n            node: atRule,\n            initialNode: atRule,\n        }).outputValue;\n    },\n});\n", "import { plugableRecord } from '../helpers/plugable-record';\nimport { FeatureContext, createFeature } from './feature';\nimport type { StylableMeta } from '../stylable-meta';\nimport * as STSymbol from './st-symbol';\nimport * as STCustomSelector from './st-custom-selector';\nimport * as STCustomState from './st-custom-state';\nimport type { MappedStates } from './st-custom-state';\nimport * as CSSClass from './css-class';\nimport { warnOnce } from '../helpers/deprecation';\nimport postcss from 'postcss';\nimport { parseCSSValue, stringifyCSSValue, BaseAstNode } from '@tokey/css-value-parser';\nimport { parseSelectorWithCache, walkSelector } from '../helpers/selector';\nimport {\n    ImmutableSelector,\n    stringifySelectorAst,\n    ImmutablePseudoClass,\n    ImmutableSelectorList,\n} from '@tokey/css-selector-parser';\nimport { createDiagnosticReporter } from '../diagnostics';\nimport { getAlias } from '../stylable-utils';\nimport {\n    findAnything,\n    findFatArrow,\n    findNextClassNode,\n    findNextPseudoClassNode,\n    findPseudoElementNode,\n    isExactLiteral,\n} from '../helpers/css-value-seeker';\n\nexport const diagnostics = {\n    GLOBAL_MAPPING_LIMITATION: createDiagnosticReporter(\n        '21000',\n        'error',\n        () => `Currently class mapping is limited to single global selector: :global(<selector>)`\n    ),\n    UNSUPPORTED_TOP_DEF: createDiagnosticReporter(\n        '21001',\n        'error',\n        () => 'top level @st must start with a class'\n    ),\n    MISSING_EXTEND: createDiagnosticReporter(\n        '21002',\n        'error',\n        () => `missing required class reference to extend a class (e.g. \":is(.class-name)\"`\n    ),\n    OVERRIDE_IMPORTED_CLASS: createDiagnosticReporter(\n        '21003',\n        'error',\n        () => `cannot override imported class definition`\n    ),\n    STATE_OUT_OF_CONTEXT: createDiagnosticReporter(\n        '21004',\n        'error',\n        () => 'pseudo-state definition must be directly nested in a `@st .class{}` definition'\n    ),\n    // 31005 - unused\n    MISSING_MAPPED_SELECTOR: createDiagnosticReporter(\n        '21006',\n        'error',\n        () => `missing mapped selector after \"=>\"`\n    ),\n    MULTI_MAPPED_SELECTOR: createDiagnosticReporter(\n        '21007',\n        'error',\n        () =>\n            'mapped selector accepts only a single selector.\\nuse `:is()` or `:where()` to map multiple selectors)'\n    ),\n    ELEMENT_OUT_OF_CONTEXT: createDiagnosticReporter(\n        '21008',\n        'error',\n        () => 'pseudo-element definition must be directly nested in a `@st .class{}` definition'\n    ),\n    MISSING_MAPPING: createDiagnosticReporter(\n        '21009',\n        'error',\n        () => 'expected selector mapping (e.g. \"=> <selector>\")'\n    ),\n    REDECLARE: createDiagnosticReporter(\n        '21010',\n        'error',\n        (type: string, src: string) => `redeclare ${type} definition: \"${src}\"`\n    ),\n    INVALID_ST_DEF: createDiagnosticReporter(\n        '21011',\n        'error',\n        (params: string) => `invalid @st \"${params}\" definition`\n    ),\n    MAPPING_UNSUPPORTED_NESTING: createDiagnosticReporter(\n        '21012',\n        'error',\n        () => 'mapped selector can only contain `&` as an initial selector'\n    ),\n    UNEXPECTED_EXTRA_VALUE: createDiagnosticReporter(\n        '21013',\n        'error',\n        (extraValue: string) => `found unexpected extra value definition: \"${extraValue}\"`\n    ),\n    CLASS_OUT_OF_CONTEXT: createDiagnosticReporter(\n        '21014',\n        'error',\n        () => 'class definition must be top level'\n    ),\n};\n\nexport interface PartSymbol extends HasParts, STCustomState.HasStates {\n    _kind: 'part';\n    name: string;\n    id: string;\n    mapTo: ImmutableSelectorList | CSSClass.ClassSymbol;\n}\nexport interface HasParts {\n    '-st-parts': Record<string, PartSymbol>;\n}\n\nexport const experimentalMsg = '[experimental feature] stylable structure (@st): API might change!';\n\nconst dataKey = plugableRecord.key<{\n    isStructureMode: boolean;\n    analyzedDefs: WeakMap<postcss.AtRule, AnalyzedStDef>;\n    analyzedDefToPartSymbol: Map<AnalyzedStDef, PartSymbol>;\n    declaredClasses: Set<string>;\n}>('st-structure');\n\n// HOOKS\n\nexport const hooks = createFeature({\n    analyzeInit(context) {\n        const { meta } = context;\n        if (meta.type !== 'stylable') {\n            return;\n        }\n        const stAtRule = meta.sourceAst.nodes.find((node) => isStAtRule(node));\n        if (stAtRule) {\n            warnOnce(experimentalMsg);\n            const metaAnalysis = plugableRecord.getUnsafe(context.meta.data, dataKey);\n            metaAnalysis.isStructureMode = true;\n        } else {\n            // set implicit root for legacy mode (root with flat structure)\n            meta.root = 'root';\n            const rootSymbol = CSSClass.addClass(context, 'root');\n            rootSymbol[`-st-root`] = true;\n        }\n    },\n    metaInit({ meta }) {\n        plugableRecord.set(meta.data, dataKey, {\n            // default to legacy flat mode\n            isStructureMode: false,\n            analyzedDefs: new WeakMap(),\n            analyzedDefToPartSymbol: new Map(),\n            declaredClasses: new Set<string>(),\n        });\n    },\n    analyzeAtRule({ context, atRule, analyzeRule }) {\n        if (!isStAtRule(atRule) || context.meta.type !== 'stylable') {\n            return;\n        }\n\n        const { analyzedDefToPartSymbol, declaredClasses } = plugableRecord.getUnsafe(\n            context.meta.data,\n            dataKey\n        );\n        const analyzed = analyzeStAtRule(atRule, context);\n        if (!analyzed) {\n            // not valid\n        } else if (analyzed.type === 'topLevelClass') {\n            declaredClasses.add(analyzed.name);\n            CSSClass.addClass(context, analyzed.name, atRule);\n            CSSClass.disableDirectivesForClass(context, analyzed.name);\n            // extend class\n            if (analyzed.extendedClass) {\n                const extendedSymbol =\n                    CSSClass.get(context.meta, analyzed.extendedClass) ||\n                    CSSClass.addClass(context, analyzed.extendedClass);\n                CSSClass.extendTypedRule(\n                    context,\n                    atRule,\n                    '.' + analyzed.name,\n                    '-st-extends',\n                    getAlias(extendedSymbol) || extendedSymbol\n                );\n            }\n            // class mapping\n            if (analyzed.mappedSelector) {\n                // ToDo: support non global mapping\n                const globalNode = findGlobalPseudo(analyzed);\n                if (globalNode && globalNode.nodes?.length === 1) {\n                    const mappedSelectorAst = globalNode.nodes[0];\n                    // analyze mapped selector\n                    analyzeRule(\n                        postcss.rule({\n                            selector: stringifySelectorAst(mappedSelectorAst),\n                            source: atRule.source,\n                        }),\n                        {\n                            isScoped: false,\n                            originalNode: atRule,\n                        }\n                    );\n                    // register global mapping to class\n                    CSSClass.extendTypedRule(\n                        context,\n                        atRule,\n                        analyzed.name,\n                        '-st-global',\n                        mappedSelectorAst.nodes\n                    );\n                }\n            }\n        } else if (analyzed.type === 'part') {\n            const parentSymbol = getPartParentSymbol(context, analyzed, analyzedDefToPartSymbol);\n            if (!parentSymbol) {\n                // unreachable: assuming analyzing @st definitions dfs - class/part must be defined\n                context.diagnostics.report(diagnostics.ELEMENT_OUT_OF_CONTEXT(), {\n                    node: atRule,\n                });\n                return;\n            }\n            const partName = analyzed.name;\n            // check re-declare\n            if (getPart(parentSymbol, partName)) {\n                const srcWord = '::' + partName;\n                context.diagnostics.report(diagnostics.REDECLARE('pseudo-element', srcWord), {\n                    node: atRule,\n                    word: srcWord,\n                });\n                return;\n            }\n            // analyze mapped selector\n            analyzeRule(\n                postcss.rule({\n                    selector: stringifySelectorAst(analyzed.mappedSelector),\n                    source: atRule.source,\n                }),\n                {\n                    isScoped: true,\n                    originalNode: atRule,\n                }\n            );\n            // register part mapping to parent definition\n            const partSymbol = setPart(parentSymbol, getSymbolId(parentSymbol), partName, [\n                analyzed.mappedSelector,\n            ]);\n            analyzedDefToPartSymbol.set(analyzed, partSymbol);\n        } else if (analyzed.type === 'state') {\n            const parentSymbol =\n                analyzed.parentAnalyze.type === 'topLevelClass'\n                    ? CSSClass.get(context.meta, analyzed.parentAnalyze.name)\n                    : analyzedDefToPartSymbol.get(analyzed.parentAnalyze);\n            if (!parentSymbol) {\n                // unreachable: assuming analyzing @st definitions dfs - class/part must be defined\n                context.diagnostics.report(diagnostics.STATE_OUT_OF_CONTEXT(), {\n                    node: atRule,\n                });\n                return;\n            }\n            const mappedStates = (parentSymbol['-st-states'] ||= {});\n            const stateName = analyzed.name;\n            if (mappedStates[stateName]) {\n                // first state definition wins\n                const srcWord = ':' + stateName;\n                context.diagnostics.report(diagnostics.REDECLARE('pseudo-state', srcWord), {\n                    node: atRule,\n                    word: srcWord,\n                });\n                return;\n            }\n            mappedStates[stateName] = analyzed.stateDef;\n        }\n    },\n    analyzeDone({ meta }) {\n        const { isStructureMode } = plugableRecord.getUnsafe(meta.data, dataKey);\n        if (meta.type === 'stylable' && !isStructureMode) {\n            // legacy flat mode:\n            //  classes and custom-selectors are registered as .root pseudo-elements\n            const customSelectors = STCustomSelector.getCustomSelectors(meta);\n            const classes = CSSClass.getAll(meta);\n            const rootClass = classes['root'];\n            const rootId = getSymbolId(rootClass);\n            // custom-selector definition precedence over class definition\n            for (const [partName, mapTo] of Object.entries(customSelectors)) {\n                setPart(rootClass, rootId, partName, mapTo);\n            }\n            for (const [className, classSymbol] of Object.entries(classes)) {\n                if (className === 'root' || customSelectors[className]) {\n                    continue;\n                }\n                setPart(rootClass, rootId, className, classSymbol);\n            }\n        }\n    },\n});\n\n// API\n\nfunction isStAtRule(node: postcss.AnyNode): node is postcss.AtRule {\n    return node?.type === 'atrule' && node.name === 'st';\n}\n\nfunction getPartParentSymbol(\n    context: FeatureContext,\n    { parentAnalyze }: ParsedStPart,\n    analyzedDefToPartSymbol: Map<AnalyzedStDef, PartSymbol>\n) {\n    return parentAnalyze.type === 'topLevelClass'\n        ? CSSClass.get(context.meta, parentAnalyze.name)\n        : analyzedDefToPartSymbol.get(parentAnalyze);\n}\n\nexport function isStructureMode(meta: StylableMeta) {\n    return plugableRecord.getUnsafe(meta.data, dataKey).isStructureMode;\n}\n\nexport function createPartSymbol(\n    input: Partial<PartSymbol> & Pick<PartSymbol, 'name' | 'id' | 'mapTo'>\n): PartSymbol {\n    const parts = input['-st-parts'] || {};\n    const states = input['-st-states'] || {};\n    return { ...input, _kind: 'part', '-st-parts': parts, '-st-states': states };\n}\n\nexport function setPart(\n    symbol: HasParts,\n    parentId: string,\n    partName: string,\n    mapTo: PartSymbol['mapTo']\n) {\n    const partSymbol = createPartSymbol({\n        name: partName,\n        id: parentId + '::' + partName,\n        mapTo,\n    });\n    symbol['-st-parts'][partName] = partSymbol;\n    return partSymbol;\n}\n\nexport function getParts(symbol: HasParts) {\n    return symbol['-st-parts'];\n}\n\nexport function getPart(symbol: HasParts, name: string): PartSymbol | undefined {\n    return symbol['-st-parts'][name];\n}\n\nexport function getPartNames(symbol: HasParts) {\n    return Object.keys(symbol['-st-parts']);\n}\n\nfunction getSymbolId(symbol: CSSClass.ClassSymbol | PartSymbol) {\n    return symbol._kind === 'class' ? '.' + symbol.name : symbol.id;\n}\n\ntype ParsedStClass = {\n    type: 'topLevelClass';\n    params: BaseAstNode[];\n    match: boolean;\n    ranges: Record<'class' | 'extend' | 'mapArrow' | 'mapTo' | 'leftoverValue', BaseAstNode[]>;\n    name: string;\n    extendedClass?: string;\n    mappedSelector?: ImmutableSelector;\n};\n\ninterface ParsedStPart {\n    type: 'part';\n    params: BaseAstNode[];\n    match: boolean;\n    ranges: Record<'pseudoElement' | 'mapArrow' | 'mapTo' | 'leftoverValue', BaseAstNode[]>;\n    name: string;\n    parentAnalyze: ParsedStClass | ParsedStPart;\n    mappedArrow: boolean;\n    mappedSelector: ImmutableSelector;\n}\n\ninterface ParsedStState {\n    type: 'state';\n    params: BaseAstNode[];\n    match: boolean;\n    ranges: Record<'leftoverValue', BaseAstNode[]>;\n    name: string;\n    parentAnalyze: ParsedStClass | ParsedStPart;\n    stateDef: MappedStates[string];\n}\n\nfunction isMatch(result: any): result is AnalyzedStDef {\n    return result.match;\n}\n\ntype AnalyzedStDef = ParsedStClass | ParsedStPart | ParsedStState;\nfunction analyzeStAtRule(\n    atRule: postcss.AtRule,\n    context: FeatureContext\n): AnalyzedStDef | undefined {\n    // cache\n    const { analyzedDefs } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    if (analyzedDefs.has(atRule)) {\n        return analyzedDefs.get(atRule);\n    }\n    // parse\n    const params = parseCSSValue(atRuleFullParams(atRule));\n\n    const def =\n        params.length === 0\n            ? undefined\n            : parseClassDefinition(atRule, params) ||\n              parsePseudoElementDefinition(context, atRule, params) ||\n              parseStateDefinition(context, atRule, params);\n\n    if (!def) {\n        if (atRule.parent?.type === 'root') {\n            context.diagnostics.report(diagnostics.UNSUPPORTED_TOP_DEF(), {\n                node: atRule,\n            });\n        } else {\n            context.diagnostics.report(diagnostics.INVALID_ST_DEF(atRule.params), {\n                node: atRule,\n            });\n        }\n        return;\n    }\n\n    // validate\n    switch (def.type) {\n        case 'topLevelClass': {\n            if (!validateTopLevelClass({ def, atRule, context })) {\n                return;\n            }\n            break;\n        }\n        case 'part': {\n            if (!validatePart({ def, atRule, context })) {\n                return;\n            }\n            break;\n        }\n        case 'state': {\n            if (!validateState({ def, atRule, context })) {\n                return;\n            }\n            break;\n        }\n    }\n    if (!isMatch(def)) {\n        return;\n    }\n\n    analyzedDefs.set(atRule, def);\n    return def;\n}\n\nfunction validateTopLevelClass({\n    def,\n    atRule,\n    context,\n}: {\n    def: Partial<ParsedStClass>;\n    atRule: postcss.AtRule;\n    context: FeatureContext;\n}) {\n    const { declaredClasses } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    if (!def.ranges || !def.params) {\n        // should always be provided by parser\n        return false;\n    }\n    if (!def.name) {\n        // ToDo: fix type to have name required\n        return false;\n    }\n    if (def.ranges.extend.length && !def.extendedClass) {\n        context.diagnostics.report(diagnostics.MISSING_EXTEND(), {\n            node: atRule,\n            word: stringifyCSSValue(def.ranges.extend),\n        });\n    }\n    if (def.ranges.leftoverValue.find((node) => node.type !== 'comment' && node.type !== 'space')) {\n        const unexpectedValue = stringifyCSSValue(def.ranges.leftoverValue).trim();\n        context.diagnostics.report(diagnostics.UNEXPECTED_EXTRA_VALUE(unexpectedValue), {\n            node: atRule,\n            word: unexpectedValue,\n        });\n        return false;\n    }\n    if (atRule.parent?.type !== 'root') {\n        context.diagnostics.report(diagnostics.CLASS_OUT_OF_CONTEXT(), {\n            node: atRule,\n        });\n        return false;\n    }\n    const existingSymbol = STSymbol.get(context.meta, def.name);\n    if (existingSymbol?._kind === 'import') {\n        context.diagnostics.report(diagnostics.OVERRIDE_IMPORTED_CLASS(), {\n            node: atRule,\n        });\n        return false;\n    }\n    if (declaredClasses.has(def.name)) {\n        // ToDo: use st-symbol redeclare api; improve st-symbol/css-class \"final\" marking and diagnostics\n        const srcWord = '.' + def.name;\n        context.diagnostics.report(diagnostics.REDECLARE('class', srcWord), {\n            node: atRule,\n            word: srcWord,\n        });\n        return false;\n    }\n    if (def.ranges.mapArrow.length) {\n        if (!def.mappedSelector) {\n            // report missing selector\n            const arrowEnd = def.ranges.mapArrow[def.ranges.mapArrow.length - 1];\n            for (let i = def.params.length - 1; i >= 0; i--) {\n                const node: BaseAstNode = def.params[i];\n                if (node === arrowEnd) {\n                    break;\n                } else if (isExactLiteral(node, ',')) {\n                    context.diagnostics.report(diagnostics.MULTI_MAPPED_SELECTOR(), {\n                        node: atRule,\n                    });\n                    return false;\n                }\n            }\n            context.diagnostics.report(diagnostics.MISSING_MAPPED_SELECTOR(), {\n                node: atRule,\n            });\n            return false;\n        }\n        const globalNode = findGlobalPseudo(def, true);\n        if (!globalNode || !globalNode.nodes || globalNode.nodes.length !== 1) {\n            context.diagnostics.report(diagnostics.GLOBAL_MAPPING_LIMITATION(), {\n                node: atRule,\n                word: stringifySelectorAst(def.mappedSelector).trim(),\n            });\n            return false;\n        }\n    }\n    return true;\n}\nfunction validatePart({\n    def,\n    atRule,\n    context,\n}: {\n    def: Partial<ParsedStPart>;\n    atRule: postcss.AtRule;\n    context: FeatureContext;\n}) {\n    if (!def.parentAnalyze) {\n        context.diagnostics.report(diagnostics.ELEMENT_OUT_OF_CONTEXT(), {\n            node: atRule,\n        });\n        return false;\n    }\n    if (!def.mappedSelector) {\n        if (!def.mappedArrow) {\n            context.diagnostics.report(diagnostics.MISSING_MAPPING(), {\n                node: atRule,\n            });\n            return false;\n        }\n        // report missing selector\n        const arrowEnd = def.ranges!.mapArrow[def.ranges!.mapArrow.length - 1];\n        for (let i = def.params!.length - 1; i >= 0; i--) {\n            const node = def.params![i];\n            if (node === arrowEnd) {\n                break;\n            } else if (isExactLiteral(node, ',')) {\n                context.diagnostics.report(diagnostics.MULTI_MAPPED_SELECTOR(), {\n                    node: atRule,\n                });\n                return false;\n            }\n        }\n        context.diagnostics.report(diagnostics.MISSING_MAPPED_SELECTOR(), {\n            node: atRule,\n        });\n        return false;\n    }\n    if (validateNestingInMapping(def.mappedSelector, context, atRule)) {\n        return false;\n    }\n    return true;\n}\nfunction validateState({\n    def,\n    atRule,\n    context,\n}: {\n    def: Partial<ParsedStState>;\n    atRule: postcss.AtRule;\n    context: FeatureContext;\n}) {\n    if (!def.parentAnalyze) {\n        context.diagnostics.report(diagnostics.STATE_OUT_OF_CONTEXT(), {\n            node: atRule,\n        });\n        return false;\n    }\n    const [amountToActualValue] = findAnything(def.ranges!.leftoverValue, 0);\n    if (amountToActualValue) {\n        const unexpectedValue = stringifyCSSValue(def.ranges!.leftoverValue).trim();\n        context.diagnostics.report(diagnostics.UNEXPECTED_EXTRA_VALUE(unexpectedValue), {\n            node: atRule,\n            word: unexpectedValue,\n        });\n        return false;\n    }\n\n    return true;\n}\nfunction findGlobalPseudo(def: Partial<ParsedStClass>, checkAfter = false) {\n    if (!def.mappedSelector) {\n        return;\n    }\n    let globalNode: ImmutablePseudoClass | undefined = undefined;\n    let foundUnexpectedSelector = false;\n    for (const node of def.mappedSelector.nodes) {\n        if (node.type === 'pseudo_class' && node.value === 'global' && !globalNode) {\n            globalNode = node;\n            if (!checkAfter) {\n                break;\n            }\n        } else if (node.type !== 'comment') {\n            foundUnexpectedSelector = true;\n        }\n    }\n    return foundUnexpectedSelector ? undefined : globalNode;\n}\n\nfunction parseStateDefinition(\n    context: FeatureContext,\n    atRule: postcss.AtRule,\n    params: BaseAstNode[]\n) {\n    const result: Partial<ParsedStState> = {\n        type: 'state',\n        params,\n        match: true,\n        ranges: { leftoverValue: [] },\n    };\n\n    let index = 0;\n\n    const { analyzedDefs } = plugableRecord.getUnsafe(context.meta.data, dataKey); // name\n    const [amountToName, nameNode] = findNextPseudoClassNode(params, 0);\n    if (nameNode) {\n        result.name = nameNode.value;\n    } else {\n        // not a pseudo-state definition\n        return;\n    }\n    index += amountToName;\n    // parent\n    const parentRule = atRule.parent;\n    const parentAnalyze = parentRule && analyzedDefs.get(parentRule as any);\n    if (\n        parentAnalyze &&\n        (parentAnalyze.type === 'topLevelClass' || parentAnalyze.type === 'part')\n    ) {\n        result.parentAnalyze = parentAnalyze;\n    }\n    // state\n    const [amountToStateDef, stateDef] = STCustomState.parseStateValue(\n        params.slice(index - 1),\n        atRule,\n        context.diagnostics\n    );\n    if (stateDef !== undefined) {\n        index += amountToStateDef;\n        result.stateDef = stateDef;\n    } else {\n        result.match = false;\n    }\n    // leftover\n    const amountTaken = index - 1;\n    result.ranges!.leftoverValue.push(...params.slice(amountTaken));\n    const [amountToUnexpected] = findAnything(params, index);\n    if (amountToUnexpected) {\n        result.match = false;\n    }\n    return result;\n}\n\nfunction parsePseudoElementDefinition(\n    context: FeatureContext,\n    atRule: postcss.AtRule,\n    params: BaseAstNode[]\n) {\n    const { analyzedDefs } = plugableRecord.getUnsafe(context.meta.data, dataKey);\n    const result: Partial<ParsedStPart> = {\n        type: 'part',\n        params,\n        match: true,\n        name: '',\n        ranges: { pseudoElement: [], mapArrow: [], mapTo: [], leftoverValue: [] },\n    };\n\n    let index = 0;\n\n    // collect pseudo element name\n    const [amountToName, nameNode, nameInspectAmount] = findPseudoElementNode(params, 0);\n    result.ranges!.pseudoElement.push(...params.slice(index, index + nameInspectAmount));\n    index += amountToName;\n    if (nameNode) {\n        result.name = nameNode.value;\n    } else {\n        // not a pseudo-element definition\n        return false;\n    }\n    // get symbol to extend\n    const parentRule = atRule.parent;\n    const parentAnalyze = parentRule && analyzedDefs.get(parentRule as any);\n    if (parentAnalyze?.type === 'topLevelClass' || parentAnalyze?.type === 'part') {\n        result.parentAnalyze = parentAnalyze;\n    }\n    // collect mapped selector\n    const [amountToMapping, mappingOpenNode, mapArrowInspectAmount] = findFatArrow(params, index, {\n        stopOnFail: false,\n    });\n    result.ranges!.mapArrow.push(...params.slice(index, index + mapArrowInspectAmount));\n    index += amountToMapping;\n    if (mappingOpenNode) {\n        result.mappedArrow = true;\n        // selector\n        result.ranges!.mapTo.push(...params.slice(index));\n        index = params.length - 1;\n        const selectorStr = atRuleFullParams(atRule).slice(mappingOpenNode.end);\n        const mappedSelectors = parseSelectorWithCache(selectorStr.trim());\n        const filteredSelector =\n            mappedSelectors.length === 1 && filterCommentsAndSpaces(mappedSelectors[0]);\n        if (filteredSelector && filteredSelector.nodes.length) {\n            result.mappedSelector = filteredSelector;\n        }\n    } else {\n        result.match = false;\n    }\n    // check unexpected extra\n    result.ranges!.leftoverValue.push(...params.slice(index + 1));\n\n    return result;\n}\n\nfunction parseClassDefinition(atRule: postcss.AtRule, params: BaseAstNode[]) {\n    const result: ParsedStClass = {\n        type: 'topLevelClass',\n        params,\n        match: true,\n        ranges: { class: [], extend: [], mapArrow: [], mapTo: [], leftoverValue: [] },\n        name: '',\n    };\n\n    let index = 0;\n    // top level class\n    const [amountToClass, classNameNode, classInspectedAmount] = findNextClassNode(params, index, {\n        stopOnFail: true,\n    });\n    result.ranges.class.push(...params.slice(index, index + classInspectedAmount));\n    index += amountToClass;\n    if (classNameNode) {\n        result.name = classNameNode.value;\n    } else {\n        // not a class definition\n        return false;\n    }\n    // collect extends class\n    const [amountToExtends, extendsNode, extendInspectAmount] = findNextPseudoClassNode(\n        params,\n        index,\n        {\n            name: 'is',\n            stopOnFail: true,\n            stopOnMatch: (_node, index, nodes) => {\n                const [amountToFatArrow] = findFatArrow(nodes, index, { stopOnFail: true });\n                return amountToFatArrow > 0;\n            },\n        }\n    );\n    if (extendsNode) {\n        result.ranges.extend.push(...params.slice(index, index + extendInspectAmount));\n        index += amountToExtends;\n        if (extendsNode.type === 'call') {\n            const [amountToExtendedClass, nameNode] = findNextClassNode(extendsNode.args, 0, {\n                stopOnFail: true,\n            });\n            if (amountToExtendedClass) {\n                index += amountToExtends;\n                // check leftover nodes\n                const [amountToUnexpectedNode] = findAnything(\n                    extendsNode.args,\n                    amountToExtendedClass\n                );\n                if (!amountToUnexpectedNode) {\n                    result.extendedClass = nameNode!.value;\n                }\n            }\n        }\n    }\n    // collect mapped selector\n    const [amountToMapping, mappingOpenNode, mapArrowInspectAmount] = findFatArrow(params, index, {\n        stopOnFail: false,\n    });\n    if (mappingOpenNode) {\n        result.ranges.mapArrow.push(...params.slice(index, index + mapArrowInspectAmount));\n        index += amountToMapping;\n        // selector\n        result.ranges.mapTo.push(...params.slice(index));\n        index = params.length;\n        const selectorStr = atRuleFullParams(atRule).slice(mappingOpenNode.end);\n        const mappedSelectors = parseSelectorWithCache(selectorStr);\n        const filteredSelector =\n            mappedSelectors.length === 1 && filterCommentsAndSpaces(mappedSelectors[0]);\n        if (filteredSelector && filteredSelector.nodes.length) {\n            result.mappedSelector = filteredSelector;\n        }\n    }\n    // unexpected extra value\n    result.ranges.leftoverValue.push(...params.slice(index));\n\n    return result;\n}\n\nfunction validateNestingInMapping(\n    selector: ImmutableSelector,\n    context: FeatureContext,\n    atRule: postcss.AtRule\n) {\n    // check for unsupported & anywhere except first\n    let invalid = false;\n    let passedActualSelector = false;\n    walkSelector(selector, (node) => {\n        if (passedActualSelector && node.type === 'nesting') {\n            context.diagnostics.report(diagnostics.MAPPING_UNSUPPORTED_NESTING(), {\n                node: atRule,\n            });\n            invalid = true;\n            return walkSelector.stopAll;\n        } else if (node.type !== 'comment' && node.type !== 'selector') {\n            passedActualSelector = true;\n        }\n        return;\n    });\n    return invalid;\n}\n\nfunction atRuleFullParams(atRule: postcss.AtRule) {\n    const afterName = atRule.raws.afterName || '';\n    const between = atRule.raws.between || '';\n    return afterName + atRule.params + between;\n}\n\nfunction filterCommentsAndSpaces(selector: ImmutableSelector) {\n    const filteredSelector: ImmutableSelector = {\n        ...selector,\n        after: '',\n        before: '',\n        nodes: selector.nodes.filter((node) => node.type !== 'comment'),\n    };\n    return filteredSelector;\n}\n", "/**\n * add get/set on an object with a deprecation warning when setting a value\n */\nconst valueMaps: Record<string, WeakMap<any, any>> = {};\nconst valueOnThisPrefix = `__deprecateFromStylable-`;\nexport function setFieldForDeprecation(\n    object: object,\n    fieldName: string,\n    options: {\n        objectType?: string;\n        pleaseUse?: string;\n        enumerable?: boolean;\n        valueOnThis?: boolean;\n    } = {}\n) {\n    const objectPrefix = options.objectType ? options.objectType + `.` : ``;\n    const alternative = options.pleaseUse ? `, please use ${options.pleaseUse}` : ``;\n    const enumerable = options.enumerable || false;\n    const fieldOnThis = options.valueOnThis ? `${valueOnThisPrefix}${fieldName}` : ``;\n    if (!fieldOnThis && !valueMaps[fieldName]) {\n        valueMaps[fieldName] = new WeakMap();\n    }\n    Object.defineProperty(object, fieldName, {\n        configurable: true,\n        get() {\n            warnOnce(`\"${objectPrefix}${fieldName}\" is deprecated${alternative}`);\n            return fieldOnThis ? this[fieldOnThis] : valueMaps[fieldName].get(this);\n        },\n        set(newValue) {\n            if (fieldOnThis) {\n                this[fieldOnThis] = newValue;\n            } else {\n                valueMaps[fieldName].set(this, newValue);\n            }\n            return newValue;\n        },\n        enumerable,\n    });\n}\n\nexport function wrapFunctionForDeprecation<FUNC extends (this: any, ...args: any[]) => any>(\n    func: FUNC,\n    options: {\n        name: string;\n        pleaseUse?: string;\n    }\n): FUNC {\n    const alternative = options.pleaseUse ? `, please use ${options.pleaseUse}` : ``;\n    const warning = `\"${options.name || func.name}\" is deprecated${alternative}`;\n    return function (this: any, ...args: any[]) {\n        warnOnce(warning);\n        return func.apply(this, args);\n    } as FUNC;\n}\n\n/**\n * console warn once per message\n */\nconst warnsFlag: Record<string, boolean> = {};\nlet isWarnOn = true;\nexport function warnOnce(warning: string) {\n    if (isWarnOn && !warnsFlag[warning]) {\n        warnsFlag[warning] = true;\n        console.warn(warning);\n    }\n}\n\n/**\n * prevent deprecation warn calls during action\n * @param action to be called with no deprecation warnings\n * @returns return value of action\n */\nexport function ignoreDeprecationWarn<T extends () => any>(action: T): ReturnType<T> {\n    isWarnOn = false;\n    try {\n        return action();\n    } finally {\n        isWarnOn = true;\n    }\n}\n", "import type * as postcss from 'postcss';\nimport type { FeatureContext } from './features';\nimport type { Diagnostics } from './diagnostics';\nimport type { SelectorList } from '@tokey/css-selector-parser';\nimport type { PlugableRecord } from './helpers/plugable-record';\nimport type { StylableExports } from './stylable-transformer';\nimport { getSourcePath } from './stylable-utils';\nimport {\n    STSymbol,\n    STImport,\n    STNamespace,\n    STGlobal,\n    STScope,\n    STVar,\n    STCustomSelector,\n    STCustomState,\n    STMixin,\n    CSSClass,\n    CSSType,\n    CSSPseudoClass,\n    CSSCustomProperty,\n    CSSKeyframes,\n    CSSLayer,\n    CSSContains,\n    STStructure,\n} from './features';\nimport type { FeatureFlags } from './features/feature';\n\nconst features = [\n    STSymbol,\n    STImport,\n    STNamespace,\n    STGlobal,\n    STScope,\n    STVar,\n    STCustomSelector,\n    STCustomState,\n    STMixin,\n    CSSClass,\n    CSSType,\n    CSSPseudoClass,\n    CSSCustomProperty,\n    CSSKeyframes,\n    CSSLayer,\n    CSSContains,\n    STStructure,\n];\n\nexport class StylableMeta {\n    public exports?: StylableExports;\n    public data: PlugableRecord = {};\n    public root = '';\n    public source: string = getSourcePath(this.sourceAst, this.diagnostics);\n    public type: 'stylable' | 'css' = this.source.endsWith('.st.css') ? 'stylable' : 'css';\n    public namespace = '';\n    public urls: string[] = [];\n    public transformCssDepth: { cssDepth: number; deepDependencies: Set<string> } | undefined;\n    public transformDiagnostics: Diagnostics | null = null;\n    public transformedScopes: Record<string, SelectorList> | null = null;\n    /** @deprecated */\n    public scopes: postcss.AtRule[] = [];\n    // Generated during transform\n    public targetAst?: postcss.Root;\n    public globals: Record<string, boolean> = {};\n    constructor(\n        public sourceAst: postcss.Root,\n        public diagnostics: Diagnostics,\n        public flags: FeatureFlags\n    ) {\n        // initiate features\n        const context: FeatureContext = { meta: this, diagnostics };\n        for (const { hooks } of features) {\n            hooks.metaInit(context);\n        }\n    }\n    getSymbol(name: string) {\n        return STSymbol.get(this, name);\n    }\n    getAllSymbols() {\n        return STSymbol.getAll(this);\n    }\n    getClass(name: string) {\n        return CSSClass.get(this, name);\n    }\n    getAllClasses() {\n        return CSSClass.getAll(this);\n    }\n    getTypeElement(name: string) {\n        return CSSType.get(this, name);\n    }\n    getAllTypeElements() {\n        return CSSType.getAll(this);\n    }\n    getImportStatements() {\n        return STImport.getImportStatements(this);\n    }\n    getStVar(name: string) {\n        return STSymbol.get(this, name, `var`);\n    }\n    getAllStVars() {\n        return STSymbol.getAllByType(this, `var`);\n    }\n}\n", "import type * as postcss from 'postcss';\nimport { Diagnostics } from './diagnostics';\nimport { knownPseudoClassesWithNestedSelectors } from './native-reserved-lists';\nimport { StylableMeta } from './stylable-meta';\nimport { CSSCustomProperty, STVar, STCustomSelector } from './features';\nimport { generalDiagnostics } from './features/diagnostics';\nimport {\n    FeatureContext,\n    STSymbol,\n    STImport,\n    STNamespace,\n    STGlobal,\n    STScope,\n    CSSClass,\n    CSSType,\n    CSSKeyframes,\n    CSSLayer,\n    CSSContains,\n    STStructure,\n} from './features';\nimport { processDeclarationFunctions } from './process-declaration-functions';\nimport {\n    walkSelector,\n    isInPseudoClassContext,\n    parseSelectorWithCache,\n    stringifySelector,\n} from './helpers/selector';\nimport { isChildOfAtRule } from './helpers/rule';\nimport { defaultFeatureFlags, type FeatureFlags } from './features/feature';\n\nexport class StylableProcessor implements FeatureContext {\n    public meta!: StylableMeta;\n    constructor(\n        public diagnostics = new Diagnostics(),\n        private resolveNamespace = STNamespace.defaultProcessNamespace,\n        public flags: FeatureFlags = { ...defaultFeatureFlags }\n    ) {}\n    public process(root: postcss.Root): StylableMeta {\n        this.meta = new StylableMeta(root, this.diagnostics, this.flags);\n\n        STStructure.hooks.analyzeInit(this);\n        STImport.hooks.analyzeInit(this);\n        CSSCustomProperty.hooks.analyzeInit(this);\n\n        this.handleAtRules(root);\n\n        root.walkRules((rule) => {\n            if (!isChildOfAtRule(rule, 'keyframes')) {\n                this.handleRule(rule, {\n                    isScoped: isChildOfAtRule(rule, `st-scope`),\n                    reportUnscoped: true,\n                });\n            }\n        });\n\n        root.walkDecls((decl) => {\n            CSSClass.hooks.analyzeDeclaration({ context: this, decl });\n            CSSCustomProperty.hooks.analyzeDeclaration({ context: this, decl });\n            CSSContains.hooks.analyzeDeclaration({ context: this, decl });\n\n            this.collectUrls(decl);\n        });\n        STNamespace.hooks.analyzeDone(this);\n        STCustomSelector.hooks.analyzeDone(this);\n        STStructure.hooks.analyzeDone(this);\n\n        STNamespace.setMetaNamespace(this, this.resolveNamespace);\n\n        STSymbol.reportRedeclare(this);\n\n        return this.meta;\n    }\n\n    protected handleAtRules(root: postcss.Root) {\n        const analyzeRule = (\n            rule: postcss.Rule,\n            {\n                isScoped,\n                originalNode,\n            }: { isScoped: boolean; originalNode: postcss.AtRule | postcss.Rule }\n        ) => {\n            return this.handleRule(rule, {\n                isScoped,\n                originalNode,\n                reportUnscoped: false,\n            });\n        };\n\n        root.walkAtRules((atRule) => {\n            switch (atRule.name) {\n                case 'st-import': {\n                    STImport.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n                case 'namespace':\n                case 'st-namespace': {\n                    STNamespace.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n                case 'keyframes':\n                    CSSKeyframes.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                case 'layer':\n                    CSSLayer.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                case 'import':\n                    STImport.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    CSSLayer.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                case 'custom-selector': {\n                    STCustomSelector.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n                case 'st-scope':\n                    STScope.hooks.analyzeAtRule({ context: this, atRule, analyzeRule });\n                    break;\n                case 'property':\n                case 'st-global-custom-property': {\n                    CSSCustomProperty.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n                case 'container': {\n                    CSSContains.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n                case 'st': {\n                    STStructure.hooks.analyzeAtRule({\n                        context: this,\n                        atRule,\n                        analyzeRule,\n                    });\n                    break;\n                }\n            }\n        });\n    }\n    private collectUrls(decl: postcss.Declaration) {\n        processDeclarationFunctions(\n            decl,\n            (node) => {\n                if (node.type === 'url') {\n                    this.meta.urls.push(node.url);\n                }\n            },\n            false\n        );\n    }\n    protected handleRule(\n        rule: postcss.Rule,\n        {\n            isScoped,\n            reportUnscoped,\n            originalNode = rule,\n        }: {\n            isScoped: boolean;\n            reportUnscoped: boolean;\n            originalNode?: postcss.AtRule | postcss.Rule;\n        }\n    ) {\n        const selectorAst = parseSelectorWithCache(rule.selector);\n\n        let locallyScoped = isScoped;\n        let topSelectorIndex = -1;\n        walkSelector(selectorAst, (node, ...nodeContext) => {\n            const [index, nodes, parents] = nodeContext;\n            const type = node.type;\n            if (type === 'selector' && !isInPseudoClassContext(parents)) {\n                // reset scope check between top level selectors\n                locallyScoped = isScoped;\n                topSelectorIndex++;\n            }\n\n            const walkSkip = STGlobal.hooks.analyzeSelectorNode({\n                context: this,\n                node,\n                topSelectorIndex,\n                rule,\n                originalNode,\n                walkContext: nodeContext,\n            });\n            if (walkSkip !== undefined) {\n                return walkSkip;\n            }\n\n            if (node.type === 'pseudo_class') {\n                if (node.value === 'import') {\n                    STImport.hooks.analyzeSelectorNode({\n                        context: this,\n                        node,\n                        topSelectorIndex,\n                        rule,\n                        originalNode,\n                        walkContext: nodeContext,\n                    });\n                } else if (node.value === 'vars') {\n                    return STVar.hooks.analyzeSelectorNode({\n                        context: this,\n                        node,\n                        topSelectorIndex,\n                        rule,\n                        originalNode,\n                        walkContext: nodeContext,\n                    });\n                } else if (node.value.startsWith('--')) {\n                    // ToDo: move to css-class feature\n                    locallyScoped =\n                        locallyScoped ||\n                        STCustomSelector.isScoped(this.meta, node.value.slice(2)) ||\n                        false;\n                } else if (!knownPseudoClassesWithNestedSelectors.includes(node.value)) {\n                    return walkSelector.skipNested;\n                }\n            } else if (node.type === 'class') {\n                CSSClass.hooks.analyzeSelectorNode({\n                    context: this,\n                    node,\n                    topSelectorIndex,\n                    rule,\n                    originalNode,\n                    walkContext: nodeContext,\n                });\n\n                locallyScoped = CSSClass.validateClassScoping({\n                    context: this,\n                    classSymbol: CSSClass.get(this.meta, node.value)!,\n                    locallyScoped,\n                    reportUnscoped,\n                    node,\n                    nodes,\n                    index,\n                    rule,\n                });\n            } else if (node.type === 'type') {\n                CSSType.hooks.analyzeSelectorNode({\n                    context: this,\n                    node,\n                    topSelectorIndex,\n                    rule,\n                    originalNode,\n                    walkContext: nodeContext,\n                });\n\n                locallyScoped = CSSType.validateTypeScoping({\n                    context: this,\n                    locallyScoped,\n                    reportUnscoped,\n                    node,\n                    nodes,\n                    index,\n                    rule,\n                });\n            } else if (node.type === `id`) {\n                if (node.nodes) {\n                    this.diagnostics.report(\n                        generalDiagnostics.INVALID_FUNCTIONAL_SELECTOR(`#` + node.value, `id`),\n                        {\n                            node: rule,\n                            word: stringifySelector(node),\n                        }\n                    );\n                }\n            } else if (node.type === `attribute`) {\n                if (node.nodes) {\n                    this.diagnostics.report(\n                        generalDiagnostics.INVALID_FUNCTIONAL_SELECTOR(\n                            `[${node.value}]`,\n                            `attribute`\n                        ),\n                        {\n                            node: rule,\n                            word: stringifySelector(node),\n                        }\n                    );\n                }\n            } else if (node.type === `nesting`) {\n                if (node.nodes) {\n                    this.diagnostics.report(\n                        generalDiagnostics.INVALID_FUNCTIONAL_SELECTOR(node.value, `nesting`),\n                        {\n                            node: rule,\n                            word: stringifySelector(node),\n                        }\n                    );\n                }\n            }\n            return;\n        });\n        STGlobal.hooks.analyzeSelectorDone({\n            context: this,\n            rule,\n            originalNode,\n        });\n        return locallyScoped;\n    }\n}\n\n// ToDo: remove export and reroute import from feature\nexport const processNamespace = STNamespace.defaultProcessNamespace;\n", "import { cachedProcessFile, CacheItem, MinimalFS } from './cached-process-file';\nimport { cssParse, CssParser } from './parser';\nimport { processNamespace, StylableProcessor } from './stylable-processor';\nimport type { StylableMeta } from './stylable-meta';\nimport type { Diagnostics } from './diagnostics';\nimport { defaultFeatureFlags, type FeatureFlags } from './features/feature';\n\nexport function createStylableFileProcessor({\n    fileSystem,\n    onProcess,\n    resolveNamespace,\n    cssParser = cssParse,\n    cache,\n    createDiagnostics,\n    flags = { ...defaultFeatureFlags },\n}: {\n    fileSystem: MinimalFS;\n    flags?: FeatureFlags;\n    onProcess?: (meta: StylableMeta, path: string) => StylableMeta;\n    resolveNamespace?: typeof processNamespace;\n    cssParser?: CssParser;\n    cache?: Record<string, CacheItem<StylableMeta>>;\n    createDiagnostics?: (from: string) => Diagnostics;\n}) {\n    return cachedProcessFile<StylableMeta>(\n        (from, content) => {\n            return new StylableProcessor(\n                createDiagnostics?.(from),\n                resolveNamespace,\n                flags\n            ).process(cssParser(content, { from }));\n        },\n        (resolvedPath: string) => {\n            return fileSystem.readFileSync(resolvedPath, 'utf8');\n        },\n        onProcess && [onProcess],\n        cache\n    );\n}\n", "import isVendorPrefixed from 'is-vendor-prefixed';\nimport * as postcss from 'postcss';\nimport type { FileProcessor } from './cached-process-file';\nimport { createDiagnosticReporter, Diagnostics } from './diagnostics';\nimport { StylableEvaluator } from './functions';\nimport { nativePseudoElements } from './native-reserved-lists';\nimport {\n    cloneSelector,\n    createCombinatorSelector,\n    parseSelectorWithCache,\n    stringifySelector,\n} from './helpers/selector';\nimport { isEqual } from './helpers/eql';\nimport {\n    SelectorNode,\n    Selector,\n    SelectorList,\n    groupCompoundSelectors,\n    CompoundSelector,\n    splitCompoundSelectors,\n    ImmutableSelectorNode,\n} from '@tokey/css-selector-parser';\nimport { isChildOfAtRule } from './helpers/rule';\nimport { getOriginDefinition } from './helpers/resolve';\nimport {\n    ClassSymbol,\n    CSSContains,\n    CSSMedia,\n    ElementSymbol,\n    FeatureTransformContext,\n    STNamespace,\n    STStructure,\n    STImport,\n    STGlobal,\n    STScope,\n    STCustomSelector,\n    STVar,\n    STMixin,\n    CSSClass,\n    CSSType,\n    CSSPseudoClass,\n    CSSKeyframes,\n    CSSLayer,\n    CSSCustomProperty,\n} from './features';\nimport type { StylableMeta } from './stylable-meta';\nimport {\n    CSSResolve,\n    StylableResolverCache,\n    StylableResolver,\n    createSymbolResolverWithCache,\n} from './stylable-resolver';\nimport { validateCustomPropertyName } from './helpers/css-custom-property';\nimport type { ModuleResolver } from './types';\nimport { getRuleScopeSelector } from './deprecated/postcss-ast-extension';\nimport type { MappedStates } from './helpers/custom-state';\n\nexport interface ResolvedElement {\n    name: string;\n    type: string;\n    resolved: Array<CSSResolve<ClassSymbol | ElementSymbol>>;\n}\n\nexport type RuntimeStVar = string | { [key: string]: RuntimeStVar } | RuntimeStVar[];\n\nexport interface StylableExports {\n    classes: Record<string, string>;\n    vars: Record<string, string>;\n    stVars: Record<string, RuntimeStVar>;\n    keyframes: Record<string, string>;\n    layers: Record<string, string>;\n    containers: Record<string, string>;\n}\n\nexport interface StylableResults {\n    meta: StylableMeta;\n    exports: StylableExports;\n}\n\nexport type replaceValueHook = (\n    value: string,\n    name: string | { name: string; args: string[] },\n    isLocal: boolean,\n    passedThrough: string[]\n) => string;\n\nexport type postProcessor<T = {}> = (\n    stylableResults: StylableResults,\n    transformer: StylableTransformer\n) => StylableResults & T;\n\nexport interface TransformHooks {\n    postProcessor?: postProcessor;\n    replaceValueHook?: replaceValueHook;\n}\n\ntype EnvMode = 'production' | 'development';\n\nexport interface TransformerOptions {\n    fileProcessor: FileProcessor<StylableMeta>;\n    moduleResolver: ModuleResolver;\n    requireModule: (modulePath: string) => any;\n    diagnostics: Diagnostics;\n    keepValues?: boolean;\n    replaceValueHook?: replaceValueHook;\n    postProcessor?: postProcessor;\n    mode?: EnvMode;\n    resolverCache?: StylableResolverCache;\n    stVarOverride?: Record<string, string>;\n    experimentalSelectorInference?: boolean;\n}\n\nexport const transformerDiagnostics = {\n    UNKNOWN_PSEUDO_ELEMENT: createDiagnosticReporter(\n        '12001',\n        'error',\n        (name: string) => `unknown pseudo element \"${name}\"`\n    ),\n};\n\ntype PostcssContainer = postcss.Container<postcss.ChildNode> | postcss.Document;\n\nexport class StylableTransformer {\n    public fileProcessor: FileProcessor<StylableMeta>;\n    public diagnostics: Diagnostics;\n    public resolver: StylableResolver;\n    public keepValues: boolean;\n    public replaceValueHook: replaceValueHook | undefined;\n    public postProcessor: postProcessor | undefined;\n    public mode: EnvMode;\n    private defaultStVarOverride: Record<string, string>;\n    private evaluator: StylableEvaluator;\n    public getResolvedSymbols: ReturnType<typeof createSymbolResolverWithCache>;\n    private directiveNodes: postcss.Declaration[] = [];\n    public experimentalSelectorInference: boolean;\n    public containerInferredSelectorMap = new Map<PostcssContainer, InferredSelector>();\n    constructor(options: TransformerOptions) {\n        this.diagnostics = options.diagnostics;\n        this.keepValues = options.keepValues || false;\n        this.fileProcessor = options.fileProcessor;\n        this.replaceValueHook = options.replaceValueHook;\n        this.postProcessor = options.postProcessor;\n        this.experimentalSelectorInference = options.experimentalSelectorInference === true;\n        this.resolver = new StylableResolver(\n            options.fileProcessor,\n            options.requireModule,\n            options.moduleResolver,\n            options.resolverCache || new Map()\n        );\n        this.mode = options.mode || 'production';\n        this.defaultStVarOverride = options.stVarOverride || {};\n        this.getResolvedSymbols = createSymbolResolverWithCache(this.resolver, this.diagnostics);\n        this.evaluator = new StylableEvaluator({\n            valueHook: this.replaceValueHook,\n            getResolvedSymbols: this.getResolvedSymbols,\n        });\n    }\n    public transform(meta: StylableMeta): StylableResults {\n        meta.exports = {\n            classes: {},\n            vars: {},\n            stVars: {},\n            keyframes: {},\n            layers: {},\n            containers: {},\n        };\n        meta.transformedScopes = null;\n        meta.targetAst = meta.sourceAst.clone();\n        const context = {\n            meta,\n            diagnostics: this.diagnostics,\n            resolver: this.resolver,\n            evaluator: this.evaluator,\n            getResolvedSymbols: this.getResolvedSymbols,\n        };\n        STImport.hooks.transformInit({ context });\n        STGlobal.hooks.transformInit({ context });\n        if (!this.experimentalSelectorInference) {\n            meta.transformedScopes = validateScopes(this, meta);\n        }\n        this.transformAst(meta.targetAst, meta, meta.exports);\n        meta.transformDiagnostics = this.diagnostics;\n        const result = { meta, exports: meta.exports };\n\n        return this.postProcessor ? this.postProcessor(result, this) : result;\n    }\n    public transformAst(\n        ast: postcss.Root,\n        meta: StylableMeta,\n        metaExports?: StylableExports,\n        stVarOverride: Record<string, string> = this.defaultStVarOverride,\n        path: string[] = [],\n        mixinTransform = false,\n        inferredSelectorMixin?: InferredSelector\n    ) {\n        if (meta.type !== 'stylable') {\n            return;\n        }\n        const { evaluator } = this;\n\n        const prevStVarOverride = evaluator.stVarOverride;\n        evaluator.stVarOverride = stVarOverride;\n\n        const transformContext = {\n            meta,\n            diagnostics: this.diagnostics,\n            resolver: this.resolver,\n            evaluator,\n            getResolvedSymbols: this.getResolvedSymbols,\n            passedThrough: path.slice(),\n            inferredSelectorMixin,\n        };\n        const transformResolveOptions = {\n            context: transformContext,\n        };\n        prepareAST(transformContext, ast, this.experimentalSelectorInference);\n\n        const cssClassResolve = CSSClass.hooks.transformResolve(transformResolveOptions);\n        const stVarResolve = STVar.hooks.transformResolve(transformResolveOptions);\n        const keyframesResolve = CSSKeyframes.hooks.transformResolve(transformResolveOptions);\n        const layerResolve = CSSLayer.hooks.transformResolve(transformResolveOptions);\n        const containsResolve = CSSContains.hooks.transformResolve(transformResolveOptions);\n        const cssVarsMapping = CSSCustomProperty.hooks.transformResolve(transformResolveOptions);\n\n        const handleAtRule = (atRule: postcss.AtRule) => {\n            const { name } = atRule;\n            if (name === 'media') {\n                CSSMedia.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: {},\n                    transformer: this,\n                });\n            } else if (name === 'property') {\n                CSSCustomProperty.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: cssVarsMapping,\n                    transformer: this,\n                });\n            } else if (name === 'keyframes') {\n                CSSKeyframes.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: keyframesResolve,\n                    transformer: this,\n                });\n            } else if (name === 'layer') {\n                CSSLayer.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: layerResolve,\n                    transformer: this,\n                });\n            } else if (name === 'import') {\n                CSSLayer.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: layerResolve,\n                    transformer: this,\n                });\n            } else if (name === 'container') {\n                CSSContains.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: containsResolve,\n                    transformer: this,\n                });\n            } else if (name === 'st-scope') {\n                STScope.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: containsResolve,\n                    transformer: this,\n                });\n            } else if (name === 'custom-selector') {\n                STCustomSelector.hooks.transformAtRuleNode({\n                    context: transformContext,\n                    atRule,\n                    resolved: containsResolve,\n                    transformer: this,\n                });\n            }\n        };\n        const handleDeclaration = (decl: postcss.Declaration) => {\n            if (validateCustomPropertyName(decl.prop)) {\n                CSSCustomProperty.hooks.transformDeclaration({\n                    context: transformContext,\n                    decl,\n                    resolved: cssVarsMapping,\n                });\n            } else if (decl.prop === `animation` || decl.prop === `animation-name`) {\n                CSSKeyframes.hooks.transformDeclaration({\n                    context: transformContext,\n                    decl,\n                    resolved: keyframesResolve,\n                });\n            } else if (decl.prop === 'container' || decl.prop === 'container-name') {\n                CSSContains.hooks.transformDeclaration({\n                    context: transformContext,\n                    decl,\n                    resolved: containsResolve,\n                });\n            }\n\n            if (decl.prop.startsWith('-st-')) {\n                if (this.mode === 'production') {\n                    this.directiveNodes.push(decl);\n                }\n                return;\n            }\n\n            decl.value = this.evaluator.evaluateValue(transformContext, {\n                value: decl.value,\n                meta,\n                node: decl,\n            }).outputValue;\n        };\n\n        ast.walk((node) => {\n            if (node.type === 'rule') {\n                if (isChildOfAtRule(node, 'keyframes')) {\n                    return;\n                }\n                // get context inferred selector\n                let currentParent: PostcssContainer | undefined = node.parent;\n                while (currentParent && !this.containerInferredSelectorMap.has(currentParent)) {\n                    currentParent = currentParent.parent;\n                }\n                // transform selector\n                const { selector, inferredSelector } = this.scopeSelector(\n                    meta,\n                    node.selector,\n                    node,\n                    currentParent && this.containerInferredSelectorMap.get(currentParent),\n                    inferredSelectorMixin\n                );\n                // save results\n                this.containerInferredSelectorMap.set(node, inferredSelector);\n                node.selector = selector;\n            } else if (node.type === 'atrule') {\n                handleAtRule(node);\n            } else if (node.type === 'decl') {\n                handleDeclaration(node);\n            }\n        });\n\n        if (!mixinTransform && meta.targetAst && this.mode === 'development') {\n            CSSClass.addDevRules(transformContext);\n        }\n\n        const lastPassParams = {\n            context: transformContext,\n            ast,\n            transformer: this,\n            path,\n        };\n        if (this.experimentalSelectorInference) {\n            STScope.hooks.transformLastPass(lastPassParams);\n        }\n        STMixin.hooks.transformLastPass(lastPassParams);\n        if (!mixinTransform) {\n            STGlobal.hooks.transformLastPass(lastPassParams);\n            for (const node of this.directiveNodes) {\n                node.remove();\n            }\n        }\n\n        if (metaExports) {\n            CSSClass.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: cssClassResolve,\n            });\n            STVar.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: stVarResolve,\n            });\n            CSSKeyframes.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: keyframesResolve,\n            });\n            CSSLayer.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: layerResolve,\n            });\n            CSSContains.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: containsResolve,\n            });\n            CSSCustomProperty.hooks.transformJSExports({\n                exports: metaExports,\n                resolved: cssVarsMapping,\n            });\n        }\n\n        // restore evaluator state\n        this.evaluator.stVarOverride = prevStVarOverride;\n    }\n    public resolveSelectorElements(meta: StylableMeta, selector: string): ResolvedElement[][] {\n        return this.scopeSelector(meta, selector).elements;\n    }\n    public scopeSelector(\n        originMeta: StylableMeta,\n        selector: string,\n        selectorNode?: postcss.Rule | postcss.AtRule,\n        inferredNestSelector?: InferredSelector,\n        inferredMixinSelector?: InferredSelector,\n        unwrapGlobals = false\n    ): {\n        selector: string;\n        elements: ResolvedElement[][];\n        targetSelectorAst: SelectorList;\n        inferredSelector: InferredSelector;\n    } {\n        const context = this.createSelectorContext(\n            originMeta,\n            parseSelectorWithCache(selector, { clone: true }),\n            selectorNode || postcss.rule({ selector }),\n            selector,\n            inferredNestSelector,\n            inferredMixinSelector\n        );\n        const targetSelectorAst = this.scopeSelectorAst(context);\n        if (unwrapGlobals) {\n            STGlobal.unwrapPseudoGlobals(targetSelectorAst);\n        }\n        return {\n            targetSelectorAst,\n            selector: stringifySelector(targetSelectorAst),\n            elements: context.elements,\n            inferredSelector: context.inferredMultipleSelectors,\n        };\n    }\n    public createSelectorContext(\n        meta: StylableMeta,\n        selectorAst: SelectorList,\n        selectorNode: postcss.Rule | postcss.AtRule,\n        selectorStr?: string,\n        selectorNest?: InferredSelector,\n        selectorMixin?: InferredSelector\n    ) {\n        return new ScopeContext(\n            meta,\n            this.resolver,\n            selectorAst,\n            selectorNode,\n            this.scopeSelectorAst.bind(this),\n            this,\n            selectorNest,\n            selectorMixin,\n            undefined,\n            selectorStr\n        );\n    }\n    public createInferredSelector(\n        meta: StylableMeta,\n        { name, type }: { name: string; type: 'class' | 'element' }\n    ) {\n        const resolvedSymbols = this.getResolvedSymbols(meta);\n        const resolved = resolvedSymbols[type][name];\n        return new InferredSelector(this, resolved);\n    }\n    public scopeSelectorAst(context: ScopeContext): SelectorList {\n        // group compound selectors: .a.b .c:hover, a .c:hover -> [[[.a.b], [.c:hover]], [[.a], [.c:hover]]]\n        const selectorList = groupCompoundSelectors(context.selectorAst);\n        // loop over selectors\n        for (const selector of selectorList) {\n            context.elements.push([]);\n            context.selectorIndex++;\n            context.selector = selector;\n            // loop over nodes\n            for (const node of [...selector.nodes]) {\n                if (node.type !== `compound_selector`) {\n                    if (node.type === 'combinator') {\n                        if (this.experimentalSelectorInference || context.isNested) {\n                            context.setNextSelectorScope(context.inferredSelectorContext, node);\n                        }\n                    }\n                    continue;\n                }\n                context.compoundSelector = node;\n                // loop over each node in a compound selector\n                for (const compoundNode of node.nodes) {\n                    if (compoundNode.type === 'universal' && this.experimentalSelectorInference) {\n                        context.setNextSelectorScope(\n                            [\n                                {\n                                    _kind: 'css',\n                                    meta: context.originMeta,\n                                    symbol: CSSType.createSymbol({ name: '*' }),\n                                },\n                            ],\n                            node\n                        );\n                    }\n                    context.node = compoundNode;\n                    // transform node\n                    this.handleCompoundNode(context as Required<ScopeContext>);\n                }\n            }\n            // add inferred selector end to multiple selector\n            context.inferredMultipleSelectors.add(context.inferredSelector);\n            if (selectorList.length - 1 > context.selectorIndex) {\n                // reset current anchor for all except last selector\n                context.inferredSelector = new InferredSelector(\n                    this,\n                    context.inferredSelectorStart\n                );\n            }\n        }\n        // backwards compatibility for elements - empty selector still have an empty first target\n        if (selectorList.length === 0) {\n            context.elements.push([]);\n        }\n        const targetAst = splitCompoundSelectors(selectorList);\n        context.splitSelectors.duplicateSelectors(targetAst);\n        for (let i = 0; i < targetAst.length; i++) {\n            context.selectorAst[i] = targetAst[i];\n        }\n        return targetAst;\n    }\n    private handleCompoundNode(context: Required<ScopeContext>) {\n        const { inferredSelector, node, originMeta } = context;\n        const transformerContext = {\n            meta: originMeta,\n            diagnostics: this.diagnostics,\n            resolver: this.resolver,\n            evaluator: this.evaluator,\n            getResolvedSymbols: this.getResolvedSymbols,\n        };\n        if (node.type === 'class') {\n            CSSClass.hooks.transformSelectorNode({\n                context: transformerContext,\n                selectorContext: context,\n                node,\n            });\n        } else if (node.type === 'type') {\n            CSSType.hooks.transformSelectorNode({\n                context: transformerContext,\n                selectorContext: context,\n                node,\n            });\n        } else if (node.type === 'pseudo_element') {\n            if (node.value === ``) {\n                // partial psuedo elemennt: `.x::`\n                // ToDo: currently the transformer corrects the css without warning,\n                // should stylable warn?\n                return;\n            }\n            const inferredElement = inferredSelector.getPseudoElements({\n                isFirstInSelector: context.isFirstInSelector(node),\n                name: node.value,\n                experimentalSelectorInference: this.experimentalSelectorInference,\n            })[node.value];\n            if (inferredElement) {\n                context.setNextSelectorScope(inferredElement.inferred, node, node.value);\n                if (context.transform) {\n                    context.transformIntoMultiSelector(node, inferredElement.selectors);\n                }\n            } else {\n                // first definition of a part in the extends/alias chain\n                context.setNextSelectorScope([], node, node.value);\n\n                if (\n                    !nativePseudoElements.includes(node.value) &&\n                    !isVendorPrefixed(node.value) &&\n                    !context.isDuplicateStScopeDiagnostic()\n                ) {\n                    this.diagnostics.report(\n                        transformerDiagnostics.UNKNOWN_PSEUDO_ELEMENT(node.value),\n                        {\n                            node: context.ruleOrAtRule,\n                            word: node.value,\n                        }\n                    );\n                }\n            }\n        } else if (node.type === 'pseudo_class') {\n            const isCustomSelector = STCustomSelector.hooks.transformSelectorNode({\n                context: transformerContext,\n                selectorContext: context,\n                node,\n            });\n            if (!isCustomSelector) {\n                CSSPseudoClass.hooks.transformSelectorNode({\n                    context: transformerContext,\n                    selectorContext: context,\n                    node,\n                });\n            }\n        } else if (node.type === `nesting`) {\n            context.setNextSelectorScope(context.inferredSelectorNest, node, node.value);\n        } else if (node.type === 'attribute') {\n            STMixin.hooks.transformSelectorNode({\n                context: transformerContext,\n                selectorContext: context,\n                node,\n            });\n        }\n    }\n}\n\nfunction validateScopes(transformer: StylableTransformer, meta: StylableMeta) {\n    const transformedScopes: Record<string, SelectorList> = {};\n    for (const scope of meta.scopes) {\n        const len = transformer.diagnostics.reports.length;\n        const rule = postcss.rule({ selector: scope.params });\n\n        const context = transformer.createSelectorContext(\n            meta,\n            parseSelectorWithCache(rule.selector, { clone: true }),\n            rule,\n            rule.selector\n        );\n        transformedScopes[rule.selector] = groupCompoundSelectors(\n            transformer.scopeSelectorAst(context)\n        );\n        const ruleReports = transformer.diagnostics.reports.splice(len);\n\n        for (const { code, message, severity, word } of ruleReports) {\n            transformer.diagnostics.report(\n                {\n                    code,\n                    message,\n                    severity,\n                },\n                {\n                    node: scope,\n                    word: word || scope.params,\n                }\n            );\n        }\n    }\n\n    return transformedScopes;\n}\n\nfunction removeInitialCompoundMarker(\n    selector: Selector,\n    meta: StylableMeta,\n    structureMode: boolean\n) {\n    let hadCompoundStart = false;\n    const compoundedSelector = groupCompoundSelectors(selector);\n    const first = compoundedSelector.nodes.find(\n        ({ type }) => type === `compound_selector`\n    ) as CompoundSelector;\n    if (first) {\n        const matchNode = structureMode\n            ? (node: SelectorNode) => node.type === 'nesting'\n            : (node: SelectorNode) => node.type === 'class' && node.value === meta.root;\n        for (let i = 0; i < first.nodes.length; i++) {\n            const node = first.nodes[i];\n            if (node.type === 'comment') {\n                continue;\n            }\n            if (matchNode(node)) {\n                hadCompoundStart = true;\n                first.nodes.splice(i, 1);\n            }\n            break;\n        }\n    }\n    return { selector: splitCompoundSelectors(compoundedSelector), hadCompoundStart };\n}\n\ntype SelectorSymbol = ClassSymbol | ElementSymbol | STStructure.PartSymbol;\ntype InferredResolve = CSSResolve<SelectorSymbol>;\ntype InferredPseudoElement = {\n    inferred: InferredSelector;\n    selectors: SelectorList;\n};\ntype InferredPseudoClass = {\n    meta: StylableMeta;\n    state: MappedStates[string];\n};\nexport class InferredSelector {\n    protected resolveSet = new Set<InferredResolve[]>();\n    constructor(\n        private api: Pick<\n            StylableTransformer,\n            | 'getResolvedSymbols'\n            | 'createSelectorContext'\n            | 'scopeSelectorAst'\n            | 'createInferredSelector'\n        >,\n        resolve?: InferredResolve[] | InferredSelector\n    ) {\n        if (resolve) {\n            this.add(resolve);\n        }\n    }\n    public isEmpty() {\n        return this.resolveSet.size === 0;\n    }\n    public set(resolve: InferredResolve[] | InferredSelector) {\n        if (resolve === this) {\n            return;\n        }\n        this.resolveSet.clear();\n        this.add(resolve);\n    }\n    public clone() {\n        return new InferredSelector(this.api, this);\n    }\n    /**\n     * Adds to the set of inferred resolved CSS\n     * Assumes passes CSSResolved from the same meta/symbol are\n     * the same from the same cached transform process to dedupe them.\n     */\n    public add(resolve: InferredResolve[] | InferredSelector) {\n        if (resolve instanceof InferredSelector) {\n            resolve.resolveSet.forEach((resolve) => this.add(resolve));\n        } else {\n            this.resolveSet.add(resolve);\n        }\n    }\n    /**\n     * Takes a CSS part resolve and use it extend the current set of inferred resolved.\n     * Used to expand the resolved mapped selector with the part definition\n     * e.g. part can add nested states/parts that override the inferred mapped selector.\n     */\n    private addPartOverride(partResolve: CSSResolve<STStructure.PartSymbol>) {\n        const newSet = new Set<InferredResolve[]>();\n        for (const resolve of this.resolveSet) {\n            newSet.add([partResolve, ...resolve]);\n        }\n        if (!this.resolveSet.size) {\n            newSet.add([partResolve]);\n        }\n        this.resolveSet = newSet;\n    }\n    public getPseudoClasses({ name: searchedName }: { name?: string } = {}) {\n        const collectedStates: Record<string, InferredPseudoClass> = {};\n        const resolvedCount: Record<string, number> = {};\n        const expectedIntersectionCount = this.resolveSet.size; // ToDo: dec for any types\n        const addInferredState = (\n            name: string,\n            meta: StylableMeta,\n            state: MappedStates[string]\n        ) => {\n            const existing = collectedStates[name];\n            if (!existing) {\n                collectedStates[name] = { meta, state };\n                resolvedCount[name] = 1;\n            } else {\n                const isStatesEql = isEqual(existing.state, state);\n                if (\n                    isStatesEql &&\n                    // states from same meta\n                    (existing.meta === meta ||\n                        // global states\n                        typeof state === 'string' ||\n                        state?.type === 'template')\n                ) {\n                    resolvedCount[name]++;\n                }\n            }\n        };\n        // infer states from  multiple resolved selectors\n        for (const resolvedContext of this.resolveSet.values()) {\n            const resolvedFoundNames = new Set<string>();\n            resolved: for (const { symbol, meta } of resolvedContext) {\n                const states = symbol[`-st-states`];\n                if (!states) {\n                    continue;\n                }\n                if (searchedName) {\n                    if (Object.hasOwnProperty.call(states, searchedName)) {\n                        // track state\n                        addInferredState(searchedName, meta, states[searchedName]);\n                        break resolved;\n                    }\n                } else {\n                    // get all states\n                    for (const [name, state] of Object.entries(states)) {\n                        if (!resolvedFoundNames.has(name)) {\n                            // track state\n                            resolvedFoundNames.add(name);\n                            addInferredState(name, meta, state);\n                        }\n                    }\n                }\n            }\n        }\n        // strict: remove states that do not exist on ALL resolved selectors\n        return expectedIntersectionCount > 1\n            ? Object.entries(collectedStates).reduce((resultStates, [name, InferredState]) => {\n                  if (resolvedCount[name] >= expectedIntersectionCount) {\n                      resultStates[name] = InferredState;\n                  }\n                  return resultStates;\n              }, {} as typeof collectedStates)\n            : collectedStates;\n    }\n    public getPseudoElements({\n        isFirstInSelector,\n        experimentalSelectorInference,\n        name,\n    }: {\n        isFirstInSelector: boolean;\n        experimentalSelectorInference: boolean;\n        name?: string;\n    }) {\n        const collectedElements: Record<string, InferredPseudoElement> = {};\n        const resolvedCount: Record<string, number> = {};\n        const checked: Record<string, Map<string, boolean>> = {};\n        const expectedIntersectionCount = this.resolveSet.size; // ToDo: dec for any types\n        const addInferredElement = (\n            name: string,\n            inferred: InferredSelector,\n            selectors: SelectorList\n        ) => {\n            const item = (collectedElements[name] ||= {\n                inferred: new InferredSelector(this.api),\n                selectors: [],\n            });\n            // check inferred matching\n            if (!item.inferred.matchedElement(inferred)) {\n                // ToDo: bailout fast\n                return;\n            }\n            // add match\n            resolvedCount[name]++;\n            item.inferred.add(inferred);\n            item.selectors.push(...selectors);\n        };\n        // infer elements from  multiple resolved selectors\n        for (const resolvedContext of this.resolveSet.values()) {\n            /**\n             * search for elements in each resolved selector.\n             * start at 1 for legacy flat mode to prefer inherited elements over local\n             */\n            const startIndex =\n                resolvedContext.length === 1 ||\n                (resolvedContext[0] &&\n                    (STStructure.isStructureMode(resolvedContext[0].meta) ||\n                        resolvedContext[0].symbol._kind === 'part'))\n                    ? 0\n                    : 1;\n            resolved: for (let i = startIndex; i < resolvedContext.length; i++) {\n                const { symbol, meta } = resolvedContext[i];\n                const structureMode = STStructure.isStructureMode(meta);\n                if (\n                    symbol._kind !== 'part' &&\n                    (symbol.alias || (!structureMode && !symbol['-st-root']))\n                ) {\n                    // non-root & alias classes don't have parts: bailout\n                    continue;\n                }\n                if (name) {\n                    const cacheContext = symbol._kind === 'part' ? symbol.id : symbol.name;\n                    const uniqueId = meta.source + '::' + cacheContext;\n                    resolvedCount[name] ??= 0;\n                    checked[name] ||= new Map();\n                    if (checked[name].has(uniqueId)) {\n                        if (checked[name].get(uniqueId)) {\n                            resolvedCount[name]++;\n                        }\n                        continue;\n                    }\n                    // get part symbol\n                    const partDef = STStructure.getPart(symbol, name);\n                    // save to cache\n                    checked[name].set(uniqueId, !!partDef);\n\n                    if (!partDef) {\n                        continue;\n                    }\n                    if (Array.isArray(partDef.mapTo)) {\n                        // prefer custom selector\n                        const selectorList = cloneSelector(partDef.mapTo);\n                        const selectorStr = stringifySelector(partDef.mapTo);\n                        selectorList.forEach((selector) => {\n                            const r = removeInitialCompoundMarker(selector, meta, structureMode);\n                            selector.nodes = r.selector.nodes;\n                            selector.before = '';\n                            if (!r.hadCompoundStart && !isFirstInSelector) {\n                                selector.nodes.unshift(\n                                    createCombinatorSelector({ combinator: 'space' })\n                                );\n                            }\n                        });\n                        const internalContext = this.api.createSelectorContext(\n                            meta,\n                            selectorList,\n                            postcss.rule({ selector: selectorStr }),\n                            selectorStr\n                        );\n                        internalContext.isStandaloneSelector = isFirstInSelector;\n                        if (!structureMode && experimentalSelectorInference) {\n                            internalContext.inferredSelectorStart.set(\n                                this.api.createInferredSelector(meta, {\n                                    name: 'root',\n                                    type: 'class',\n                                })\n                            );\n                            internalContext.inferredSelector.set(\n                                internalContext.inferredSelectorStart\n                            );\n                        }\n                        const customAstSelectors = this.api.scopeSelectorAst(internalContext);\n                        const inferred =\n                            customAstSelectors.length === 1 || experimentalSelectorInference\n                                ? internalContext.inferredMultipleSelectors\n                                : new InferredSelector(this.api, [\n                                      {\n                                          _kind: 'css',\n                                          meta,\n                                          symbol: CSSType.createSymbol({ name: '*' }),\n                                      },\n                                  ]);\n                        // add part resolve to inferred resolve set\n                        if (structureMode) {\n                            inferred.addPartOverride({ _kind: 'css', meta, symbol: partDef });\n                        }\n                        addInferredElement(name, inferred, customAstSelectors);\n                        break resolved;\n                    } else {\n                        // matching class part\n                        const resolvedPart = this.api.getResolvedSymbols(meta).class[name];\n                        const resolvedBaseSymbol = getOriginDefinition(resolvedPart);\n                        const nodes: SelectorNode[] = [];\n                        // insert descendant combinator before internal custom element\n                        if (!resolvedBaseSymbol.symbol[`-st-root`] && !isFirstInSelector) {\n                            nodes.push(createCombinatorSelector({ combinator: 'space' }));\n                        }\n                        // create part class\n                        const classNode = {} as SelectorNode;\n                        CSSClass.namespaceClass(\n                            resolvedBaseSymbol.meta,\n                            resolvedBaseSymbol.symbol,\n                            classNode\n                        );\n                        nodes.push(classNode);\n\n                        addInferredElement(name, new InferredSelector(this.api, resolvedPart), [\n                            { type: 'selector', after: '', before: '', end: 0, start: 0, nodes },\n                        ]);\n                        break resolved;\n                    }\n                } else {\n                    // ToDo: implement get all elements\n                }\n            }\n        }\n        // strict: remove elements that do not exist on ALL resolved selectors\n        return expectedIntersectionCount > 1\n            ? Object.entries(collectedElements).reduce(\n                  (resultElements, [name, InferredElement]) => {\n                      if (resolvedCount[name] >= expectedIntersectionCount) {\n                          resultElements[name] = InferredElement;\n                      }\n                      return resultElements;\n                  },\n                  {} as typeof collectedElements\n              )\n            : collectedElements;\n    }\n    private matchedElement(inferred: InferredSelector): boolean {\n        for (const target of this.resolveSet) {\n            const targetBaseElementSymbol = getOriginDefinition(target);\n            for (const tested of inferred.resolveSet) {\n                const testedBaseElementSymbol = getOriginDefinition(tested);\n                if (targetBaseElementSymbol !== testedBaseElementSymbol) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n    // function to temporarily handle single resolved selector type while refactoring\n    //      ToDo: remove temporarily single resolve\n    getSingleResolve(): InferredResolve[] {\n        if (this.resolveSet.size !== 1) {\n            return [];\n        }\n        return this.resolveSet.values().next().value;\n    }\n}\n\nclass SelectorMultiplier {\n    private dupIndicesPerSelector: [nodeIndex: number, selectors: SelectorList][][] = [];\n    public addSplitPoint(selectorIndex: number, nodeIndex: number, selectors: SelectorList) {\n        if (selectors.length) {\n            this.dupIndicesPerSelector[selectorIndex] ||= [];\n            this.dupIndicesPerSelector[selectorIndex].push([nodeIndex, selectors]);\n        }\n    }\n    public duplicateSelectors(targetSelectors: SelectorList) {\n        // iterate top level selector\n        for (const [selectorIndex, insertionPoints] of Object.entries(this.dupIndicesPerSelector)) {\n            const duplicationList = [targetSelectors[Number(selectorIndex)]];\n            // iterate insertion points\n            for (const [nodeIndex, selectors] of insertionPoints) {\n                // collect the duplicate selectors to be multiplied by following insertion points\n                const added: SelectorList = [];\n                // iterate selectors for insertion point\n                for (const replaceSelector of selectors) {\n                    // duplicate selectors and replace selector at insertion point\n                    for (const originSelector of duplicationList) {\n                        const dupSelector = { ...originSelector, nodes: [...originSelector.nodes] };\n                        dupSelector.nodes[nodeIndex] = replaceSelector;\n                        added.push(dupSelector);\n                    }\n                }\n                // add the duplicated selectors from insertion point to\n                // the list of selector to be duplicated for following insertion\n                // points and to the target selector list\n                for (const addedSelector of added) {\n                    duplicationList.push(addedSelector);\n                    targetSelectors.push(addedSelector);\n                }\n            }\n        }\n    }\n}\n\nexport class ScopeContext {\n    public transform = true;\n    // source multi-selector input\n    public selectorStr = '';\n    public selectorIndex = -1;\n    public elements: any[] = [];\n    public selectorAstResolveMap = new Map<ImmutableSelectorNode, InferredSelector>();\n    public selector?: Selector;\n    public compoundSelector?: CompoundSelector;\n    public node?: CompoundSelector['nodes'][number];\n    // true for nested selector\n    public isNested: boolean;\n    // store selector duplication points\n    public splitSelectors = new SelectorMultiplier();\n    public lastInferredSelectorNode: SelectorNode | undefined;\n    // selector is not a continuation of another selector\n    public isStandaloneSelector = true;\n    // used as initial selector\n    public inferredSelectorStart: InferredSelector;\n    // used as initial selector or after combinators\n    public inferredSelectorContext: InferredSelector;\n    // used for nesting selector\n    public inferredSelectorNest: InferredSelector;\n    // current type while traversing a selector\n    public inferredSelector: InferredSelector;\n    // combined type of the multiple selectors\n    public inferredMultipleSelectors: InferredSelector = new InferredSelector(this.transformer);\n    constructor(\n        public originMeta: StylableMeta,\n        public resolver: StylableResolver,\n        public selectorAst: SelectorList,\n        public ruleOrAtRule: postcss.Rule | postcss.AtRule,\n        public scopeSelectorAst: StylableTransformer['scopeSelectorAst'],\n        private transformer: StylableTransformer,\n        inferredSelectorNest?: InferredSelector,\n        public inferredSelectorMixin?: InferredSelector,\n        inferredSelectorContext?: InferredSelector,\n        selectorStr?: string\n    ) {\n        this.isNested = !!(\n            ruleOrAtRule.parent &&\n            // top level\n            ruleOrAtRule.parent.type !== 'root' &&\n            // directly in @st-scope\n            !STScope.isStScopeStatement(ruleOrAtRule.parent)\n        );\n        /* \n            resolve default selector context for initial selector and selector\n            following a combinator.\n            \n            Currently set to stylesheet root for top level selectors and selectors\n            directly nested under @st-scope. But will change in the future to a universal selector\n            once experimentalSelectorInference will be the default behavior\n        */\n        const inferredContext =\n            inferredSelectorContext ||\n            (this.isNested || transformer.experimentalSelectorInference\n                ? new InferredSelector(transformer, [\n                      {\n                          _kind: 'css',\n                          meta: originMeta,\n                          symbol: CSSType.createSymbol({ name: '*' }),\n                      },\n                  ])\n                : transformer.createInferredSelector(originMeta, {\n                      name: originMeta.root,\n                      type: 'class',\n                  }));\n        // set selector data\n        this.selectorStr = selectorStr || stringifySelector(selectorAst);\n        this.inferredSelectorContext = new InferredSelector(this.transformer, inferredContext);\n        this.inferredSelectorStart = new InferredSelector(this.transformer, inferredContext);\n        this.inferredSelectorNest = inferredSelectorNest || this.inferredSelectorContext.clone();\n        this.inferredSelector = new InferredSelector(\n            this.transformer,\n            this.inferredSelectorContext\n        );\n    }\n    get experimentalSelectorInference() {\n        return this.transformer.experimentalSelectorInference;\n    }\n    static legacyElementsTypesMapping: Record<string, string> = {\n        pseudo_element: 'pseudo-element',\n        class: 'class',\n        type: 'element',\n    };\n    public setNextSelectorScope(\n        resolved: InferredResolve[] | InferredSelector,\n        node: SelectorNode,\n        name?: string\n    ) {\n        if (name && this.selectorIndex !== undefined && this.selectorIndex !== -1) {\n            this.elements[this.selectorIndex].push({\n                type: ScopeContext.legacyElementsTypesMapping[node.type] || 'unknown',\n                name,\n                resolved: Array.isArray(resolved) ? resolved : resolved.getSingleResolve(),\n            });\n        }\n        this.inferredSelector.set(resolved);\n        this.selectorAstResolveMap.set(node, this.inferredSelector.clone());\n        this.lastInferredSelectorNode = node;\n    }\n    public isFirstInSelector(node: SelectorNode) {\n        const isFirstNode = this.selectorAst[this.selectorIndex].nodes[0] === node;\n        if (isFirstNode && this.selectorIndex === 0 && !this.isStandaloneSelector) {\n            // force false incase a this context is a splitted part from another selector\n            return false;\n        }\n        return isFirstNode;\n    }\n    public createNestedContext(selectorAst: SelectorList, selectorContext?: InferredSelector) {\n        const ctx = new ScopeContext(\n            this.originMeta,\n            this.resolver,\n            selectorAst,\n            this.ruleOrAtRule,\n            this.scopeSelectorAst,\n            this.transformer,\n            this.inferredSelectorNest,\n            this.inferredSelectorMixin,\n            selectorContext || this.inferredSelectorContext\n        );\n        ctx.transform = this.transform;\n        ctx.selectorAstResolveMap = this.selectorAstResolveMap;\n\n        return ctx;\n    }\n    public transformIntoMultiSelector(node: SelectorNode, selectors: SelectorList) {\n        // transform into the first selector\n        Object.assign(node, selectors[0]);\n        // keep track of additional selectors for\n        // duplication at the end of the selector transform\n        selectors.shift();\n        const selectorNode = this.selectorAst[this.selectorIndex];\n        const nodeIndex = selectorNode.nodes.indexOf(node);\n        this.splitSelectors.addSplitPoint(this.selectorIndex, nodeIndex, selectors);\n    }\n    public isDuplicateStScopeDiagnostic() {\n        if (this.experimentalSelectorInference || this.ruleOrAtRule.type !== 'rule') {\n            // this check is not required when experimentalSelectorInference is on\n            // as @st-scope is not flatten at the beginning of the transformation\n            // and diagnostics on it's selector is only checked once.\n            return false;\n        }\n        // ToDo: should be removed once st-scope transformation moves to the end of the transform process\n        const transformedScope =\n            this.originMeta.transformedScopes?.[getRuleScopeSelector(this.ruleOrAtRule) || ``];\n        if (transformedScope && this.selector && this.compoundSelector) {\n            const currentCompoundSelector = stringifySelector(this.compoundSelector);\n            const i = this.selector.nodes.indexOf(this.compoundSelector);\n            for (const stScopeSelectorCompounded of transformedScope) {\n                // if we are in a chunk index that is in the rage of the @st-scope param\n                if (i <= stScopeSelectorCompounded.nodes.length) {\n                    for (const scopeNode of stScopeSelectorCompounded.nodes) {\n                        const scopeNodeSelector = stringifySelector(scopeNode);\n                        // if the two chunks match the error is already reported by the @st-scope validation\n                        if (scopeNodeSelector === currentCompoundSelector) {\n                            return true;\n                        }\n                    }\n                }\n            }\n        }\n        return false;\n    }\n}\n\n/**\n * in the process of moving transformations that shouldn't be in the analyzer.\n * all changes were moved here to be called at the beginning of the transformer,\n * and should be inlined in the process in the future.\n */\nfunction prepareAST(\n    context: FeatureTransformContext,\n    ast: postcss.Root,\n    experimentalSelectorInference: boolean\n) {\n    // ToDo: inline transformations\n    const toRemove: Array<postcss.Node | (() => void)> = [];\n    ast.walk((node) => {\n        const input = { context, node, toRemove };\n        STNamespace.hooks.prepareAST(input);\n        STImport.hooks.prepareAST(input);\n        if (!experimentalSelectorInference) {\n            STScope.hooks.prepareAST(input);\n        }\n        STVar.hooks.prepareAST(input);\n        if (!experimentalSelectorInference) {\n            STCustomSelector.hooks.prepareAST(input);\n        }\n        CSSCustomProperty.hooks.prepareAST(input);\n    });\n    for (const removeOrNode of toRemove) {\n        typeof removeOrNode === 'function' ? removeOrNode() : removeOrNode.remove();\n    }\n}\n", "export function isEqual(value1: any, value2: any): boolean {\n    if (value1 === null || value2 === null) {\n        return value1 === value2;\n    }\n\n    if (Array.isArray(value1) && Array.isArray(value2)) {\n        if (value1.length !== value2.length) {\n            return false;\n        }\n\n        for (let i = 0; i < value1.length; i++) {\n            if (!isEqual(value1[i], value2[i])) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    if (typeof value1 === 'object' && typeof value2 === 'object') {\n        const keys1 = Object.keys(value1);\n        const keys2 = Object.keys(value2);\n\n        if (keys1.length !== keys2.length) {\n            return false;\n        }\n\n        for (const key of keys1) {\n            if (!isEqual(value1[key], value2[key])) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    return value1 === value2;\n}\n", "import { setFieldForDeprecation, ignoreDeprecationWarn } from '../helpers/deprecation';\nimport { Rule } from 'postcss';\n\n/**\n * mark extended fields as deprecated.\n * `valueOnThis` is used because postcss.clone copies own properties.\n */\nsetFieldForDeprecation(Rule.prototype, `stScopeSelector`, {\n    objectType: `SRule`,\n    valueOnThis: true,\n    pleaseUse: `getRuleScopeSelector(rule)`,\n});\n\n/**\n * extended types\n */\n/**@deprecated*/\nexport interface SRule extends Rule {\n    stScopeSelector?: string;\n}\n\n// ToDo: remove when st-scope moves to transformer\nexport function getRuleScopeSelector(rule: Rule) {\n    return ignoreDeprecationWarn(() => (rule as SRule).stScopeSelector);\n}\n", "/**\n * Extracts and resolves dependency requests of one or more assets, shallow or deep.\n *\n * @param assetKey unique key(s) of asset(s) to resolve dependency requests for.\n * @param deep should process follow resolved requests, and resolve these assets as well (defaults to `false`).\n * @returns record containing asset keys as fields, and their resolved dependecy requests as values.\n */\nexport type DependencyResolver = (assetKey: string | string[], deep?: boolean) => Record<string, ResolvedRequests>;\n\n/**\n * Record containing requests as fields, and their resolutions (asset keys) as values.\n * `undefined` is used when a request couldn't be resolved.\n */\nexport type ResolvedRequests = Record<string, string | false | undefined>;\n\nexport interface IDependencyResolverOptions {\n  /**\n   * Extracts a dependency requests list of an asset.\n   *\n   * @param assetKey unique identifier for an asset to extract from.\n   * @returns list of dependency requests by the asset.\n   */\n  extractRequests(assetKey: string): string[];\n\n  /**\n   * Resolve a dependency request by an asset.\n   *\n   * @param assetKey unique identifier of the requesting asset.\n   * @returns unique key for the asset the request resolves to.\n   */\n  resolveRequest: (assetKey: string, request: string) => string | false | undefined;\n}\n\nconst { hasOwnProperty } = Object.prototype;\n\n/**\n * Create a dependency resolver by providing a callback to extract requests,\n * and another callbck to resolve such requests.\n */\nexport function createDependencyResolver({\n  extractRequests,\n  resolveRequest,\n}: IDependencyResolverOptions): DependencyResolver {\n  return (assetKey, deep) => {\n    const resolvedAssets = Object.create(null) as Record<string, ResolvedRequests>;\n    const assetsToResolve: string[] = Array.isArray(assetKey) ? [...assetKey] : [assetKey];\n\n    while (assetsToResolve.length > 0) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      const currentAsset = assetsToResolve.shift()!;\n\n      if (resolvedAssets[currentAsset]) {\n        continue;\n      }\n\n      const resolvedRequests = Object.create(null) as ResolvedRequests;\n      resolvedAssets[currentAsset] = resolvedRequests;\n\n      const assetRequests = extractRequests(currentAsset);\n\n      for (const request of assetRequests) {\n        if (hasOwnProperty.call(resolvedRequests, request)) {\n          continue; // already resolved this request\n        }\n\n        const resolvedRequest = resolveRequest(currentAsset, request);\n        resolvedRequests[request] = resolvedRequest;\n        if (deep && resolvedRequest !== undefined && resolvedRequest !== false) {\n          assetsToResolve.push(resolvedRequest);\n        }\n      }\n    }\n\n    return resolvedAssets;\n  };\n}\n", "import type { PackageJson } from \"type-fest\";\nimport type { IRequestResolverOptions, IResolutionOutput, IResolvedPackageJson, RequestResolver } from \"./types\";\n\nexport const defaultPackageRoots = [\"node_modules\"] as const;\nexport const defaultExtensions = [\".js\", \".json\"] as const;\nexport const defaultConditions = [\"browser\", \"import\", \"require\"] as const;\nconst isRelative = (request: string) =>\n  request === \".\" || request === \"..\" || request.startsWith(\"./\") || request.startsWith(\"../\");\nconst PACKAGE_JSON = \"package.json\";\nconst statsNoThrowOptions = { throwIfNoEntry: false } as const;\n\nexport function createRequestResolver(options: IRequestResolverOptions): RequestResolver {\n  const {\n    fs: { statSync, readFileSync, realpathSync, dirname, join, resolve, isAbsolute },\n    packageRoots = defaultPackageRoots,\n    extensions = defaultExtensions,\n    conditions = defaultConditions,\n    resolvedPacakgesCache = new Map<string, IResolvedPackageJson | undefined>(),\n    alias = {},\n    fallback = {},\n  } = options;\n\n  const nativeRealPathSync = realpathSync.native ?? realpathSync;\n  const exportConditions = new Set(conditions);\n  const targetsBrowser = exportConditions.has(\"browser\");\n  const targetsEsm = exportConditions.has(\"import\");\n\n  const loadPackageJsonFromCached = wrapWithCache(loadPackageJsonFrom, resolvedPacakgesCache);\n  const remapUsingAlias = createRequestRemapper(alias);\n  const remapUsingFallback = createRequestRemapper(fallback);\n\n  return requestResolver;\n\n  function requestResolver(contextPath: string, originalRequest: string): IResolutionOutput {\n    const visitedPaths = new Set<string>();\n    for (const request of requestsToTry(contextPath, originalRequest, visitedPaths)) {\n      if (request === false) {\n        return { resolvedFile: request, visitedPaths };\n      }\n\n      for (const resolvedFilePath of nodeRequestPaths(contextPath, request, visitedPaths)) {\n        visitedPaths.add(resolvedFilePath);\n        if (!statSyncSafe(resolvedFilePath)?.isFile()) {\n          continue;\n        }\n        const realResolvedFilePath = realpathSyncSafe(resolvedFilePath);\n        visitedPaths.add(realResolvedFilePath);\n        if (targetsBrowser) {\n          const toPackageJson = findUpPackageJson(dirname(realResolvedFilePath));\n          if (toPackageJson) {\n            visitedPaths.add(toPackageJson.filePath);\n            const remappedFilePath = toPackageJson.browserMappings?.[realResolvedFilePath];\n            if (remappedFilePath !== undefined) {\n              if (remappedFilePath !== false) {\n                visitedPaths.add(remappedFilePath);\n              }\n              return {\n                resolvedFile: remappedFilePath,\n                originalFilePath: realResolvedFilePath,\n                visitedPaths,\n              };\n            }\n          }\n        }\n        return { resolvedFile: realResolvedFilePath, visitedPaths };\n      }\n    }\n\n    return { resolvedFile: undefined, visitedPaths };\n  }\n\n  function* requestsToTry(contextPath: string, request: string, visitedPaths: Set<string>) {\n    const requestAlias = remapUsingAlias(request);\n    let emittedCandidate = false;\n    if (requestAlias !== undefined) {\n      emittedCandidate = true;\n      yield requestAlias;\n    }\n\n    if (!emittedCandidate && targetsBrowser && !isRelative(request)) {\n      const fromPackageJson = findUpPackageJson(contextPath);\n      if (fromPackageJson) {\n        visitedPaths.add(fromPackageJson.filePath);\n        const remappedRequest = fromPackageJson.browserMappings?.[request];\n        if (remappedRequest !== undefined) {\n          emittedCandidate = true;\n          yield remappedRequest;\n        }\n      }\n    }\n\n    if (!emittedCandidate) {\n      yield request;\n    }\n    const requestFallback = remapUsingFallback(request);\n    if (requestFallback !== undefined) {\n      yield requestFallback;\n    }\n  }\n\n  function* nodeRequestPaths(contextPath: string, request: string, visitedPaths: Set<string>) {\n    if (isRelative(request) || isAbsolute(request)) {\n      const requestPath = resolve(contextPath, request);\n      yield* fileRequestPaths(requestPath);\n      yield* directoryRequestPaths(requestPath, visitedPaths);\n    } else {\n      yield* packageRequestPaths(contextPath, request, visitedPaths);\n    }\n  }\n\n  /**\n   * /path/to/target\n   * /path/to/target.js\n   * /path/to/target.json\n   */\n  function* fileRequestPaths(filePath: string) {\n    yield filePath;\n    for (const ext of extensions) {\n      yield filePath + ext;\n    }\n  }\n\n  /**\n   * /path/to/target (+ext)\n   * /path/to/target/index (+ext)\n   */\n  function* fileOrDirIndexRequestPaths(targetPath: string) {\n    yield* fileRequestPaths(targetPath);\n    yield* fileRequestPaths(join(targetPath, \"index\"));\n  }\n\n  function* directoryRequestPaths(directoryPath: string, visitedPaths: Set<string>) {\n    if (!statSyncSafe(directoryPath)?.isDirectory()) {\n      return;\n    }\n    const resolvedPackageJson = loadPackageJsonFromCached(directoryPath);\n    if (resolvedPackageJson !== undefined) {\n      visitedPaths.add(resolvedPackageJson.filePath);\n\n      if (targetsBrowser && resolvedPackageJson.browser !== undefined) {\n        yield* fileOrDirIndexRequestPaths(join(directoryPath, resolvedPackageJson.browser));\n      }\n      if (targetsEsm && resolvedPackageJson.module !== undefined) {\n        yield* fileOrDirIndexRequestPaths(join(directoryPath, resolvedPackageJson.module));\n      }\n      if (resolvedPackageJson.main !== undefined) {\n        yield* fileOrDirIndexRequestPaths(join(directoryPath, resolvedPackageJson.main));\n      }\n    }\n\n    yield* fileRequestPaths(join(directoryPath, \"index\"));\n  }\n\n  function* packageRequestPaths(initialPath: string, request: string, visitedPaths: Set<string>): Generator<string> {\n    const [packageName, innerPath] = parsePackageSpecifier(request);\n    if (!packageName.length || (packageName.startsWith(\"@\") && !packageName.includes(\"/\"))) {\n      return;\n    }\n\n    const ownPackageJson = findUpPackageJson(initialPath);\n    if (request.startsWith(\"#\")) {\n      if (ownPackageJson?.imports !== undefined) {\n        for (const matchedValue of matchConditionsField(\n          ownPackageJson.imports,\n          request,\n          ownPackageJson.hasPatternImports,\n        )) {\n          if (isRelative(matchedValue)) {\n            yield join(ownPackageJson.directoryPath, matchedValue);\n          } else {\n            yield* packageRequestPaths(initialPath, matchedValue, visitedPaths);\n          }\n        }\n      }\n      return;\n    }\n\n    if (ownPackageJson !== undefined) {\n      visitedPaths.add(ownPackageJson.filePath);\n      if (ownPackageJson.name === packageName) {\n        if (ownPackageJson.exports !== undefined) {\n          for (const matchedValue of matchConditionsField(\n            ownPackageJson.exports,\n            innerPath,\n            ownPackageJson.hasPatternExports,\n          )) {\n            yield join(ownPackageJson.directoryPath, matchedValue);\n          }\n          return;\n        }\n      }\n    }\n\n    for (const packagesPath of packageRootsToPaths(initialPath)) {\n      if (!statSyncSafe(packagesPath)?.isDirectory()) {\n        continue;\n      }\n      const packageDirectoryPath = join(packagesPath, packageName);\n      const resolvedPackageJson = loadPackageJsonFromCached(packageDirectoryPath);\n      if (resolvedPackageJson !== undefined) {\n        visitedPaths.add(resolvedPackageJson.filePath);\n      }\n      if (resolvedPackageJson?.exports !== undefined) {\n        for (const matchedValue of matchConditionsField(\n          resolvedPackageJson.exports,\n          innerPath,\n          resolvedPackageJson.hasPatternExports,\n        )) {\n          yield join(packageDirectoryPath, matchedValue);\n        }\n        return;\n      }\n      const requestInPackages = join(packagesPath, request);\n      yield* fileRequestPaths(requestInPackages);\n      yield* directoryRequestPaths(requestInPackages, visitedPaths);\n    }\n  }\n\n  function* matchConditionsField(\n    conditionsValue: PackageJson.ExportConditions,\n    innerPath: string,\n    hasPatternMatch?: boolean,\n  ) {\n    const exactMatchExports = conditionsValue[innerPath];\n    if (exactMatchExports !== undefined) {\n      for (const exactMatchValue of matchExportConditions(exactMatchExports, exportConditions)) {\n        if (exactMatchValue === null) {\n          break;\n        }\n        yield exactMatchValue;\n      }\n    } else if (hasPatternMatch) {\n      for (const matchedPattern of matchSubpathPatterns(conditionsValue, innerPath, exportConditions)) {\n        yield matchedPattern;\n      }\n    }\n  }\n\n  function* packageRootsToPaths(initialPath: string) {\n    for (const packageRoot of packageRoots) {\n      for (const directoryPath of pathChainToRoot(initialPath)) {\n        yield join(directoryPath, packageRoot);\n      }\n    }\n  }\n\n  function findUpPackageJson(initialPath: string): IResolvedPackageJson | undefined {\n    for (const directoryPath of pathChainToRoot(initialPath)) {\n      const resolvedPackageJson = loadPackageJsonFromCached(directoryPath);\n      if (resolvedPackageJson) {\n        return resolvedPackageJson;\n      }\n    }\n    return undefined;\n  }\n\n  function loadPackageJsonFrom(directoryPath: string): IResolvedPackageJson | undefined {\n    const packageJsonPath = join(directoryPath, PACKAGE_JSON);\n    const packageJson = readJsonFileSyncSafe(packageJsonPath) as PackageJson | null | undefined;\n    if (typeof packageJson !== \"object\" || packageJson === null) {\n      return undefined;\n    }\n    const { main: mainField, module: moduleField, browser: browserField } = packageJson;\n\n    let browserMappings: Record<string, string | false> | undefined = undefined;\n    if (targetsBrowser && typeof browserField === \"object\" && browserField !== null) {\n      browserMappings = Object.create(null) as Record<string, string | false>;\n      for (const [from, to] of Object.entries(browserField)) {\n        const resolvedFrom = isRelative(from) ? resolveRelative(join(directoryPath, from)) : from;\n        if (resolvedFrom && to !== undefined) {\n          const resolvedTo = resolveRemappedRequest(directoryPath, to);\n          if (resolvedTo !== undefined) {\n            browserMappings[resolvedFrom] = resolvedTo;\n          }\n        }\n      }\n    }\n\n    const [desugerifiedExports, hasPatternExports] = desugarifyExportsField(packageJson.exports);\n\n    let hasPatternImports = false;\n    if (packageJson.imports !== undefined) {\n      for (const key of Object.keys(packageJson.imports)) {\n        if (key.includes(\"*\")) {\n          hasPatternImports = true;\n          break;\n        }\n      }\n    }\n\n    return {\n      name: packageJson.name,\n      filePath: packageJsonPath,\n      directoryPath,\n      main: typeof mainField === \"string\" ? mainField : undefined,\n      module: typeof moduleField === \"string\" ? moduleField : undefined,\n      browser: typeof browserField === \"string\" ? browserField : undefined,\n      browserMappings,\n      exports: desugerifiedExports,\n      imports: packageJson.imports,\n      hasPatternExports,\n      hasPatternImports,\n    };\n  }\n\n  function resolveRemappedRequest(directoryPath: string, to: string | false): string | false | undefined {\n    if (to === false) {\n      return to;\n    } else if (typeof to === \"string\") {\n      if (isRelative(to)) {\n        return resolveRelative(join(directoryPath, to));\n      } else {\n        return to;\n      }\n    }\n    return undefined;\n  }\n\n  function resolveRelative(request: string) {\n    for (const filePath of fileOrDirIndexRequestPaths(request)) {\n      if (statSyncSafe(filePath)?.isFile()) {\n        return realpathSyncSafe(filePath);\n      }\n    }\n    return undefined;\n  }\n\n  function statSyncSafe(path: string) {\n    const { stackTraceLimit } = Error;\n    try {\n      Error.stackTraceLimit = 0;\n      return statSync(path, statsNoThrowOptions);\n    } catch {\n      return undefined;\n    } finally {\n      Error.stackTraceLimit = stackTraceLimit;\n    }\n  }\n\n  function realpathSyncSafe(itemPath: string): string {\n    const { stackTraceLimit } = Error;\n    try {\n      Error.stackTraceLimit = 0;\n      return nativeRealPathSync(itemPath);\n    } catch {\n      return itemPath;\n    } finally {\n      Error.stackTraceLimit = stackTraceLimit;\n    }\n  }\n\n  /**\n   * Generates a path chain from the current path to the root directory.\n   *\n   * @param currentPath The current path to start the chain from.\n   * @yields The current path and continues to yield the parent directory path until the root directory is reached.\n   */\n  function* pathChainToRoot(currentPath: string) {\n    let lastPath: string | undefined;\n    while (lastPath !== currentPath) {\n      yield currentPath;\n      lastPath = currentPath;\n      currentPath = dirname(currentPath);\n    }\n  }\n\n  function readJsonFileSyncSafe(filePath: string): unknown {\n    const { stackTraceLimit } = Error;\n    try {\n      Error.stackTraceLimit = 0;\n      return JSON.parse(readFileSync(filePath, \"utf8\")) as unknown;\n    } catch {\n      return undefined;\n    } finally {\n      Error.stackTraceLimit = stackTraceLimit;\n    }\n  }\n}\n\nfunction wrapWithCache<K, T>(fn: (key: K) => T, cache = new Map<K, T>()): (key: K) => T {\n  return (key: K) => {\n    if (cache.has(key)) {\n      return cache.get(key) as T;\n    } else {\n      const result = fn(key);\n      cache.set(key, result);\n      return result;\n    }\n  };\n}\n\ntype ParsedTemplate = { prefix: string };\n\n/**\n * Create a function that accepts a string and returns T | undefined.\n * The remapper supports paths ending with \"/*\", both in key and value.\n */\nexport function createRequestRemapper<T extends string | false>(\n  mapping: Record<string, T>,\n): (request: string) => T | undefined {\n  const parsedTemplateMap = new Map<string | ParsedTemplate, T | ParsedTemplate>();\n  let hasTemplate = false;\n  for (const [key, value] of Object.entries(mapping)) {\n    let parsedKey: string | ParsedTemplate = key;\n    let parsedValue: T | ParsedTemplate = value;\n    if (key.endsWith(\"/*\")) {\n      hasTemplate = true;\n      parsedKey = { prefix: key.slice(0, -1) };\n      if (typeof value === \"string\" && value.endsWith(\"/*\")) {\n        parsedValue = { prefix: value.slice(0, -1) };\n      }\n    }\n    parsedTemplateMap.set(parsedKey, parsedValue);\n  }\n\n  return hasTemplate\n    ? (request) => getFromParsedTemplateMap(parsedTemplateMap, request)\n    : (request) => parsedTemplateMap.get(request) as T | undefined;\n}\n\nfunction getFromParsedTemplateMap<T extends string | false>(\n  map: Map<string | ParsedTemplate, T | ParsedTemplate>,\n  request: string,\n): T | undefined {\n  for (const [key, value] of map) {\n    const keyType = typeof key;\n    if (keyType === \"string\") {\n      if (request === key) {\n        return value as T;\n      }\n    } else if (keyType === \"object\") {\n      const { prefix: keyPrefix } = key as ParsedTemplate;\n      if (request.startsWith(keyPrefix) && request.length > keyPrefix.length) {\n        return typeof value === \"object\" ? ((value.prefix + request.slice(keyPrefix.length)) as T) : value;\n      }\n    }\n  }\n  return undefined;\n}\n\n// to avoid having to include @types/node\ninterface TracedErrorConstructor extends ErrorConstructor {\n  stackTraceLimit?: number;\n}\ndeclare let Error: TracedErrorConstructor;\n\n/**\n * Parse a package specifier into a tuple of package name and path in package.\n * Handles both scoped and non-scoped package specifiers and returns a default path of '.' if no path is specified.\n *\n * @param specifier - The package specifier to parse.\n * @example parsePackageSpecifier('react-dom') === ['react-dom', \".\"]\n * @example parsePackageSpecifier('react-dom/client') === ['react-dom', './client']\n * @example parsePackageSpecifier('@stylable/core') === ['@stylable/core', \"./core\"]\n * @example parsePackageSpecifier('@stylable/core/dist/some-file') === ['@stylable/core', './dist/some-file']\n */\nfunction parsePackageSpecifier(specifier: string): readonly [packageName: string, pathInPackage: string] {\n  const firstSlashIdx = specifier.indexOf(\"/\");\n  if (firstSlashIdx === -1) {\n    return [specifier, \".\"];\n  }\n  const isScopedPackage = specifier.startsWith(\"@\");\n  if (isScopedPackage) {\n    const secondSlashIdx = specifier.indexOf(\"/\", firstSlashIdx + 1);\n    return secondSlashIdx === -1\n      ? [specifier, \".\"]\n      : [specifier.slice(0, secondSlashIdx), \".\" + specifier.slice(secondSlashIdx)];\n  } else {\n    return [specifier.slice(0, firstSlashIdx), \".\" + specifier.slice(firstSlashIdx)];\n  }\n}\n\n/**\n * Desugarify the `exports` field of a package.json file.\n *\n * If `exports` is a string or an array, it is converted to an object with a single key of `'.'`.\n * If `exports` is already an object and has a key of `'.'` or starts with `'./'`, it is returned as is.\n * Otherwise, `exports` is wrapped in an object with a single key of `'.'`.\n *\n * @param packageExports - The `exports` field of a package.json file.\n * @returns tuple containing the desugarified `exports` field, with a flag saying whether it includes pattern exports.\n */\nfunction desugarifyExportsField(\n  packageExports: PackageJson.Exports | undefined,\n): [PackageJson.ExportConditions | undefined, boolean] {\n  let hasPatternExports = false;\n  if (packageExports === undefined || packageExports === null) {\n    packageExports = undefined;\n  } else if (typeof packageExports === \"string\" || Array.isArray(packageExports)) {\n    packageExports = { \".\": packageExports };\n  } else {\n    for (const key of Object.keys(packageExports)) {\n      if (key.includes(\"*\")) {\n        hasPatternExports = true;\n      }\n      if (key !== \".\" && !key.startsWith(\"./\")) {\n        packageExports = { \".\": packageExports };\n        hasPatternExports = false;\n        break;\n      }\n    }\n  }\n  return [packageExports, hasPatternExports];\n}\n\nfunction* matchExportConditions(\n  conditionValue: PackageJson.Exports,\n  exportConditions: Set<string>,\n): Generator<string | null> {\n  if (conditionValue === null || typeof conditionValue === \"string\") {\n    yield conditionValue;\n  } else if (typeof conditionValue === \"object\") {\n    if (Array.isArray(conditionValue)) {\n      for (const arrayItem of conditionValue) {\n        yield* matchExportConditions(arrayItem, exportConditions);\n      }\n    } else {\n      for (const [key, value] of Object.entries(conditionValue)) {\n        if (key === \"default\" || exportConditions.has(key)) {\n          yield* matchExportConditions(value, exportConditions);\n        }\n      }\n    }\n  }\n}\n\nfunction* matchSubpathPatterns(\n  exportedSubpaths: PackageJson.ExportConditions,\n  innerPath: string,\n  exportConditions: Set<string>,\n): Generator<string, void, undefined> {\n  const matchedValues: string[] = [];\n  for (const [patternKey, patternValue] of Object.entries(exportedSubpaths)) {\n    const keyStarIdx = patternKey.indexOf(\"*\");\n    if (keyStarIdx === -1 || patternKey.indexOf(\"*\", keyStarIdx + 1) !== -1) {\n      continue;\n    }\n    const keyPrefix = patternKey.slice(0, keyStarIdx);\n    if (!innerPath.startsWith(keyPrefix)) {\n      continue;\n    }\n    const keySuffix = patternKey.slice(keyStarIdx + 1);\n    if (keySuffix && !innerPath.endsWith(keySuffix)) {\n      continue;\n    }\n\n    const starReplacement = innerPath.slice(keyPrefix.length, innerPath.length - keySuffix.length);\n\n    for (const valueToMatch of matchExportConditions(patternValue, exportConditions)) {\n      if (valueToMatch === null) {\n        return;\n      }\n      matchedValues.push(valueToMatch.replace(/\\*/g, starReplacement));\n    }\n  }\n  yield* matchedValues;\n}\n", "import {\n    IRequestResolverOptions,\n    IResolutionFileSystem,\n    createRequestResolver,\n} from '@file-services/resolve';\nimport type { ModuleResolver } from './types';\n\nexport type { IRequestResolverOptions, IResolutionFileSystem };\n\nexport function createDefaultResolver(options: IRequestResolverOptions): ModuleResolver {\n    const resolver = createRequestResolver({\n        extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.json'],\n        ...options,\n    });\n\n    return (directoryPath, request): string => {\n        const { resolvedFile, visitedPaths } = resolver(directoryPath, request);\n\n        if (resolvedFile === false) {\n            throw new Error(\n                `Stylable does not support browser field 'false' values. ${request} resolved to 'false' from ${directoryPath}`\n            );\n        }\n        if (typeof resolvedFile !== 'string') {\n            throw new Error(\n                `Stylable could not resolve ${JSON.stringify(request)} from ${JSON.stringify(\n                    directoryPath\n                )}` + (visitedPaths.size ? `\\nVisited paths:\\n${[...visitedPaths].join('\\n')}` : '')\n            );\n        }\n        return resolvedFile;\n    };\n}\n", "import type { StylableMeta } from './stylable-meta';\nimport type { Imported } from './features';\nimport type { StylableResolver } from './stylable-resolver';\n\nexport interface CSSDependency {\n    kind: 'css';\n    resolvedPath: string;\n    imported: Imported;\n    depth: number;\n    meta: StylableMeta;\n}\n\nexport interface JSDependency {\n    kind: 'js';\n    resolvedPath: string;\n    imported: Imported;\n}\n\nexport type Dependency = CSSDependency | JSDependency;\n\nexport function* visitMetaCSSDependencies({\n    meta,\n    resolver,\n}: {\n    meta: StylableMeta;\n    resolver: StylableResolver;\n}) {\n    const visited = new Set<string>([meta.source]);\n    const q = [[...meta.getImportStatements()]];\n    let depth = -1;\n    while (++depth < q.length) {\n        let index = -1;\n        const items = q[depth];\n        if (items.length && !q[depth + 1]) {\n            q[depth + 1] = [];\n        }\n        while (++index < items.length) {\n            const imported = items[index];\n            const res = resolver.resolveImported(imported, '');\n\n            if (res?._kind === 'css' && !visited.has(res.meta.source)) {\n                visited.add(res.meta.source);\n                const dependency: CSSDependency = {\n                    kind: 'css',\n                    depth: depth + 1,\n                    meta: res.meta,\n                    resolvedPath: res.meta.source,\n                    imported,\n                };\n\n                yield dependency;\n\n                q[depth + 1].push(...res.meta.getImportStatements());\n            } else if (res?._kind === 'js') {\n                const resolvedPath = resolver.resolvePath(imported.context, imported.request);\n\n                if (!visited.has(resolvedPath)) {\n                    visited.add(resolvedPath);\n                    const dependency: JSDependency = {\n                        kind: 'js',\n                        imported,\n                        resolvedPath,\n                    };\n\n                    yield dependency;\n                }\n            }\n        }\n    }\n}\n", "import type { CacheItem, FileProcessor, MinimalFS } from './cached-process-file';\nimport { createStylableFileProcessor } from './create-stylable-processor';\nimport { Diagnostics } from './diagnostics';\nimport { CssParser, cssParse } from './parser';\nimport { processNamespace, StylableProcessor } from './stylable-processor';\nimport type { StylableMeta } from './stylable-meta';\nimport { StylableResolverCache, StylableResolver, CachedModuleEntity } from './stylable-resolver';\nimport {\n    ResolvedElement,\n    StylableResults,\n    StylableTransformer,\n    TransformerOptions,\n    TransformHooks,\n} from './stylable-transformer';\nimport type { IStylableOptimizer, ModuleResolver } from './types';\nimport {\n    createDefaultResolver,\n    IRequestResolverOptions,\n    IResolutionFileSystem,\n} from './module-resolver';\nimport { STImport, STScope, STVar, STMixin, CSSClass, CSSCustomProperty } from './features';\nimport { Dependency, visitMetaCSSDependencies } from './visit-meta-css-dependencies';\nimport * as postcss from 'postcss';\nimport { warnOnce } from './helpers/deprecation';\nimport { defaultFeatureFlags, type FeatureFlags } from './features/feature';\n\nexport interface StylableConfigBase {\n    projectRoot: string;\n    requireModule?: (path: string) => any;\n    onProcess?: (meta: StylableMeta, path: string) => StylableMeta;\n    hooks?: TransformHooks;\n    optimizer?: IStylableOptimizer;\n    mode?: 'production' | 'development';\n    resolveNamespace?: typeof processNamespace;\n    cssParser?: CssParser;\n    resolverCache?: StylableResolverCache;\n    fileProcessorCache?: Record<string, CacheItem<StylableMeta>>;\n    experimentalSelectorInference?: boolean;\n    flags?: Partial<FeatureFlags>;\n}\n\nexport type StylableConfig = StylableConfigBase &\n    (\n        | {\n              fileSystem: MinimalFS;\n              resolveModule: ModuleResolver;\n          }\n        | {\n              fileSystem: IResolutionFileSystem;\n              resolveModule?: ModuleResolver | Omit<IRequestResolverOptions, 'fs'>;\n          }\n    );\n\n// This defines and validates known configs for the defaultConfig in 'stylable.config.js\nconst globalDefaultSupportedConfigs = new Set([\n    'resolveModule',\n    'resolveNamespace',\n    'requireModule',\n    'flags',\n    'experimentalSelectorInference',\n]);\nexport function validateDefaultConfig(defaultConfigObj: any) {\n    if (typeof defaultConfigObj === 'object') {\n        for (const configName of Object.keys(defaultConfigObj)) {\n            if (!globalDefaultSupportedConfigs.has(configName)) {\n                console.warn(\n                    `Caution: loading \"${configName}\" config is experimental, and may behave unexpectedly`\n                );\n            }\n        }\n    }\n}\n\ninterface InitCacheParams {\n    /* Keeps cache entities that meet the condition specified in a callback function. Return `true` to keep the iterated entity. */\n    filter?(key: string, entity: CachedModuleEntity): boolean;\n}\n\nexport type CreateProcessorOptions = Pick<StylableConfig, 'resolveNamespace'>;\n\nexport class Stylable {\n    public fileProcessor: FileProcessor<StylableMeta>;\n    public resolver: StylableResolver;\n    public stModule = new STImport.StylablePublicApi(this);\n    public stScope = new STScope.StylablePublicApi(this);\n    public cssCustomProperty = new CSSCustomProperty.StylablePublicApi(this);\n    public stVar = new STVar.StylablePublicApi(this);\n    public stMixin = new STMixin.StylablePublicApi(this);\n    public cssClass = new CSSClass.StylablePublicApi(this);\n    //\n    public projectRoot: string;\n    protected fileSystem: IResolutionFileSystem | MinimalFS;\n    protected requireModule: (path: string) => any;\n    protected onProcess?: (meta: StylableMeta, path: string) => StylableMeta;\n    protected diagnostics = new Diagnostics();\n    protected hooks: TransformHooks;\n    public optimizer?: IStylableOptimizer;\n    protected mode: 'production' | 'development';\n    public resolveNamespace?: typeof processNamespace;\n    public moduleResolver: ModuleResolver;\n    protected cssParser: CssParser;\n    protected resolverCache?: StylableResolverCache;\n    // This cache is fragile and should be fresh if onProcess/resolveNamespace/cssParser is different\n    protected fileProcessorCache?: Record<string, CacheItem<StylableMeta>>;\n    private experimentalSelectorInference: boolean;\n    public flags: FeatureFlags;\n    constructor(config: StylableConfig) {\n        this.experimentalSelectorInference =\n            config.experimentalSelectorInference === false ? false : true;\n        if (this.experimentalSelectorInference === false) {\n            warnOnce(\n                'Stylable is running in a deprecated mode that will be removed in a future 6.x.x release. Please set experimentalSelectorInference=true to avoid this warning.'\n            );\n        }\n        this.projectRoot = config.projectRoot;\n        this.fileSystem = config.fileSystem;\n        this.requireModule =\n            config.requireModule ||\n            (() => {\n                throw new Error(\n                    'Javascript files are not supported without Stylable `requireModule` option'\n                );\n            });\n        this.onProcess = config.onProcess;\n        this.hooks = config.hooks || {};\n        this.optimizer = config.optimizer;\n        this.mode = config.mode || `production`;\n        this.resolveNamespace = config.resolveNamespace;\n        this.moduleResolver = this.initModuleResolver(config);\n        this.cssParser = config.cssParser || cssParse;\n        this.resolverCache = config.resolverCache || new Map();\n        this.fileProcessorCache = config.fileProcessorCache;\n        this.flags = {\n            ...defaultFeatureFlags,\n            ...config.flags,\n        };\n        this.fileProcessor = createStylableFileProcessor({\n            fileSystem: this.fileSystem,\n            onProcess: this.onProcess,\n            resolveNamespace: this.resolveNamespace,\n            cssParser: this.cssParser,\n            cache: this.fileProcessorCache,\n            flags: this.flags,\n        });\n\n        this.resolver = this.createResolver();\n    }\n    private initModuleResolver(config: StylableConfig): ModuleResolver {\n        return typeof config.resolveModule === 'function'\n            ? config.resolveModule\n            : createDefaultResolver({\n                  fs: this\n                      .fileSystem as IResolutionFileSystem /* we force to provide resolveModule when using MinimalFS */,\n                  ...config.resolveModule,\n              });\n    }\n\n    public getDependencies(meta: StylableMeta) {\n        const dependencies: Dependency[] = [];\n\n        for (const dependency of visitMetaCSSDependencies({ meta, resolver: this.resolver })) {\n            dependencies.push(dependency);\n        }\n\n        return dependencies;\n    }\n    public initCache({ filter }: InitCacheParams = {}) {\n        if (filter && this.resolverCache) {\n            for (const [key, cacheEntity] of this.resolverCache) {\n                const keep = filter(key, cacheEntity);\n\n                if (!keep) {\n                    this.resolverCache.delete(key);\n                }\n            }\n        } else {\n            this.resolverCache = new Map();\n            this.resolver = this.createResolver();\n        }\n    }\n    public createResolver({\n        requireModule = this.requireModule,\n        resolverCache = this.resolverCache,\n        resolvePath = this.moduleResolver,\n    }: Pick<StylableConfig, 'requireModule' | 'resolverCache'> & {\n        resolvePath?: ModuleResolver;\n    } = {}) {\n        return new StylableResolver(this.fileProcessor, requireModule, resolvePath, resolverCache);\n    }\n    public createProcessor({\n        resolveNamespace = this.resolveNamespace,\n    }: CreateProcessorOptions = {}) {\n        return new StylableProcessor(new Diagnostics(), resolveNamespace, this.flags);\n    }\n    private createTransformer(options: Partial<TransformerOptions> = {}) {\n        return new StylableTransformer({\n            moduleResolver: this.moduleResolver,\n            diagnostics: new Diagnostics(),\n            fileProcessor: this.fileProcessor,\n            requireModule: this.requireModule,\n            postProcessor: this.hooks.postProcessor,\n            replaceValueHook: this.hooks.replaceValueHook,\n            resolverCache: this.resolverCache,\n            mode: this.mode,\n            experimentalSelectorInference: this.experimentalSelectorInference,\n            ...options,\n        });\n    }\n    public transform(\n        pathOrMeta: string | StylableMeta,\n        options: Partial<TransformerOptions> = {}\n    ): StylableResults {\n        const meta = typeof pathOrMeta === `string` ? this.analyze(pathOrMeta) : pathOrMeta;\n        const transformer = this.createTransformer(options);\n        return transformer.transform(meta);\n    }\n    public transformSelector(\n        pathOrMeta: string | StylableMeta,\n        selector: string,\n        options?: Partial<TransformerOptions>\n    ): { selector: string; resolved: ResolvedElement[][] } {\n        const meta = typeof pathOrMeta === `string` ? this.analyze(pathOrMeta) : pathOrMeta;\n        const transformer = this.createTransformer(options);\n        const r = transformer.scopeSelector(meta, selector, undefined, undefined, undefined, true);\n        return {\n            selector: r.selector,\n            resolved: r.elements,\n        };\n    }\n    public transformCustomProperty(pathOrMeta: string | StylableMeta, prop: string) {\n        const meta = typeof pathOrMeta === `string` ? this.analyze(pathOrMeta) : pathOrMeta;\n        return CSSCustomProperty.scopeCSSVar(this.resolver, meta, prop);\n    }\n    public transformDecl(\n        pathOrMeta: string | StylableMeta,\n        prop: string,\n        value: string,\n        options?: Partial<TransformerOptions>\n    ) {\n        const decl = postcss.decl({ prop, value });\n        this.transformAST(\n            pathOrMeta,\n            postcss.root({}).append(postcss.rule({ selector: `.x` }).append(decl)),\n            options\n        );\n        return { prop: decl.prop, value: decl.value };\n    }\n    private transformAST(\n        pathOrMeta: string | StylableMeta,\n        ast: postcss.Root,\n        options?: Partial<TransformerOptions>\n    ): postcss.Root {\n        const meta = typeof pathOrMeta === `string` ? this.analyze(pathOrMeta) : pathOrMeta;\n        const transformer = this.createTransformer(options);\n        transformer.transformAst(ast, meta);\n        return ast;\n    }\n    public analyze(fullPath: string, overrideSrc?: string) {\n        return overrideSrc\n            ? this.fileProcessor.processContent(overrideSrc, fullPath)\n            : this.fileProcessor.process(fullPath);\n    }\n    public resolvePath(directoryPath: string, request: string) {\n        return this.resolver.resolvePath(directoryPath, request);\n    }\n}\n", "import { murmurhash3_32_gc } from './murmurhash';\nimport type { processNamespace } from './stylable-processor';\n\n/** @deprecated use createNamespaceStrategy */\nexport function packageNamespaceFactory(\n    findConfig: (fileName: string, options: { cwd: string }) => string | null,\n    loadConfig: (filePath: string) => object,\n    {\n        dirname,\n        relative,\n    }: { dirname(path: string): string; relative(from: string, to: string): string },\n    hashSalt = '',\n    prefix = '',\n    normalizeVersion = (semver: string) => semver\n): typeof processNamespace {\n    return (\n        namespace: string,\n        originStylesheetPath: string,\n        stylesheetPath: string = originStylesheetPath\n    ) => {\n        const configPath = findConfig('package.json', { cwd: dirname(stylesheetPath) });\n        if (!configPath) {\n            throw new Error(`Could not find package.json for ${originStylesheetPath}`);\n        }\n        const config = loadConfig(configPath) as { name: string; version: string };\n        const fromRoot = relative(dirname(configPath), originStylesheetPath).replace(/\\\\/g, '/');\n        return (\n            prefix +\n            namespace +\n            murmurhash3_32_gc(\n                hashSalt + config.name + '@' + normalizeVersion(config.version) + '/' + fromRoot\n            )\n        );\n    };\n}\n\n/** @deprecated use createNamespaceStrategy */\nexport function noCollisionNamespace({\n    prefix = '',\n    used: usedNamespaces = new Map<\n        string,\n        { prefix: string; namespace: string; stylesheetPath: string }\n    >(),\n} = {}): typeof processNamespace {\n    return (namespace, stylesheetPath) => {\n        const ns = prefix + namespace;\n        const used = usedNamespaces.get(ns);\n        if (used) {\n            if (used.stylesheetPath !== stylesheetPath) {\n                throw new Error(`namespace (${ns} of ${stylesheetPath}) is already in use`);\n            }\n        } else {\n            usedNamespaces.set(ns, { prefix, namespace, stylesheetPath });\n        }\n        return ns;\n    };\n}\n", "import type { StylableExports } from './stylable-transformer';\n\ninterface InjectCSSOptions {\n    /**\n     *  omitting the id will fallback to module.id/import.meta.url\n     */\n    id?: string | undefined;\n    /**\n     * css string to inject\n     */\n    css: string;\n    /**\n     * code to generate the css string to inject\n     */\n    cssCode?: string;\n    /**\n     *  calculated style depth\n     */\n    depth: number | string;\n    /**\n     *  use code to get the depth\n     */\n    depthCode?: string;\n    /**\n     *  reconciliation will happen only for style with the same runtimeId\n     */\n    runtimeId: string;\n}\n\ninterface ModuleOptions {\n    /**\n     * module namespace\n     */\n    namespace: string;\n    /**\n     * static imports for the module\n     */\n    imports?: Array<{ from: string; defaultImport?: string }>;\n    /**\n     * Stylable transforms exports\n     */\n    jsExports: StylableExports | { [K in keyof StylableExports]: string };\n    /**\n     * the request of the module runtime api e.g @stylable/runtime\n     */\n    runtimeRequest?: string;\n    /**\n     * target module format\n     */\n    moduleType: 'esm' | 'cjs';\n    /**\n     * es3 compat mode\n     */\n    varType?: 'const' | 'var';\n    /**\n     * inject code immediately after imports\n     */\n    header?: string;\n    /**\n     * inject code after the entire module code\n     */\n    footer?: string;\n}\n\nexport function generateStylableJSModuleSource(\n    moduleOptions: ModuleOptions,\n    injectOptions?: InjectCSSOptions\n) {\n    const {\n        namespace,\n        imports = [],\n        jsExports,\n        moduleType,\n        runtimeRequest,\n        varType = 'const',\n        header = '',\n        footer = '',\n    } = moduleOptions;\n\n    const { classes, keyframes, layers, containers, stVars, vars } = jsExports;\n    const exportKind = moduleType === 'esm' ? `export ${varType} ` : 'module.exports.';\n    return `\n${imports.map(moduleRequest(moduleType)).join('\\n')}\n${runtimeImport(moduleType, runtimeRequest, injectOptions)}\n\n${header}\n\n${varType} _namespace_ = ${JSON.stringify(namespace)};\n${varType} _style_ = (...args) => classesRuntime(_namespace_, ...args);\n\n${exportKind}cssStates = (stateMapping) => statesRuntime(_namespace_, stateMapping);\n${exportKind}style = _style_;\n${exportKind}st = _style_;\n\n${exportKind}namespace = _namespace_;\n${exportKind}classes = ${JSON.stringify(classes)};\n${exportKind}keyframes = ${JSON.stringify(keyframes)}; \n${exportKind}layers = ${JSON.stringify(layers)};\n${exportKind}containers = ${JSON.stringify(containers)};\n${exportKind}stVars = ${JSON.stringify(stVars)}; \n${exportKind}vars = ${JSON.stringify(vars)}; \n\n${runtimeExecuteInject(moduleType, injectOptions)}\n\n${footer}\n`;\n}\n\nfunction moduleRequest(moduleType: 'esm' | 'cjs') {\n    return ({ from, defaultImport }: { from: string; defaultImport?: string }) => {\n        const request = JSON.stringify(from);\n        if (defaultImport) {\n            return moduleType === 'esm'\n                ? `import ${defaultImport} from ${request};`\n                : `const ${defaultImport} = require(${request});`;\n        }\n        return moduleType === 'esm' ? `import ${request};` : `require(${request});`;\n    };\n}\n\nfunction runtimeImport(\n    moduleType: 'esm' | 'cjs',\n    runtimeRequest: string | undefined,\n    injectOptions: InjectCSSOptions | undefined\n) {\n    const importInjectCSS = injectOptions?.css ? `, injectCSS` : '';\n    const request = JSON.stringify(runtimeRequest ?? '@stylable/runtime');\n    return moduleType === 'esm'\n        ? `import { classesRuntime, statesRuntime${importInjectCSS} } from ${request};`\n        : `const { classesRuntime, statesRuntime${importInjectCSS} } = require(${request});`;\n}\n\nfunction runtimeExecuteInject(\n    moduleType: 'esm' | 'cjs',\n    injectOptions: InjectCSSOptions | undefined\n) {\n    if (!injectOptions?.css) {\n        return '';\n    }\n    const { id, css, cssCode, depthCode, depth, runtimeId } = injectOptions;\n\n    let out = 'injectCSS(';\n    out += id ? JSON.stringify(id) : moduleType === 'esm' ? 'import.meta.url' : 'module.id';\n    out += ', ';\n    out += cssCode || JSON.stringify(css);\n    out += ', ';\n    out += depthCode || JSON.stringify(depth) || '-1';\n    out += ', ';\n    out += JSON.stringify(runtimeId);\n    out += ');';\n    return out;\n}\n"],
  "mappings": "woBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,KAAIC,EAAE,OACFC,GAAO,UAAW,CAAC,MAAO,CAAC,iBAAiB,GAAM,MAAMD,EAAE,KAAKA,EAAE,IAAIA,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQA,EAAE,OAAOA,EAAE,cAAcA,EAAE,MAAMA,EAAE,IAAIA,EAAE,MAAMA,EAAE,OAAOA,EAAE,KAAKA,EAAE,QAAQA,EAAE,KAAKA,EAAE,MAAMA,EAAE,KAAKA,EAAE,QAAQA,EAAE,MAAMA,EAAE,QAAQA,EAAE,SAASA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAOA,EAAE,QAAQA,CAAC,CAAC,EACxRD,GAAO,QAAQE,GAAO,EACtBF,GAAO,QAAQ,aAAeE,sBCH9B,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAEA,IAAIC,GAAO,KAEPC,GAAoB,KAElBC,GAAN,MAAMC,UAAuB,KAAM,CACjC,YAAYC,EAASC,EAAMC,EAAQC,EAAQC,EAAMC,EAAQ,CACv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EAA4B,CAClE,IAAMC,EAAOD,EAAQ,KACrB,KAAK,QAAQ,KAAK,CACd,SAAUC,EAAK,QAAQ,MAAM,KAC7B,GAAGF,EACH,GAAGC,CACP,CAAC,CACL,CACJ,EAEO,SAASE,EACZC,EACAC,EACAC,EACF,CACE,IAAMC,EAAO,IAAIC,KACN,CAAE,KAAAJ,EAAM,SAAAC,EAAU,QAASC,EAAQ,GAAGE,CAAI,CAAE,GAGvD,OAAAD,EAAK,KAAOH,EACZG,EAAK,SAAWF,EAETE,CACX,CC9CO,IAAME,GAAsB,CAC/B,SACA,MACA,WACA,UACA,gBACA,UACA,UACA,MACA,WACA,QACA,UACA,QACA,cACA,gBACA,aACA,QACA,eACA,gBACA,MACA,QACA,gBACA,WACA,UACA,KACA,OACA,aACA,eACA,OACA,OACA,MACA,YACA,iBACA,mBACA,cACA,aACA,eACA,WACA,eACA,oBACA,YACA,aACA,WACA,QACA,OACA,QACA,SACA,QACA,UACA,QACA,aACA,eACA,WACA,QACA,eACA,SACA,OACA,oBACJ,EAEaC,GAAkB,CAAC,UAAW,UAAW,OAAO,EAOhDC,GAAkC,CAC3C,MACA,MACA,UACA,KACA,QACA,MACA,OACA,eACA,YACA,iBACA,cACA,mBAEA,SACA,OACJ,EACaC,GAAwCD,GAAgC,OAChFE,GAAS,CACN,OAAQA,EAAM,CACV,IAAK,SACL,IAAK,QACL,IAAK,cACL,IAAK,mBACD,MAAO,EACf,CACA,MAAO,EACX,CACJ,EAEaC,GAAuB,CAChC,QACA,WACA,SACA,MACA,eACA,aACA,gBACA,SACA,cACA,YACA,UACA,iBACA,uBACA,YACA,OACA,cACA,kBACA,wBACA,6BACA,sBACA,qBACJ,EAEaC,GAAkE,CAC3E,WAAY,CAAE,eAAgB,EAAM,EACpC,KAAM,CAAE,eAAgB,EAAM,EAC9B,KAAM,CAAE,eAAgB,EAAM,EAC9B,WAAY,CAAE,eAAgB,EAAM,EACpC,KAAM,CAAE,eAAgB,EAAM,EAC9B,oBAAqB,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AA,EACpDG,CAAU,YAAY,KAAK,UAAUF,CAAM,CAAC;AAAA,EAC5CE,CAAU,UAAU,KAAK,UAAUD,CAAI,CAAC;AAAA;AAAA,EAExCI,GAAqBd,EAAYJ,CAAa,CAAC;AAAA;AAAA,EAE/CQ,CAAM;AAAA,CAER,CAEA,SAASQ,GAAcZ,EAA2B,CAC9C,MAAO,CAAC,CAAE,KAAAe,EAAM,cAAAC,CAAc,IAAgD,CAC1E,IAAMC,EAAU,KAAK,UAAUF,CAAI,EACnC,OAAIC,EACOhB,IAAe,MAChB,UAAUgB,CAAa,SAASC,CAAO,IACvC,SAASD,CAAa,cAAcC,CAAO,KAE9CjB,IAAe,MAAQ,UAAUiB,CAAO,IAAM,WAAWA,CAAO,IAC3E,CACJ,CAEA,SAASJ,GACLb,EACAC,EACAL,EACF,CACE,IAAMsB,EAAkBtB,GAAe,IAAM,cAAgB,GACvDqB,EAAU,KAAK,UAAUhB,GAAkB,mBAAmB,EACpE,OAAOD,IAAe,MAChB,yCAAyCkB,CAAe,WAAWD,CAAO,IAC1E,wCAAwCC,CAAe,gBAAgBD,CAAO,IACxF,CAEA,SAASH,GACLd,EACAJ,EACF,CACE,GAAI,CAACA,GAAe,IAChB,MAAO,GAEX,GAAM,CAAE,GAAAuB,EAAI,IAAAC,EAAK,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,UAAAC,CAAU,EAAI5B,EAEtD6B,EAAM,aACV,OAAAA,GAAON,EAAK,KAAK,UAAUA,CAAE,EAAInB,IAAe,MAAQ,kBAAoB,YAC5EyB,GAAO,KACPA,GAAOJ,GAAW,KAAK,UAAUD,CAAG,EACpCK,GAAO,KACPA,GAAOH,GAAa,KAAK,UAAUC,CAAK,GAAK,KAC7CE,GAAO,KACPA,GAAO,KAAK,UAAUD,CAAS,EAC/BC,GAAO,KACAA,CACX",
  "names": ["require_picocolors_browser", "__commonJSMin", "exports", "module", "x", "create", "require_css_syntax_error", "__commonJSMin", "exports", "module", "pico", "terminalHighlight", "CssSyntaxError", "_CssSyntaxError", "message", "line", "column", "source", "file", "plugin", "color", "css", "lines", "start", "end", "maxWidth", "mark", "aside", "bold", "gray", "red", "text", "str", "index", "number", "gutter", "spacing", "code", "require_symbols", "__commonJSMin", "exports", "module", "require_stringifier", "__commonJSMin", "exports", "module", "DEFAULT_RAW", "capitalize", "str", "Stringifier", "builder", "node", "semicolon", "name", "params", "end", "detect", "value", "buf", "depth", "indent", "step", "start", "between", "after", "last", "i", "child", "before", "left", "right", "string", "own", "parent", "root", "method", "p", "parts", "prop", "raw", "require_stringify", "__commonJSMin", "exports", "module", "Stringifier", "stringify", "node", "builder", "require_node", "__commonJSMin", "exports", "module", "isClean", "my", "CssSyntaxError", "Stringifier", "stringify", "cloneNode", "obj", "parent", "cloned", "i", "value", "type", "j", "Node", "defaults", "name", "node", "error", "s", "add", "overrides", "keepBetween", "message", "opts", "end", "start", "prop", "next", "index", "stringRepresentation", "pos", "string", "column", "line", "defaultType", "nodes", "bookmark", "foundSelf", "result", "_", "inputs", "fixed", "emitInputs", "inputsNextIndex", "inputId", "input", "stringifier", "text", "data", "require_declaration", "__commonJSMin", "exports", "module", "Node", "Declaration", "defaults", "require_browser_path", "__commonJSMin", "exports", "module", "_process", "valueType", "value", "validateString", "paramName", "isPathSeparator", "code", "isPosixPathSeparator", "isWindowsDeviceRoot", "normalizeString", "path", "allowAboveRoot", "separator", "res", "lastSegmentLength", "lastSlash", "dots", "i", "lastSlashIndex", "_format", "sep", "pathObject", "dir", "base", "win32", "args", "resolvedDevice", "resolvedTail", "resolvedAbsolute", "len", "rootEnd", "device", "isAbsolute", "j", "last", "firstPart", "tail", "joined", "arg", "needsReplace", "slashCount", "firstLen", "from", "to", "fromOrig", "toOrig", "fromStart", "fromEnd", "fromLen", "toStart", "toEnd", "toLen", "length", "lastCommonSep", "fromCode", "out", "resolvedPath", "offset", "end", "matchedSlash", "ext", "start", "extIdx", "firstNonSlashEnd", "startDot", "startPart", "preDotState", "ret", "posix", "trailingSeparator", "hasRoot", "require_non_secure", "__commonJSMin", "exports", "module", "urlAlphabet", "customAlphabet", "alphabet", "defaultSize", "size", "id", "i", "nanoid", "require_previous_map", "__commonJSMin", "exports", "module", "SourceMapConsumer", "SourceMapGenerator", "existsSync", "readFileSync", "dirname", "join", "fromBase64", "str", "PreviousMap", "css", "opts", "prev", "text", "baseCharsetUri", "baseUri", "charsetUri", "uri", "encoding", "sourceMapString", "map", "comments", "start", "end", "path", "file", "prevPath", "string", "require_input", "__commonJSMin", "exports", "module", "SourceMapConsumer", "SourceMapGenerator", "fileURLToPath", "pathToFileURL", "isAbsolute", "resolve", "nanoid", "terminalHighlight", "CssSyntaxError", "PreviousMap", "fromOffsetCache", "sourceMapAvailable", "pathAvailable", "Input", "css", "opts", "map", "file", "message", "line", "column", "result", "endLine", "endColumn", "start", "end", "pos", "origin", "offset", "lastLine", "lineToIndex", "lines", "prevIndex", "i", "min", "max", "mid", "consumer", "from", "to", "fromUrl", "source", "json", "name", "require_map_generator", "__commonJSMin", "exports", "module", "SourceMapConsumer", "SourceMapGenerator", "dirname", "relative", "resolve", "sep", "pathToFileURL", "Input", "sourceMapAvailable", "pathAvailable", "MapGenerator", "stringify", "root", "opts", "cssString", "content", "eol", "prev", "from", "map", "node", "i", "result", "line", "column", "noSource", "mapping", "lines", "last", "str", "type", "p", "annotation", "file", "cached", "path", "input", "already", "fromUrl", "fileURL", "url", "require_comment", "__commonJSMin", "exports", "module", "Node", "Comment", "defaults", "require_container", "__commonJSMin", "exports", "module", "isClean", "my", "Declaration", "Comment", "Node", "parse", "Rule", "AtRule", "Root", "cleanSource", "nodes", "i", "markDirtyUp", "node", "Container", "_Container", "children", "child", "keepBetween", "callback", "iterator", "index", "result", "condition", "prop", "args", "cb", "other", "value", "exist", "add", "existIndex", "id", "type", "sample", "pattern", "opts", "decl", "e", "name", "selector", "dependant", "require_document", "__commonJSMin", "exports", "module", "Container", "LazyResult", "Processor", "Document", "defaults", "opts", "dependant", "require_warn_once", "__commonJSMin", "exports", "module", "printed", "message", "require_warning", "__commonJSMin", "exports", "module", "Warning", "text", "opts", "range", "opt", "require_result", "__commonJSMin", "exports", "module", "Warning", "Result", "processor", "root", "opts", "text", "warning", "i", "require_tokenize", "__commonJSMin", "exports", "module", "RE_AT_END", "RE_WORD_END", "RE_BAD_BRACKET", "RE_HEX_ESCAPE", "input", "options", "css", "ignore", "code", "next", "quote", "content", "escape", "escaped", "escapePos", "prev", "n", "currentToken", "length", "pos", "buffer", "returned", "position", "unclosed", "what", "endOfFile", "nextToken", "opts", "ignoreUnclosed", "controlChar", "back", "token", "require_at_rule", "__commonJSMin", "exports", "module", "Container", "AtRule", "defaults", "children", "require_root", "__commonJSMin", "exports", "module", "Container", "LazyResult", "Processor", "Root", "defaults", "child", "sample", "type", "nodes", "node", "ignore", "index", "opts", "dependant", "require_list", "__commonJSMin", "exports", "module", "list", "string", "spaces", "separators", "last", "array", "current", "split", "func", "inQuote", "prevQuote", "escape", "letter", "require_rule", "__commonJSMin", "exports", "module", "Container", "list", "Rule", "defaults", "values", "match", "sep", "require_parser", "__commonJSMin", "exports", "module", "Declaration", "tokenizer", "Comment", "AtRule", "Root", "Rule", "SAFE_COMMENT_NEIGHBOR", "findLastWithPosition", "tokens", "i", "token", "pos", "Parser", "input", "node", "type", "prev", "shift", "last", "open", "params", "brackets", "colon", "founded", "j", "element", "text", "match", "customProperty", "firstSpaces", "next", "string", "cache", "str", "offset", "start", "end", "bracket", "prop", "length", "value", "clean", "raw", "all", "lastTokenType", "spaces", "from", "result", "require_parse", "__commonJSMin", "exports", "module", "Container", "Parser", "Input", "parse", "css", "opts", "input", "parser", "e", "require_lazy_result", "__commonJSMin", "exports", "module", "isClean", "my", "MapGenerator", "stringify", "Container", "Document", "warnOnce", "Result", "parse", "Root", "TYPE_TO_CLASS_NAME", "PLUGIN_PROPS", "NOT_VISITORS", "CHILDREN", "isPromise", "obj", "getEvents", "node", "key", "type", "toStack", "events", "cleanMarks", "i", "postcss", "LazyResult", "_LazyResult", "processor", "css", "opts", "root", "parser", "error", "plugin", "onRejected", "onFinally", "err", "add", "cb", "event", "filter", "promise", "stack", "e", "visitor", "roots", "subRoot", "str", "data", "onFulfilled", "visitors", "visit", "iterator", "child", "dependant", "require_no_work_result", "__commonJSMin", "exports", "module", "MapGenerator", "stringify", "warnOnce", "parse", "Result", "NoWorkResult", "processor", "css", "opts", "root", "str", "self", "map", "generatedCSS", "generatedMap", "onRejected", "onFinally", "onFulfilled", "parser", "error", "require_processor", "__commonJSMin", "exports", "module", "NoWorkResult", "LazyResult", "Document", "Root", "Processor", "plugins", "normalized", "i", "css", "opts", "plugin", "require_fromJSON", "__commonJSMin", "exports", "module", "Declaration", "PreviousMap", "Comment", "AtRule", "Input", "Root", "Rule", "fromJSON", "json", "inputs", "ownInputs", "defaults", "input", "inputHydrated", "inputId", "source", "require_postcss", "__commonJSMin", "exports", "module", "CssSyntaxError", "Declaration", "LazyResult", "Container", "Processor", "stringify", "fromJSON", "Document", "Warning", "Comment", "AtRule", "Result", "Input", "parse", "list", "Rule", "Root", "Node", "postcss", "plugins", "name", "initializer", "warningPrinted", "creator", "args", "transformer", "cache", "css", "processOpts", "pluginOpts", "defaults", "require_unesc", "__commonJSMin", "exports", "module", "unesc", "gobbleHex", "str", "lower", "hex", "spaceTerminated", "i", "code", "valid", "codePoint", "isSurrogate", "CONTAINS_ESCAPE", "needToProcess", "ret", "gobbled", "require_getProp", "__commonJSMin", "exports", "module", "getProp", "obj", "_len", "props", "_key", "prop", "require_ensureObject", "__commonJSMin", "exports", "module", "ensureObject", "obj", "_len", "props", "_key", "prop", "require_stripComments", "__commonJSMin", "exports", "module", "stripComments", "str", "s", "commentStart", "lastEnd", "commentEnd", "require_util", "__commonJSMin", "exports", "_unesc", "_interopRequireDefault", "_getProp", "_ensureObject", "_stripComments", "obj", "require_node", "__commonJSMin", "exports", "module", "_util", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "cloneNode", "obj", "parent", "cloned", "value", "type", "j", "Node", "opts", "_proto", "index", "overrides", "name", "valueEscaped", "originalValue", "originalEscaped", "line", "column", "rawSpace", "raw", "require_types", "__commonJSMin", "exports", "TAG", "STRING", "SELECTOR", "ROOT", "PSEUDO", "NESTING", "ID", "COMMENT", "COMBINATOR", "CLASS", "ATTRIBUTE", "UNIVERSAL", "require_container", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "types", "_interopRequireWildcard", "_getRequireWildcardCache", "nodeInterop", "cacheBabelInterop", "cacheNodeInterop", "obj", "cache", "newObj", "hasPropertyDescriptor", "key", "desc", "_createForOfIteratorHelperLoose", "o", "allowArrayLike", "it", "_unsupportedIterableToArray", "i", "minLen", "_arrayLikeToArray", "n", "arr", "len", "arr2", "_defineProperties", "target", "props", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "p", "Container", "_Node", "opts", "_this", "_proto", "selector", "index", "child", "id", "_iterator", "_step", "node", "oldNode", "newNode", "oldIndex", "line", "col", "found", "foundChild", "callback", "result", "_this2", "_this3", "_this4", "_this5", "_this6", "_this7", "_this8", "_this9", "_this10", "_this11", "current", "memo", "split", "require_root", "__commonJSMin", "exports", "module", "_container", "_interopRequireDefault", "_types", "obj", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Root", "_Container", "opts", "_this", "_proto", "str", "memo", "selector", "message", "options", "handler", "require_selector", "__commonJSMin", "exports", "module", "_container", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Selector", "_Container", "opts", "_this", "require_cssesc", "__commonJSMin", "exports", "module", "object", "hasOwnProperty", "merge", "options", "defaults", "result", "key", "regexAnySingleEscape", "regexSingleEscape", "regexExcessiveSpaces", "cssesc", "string", "quote", "isIdentifier", "firstChar", "output", "counter", "length", "character", "codePoint", "value", "extra", "$0", "$1", "$2", "require_className", "__commonJSMin", "exports", "module", "_cssesc", "_interopRequireDefault", "_util", "_node", "_types", "obj", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "ClassName", "_Node", "opts", "_this", "_proto", "v", "escaped", "require_comment", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Comment", "_Node", "opts", "_this", "require_id", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "ID", "_Node", "opts", "_this", "_proto", "require_namespace", "__commonJSMin", "exports", "module", "_cssesc", "_interopRequireDefault", "_util", "_node", "obj", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Namespace", "_Node", "_proto", "value", "namespace", "escaped", "ns", "require_tag", "__commonJSMin", "exports", "module", "_namespace", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Tag", "_Namespace", "opts", "_this", "require_string", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "String", "_Node", "opts", "_this", "require_pseudo", "__commonJSMin", "exports", "module", "_container", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Pseudo", "_Container", "opts", "_this", "_proto", "params", "require_browser", "__commonJSMin", "exports", "module", "deprecate", "fn", "msg", "config", "warned", "deprecated", "name", "val", "require_attribute", "__commonJSMin", "exports", "unescapeValue", "_cssesc", "_interopRequireDefault", "_unesc", "_namespace", "_types", "_CSSESC_QUOTE_OPTIONS", "obj", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "deprecate", "WRAPPED_IN_QUOTES", "warnOfDeprecatedValueAssignment", "warnOfDeprecatedQuotedAssignment", "warnOfDeprecatedConstructor", "value", "deprecatedUsage", "quoteMark", "unescaped", "m", "handleDeprecatedContructorOpts", "opts", "_unescapeValue", "Attribute", "_Namespace", "_this", "_proto", "options", "cssescopts", "CSSESC_QUOTE_OPTIONS", "escaped", "v", "numSingleQuotes", "numDoubleQuotes", "pref", "quote", "quoteValue", "rawValue", "prop", "name", "attrSpaces", "spaces", "rawSpaces", "spaceName", "concat", "defaultAttrConcat", "count", "attributeSpaces", "operatorSpaces", "operator", "valueSpaces", "insensitiveSpaces", "_this2", "selector", "attrValue", "qm", "_unescapeValue2", "insensitive", "require_universal", "__commonJSMin", "exports", "module", "_namespace", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Universal", "_Namespace", "opts", "_this", "require_combinator", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Combinator", "_Node", "opts", "_this", "require_nesting", "__commonJSMin", "exports", "module", "_node", "_interopRequireDefault", "_types", "obj", "_inheritsLoose", "subClass", "superClass", "_setPrototypeOf", "o", "p", "Nesting", "_Node", "opts", "_this", "require_sortAscending", "__commonJSMin", "exports", "module", "sortAscending", "list", "a", "b", "require_tokenTypes", "__commonJSMin", "exports", "ampersand", "asterisk", "at", "comma", "colon", "semicolon", "openParenthesis", "closeParenthesis", "openSquare", "closeSquare", "dollar", "tilde", "caret", "plus", "equals", "pipe", "greaterThan", "space", "singleQuote", "doubleQuote", "slash", "bang", "backslash", "cr", "feed", "newline", "tab", "str", "comment", "word", "combinator", "require_tokenize", "__commonJSMin", "exports", "tokenize", "t", "_interopRequireWildcard", "_unescapable", "_wordDelimiters", "_getRequireWildcardCache", "nodeInterop", "cacheBabelInterop", "cacheNodeInterop", "obj", "cache", "newObj", "hasPropertyDescriptor", "key", "desc", "unescapable", "wordDelimiters", "hex", "hexChars", "i", "consumeWord", "css", "start", "next", "code", "consumeEscape", "hexDigits", "FIELDS", "input", "tokens", "_css", "length", "offset", "line", "end", "content", "endColumn", "endLine", "escaped", "escapePos", "last", "lines", "nextLine", "nextOffset", "quote", "tokenType", "unclosed", "what", "fix", "require_parser", "__commonJSMin", "exports", "module", "_root", "_interopRequireDefault", "_selector", "_className", "_comment", "_id", "_tag", "_string", "_pseudo", "_attribute", "_interopRequireWildcard", "_universal", "_combinator", "_nesting", "_sortAscending", "_tokenize", "tokens", "types", "_util", "_WHITESPACE_TOKENS", "_Object$assign", "_getRequireWildcardCache", "nodeInterop", "cacheBabelInterop", "cacheNodeInterop", "obj", "cache", "newObj", "hasPropertyDescriptor", "key", "desc", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "Constructor", "protoProps", "staticProps", "WHITESPACE_TOKENS", "WHITESPACE_EQUIV_TOKENS", "tokenStart", "token", "tokenEnd", "getSource", "startLine", "startColumn", "endLine", "endColumn", "getTokenSource", "getTokenSourceSpan", "startToken", "endToken", "unescapeProp", "node", "prop", "value", "indexesOf", "array", "item", "indexes", "uniqs", "list", "Parser", "rule", "options", "rootSource", "selector", "_proto", "_this", "message", "errorOptions", "attr", "startingToken", "len", "pos", "spaceBefore", "commentBefore", "lastAdded", "spaceAfterMeaningfulToken", "content", "next", "prevContent", "existingComment", "rawValue", "oldRawValue", "_rawValue", "_unescaped", "_oldRawValue", "oldValue", "insensitive", "_unescapeValue", "unescaped", "quoteMark", "lastComment", "rawLastComment", "lastValue", "rawLastValue", "stopPosition", "startPosition", "nodes", "space", "spaces", "firstToken", "lastToken", "requiredSpace", "_this2", "rawSpace", "n", "rawSpaceBefore", "result", "position", "nameRaw", "name", "raws", "_this3", "nextSigTokenPos", "last", "_this$convertWhitespa", "spaceOrDescendantSelectorNodes", "_this$convertWhitespa2", "_space", "_rawSpace", "_this$convertWhitespa3", "_space2", "_rawSpace2", "current", "opts", "before", "nextContent", "unbalanced", "parenStart", "parenValue", "parenEnd", "_this4", "pseudoStr", "first", "length", "namespace", "nextToken", "firstCallback", "_this5", "word", "hasClass", "escapedDot", "isKeyframesPercent", "hasId", "interpolations", "hashIndex", "indices", "ind", "index", "sourceIndex", "source", "classNameOpts", "idOpts", "tagOpts", "throwOnParenthesis", "description", "found", "an", "required", "searchPosition", "require_processor", "__commonJSMin", "exports", "module", "_parser", "_interopRequireDefault", "obj", "Processor", "func", "options", "_proto", "rule", "merged", "parser", "_this", "resolve", "reject", "root", "transform", "string", "e", "result", "require_constructors", "__commonJSMin", "exports", "_attribute", "_interopRequireDefault", "_className", "_combinator", "_comment", "_id", "_nesting", "_pseudo", "_root", "_selector", "_string", "_tag", "_universal", "obj", "attribute", "opts", "className", "combinator", "comment", "id", "nesting", "pseudo", "root", "selector", "string", "tag", "universal", "require_guards", "__commonJSMin", "exports", "isContainer", "isNamespace", "isNode", "isPseudoClass", "isPseudoElement", "_types", "_IS_TYPE", "IS_TYPE", "node", "isNodeType", "type", "isAttribute", "isClassName", "isCombinator", "isComment", "isIdentifier", "isNesting", "isPseudo", "isRoot", "isSelector", "isString", "isTag", "isUniversal", "require_selectors", "__commonJSMin", "exports", "_types", "key", "_constructors", "_guards", "require_dist", "__commonJSMin", "exports", "module", "_processor", "_interopRequireDefault", "selectors", "_interopRequireWildcard", "_getRequireWildcardCache", "nodeInterop", "cacheBabelInterop", "cacheNodeInterop", "obj", "cache", "newObj", "hasPropertyDescriptor", "key", "desc", "parser", "processor", "_default", "require_postcss_nested", "__commonJSMin", "exports", "module", "Rule", "AtRule", "parser", "parse", "rawSelector", "rule", "nodes", "parsed", "e", "interpolateAmpInSelector", "parent", "replaced", "node", "clonedParent", "mergeSelectors", "child", "merged", "sel", "parentNode", "selector", "breakOut", "after", "prev", "nextPrev", "createFnAtruleChilds", "bubble", "atruleChilds", "atrule", "bubbling", "mergeSels", "children", "rootRuleMergeSel", "clone", "pickDeclarations", "declarations", "atruleNames", "defaults", "custom", "list", "name", "parseRootRuleParams", "params", "braceBlock", "bits", "allowlist", "rules", "escapes", "getAncestorRules", "leaf", "lineage", "unwrapRootRule", "rootRuleEscapes", "topEscaped", "topEscapedIdx", "breakoutLeaf", "breakoutRoot", "i", "oldClone", "restRoot", "arr", "oldRoot", "nextSibs", "next", "normalizeRootRule", "type", "selectorBlock", "hasRootRule", "opts", "unwrap", "rootRuleName", "preserveEmpty", "root", "unwrapped", "copyDeclarations", "require_index_es5", "__commonJSMin", "exports", "module", "pattern", "callback", "dashChar", "char", "camelCaseCSS", "property", "require_objectifier", "__commonJSMin", "exports", "module", "camelcase", "UNITLESS", "atRule", "node", "process", "name", "result", "child", "body", "i", "value", "require_parser", "__commonJSMin", "exports", "module", "postcss", "IMPORTANT", "UNITLESS", "dashify", "str", "decl", "parent", "name", "value", "atRule", "parts", "node", "parse", "obj", "i", "root", "require_process_result", "__commonJSMin", "exports", "module", "objectify", "result", "warn", "source", "require_async", "__commonJSMin", "exports", "module", "postcss", "processResult", "parse", "plugins", "processor", "input", "result", "require_sync", "__commonJSMin", "exports", "module", "postcss", "processResult", "parse", "plugins", "processor", "input", "result", "require_postcss_js", "__commonJSMin", "exports", "module", "objectify", "parse", "async", "sync", "require_safe_parser", "__commonJSMin", "exports", "module", "tokenizer", "Comment", "Parser", "SafeParser", "token", "node", "pos", "text", "match", "tokens", "i", "colon", "nextStart", "prevEnd", "other", "spaces", "require_safe_parse", "__commonJSMin", "exports", "module", "Input", "SafeParser", "css", "opts", "input", "parser", "require_types", "__commonJSMin", "exports", "tokenize", "source", "shouldClose", "isDelimiter", "isStringDelimiter", "isWhitespace", "shouldAddToken", "createToken", "getCommentStartType", "isCommentEnd", "getUnclosedComment", "offset", "tokens", "previousChar", "buffer", "inComment", "inString", "start", "nextCharIndex", "ch", "pushBuffer", "type", "end", "exports", "isComment", "type", "exports", "isString", "isStringDelimiter", "char", "isWhitespace", "createToken", "value", "start", "end", "getJSCommentStartType", "ch", "source", "nextCharIndex", "getMultilineCommentStartType", "isCommentEnd", "commentType", "_source", "_nextCharIndex", "previousChar", "getUnclosedComment", "getText", "tokens", "startIndex", "upToIndex", "res", "i", "groupTokens", "trimTokens", "shouldTrimToken", "last", "arr", "Seeker", "tokens", "num", "type", "start", "end", "isEndError", "token", "block", "endIndex", "handleToken", "ast", "source", "exports", "__exportStar", "exports", "core_1", "tokenizeSelector", "source", "options", "isDelimiter", "char", "previousChar", "exports", "core_1", "createEmptySelector", "exports", "createEmptyNth", "createCombinatorAst", "value", "type", "start", "end", "createCommentAst", "isCombinatorToken", "token", "isNamespacedToken", "isNamespacedAst", "ensureSelector", "selectors", "startToken", "lastSelector", "trimCombinators", "selector", "nodes", "firstNode", "lastNode", "index", "current", "lastComment", "helpers_1", "core_1", "NthParser", "_NthParser", "name", "selectorNode", "s", "token", "type", "nextToken", "lastNode", "value", "oddEventMatch", "isInvalid", "matchValidStart", "step", "offset", "stepNode", "offsetNode", "ofNode", "exports", "tokenizer_1", "nth_parser_1", "helpers_1", "core_1", "parseCssSelector", "source", "options", "parseTokens", "exports", "tokens", "handleToken", "token", "selectors", "t", "currentSelector", "ast", "comments", "name", "firstComments", "type", "endToken", "secondComments", "block", "lastCombinatorAst", "lastAst", "initialSpaceCombIndex", "next", "nextCombinator", "initialSpace", "spaceValue", "nodeAfterInitial", "prevAst", "prevInvalidAst", "beforeComments", "i", "current", "target", "searchIndex", "potentialAfterComments", "nextToken", "validNamespace", "validTarget", "invalid", "nsAst", "prev", "res", "nthSelector", "nthParser", "newSelector", "ended", "lastSelector", "selector", "require_ast_types", "__commonJSMin", "exports", "nth_parser_1", "stringifySelectorAst", "value", "stringifySelectors", "stringifyNode", "exports", "printers", "node", "stringifyNested", "stringifyNamespace", "before", "after", "selectors", "result", "nthNode", "namespace", "ns", "comment", "nestEnd", "walk", "topNode", "visit", "options", "toVisit", "context", "createWalkContext", "current", "skipAmount", "isWithNodes", "exports", "prevIndex", "prevParents", "currentParents", "currentParent", "node", "walk_1", "groupCompoundSelectors", "input", "options", "context", "createCompoundContext", "node", "_index", "_nodes", "parents", "nodes", "nested", "exports", "splitPseudoElements", "output", "lastSelector", "lastCompound", "lastCompoundInitialPart", "handleNode", "isCommentWithNoSpacing", "innerNode", "splitCompoundSelectors", "inputSelectors", "inputSelector", "outputSelector", "walk_1", "calcSpecificity", "ast", "result", "node", "customPseudoClass", "exports", "mostSpecificInnerSelector", "pseudoClassPlusMostSpecificInnerSelector", "highest", "selector", "currentSpecificity", "compareSpecificity", "addSpecificity", "a", "b", "i", "specificityDiff", "to", "from", "selector_parser_1", "exports", "__exportStar", "stringify_1", "walk_1", "compound_1", "specificity_1", "require_lodash", "__commonJSMin", "exports", "module", "LARGE_ARRAY_SIZE", "HASH_UNDEFINED", "MAX_SAFE_INTEGER", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "objectTag", "promiseTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "reRegExpChar", "reFlags", "reIsHostCtor", "reIsUint", "cloneableTags", "freeGlobal", "freeSelf", "root", "freeExports", "freeModule", "moduleExports", "addMapEntry", "map", "pair", "addSetEntry", "set", "value", "arrayEach", "array", "iteratee", "index", "length", "arrayPush", "values", "offset", "arrayReduce", "accumulator", "initAccum", "baseTimes", "n", "result", "getValue", "object", "key", "isHostObject", "mapToArray", "overArg", "func", "transform", "arg", "setToArray", "arrayProto", "funcProto", "objectProto", "coreJsData", "maskSrcKey", "uid", "funcToString", "hasOwnProperty", "objectToString", "reIsNative", "Buffer", "Symbol", "Uint8Array", "getPrototype", "objectCreate", "propertyIsEnumerable", "splice", "nativeGetSymbols", "nativeIsBuffer", "nativeKeys", "DataView", "getNative", "Map", "Promise", "Set", "WeakMap", "nativeCreate", "dataViewCtorString", "toSource", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "symbolProto", "symbolValueOf", "Hash", "entries", "entry", "hashClear", "hashDelete", "hashGet", "data", "hashHas", "hashSet", "ListCache", "listCacheClear", "listCacheDelete", "assocIndexOf", "lastIndex", "listCacheGet", "listCacheHas", "listCacheSet", "MapCache", "mapCacheClear", "mapCacheDelete", "getMapData", "mapCacheGet", "mapCacheHas", "mapCacheSet", "Stack", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "cache", "pairs", "arrayLikeKeys", "inherited", "isArray", "isArguments", "skipIndexes", "isIndex", "assignValue", "objValue", "eq", "baseAssign", "source", "copyObject", "keys", "baseClone", "isDeep", "isFull", "customizer", "stack", "isObject", "isArr", "initCloneArray", "copyArray", "tag", "getTag", "isFunc", "isBuffer", "cloneBuffer", "initCloneObject", "copySymbols", "initCloneByTag", "stacked", "props", "getAllKeys", "subValue", "baseCreate", "proto", "baseGetAllKeys", "keysFunc", "symbolsFunc", "baseGetTag", "baseIsNative", "isMasked", "pattern", "isFunction", "baseKeys", "isPrototype", "buffer", "cloneArrayBuffer", "arrayBuffer", "cloneDataView", "dataView", "cloneMap", "cloneFunc", "cloneRegExp", "regexp", "cloneSet", "cloneSymbol", "symbol", "cloneTypedArray", "typedArray", "newValue", "getSymbols", "isKeyable", "stubArray", "Ctor", "ctorString", "type", "cloneDeep", "other", "isArrayLikeObject", "isArrayLike", "isLength", "isObjectLike", "stubFalse", "core_1", "parseImports", "source", "blockStart", "blockEnd", "taggedImportSupport", "strictSemiColon", "findImports", "isDelimiter", "shouldAddToken", "exports", "char", "type", "isImportBlockEndError", "token", "tokens", "imports", "s", "t", "startTokenIndex", "errors", "defaultName", "star", "named", "tagged", "from", "block", "res", "processNamedBlock", "hasComma", "i", "_a", "tagTokens", "tagName", "hasEnded", "j", "pushToken", "name", "require_parse", "__commonJSMin", "exports", "module", "openParentheses", "closeParentheses", "singleQuote", "doubleQuote", "backslash", "slash", "comma", "colon", "star", "uLower", "uUpper", "plus", "isUnicodeRange", "input", "tokens", "value", "next", "quote", "prev", "token", "escape", "escapePos", "whitespacePos", "parenthesesOpenPos", "pos", "code", "max", "stack", "balanced", "parent", "name", "before", "after", "require_walk", "__commonJSMin", "exports", "module", "walk", "nodes", "cb", "bubble", "i", "max", "node", "result", "require_stringify", "__commonJSMin", "exports", "module", "stringifyNode", "node", "custom", "type", "value", "buf", "customResult", "stringify", "nodes", "result", "i", "require_unit", "__commonJSMin", "exports", "module", "minus", "plus", "dot", "exp", "EXP", "likeNumber", "value", "code", "nextCode", "nextNextCode", "pos", "length", "require_lib", "__commonJSMin", "exports", "module", "parse", "walk", "stringify", "ValueParser", "value", "cb", "bubble", "require_lodash", "__commonJSMin", "exports", "module", "LARGE_ARRAY_SIZE", "HASH_UNDEFINED", "MAX_SAFE_INTEGER", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "objectTag", "promiseTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "reRegExpChar", "reFlags", "reIsHostCtor", "reIsUint", "cloneableTags", "freeGlobal", "freeSelf", "root", "freeExports", "freeModule", "moduleExports", "addMapEntry", "map", "pair", "addSetEntry", "set", "value", "arrayEach", "array", "iteratee", "index", "length", "arrayPush", "values", "offset", "arrayReduce", "accumulator", "initAccum", "baseTimes", "n", "result", "getValue", "object", "key", "isHostObject", "mapToArray", "overArg", "func", "transform", "arg", "setToArray", "arrayProto", "funcProto", "objectProto", "coreJsData", "maskSrcKey", "uid", "funcToString", "hasOwnProperty", "objectToString", "reIsNative", "Buffer", "Symbol", "Uint8Array", "getPrototype", "objectCreate", "propertyIsEnumerable", "splice", "nativeGetSymbols", "nativeIsBuffer", "nativeKeys", "DataView", "getNative", "Map", "Promise", "Set", "WeakMap", "nativeCreate", "dataViewCtorString", "toSource", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "symbolProto", "symbolValueOf", "Hash", "entries", "entry", "hashClear", "hashDelete", "hashGet", "data", "hashHas", "hashSet", "ListCache", "listCacheClear", "listCacheDelete", "assocIndexOf", "lastIndex", "listCacheGet", "listCacheHas", "listCacheSet", "MapCache", "mapCacheClear", "mapCacheDelete", "getMapData", "mapCacheGet", "mapCacheHas", "mapCacheSet", "Stack", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "cache", "pairs", "arrayLikeKeys", "inherited", "isArray", "isArguments", "skipIndexes", "isIndex", "assignValue", "objValue", "eq", "baseAssign", "source", "copyObject", "keys", "baseClone", "isDeep", "isFull", "customizer", "stack", "isObject", "isArr", "initCloneArray", "copyArray", "tag", "getTag", "isFunc", "isBuffer", "cloneBuffer", "initCloneObject", "copySymbols", "initCloneByTag", "stacked", "props", "getAllKeys", "subValue", "baseCreate", "proto", "baseGetAllKeys", "keysFunc", "symbolsFunc", "baseGetTag", "baseIsNative", "isMasked", "pattern", "isFunction", "baseKeys", "isPrototype", "buffer", "cloneArrayBuffer", "arrayBuffer", "cloneDataView", "dataView", "cloneMap", "cloneFunc", "cloneRegExp", "regexp", "cloneSet", "cloneSymbol", "symbol", "cloneTypedArray", "typedArray", "newValue", "getSymbols", "isKeyable", "stubArray", "Ctor", "ctorString", "type", "cloneDeepWith", "other", "isArrayLikeObject", "isArrayLike", "isLength", "isObjectLike", "stubFalse", "require_Parser", "__commonJSMin", "exports", "module", "ignoreFunction", "createReturningFunction", "value", "Parser", "states", "result", "name", "state", "regExps", "iterator", "str", "processState", "statePart", "key", "total", "r", "actions", "pos", "fn", "regExpStr", "initialState", "string", "context", "currentState", "currentIndex", "regExp", "match", "i", "action", "ret", "require_uni_regexp", "__commonJSMin", "exports", "module", "require_parse", "__commonJSMin", "exports", "module", "Parser", "uniRegexp", "unescape", "str", "commentMatch", "match", "content", "typeMatch", "type", "name", "pseudoClassStartMatch", "newToken", "nestedPseudoClassStartMatch", "after", "newSelector", "nestedEnd", "before", "operatorMatch", "operator", "token", "spacingMatch", "elementMatch", "namespace", "universalMatch", "attributeMatch", "invalidMatch", "irrelevantSpacingStartMatch", "irrelevantSpacingEndMatch", "nextSelectorMatch", "addToCurrent", "bracketStart", "bracketEnd", "getSelectors", "selectors", "selectorsSecondHalf", "selector", "parser", "parse", "selectorNode", "rootNode", "require_stringify", "__commonJSMin", "exports", "module", "uniRegexp", "identifierEscapeRegexp", "escape", "str", "identifier", "stringifyWithoutBeforeAfter", "tree", "stringify", "require_parseValues", "__commonJSMin", "exports", "module", "Parser", "commentMatch", "match", "content", "spacingMatch", "item", "initialSpacingMatch", "endSpacingMatch", "unescapeString", "all", "unicode", "otherCharacter", "C", "stringMatch", "value", "commaMatch", "spacing", "newValue", "itemMatch", "nestedItemMatch", "name", "nestedItemEndMatch", "remaining", "urlMatch", "innerSpacingBefore", "innerSpacingAfter", "parser", "parseValues", "str", "valueNode", "rootNode", "require_stringifyValues", "__commonJSMin", "exports", "module", "cssesc", "stringify", "escape", "str", "stringType", "stringifyWithoutBeforeAfter", "tree", "start", "end", "require_lib", "__commonJSMin", "exports", "invalid", "value", "exports", "literal", "cssWideKeyword", "space", "comment", "customIdent", "dashedIdent", "string", "integer", "number", "unknownUnit", "length", "angle", "percentage", "flex", "time", "frequency", "resolution", "call", "color", "exports", "core_1", "tokenizeValue", "source", "options", "isDelimiter", "char", "previousChar", "ch", "exports", "stringifyCSSValue", "ast", "stringifyNode", "result", "node", "exports", "stringifyByType", "before", "value", "after", "args", "unit", "ast_types_1", "units_1", "tokenizer_1", "value_stringify_1", "core_1", "parseCSSValue", "source", "_options", "tokens", "handleToken", "exports", "token", "ast", "type", "value", "start", "end", "firstSpace", "before", "after", "parseNumber", "ident", "collectIdent", "args", "nextToken", "_ast", "_source", "collectedValue", "pickAmount", "current", "startMatch", "isStartOfNumber", "numberValue", "numberUnit", "isNumber", "fullNumberMatch", "startWithValidNumber", "peekCount", "nextValue", "matchedNumber", "leftover", "isInteger", "integerRegExp", "nodeType", "knownUnits", "units", "unit", "NumberRegExp", "validNumberRegex", "r", "numVal", "defineProperty", "_config", "exports", "node", "expectedType", "define_property_1", "exports", "index", "total", "define_property_1", "subMarginPlacements", "exports", "_node", "amountOfType", "indexOfType", "core_1", "isDelimiter", "char", "isWhitespace", "exports", "parseValueSyntax", "source", "parseTokens", "literal", "name", "enclosed", "multipliers", "keyword", "property", "range", "dataType", "group", "nodes", "juxtaposing", "bar", "doubleAmpersand", "doubleBar", "tokens", "handleToken", "token", "ast", "_source", "s", "closed", "nameBlock", "node", "type", "getLiteralValueType", "t", "min", "sep", "max", "end", "parseNumber", "res", "applyPrecedence", "isRangeMultiplier", "lastParsedNode", "isLowLevelGroup", "typeToRange", "start", "applyJuxtaposing", "results", "order", "i", "j", "before", "after", "value", "last", "prev", "stringify", "child", "__exportStar", "exports", "value_parser_1", "value_stringify_1", "define_property_1", "background_1", "margin_1", "value_syntax_parser_1", "require_vendor_prefixes", "__commonJSMin", "exports", "module", "require_is_vendor_prefixed", "__commonJSMin", "exports", "module", "vendorPrefixes", "property", "src_exports", "__export", "CustomValueStrategy", "Diagnostics", "Stylable", "StylableMeta", "createCustomValue", "createDefaultResolver", "createNamespaceStrategy", "defaultNamespaceBuilder", "defaultNoMatchHandler", "ensureModuleImport", "generateStylableJSModuleSource", "noCollisionNamespace", "parseModuleImportStatement", "processNamespace", "validateCustomPropertyName", "__toCommonJS", "cachedProcessFile", "processor", "readFileSync", "postProcessors", "cache", "process", "filePath", "invalidateCache", "content", "cached", "processContent", "value", "postProcessor", "add", "import_postcss", "postcss_default", "postcss", "stringify", "fromJSON", "plugin", "parse", "list", "document", "comment", "atRule", "rule", "decl", "root", "CssSyntaxError", "Declaration", "Container", "Processor", "Document", "Comment", "Warning", "AtRule", "Result", "Input", "Rule", "Root", "Node", "import_postcss_nested", "import_index", "postcss_js_default", "index", "objectify", "parse", "async", "sync", "import_postcss_safe_parser", "processor", "postcss_default", "postcssNested", "cssObjectToAst", "cssObject", "sourceFile", "postcss_js_default", "Diagnostics", "reports", "diagnostic", "context", "node", "createDiagnosticReporter", "code", "severity", "message", "func", "args", "nativePseudoClasses", "CSSWideKeywords", "reservedFunctionalPseudoClasses", "knownPseudoClassesWithNestedSelectors", "name", "nativePseudoElements", "nativeFunctionsDic", "import_path", "import_css_selector_parser", "import_lodash", "stringifySelector", "walkSelector", "selectorAstCache", "parseSelectorWithCache", "selector", "options", "cachedValue", "cloneDeep", "cloneSelector", "s", "isSimpleSelector", "foundType", "node", "flattenFunctionalSelector", "convertToSelector", "convertToClass", "castedNode", "convertToInvalid", "node", "castedNode", "convertToSelector", "convertToPseudoClass", "name", "nestedSelectors", "createCombinatorSelector", "partial", "type", "isInPseudoClassContext", "parents", "parent", "matchTypeAndValue", "a", "b", "isCompRoot", "isNestedNode", "scopeNestedSelector", "scopeSelectorAst", "nestedSelectorAst", "rootScopeLevel", "isAnchor", "resultSelectors", "targetAst", "scopeAst", "outputAst", "cloneDeep", "first", "walkSelector", "nestStartWithNesting", "nestedStartWithGlobal", "nestStartWithScope", "i", "scopeAlreadyMerged", "nodes", "stringifySelector", "import_css_selector_parser", "import_css_selector_parser", "import_lodash", "transformInlineCustomSelectorMap", "customSelectors", "report", "result", "link", "name", "path", "ast", "transformInlineCustomSelectors", "nestedName", "selector", "type", "unknown", "isCustomSelectorNode", "node", "inputSelectors", "getCustomSelector", "transformInlineCustomSelector", "inputSelector", "insertions", "index", "_nodes", "parents", "targetSelectors", "parent", "selectorIndex", "progress", "overflow", "currentSelector", "output", "updateSelector", "cloneDeep", "run", "progressIdx", "i", "isChildOfAtRule", "rule", "atRuleName", "currentParent", "isInConditionalGroup", "node", "includeRoot", "parent", "createSubsetAst", "root", "selectorPrefix", "mixinTarget", "isRoot", "getCustomSelector", "isNestedInMixin", "prefixSelectorList", "parseSelectorWithCache", "prefixType", "containsPrefix", "containsMatchInFirstChunk", "mixinRoot", "selectorAst", "ast", "scopeNestedSelector", "transformInlineCustomSelectors", "matchesSelectors", "selector", "stringifySelector", "selectorNode", "fixChunkOrdering", "replaceTargetWithMixinAnchor", "clonedRule", "scopeSelector", "atruleHasMixin", "atRuleSubset", "atRule", "stMixinMarker", "isStMixinMarker", "walkSelector", "matchTypeAndValue", "convertToSelector", "compound", "simpleNodes", "i", "childNode", "chunk", "isMatch", "innerSelectorNode", "findRule", "test", "statement", "found", "declarationIndex", "isSimpleSelector", "acc", "isSimple", "isValidDeclaration", "decl", "utilDiagnostics", "createDiagnosticReporter", "mergeValue", "mergeRules", "mixinAst", "rule", "mixinDecl", "report", "useNestingAsAnchor", "mixinRoot", "nestedInKeyframes", "isChildOfAtRule", "anchorSelector", "stMixinMarker", "anchorNodeCheck", "isStMixinMarker", "mixinRule", "selector", "scopeNestedSelector", "parseSelectorWithCache", "isChildOfMixinRoot", "nextRule", "inlineMixin", "hasNonDeclsBeforeDecl", "mixInto", "mixIntoRule", "node", "nestFollowingDecls", "hasAnyDeclsAfter", "nested", "nextNode", "current", "sourcePathDiagnostics", "getSourcePath", "root", "diagnostics", "source", "getAlias", "symbol", "st_symbol_exports", "__export", "addSymbol", "diagnostics", "get", "getAll", "getAllByType", "getSymbolAstNode", "hooks", "readableTypeMap", "reportRedeclare", "defaultFeatureFlags", "defaultHooks", "createFeature", "hooks", "type", "plugableRecord", "desc", "map", "key", "value", "NAMESPACES", "readableTypeMap", "createState", "clone", "dataKey", "plugableRecord", "diagnostics", "createDiagnosticReporter", "name", "hooks", "createFeature", "meta", "get", "type", "byNSFlat", "byType", "getAll", "ns", "getAllByType", "addSymbol", "context", "symbol", "node", "safeRedeclare", "localName", "byNS", "symbolToAst", "typeTable", "nsName", "getSymbolAstNode", "reportRedeclare", "symbols", "flat", "collisions", "symbolDecl", "ast", "st_import_exports", "__export", "ImportTypeHook", "PseudoImport", "PseudoImportDecl", "StylablePublicApi", "createImportSymbol", "diagnostics", "getImportStatements", "hooks", "generalDiagnostics", "createDiagnosticReporter", "selector", "type", "name", "import_path", "import_imports_parser", "stripQuotation", "str", "filename2varname", "filename", "string2varname", "matchAscii", "import_postcss_value_parser", "parseImportMessages", "createDiagnosticReporter", "errors", "propName", "name", "type", "ensureImportsMessages", "kind", "origin", "override", "createAtImportProps", "importObj", "named", "keyframes", "params", "namedParts", "getNamedImportParts", "keyFramesParts", "ensureModuleImport", "ast", "importPatches", "options", "diagnostics", "Diagnostics", "patches", "createImportPatches", "patch", "newImport", "handled", "node", "imported", "parseStImport", "processImports", "parsePseudoImport", "generateNamedValue", "defaultDecls", "namedDecls", "patchDecls", "ensureSingleDecl", "item", "hasDefinitions", "atRule", "rule", "createPseudoImportProps", "setImportObjectFrom", "importPath", "dirPath", "path", "parseModuleImportStatement", "context", "imports", "isCompRoot", "namedTyped", "impName", "impAsName", "fromExists", "decl", "stripQuotation", "typedMap", "namedMap", "parsePseudoImportNamed", "value", "handleNamedTokens", "postcssValueParser", "nodes", "pseudoImport", "decls", "prop", "i", "parts", "as", "keyframesParts", "defaultExport", "ops", "op", "patchBucket", "asName", "symbol", "currentSymbol", "tokens", "mainBucket", "typedBuckets", "token", "space", "spaceAfter", "isImportAs", "tryCollectImportsDeep", "resolver", "meta", "onImport", "depth", "request", "resolved", "UNIVERSAL_SYNTAX_DEFINITION", "AT_PROPERTY_DISCRIPTOR_LIST", "atPropertyValidationWarnings", "createDiagnosticReporter", "descriptorName", "descriptorType", "validateAtProperty", "atRule", "diagnostics", "name", "atPropertyValues", "node", "stripQuotation", "validateCustomPropertyName", "value", "generateScopedCSSVar", "namespace", "varName", "import_path", "PseudoImport", "PseudoImportDecl", "ImportTypeHook", "dataKey", "plugableRecord", "diagnostics", "parseImportMessages", "generalDiagnostics", "createDiagnosticReporter", "name", "as", "path", "error", "type", "hooks", "createFeature", "meta", "context", "imports", "dirContext", "node", "isImportStatement", "parsedImport", "parseStImport", "parsePseudoImport", "addImportSymbols", "atRule", "rule", "toRemove", "validateImports", "calcCssDepth", "StylablePublicApi", "stylable", "getImportStatements", "request", "defaultExport", "named", "keyframes", "cssDepth", "deepDependencies", "tryCollectImportsDeep", "depth", "data", "createImportSymbol", "importDef", "checkForInvalidAsUsage", "addSymbol", "handler", "localName", "importName", "local", "imported", "validateCustomPropertyName", "importObj", "entity", "foundUnsupportedNativeImport", "report", "origName", "resolvedSymbol", "namedDecl", "decl", "fromDecl", "getErrorText", "res", "st_namespace_exports", "__export", "defaultProcessNamespace", "diagnostics", "hooks", "parseNamespace", "setMetaNamespace", "import_path", "import_postcss_value_parser", "murmurhash3_32_gc", "key", "seed", "remainder", "bytes", "c1", "c2", "h1", "i", "k1", "h1b", "diagnostics", "createDiagnosticReporter", "dataKey", "plugableRecord", "hooks", "createFeature", "meta", "context", "atRule", "isSTNamespace", "isNamespace", "data", "diag", "match", "parseNamespace", "usedNativeNamespaceNodes", "node", "toRemove", "usedNativeNamespace", "nodes", "valueParser", "isInvalid", "namespace", "valueNode", "stripQuotation", "transformedNamespace", "string2varname", "defaultProcessNamespace", "origin", "_source", "murmurhash3_32_gc", "setMetaNamespace", "resolveNamespace", "namespaces", "filename2varname", "path", "pathToSource", "length", "i", "st_global_exports", "__export", "diagnostics", "getGlobalRules", "hooks", "unwrapPseudoGlobals", "dataKey", "plugableRecord", "diagnostics", "createDiagnosticReporter", "hooks", "createFeature", "meta", "context", "node", "topSelectorIndex", "rule", "originalNode", "rules", "ruleData", "stringifySelector", "walkSelector", "isCompRoot", "data", "isGlobal", "parent", "parentData", "ast", "selectorAst", "parseSelectorWithCache", "unwrapPseudoGlobals", "inner", "getGlobalRules", "globalRules", "checkedRule", "collectedGlobals", "flattenFunctionalSelector", "st_scope_exports", "__export", "StylablePublicApi", "diagnostics", "hooks", "isStScopeStatement", "diagnostics", "hooks", "createFeature", "context", "atRule", "analyzeRule", "isStScopeStatement", "rule", "node", "toRemove", "flattenScope", "meta", "inferredSelectorMixin", "transformer", "selector", "inferredSelector", "ast", "remove", "StylablePublicApi", "stylable", "getStScope", "scopeSelector", "scopeNestedSelector", "parseSelectorWithCache", "current", "st_var_exports", "__export", "StylablePublicApi", "diagnostics", "get", "hooks", "parseVarsFromExpr", "resolveReferencedVarNames", "import_lodash", "import_postcss_value_parser", "import_postcss_value_parser", "valueDiagnostics", "createDiagnosticReporter", "node", "argIndex", "postcssValueParser", "getNamedArgs", "args", "_sourceIndex", "_sourceEndIndex", "clone", "stringifyFunction", "name", "parsedNode", "perserveQuotes", "getFormatterArgs", "allowComments", "reportWarning", "preserveQuotes", "argsResult", "currentArg", "currentNode", "checkEmptyArg", "i", "getStringValue", "nodes", "listOptions", "groupValues", "n", "x", "divType", "grouped", "current", "last", "validateAllowedNodesUntil", "untilType", "allowed", "strategies", "named", "mixinArgsGroup", "argsDivider", "argValue", "stringifyParam", "value", "CustomValueError", "message", "fallbackValue", "box", "type", "value", "flatValue", "boxString", "unbox", "boxed", "unboxPrimitives", "customValues", "node", "customValue", "cloneDeepWith", "v", "createStArrayCustomFunction", "createCustomValue", "customTypes", "boxPrimitive", "CustomValueStrategy", "args", "index", "createStMapCustomFunction", "stTypes", "deprecatedStFunctions", "fnNode", "pathArgs", "getFormatterArgs", "outputArray", "arg", "parsedArg", "postcssValueParser", "ct", "resolvedValue", "outputMap", "s", "getNamedArgs", "prop", "space", "valueNodes", "nonComments", "valueNode", "getStringValue", "processArgs", "createValue", "flattenValue", "getValue", "localTypeSymbol", "getFlatValue", "path", "obj", "fallbackNode", "stringifiedValue", "getBoxValue", "delimiter", "parts", "isCustomValue", "symbol", "isInPath", "extendPath", "name1", "source1", "name", "source", "safePathDelimiter", "StylableResolver", "fileProcessor", "requireModule", "moduleResolver", "cache", "context", "request", "entity", "resolvedPath", "key", "cacheKey", "error", "kind", "filePath", "directoryPath", "imported", "subtype", "res", "meta", "namespace", "st_symbol_exports", "jsModule", "importSymbol", "maybeImport", "path", "resolved", "symbol", "diagnostics", "resolvedSymbols", "stTypes", "deepResolved", "customValueSymbol", "isCustomValue", "css_class_exports", "validateClassResolveExtends", "css_keyframes_exports", "result", "resolveByNamespace", "css_layer_exports", "css_contains_exports", "nameOrSymbol", "isElement", "reportError", "current", "parent", "_kind", "extend", "decl", "findRule", "rule", "createSymbolResolverWithCache", "resolver", "symbols", "type", "import_path", "import_postcss_value_parser", "import_path", "import_css_selector_tokenizer", "processDeclarationFunctions", "decl", "onFunction", "transform", "ast", "node", "findFunction", "onFunctionNode", "level", "child", "isExternal", "url", "isUrl", "maybeUrl", "isAsset", "fixRelativeUrls", "ast", "originPath", "targetPath", "decl", "processDeclarationFunctions", "node", "isAsset", "url", "path", "assureRelativeUrlPrefix", "import_cssesc", "unescapeCSS", "text", "namespaceEscape", "name", "namespace", "cssesc", "StylableEvaluator", "options", "context", "data", "processDeclarationValue", "functionDiagnostics", "createDiagnosticReporter", "resolvedValue", "message", "name", "resolveArgumentsValue", "transformer", "meta", "diagnostics", "node", "variableOverride", "path", "resolvedArgs", "k", "evalDeclarationValue", "unescapeCSS", "resolver", "getResolvedSymbols", "value", "valueHook", "Diagnostics", "passedThrough", "args", "rootArgument", "initialNode", "evaluator", "resolvedSymbols", "parsedValue", "postcssValueParser", "parsedNode", "type", "st_var_exports", "stringifyFunction", "url", "sourceDir", "assureRelativeUrlPrefix", "formatter", "formatterArgs", "getFormatterArgs", "error", "css_custom_property_exports", "nativeFunctionsDic", "preserveQuotes", "outputValue", "topLevelType", "runtimeValue", "typeError", "n", "matchingType", "unbox", "CustomValueError", "e", "invalidNode", "getStringValue", "createSymbolResolverWithCache", "import_postcss_value_parser", "diagnostics", "generalDiagnostics", "createDiagnosticReporter", "name", "alternativeName", "cyclicChain", "s", "i", "args", "type", "varName", "hooks", "createFeature", "context", "node", "rule", "isChildOfAtRule", "collectVarSymbols", "walkSelector", "toRemove", "resolved", "symbols", "getAllByType", "noDaigContext", "Diagnostics", "symbol", "evaluated", "stripQuotation", "data", "evaluateValueCall", "exports", "topLevelType", "outputValue", "unbox", "get", "meta", "UNKNOWN_LOCATION", "StylablePublicApi", "stylable", "topLevelDiagnostics", "getResolvedSymbols", "createSymbolResolverWithCache", "evaluator", "StylableEvaluator", "stVars", "computed", "localName", "resolvedVar", "runtimeValue", "computedStVar", "flatStVars", "stVar", "input", "path", "source", "currentVars", "key", "innerInput", "boxString", "parseVarsFromExpr", "expr", "nameSet", "postcssValueParser", "argNode", "decl", "warnOnDeprecatedCustomValues", "prev", "typeMatch", "addSymbol", "processDeclarationFunctions", "deprecatedStFunctions", "parsedNode", "stVarOverride", "value", "passedThrough", "parsedArgs", "strategies", "x", "restArgs", "getStringValue", "refUniqID", "createUniqID", "handleCyclicValues", "resolvedSymbols", "resolvedVarSymbol", "possibleNonSTVarSymbol", "typeError", "argsAsString", "jsValue", "deepResolve", "finalResolve", "reportUnsupportedSymbolInValue", "resolveReferencedVarNames", "initialName", "refNames", "varsToCheck", "checked", "contextualId", "refName", "resolve", "errorKind", "variable", "stringifyFunction", "st_custom_selector_exports", "__export", "CUSTOM_SELECTOR_RE", "diagnostics", "getCustomSelector", "getCustomSelectorExpended", "getCustomSelectorNames", "getCustomSelectors", "hooks", "isScoped", "transformCustomSelectorInline", "import_css_selector_parser", "diagnostics", "createDiagnosticReporter", "selector", "dataKey", "plugableRecord", "CUSTOM_SELECTOR_RE", "hooks", "createFeature", "meta", "context", "atRule", "analyzeRule", "customSelector", "ast", "parseSelectorWithCache", "isScoped", "rule", "analyzed", "name", "customSelectors", "data", "inlined", "transformInlineCustomSelectorMap", "report", "unknownSelector", "node", "toRemove", "transformCustomSelectorInline", "selectorContext", "getCustomSelectorExpended", "mappedSelectorAst", "mappedContext", "inferredSelector", "getCustomSelector", "getCustomSelectors", "acc", "getCustomSelectorNames", "options", "transformInlineCustomSelectors", "st_custom_state_exports", "__export", "createBooleanStateClassName", "createStateWithParamClassName", "delimiters", "diagnostics", "hooks", "isTemplateState", "parsePseudoStates", "parseStateValue", "resolveStateParam", "validationErrors", "systemValidators", "transformPseudoClassToCustomState", "import_postcss_value_parser", "import_cssesc", "import_css_value_parser", "findAnything", "value", "startIndex", "options", "findValueAstNode", "findFatArrow", "amountToEql", "_eqlNode", "eqlNodeInspectAmount", "findLiteral", "nextNode", "isExactLiteral", "token", "name", "findNextClassNode", "index", "amountToDot", "_dotNode", "amountToName", "nameNode", "findCustomIdent", "findNextPseudoClassNode", "amountToColon", "nameOptions", "amountToCall", "callNode", "findNextCallNode", "findPseudoElementNode", "amountToSecondColon", "node", "valueAst", "check", "stopOnFail", "ignoreWhitespace", "ignoreComments", "stopOnMatch", "stateMiddleDelimiter", "booleanStateDelimiter", "stateWithParamDelimiter", "stateDiagnostics", "createDiagnosticReporter", "name", "type", "types", "validator", "args", "stateName", "defaultValue", "errors", "actualParam", "state", "template", "finalSelector", "param", "parsePseudoStates", "value", "decl", "diagnostics", "mappedStates", "ast", "postcssValueParser", "groupValues", "workingState", "stateDefinition", "stateDefault", "validateStateName", "resolveStateType", "resolveBooleanState", "node", "reservedFunctionalPseudoClasses", "parseStateValue", "stateDef", "amountTaken", "customIdentResult", "findCustomIdent", "amountToName", "nameNode", "findNextCallNode", "postcssStateValue", "stateMap", "paramType", "argsFirstNode", "argsFullValue", "collectStateArgsDef", "defineTemplateState", "argNode", "defineParamState", "templateDef", "stripQuotation", "selectorStr", "selectorAst", "parseSelectorWithCache", "validateTemplateSelector", "paramFullDef", "paramTypeDef", "createStateParamDef", "templateStateType", "stateParamDef", "typeDef", "systemValidators", "stateType", "resolveArguments", "srcValue", "nodes", "collectedArg", "firstActualValue", "group", "listOptions", "validationErrors", "regex", "shouldContain", "length", "min", "max", "multipleOf", "options", "validators", "resolveParam", "validateDefinition", "validateValue", "res", "validatorMeta", "subValidator", "validationRes", "valid", "checkedValue", "minValue", "maxValue", "stringOptions", "isOneOf", "option", "validateRuleStateDefinition", "selector", "selectorNode", "meta", "resolver", "selectorChunk", "className", "classMeta", "css_class_exports", "states", "stateParam", "isTemplateState", "validateStateArgument", "stateAst", "resolvedValidations", "transformPseudoClassToCustomState", "stateNode", "namespace", "stringifySelector", "convertToClass", "createBooleanStateClassName", "convertToInvalid", "convertTemplateState", "resolveStateValue", "cssesc", "createStateWithParamClassName", "resolveStateParam", "escape", "result", "paramStateDef", "resolvedParam", "getParamInput", "validateParam", "strippedParam", "transformMappedStateWithParam", "inputValue", "stateParamOutput", "convertToSelector", "cssNode", "firstSelector", "unexpectedSelector", "nodeContent", "evalDeclarationValue", "diagnostics", "stateDiagnostics", "hooks", "createFeature", "delimiters", "booleanStateDelimiter", "stateMiddleDelimiter", "stateWithParamDelimiter", "st_mixin_exports", "__export", "MixinType", "StylablePublicApi", "diagnostics", "hooks", "import_postcss_value_parser", "mixinHelperDiagnostics", "valueDiagnostics", "createDiagnosticReporter", "parseStMixin", "mixinNode", "strategy", "diagnostics", "emitStrategyDiagnostics", "ast", "postcssValueParser", "mixins", "reportWarning", "diagnostic", "options", "node", "strategies", "parseStPartialMixin", "report", "mixin", "import_postcss_value_parser", "import_path", "import_css_selector_parser", "MixinType", "diagnostics", "mixinHelperDiagnostics", "utilDiagnostics", "createDiagnosticReporter", "type", "name", "mixinType", "error", "symbolType", "readableTypeMap", "circularPaths", "argName", "hooks", "createFeature", "selectorContext", "node", "isMarker", "isStMixinMarker", "context", "ast", "transformer", "path", "rule", "appendMixins", "StylablePublicApi", "stylable", "meta", "expr", "Diagnostics", "resolveOptionalArgs", "resolvedSymbols", "mainNamespace", "analyzedMixins", "collectDeclMixins", "decl", "mixinSymbolName", "result", "data", "symbolKind", "mixRef", "argValue", "varMap", "resolveChain", "getCSSMixinRoots", "mixinRoot", "names", "collectOptionalArgs", "arg", "postcssValueParser", "scopeSelector", "nestSelector", "scopeNestedSelector", "decls", "mixins", "collectRuleMixins", "mixin", "appendMixin", "mixinDecl", "paramSignature", "previousMixins", "parser", "parseStMixin", "parseStPartialMixin", "mixinRefSymbol", "get", "symbolName", "resolvedType", "partials", "r", "nonPartials", "isInPartial", "config", "checkRecursive", "handleCSSMixin", "jsValue", "handleJSMixin", "e", "report", "mixDef", "mixinFunction", "stVarOverride", "res", "v", "cssObjectToAst", "isValidDeclaration", "mixinPath", "fixRelativeUrls", "mergeRules", "isPartial", "namedArgs", "overrideKeys", "optionalArgs", "roots", "resolved", "isRootMixin", "filterPartialMixinDecl", "resolvedArgs", "resolveArgumentsValue", "mixinMeta", "overrideArg", "root", "value", "varNames", "parseVarsFromExpr", "refName", "resolveReferencedVarNames", "contextMeta", "processMixinRoot", "createSubsetAst", "getCustomSelector", "regexp", "overrideSet", "size", "text", "parent", "css_class_exports", "__export", "StylablePublicApi", "addClass", "addDevRules", "checkForScopedNodeAfter", "createSymbol", "createWarningRule", "diagnostics", "disableDirectivesForClass", "extendTypedRule", "get", "getAll", "hooks", "namespaceClass", "parseStExtends", "validateClassScoping", "getOriginDefinition", "resolved", "r", "symbol", "namespaceDelimiter", "namespace", "name", "defaultGetPackageInfo", "defaultNamespaceBuilder", "prefix", "hashSalt", "paths", "packageInfo", "defaultNoMatchHandler", "strict", "ns", "stylesheetPath", "usedByMap", "usedBy", "createNamespaceStrategy", "options", "hashFragment", "buildNamespace", "getPackageInfo", "handleNoMatch", "hashSeparator", "hashFn", "murmurhash3_32_gc", "normalizePath", "usedNamespaces", "stylesheetOriginPath", "buildNamespaceParams", "resultNs", "hashPart", "hashStr", "i", "finalNamespace", "hashSlice", "import_css_selector_parser", "import_path", "import_postcss_value_parser", "stPartDirectives", "diagnostics", "generalDiagnostics", "createDiagnosticReporter", "name", "key", "className", "directive", "alternative", "dataKey", "plugableRecord", "hooks", "createFeature", "meta", "context", "node", "rule", "stringifySelector", "addClass", "decl", "isDirectiveDeclaration", "handleDirectives", "resolvedSymbols", "locals", "localName", "resolved", "exportedClasses", "first", "symbol", "isOnlyClasses", "globalClasses", "namespace", "classNames", "unescapeCSS", "directResolve", "isLocal", "selectorContext", "originMeta", "resolver", "createSymbol", "getOriginDefinition", "validateRuleStateDefinition", "namespaceClass", "exports", "classes", "StylablePublicApi", "stylable", "localSymbol", "get", "getAll", "getAllByType", "input", "parts", "alias", "addSymbol", "wrapInGlobal", "globalMappedNodes", "convertToPseudoClass", "flatNode", "convertToSelector", "convertToClass", "namespaceEscape", "getNamespacedClass", "selector", "addDevRules", "getResolvedSymbols", "a", "b", "createWarningRule", "extendedNode", "scopedExtendedNode", "extendedFile", "extendingNode", "scopedExtendingNode", "extendingFile", "message", "validateClassScoping", "classSymbol", "locallyScoped", "reportUnscoped", "nodes", "index", "checkForScopedNodeAfter", "i", "disableDirectivesForClass", "classesDefinedWithAtSt", "type", "isSimpleSelector", "accType", "isSimple", "extendTypedRule", "parsePseudoStates", "parsed", "parseStExtends", "symbolName", "extendsRefSymbol", "getAlias", "globalSelectorAst", "parseStGlobal", "value", "typedRule", "ast", "postcssValueParser", "types", "args", "getNamedArgs", "parseSelectorWithCache", "css_type_exports", "__export", "addType", "createSymbol", "diagnostics", "get", "getAll", "hooks", "validateTypeScoping", "diagnostics", "generalDiagnostics", "createDiagnosticReporter", "name", "hooks", "createFeature", "context", "node", "rule", "_index", "_nodes", "stringifySelector", "addType", "selectorContext", "resolvedSymbols", "resolved", "resolvedClass", "createSymbol", "symbol", "meta", "getOriginDefinition", "namespaceClass", "get", "getAll", "getAllByType", "input", "parts", "isCompRoot", "alias", "addSymbol", "validateTypeScoping", "locallyScoped", "reportUnscoped", "nodes", "index", "checkForScopedNodeAfter", "css_pseudo_class_exports", "__export", "diagnostics", "hooks", "import_is_vendor_prefixed", "diagnostics", "createDiagnosticReporter", "name", "hooks", "createFeature", "context", "selectorContext", "inferredSelector", "node", "ruleOrAtRule", "scopeSelectorAst", "inferredState", "foundCustomState", "transformPseudoClassToCustomState", "createSymbol", "hasSubSelectors", "innerSelectors", "nestedContext", "prevNode", "nativePseudoClasses", "isVendorPrefixed", "css_custom_property_exports", "__export", "StylablePublicApi", "addCSSProperty", "diagnostics", "get", "getRuntimeTypedDefinitionNames", "getTransformedName", "hooks", "scopeCSSVar", "transformPropertyIdent", "GLOBAL_FUNC", "globalValueRegExp", "globalValue", "str", "globalValueFromFunctionNode", "funcNode", "unknownInput", "type", "value", "import_postcss_value_parser", "diagnostics", "atPropertyValidationWarnings", "createDiagnosticReporter", "name", "GLOBAL_FUNC", "dataKey", "plugableRecord", "hooks", "createFeature", "meta", "context", "symbolName", "symbol", "getAllByType", "validateCustomPropertyName", "importSymbol", "get", "addCSSProperty", "atRule", "isStylable", "global", "globalVarName", "globalValue", "stCustomGlobalProperty", "typedDefinitions", "validateAtProperty", "analyzeDeprecatedStGlobalCustomProperty", "decl", "analyzeDeclValueVarCalls", "node", "toRemove", "getResolvedSymbols", "customPropsMapping", "resolvedSymbols", "localVarName", "localSymbol", "resolve", "resolveFinalSymbol", "getTransformedName", "resolved", "propName", "value", "varWithPrefix", "transformPropertyIdent", "stringifyFunction", "exports", "varName", "final", "alias", "addSymbol", "UNKNOWN_LOCATION", "StylablePublicApi", "stylable", "results", "topLevelDiagnostics", "Diagnostics", "createSymbolResolverWithCache", "cssVar", "defAst", "getSymbolAstNode", "postcssValueParser", "validateAllowedNodesUntil", "args", "cssVarsByComma", "s", "entry", "getRuntimeTypedDefinitionNames", "generateScopedCSSVar", "scopeCSSVar", "resolver", "importedVar", "css_keyframes_exports", "__export", "diagnostics", "get", "getAll", "getKeyframesStatements", "hooks", "reservedKeyFrames", "import_postcss_value_parser", "reservedKeyFrames", "diagnostics", "createDiagnosticReporter", "GLOBAL_FUNC", "name", "path", "dataKey", "plugableRecord", "ImportTypeHook", "context", "localName", "importName", "importDef", "addKeyframes", "hooks", "createFeature", "meta", "atRule", "isInConditionalGroup", "keyframesAsts", "isStylable", "global", "globalName", "globalValue", "symbols", "getAllByType", "resolved", "resolvedSymbols", "symbol", "res", "resolve", "getTransformedName", "namespace", "decl", "parsed", "postcssValueParser", "node", "scoped", "exports", "getKeyframesStatements", "data", "statements", "get", "getAll", "ast", "safeRedeclare", "addKeyframesDeclaration", "addSymbol", "origin", "isImported", "current", "paths", "imports", "isFirstInPath", "isImportedBefore", "css_layer_exports", "__export", "diagnostics", "get", "getAll", "getDefinition", "hooks", "import_postcss_value_parser", "diagnostics", "createDiagnosticReporter", "GLOBAL_FUNC", "name", "path", "dataKey", "plugableRecord", "ImportTypeHook", "context", "localName", "importName", "importDef", "addLayer", "hooks", "createFeature", "meta", "atRule", "analyzeCSSImportLayer", "analyzeMetaData", "analyzedParams", "parseLayerParams", "symbols", "getAllByType", "resolved", "resolvedSymbols", "symbol", "res", "transformCSSImportLayer", "analyzed", "getTransformedName", "exports", "get", "getAll", "getDefinition", "params", "report", "isStylable", "names", "globals", "readyForName", "multiple", "ast", "valueParser", "namedNodeRefs", "i", "node", "type", "value", "layers", "getDotSeparatedNames", "splittedLayer", "globalName", "globalValueFromFunctionNode", "source", "nodes", "transformedName", "modifiedNode", "lastIndex", "index", "importAtRule", "nestedNode", "_context", "namespace", "global", "definedSymbol", "CSSWideKeywords", "addSymbol", "css_contains_exports", "__export", "diagnostics", "get", "getAll", "getDefinition", "hooks", "import_postcss_value_parser", "diagnostics", "createDiagnosticReporter", "value", "name", "path", "GLOBAL_FUNC", "def", "dataKey", "plugableRecord", "ImportTypeHook", "context", "localName", "importName", "importDef", "addContainer", "hooks", "createFeature", "meta", "decl", "prop", "bucket", "parsed", "parseContainerDecl", "global", "atRule", "ast", "valueParser", "searchForContainerName", "searchForLogicalOp", "node", "globalValueFromFunctionNode", "queryNode", "addCSSProperty", "logicalOpNames", "invalidContainerNames", "symbols", "getAllByType", "resolved", "resolvedSymbols", "symbol", "res", "getTransformedName", "changed", "search", "resolve", "globalName", "wordNode", "transformPropertyIdent", "exports", "containers", "namedNodeRefs", "noneFound", "checkNextName", "type", "word", "nextExpected", "nodes", "transformedName", "modifiedNode", "get", "getAll", "getDefinition", "definitions", "namespace", "forceDefinition", "isFirst", "addSymbol", "css_media_exports", "__export", "hooks", "hooks", "createFeature", "atRule", "context", "st_structure_exports", "__export", "createPartSymbol", "diagnostics", "experimentalMsg", "getPart", "getPartNames", "getParts", "hooks", "isStructureMode", "setPart", "valueMaps", "valueOnThisPrefix", "setFieldForDeprecation", "object", "fieldName", "options", "objectPrefix", "alternative", "enumerable", "fieldOnThis", "warnOnce", "newValue", "warnsFlag", "isWarnOn", "warnOnce", "warning", "ignoreDeprecationWarn", "action", "import_css_value_parser", "import_css_selector_parser", "diagnostics", "createDiagnosticReporter", "type", "src", "params", "extraValue", "experimentalMsg", "dataKey", "plugableRecord", "hooks", "createFeature", "context", "meta", "node", "isStAtRule", "warnOnce", "metaAnalysis", "rootSymbol", "addClass", "atRule", "analyzeRule", "analyzedDefToPartSymbol", "declaredClasses", "analyzed", "analyzeStAtRule", "disableDirectivesForClass", "extendedSymbol", "get", "extendTypedRule", "getAlias", "globalNode", "findGlobalPseudo", "mappedSelectorAst", "postcss_default", "parentSymbol", "getPartParentSymbol", "partName", "getPart", "srcWord", "partSymbol", "setPart", "getSymbolId", "mappedStates", "stateName", "isStructureMode", "customSelectors", "getCustomSelectors", "classes", "getAll", "rootClass", "rootId", "mapTo", "className", "classSymbol", "parentAnalyze", "createPartSymbol", "input", "parts", "states", "symbol", "parentId", "getParts", "name", "getPartNames", "isMatch", "result", "analyzedDefs", "atRuleFullParams", "def", "parseClassDefinition", "parsePseudoElementDefinition", "parseStateDefinition", "validateTopLevelClass", "validatePart", "validateState", "unexpectedValue", "arrowEnd", "i", "isExactLiteral", "validateNestingInMapping", "amountToActualValue", "findAnything", "checkAfter", "foundUnexpectedSelector", "index", "amountToName", "nameNode", "findNextPseudoClassNode", "parentRule", "amountToStateDef", "stateDef", "parseStateValue", "amountTaken", "amountToUnexpected", "nameInspectAmount", "findPseudoElementNode", "amountToMapping", "mappingOpenNode", "mapArrowInspectAmount", "findFatArrow", "selectorStr", "mappedSelectors", "parseSelectorWithCache", "filteredSelector", "filterCommentsAndSpaces", "amountToClass", "classNameNode", "classInspectedAmount", "findNextClassNode", "amountToExtends", "extendsNode", "extendInspectAmount", "_node", "nodes", "amountToFatArrow", "amountToExtendedClass", "amountToUnexpectedNode", "selector", "invalid", "passedActualSelector", "walkSelector", "afterName", "between", "features", "st_symbol_exports", "st_import_exports", "st_namespace_exports", "st_global_exports", "st_scope_exports", "st_var_exports", "st_custom_selector_exports", "st_custom_state_exports", "st_mixin_exports", "css_class_exports", "css_type_exports", "css_pseudo_class_exports", "css_custom_property_exports", "css_keyframes_exports", "css_layer_exports", "css_contains_exports", "st_structure_exports", "StylableMeta", "sourceAst", "diagnostics", "flags", "getSourcePath", "context", "hooks", "name", "StylableProcessor", "diagnostics", "Diagnostics", "resolveNamespace", "st_namespace_exports", "flags", "defaultFeatureFlags", "root", "StylableMeta", "st_structure_exports", "st_import_exports", "css_custom_property_exports", "rule", "isChildOfAtRule", "decl", "css_class_exports", "css_contains_exports", "st_custom_selector_exports", "st_symbol_exports", "analyzeRule", "isScoped", "originalNode", "atRule", "css_keyframes_exports", "css_layer_exports", "st_scope_exports", "processDeclarationFunctions", "node", "reportUnscoped", "selectorAst", "parseSelectorWithCache", "locallyScoped", "topSelectorIndex", "walkSelector", "nodeContext", "index", "nodes", "parents", "isInPseudoClassContext", "walkSkip", "st_global_exports", "st_var_exports", "knownPseudoClassesWithNestedSelectors", "css_type_exports", "generalDiagnostics", "stringifySelector", "processNamespace", "createStylableFileProcessor", "fileSystem", "onProcess", "resolveNamespace", "cssParser", "parse", "cache", "createDiagnostics", "flags", "defaultFeatureFlags", "cachedProcessFile", "from", "content", "StylableProcessor", "resolvedPath", "import_is_vendor_prefixed", "isEqual", "value1", "value2", "i", "keys1", "keys2", "key", "import_css_selector_parser", "setFieldForDeprecation", "Rule", "getRuleScopeSelector", "rule", "ignoreDeprecationWarn", "transformerDiagnostics", "createDiagnosticReporter", "name", "StylableTransformer", "options", "StylableResolver", "createSymbolResolverWithCache", "StylableEvaluator", "meta", "context", "st_import_exports", "st_global_exports", "validateScopes", "result", "ast", "metaExports", "stVarOverride", "path", "mixinTransform", "inferredSelectorMixin", "evaluator", "prevStVarOverride", "transformContext", "transformResolveOptions", "prepareAST", "cssClassResolve", "css_class_exports", "stVarResolve", "st_var_exports", "keyframesResolve", "css_keyframes_exports", "layerResolve", "css_layer_exports", "containsResolve", "css_contains_exports", "cssVarsMapping", "css_custom_property_exports", "handleAtRule", "atRule", "css_media_exports", "st_scope_exports", "st_custom_selector_exports", "handleDeclaration", "decl", "validateCustomPropertyName", "node", "isChildOfAtRule", "currentParent", "selector", "inferredSelector", "lastPassParams", "st_mixin_exports", "originMeta", "selectorNode", "inferredNestSelector", "inferredMixinSelector", "unwrapGlobals", "parseSelectorWithCache", "rule", "targetSelectorAst", "stringifySelector", "selectorAst", "selectorStr", "selectorNest", "selectorMixin", "ScopeContext", "type", "resolved", "InferredSelector", "selectorList", "compoundNode", "css_type_exports", "targetAst", "i", "transformerContext", "inferredElement", "nativePseudoElements", "isVendorPrefixed", "css_pseudo_class_exports", "transformer", "transformedScopes", "scope", "len", "ruleReports", "code", "message", "severity", "word", "removeInitialCompoundMarker", "structureMode", "hadCompoundStart", "compoundedSelector", "first", "matchNode", "_InferredSelector", "api", "resolve", "partResolve", "newSet", "searchedName", "collectedStates", "resolvedCount", "expectedIntersectionCount", "addInferredState", "state", "existing", "isEqual", "resolvedContext", "resolvedFoundNames", "symbol", "states", "resultStates", "InferredState", "isFirstInSelector", "experimentalSelectorInference", "collectedElements", "checked", "addInferredElement", "inferred", "selectors", "item", "startIndex", "st_structure_exports", "cacheContext", "uniqueId", "partDef", "cloneSelector", "r", "createCombinatorSelector", "internalContext", "customAstSelectors", "resolvedPart", "resolvedBaseSymbol", "getOriginDefinition", "nodes", "classNode", "resultElements", "InferredElement", "target", "targetBaseElementSymbol", "tested", "testedBaseElementSymbol", "SelectorMultiplier", "selectorIndex", "nodeIndex", "targetSelectors", "insertionPoints", "duplicationList", "added", "replaceSelector", "originSelector", "dupSelector", "addedSelector", "_ScopeContext", "resolver", "ruleOrAtRule", "scopeSelectorAst", "inferredSelectorNest", "inferredSelectorContext", "inferredContext", "isFirstNode", "selectorContext", "ctx", "transformedScope", "getRuleScopeSelector", "currentCompoundSelector", "stScopeSelectorCompounded", "scopeNode", "toRemove", "input", "st_namespace_exports", "removeOrNode", "hasOwnProperty", "defaultPackageRoots", "defaultExtensions", "defaultConditions", "isRelative", "request", "PACKAGE_JSON", "statsNoThrowOptions", "createRequestResolver", "options", "statSync", "readFileSync", "realpathSync", "dirname", "join", "resolve", "isAbsolute", "packageRoots", "extensions", "conditions", "resolvedPacakgesCache", "alias", "fallback", "nativeRealPathSync", "exportConditions", "targetsBrowser", "targetsEsm", "loadPackageJsonFromCached", "wrapWithCache", "loadPackageJsonFrom", "remapUsingAlias", "createRequestRemapper", "remapUsingFallback", "requestResolver", "contextPath", "originalRequest", "visitedPaths", "requestsToTry", "resolvedFilePath", "nodeRequestPaths", "statSyncSafe", "realResolvedFilePath", "realpathSyncSafe", "toPackageJson", "findUpPackageJson", "remappedFilePath", "requestAlias", "emittedCandidate", "fromPackageJson", "remappedRequest", "requestFallback", "requestPath", "fileRequestPaths", "directoryRequestPaths", "packageRequestPaths", "filePath", "ext", "fileOrDirIndexRequestPaths", "targetPath", "directoryPath", "resolvedPackageJson", "initialPath", "packageName", "innerPath", "parsePackageSpecifier", "ownPackageJson", "matchedValue", "matchConditionsField", "packagesPath", "packageRootsToPaths", "packageDirectoryPath", "requestInPackages", "conditionsValue", "hasPatternMatch", "exactMatchExports", "exactMatchValue", "matchExportConditions", "matchedPattern", "matchSubpathPatterns", "packageRoot", "pathChainToRoot", "packageJsonPath", "packageJson", "readJsonFileSyncSafe", "mainField", "moduleField", "browserField", "browserMappings", "from", "to", "resolvedFrom", "resolveRelative", "resolvedTo", "resolveRemappedRequest", "desugerifiedExports", "hasPatternExports", "desugarifyExportsField", "hasPatternImports", "key", "path", "stackTraceLimit", "itemPath", "currentPath", "lastPath", "fn", "cache", "result", "mapping", "parsedTemplateMap", "hasTemplate", "value", "parsedKey", "parsedValue", "getFromParsedTemplateMap", "map", "keyType", "keyPrefix", "specifier", "firstSlashIdx", "secondSlashIdx", "packageExports", "conditionValue", "arrayItem", "exportedSubpaths", "matchedValues", "patternKey", "patternValue", "keyStarIdx", "keySuffix", "starReplacement", "valueToMatch", "createDefaultResolver", "options", "resolver", "createRequestResolver", "directoryPath", "request", "resolvedFile", "visitedPaths", "visitMetaCSSDependencies", "meta", "resolver", "visited", "q", "depth", "index", "items", "imported", "res", "resolvedPath", "Stylable", "config", "st_import_exports", "st_scope_exports", "css_custom_property_exports", "st_var_exports", "st_mixin_exports", "css_class_exports", "Diagnostics", "warnOnce", "parse", "defaultFeatureFlags", "createStylableFileProcessor", "createDefaultResolver", "meta", "dependencies", "dependency", "visitMetaCSSDependencies", "filter", "key", "cacheEntity", "requireModule", "resolverCache", "resolvePath", "StylableResolver", "resolveNamespace", "StylableProcessor", "options", "StylableTransformer", "pathOrMeta", "selector", "r", "prop", "value", "decl", "root", "rule", "ast", "fullPath", "overrideSrc", "directoryPath", "request", "noCollisionNamespace", "prefix", "usedNamespaces", "namespace", "stylesheetPath", "ns", "used", "generateStylableJSModuleSource", "moduleOptions", "injectOptions", "namespace", "imports", "jsExports", "moduleType", "runtimeRequest", "varType", "header", "footer", "classes", "keyframes", "layers", "containers", "stVars", "vars", "exportKind", "moduleRequest", "runtimeImport", "runtimeExecuteInject", "from", "defaultImport", "request", "importInjectCSS", "id", "css", "cssCode", "depthCode", "depth", "runtimeId", "out"]
}
