%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/specpages-backup/node_modules/less/lib/less/tree/
Upload File :
Create Path :
Current File : /www/specpages-backup/node_modules/less/lib/less/tree/ruleset.js.map

{"version":3,"file":"ruleset.js","sourceRoot":"","sources":["../../../src/less/tree/ruleset.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,8DAAwC;AACxC,sDAAgC;AAChC,sDAAgC;AAChC,kDAA4B;AAC5B,wDAAkC;AAClC,sDAAgC;AAChC,0DAAoC;AACpC,yDAAmC;AACnC,qFAAoE;AACpE,iEAA+C;AAC/C,4DAAwC;AACxC,8CAAkC;AAElC,IAAM,OAAO,GAAG,UAAS,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc;IACpE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACnB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACnC,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAEtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC,CAAA;AAED,OAAO,CAAC,SAAS,GAAG,IAAI,cAAI,EAAE,CAAC;AAE/B,OAAO,CAAC,SAAS,CAAC,aAAa,GAAG;IAC9B,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,UAAS,OAAO;IACvC,IAAI,IAAI,CAAC,KAAK,EAAE;Q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AC,cAAc,CAAC,CAAC;QACpH,WAAW,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC/C,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,4BAA4B;IAC5B,IAAI,CAAC,CAAC;IAEN,IAAI,QAAQ,CAAC;IACb,IAAI,iBAAiB,CAAC;IAEtB,QAAQ,GAAG,EAAE,CAAC;IACd,iBAAiB,GAAG,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEvE,IAAI,CAAC,iBAAiB,EAAE;QACpB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACpB,QAAQ,GAAG,EAAE,CAAC;YACd,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAEjC,IAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;gBAE1F,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC5B,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;aAC/B;SACJ;aACI;YACD,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC3B;KACJ;IAED,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;AACL,CAAC,CAAC;AAEF,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC;AACnC,OAAO,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC;AACnC,kBAAe,OAAO,CAAC","sourcesContent":["import Node from './node';\nimport Declaration from './declaration';\nimport Keyword from './keyword';\nimport Comment from './comment';\nimport Paren from './paren';\nimport Selector from './selector';\nimport Element from './element';\nimport Anonymous from './anonymous';\nimport contexts from '../contexts';\nimport globalFunctionRegistry from '../functions/function-registry';\nimport defaultFunc from '../functions/default';\nimport getDebugInfo from './debug-info';\nimport * as utils from '../utils';\n\nconst Ruleset = function(selectors, rules, strictImports, visibilityInfo) {\n    this.selectors = selectors;\n    this.rules = rules;\n    this._lookups = {};\n    this._variables = null;\n    this._properties = null;\n    this.strictImports = strictImports;\n    this.copyVisibilityInfo(visibilityInfo);\n    this.allowRoot = true;\n\n    this.setParent(this.selectors, this);\n    this.setParent(this.rules, this);\n}\n\nRuleset.prototype = new Node();\n\nRuleset.prototype.isRulesetLike = function() {\n    return true;\n};\n\nRuleset.prototype.accept = function(visitor) {\n    if (this.paths) {\n        this.paths = visitor.visitArray(this.paths, true);\n    } else if (this.selectors) {\n        this.selectors = visitor.visitArray(this.selectors);\n    }\n    if (this.rules && this.rules.length) {\n        this.rules = visitor.visitArray(this.rules);\n    }\n};\n\nRuleset.prototype.eval = function(context) {\n    const that = this;\n    let selectors;\n    let selCnt;\n    let selector;\n    let i;\n    let hasVariable;\n    let hasOnePassingSelector = false;\n\n    if (this.selectors && (selCnt = this.selectors.length)) {\n        selectors = new Array(selCnt);\n        defaultFunc.error({\n            type: 'Syntax',\n            message: 'it is currently only allowed in parametric mixin guards,'\n        });\n\n        for (i = 0; i < selCnt; i++) {\n            selector = this.selectors[i].eval(context);\n            for (var j = 0; j < selector.elements.length; j++) {\n                if (selector.elements[j].isVariable) {\n                    hasVariable = true;\n                    break;\n                }\n            }\n            selectors[i] = selector;\n            if (selector.evaldCondition) {\n                hasOnePassingSelector = true;\n            }\n        }\n\n        if (hasVariable) {\n            const toParseSelectors = new Array(selCnt);\n            for (i = 0; i < selCnt; i++) {\n                selector = selectors[i];\n                toParseSelectors[i] = selector.toCSS(context);\n            }\n            this.parse.parseNode(\n                toParseSelectors.join(','),\n                [\"selectors\"], \n                selectors[0].getIndex(), \n                selectors[0].fileInfo(), \n                (err, result) => {\n                    if (result) {\n                        selectors = utils.flattenArray(result);\n                    }\n                });\n        }\n\n        defaultFunc.reset();\n    } else {\n        hasOnePassingSelector = true;\n    }\n\n    let rules = this.rules ? utils.copyArray(this.rules) : null;\n    const ruleset = new Ruleset(selectors, rules, this.strictImports, this.visibilityInfo());\n    let rule;\n    let subRule;\n\n    ruleset.originalRuleset = this;\n    ruleset.root = this.root;\n    ruleset.firstRoot = this.firstRoot;\n    ruleset.allowImports = this.allowImports;\n\n    if (this.debugInfo) {\n        ruleset.debugInfo = this.debugInfo;\n    }\n\n    if (!hasOnePassingSelector) {\n        rules.length = 0;\n    }\n\n    // inherit a function registry from the frames stack when possible;\n    // otherwise from the global registry\n    ruleset.functionRegistry = (frames => {\n        let i = 0;\n        const n = frames.length;\n        let found;\n        for ( ; i !== n ; ++i ) {\n            found = frames[ i ].functionRegistry;\n            if ( found ) { return found; }\n        }\n        return globalFunctionRegistry;\n    })(context.frames).inherit();\n\n    // push the current ruleset to the frames stack\n    const ctxFrames = context.frames;\n    ctxFrames.unshift(ruleset);\n\n    // currrent selectors\n    let ctxSelectors = context.selectors;\n    if (!ctxSelectors) {\n        context.selectors = ctxSelectors = [];\n    }\n    ctxSelectors.unshift(this.selectors);\n\n    // Evaluate imports\n    if (ruleset.root || ruleset.allowImports || !ruleset.strictImports) {\n        ruleset.evalImports(context);\n    }\n\n    // Store the frames around mixin definitions,\n    // so they can be evaluated like closures when the time comes.\n    const rsRules = ruleset.rules;\n    for (i = 0; (rule = rsRules[i]); i++) {\n        if (rule.evalFirst) {\n            rsRules[i] = rule.eval(context);\n        }\n    }\n\n    const mediaBlockCount = (context.mediaBlocks && context.mediaBlocks.length) || 0;\n\n    // Evaluate mixin calls.\n    for (i = 0; (rule = rsRules[i]); i++) {\n        if (rule.type === 'MixinCall') {\n            /* jshint loopfunc:true */\n            rules = rule.eval(context).filter(r => {\n                if ((r instanceof Declaration) && r.variable) {\n                    // do not pollute the scope if the variable is\n                    // already there. consider returning false here\n                    // but we need a way to \"return\" variable from mixins\n                    return !(ruleset.variable(r.name));\n                }\n                return true;\n            });\n            rsRules.splice(...[i, 1].concat(rules));\n            i += rules.length - 1;\n            ruleset.resetCache();\n        } else if (rule.type ===  'VariableCall') {\n            /* jshint loopfunc:true */\n            rules = rule.eval(context).rules.filter(r => {\n                if ((r instanceof Declaration) && r.variable) {\n                    // do not pollute the scope at all\n                    return false;\n                }\n                return true;\n            });\n            rsRules.splice(...[i, 1].concat(rules));\n            i += rules.length - 1;\n            ruleset.resetCache();\n        }\n    }\n\n    // Evaluate everything else\n    for (i = 0; (rule = rsRules[i]); i++) {\n        if (!rule.evalFirst) {\n            rsRules[i] = rule = rule.eval ? rule.eval(context) : rule;\n        }\n    }\n\n    // Evaluate everything else\n    for (i = 0; (rule = rsRules[i]); i++) {\n        // for rulesets, check if it is a css guard and can be removed\n        if (rule instanceof Ruleset && rule.selectors && rule.selectors.length === 1) {\n            // check if it can be folded in (e.g. & where)\n            if (rule.selectors[0] && rule.selectors[0].isJustParentSelector()) {\n                rsRules.splice(i--, 1);\n\n                for (var j = 0; (subRule = rule.rules[j]); j++) {\n                    if (subRule instanceof Node) {\n                        subRule.copyVisibilityInfo(rule.visibilityInfo());\n                        if (!(subRule instanceof Declaration) || !subRule.variable) {\n                            rsRules.splice(++i, 0, subRule);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    // Pop the stack\n    ctxFrames.shift();\n    ctxSelectors.shift();\n\n    if (context.mediaBlocks) {\n        for (i = mediaBlockCount; i < context.mediaBlocks.length; i++) {\n            context.mediaBlocks[i].bubbleSelectors(selectors);\n        }\n    }\n\n    return ruleset;\n};\n\nRuleset.prototype.evalImports = function(context) {\n    const rules = this.rules;\n    let i;\n    let importRules;\n    if (!rules) { return; }\n\n    for (i = 0; i < rules.length; i++) {\n        if (rules[i].type === 'Import') {\n            importRules = rules[i].eval(context);\n            if (importRules && (importRules.length || importRules.length === 0)) {\n                rules.splice(...[i, 1].concat(importRules));\n                i += importRules.length - 1;\n            } else {\n                rules.splice(i, 1, importRules);\n            }\n            this.resetCache();\n        }\n    }\n};\n\nRuleset.prototype.makeImportant = function() {\n    const result = new Ruleset(this.selectors, this.rules.map(r => {\n        if (r.makeImportant) {\n            return r.makeImportant();\n        } else {\n            return r;\n        }\n    }), this.strictImports, this.visibilityInfo());\n\n    return result;\n};\n\nRuleset.prototype.matchArgs = function(args) {\n    return !args || args.length === 0;\n};\n\n// lets you call a css selector with a guard\nRuleset.prototype.matchCondition = function(args, context) {\n    const lastSelector = this.selectors[this.selectors.length - 1];\n    if (!lastSelector.evaldCondition) {\n        return false;\n    }\n    if (lastSelector.condition &&\n        !lastSelector.condition.eval(\n            new contexts.Eval(context,\n                context.frames))) {\n        return false;\n    }\n    return true;\n};\n\nRuleset.prototype.resetCache = function() {\n    this._rulesets = null;\n    this._variables = null;\n    this._properties = null;\n    this._lookups = {};\n};\n\nRuleset.prototype.variables = function() {\n    if (!this._variables) {\n        this._variables = !this.rules ? {} : this.rules.reduce((hash, r) => {\n            if (r instanceof Declaration && r.variable === true) {\n                hash[r.name] = r;\n            }\n            // when evaluating variables in an import statement, imports have not been eval'd\n            // so we need to go inside import statements.\n            // guard against root being a string (in the case of inlined less)\n            if (r.type === 'Import' && r.root && r.root.variables) {\n                const vars = r.root.variables();\n                for (const name in vars) {\n                    if (vars.hasOwnProperty(name)) {\n                        hash[name] = r.root.variable(name);\n                    }\n                }\n            }\n            return hash;\n        }, {});\n    }\n    return this._variables;\n};\n\nRuleset.prototype.properties = function() {\n    if (!this._properties) {\n        this._properties = !this.rules ? {} : this.rules.reduce((hash, r) => {\n            if (r instanceof Declaration && r.variable !== true) {\n                const name = (r.name.length === 1) && (r.name[0] instanceof Keyword) ?\n                    r.name[0].value : r.name;\n                // Properties don't overwrite as they can merge\n                if (!hash[`$${name}`]) {\n                    hash[`$${name}`] = [ r ];\n                }\n                else {\n                    hash[`$${name}`].push(r);\n                }\n            }\n            return hash;\n        }, {});\n    }\n    return this._properties;\n};\n\nRuleset.prototype.variable = function(name) {\n    const decl = this.variables()[name];\n    if (decl) {\n        return this.parseValue(decl);\n    }\n};\n\nRuleset.prototype.property = function(name) {\n    const decl = this.properties()[name];\n    if (decl) {\n        return this.parseValue(decl);\n    }\n};\n\nRuleset.prototype.lastDeclaration = function() {\n    for (let i = this.rules.length; i > 0; i--) {\n        const decl = this.rules[i - 1];\n        if (decl instanceof Declaration) {\n            return this.parseValue(decl);\n        }\n    }\n};\n\nRuleset.prototype.parseValue = function(toParse) {\n    const self = this;\n    function transformDeclaration(decl) {\n        if (decl.value instanceof Anonymous && !decl.parsed) {\n            if (typeof decl.value.value === 'string') {\n                this.parse.parseNode(\n                    decl.value.value,\n                    ['value', 'important'], \n                    decl.value.getIndex(), \n                    decl.fileInfo(), \n                    (err, result) => {\n                        if (err) {\n                            decl.parsed = true;\n                        }\n                        if (result) {\n                            decl.value = result[0];\n                            decl.important = result[1] || '';\n                            decl.parsed = true;\n                        }\n                    });\n            } else {\n                decl.parsed = true;\n            }\n\n            return decl;\n        }\n        else {\n            return decl;\n        }\n    }\n    if (!Array.isArray(toParse)) {\n        return transformDeclaration.call(self, toParse);\n    }\n    else {\n        const nodes = [];\n        toParse.forEach(n => {\n            nodes.push(transformDeclaration.call(self, n));\n        });\n        return nodes;\n    }\n};\n\nRuleset.prototype.rulesets = function() {\n    if (!this.rules) { return []; }\n\n    const filtRules = [];\n    const rules = this.rules;\n    let i;\n    let rule;\n\n    for (i = 0; (rule = rules[i]); i++) {\n        if (rule.isRuleset) {\n            filtRules.push(rule);\n        }\n    }\n\n    return filtRules;\n};\n\nRuleset.prototype.prependRule = function(rule) {\n    const rules = this.rules;\n    if (rules) {\n        rules.unshift(rule);\n    } else {\n        this.rules = [ rule ];\n    }\n    this.setParent(rule, this);\n};\n\nRuleset.prototype.find = function(selector, self = this, filter) {\n    const rules = [];\n    let match;\n    let foundMixins;\n    const key = selector.toCSS();\n\n    if (key in this._lookups) { return this._lookups[key]; }\n\n    this.rulesets().forEach(rule => {\n        if (rule !== self) {\n            for (let j = 0; j < rule.selectors.length; j++) {\n                match = selector.match(rule.selectors[j]);\n                if (match) {\n                    if (selector.elements.length > match) {\n                        if (!filter || filter(rule)) {\n                            foundMixins = rule.find(new Selector(selector.elements.slice(match)), self, filter);\n                            for (let i = 0; i < foundMixins.length; ++i) {\n                                foundMixins[i].path.push(rule);\n                            }\n                            Array.prototype.push.apply(rules, foundMixins);\n                        }\n                    } else {\n                        rules.push({ rule, path: []});\n                    }\n                    break;\n                }\n            }\n        }\n    });\n    this._lookups[key] = rules;\n    return rules;\n};\n\nRuleset.prototype.genCSS = function(context, output) {\n    let i;\n    let j;\n    const charsetRuleNodes = [];\n    let ruleNodes = [];\n\n    let // Line number debugging\n        debugInfo;\n\n    let rule;\n    let path;\n\n    context.tabLevel = (context.tabLevel || 0);\n\n    if (!this.root) {\n        context.tabLevel++;\n    }\n\n    const tabRuleStr = context.compress ? '' : Array(context.tabLevel + 1).join('  ');\n    const tabSetStr = context.compress ? '' : Array(context.tabLevel).join('  ');\n    let sep;\n\n    let charsetNodeIndex = 0;\n    let importNodeIndex = 0;\n    for (i = 0; (rule = this.rules[i]); i++) {\n        if (rule instanceof Comment) {\n            if (importNodeIndex === i) {\n                importNodeIndex++;\n            }\n            ruleNodes.push(rule);\n        } else if (rule.isCharset && rule.isCharset()) {\n            ruleNodes.splice(charsetNodeIndex, 0, rule);\n            charsetNodeIndex++;\n            importNodeIndex++;\n        } else if (rule.type === 'Import') {\n            ruleNodes.splice(importNodeIndex, 0, rule);\n            importNodeIndex++;\n        } else {\n            ruleNodes.push(rule);\n        }\n    }\n    ruleNodes = charsetRuleNodes.concat(ruleNodes);\n\n    // If this is the root node, we don't render\n    // a selector, or {}.\n    if (!this.root) {\n        debugInfo = getDebugInfo(context, this, tabSetStr);\n\n        if (debugInfo) {\n            output.add(debugInfo);\n            output.add(tabSetStr);\n        }\n\n        const paths = this.paths;\n        const pathCnt = paths.length;\n        let pathSubCnt;\n\n        sep = context.compress ? ',' : (`,\\n${tabSetStr}`);\n\n        for (i = 0; i < pathCnt; i++) {\n            path = paths[i];\n            if (!(pathSubCnt = path.length)) { continue; }\n            if (i > 0) { output.add(sep); }\n\n            context.firstSelector = true;\n            path[0].genCSS(context, output);\n\n            context.firstSelector = false;\n            for (j = 1; j < pathSubCnt; j++) {\n                path[j].genCSS(context, output);\n            }\n        }\n\n        output.add((context.compress ? '{' : ' {\\n') + tabRuleStr);\n    }\n\n    // Compile rules and rulesets\n    for (i = 0; (rule = ruleNodes[i]); i++) {\n\n        if (i + 1 === ruleNodes.length) {\n            context.lastRule = true;\n        }\n\n        const currentLastRule = context.lastRule;\n        if (rule.isRulesetLike(rule)) {\n            context.lastRule = false;\n        }\n\n        if (rule.genCSS) {\n            rule.genCSS(context, output);\n        } else if (rule.value) {\n            output.add(rule.value.toString());\n        }\n\n        context.lastRule = currentLastRule;\n\n        if (!context.lastRule && rule.isVisible()) {\n            output.add(context.compress ? '' : (`\\n${tabRuleStr}`));\n        } else {\n            context.lastRule = false;\n        }\n    }\n\n    if (!this.root) {\n        output.add((context.compress ? '}' : `\\n${tabSetStr}}`));\n        context.tabLevel--;\n    }\n\n    if (!output.isEmpty() && !context.compress && this.firstRoot) {\n        output.add('\\n');\n    }\n};\n\nRuleset.prototype.joinSelectors = function(paths, context, selectors) {\n    for (let s = 0; s < selectors.length; s++) {\n        this.joinSelector(paths, context, selectors[s]);\n    }\n};\n\nRuleset.prototype.joinSelector = function(paths, context, selector) {\n    function createParenthesis(elementsToPak, originalElement) {\n        let replacementParen;\n        let j;\n        if (elementsToPak.length === 0) {\n            replacementParen = new Paren(elementsToPak[0]);\n        } else {\n            const insideParent = new Array(elementsToPak.length);\n            for (j = 0; j < elementsToPak.length; j++) {\n                insideParent[j] = new Element(\n                    null,\n                    elementsToPak[j],\n                    originalElement.isVariable,\n                    originalElement._index,\n                    originalElement._fileInfo\n                );\n            }\n            replacementParen = new Paren(new Selector(insideParent));\n        }\n        return replacementParen;\n    }\n\n    function createSelector(containedElement, originalElement) {\n        let element;\n        let selector;\n        element = new Element(null, containedElement, originalElement.isVariable, originalElement._index, originalElement._fileInfo);\n        selector = new Selector([element]);\n        return selector;\n    }\n\n    // joins selector path from `beginningPath` with selector path in `addPath`\n    // `replacedElement` contains element that is being replaced by `addPath`\n    // returns concatenated path\n    function addReplacementIntoPath(beginningPath, addPath, replacedElement, originalSelector) {\n        let newSelectorPath;\n        let lastSelector;\n        let newJoinedSelector;\n        // our new selector path\n        newSelectorPath = [];\n\n        // construct the joined selector - if & is the first thing this will be empty,\n        // if not newJoinedSelector will be the last set of elements in the selector\n        if (beginningPath.length > 0) {\n            newSelectorPath = utils.copyArray(beginningPath);\n            lastSelector = newSelectorPath.pop();\n            newJoinedSelector = originalSelector.createDerived(utils.copyArray(lastSelector.elements));\n        }\n        else {\n            newJoinedSelector = originalSelector.createDerived([]);\n        }\n\n        if (addPath.length > 0) {\n            // /deep/ is a CSS4 selector - (removed, so should deprecate)\n            // that is valid without anything in front of it\n            // so if the & does not have a combinator that is \"\" or \" \" then\n            // and there is a combinator on the parent, then grab that.\n            // this also allows + a { & .b { .a & { ... though not sure why you would want to do that\n            let combinator = replacedElement.combinator;\n\n            const parentEl = addPath[0].elements[0];\n            if (combinator.emptyOrWhitespace && !parentEl.combinator.emptyOrWhitespace) {\n                combinator = parentEl.combinator;\n            }\n            // join the elements so far with the first part of the parent\n            newJoinedSelector.elements.push(new Element(\n                combinator,\n                parentEl.value,\n                replacedElement.isVariable,\n                replacedElement._index,\n                replacedElement._fileInfo\n            ));\n            newJoinedSelector.elements = newJoinedSelector.elements.concat(addPath[0].elements.slice(1));\n        }\n\n        // now add the joined selector - but only if it is not empty\n        if (newJoinedSelector.elements.length !== 0) {\n            newSelectorPath.push(newJoinedSelector);\n        }\n\n        // put together the parent selectors after the join (e.g. the rest of the parent)\n        if (addPath.length > 1) {\n            let restOfPath = addPath.slice(1);\n            restOfPath = restOfPath.map(selector => selector.createDerived(selector.elements, []));\n            newSelectorPath = newSelectorPath.concat(restOfPath);\n        }\n        return newSelectorPath;\n    }\n\n    // joins selector path from `beginningPath` with every selector path in `addPaths` array\n    // `replacedElement` contains element that is being replaced by `addPath`\n    // returns array with all concatenated paths\n    function addAllReplacementsIntoPath( beginningPath, addPaths, replacedElement, originalSelector, result) {\n        let j;\n        for (j = 0; j < beginningPath.length; j++) {\n            const newSelectorPath = addReplacementIntoPath(beginningPath[j], addPaths, replacedElement, originalSelector);\n            result.push(newSelectorPath);\n        }\n        return result;\n    }\n\n    function mergeElementsOnToSelectors(elements, selectors) {\n        let i;\n        let sel;\n\n        if (elements.length === 0) {\n            return ;\n        }\n        if (selectors.length === 0) {\n            selectors.push([ new Selector(elements) ]);\n            return;\n        }\n\n        for (i = 0; (sel = selectors[i]); i++) {\n            // if the previous thing in sel is a parent this needs to join on to it\n            if (sel.length > 0) {\n                sel[sel.length - 1] = sel[sel.length - 1].createDerived(sel[sel.length - 1].elements.concat(elements));\n            }\n            else {\n                sel.push(new Selector(elements));\n            }\n        }\n    }\n\n    // replace all parent selectors inside `inSelector` by content of `context` array\n    // resulting selectors are returned inside `paths` array\n    // returns true if `inSelector` contained at least one parent selector\n    function replaceParentSelector(paths, context, inSelector) {\n        // The paths are [[Selector]]\n        // The first list is a list of comma separated selectors\n        // The inner list is a list of inheritance separated selectors\n        // e.g.\n        // .a, .b {\n        //   .c {\n        //   }\n        // }\n        // == [[.a] [.c]] [[.b] [.c]]\n        //\n        let i;\n\n        let j;\n        let k;\n        let currentElements;\n        let newSelectors;\n        let selectorsMultiplied;\n        let sel;\n        let el;\n        let hadParentSelector = false;\n        let length;\n        let lastSelector;\n        function findNestedSelector(element) {\n            let maybeSelector;\n            if (!(element.value instanceof Paren)) {\n                return null;\n            }\n\n            maybeSelector = element.value.value;\n            if (!(maybeSelector instanceof Selector)) {\n                return null;\n            }\n\n            return maybeSelector;\n        }\n\n        // the elements from the current selector so far\n        currentElements = [];\n        // the current list of new selectors to add to the path.\n        // We will build it up. We initiate it with one empty selector as we \"multiply\" the new selectors\n        // by the parents\n        newSelectors = [\n            []\n        ];\n\n        for (i = 0; (el = inSelector.elements[i]); i++) {\n            // non parent reference elements just get added\n            if (el.value !== '&') {\n                const nestedSelector = findNestedSelector(el);\n                if (nestedSelector != null) {\n                    // merge the current list of non parent selector elements\n                    // on to the current list of selectors to add\n                    mergeElementsOnToSelectors(currentElements, newSelectors);\n\n                    const nestedPaths = [];\n                    let replaced;\n                    const replacedNewSelectors = [];\n                    replaced = replaceParentSelector(nestedPaths, context, nestedSelector);\n                    hadParentSelector = hadParentSelector || replaced;\n                    // the nestedPaths array should have only one member - replaceParentSelector does not multiply selectors\n                    for (k = 0; k < nestedPaths.length; k++) {\n                        const replacementSelector = createSelector(createParenthesis(nestedPaths[k], el), el);\n                        addAllReplacementsIntoPath(newSelectors, [replacementSelector], el, inSelector, replacedNewSelectors);\n                    }\n                    newSelectors = replacedNewSelectors;\n                    currentElements = [];\n                } else {\n                    currentElements.push(el);\n                }\n\n            } else {\n                hadParentSelector = true;\n                // the new list of selectors to add\n                selectorsMultiplied = [];\n\n                // merge the current list of non parent selector elements\n                // on to the current list of selectors to add\n                mergeElementsOnToSelectors(currentElements, newSelectors);\n\n                // loop through our current selectors\n                for (j = 0; j < newSelectors.length; j++) {\n                    sel = newSelectors[j];\n                    // if we don't have any parent paths, the & might be in a mixin so that it can be used\n                    // whether there are parents or not\n                    if (context.length === 0) {\n                        // the combinator used on el should now be applied to the next element instead so that\n                        // it is not lost\n                        if (sel.length > 0) {\n                            sel[0].elements.push(new Element(el.combinator, '', el.isVariable, el._index, el._fileInfo));\n                        }\n                        selectorsMultiplied.push(sel);\n                    }\n                    else {\n                        // and the parent selectors\n                        for (k = 0; k < context.length; k++) {\n                            // We need to put the current selectors\n                            // then join the last selector's elements on to the parents selectors\n                            const newSelectorPath = addReplacementIntoPath(sel, context[k], el, inSelector);\n                            // add that to our new set of selectors\n                            selectorsMultiplied.push(newSelectorPath);\n                        }\n                    }\n                }\n\n                // our new selectors has been multiplied, so reset the state\n                newSelectors = selectorsMultiplied;\n                currentElements = [];\n            }\n        }\n\n        // if we have any elements left over (e.g. .a& .b == .b)\n        // add them on to all the current selectors\n        mergeElementsOnToSelectors(currentElements, newSelectors);\n\n        for (i = 0; i < newSelectors.length; i++) {\n            length = newSelectors[i].length;\n            if (length > 0) {\n                paths.push(newSelectors[i]);\n                lastSelector = newSelectors[i][length - 1];\n                newSelectors[i][length - 1] = lastSelector.createDerived(lastSelector.elements, inSelector.extendList);\n            }\n        }\n\n        return hadParentSelector;\n    }\n\n    function deriveSelector(visibilityInfo, deriveFrom) {\n        const newSelector = deriveFrom.createDerived(deriveFrom.elements, deriveFrom.extendList, deriveFrom.evaldCondition);\n        newSelector.copyVisibilityInfo(visibilityInfo);\n        return newSelector;\n    }\n\n    // joinSelector code follows\n    let i;\n\n    let newPaths;\n    let hadParentSelector;\n\n    newPaths = [];\n    hadParentSelector = replaceParentSelector(newPaths, context, selector);\n\n    if (!hadParentSelector) {\n        if (context.length > 0) {\n            newPaths = [];\n            for (i = 0; i < context.length; i++) {\n\n                const concatenated = context[i].map(deriveSelector.bind(this, selector.visibilityInfo()));\n\n                concatenated.push(selector);\n                newPaths.push(concatenated);\n            }\n        }\n        else {\n            newPaths = [[selector]];\n        }\n    }\n\n    for (i = 0; i < newPaths.length; i++) {\n        paths.push(newPaths[i]);\n    }\n};\n\nRuleset.prototype.type = 'Ruleset';\nRuleset.prototype.isRuleset = true;\nexport default Ruleset;\n"]}

Zerion Mini Shell 1.0