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kV,SAAAj5C,OAAA,GAAAi5C,SACA,MAAAzyC,IAAA,GACAu2C,gBAAA9D,SAAAxzC,OAAAwzC,SAAA7uC,SAAA,KAAA5D,KACA,IAAAA,IAAAq3C,QAAA,UAAA59C,MAAA,WAA+Cg5C,yIAC/C,MAAAp1C,KAAA,gBACY27C,6CAAA7I,oBACF1wC,KAAAC,UAAA+yC,uBACAhzC,KAAAC,WAAe,EAAAs5C,6CAAA3kB,QAAMr0B,IAAAq3C,QAAAn7C,4CAE7B8D,IAAAq3C,QAAAp4C,iBAGF,wCAA2CwzC,+GAEzCt2B,KAAA9e,KAAAo1C,WACF;mGAGA;SAAAwG,oBAAAC,UACA,IAAAA,iBAAAA,SAAAh6C,SAAA,qBAAAzF,MAAA,gEACA,GAAAy/C,SAAA/jC,SAA0B6jC,6CAAA7I,OAAM,UAAA12C,MAAA,2DAA6Ey/C,SAAA/jC,uCAAgD6jC,6CAAA7I,+BAC7J,MAAAj0C,MAAe,EAAA88C,6CAAAlI,QAAMoI,SAAAh9C,KAAAm6C,SAAAn4C,QAAAd,MACrB,MAAA4B,QAAA,IAAoBq3C,SAAAn4C,WAAAhC,MACpBi2C,cAAA9vC,IAAA62C,SAAAl/C,KAAA,CACAiU,OAAA;;AAEA9Q,MAAA,KACA+B,OAAA,CAAAZ,MAAAF,QAAA86C,SAAAh6C,OAAAZ,MAAAU,QAAAZ,OACAq4C,YAAA,MACA+B,YAAA,OAEA,OAAAU,SAAAl/C,IACA;4BAEA,MAAAo2B,2BAAA,CACAvqB,OACA2C,OACAgqC;;AAGA/lB,QACAulB,iBACA+D,aACAC,gBACAC,oBACAC,2BACAC,kBACAC,aACAmB,YACAE,eACAC,SACAI,WACA54C,OACA65C,WACAE,oBACAE,UAAAj6C","sources":["webpack://teddy/./node_modules/boolbase/index.js","webpack://teddy/./node_modules/css-what/lib/es/parse.js","webpack://teddy/./node_modules/css-what/lib/es/types.js","webpack://teddy/external module \"fs\"","webpack://teddy/external module \"path\"","webpack://teddy/./codegen.js","webpack://teddy/./compiler.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/helpers.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/index.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/positionals.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/attributes.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/css.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/extract.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/forms.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/manipulation.js","webpack://teddy/./node_modules/cheerio/dist/esm/api/traversing.js","webpack://teddy/./node_modules/cheerio/dist/esm/cheerio.js","webpack://teddy/./node_modules/cheerio/dist/esm/load.js","webpack://teddy/./node_modules/cheerio/dist/esm/options.js","webpack://teddy/./node_modules/cheerio/dist/esm/parse.js","webpack://teddy/./node_modules/cheerio/dist/esm/slim.js","webpack://teddy/./node_modules/cheerio/dist/esm/static.js","webpack://teddy/./node_modules/cheerio/dist/esm/utils.js","webpack://teddy/./node_modules/css-select/lib/esm/attributes.js","webpack://teddy/./node_modules/css-select/lib/esm/compile.js","webpack://teddy/./node_modules/css-select/lib/esm/general.js","webpack://teddy/./node_modules/css-select/lib/esm/index.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/aliases.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/filters.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/index.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/subselects.js","webpack://teddy/./node_modules/css-select/lib/esm/sort.js","webpack://teddy/./node_modules/dom-serializer/lib/esm/foreignNames.js","webpack://teddy/./node_modules/dom-serializer/lib/esm/index.js","webpack://teddy/./node_modules/domelementtype/lib/esm/index.js","webpack://teddy/./node_modules/domhandler/lib/esm/index.js","webpack://teddy/./node_modules/domhandler/lib/esm/node.js","webpack://teddy/./node_modules/domutils/lib/esm/feeds.js","webpack://teddy/./node_modules/domutils/lib/esm/helpers.js","webpack://teddy/./node_modules/domutils/lib/esm/legacy.js","webpack://teddy/./node_modules/domutils/lib/esm/manipulation.js","webpack://teddy/./node_modules/domutils/lib/esm/querying.js","webpack://teddy/./node_modules/domutils/lib/esm/stringify.js","webpack://teddy/./node_modules/domutils/lib/esm/traversal.js","webpack://teddy/./node_modules/entities/lib/esm/escape.js","webpack://teddy/./node_modules/htmlparser2/dist/esm/Parser.js","webpack://teddy/./node_modules/htmlparser2/dist/esm/Tokenizer.js","webpack://teddy/./node_modules/htmlparser2/dist/esm/index.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js","webpack://teddy/./node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js","webpack://teddy/./node_modules/nth-check/lib/esm/compile.js","webpack://teddy/./node_modules/nth-check/lib/esm/index.js","webpack://teddy/./node_modules/nth-check/lib/esm/parse.js","webpack://teddy/./precompiled.js","webpack://teddy/webpack/bootstrap","webpack://teddy/webpack/runtime/define property getters","webpack://teddy/webpack/runtime/hasOwnProperty shorthand","webpack://teddy/webpack/runtime/make namespace object","webpack://teddy/./teddy.js"],"sourcesContent":["module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};","import { SelectorType, AttributeAction, } from \"./types\";\nconst reName = /^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/;\nconst reEscape = /\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi;\nconst actionTypes = new Map([\n    [126 /* Tilde */, AttributeAction.Element],\n    [94 /* Circumflex */, AttributeAction.Start],\n    [36 /* Dollar */, AttributeAction.End],\n    [42 /* Asterisk */, AttributeAction.Any],\n    [33 /* ExclamationMark */, AttributeAction.Not],\n    [124 /* Pipe */, AttributeAction.Hyphen],\n]);\n// Pseudos, whose data property is parsed as well.\nconst unpackPseudos = new Set([\n    \"has\",\n    \"not\",\n    \"matches\",\n    \"is\",\n    \"where\",\n    \"host\",\n    \"host-context\",\n]);\n/**\n * Checks whether a specific selector is a traversal.\n * This is useful eg. in swapping the order of elements that\n * are not traversals.\n *\n * @param selector Selector to check.\n */\nexport function isTraversal(selector) {\n    switch (selector.type) {\n        case SelectorType.Adjacent:\n        case SelectorType.Child:\n        case SelectorType.Descendant:\n        case SelectorType.Parent:\n        case SelectorType.Sibling:\n        case SelectorType.ColumnCombinator:\n            return true;\n        default:\n            return false;\n    }\n}\nconst stripQuotesFromPseudos = new Set([\"contains\", \"icontains\"]);\n// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152\nfunction funescape(_, escaped, escapedWhitespace) {\n    const high = parseInt(escaped, 16) - 0x10000;\n    // NaN means non-codepoint\n    return high !== high || escapedWhitespace\n        ? escaped\n        : high < 0\n            ? // BMP codepoint\n                String.fromCharCode(high + 0x10000)\n            : // Supplemental Plane codepoint (surrogate pair)\n                String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);\n}\nfunction unescapeCSS(str) {\n    return str.replace(reEscape, funescape);\n}\nfunction isQuote(c) {\n    return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */;\n}\nfunction isWhitespace(c) {\n    return (c === 32 /* Space */ ||\n        c === 9 /* Tab */ ||\n        c === 10 /* NewLine */ ||\n        c === 12 /* FormFeed */ ||\n        c === 13 /* CarriageReturn */);\n}\n/**\n * Parses `selector`, optionally with the passed `options`.\n *\n * @param selector Selector to parse.\n * @param options Options for parsing.\n * @returns Returns a two-dimensional array.\n * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),\n * the second contains the relevant tokens for that selector.\n */\nexport function parse(selector) {\n    const subselects = [];\n    const endIndex = parseSelector(subselects, `${selector}`, 0);\n    if (endIndex < selector.length) {\n        throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);\n    }\n    return subselects;\n}\nfunction parseSelector(subselects, selector, selectorIndex) {\n    let tokens = [];\n    function getName(offset) {\n        const match = selector.slice(selectorIndex + offset).match(reName);\n        if (!match) {\n            throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`);\n        }\n        const [name] = match;\n        selectorIndex += offset + name.length;\n        return unescapeCSS(name);\n    }\n    function stripWhitespace(offset) {\n        selectorIndex += offset;\n        while (selectorIndex < selector.length &&\n            isWhitespace(selector.charCodeAt(selectorIndex))) {\n            selectorIndex++;\n        }\n    }\n    function readValueWithParenthesis() {\n        selectorIndex += 1;\n        const start = selectorIndex;\n        let counter = 1;\n        for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {\n            if (selector.charCodeAt(selectorIndex) ===\n                40 /* LeftParenthesis */ &&\n                !isEscaped(selectorIndex)) {\n                counter++;\n            }\n            else if (selector.charCodeAt(selectorIndex) ===\n                41 /* RightParenthesis */ &&\n                !isEscaped(selectorIndex)) {\n                counter--;\n            }\n        }\n        if (counter) {\n            throw new Error(\"Parenthesis not matched\");\n        }\n        return unescapeCSS(selector.slice(start, selectorIndex - 1));\n    }\n    function isEscaped(pos) {\n        let slashCount = 0;\n        while (selector.charCodeAt(--pos) === 92 /* BackSlash */)\n            slashCount++;\n        return (slashCount & 1) === 1;\n    }\n    function ensureNotTraversal() {\n        if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {\n            throw new Error(\"Did not expect successive traversals.\");\n        }\n    }\n    function addTraversal(type) {\n        if (tokens.length > 0 &&\n            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n            tokens[tokens.length - 1].type = type;\n            return;\n        }\n        ensureNotTraversal();\n        tokens.push({ type });\n    }\n    function addSpecialAttribute(name, action) {\n        tokens.push({\n            type: SelectorType.Attribute,\n            name,\n            action,\n            value: getName(1),\n            namespace: null,\n            ignoreCase: \"quirks\",\n        });\n    }\n    /**\n     * We have finished parsing the current part of the selector.\n     *\n     * Remove descendant tokens at the end if they exist,\n     * and return the last index, so that parsing can be\n     * picked up from here.\n     */\n    function finalizeSubselector() {\n        if (tokens.length &&\n            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n            tokens.pop();\n        }\n        if (tokens.length === 0) {\n            throw new Error(\"Empty sub-selector\");\n        }\n        subselects.push(tokens);\n    }\n    stripWhitespace(0);\n    if (selector.length === selectorIndex) {\n        return selectorIndex;\n    }\n    loop: while (selectorIndex < selector.length) {\n        const firstChar = selector.charCodeAt(selectorIndex);\n        switch (firstChar) {\n            // Whitespace\n            case 32 /* Space */:\n            case 9 /* Tab */:\n            case 10 /* NewLine */:\n            case 12 /* FormFeed */:\n            case 13 /* CarriageReturn */: {\n                if (tokens.length === 0 ||\n                    tokens[0].type !== SelectorType.Descendant) {\n                    ensureNotTraversal();\n                    tokens.push({ type: SelectorType.Descendant });\n                }\n                stripWhitespace(1);\n                break;\n            }\n            // Traversals\n            case 62 /* GreaterThan */: {\n                addTraversal(SelectorType.Child);\n                stripWhitespace(1);\n                break;\n            }\n            case 60 /* LessThan */: {\n                addTraversal(SelectorType.Parent);\n                stripWhitespace(1);\n                break;\n            }\n            case 126 /* Tilde */: {\n                addTraversal(SelectorType.Sibling);\n                stripWhitespace(1);\n                break;\n            }\n            case 43 /* Plus */: {\n                addTraversal(SelectorType.Adjacent);\n                stripWhitespace(1);\n                break;\n            }\n            // Special attribute selectors: .class, #id\n            case 46 /* Period */: {\n                addSpecialAttribute(\"class\", AttributeAction.Element);\n                break;\n            }\n            case 35 /* Hash */: {\n                addSpecialAttribute(\"id\", AttributeAction.Equals);\n                break;\n            }\n            case 91 /* LeftSquareBracket */: {\n                stripWhitespace(1);\n                // Determine attribute name and namespace\n                let name;\n                let namespace = null;\n                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) {\n                    // Equivalent to no namespace\n                    name = getName(1);\n                }\n                else if (selector.startsWith(\"*|\", selectorIndex)) {\n                    namespace = \"*\";\n                    name = getName(2);\n                }\n                else {\n                    name = getName(0);\n                    if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n                        selector.charCodeAt(selectorIndex + 1) !==\n                            61 /* Equal */) {\n                        namespace = name;\n                        name = getName(1);\n                    }\n                }\n                stripWhitespace(0);\n                // Determine comparison operation\n                let action = AttributeAction.Exists;\n                const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex));\n                if (possibleAction) {\n                    action = possibleAction;\n                    if (selector.charCodeAt(selectorIndex + 1) !==\n                        61 /* Equal */) {\n                        throw new Error(\"Expected `=`\");\n                    }\n                    stripWhitespace(2);\n                }\n                else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) {\n                    action = AttributeAction.Equals;\n                    stripWhitespace(1);\n                }\n                // Determine value\n                let value = \"\";\n                let ignoreCase = null;\n                if (action !== \"exists\") {\n                    if (isQuote(selector.charCodeAt(selectorIndex))) {\n                        const quote = selector.charCodeAt(selectorIndex);\n                        let sectionEnd = selectorIndex + 1;\n                        while (sectionEnd < selector.length &&\n                            (selector.charCodeAt(sectionEnd) !== quote ||\n                                isEscaped(sectionEnd))) {\n                            sectionEnd += 1;\n                        }\n                        if (selector.charCodeAt(sectionEnd) !== quote) {\n                            throw new Error(\"Attribute value didn't end\");\n                        }\n                        value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));\n                        selectorIndex = sectionEnd + 1;\n                    }\n                    else {\n                        const valueStart = selectorIndex;\n                        while (selectorIndex < selector.length &&\n                            ((!isWhitespace(selector.charCodeAt(selectorIndex)) &&\n                                selector.charCodeAt(selectorIndex) !==\n                                    93 /* RightSquareBracket */) ||\n                                isEscaped(selectorIndex))) {\n                            selectorIndex += 1;\n                        }\n                        value = unescapeCSS(selector.slice(valueStart, selectorIndex));\n                    }\n                    stripWhitespace(0);\n                    // See if we have a force ignore flag\n                    const forceIgnore = selector.charCodeAt(selectorIndex) | 0x20;\n                    // If the forceIgnore flag is set (either `i` or `s`), use that value\n                    if (forceIgnore === 115 /* LowerS */) {\n                        ignoreCase = false;\n                        stripWhitespace(1);\n                    }\n                    else if (forceIgnore === 105 /* LowerI */) {\n                        ignoreCase = true;\n                        stripWhitespace(1);\n                    }\n                }\n                if (selector.charCodeAt(selectorIndex) !==\n                    93 /* RightSquareBracket */) {\n                    throw new Error(\"Attribute selector didn't terminate\");\n                }\n                selectorIndex += 1;\n                const attributeSelector = {\n                    type: SelectorType.Attribute,\n                    name,\n                    action,\n                    value,\n                    namespace,\n                    ignoreCase,\n                };\n                tokens.push(attributeSelector);\n                break;\n            }\n            case 58 /* Colon */: {\n                if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) {\n                    tokens.push({\n                        type: SelectorType.PseudoElement,\n                        name: getName(2).toLowerCase(),\n                        data: selector.charCodeAt(selectorIndex) ===\n                            40 /* LeftParenthesis */\n                            ? readValueWithParenthesis()\n                            : null,\n                    });\n                    continue;\n                }\n                const name = getName(1).toLowerCase();\n                let data = null;\n                if (selector.charCodeAt(selectorIndex) ===\n                    40 /* LeftParenthesis */) {\n                    if (unpackPseudos.has(name)) {\n                        if (isQuote(selector.charCodeAt(selectorIndex + 1))) {\n                            throw new Error(`Pseudo-selector ${name} cannot be quoted`);\n                        }\n                        data = [];\n                        selectorIndex = parseSelector(data, selector, selectorIndex + 1);\n                        if (selector.charCodeAt(selectorIndex) !==\n                            41 /* RightParenthesis */) {\n                            throw new Error(`Missing closing parenthesis in :${name} (${selector})`);\n                        }\n                        selectorIndex += 1;\n                    }\n                    else {\n                        data = readValueWithParenthesis();\n                        if (stripQuotesFromPseudos.has(name)) {\n                            const quot = data.charCodeAt(0);\n                            if (quot === data.charCodeAt(data.length - 1) &&\n                                isQuote(quot)) {\n                                data = data.slice(1, -1);\n                            }\n                        }\n                        data = unescapeCSS(data);\n                    }\n                }\n                tokens.push({ type: SelectorType.Pseudo, name, data });\n                break;\n            }\n            case 44 /* Comma */: {\n                finalizeSubselector();\n                tokens = [];\n                stripWhitespace(1);\n                break;\n            }\n            default: {\n                if (selector.startsWith(\"/*\", selectorIndex)) {\n                    const endIndex = selector.indexOf(\"*/\", selectorIndex + 2);\n                    if (endIndex < 0) {\n                        throw new Error(\"Comment was not terminated\");\n                    }\n                    selectorIndex = endIndex + 2;\n                    // Remove leading whitespace\n                    if (tokens.length === 0) {\n                        stripWhitespace(0);\n                    }\n                    break;\n                }\n                let namespace = null;\n                let name;\n                if (firstChar === 42 /* Asterisk */) {\n                    selectorIndex += 1;\n                    name = \"*\";\n                }\n                else if (firstChar === 124 /* Pipe */) {\n                    name = \"\";\n                    if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) {\n                        addTraversal(SelectorType.ColumnCombinator);\n                        stripWhitespace(2);\n                        break;\n                    }\n                }\n                else if (reName.test(selector.slice(selectorIndex))) {\n                    name = getName(0);\n                }\n                else {\n                    break loop;\n                }\n                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n                    selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) {\n                    namespace = name;\n                    if (selector.charCodeAt(selectorIndex + 1) ===\n                        42 /* Asterisk */) {\n                        name = \"*\";\n                        selectorIndex += 2;\n                    }\n                    else {\n                        name = getName(1);\n                    }\n                }\n                tokens.push(name === \"*\"\n                    ? { type: SelectorType.Universal, namespace }\n                    : { type: SelectorType.Tag, name, namespace });\n            }\n        }\n    }\n    finalizeSubselector();\n    return selectorIndex;\n}\n","export var SelectorType;\n(function (SelectorType) {\n    SelectorType[\"Attribute\"] = \"attribute\";\n    SelectorType[\"Pseudo\"] = \"pseudo\";\n    SelectorType[\"PseudoElement\"] = \"pseudo-element\";\n    SelectorType[\"Tag\"] = \"tag\";\n    SelectorType[\"Universal\"] = \"universal\";\n    // Traversals\n    SelectorType[\"Adjacent\"] = \"adjacent\";\n    SelectorType[\"Child\"] = \"child\";\n    SelectorType[\"Descendant\"] = \"descendant\";\n    SelectorType[\"Parent\"] = \"parent\";\n    SelectorType[\"Sibling\"] = \"sibling\";\n    SelectorType[\"ColumnCombinator\"] = \"column-combinator\";\n})(SelectorType || (SelectorType = {}));\n/**\n * Modes for ignore case.\n *\n * This could be updated to an enum, and the object is\n * the current stand-in that will allow code to be updated\n * without big changes.\n */\nexport const IgnoreCaseMode = {\n    Unknown: null,\n    QuirksMode: \"quirks\",\n    IgnoreCase: true,\n    CaseSensitive: false,\n};\nexport var AttributeAction;\n(function (AttributeAction) {\n    AttributeAction[\"Any\"] = \"any\";\n    AttributeAction[\"Element\"] = \"element\";\n    AttributeAction[\"End\"] = \"end\";\n    AttributeAction[\"Equals\"] = \"equals\";\n    AttributeAction[\"Exists\"] = \"exists\";\n    AttributeAction[\"Hyphen\"] = \"hyphen\";\n    AttributeAction[\"Not\"] = \"not\";\n    AttributeAction[\"Start\"] = \"start\";\n})(AttributeAction || (AttributeAction = {}));\n","module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;","module.exports = __WEBPACK_EXTERNAL_MODULE_path__;","// teddy's code emitter\n//\n// the compiler turns a template into a tree of nodes, and a render walks that tree. this module takes the same tree and writes javascript that does the walking's job with no tree left to walk: literal markup becomes string concatenation, a loop's key and val become real javascript variables, and a dotted path becomes a property read\n//\n// what it does not do is reimplement what a {variable} or an <if> means. the emitted code calls the same helpers the tree walker calls, so the two ways of rendering a template cannot come to different conclusions about the language itself. the emitter only removes the dispatch and the bookkeeping around those calls, which is where the time goes\n//\n// this is used in node.js only. emitting javascript means building a function at runtime, which a page served under a strict content security policy is not allowed to do, so browser builds swap this module for a stub and walk the tree instead, which is slower, but more secure in browser contexts\n\n// every node kind the compiler can produce\nconst EMITTABLE = new Set(['text', 'var', 'arm', 'loop', 'attrs', 'scope', 'raw', 'inline', 'computedVar', 'selection', 'cache', 'dynamicInclude'])\n\nexport function canEmit (nodes) {\n  if (nodes === null) return false\n  for (const node of nodes) {\n    if (!EMITTABLE.has(node.type)) return false\n    if (node.body && !canEmit(node.body)) return false\n    if (node.type === 'arm' && !canEmit(node.branch.arms[node.index].body)) return false\n    if (node.nameNodes && !canEmit(node.nameNodes)) return false\n    if (node.variants) {\n      // a one line if fills its variants in as renders call for them, so there may be none yet; a selection has both of its from the start\n      for (const variant of node.variants) if (variant && !canEmit(variant)) return false\n    }\n    if (node.bindings) {\n      for (const binding of node.bindings) if (!canEmit(binding.body)) return false\n    }\n  }\n  return true\n}\n\n// builds a render function from a node tree\n//\n// helpers are the tree walker's own: get for a model lookup, format and write for what a variable resolves to and what it writes, pick for which arm of a conditional wins, and collection for what a loop iterates. they arrive in one object the emitted code reads from, so the generated source closes over nothing of its own supplied by the compiler, which knows which names an arm's conditions look up\nlet armPaths = () => []\nlet checkPaths = () => null\nlet attrsVariants = () => null\n\nexport function emit (nodes, helpers) {\n  armPaths = helpers.paths\n  checkPaths = helpers.checkPaths\n  attrsVariants = helpers.variants\n  const state = { locals: new Map(), model: 'm', base: 'm', uid: 0, flags: [], branches: [], branchIds: new Map(), nodes: [] }\n  const body = mergeWrites(`let o = ''\\n${walk(nodes, state, 'o')}return o`)\n  // eslint-disable-next-line no-new-func\n  const compiled = new Function('m', 'r', 's', body)\n  const data = { flags: state.flags, branches: state.branches, nodes: state.nodes }\n  const runtime = { ...helpers, ...data }\n  return {\n    source: body,\n    // what a precompiled copy of this template has to carry beside the source: the helpers are teddy's own, but these were worked out while writing the code that indexes into them\n    data,\n    render: (model, renderState) => compiled(model, runtime, renderState)\n  }\n}\n\n// one write of literal text, which is the only shape of line this merges. the strings are written by JSON.stringify, so a newline in the text is escaped rather than ending the line\nconst LITERAL_WRITE = /^([A-Za-z_$][\\w$]*) \\+= (\"(?:[^\"\\\\]|\\\\.)*\")$/\n\n// merges runs of literal writes into one write each\n//\n// markup arrives in pieces: a chain folded into real control flow writes the text around a body separately from the body's own text, a closing tag is its own write, and a construct between two runs of markup splits what would otherwise be one. all of those strings are known while the template is compiled, so joining them is work a render should not be repeating\nfunction mergeWrites (source) {\n  const lines = []\n  let target = null\n  let pending = ''\n\n  const flush = () => {\n    if (target !== null) lines.push(`${target} += ${JSON.stringify(pending)}`)\n    target = null\n    pending = ''\n  }\n\n  for (const line of source.split('\\n')) {\n    const write = LITERAL_WRITE.exec(line)\n    if (write) {\n      // a run only continues while the writes are going to the same place\n      if (write[1] !== target) flush()\n      target = write[1]\n      pending += JSON.parse(write[2])\n      continue\n    }\n    flush()\n    lines.push(line)\n  }\n  flush()\n\n  return lines.join('\\n')\n}\n\nfunction walk (nodes, state, out) {\n  let js = ''\n\n  for (let index = 0; index < nodes.length; index++) {\n    const node = nodes[index]\n    switch (node.type) {\n      case 'text':\n        js += `${out} += ${JSON.stringify(node.value)}\\n`\n        break\n      case 'var':\n        js += emitVar(node, state, out)\n        break\n      case 'arm': {\n        // a whole chain compiles to one if/else chain wherever it can, which is most of the time\n        const chain = node.index === 0 ? emitChain(nodes, index, state, out) : null\n        if (chain) {\n          js += chain.js\n          index += chain.consumed - 1\n        } else js += emitArm(node, state, out)\n        break\n      }\n      case 'loop':\n        js += emitLoop(node, state, out)\n        break\n      case 'attrs':\n        js += emitAttrs(node, state, out)\n        break\n      case 'scope':\n        js += emitScope(node, state, out)\n        break\n      case 'raw':\n        js += `${out} += r.raw(${nodeRef(node, state)}, ${state.model})\\n`\n        break\n      case 'inline':\n        js += `${out} += r.inline(${nodeRef(node, state)}, ${state.model})\\n`\n        break\n      case 'computedVar':\n        js += emitComputedVar(node, state, out)\n        break\n      case 'selection':\n        js += emitSelection(node, state, out)\n        break\n      case 'cache':\n        js += emitCache(node, state, out)\n        break\n      case 'dynamicInclude':\n        js += emitDynamicInclude(node, state, out)\n        break\n    }\n  }\n\n  return js\n}\n\n// the node itself, for a helper that needs more of it than a few values\nfunction nodeRef (node, state) {\n  return `r.nodes[${state.nodes.push(node) - 1}]`\n}\n\n// a dotted path becomes a property read. case insensitive only as the fallback for when the exact spelling is not there, which is the rare case\n//\n// a loop's key and val are javascript variables, so a path rooted at one of those reads it directly. anything else reads the model the loop was reached with rather than the model its body sees, because the only difference between those two is the key and the val, and a path naming either of those has already been answered by the javascript variables above\n//\n// the model read from is not always the model the template was called with: an <include> that takes arguments binds them into a model of its own\n//\n// the javascript variable is named by the emitter rather than by the template, because a name teddy is happy with is not always one javascript will take: a loop may be given a val of \"5\", or \"my-item\", or \"class\". names are matched without regard to case\nfunction access (path, state) {\n  const keys = String(path).split('.')\n  const local = state.locals.get(keys[0].toLowerCase())\n  const root = local || state.base\n  const rest = local ? keys.slice(1) : keys\n  if (!rest.length) return { setup: '', expr: root }\n  // the property chain is read into a variable rather than written into the expression twice, which is what asking whether it came back undefined used to cost\n  const found = `p${state.uid++}`\n  const chain = root + rest.map(key => `?.[${JSON.stringify(key)}]`).join('')\n  const setup = `let ${found} = ${chain}\\nif (${found} === undefined) ${found} = r.get(${root}, ${JSON.stringify(rest.join('.'))})\\n`\n  return { setup, expr: found }\n}\n\nfunction emitVar (node, state, out) {\n  // the flags were settled when the template was compiled, so the emitted code carries an index into a table of them rather than working them out again\n  const flags = state.flags.push(node.flags) - 1\n  const value = access(node.flags.name, state)\n  let js = value.setup\n\n  // a variable carrying no flags at all, holding a plain string with nothing special in it, is most of what a page writes, and that case is answered in one call: no flags to consult, no object to carry the answer, and no second question about whether the answer is finished\n  //\n  // everything else is one call too. it sits in the false half of a conditional, so the model it is handed is only reached for when that half is taken, which is what lets a loop body avoid building one at all\n  const plain = !node.flags.noparse && !node.flags.raw && !node.flags.hide && !node.flags.display\n  const slow = `r.slow(r.flags[${flags}], ${value.expr}, ${node.raw}, ${JSON.stringify(node.source)}, ${state.model}, s, ${!!node.dollar})`\n  if (plain) {\n    const quick = `q${state.uid++}`\n    js += `const ${quick} = r.quick(${value.expr})\\n`\n    js += `${out} += ${quick} !== undefined ? ${quick} : ${slow}\\n`\n  } else {\n    js += `${out} += ${slow}\\n`\n  }\n  return js\n}\n\n// every arm of a chain gets its own block, and which one wins is worked out once, when the first arm is reached. the arms cannot be an if/else chain: teddy writes the winning arm's content where that arm sat, and the markup between the arms belongs to the page either way\nfunction branchId (branch, state) {\n  let id = state.branchIds.get(branch)\n  if (id === undefined) {\n    id = state.branches.push(branch) - 1\n    state.branchIds.set(branch, id)\n  }\n  return id\n}\n\nfunction emitArm (node, state, out) {\n  const id = branchId(node.branch, state)\n  const winner = `w${id}`\n  let js = ''\n  if (node.index === 0) js += emitPick(node.branch, id, winner, state)\n  js += `if (${winner} === ${node.index}) {\\n`\n  js += walk(node.branch.arms[node.index].body, state, out)\n  js += '}\\n'\n  return js\n}\n\n// a whole conditional chain as one if/else chain\n//\n// the arms of a chain are siblings in the document rather than nested blocks, so whatever sits between them belongs to the page and is written whichever arm wins. that is why a chain cannot simply become an if/else in the order it was written: the content between the arms would have nowhere to go\n//\n// it can become one anyway, by folding that content into every branch. each arm writes the content that precedes it, then its own body, then the content that follows it, and the arrangement is different in each branch but settled at compile time. one test per arm, short circuited, and the literals around a body merge into single writes rather than one write per run of text\n//\n// returns null when anything other than text sits between the arms, because then that content has to be written where it stands and the chain keeps the winner and position form below\nfunction emitChain (nodes, start, state, out) {\n  const branch = nodes[start].branch\n  const total = branch.arms.length\n  const between = [] // the content between one arm and the next, one entry per gap\n  let cursor = start + 1\n  let text = ''\n  let found = 1\n\n  while (found < total && cursor < nodes.length) {\n    const node = nodes[cursor]\n    if (node.type === 'text') {\n      text += node.value\n      cursor++\n    } else if (node.type === 'arm' && node.branch === branch && node.index === found) {\n      between.push(text)\n      text = ''\n      found++\n      cursor++\n    } else return null // something that is not text is in the way\n  }\n  if (found < total) return null // the rest of the chain is not in this list\n\n  const id = branchId(branch, state)\n  const write = value => (value ? `${out} += ${JSON.stringify(value)}\\n` : '')\n  let js = ''\n  let depth = 0\n  let settled = false\n\n  for (let i = 0; i < total; i++) {\n    const body = write(between.slice(0, i).join('')) + walk(branch.arms[i].body, state, out) + write(between.slice(i).join(''))\n    // an <else> is the arm that applies when nothing before it did, so it needs no test of its own and nothing after it can win\n    if (branch.arms[i].kind === 'else') {\n      js += body\n      settled = true\n      break\n    }\n    const { setup, test } = armTest(branch, id, i, state)\n    js += setup\n    js += `if (${test}) {\\n${body}} else {\\n`\n    depth++\n  }\n  // no arm applied, so only what sits between them is written\n  if (!settled) js += write(between.join(''))\n  js += '}\\n'.repeat(depth)\n\n  return { js, consumed: cursor - start }\n}\n\n// which arm of a chain applies, worked out arm by arm so a later arm's conditions are not looked up once an earlier one has matched\n//\n// each condition's value is read here, inline, rather than inside the shared reduction. that is what stops a dotted name being split apart again on every render. the reduction itself is still teddy's own, handed the values it would otherwise have looked up for itself what one arm of a chain needs read before it can be tested, and the test itself\n//\n// an arm's conditions are looked up here, inline, rather than inside the shared reduction, which is what stops a dotted name being split apart again on every render\nfunction armTest (branch, id, index, state) {\n  const arm = branch.arms[index]\n  let setup = ''\n  const values = []\n  for (const path of armPaths(arm)) {\n    if (path === null) {\n      values.push('undefined')\n      continue\n    }\n    const value = access(path, state)\n    setup += value.setup\n    values.push(value.expr)\n  }\n\n  // an arm asking whether one thing is simply there is most of what conditionals are, and the answer to that is the one helper that says what being there means, reached directly rather than through everything that decides how else an arm might have to be answered\n  const checks = arm.checks\n  const bare = checks && checks.length === 1 && !checks[0].not && checks[0].compare === null\n  if (bare) {\n    const inverted = arm.kind === 'unless' || arm.kind === 'elseunless'\n    return { setup, test: `${inverted ? '!' : ''}r.present(${values[0]})` }\n  }\n\n  // the values above are every lookup the arm makes, so the one thing left that a model could be wanted for is a {variable} standing in for a condition's value, which only the opening arm of a chain resolves. the variable may sit anywhere in the value, so what counts as one has to be decided the same way conditionArgs decides it, or the model it needs will not have been passed\n  const wantsModel = index === 0 && arm.attribs.some(([, value]) => value && value.includes('{'))\n  return { setup, test: `r.arm(r.branches[${id}].arms[${index}], ${wantsModel ? state.model : 'null'}, ${index === 0}, [${values.join(', ')}])` }\n}\n\nfunction emitPick (branch, id, winner, state) {\n  let js = `let ${winner} = -1\\n`\n  let depth = 0\n  for (let i = 0; i < branch.arms.length; i++) {\n    const { setup, test } = armTest(branch, id, i, state)\n    js += setup\n    js += `if (${test}) ${winner} = ${i}\\n`\n    js += 'else {\\n'\n    depth++\n  }\n  js += '}\\n'.repeat(depth)\n  return js\n}\n\n// a variable whose name is built from other variables: the name is a little template of its own, so it is rendered into its own accumulator and then looked up\nfunction emitComputedVar (node, state, out) {\n  const name = `n${state.uid++}`\n  let js = `let ${name} = ''\\n`\n  js += walk(node.nameNodes, state, name)\n  js += `${out} += r.computed(${name}, ${state.model}, s)\\n`\n  return js\n}\n\n// a candidate for a selected-value or checked-value: its opening tag was prepared both marked and unmarked, so the render only picks\nfunction emitSelection (node, state, out) {\n  const ref = nodeRef(node, state)\n  const marked = `d${state.uid++}`\n  let js = `const ${marked} = r.marked(${ref}, ${state.model}) ? 1 : 0\\n`\n  js += `${out} += r.render(${ref}.variants[${marked}], ${state.model}, s)\\n`\n  js += walk(node.body, state, out)\n  js += `${out} += ${JSON.stringify(node.closeTag)}\\n`\n  return js\n}\n\n// a <cache> writes what its body rendered to last time, so the body is emitted behind a function the helper only calls on a miss\nfunction emitCache (node, state, out) {\n  const acc = `q${state.uid++}`\n  let js = `${out} += r.cache(${nodeRef(node, state)}, ${state.model}, () => {\\n`\n  js += `let ${acc} = ''\\n`\n  js += walk(node.body, state, acc)\n  js += `return ${acc}\\n`\n  js += '})\\n'\n  return js\n}\n\n// an <include> whose src is only known at render: the body it resolves to is compiled the first time a render asks for that name, and is walked rather than emitted since it is not known when this code is written\nfunction emitDynamicInclude (node, state, out) {\n  const ref = nodeRef(node, state)\n  let js = ''\n  let model = state.model\n  if (node.bindings.length) {\n    const values = []\n    for (const binding of node.bindings) {\n      const acc = `g${state.uid++}`\n      values.push(acc)\n      js += `let ${acc} = ''\\n`\n      js += walk(binding.body, state, acc)\n    }\n    const scope = `l${state.uid++}`\n    js += `const ${scope} = r.bind(${state.model}, ${ref}.bindings, [${values.join(', ')}])\\n`\n    model = scope\n  }\n  js += `${out} += r.render(r.dynamic(${ref}, ${state.model}), ${model}, s)\\n`\n  return js\n}\n\n// a one line if: which combination of outcomes applies is worked out by the same helper the tree walker uses, and the opening tag for it is looked up the same way\nfunction emitAttrs (node, state, out) {\n  const ref = nodeRef(node, state)\n  const outcomes = `a${state.uid++}`\n  let js = ''\n  const sets = []\n  for (const conditional of node.conditionals) {\n    const paths = checkPaths(conditional.checks)\n    if (!paths) {\n      sets.push('null')\n      continue\n    }\n    const slots = []\n    for (const path of paths) {\n      if (path === null) {\n        slots.push('undefined')\n        continue\n      }\n      const value = access(path, state)\n      js += value.setup\n      slots.push(value.expr)\n    }\n    sets.push(`[${slots.join(', ')}]`)\n  }\n  js += `const ${outcomes} = r.outcomes(${ref}, ${node.outcomesNeedModel ? state.model : 'null'}, [${sets.join(', ')}])\\n`\n\n  // the opening tag is written here, one branch per combination of outcomes, rather than by handing the tree walker the combination this render arrived at. a tag holding a {variable} is what makes the difference: written here it reads a loop's val out of a javascript variable, and handed over it would need a whole model built for it to look the same value up in\n  const variants = attrsVariants(node)\n  if (variants) {\n    for (let i = 0; i < variants.length; i++) {\n      js += `${i ? 'else ' : ''}if (${outcomes} === ${i}) {\\n`\n      js += walk(variants[i], state, out)\n      js += '}\\n'\n    }\n  } else {\n    js += `${out} += r.render(r.variant(${ref}, ${outcomes}), ${node.variantNeedsModel ? state.model : 'null'}, s)\\n`\n  }\n  js += walk(node.body, state, out)\n  js += `${out} += ${JSON.stringify(node.closeTag)}\\n`\n  return js\n}\n\n// an include's arguments are templates of their own, so each is rendered into its own accumulator and the results become the model the included template sees\nfunction emitScope (node, state, out) {\n  // an include rendering as a custom element brought the two halves of that element with it, worked out when the template was compiled so that this and the tree walker cannot disagree about them\n  const open = node.element === null ? '' : walk(node.openNodes, state, out)\n\n  // the fallback copy a component carries is its own template again, read against the same model the shadow root was, so it is written while that scope is still in place rather than in closing\n  const body = () => {\n    let js = walk(node.body, state, out)\n    if (node.element === null) return js\n    if (node.mode !== 'light') js += `${out} += ${JSON.stringify('</template>')}\\n`\n    if (node.fallbackNodes !== null) js += walk(node.fallbackNodes, state, out)\n    return js\n  }\n\n  // what closes a component is written where it is rendered rather than here: its light dom is a template of its own, and the model a hydrating one was sent is only known once the render has a model to read\n  //\n  // both are the model the include was reached with, so this is called once that scope has been put back\n  const closing = () => {\n    if (node.element === null) return ''\n    let js = walk(node.lightNodes, state, out)\n    if (node.hydrate) js += `${out} += r.payload(${nodeRef(node, state)}, ${state.model})\\n`\n    return js + `${out} += ${JSON.stringify(`</${node.element}>`)}\\n`\n  }\n\n  if (!node.bindings.length) return open + body() + closing()\n\n  let js = open\n  const values = []\n  for (const binding of node.bindings) {\n    const acc = `g${state.uid++}`\n    values.push(acc)\n    js += `let ${acc} = ''\\n`\n    js += walk(binding.body, state, acc)\n  }\n\n  const scope = `l${state.uid++}`\n  js += `const ${scope} = r.bind(${state.model}, ${nodeRef(node, state)}.bindings, [${values.join(', ')}])\\n`\n  const outerModel = state.model\n  const outerBase = state.base\n  state.model = scope\n  state.base = scope\n  js += body()\n  state.model = outerModel\n  state.base = outerBase\n  return js + closing()\n}\n\n// the loop's key and val become real javascript variables rather than keys copied into a fresh model object for every item, which is what lets the body read them with a plain property access\n//\n// working out what to iterate happens once per loop rather than once per item, so that is left to the helper, which also reports a loop teddy cannot run\nfunction emitLoop (node, state, out) {\n  const collection = `c${state.uid++}`\n  const key = `k${state.uid++}`\n  const val = `u${state.uid++}`\n\n  const keyName = JSON.stringify(node.keyName ?? null)\n  const valName = JSON.stringify(node.valName ?? null)\n\n  // a through naming a {variable} anywhere in its path is not known until there is a model to read it from, so that one goes through the helper; anything else is a path this code can read directly, which matters for a loop nested inside another whose collection is the outer loop's val\n  let js = ''\n  if (node.through && node.through.includes('{')) {\n    js += `const ${collection} = r.collection(${JSON.stringify(node.through)}, ${keyName}, ${valName}, ${state.model})\\n`\n  } else {\n    const source = access(node.through, state)\n    js += source.setup\n    js += `const ${collection} = r.iterable(${source.expr}, ${keyName}, ${valName})\\n`\n  }\n\n  // the walk is worked out once for the whole loop, and whether the key is wanted was settled when the template was compiled, so no iteration asks that question again\n  const items = `d${state.uid++}`\n  const index = `i${state.uid++}`\n  js += `const ${items} = ${collection} ? r.walk(${collection}, ${!!node.keyName}) : null\\n`\n  js += `if (${items}) for (let ${index} = 0; ${index} < ${items}.length; ${index}++) {\\n`\n  if (node.keyName) {\n    js += `const ${key} = ${items}[${index}]\\n`\n    js += `const ${val} = ${collection}[${key}]\\n`\n  } else {\n    js += `const ${key} = null\\n`\n    js += `const ${val} = ${items}[${index}]\\n`\n  }\n\n  const outerLocals = state.locals\n  const outerModel = state.model\n  const scope = `l${state.uid++}`\n  // the body reads the key and the val out of the javascript variables above, and reads everything else out of the model the loop was reached with, so the model a loop's body sees exists only for the helpers that take one. those are the minority, so it is built on first use and not before: a body of plain markup, variables and conditionals never builds one at all, which is one object copy per item of every loop on the page saved\n  js += `let ${scope}\\n`\n  state.locals = new Map(outerLocals)\n  if (node.keyName) state.locals.set(node.keyName.toLowerCase(), key)\n  if (node.valName) state.locals.set(node.valName.toLowerCase(), val)\n  state.model = `(${scope} || (${scope} = r.scope(${outerModel}, ${keyName}, ${key}, ${valName}, ${val})))`\n  js += walk(node.body, state, out)\n  state.locals = outerLocals\n  state.model = outerModel\n\n  js += '}\\n'\n  return js\n}\n","// teddy's compiler\n//\n// the structure of a template does not change between renders, only the values do. this module walks a template once and emits a tree of nodes that a render walks\n//\n// three rules:\n//\n// 1. static markup is taken from cheerio's own serializer, never reconstructed. the compiler replaces each teddy construct in the parsed dom with a placeholder text node and then serializes the whole document, so the literal chunks between placeholders are the same as what the interpreter would have produced\n//\n// 2. anything the compiler does not recognize abandons the compile entirely and the template is delegated to the interpreter; partial coverage is therefore safe: a template can only ever come out faster or unchanged, never wrong\n//\n// 3. value level semantics are not reimplemented here: formatVariable and evaluateConditional are teddy's own, called from here, so nothing about what a {variable} or an <if> means lives in two places\n\nfunction internalError (detail) {\n  return new Error(`teddy: internal compiler error: ${detail}. this is a bug in teddy, not in your template.`)\n}\n\nfunction warn (params, message) {\n  if (params.verbosity > 0) console.warn(`teddy: ${message}`)\n}\n\n// marks where a construct's output goes. it contains no character a parser treats as special, so it survives being parsed and serialized again. the browser build swaps cheerio for a small polyfill over the native dom, so the compiler uses only the parts both of them provide\n//\n// a control character does not belong in markup, but a template is free to contain one, so the one used is picked per template from those the template does not already contain\nconst TOKEN_CANDIDATES = ['\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\u000e', '\\u000f']\n\nconst SELECTION_ATTRS = [['selected-value', 'option[value]', 'selected'], ['checked-value', 'input[type=\"checkbox\"][value], input[type=\"radio\"][value]', 'checked']]\n\n// tags whose presence around a construct means an enclosing construct owns it, so it is compiled as part of that one's body rather than on its own\nconst STRUCTURAL = new Set(['if', 'unless', 'elseif', 'elseunless', 'else', 'loop', 'include', 'arg', 'noteddy', 'noparse', 'pre', 'cache'])\nconst ARM_TAGS = new Set(['elseif', 'elseunless', 'else'])\n\n// teddy tags that can be left over once every construct has been claimed, because they only mean anything next to something else\nconst ORPHANABLE = ['arg', 'else', 'elseif', 'elseunless']\nconst OPENERS = new Set(['if', 'unless'])\nconst JOINERS = new Set(['and', 'or', 'xor'])\nconst OUTCOMES = new Set(['true', 'false'])\n\n// every construct that owns the markup inside it, found in one pass so the outermost of them can be picked out. a one line if is in here through its outcome attributes, which is also how the interpreter finds them\n//\n// a <noteddy> or <pre> carrying an id is teddy's own marker for content it has already lifted out, not something in the template, so it is left alone here exactly as the old renderer left it alone\nconst CONSTRUCTS = 'if, unless, loop, include, inline, cache, noteddy:not([id]), noparse:not([id]), pre:not([id]), [true], [false]'\n\n// a sequence of one line ifs on one element needs the element's opening tag worked out for whichever combination of outcomes a render arrives at. there are two to the power of however many conditions there are, so each is built as a render first calls for it and then kept, rather than all of them up front\n\n// teddy's rule for what counts as a variable name\nconst VALID_VARIABLE = /^(\\d+|[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*(\\.[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*)*)$/\n\n// what a value has to contain before anything further needs doing with it. deliberately specific: a value carrying ordinary markup such as <strong> is finished as it stands, and treating it otherwise would cost every template that injects safe html\nconst LOOKS_LIKE_TEDDY = /\\{|<\\/?(?:if|unless|elseif|elseunless|else|loop|include|arg|cache|inline|noteddy|noparse)\\b|\\s(?:true|false|selected-value|checked-value)=|\\sif-/i\n\n// whether a value carries teddy tags, as opposed to only carrying {variables}. a value of only variables and text cannot affect the shape of the document, so nothing about it has to be checked before compiling it\nconst HAS_TEDDY_TAGS = /<\\/?(?:if|unless|elseif|elseunless|else|loop|include|arg|cache|inline|noteddy|noparse)\\b|\\s(?:true|false|selected-value|checked-value)=|\\sif-/i\n\n// teddy's marker for a block it has lifted out of the markup. one of these turns up inside a value whenever a rendered fragment is passed on through another variable, which is what a layout taking its page as an argument does, and it is not something to look at a second time\nconst NOTEDDY_PLACEHOLDER = /<noteddy id=\"\\d+\"(?: pre=\"true\")?><\\/noteddy>/g\n\n// elements that never carry a closing tag, so an unclosed one of these does not mean the markup is unfinished\nconst VOID_ELEMENTS = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr'])\n\n// elements whose contents are not markup as far as teddy is concerned: a browser reads the contents of a script, style, or textarea as plain text, and noteddy, noparse, and a pre without a parse attribute are teddy's own ways of asking for the same\nconst UNPARSED_CONTENT = new Set(['script', 'style', 'textarea', 'noteddy', 'noparse', 'pre'])\n\n// the tags in some markup, as matches of [whole, closing slash, name, rest of the tag], skipping over anything inside an element whose contents are not markup\n//\n// counting the tags inside those as though they were real is what made a script holding a string like \"<include src=x>\" look like markup that opens a tag it never closes\nfunction * tagsOutsideUnparsedContent (source) {\n  const tag = /<(\\/?)([a-zA-Z][a-zA-Z0-9-]*)([^>]*)>/g\n  let match\n  while ((match = tag.exec(source))) {\n    yield match\n    const name = match[2].toLowerCase()\n    if (match[1] || !UNPARSED_CONTENT.has(name) || match[3].trimEnd().endsWith('/')) continue\n    if (name === 'pre' && /(^|\\s)parse(\\s|=|$)/i.test(match[3])) continue // a <pre parse> asks for its contents to be parsed\n    const close = new RegExp(`</${name}\\\\s*>`, 'ig')\n    close.lastIndex = tag.lastIndex\n    const found = close.exec(source)\n    if (!found) return // the element runs to the end, so nothing after its opening tag is markup\n    tag.lastIndex = found.index // resume at the closing tag, so that it is matched next\n  }\n}\n\n// stands in for what a variable writes when working that out needs a model, which is the uncommon case\nconst NEEDS_MODEL = Symbol('teddy: value needs a model')\n\n// how many opening tags of a one line if are worth writing out in full. two conditions on one element is four tags, which is already more than almost any element carries\nconst MAX_EMITTED_VARIANTS = 4\n\n// what makes a plain value worth a second look: a character that has to be escaped, or the opening of a {variable} the value carries of its own\nconst QUICK_VALUE_STOP = /[&<>\"'{]/\n\n// values that came in through the model and have been compiled, kept against the value itself so a page rendering the same snippet over and over compiles it once\nconst MAX_VALUE_TEMPLATES = 10000\n\n// a value may refer to another value, which may refer to another, and so on. a value that comes round again is a loop the model cannot resolve, and it is reported rather than chased\nconst MAX_VALUE_DEPTH = 1000\n\nexport function createCompiler (deps) {\n  const {\n    cheerioLoad,\n    cheerioOptions,\n    browser,\n    params,\n    variableFlags,\n    formatVariable,\n    escapeEntities,\n    conditionPath,\n    evaluateConditional,\n    loadTemplate,\n    caches,\n    parseVars,\n    getAttribs,\n    getOrSetObjectByDotNotation\n  } = deps\n\n  // #region compiling\n\n  let token = TOKEN_CANDIDATES[0]\n  const tokenFor = index => token + index + token\n\n  // returns a node tree, or null if the template contains anything this compiler does not handle yet, which means the caller should interpret it instead\n  function compileTemplate (source, stack = []) {\n    token = TOKEN_CANDIDATES.find(candidate => !source.includes(candidate)) ?? TOKEN_CANDIDATES[0]\n    // one slot list for the whole template, so a placeholder found inside a construct's body means the same thing there as it did in the document it came out of\n    const slots = []\n    const nodes = compileMarkup(source, slots, stack)\n    // bodies are compiled after their document has been serialized, and compiling one can add slots of its own, so this walks the list as it grows rather than a snapshot of it\n    for (let i = 0; i < slots.length; i++) compileSlotBody(slots[i], slots)\n    return nodes\n  }\n\n  function compileSlotBody (slot, slots) {\n    if (slot.type === 'arm') {\n      const arm = slot.branch.arms[slot.index]\n      if (arm.body === null) arm.body = compileMarkup(arm.bodySource, slots, slot.stack)\n      return\n    }\n    if (slot.bodySource !== null && slot.body === null) slot.body = compileMarkup(slot.bodySource, slots, slot.stack)\n    // an argument's body is a template in its own right, rendered against the model the include is reached with\n    if (slot.bindings) {\n      for (const binding of slot.bindings) {\n        if (binding.body === null) binding.body = compileMarkup(binding.bodySource, slots, slot.stack)\n      }\n    }\n    // a component's light dom is written at the call site, so it is rendered against the model the include was reached with rather than against the partial's\n    if (slot.lightSource !== null && slot.lightNodes === null) slot.lightNodes = compileMarkup(slot.lightSource, slots, slot.stack)\n    // the fallback a component carries is its own template again, so it is rendered against the same model the shadow root was\n    if (slot.fallbackSource !== null && slot.fallbackNodes === null) slot.fallbackNodes = compileMarkup(slot.fallbackSource, slots, slot.stack)\n  }\n  // every node is made here, and every one of them carries the same fields in the same order whether it uses them or not\n  //\n  // v8 gives an object its shape from the fields it is written with, and reading one field across a dozen different shapes is a lookup it cannot cache. renderNodes reads node.type off every node in a template, so a dozen shapes made that read, and the reads after it, as slow as a lookup gets. one shape makes them all the fastest kind. the nodes are built once when a template is compiled rather than once per render, so the fields a node does not use cost nothing worth counting\n  function makeNode (type) {\n    return {\n      type,\n      value: null,\n      source: null,\n      stack: null,\n      body: null,\n      bodySource: null,\n      branch: null,\n      index: 0,\n      through: null,\n      keyName: null,\n      valName: null,\n      conditionals: null,\n      outcomesNeedModel: false,\n      variantNeedsModel: false,\n      openTag: null,\n      closeTag: null,\n      tagName: null,\n      variants: null,\n      src: null,\n      bindings: null,\n      compiled: null,\n      valueSource: null,\n      ownValue: null,\n      name: null,\n      key: null,\n      maxAge: 0,\n      maxCaches: 0,\n      css: null,\n      js: null,\n      element: null,\n      hydrate: null,\n      openNodes: null,\n      mode: null,\n      lightSource: null,\n      lightNodes: null,\n      fallbackSource: null,\n      fallbackNodes: null,\n      flags: null,\n      raw: false,\n      dollar: false,\n      path: null,\n      nameNodes: null\n    }\n  }\n\n  function compileMarkup (source, slots, stack) {\n    reportStrayClosingTags(source)\n    const dom = cheerioLoad(source || '', cheerioOptions)\n\n    applySelectionAttributes(dom, slots)\n\n    // every construct is found in one pass and narrowed to the outermost of them, so none of the elements about to be replaced contains another. that is what lets each body be captured intact: going type by type would mean replacing a loop that sits inside an element whose body has not been read yet\n    const outermost = Array.from(dom(CONSTRUCTS)).filter(el => !hasConstructAncestor(el))\n    const claimed = new Set()\n\n    for (const el of outermost) {\n      if (claimed.has(el)) continue\n      const name = tagNameOf(el)\n      if (OPENERS.has(name)) claimConditional(dom, el, slots, claimed, stack)\n      else if (name === 'loop') claimLoop(dom, el, slots, stack)\n      else if (name === 'include') claimInclude(dom, el, slots, stack)\n      else if (name === 'inline') claimInline(dom, el, slots)\n      else if (name === 'cache') claimCache(dom, el, slots, stack)\n      else if (name === 'noteddy' || name === 'noparse') claimNoParse(dom, el, slots, false)\n      else if (name === 'pre') claimPre(dom, el, slots)\n      else claimOneLineIf(dom, el, slots, stack)\n    }\n\n    // anything teddy still recognizes at this point belongs to nothing, and goes\n    sweepOrphanedTags(dom)\n\n    return buildNodes(dom.html(), slots)\n  }\n\n  // what a set of conditions asks, worked out while the template is compiled: for each one the name it looks up, whether it is negated, and what it compares against\n  //\n  // this covers one condition on its own and two joined by a single operator, which between them is nearly every conditional anyone writes. anything else, and anything with a quirk in it that the general path handles specially, comes back null and is left to that path\n  //\n  // knowing this at compile time is what lets a render answer a conditional without building an argument list, reducing it in place, and reading the same strings apart again every time\n  function conditionChecks (pairs) {\n    const checks = []\n    for (const [rawName, rawValue] of pairs) {\n      if (rawName === 'and' || rawName === 'or' || rawName === 'xor') {\n        checks.push(rawName)\n        continue\n      }\n      let name = rawName\n      const not = name.startsWith('not:')\n      if (not) name = name.slice(4)\n      // a colon anywhere but the not: prefix, or an equals sign in the name, is something the general path rejects outright and warns about\n      if (!name || name.includes(':') || name.includes('=')) return null\n      if (!rawValue) {\n        checks.push({ path: name, not, compare: null })\n        continue\n      }\n      // a value carrying a colon or an equals sign is also rejected by the general path, in its own particular way, and a value holding a {variable} is only resolved on the opening arm of a chain. all three are left where their behavior is already written down\n      if (rawValue.includes(':') || rawValue.includes('=') || rawValue.includes('{')) return null\n      checks.push({ path: name, not, compare: rawValue })\n    }\n    const shapeIsOne = checks.length === 1 && typeof checks[0] === 'object'\n    const shapeIsPair = checks.length === 3 && typeof checks[0] === 'object' && typeof checks[1] === 'string' && typeof checks[2] === 'object'\n    return shapeIsOne || shapeIsPair ? checks : null\n  }\n\n  // whether a value counts as being there. an empty object or an empty array does not\n  function valuePresent (value) {\n    return value ? !(typeof value === 'object' && Object.keys(value).length === 0) : false\n  }\n\n  // whether one condition holds, given the value it looks up already looked up\n  function settleCheck (check, value) {\n    let result\n    if (check.compare === null) result = valuePresent(value)\n    else result = value == check.compare // eslint-disable-line eqeqeq -- teddy compares conditions loosely on purpose, so \"1\" and 1 are the same answer\n    return check.not ? !result : result\n  }\n\n  // whether conditions of a shape settled at compile time hold\n  //\n  // the general path's reduction is not repeated here, it is not needed: one condition reduces to itself, and two joined by an operator reduce to that operator applied to both. everything else still goes through the general path, which is the only place those rules are written\n  function settleChecks (checks, model, values) {\n    const first = settleCheck(checks[0], values ? values[0] : getOrSetObjectByDotNotation(model, checks[0].path))\n    if (checks.length === 1) return first\n    const second = settleCheck(checks[2], values ? values[2] : getOrSetObjectByDotNotation(model, checks[2].path))\n    if (checks[1] === 'and') return first && second\n    if (checks[1] === 'or') return first || second\n    return first !== second // xor\n  }\n\n  // every arm of a conditional chain gets its own slot. the interpreter leaves the whitespace between arms in place and writes the winning arm's content where that arm sat, so one slot for a whole chain would move content and change the output\n  function claimConditional (dom, el, slots, claimed, stack) {\n    const branch = { arms: [] }\n    for (const arm of collectChain(el)) {\n      claimed.add(arm)\n      const attribs = readAttribs(arm)\n      branch.arms.push({\n        kind: tagNameOf(arm),\n        attribs,\n        checks: conditionChecks(attribs),\n        // compiled once the document has been serialized: recursing now would descend into a dom that is still being rewritten\n        bodySource: dom(arm).html(),\n        body: null\n      })\n      const armNode = makeNode('arm')\n      armNode.branch = branch\n      armNode.index = branch.arms.length - 1\n      armNode.stack = stack\n      slots.push(armNode)\n      dom(arm).replaceWith(tokenFor(slots.length - 1))\n    }\n  }\n\n  function claimLoop (dom, el, slots, stack) {\n    const attribs = readAttribs(el)\n    const node = makeNode('loop')\n    node.stack = stack\n    node.through = attribValue(attribs, 'through')\n    node.keyName = attribValue(attribs, 'key')\n    node.valName = attribValue(attribs, 'val')\n    node.bodySource = dom(el).html()\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  // an element carrying one line ifs has an opening tag that depends on the model, so it cannot be part of the static markup. rather than reproducing how the dom parser writes an attribute list out, the opening tag is worked out here for every combination of outcomes, by that same parser, applying the same attribute changes the interpreter applies. the render then picks one of them\n  function claimOneLineIf (dom, el, slots, stack) {\n    const pairs = readAttribs(el)\n\n    // an element can carry a sequence of one line conditionals rather than only one: a condition, any further conditions joined to it, then the outcomes for that condition, and then possibly another condition beginning the next one in the sequence\n    const conditionals = []\n    let current = null\n    for (const [name, value] of pairs) {\n      if (name.startsWith('if-')) {\n        if (!current || current.ifTrue !== undefined || current.ifFalse !== undefined) {\n          current = { argSources: [], args: null, dynamic: false, ifTrue: undefined, ifFalse: undefined }\n          conditionals.push(current)\n        }\n        // split the way the interpreter splits it rather than by length, so an attribute name containing if- more than once is read identically\n        const condition = name.split('if-')[1]\n        current.argSources.push([condition, value])\n        // a condition whose value names a variable is not known until there is a model to read it from, exactly as for an <if> tag. the variable may sit anywhere in the value rather than at its head, so any brace means the value has to be resolved\n        if (value && value.includes('{')) current.dynamic = true\n      } else if (OUTCOMES.has(name)) {\n        if (current) current[name === 'true' ? 'ifTrue' : 'ifFalse'] = value.replaceAll('&quot;', '\"')\n      } else if (JOINERS.has(name)) {\n        if (current) current.argSources.push([name, null])\n      }\n    }\n    if (!conditionals.length) {\n      warn(params, `a <${tagNameOf(el)}> carries a \"${pairs.find(([name]) => OUTCOMES.has(name))?.[0]}\" attribute with no if- condition for it to be the outcome of, so it has been removed.`)\n      for (const [name] of pairs) if (OUTCOMES.has(name) || JOINERS.has(name)) dom(el).removeAttr(name)\n      return\n    }\n\n    // a condition holding nothing model dependent is reduced to its finished form once, here, rather than being rebuilt on every render\n    for (const conditional of conditionals) {\n      if (!conditional.dynamic) conditional.args = oneLineArgs(conditional.argSources, null)\n      conditional.checks = conditional.dynamic ? null : conditionChecks(conditional.argSources)\n    }\n\n    const { openTag, closeTag } = splitTag(dom, el)\n    // whether either half of a one line if has anything to ask a model about, settled here so that emitted code inside a <loop> knows not to build one. working out which outcomes apply needs a model only for a condition this could not settle, and writing the opening tag needs one only if the tag or an outcome holds a {variable}\n    const outcomesNeedModel = conditionals.some(conditional => !conditional.checks)\n    const variantNeedsModel = openTag.includes('{') || conditionals.some(conditional => (conditional.ifTrue || '').includes('{') || (conditional.ifFalse || '').includes('{'))\n    const node = makeNode('attrs')\n    node.conditionals = conditionals\n    node.outcomesNeedModel = outcomesNeedModel\n    node.variantNeedsModel = variantNeedsModel\n    node.openTag = openTag\n    node.closeTag = closeTag\n    node.tagName = tagNameOf(el)\n    node.variants = []\n    node.bodySource = dom(el).html()\n    node.stack = stack\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  // an <include> is resolved while compiling: the partial is loaded, compiled, and becomes part of the parent's tree, so nothing about finding or parsing it is left to happen per render\n  //\n  // an <arg> is compiled as a template of its own and rendered against the model the include is reached with, rather than being handed to the partial as unrendered markup for a later pass to finish. that is what keeps an argument carrying markup or a {variable} on the fast path, and it resolves such an argument against the caller's model rather than against the partial's, which differs only where one argument's body names another argument\n  //\n  // what the html spec allows a custom element to be called, near enough: lower case, starting with a letter, and holding at least one hyphen. the hyphen is what keeps it from colliding with a tag the browser may define later, and is why a name without one is not a custom element at all\n  const CUSTOM_ELEMENT_NAME = /^[a-z][a-z0-9.]*-[a-z0-9._-]*$/\n\n  // what an include reads for itself, so that everything else written on one can be passed along to the element it renders as\n  const COMPONENT_ATTRIBUTES = new Set(['src', 'as', 'hydrate', 'mode'])\n\n  // where a component's markup is written\n  //\n  // `both` writes it into a declarative shadow root and keeps a copy of it beside that as fallback content, so that a browser which builds shadow roots renders the first and one which does not renders the second. `shadow` writes the shadow root alone, which is smaller but renders nothing at all where declarative shadow dom is unsupported, including in anything that parses html without being a browser. `light` writes the fallback alone, into the element's light dom\n  const COMPONENT_MODES = new Set(['both', 'shadow', 'light'])\n\n  // the slot the fallback of a `both` component names, which no component defines\n  //\n  // a browser that builds the shadow root leaves a child naming a slot that is not there unassigned, and an unassigned child is not rendered, so the fallback sits there inert. one that does not build it has no slots to assign anything to, ignores the attribute, and renders the fallback\n  const FALLBACK_SLOT = 'teddy-fallback'\n\n  // markup inside one of these is content rather than something to render, so an element written there is left as it was\n  const UNPARSED = new Set(['pre', 'noteddy', 'noparse'])\n\n  function hasUnparsedAncestor (el) {\n    let parent = el.parent || el.parentNode\n    while (parent) {\n      if (parent.teddyTemplateHost) {\n        parent = parent.teddyTemplateHost\n        continue\n      }\n      const name = tagNameOf(parent)\n      if (!name) return false\n      // a <pre parse> is asking for its contents to be parsed, so it does not own them\n      if (UNPARSED.has(name) && !(name === 'pre' && carriesParse(parent))) return true\n      parent = parent.parent || parent.parentNode\n    }\n    return false\n  }\n\n  // what a component's markup looks like in the light dom, where a <style> would leak to the rest of the page, a <slot> has no shadow root to project anything into, and a <script> has already run once as part of the page\n  //\n  // a component holding a default <slot> would project the fallback straight back into itself beside the real content, so that one is held out of the slots by name. a component whose slots are all named, or which has none, needs nothing: its fallback is unassigned already\n  function fallbackMarkup (markup) {\n    const dom = cheerioLoad(markup || '', cheerioOptions)\n    const slots = Array.from(dom('slot')).filter(el => !hasUnparsedAncestor(el))\n    const held = slots.some(el => !attribValue(readAttribs(el), 'name'))\n    for (const el of Array.from(dom('style, script, slot')).filter(el => !hasUnparsedAncestor(el))) dom(el).remove()\n    const stripped = dom.html()\n    return held ? `<div slot=\"${FALLBACK_SLOT}\">${stripped}</div>` : stripped\n  }\n\n  function claimInclude (dom, el, slots, stack) {\n    const src = attribValue(readAttribs(el), 'src')\n\n    // the interpreter drops an include with no src rather than leaving anything behind\n    if (!src) {\n      if (params.verbosity > 1) console.warn('teddy encountered an include tag with no src attribute.')\n      dom(el).replaceWith('')\n      return\n    }\n\n    // a src that names a variable is not known until there is a model to read it from, so the partial behind it is loaded and compiled on the first render that asks for it and kept against that name\n    if (src.includes('{')) {\n      const node = makeNode('dynamicInclude')\n      node.src = src\n      node.bindings = readArgs(dom, el)\n      node.compiled = new Map()\n      node.stack = stack\n      slots.push(node)\n      dom(el).replaceWith(tokenFor(slots.length - 1))\n      return\n    }\n\n    // a template that includes itself would otherwise be compiled forever\n    if (stack.includes(src)) {\n      throw new Error(`teddy: the template \"${src}\" includes itself, directly or through the templates it includes, so it can never finish compiling. include stack: ${stack.concat(src).map(name => JSON.stringify(name)).join(' -> ')}`)\n    }\n\n    const included = loadTemplate(src)\n    let markup = included\n    if (included === null) {\n      if (params.verbosity > 1) console.warn(`teddy encountered an include tag with a src set to a template that could not be found: ${src}`)\n      markup = params.includeNotFoundBehavior === 'display' ? `Template \"${src}\" not found!` : ''\n    }\n\n    const node = makeNode('scope')\n    node.bindings = readArgs(dom, el)\n    node.bodySource = markup\n    node.stack = stack.concat(src)\n    // an include asked to render as a custom element writes its markup into a declarative shadow root inside that element, rather than in place of it. a browser's parser builds the shadow root as it reads the page, so the markup is there, encapsulated, before any javascript runs; and when the element is upgraded its shadow root is already populated, so nothing has to be rendered again\n    //\n    // both halves of the wrapper are settled here, so that walking the tree and running emitted code cannot disagree about what a component looks like\n    const attribs = readAttribs(el)\n    const element = attribValue(attribs, 'as')\n    if (element) {\n      if (!CUSTOM_ELEMENT_NAME.test(element)) throw new Error(`teddy: \"${element}\" cannot name a custom element, so <include src=\"${src}\" as=\"${element}\"> has nothing it could render as. the name has to be lower case and hold a hyphen, like \"my-card\"`)\n      node.element = element\n\n      // every other attribute written on the include belongs to the element it renders as, which is how a custom element is configured: a class watches the attributes it named in observedAttributes, and teddy has nothing to say about which those are\n      //\n      // the opening tag is compiled rather than written out as it stands, so that an attribute whose value holds a {variable} resolves the way it would anywhere else\n      const passed = attribs.filter(([name]) => !COMPONENT_ATTRIBUTES.has(name))\n\n      // where the markup goes. a component is written into a declarative shadow root with a fallback copy beside it unless it asks for something else, that being the only arrangement which renders whatever the browser turns out to support\n      const mode = attribs.some(([name]) => name === 'mode') ? attribValue(attribs, 'mode') : 'both'\n      if (!COMPONENT_MODES.has(mode)) throw new Error(`teddy: <include src=\"${src}\" as=\"${element}\" mode=\"${mode}\"> asks for a mode that is not one of ${[...COMPONENT_MODES].join(', ')}`)\n      node.mode = mode\n\n      // a component rendering into the light dom alone has no shadow root to hold its styles or fill its slots, so what it writes is the fallback markup rather than the template as it stands\n      if (mode === 'light') node.bodySource = fallbackMarkup(markup)\n      else if (mode === 'both') node.fallbackSource = fallbackMarkup(markup)\n\n      node.openNodes = []\n      pushText(node.openNodes, `<${element}${passed.map(([name, value]) => value === '' ? ` ${name}` : ` ${name}=\"${value}\"`).join('')}>${mode === 'light' ? '' : '<template shadowrootmode=\"open\">'}`)\n\n      // whatever the include was given that is not an <arg> is the component's light dom, which is what a <slot> in its shadow root projects. an <arg> names a value the template reads; this is content, and it belongs to the page rather than to the shadow root\n      node.lightSource = Array.from(dom(el).contents()).filter(child => tagNameOf(child) !== 'arg').map(child => dom(child).toString()).join('')\n      // a component told to hydrate is sent the part of the model it renders from, so that the class upgrading it can render the same template again from new data without asking a server for anything. it names what it needs rather than being guessed at, because an argument carries rendered markup and so can only ever be a string: a component reading a list or an object reads it from the model, and only the model can carry it back out again\n      const hydrate = attribValue(attribs, 'hydrate')\n      // a bare hydrate would otherwise do nothing at all, which is not what anyone writing it meant\n      if (!hydrate && attribs.some(([name]) => name === 'hydrate')) throw new Error(`teddy: <include src=\"${src}\" as=\"${element}\" hydrate> does not say what the component needs, so there is nothing to send it. name the model keys it renders from, like hydrate=\"product\"`)\n      if (hydrate) {\n        node.hydrate = hydrate.split(',').map(name => name.trim()).filter(Boolean)\n        for (const name of node.hydrate) {\n          if (name.includes('.')) throw new Error(`teddy: <include src=\"${src}\" as=\"${element}\" hydrate=\"${hydrate}\"> names \"${name}\", and a component is sent whole model keys rather than paths into them. name the key that holds it instead`)\n        }\n      }\n    }\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  // selected-value and checked-value mark whichever of an element's descendants carries a matching value\n  //\n  // when the value is written in the template the marking is settled here and nothing is left to a render. when it comes from the model, each candidate descendant gets its opening tag both ways and the render picks, which is the same approach one line ifs use\n  //\n  // a candidate written inside a <loop> or an <if> is still written in the template, so it is found and prepared here too; it simply ends up inside that construct's body and is decided once per iteration\n  //\n  // a candidate arriving through an <include> is the one case this cannot reach, because the partial has not been pulled in yet when this runs\n  function applySelectionAttributes (dom, slots) {\n    for (const [attr, childSelector, marker] of SELECTION_ATTRS) {\n      for (const el of Array.from(dom(`[${attr}]`))) {\n        if (browser) el.attribs = getAttribs(el)\n        if (!inlineIncludes(dom, el)) {\n          warn(params, `a ${attr} could not be applied because the elements it would mark come from an <include> that cannot be resolved before rendering: either its src is a variable, or it takes arguments. move the ${attr} inside the included template.`)\n          for (const name of Object.keys(el.attribs || {})) {\n            if ((name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name) === attr) dom(el).removeAttr(name)\n          }\n          continue\n        }\n\n        for (const [name, valueSource] of readAttribs(el)) {\n          if (name !== attr || !valueSource) continue\n          const candidates = Array.from(dom(el).find(childSelector))\n          for (const child of candidates) {\n            if (browser) child.attribs = getAttribs(child)\n            const ownValue = child.attribs.value\n            // both sides have to be written out before the match can be settled here\n            if (!valueSource.includes('{') && !(ownValue && ownValue.includes('{'))) {\n              if (ownValue === valueSource) dom(child).attr(marker, marker)\n              continue\n            }\n            claimSelectionCandidate(dom, child, slots, valueSource, ownValue, marker)\n          }\n        }\n\n        // the attribute has done its job, and the interpreter takes it off too\n        for (const name of Object.keys(el.attribs || {})) {\n          if ((name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name) === attr) dom(el).removeAttr(name)\n        }\n      }\n    }\n  }\n\n  // an <include> inside a selection container is pulled in here, before the candidates are looked for, because otherwise its <option> or <input> elements would not be there to find. only a plain include can be inlined this way: one taking arguments has a scope of its own, which inlining would lose\n  function inlineIncludes (dom, container) {\n    for (let round = 0; round < 10; round++) {\n      const includes = Array.from(dom(container).find('include'))\n      if (!includes.length) return true\n      for (const el of includes) {\n        const src = attribValue(readAttribs(el), 'src')\n        if (!src || src.includes('{')) return false\n        for (const child of Array.from(dom(el).children())) if (tagNameOf(child) === 'arg') return false\n        const markup = loadTemplate(src)\n        if (markup === null) return false\n        dom(el).replaceWith(markup)\n      }\n    }\n    return false // includes nested past any sensible depth\n  }\n\n  // one candidate for a selected-value or checked-value whose value is not known yet: its opening tag is prepared both marked and unmarked, and the render writes whichever the model calls for\n  function claimSelectionCandidate (dom, el, slots, valueSource, ownValue, marker) {\n    const tagName = tagNameOf(el)\n    const { openTag, closeTag } = splitTag(dom, el)\n\n    const plain = []\n    pushText(plain, openTag)\n\n    const probe = cheerioLoad(openTag + closeTag, cheerioOptions)\n    const target = probe(tagName)[0]\n    if (!target) throw internalError(`a <${tagName}> could not be read back after being parsed on its own`)\n    probe(target).attr(marker, marker)\n    const rebuilt = probe(target).toString()\n    const marked = []\n    pushText(marked, closeTag && rebuilt.endsWith(closeTag) ? rebuilt.slice(0, rebuilt.length - closeTag.length) : rebuilt)\n\n    const node = makeNode('selection')\n    node.valueSource = valueSource\n    node.ownValue = ownValue\n    node.variants = [plain, marked]\n    node.closeTag = closeTag\n    node.bodySource = dom(el).html()\n    node.stack = []\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  // <noteddy> and <noparse> keep their contents out of teddy's hands. the interpreter lifts them out of the markup, renders everything else, and puts them back at the very end; here they simply become a piece of text nothing further is done to, which is the same thing said more directly\n  function claimNoParse (dom, el, slots, keepTags) {\n    const node = makeNode('raw')\n    node.value = keepTags ? dom(el).toString() : dom(el).html()\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  // a <pre> keeps its own tags as well as its contents, unless it carries a parse attribute, which asks for the opposite: its contents are compiled like anything else and the attribute itself comes off, which is what the stray tag sweep does for the interpreter\n  function claimPre (dom, el, slots) {\n    if (carriesParse(el)) {\n      dom(el).removeAttr('parse')\n      return\n    }\n    claimNoParse(dom, el, slots, true)\n  }\n\n  function carriesParse (el) {\n    if (browser) el.attribs = getAttribs(el)\n    return !!el.attribs && Object.prototype.hasOwnProperty.call(el.attribs, 'parse')\n  }\n\n  // a <cache> keeps the markup its body rendered to and writes that instead of rendering again. the interpreter does this in two halves, marking the element on the way in and storing what it produced once the output has gone stable; a compiled render knows when the body is finished, so it is one step here\n  function claimCache (dom, el, slots, stack) {\n    const attribs = readAttribs(el)\n    const node = makeNode('cache')\n    node.name = attribValue(attribs, 'name')\n    // an absent key means the whole body is cached under one entry, which teddy calls 'none'\n    node.key = attribValue(attribs, 'key')\n    node.maxAge = parseInt(attribValue(attribs, 'maxAge') || attribValue(attribs, 'maxage')) || 0\n    node.maxCaches = parseInt(attribValue(attribs, 'maxCaches') || attribValue(attribs, 'maxcaches')) || 1000\n    node.bodySource = dom(el).html()\n    node.stack = stack\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  function claimInline (dom, el, slots) {\n    const attribs = readAttribs(el)\n    const node = makeNode('inline')\n    node.css = attribValue(attribs, 'css')\n    node.js = attribValue(attribs, 'js')\n    slots.push(node)\n    dom(el).replaceWith(tokenFor(slots.length - 1))\n  }\n\n  function readArgs (dom, el) {\n    const bindings = []\n    for (const child of Array.from(dom(el).children())) {\n      if (tagNameOf(child) !== 'arg') continue\n      if (browser) child.attribs = getAttribs(child)\n      // the interpreter takes an argument's name from its first attribute, and skips one that has none\n      const name = Object.keys(child.attribs || {})[0]\n      if (!name) continue\n      bindings.push({ name, bodySource: dom(child).html(), body: null })\n    }\n    return bindings\n  }\n\n  // a template is parsed before the model contributes anything to it, so it has to be well formed on its own\n  //\n  // only a close with no open at all is reported: html leaves plenty of tags implicitly closed, and complaining about those would be noise\n  function reportStrayClosingTags (source) {\n    if (params.verbosity < 1 || !source || !source.includes('</')) return\n    const open = []\n    for (const match of tagsOutsideUnparsedContent(source)) {\n      const name = match[2].toLowerCase()\n      if (VOID_ELEMENTS.has(name) || match[3].trimEnd().endsWith('/')) continue\n      if (!match[1]) open.push(name)\n      else if (open.includes(name)) open.splice(open.lastIndexOf(name), 1)\n      else {\n        console.warn(`teddy: the template closes a <${name}> it never opened. templates are parsed on their own, so a closing tag cannot be paired up by markup arriving through the model, and this one will be dropped.`)\n        return\n      }\n    }\n  }\n\n  // an element's opening and closing tags, taken apart by length rather than by looking for a bracket, since an attribute value may contain one. a void element has no closing tag and all of its serialization is the opening tag\n  function splitTag (dom, el) {\n    const outer = dom(el).toString()\n    const inner = dom(el).html() || ''\n    const closeTag = `</${tagNameOf(el)}>`\n    if (!outer.endsWith(closeTag) || outer.length < closeTag.length + inner.length) return { openTag: outer, closeTag: '' }\n    return { openTag: outer.slice(0, outer.length - closeTag.length - inner.length), closeTag }\n  }\n\n  // the opening tag as it looks with one combination of outcomes applied: the parser is handed the tag on its own, the one line if attributes come off it, the outcomes go on, and the result is read back out. bit `i` of outcomes is set when condition `i` came out true\n  function openTagFor (openTag, closeTag, tagName, conditionals, outcomes) {\n    const probe = cheerioLoad(openTag + closeTag, cheerioOptions)\n    const target = probe(tagName)[0]\n    if (!target) throw internalError(`a <${tagName}> carrying a one line if could not be read back after being parsed on its own`)\n    if (browser) target.attribs = getAttribs(target)\n\n    // the interpreter takes every one line if attribute off before it applies any outcome, so an outcome lands after whatever attributes the element keeps\n    for (const name of Object.keys(target.attribs || {})) {\n      const clean = name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name\n      if (clean.startsWith('if-') || OUTCOMES.has(clean) || JOINERS.has(clean)) probe(target).removeAttr(name)\n    }\n    for (let i = 0; i < conditionals.length; i++) {\n      const outcome = (outcomes >> i) & 1 ? conditionals[i].ifTrue : conditionals[i].ifFalse\n      if (!outcome) continue\n      const parts = outcome.split('=')\n      probe(target).attr(parts[0], parts[1] ? parts[1].replace(/[\"']/g, '') : '')\n    }\n\n    const rebuilt = probe(target).toString()\n    return closeTag && rebuilt.endsWith(closeTag) ? rebuilt.slice(0, rebuilt.length - closeTag.length) : rebuilt\n  }\n\n  // from an <if> or <unless>, the elseif, elseunless and else tags belonging to it. this mirrors the interpreter's sibling walk exactly, including that it steps over text nodes and stops at the next fresh if or unless\n  function collectChain (el) {\n    const chain = [el]\n    let sibling = el.nextSibling\n    while (sibling) {\n      const name = tagNameOf(sibling)\n      if (ARM_TAGS.has(name)) {\n        chain.push(sibling)\n        sibling = sibling.nextSibling\n      } else if (OPENERS.has(name)) break\n      else sibling = sibling.nextSibling\n    }\n    return chain\n  }\n\n  function tagNameOf (el) {\n    if (!el) return ''\n    return (browser ? el.nodeName?.toLowerCase() : el.name) || ''\n  }\n\n  // an element's attributes in source order, as pairs rather than an object. a condition may name the same variable or the same operator twice, and those arrive renamed so an html parser will not drop them; collapsing them into an object by their real names would silently throw one away and change what the condition means\n  function readAttribs (el) {\n    if (browser) el.attribs = getAttribs(el)\n    const pairs = []\n    for (const name in el.attribs) {\n      pairs.push([name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name, el.attribs[name]])\n    }\n    return pairs\n  }\n\n  function attribValue (pairs, name) {\n    for (const [key, value] of pairs) if (key === name) return value\n    return undefined\n  }\n\n  function hasConstructAncestor (el) {\n    let parent = el.parent || el.parentNode\n    while (parent) {\n      // a template's children sit in a fragment of its own, so the walk carries on from the template that fragment belongs to: a construct enclosing the template still encloses what is inside it\n      if (parent.teddyTemplateHost) {\n        parent = parent.teddyTemplateHost\n        continue\n      }\n      const name = tagNameOf(parent)\n      if (!name || name === 'body' || name === 'html' || name === 'root' || name === '#document-fragment') return false\n      // a <pre parse> is asking for its contents to be parsed, so it does not own them\n      if ((STRUCTURAL.has(name) && !(name === 'pre' && carriesParse(parent))) || carriesOneLineIf(parent)) return true\n      parent = parent.parent || parent.parentNode\n    }\n    return false\n  }\n\n  function carriesOneLineIf (el) {\n    if (browser) el.attribs = getAttribs(el)\n    if (!el.attribs) return false\n    for (const name in el.attribs) {\n      if (OUTCOMES.has(name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name)) return true\n    }\n    return false\n  }\n\n  // by the time this runs every construct has been claimed, so a teddy tag still standing here is one that belongs to nothing: e.g. an <arg> with no <include> around it, or an <else> with no <if> before it\n  function sweepOrphanedTags (dom) {\n    for (const name of ORPHANABLE) {\n      for (const el of Array.from(dom(name))) {\n        warn(params, `a <${name}> in the template has no ${name === 'arg' ? '<include> around it' : 'preceding <if> or <unless>'}, so it and its contents have been removed.`)\n        dom(el).remove()\n      }\n    }\n    for (const el of Array.from(dom('*'))) {\n      if (browser) el.attribs = getAttribs(el)\n      for (const name in el.attribs) {\n        const clean = name.includes('-teddyduplicate') ? name.split('-teddyduplicate')[0] : name\n        // a one line if is claimed before this runs, and one carrying no condition has had its attributes taken off, so nothing should be left here\n        if (OUTCOMES.has(clean)) throw internalError(`a \"${clean}\" attribute survived one line if compilation on a <${tagNameOf(el)}>`)\n      }\n    }\n  }\n\n  // splits the serialized markup on its placeholders, and splits the literal text between them into runs of markup and variable slots\n  function buildNodes (markup, slots) {\n    const nodes = []\n    let cursor = 0\n\n    while (cursor < markup.length) {\n      const open = markup.indexOf(token, cursor)\n      if (open === -1) {\n        pushText(nodes, markup.slice(cursor))\n        break\n      }\n      pushText(nodes, markup.slice(cursor, open))\n      const close = markup.indexOf(token, open + 1)\n      if (close === -1) throw internalError('a placeholder did not survive serialization intact')\n      const index = Number(markup.slice(open + 1, close))\n      if (!Number.isInteger(index) || !slots[index]) throw internalError(`a placeholder referred to a slot that does not exist: ${JSON.stringify(markup.slice(open + 1, close))}`)\n      nodes.push(slots[index])\n      cursor = close + 1\n    }\n\n    return nodes\n  }\n\n  function pushTextNode (nodes, value) {\n    const node = makeNode('text')\n    node.value = value\n    nodes.push(node)\n  }\n\n  function notFoundBody (src) {\n    const nodes = []\n    pushTextNode(nodes, params.includeNotFoundBehavior === 'display' ? `Template \"${src}\" not found!` : '')\n    return nodes\n  }\n\n  function pushText (nodes, text) {\n    if (!text) return\n    let cursor = 0\n    let literalFrom = 0\n\n    while (cursor < text.length) {\n      const open = text.indexOf('{', cursor)\n      if (open === -1) break\n\n      // the closing brace is found by counting nested braces, the way teddy's own delimiter matcher does, so that only an outermost balanced pair is ever treated as a variable. that is what keeps a css rule or a block of javascript from being read as one: the interpreter does not substitute a variable sitting inside a brace pair either\n      let depth = 0\n      let close = -1\n      for (let i = open; i < text.length; i++) {\n        if (text[i] === '{') depth++\n        else if (text[i] === '}' && --depth === 0) {\n          close = i\n          break\n        }\n      }\n      if (close === -1) break // the braces do not balance, so the rest of this run is text\n      const inner = text.slice(open + 1, close)\n\n      if (!inner || !VALID_VARIABLE.test(inner)) {\n        // not a variable, so the whole pair is ordinary text and the scan resumes after it\n        cursor = close + 1\n        continue\n      }\n\n      // a variable name may hold a variable of its own: {a{b}} resolves b, joins the result onto a, and looks up whatever that spells. the name is a little template, so it is compiled as one and rendered when there is a model to render it against\n      const computed = inner.includes('{')\n\n      // teddy substitutes a variable in both its {name} and its template literal ${name} form, so a dollar immediately before the brace is part of this variable's span and is consumed with it\n      const spanStart = open > literalFrom && text[open - 1] === '$' ? open - 1 : open\n      if (spanStart > literalFrom) pushTextNode(nodes, text.slice(literalFrom, spanStart))\n      if (computed) {\n        const nameNodes = []\n        pushText(nameNodes, inner)\n        const node = makeNode('computedVar')\n        node.nameNodes = nameNodes\n        node.source = text.slice(spanStart, close + 1)\n        nodes.push(node)\n      } else {\n        // a variable's flags are the same for every render, so they are settled here rather than read off the end of its name every time\n        const flags = variableFlags(inner)\n        const node = makeNode('var')\n        node.name = inner\n        node.flags = flags\n        node.source = text.slice(spanStart, close + 1)\n        node.dollar = spanStart !== open\n        // only a raw variable can put markup into the page that a further look would parse: an escaped one cannot, and a no parse one is never looked at again\n        node.raw = flags.raw\n        nodes.push(node)\n      }\n      cursor = close + 1\n      literalFrom = cursor\n    }\n\n    if (literalFrom < text.length) pushTextNode(nodes, text.slice(literalFrom))\n  }\n\n  // #endregion\n\n  // #region rendering\n\n  const valueTemplates = new Map()\n\n  // a value that arrived through the model may be a little template in its own right: it can hold {variables}, and a raw one can hold teddy tags. rather than handing the page back to the interpreter, the value is compiled and kept against itself, so a snippet that recurs is compiled once and rendered from then on\n  //\n  // returns null when the value has to go to the interpreter after all\n  function compileValue (text) {\n    let nodes = valueTemplates.get(text)\n    if (nodes !== undefined) return nodes\n    if (HAS_TEDDY_TAGS.test(text) && !isSelfContained(text)) nodes = null\n    else nodes = compileTemplate(text)\n    if (valueTemplates.size > MAX_VALUE_TEMPLATES) valueTemplates.clear()\n    valueTemplates.set(text, nodes)\n    return nodes\n  }\n\n  // whether a value's tags open and close within the value, so that it stands on its own\n  //\n  // a value that opens a construct the surrounding template closes, or closes one the template opened, only means anything joined to that template. teddy renders such a thing because it reparses its own output, and that is the one case a value cannot be compiled on its own\n  function isSelfContained (text) {\n    const open = []\n    for (const match of tagsOutsideUnparsedContent(text)) {\n      const [, closing, rawName, rest] = match\n      const name = rawName.toLowerCase()\n      if (VOID_ELEMENTS.has(name) || rest.trimEnd().endsWith('/')) continue\n      if (!closing) open.push(name)\n      else if (open[open.length - 1] === name) open.pop()\n      else return false // closes something this value never opened\n    }\n    return open.length === 0\n  }\n\n  // a value that turned out to be a template: compiled, then rendered against the model in hand\n  //\n  // the chain of values being resolved is kept so that a value which comes round again is recognized as a loop in the model rather than chased until something gives out\n  function renderValue (text, model, state) {\n    if (state.values.includes(text) || state.values.length >= MAX_VALUE_DEPTH) {\n      if (params.verbosity > 0) {\n        const chain = state.values.concat(text).map(value => JSON.stringify(value.length > 40 ? value.slice(0, 40) + '...' : value))\n        console.error(`teddy: a value in the model refers back to itself, so it can never finish resolving, and it has been written out as it stands. the values leading the chain were: ${chain.join(' -> ')}`)\n      }\n      return text\n    }\n    const nodes = compileValue(text)\n    // markup arriving through the model has to make sense on its own. one that opens a teddy tag it does not close, or closes one it did not open, only means something joined to the template it landed in, and a template is no longer reparsed once its values are in place\n    if (nodes === null) {\n      warn(params, `a variable was given markup that is not complete on its own, so it has been left out. markup coming from the model has to open and close its own tags: ${JSON.stringify(text.length > 120 ? text.slice(0, 120) + '...' : text)}`)\n      return ''\n    }\n    state.values.push(text)\n    const out = renderNodes(nodes, model, state)\n    state.values.pop()\n    return out\n  }\n\n  function renderNodes (nodes, model, state) {\n    let out = ''\n    // the arms of one chain are always consecutive in a node list, so the winner is worked out when the first arm is reached and reused by the rest without any bookkeeping\n    let openBranch = null\n    let winningArm = -1\n\n    for (const node of nodes) {\n      switch (node.type) {\n        case 'text':\n          out += node.value\n          break\n\n        case 'var': {\n          // the name is split once for the life of the template rather than on every render\n          if (node.path === null) node.path = node.flags.name.split('.')\n          const resolved = formatVariable(node.flags, getOrSetObjectByDotNotation(model, node.path), model)\n          // nothing to write, so the variable stays in the markup verbatim\n          if (!resolved) {\n            out += node.source\n            break\n          }\n          // a variable that did not resolve keeps its own text, and the dollar of a ${name} form survives with it because teddy skips that substitution in this case\n          if (node.dollar && resolved.skipTemplateLiteralReplacement) out += '$'\n          out += writeValue(resolved, node.raw, model, state)\n          break\n        }\n\n        case 'arm':\n          if (node.branch !== openBranch) {\n            openBranch = node.branch\n            winningArm = pickArm(node.branch, model)\n          }\n          if (node.index === winningArm) out += renderNodes(node.branch.arms[node.index].body, model, state)\n          break\n\n        case 'attrs':\n          out += renderNodes(attrsVariant(node, attrsOutcomes(node, model)), model, state)\n          out += renderNodes(node.body, model, state)\n          out += node.closeTag\n          break\n\n        case 'raw':\n          out += rawBlock(node, model)\n          break\n\n        case 'inline':\n          out += inlineBlock(node, model)\n          break\n\n        case 'computedVar':\n          out += computedVariable(renderNodes(node.nameNodes, model, state), model, state)\n          break\n\n        case 'selection':\n          out += renderNodes(node.variants[selectionMarked(node, model) ? 1 : 0], model, state)\n          out += renderNodes(node.body, model, state)\n          out += node.closeTag\n          break\n\n        case 'cache':\n          out += cacheBlock(node, model, () => renderNodes(node.body, model, state))\n          break\n\n        case 'dynamicInclude':\n          out += renderNodes(dynamicBody(node, model), node.bindings.length ? bindArgs(model, node.bindings, node.bindings.map(binding => renderNodes(binding.body, model, state))) : model, state)\n          break\n\n        case 'scope': {\n          const values = node.bindings.length ? node.bindings.map(binding => renderNodes(binding.body, model, state)) : null\n          const scoped = values ? bindArgs(model, node.bindings, values) : model\n          const inner = renderNodes(node.body, scoped, state)\n          if (node.element === null) {\n            out += inner\n            break\n          }\n          // a component is its opening tag, then the shadow root the template rendered into and the fallback copy of it if there is one, then whatever the page put inside it, and then the model it was sent if it asked for one\n          out += renderNodes(node.openNodes, model, state) + inner\n          if (node.mode !== 'light') out += '</template>'\n          if (node.fallbackNodes !== null) out += renderNodes(node.fallbackNodes, scoped, state)\n          out += renderNodes(node.lightNodes, model, state) + (node.hydrate ? componentPayload(node, model) : '') + `</${node.element}>`\n          break\n        }\n\n        case 'loop':\n          out += renderLoop(node, model, state)\n          break\n      }\n    }\n\n    return out\n  }\n\n  // what a resolved variable actually writes. a value that turned out to hold {variables} or teddy tags of its own is a template and is rendered as one; anything else is already finished\n  //\n  // a variable that did not resolve is left out of this: its text always holds a brace, and treating every missing variable as a template would cost the win for nothing\n  function writeValue (resolved, raw, model, state) {\n    const text = writePlainValue(resolved, raw)\n    return text === NEEDS_MODEL ? renderValue(resolved.text, model, state) : text\n  }\n\n  // what a {variable} carrying no flags writes, when that can be answered from the value alone, and undefined when the full path has to work it out\n  //\n  // undefined is the answer for \"ask properly\" because it is the cheapest thing a caller can test for, and no value this can say yes to is undefined\n  //\n  // a plain variable holding a plain string is the overwhelming majority of what a page writes, and for that there is nothing to decide: escape it and write it. answering it here saves working out flags that were settled at compile time, building the object that carries the answer, and asking a second time whether the answer is finished\n  //\n  // the one scan covers both jobs at once. a value with nothing in it that needs escaping and no {variable} of its own is finished, and a value that trips the scan is rare enough to be worth going back over\n  function quickValue (value) {\n    const type = typeof value\n    // a string is asked about first because a string is what almost every variable holds, and the two questions it has to answer are answered by the one scan: nothing to escape and no {variable} of its own means the value is already what it writes\n    //\n    // the empty string is not checked for: it trips nothing here and writes as itself, which is what the full path would decide too\n    if (type === 'string') {\n      if (!QUICK_VALUE_STOP.test(value)) return value\n      if (value.includes('{')) return undefined\n      return escapeEntities(value)\n    }\n    // a number writes itself and needs no scanning: there is nothing in one to escape and nothing in one that could be teddy code. zero is left to the full path because whether it writes \"0\" or nothing at all depends on a setting, and so is a NaN, which writes the variable's own text\n    if (type === 'number') return value === 0 || Number.isNaN(value) ? undefined : value\n    if (type === 'boolean') return value || undefined // false writes the variable's own text\n    return undefined\n  }\n\n  // what a variable writes when the quick answer did not apply\n  //\n  // this is one call rather than the half dozen lines of branching it replaces, because those lines sat in the emitted function for every variable on the page and were almost never the ones taken. a shorter function is one v8 will inline into, and the branches are the same branches either way\n  //\n  // dollar says the variable was written in template literal form. a variable that did not resolve keeps its own text, and the dollar keeps its place in front of it\n  function slowValue (flags, value, raw, source, model, state, dollar) {\n    const resolved = formatVariable(flags, value, model)\n    if (resolved === null) return source\n    const text = writePlainValue(resolved, raw)\n    const written = text === NEEDS_MODEL ? renderValue(resolved.text, model, state) : text\n    return dollar && resolved.skipTemplateLiteralReplacement ? '$' + written : written\n  }\n\n  // what a resolved variable writes, when that can be answered without a model, and NEEDS_MODEL when it cannot\n  //\n  // almost every value is finished the moment it is looked up, and the two that are not are a value holding a {variable} of its own and a raw value holding teddy markup. emitted code asks this first and only reaches for a model on the rare answer, which is what lets a loop body avoid building one at all\n  function writePlainValue (resolved, raw) {\n    const text = resolved.text\n    if (typeof text !== 'string' || resolved.skipTemplateLiteralReplacement) return text\n    if (text.includes('{')) return NEEDS_MODEL\n    if (raw && needsAnotherLook(text)) return NEEDS_MODEL\n    return text\n  }\n\n  // whether a raw value holds anything teddy still has to do something about. a value made only of finished markup and teddy's own placeholders is done\n  function needsAnotherLook (text) {\n    if (!LOOKS_LIKE_TEDDY.test(text)) return false\n    return LOOKS_LIKE_TEDDY.test(text.replace(NOTEDDY_PLACEHOLDER, ''))\n  }\n\n  // which combination of a one line if's outcomes this model calls for, as a bitmask\n  //\n  // valueSets, when given, holds what each conditional's conditions look up already looked up, one array per conditional, which is what a compiled template hands in rather than having the lookups done again\n  function attrsOutcomes (node, model, valueSets) {\n    let outcomes = 0\n    for (let i = 0; i < node.conditionals.length; i++) {\n      const conditional = node.conditionals[i]\n      if (conditional.checks) {\n        if (settleChecks(conditional.checks, model, valueSets ? valueSets[i] : null)) outcomes |= 1 << i\n        continue\n      }\n      // evaluateConditional reduces the array it is handed to booleans as it goes, so a settled condition gets a copy: these have to survive to the next render\n      const args = conditional.dynamic ? oneLineArgs(conditional.argSources, model) : conditional.args.slice()\n      if (evaluateConditional(args, model)) outcomes |= 1 << i\n    }\n    return outcomes\n  }\n\n  // the element's opening tag for one combination of outcomes, worked out the first time a render calls for it and then kept\n  function attrsVariant (node, outcomes) {\n    let variant = node.variants[outcomes]\n    if (variant === undefined) {\n      // the opening tag may still hold a {variable} from one of the element's other attributes, so it is split into text and variable slots the same way the rest of the markup is\n      variant = []\n      pushText(variant, openTagFor(node.openTag, node.closeTag, node.tagName, node.conditionals, outcomes))\n      node.variants[outcomes] = variant\n    }\n    return variant\n  }\n\n  // every opening tag a one line if can produce, worked out while the template is compiled so that emitted code can write the tag itself instead of handing the job to the tree walker, which would need a model built for it\n  //\n  // an element carrying many conditions has too many combinations to write them all out, so those keep the lazy path, which builds only the combination a render actually arrives at\n  function attrsVariants (node) {\n    const total = 1 << node.conditionals.length\n    if (total > MAX_EMITTED_VARIANTS) return null\n    const all = []\n    for (let outcomes = 0; outcomes < total; outcomes++) all.push(attrsVariant(node, outcomes))\n    return all\n  }\n\n  // what closes a hydrating component: the shadow root, then the arguments it was rendered with, then the element itself\n  //\n  // the arguments travel as json in a script the browser will not execute, which is the ordinary way to hand a page some data and needs no permission a strict content security policy withholds. they sit in the light dom rather than the shadow root, so that re-rendering the shadow root does not throw them away\n  function componentPayload (node, model) {\n    const sent = {}\n    for (const name of node.hydrate) sent[name] = getOrSetObjectByDotNotation(model, name)\n    // the closing sequence of a script element is the one thing that could end the script early\n    const json = JSON.stringify(sent).replace(/<\\//g, '<\\\\/')\n    // naming a slot that no component defines is what keeps this out of a default slot: an empty slot attribute means the default slot, the same as writing none at all, while an element naming a slot that is not there is assigned to nothing and rendered nowhere\n    return `<script type=\"application/json\" class=\"teddy-component-model\" slot=\"teddy-component-model\">${json}</script>`\n  }\n\n  // the model an included template sees: the one the include was reached with, plus its arguments\n  function bindArgs (model, bindings, values) {\n    const localModel = Object.create(model || null)\n    for (let i = 0; i < bindings.length; i++) getOrSetObjectByDotNotation(localModel, bindings[i].name, values[i])\n    return localModel\n  }\n\n  // content exempt from parsing is held out of the markup rather than written into it, because the stray tag sweep at the end of a render reparses the finished page and would strip a teddy tag out of it. the same restoration at the end of the render puts it back\n  function rawBlock (node, model) {\n    return `<noteddy id=\"${model._noTeddyBlocks.push(node.value) - 1}\"></noteddy>`\n  }\n\n  function inlineBlock (node, model) {\n    const css = node.css && getOrSetObjectByDotNotation(model, node.css)\n    const js = node.js && getOrSetObjectByDotNotation(model, node.js)\n    if (css) return `<style>${css}</style>`\n    if (js) return `<script>${js}</script>`\n    // teddy drops an inline that names neither\n    if (params.verbosity > 1) console.warn('teddy encountered an <inline> element without a css or js attribute.')\n    return ''\n  }\n\n  // a variable whose name was built from other variables: the name is rendered first, then looked up, so {a{b}} with b of X asks the model for aX\n  function computedVariable (name, model, state) {\n    const flags = VALID_VARIABLE.test(name) ? variableFlags(name) : null\n    const resolved = flags ? formatVariable(flags, getOrSetObjectByDotNotation(model, flags.name), model) : null\n    if (!resolved) return `{${name}}`\n    return writeValue(resolved, name.slice(-6).includes('|s'), model, state)\n  }\n\n  // whether this candidate for a selected-value or checked-value is the one that carries the matching value\n  function selectionMarked (node, model) {\n    // teddy falls back to the attribute as written when the variable in it resolves to nothing\n    const target = parseVars(node.valueSource, model) || node.valueSource\n    // a candidate written inside a loop has had its own value substituted by the time it is compared, so it is compared substituted here too\n    const own = node.ownValue && node.ownValue.includes('{') ? parseVars(node.ownValue, model) : node.ownValue\n    return own === target\n  }\n\n  // whether one arm of a conditional chain is the one that applies\n  //\n  // values, when given, holds what each of the arm's conditions looks up, already looked up, which is what a compiled template hands in rather than having the lookups done again\n  function armMatches (arm, model, isFirst, values) {\n    if (arm.kind === 'else') return true\n    const inverted = arm.kind === 'unless' || arm.kind === 'elseunless'\n    // an arm of a shape settled at compile time is answered without building or reducing anything\n    if (arm.checks) {\n      const result = settleChecks(arm.checks, model, values)\n      return inverted ? !result : result\n    }\n    // only the opening if or unless resolves a {variable} in a condition's value; elseif and elseunless read the value as written. that is inconsistent, and it is preserved here because changing it would change what existing templates render\n    const result = evaluateConditional(conditionArgs(arm.attribs, model, isFirst), model, values)\n    return inverted ? !result : result\n  }\n\n  function pickArm (branch, model) {\n    for (let i = 0; i < branch.arms.length; i++) {\n      if (armMatches(branch.arms[i], model, i === 0, undefined)) return i\n    }\n    return -1\n  }\n\n  // the names a compile time settled set of conditions looks up, in the slots settleChecks reads them from\n  function conditionCheckPaths (checks) {\n    if (!checks) return null\n    if (checks.length === 1) return [checks[0].path]\n    return [checks[0].path, null, checks[2].path]\n  }\n\n  // the names an arm's conditions look up, in the order evaluateConditional will want them, or null where the entry is a boolean operator rather than a condition\n  function armPaths (arm) {\n    return arm.attribs.map(([name, value]) => conditionPath(value ? `${name}=${value}` : name))\n  }\n\n  // a one line if's conditions in the form evaluateConditional wants them. a joiner is stored with no value and goes in on its own; a condition whose value is a variable is resolved against the model, which is only ever needed when the compile could not settle it\n  function oneLineArgs (argSources, model) {\n    const args = []\n    for (const [name, value] of argSources) {\n      if (value === null) args.push(name)\n      else if (!value) args.push(name)\n      else args.push(`${name}=${model && value.includes('{') ? parseVars(value, model) : value}`)\n    }\n    return args\n  }\n\n  function conditionArgs (attribs, model, resolveValues) {\n    const args = []\n    for (const [name, raw] of attribs) {\n      let value = raw\n      if (value) {\n        if (resolveValues && value.includes('{')) value = parseVars(value, model)\n        args.push(`${name}=${value}`)\n      } else args.push(name)\n    }\n    return args\n  }\n\n  // what a loop walks: its collection's keys when the loop names its key, and the values themselves when it does not\n  //\n  // an array is walked by index rather than by key, which is both what the values already are and a far cheaper way to read an element than by a key spelled as a string\n  function loopWalk (collection, needsKey) {\n    if (needsKey) return Object.keys(collection)\n    return Array.isArray(collection) ? collection : Object.values(collection)\n  }\n\n  // whether what a loop was pointed at can be iterated, given a value already looked up. teddy drops a loop it cannot run rather than leaving its body behind\n  function iterable (collection, keyName, valName) {\n    if (!collection) {\n      if (params.verbosity > 1) console.warn('teddy encountered a loop without a through attribute.')\n      return null\n    }\n    if (!keyName && !valName) {\n      if (params.verbosity > 1) console.warn('teddy encountered a loop without a key or a val attribute.')\n      return null\n    }\n    if (collection instanceof Set) return [...collection]\n    return collection\n  }\n\n  // what a loop iterates when the name it was pointed at is only known once there is a model to read it from\n  //\n  // a {variable} may sit anywhere in the path rather than at its head, so any brace means the path has to be resolved before it is looked up\n  function loopCollection (through, keyName, valName, model) {\n    let source = through\n    if (source && source.includes('{')) source = parseVars(source, model)\n    return iterable(source ? getOrSetObjectByDotNotation(model, source) : undefined, keyName, valName)\n  }\n\n  // the model as a loop's body sees it: the model it was reached with, plus this iteration's key and val. emitted code needs this for the helpers it calls, which take a model rather than the javascript variables the emitted code keeps its locals in\n  //\n  // the enclosing model is reached through the prototype chain rather than copied. a loop of a thousand rows copied the whole model a thousand times, and because every copy started out owning nothing, writing this iteration's names into it also searched it for keys differing only in case each time round. an object made this way owns nothing but those two names, so neither cost is paid; a name holding a dot is left alone because setting one never did anything, and a value of undefined is left unset so that the enclosing model still answers for that name\n  function loopScope (model, keyName, key, valName, value) {\n    const localModel = Object.create(model || null)\n    if (keyName && key !== undefined && !keyName.includes('.')) localModel[keyName] = key\n    if (valName && value !== undefined && !valName.includes('.')) localModel[valName] = value\n    return localModel\n  }\n\n  // a <cache> writes the markup its body rendered to last time rather than rendering it again. renderBody is only called on a miss\n  function cacheBlock (node, model, renderBody) {\n    const name = node.name && node.name.includes('{') ? parseVars(node.name, model) : node.name\n    const keySource = node.key && node.key.includes('{') ? parseVars(node.key, model) : node.key\n    // a name or key that still holds a variable never resolved, and teddy leaves such an element alone until the stray tag sweep takes it away, contents and all\n    if (!name || name.includes('{') || (keySource && keySource.includes('{'))) return ''\n    const keyVal = keySource ? getOrSetObjectByDotNotation(model, keySource) : 'none'\n    const existing = caches[name]\n    const entry = existing && existing.entries && existing.entries[keyVal]\n    if (entry) {\n      const now = Date.now()\n      // an entry with no max age set never goes stale\n      if (!existing.maxAge || entry.lastAccessed + existing.maxAge > now) {\n        entry.lastAccessed = now\n        return entry.markup\n      }\n      delete existing.entries[keyVal]\n    }\n    const markup = renderBody()\n    if (!caches[name]) caches[name] = { key: keySource || 'none', maxAge: node.maxAge, maxCaches: node.maxCaches, entries: {} }\n    const stamp = Date.now()\n    caches[name].entries[keyVal] = { lastAccessed: stamp, created: stamp, markup }\n    // drop the least recently used entry once there are more than the element asked to keep\n    const entries = caches[name].entries\n    if (Object.keys(entries).length > node.maxCaches) {\n      delete entries[Object.keys(entries).reduce((a, b) => entries[a].lastAccessed < entries[b].lastAccessed ? a : b)]\n    }\n    return markup\n  }\n\n  // the compiled body of an <include> whose src is only known once there is a model to read it from, compiled the first time a render asks for that name and kept against it\n  function dynamicBody (node, model) {\n    const src = parseVars(node.src, model)\n    let body = node.compiled.get(src)\n    if (body !== undefined) return body\n    if (node.stack.includes(src)) {\n      throw new Error(`teddy: the template \"${src}\" includes itself, directly or through the templates it includes, so it can never finish compiling. include stack: ${node.stack.concat(src).map(name => JSON.stringify(name)).join(' -> ')}`)\n    }\n    const markup = loadTemplate(src)\n    body = markup === null\n      ? notFoundBody(src)\n      : compileTemplate(markup, node.stack.concat(src))\n    node.compiled.set(src, body)\n    return body\n  }\n\n  function renderLoop (node, model, state) {\n    const collection = loopCollection(node.through, node.keyName, node.valName, model)\n    if (!collection) return ''\n\n    let out = ''\n    const needsKey = !!node.keyName\n    const items = loopWalk(collection, needsKey)\n    for (let i = 0; i < items.length; i++) {\n      const key = needsKey ? items[i] : null\n      out += renderNodes(node.body, loopScope(model, node.keyName, key, node.valName, needsKey ? collection[key] : items[i]), state)\n    }\n    return out\n  }\n\n  // #endregion\n\n  // isSelfContained is returned so the test suite can attack it directly: it decides whether a value that arrived through the model can be compiled, and a wrong answer there is the one mistake in this module that would produce quietly incorrect output rather than a visible failure\n  //\n  // helpers are what emitted javascript calls into. every one of them is a function the tree walker calls too, so neither way of rendering a template can reach its own conclusion about what the template means\n  return {\n    compileTemplate,\n    renderNodes,\n    isSelfContained,\n    helpers: {\n      node: makeNode,\n      get: getOrSetObjectByDotNotation,\n      format: formatVariable,\n      write: writeValue,\n      pick: pickArm,\n      quick: quickValue,\n      slow: slowValue,\n      plain: writePlainValue,\n      needs: NEEDS_MODEL,\n      arm: armMatches,\n      present: valuePresent,\n      paths: armPaths,\n      checkPaths: conditionCheckPaths,\n      outcomes: attrsOutcomes,\n      variant: attrsVariant,\n      variants: attrsVariants,\n      bind: bindArgs,\n      payload: componentPayload,\n      render: renderNodes,\n      raw: rawBlock,\n      inline: inlineBlock,\n      computed: computedVariable,\n      marked: selectionMarked,\n      cache: cacheBlock,\n      dynamic: dynamicBody,\n      iterable,\n      walk: loopWalk,\n      collection: loopCollection,\n      scope: loopScope\n    }\n  }\n}\n","import { isFilter } from \"./positionals.js\";\nexport function getDocumentRoot(node) {\n    while (node.parent)\n        node = node.parent;\n    return node;\n}\nexport function groupSelectors(selectors) {\n    const filteredSelectors = [];\n    const plainSelectors = [];\n    for (const selector of selectors) {\n        if (selector.some(isFilter)) {\n            filteredSelectors.push(selector);\n        }\n        else {\n            plainSelectors.push(selector);\n        }\n    }\n    return [plainSelectors, filteredSelectors];\n}\n//# sourceMappingURL=helpers.js.map","import { parse, SelectorType, isTraversal } from \"css-what\";\nimport { _compileToken as compileToken, prepareContext, } from \"css-select\";\nimport * as DomUtils from \"domutils\";\nimport * as boolbase from \"boolbase\";\nimport { getDocumentRoot, groupSelectors } from \"./helpers.js\";\nimport { isFilter, getLimit, } from \"./positionals.js\";\n// Re-export pseudo extension points\nexport { filters, pseudos, aliases } from \"css-select\";\nconst UNIVERSAL_SELECTOR = {\n    type: SelectorType.Universal,\n    namespace: null,\n};\nconst SCOPE_PSEUDO = {\n    type: SelectorType.Pseudo,\n    name: \"scope\",\n    data: null,\n};\nexport function is(element, selector, options = {}) {\n    return some([element], selector, options);\n}\nexport function some(elements, selector, options = {}) {\n    if (typeof selector === \"function\")\n        return elements.some(selector);\n    const [plain, filtered] = groupSelectors(parse(selector));\n    return ((plain.length > 0 && elements.some(compileToken(plain, options))) ||\n        filtered.some((sel) => filterBySelector(sel, elements, options).length > 0));\n}\nfunction filterByPosition(filter, elems, data, options) {\n    const num = typeof data === \"string\" ? parseInt(data, 10) : NaN;\n    switch (filter) {\n        case \"first\":\n        case \"lt\":\n            // Already done in `getLimit`\n            return elems;\n        case \"last\":\n            return elems.length > 0 ? [elems[elems.length - 1]] : elems;\n        case \"nth\":\n        case \"eq\":\n            return isFinite(num) && Math.abs(num) < elems.length\n                ? [num < 0 ? elems[elems.length + num] : elems[num]]\n                : [];\n        case \"gt\":\n            return isFinite(num) ? elems.slice(num + 1) : [];\n        case \"even\":\n            return elems.filter((_, i) => i % 2 === 0);\n        case \"odd\":\n            return elems.filter((_, i) => i % 2 === 1);\n        case \"not\": {\n            const filtered = new Set(filterParsed(data, elems, options));\n            return elems.filter((e) => !filtered.has(e));\n        }\n    }\n}\nexport function filter(selector, elements, options = {}) {\n    return filterParsed(parse(selector), elements, options);\n}\n/**\n * Filter a set of elements by a selector.\n *\n * Will return elements in the original order.\n *\n * @param selector Selector to filter by.\n * @param elements Elements to filter.\n * @param options Options for selector.\n */\nfunction filterParsed(selector, elements, options) {\n    if (elements.length === 0)\n        return [];\n    const [plainSelectors, filteredSelectors] = groupSelectors(selector);\n    let found;\n    if (plainSelectors.length) {\n        const filtered = filterElements(elements, plainSelectors, options);\n        // If there are no filters, just return\n        if (filteredSelectors.length === 0) {\n            return filtered;\n        }\n        // Otherwise, we have to do some filtering\n        if (filtered.length) {\n            found = new Set(filtered);\n        }\n    }\n    for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) {\n        const filteredSelector = filteredSelectors[i];\n        const missing = found\n            ? elements.filter((e) => DomUtils.isTag(e) && !found.has(e))\n            : elements;\n        if (missing.length === 0)\n            break;\n        const filtered = filterBySelector(filteredSelector, elements, options);\n        if (filtered.length) {\n            if (!found) {\n                /*\n                 * If we haven't found anything before the last selector,\n                 * just return what we found now.\n                 */\n                if (i === filteredSelectors.length - 1) {\n                    return filtered;\n                }\n                found = new Set(filtered);\n            }\n            else {\n                filtered.forEach((el) => found.add(el));\n            }\n        }\n    }\n    return typeof found !== \"undefined\"\n        ? (found.size === elements.length\n            ? elements\n            : // Filter elements to preserve order\n                elements.filter((el) => found.has(el)))\n        : [];\n}\nfunction filterBySelector(selector, elements, options) {\n    var _a;\n    if (selector.some(isTraversal)) {\n        /*\n         * Get root node, run selector with the scope\n         * set to all of our nodes.\n         */\n        const root = (_a = options.root) !== null && _a !== void 0 ? _a : getDocumentRoot(elements[0]);\n        const opts = { ...options, context: elements, relativeSelector: false };\n        selector.push(SCOPE_PSEUDO);\n        return findFilterElements(root, selector, opts, true, elements.length);\n    }\n    // Performance optimization: If we don't have to traverse, just filter set.\n    return findFilterElements(elements, selector, options, false, elements.length);\n}\nexport function select(selector, root, options = {}, limit = Infinity) {\n    if (typeof selector === \"function\") {\n        return find(root, selector);\n    }\n    const [plain, filtered] = groupSelectors(parse(selector));\n    const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit));\n    // Plain selectors can be queried in a single go\n    if (plain.length) {\n        results.push(findElements(root, plain, options, limit));\n    }\n    if (results.length === 0) {\n        return [];\n    }\n    // If there was only a single selector, just return the result\n    if (results.length === 1) {\n        return results[0];\n    }\n    // Sort results, filtering for duplicates\n    return DomUtils.uniqueSort(results.reduce((a, b) => [...a, ...b]));\n}\n/**\n *\n * @param root Element(s) to search from.\n * @param selector Selector to look for.\n * @param options Options for querying.\n * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal.\n */\nfunction findFilterElements(root, selector, options, queryForSelector, totalLimit) {\n    const filterIndex = selector.findIndex(isFilter);\n    const sub = selector.slice(0, filterIndex);\n    const filter = selector[filterIndex];\n    // If we are at the end of the selector, we can limit the number of elements to retrieve.\n    const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity;\n    /*\n     * Set the number of elements to retrieve.\n     * Eg. for :first, we only have to get a single element.\n     */\n    const limit = getLimit(filter.name, filter.data, partLimit);\n    if (limit === 0)\n        return [];\n    /*\n     * Skip `findElements` call if our selector starts with a positional\n     * pseudo.\n     */\n    const elemsNoLimit = sub.length === 0 && !Array.isArray(root)\n        ? DomUtils.getChildren(root).filter(DomUtils.isTag)\n        : sub.length === 0\n            ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag)\n            : queryForSelector || sub.some(isTraversal)\n                ? findElements(root, [sub], options, limit)\n                : filterElements(root, [sub], options);\n    const elems = elemsNoLimit.slice(0, limit);\n    let result = filterByPosition(filter.name, elems, filter.data, options);\n    if (result.length === 0 || selector.length === filterIndex + 1) {\n        return result;\n    }\n    const remainingSelector = selector.slice(filterIndex + 1);\n    const remainingHasTraversal = remainingSelector.some(isTraversal);\n    if (remainingHasTraversal) {\n        if (isTraversal(remainingSelector[0])) {\n            const { type } = remainingSelector[0];\n            if (type === SelectorType.Sibling ||\n                type === SelectorType.Adjacent) {\n                // If we have a sibling traversal, we need to also look at the siblings.\n                result = prepareContext(result, DomUtils, true);\n            }\n            // Avoid a traversal-first selector error.\n            remainingSelector.unshift(UNIVERSAL_SELECTOR);\n        }\n        options = {\n            ...options,\n            // Avoid absolutizing the selector\n            relativeSelector: false,\n            /*\n             * Add a custom root func, to make sure traversals don't match elements\n             * that aren't a part of the considered tree.\n             */\n            rootFunc: (el) => result.includes(el),\n        };\n    }\n    else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) {\n        options = { ...options, rootFunc: boolbase.trueFunc };\n    }\n    /*\n     * If we have another filter, recursively call `findFilterElements`,\n     * with the `recursive` flag disabled. We only have to look for more\n     * elements when we see a traversal.\n     *\n     * Otherwise,\n     */\n    return remainingSelector.some(isFilter)\n        ? findFilterElements(result, remainingSelector, options, false, totalLimit)\n        : remainingHasTraversal\n            ? // Query existing elements to resolve traversal.\n                findElements(result, [remainingSelector], options, totalLimit)\n            : // If we don't have any more traversals, simply filter elements.\n                filterElements(result, [remainingSelector], options);\n}\nfunction findElements(root, sel, options, limit) {\n    const query = compileToken(sel, options, root);\n    return find(root, query, limit);\n}\nfunction find(root, query, limit = Infinity) {\n    const elems = prepareContext(root, DomUtils, query.shouldTestNextSiblings);\n    return DomUtils.find((node) => DomUtils.isTag(node) && query(node), elems, true, limit);\n}\nfunction filterElements(elements, sel, options) {\n    const els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag);\n    if (els.length === 0)\n        return els;\n    const query = compileToken(sel, options);\n    return query === boolbase.trueFunc ? els : els.filter(query);\n}\n//# sourceMappingURL=index.js.map","export const filterNames = new Set([\n    \"first\",\n    \"last\",\n    \"eq\",\n    \"gt\",\n    \"nth\",\n    \"lt\",\n    \"even\",\n    \"odd\",\n]);\nexport function isFilter(s) {\n    if (s.type !== \"pseudo\")\n        return false;\n    if (filterNames.has(s.name))\n        return true;\n    if (s.name === \"not\" && Array.isArray(s.data)) {\n        // Only consider `:not` with embedded filters\n        return s.data.some((s) => s.some(isFilter));\n    }\n    return false;\n}\nexport function getLimit(filter, data, partLimit) {\n    const num = data != null ? parseInt(data, 10) : NaN;\n    switch (filter) {\n        case \"first\":\n            return 1;\n        case \"nth\":\n        case \"eq\":\n            return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0;\n        case \"lt\":\n            return isFinite(num)\n                ? num >= 0\n                    ? Math.min(num, partLimit)\n                    : Infinity\n                : 0;\n        case \"gt\":\n            return isFinite(num) ? Infinity : 0;\n        case \"odd\":\n            return 2 * partLimit;\n        case \"even\":\n            return 2 * partLimit - 1;\n        case \"last\":\n        case \"not\":\n            return Infinity;\n    }\n}\n//# sourceMappingURL=positionals.js.map","/**\n * Methods for getting and modifying attributes.\n *\n * @module cheerio/attributes\n */\nvar _a;\nimport { text } from '../static.js';\nimport { domEach, camelCase, cssCase } from '../utils.js';\nimport { isTag } from 'domhandler';\nimport { innerText, textContent } from 'domutils';\nimport { ElementType } from 'htmlparser2';\nconst hasOwn = \n// @ts-expect-error `hasOwn` is a standard object method\n(_a = Object.hasOwn) !== null && _a !== void 0 ? _a : ((object, prop) => Object.prototype.hasOwnProperty.call(object, prop));\nconst rspace = /\\s+/;\nconst dataAttrPrefix = 'data-';\n// Attributes that are booleans\nconst rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;\n// Matches strings that look like JSON objects or arrays\nconst rbrace = /^{[^]*}$|^\\[[^]*]$/;\nfunction getAttr(elem, name, xmlMode) {\n    var _a;\n    if (!elem || !isTag(elem))\n        return undefined;\n    (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {});\n    // Return the entire attribs object if no attribute specified\n    if (!name) {\n        return elem.attribs;\n    }\n    if (hasOwn(elem.attribs, name)) {\n        // Get the (decoded) attribute\n        return !xmlMode && rboolean.test(name) ? name : elem.attribs[name];\n    }\n    // Mimic the DOM and return text content as value for `option's`\n    if (elem.name === 'option' && name === 'value') {\n        return text(elem.children);\n    }\n    // Mimic DOM with default value for radios/checkboxes\n    if (elem.name === 'input' &&\n        (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') &&\n        name === 'value') {\n        return 'on';\n    }\n    return undefined;\n}\n/**\n * Sets the value of an attribute. The attribute will be deleted if the value is\n * `null`.\n *\n * @private\n * @param el - The element to set the attribute on.\n * @param name - The attribute's name.\n * @param value - The attribute's value.\n */\nfunction setAttr(el, name, value) {\n    if (value === null) {\n        removeAttribute(el, name);\n    }\n    else {\n        el.attribs[name] = `${value}`;\n    }\n}\nexport function attr(name, value) {\n    // Set the value (with attr map support)\n    if (typeof name === 'object' || value !== undefined) {\n        if (typeof value === 'function') {\n            if (typeof name !== 'string') {\n                {\n                    throw new Error('Bad combination of arguments.');\n                }\n            }\n            return domEach(this, (el, i) => {\n                if (isTag(el))\n                    setAttr(el, name, value.call(el, i, el.attribs[name]));\n            });\n        }\n        return domEach(this, (el) => {\n            if (!isTag(el))\n                return;\n            if (typeof name === 'object') {\n                for (const objName of Object.keys(name)) {\n                    const objValue = name[objName];\n                    setAttr(el, objName, objValue);\n                }\n            }\n            else {\n                setAttr(el, name, value);\n            }\n        });\n    }\n    return arguments.length > 1\n        ? this\n        : getAttr(this[0], name, this.options.xmlMode);\n}\n/**\n * Gets a node's prop.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the prop of.\n * @param name - Name of the prop.\n * @param xmlMode - Disable handling of special HTML attributes.\n * @returns The prop's value.\n */\nfunction getProp(el, name, xmlMode) {\n    return name in el\n        ? // @ts-expect-error TS doesn't like us accessing the value directly here.\n            el[name]\n        : !xmlMode && rboolean.test(name)\n            ? getAttr(el, name, false) !== undefined\n            : getAttr(el, name, xmlMode);\n}\n/**\n * Sets the value of a prop.\n *\n * @private\n * @param el - The element to set the prop on.\n * @param name - The prop's name.\n * @param value - The prop's value.\n * @param xmlMode - Disable handling of special HTML attributes.\n */\nfunction setProp(el, name, value, xmlMode) {\n    if (name in el) {\n        // @ts-expect-error Overriding value\n        el[name] = value;\n    }\n    else {\n        setAttr(el, name, !xmlMode && rboolean.test(name)\n            ? value\n                ? ''\n                : null\n            : `${value}`);\n    }\n}\nexport function prop(name, value) {\n    var _a;\n    if (typeof name === 'string' && value === undefined) {\n        const el = this[0];\n        if (!el)\n            return undefined;\n        switch (name) {\n            case 'style': {\n                const property = this.css();\n                const keys = Object.keys(property);\n                for (let i = 0; i < keys.length; i++) {\n                    property[i] = keys[i];\n                }\n                property.length = keys.length;\n                return property;\n            }\n            case 'tagName':\n            case 'nodeName': {\n                if (!isTag(el))\n                    return undefined;\n                return el.name.toUpperCase();\n            }\n            case 'href':\n            case 'src': {\n                if (!isTag(el))\n                    return undefined;\n                const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name];\n                if (typeof URL !== 'undefined' &&\n                    ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) ||\n                        (name === 'src' &&\n                            (el.tagName === 'img' ||\n                                el.tagName === 'iframe' ||\n                                el.tagName === 'audio' ||\n                                el.tagName === 'video' ||\n                                el.tagName === 'source'))) &&\n                    prop !== undefined &&\n                    this.options.baseURI) {\n                    return new URL(prop, this.options.baseURI).href;\n                }\n                return prop;\n            }\n            case 'innerText': {\n                return innerText(el);\n            }\n            case 'textContent': {\n                return textContent(el);\n            }\n            case 'outerHTML': {\n                if (el.type === ElementType.Root)\n                    return this.html();\n                return this.clone().wrap('<container />').parent().html();\n            }\n            case 'innerHTML': {\n                return this.html();\n            }\n            default: {\n                if (!isTag(el))\n                    return undefined;\n                return getProp(el, name, this.options.xmlMode);\n            }\n        }\n    }\n    if (typeof name === 'object' || value !== undefined) {\n        if (typeof value === 'function') {\n            if (typeof name === 'object') {\n                throw new TypeError('Bad combination of arguments.');\n            }\n            return domEach(this, (el, i) => {\n                if (isTag(el)) {\n                    setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode);\n                }\n            });\n        }\n        return domEach(this, (el) => {\n            if (!isTag(el))\n                return;\n            if (typeof name === 'object') {\n                for (const key of Object.keys(name)) {\n                    const val = name[key];\n                    setProp(el, key, val, this.options.xmlMode);\n                }\n            }\n            else {\n                setProp(el, name, value, this.options.xmlMode);\n            }\n        });\n    }\n    return undefined;\n}\n/**\n * Sets the value of a data attribute.\n *\n * @private\n * @param elem - The element to set the data attribute on.\n * @param name - The data attribute's name.\n * @param value - The data attribute's value.\n */\nfunction setData(elem, name, value) {\n    var _a;\n    (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {});\n    if (typeof name === 'object')\n        Object.assign(elem.data, name);\n    else if (typeof name === 'string' && value !== undefined) {\n        elem.data[name] = value;\n    }\n}\n/**\n * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*`\n * attribute, and cache the value in the node's internal data store.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the data attribute of.\n * @returns A map with all of the data attributes.\n */\nfunction readAllData(el) {\n    for (const domName of Object.keys(el.attribs)) {\n        if (!domName.startsWith(dataAttrPrefix)) {\n            continue;\n        }\n        const jsName = camelCase(domName.slice(dataAttrPrefix.length));\n        if (!hasOwn(el.data, jsName)) {\n            el.data[jsName] = parseDataValue(el.attribs[domName]);\n        }\n    }\n    return el.data;\n}\n/**\n * Read the specified attribute from the equivalent HTML5 `data-*` attribute,\n * and (if present) cache the value in the node's internal data store.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the data attribute of.\n * @param name - Name of the data attribute.\n * @returns The data attribute's value.\n */\nfunction readData(el, name) {\n    const domName = dataAttrPrefix + cssCase(name);\n    const data = el.data;\n    if (hasOwn(data, name)) {\n        return data[name];\n    }\n    if (hasOwn(el.attribs, domName)) {\n        return (data[name] = parseDataValue(el.attribs[domName]));\n    }\n    return undefined;\n}\n/**\n * Coerce string data-* attributes to their corresponding JavaScript primitives.\n *\n * @private\n * @category Attributes\n * @param value - The value to parse.\n * @returns The parsed value.\n */\nfunction parseDataValue(value) {\n    if (value === 'null')\n        return null;\n    if (value === 'true')\n        return true;\n    if (value === 'false')\n        return false;\n    const num = Number(value);\n    if (value === String(num))\n        return num;\n    if (rbrace.test(value)) {\n        try {\n            return JSON.parse(value);\n        }\n        catch {\n            /* Ignore */\n        }\n    }\n    return value;\n}\nexport function data(name, value) {\n    var _a;\n    const elem = this[0];\n    if (!elem || !isTag(elem))\n        return;\n    const dataEl = elem;\n    (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {});\n    // Return the entire data object if no data specified\n    if (name == null) {\n        return readAllData(dataEl);\n    }\n    // Set the value (with attr map support)\n    if (typeof name === 'object' || value !== undefined) {\n        domEach(this, (el) => {\n            if (isTag(el)) {\n                if (typeof name === 'object')\n                    setData(el, name);\n                else\n                    setData(el, name, value);\n            }\n        });\n        return this;\n    }\n    return readData(dataEl, name);\n}\nexport function val(value) {\n    const querying = arguments.length === 0;\n    const element = this[0];\n    if (!element || !isTag(element))\n        return querying ? undefined : this;\n    switch (element.name) {\n        case 'textarea': {\n            return this.text(value);\n        }\n        case 'select': {\n            const option = this.find('option:selected');\n            if (!querying) {\n                if (this.attr('multiple') == null && typeof value === 'object') {\n                    return this;\n                }\n                this.find('option').removeAttr('selected');\n                const values = typeof value === 'object' ? value : [value];\n                for (const val of values) {\n                    this.find(`option[value=\"${val}\"]`).attr('selected', '');\n                }\n                return this;\n            }\n            return this.attr('multiple')\n                ? option.toArray().map((el) => text(el.children))\n                : option.attr('value');\n        }\n        case 'button':\n        case 'input':\n        case 'option': {\n            return querying\n                ? this.attr('value')\n                : this.attr('value', value);\n        }\n    }\n    return undefined;\n}\n/**\n * Remove an attribute.\n *\n * @private\n * @param elem - Node to remove attribute from.\n * @param name - Name of the attribute to remove.\n */\nfunction removeAttribute(elem, name) {\n    if (!elem.attribs || !hasOwn(elem.attribs, name))\n        return;\n    delete elem.attribs[name];\n}\n/**\n * Splits a space-separated list of names to individual names.\n *\n * @category Attributes\n * @param names - Names to split.\n * @returns - Split names.\n */\nfunction splitNames(names) {\n    return names ? names.trim().split(rspace) : [];\n}\n/**\n * Method for removing attributes by `name`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').removeAttr('class').prop('outerHTML');\n * //=> <li>Pear</li>\n *\n * $('.apple').attr('id', 'favorite');\n * $('.apple').removeAttr('id class').prop('outerHTML');\n * //=> <li>Apple</li>\n * ```\n *\n * @param name - Name of the attribute.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/removeAttr/}\n */\nexport function removeAttr(name) {\n    const attrNames = splitNames(name);\n    for (const attrName of attrNames) {\n        domEach(this, (elem) => {\n            if (isTag(elem))\n                removeAttribute(elem, attrName);\n        });\n    }\n    return this;\n}\n/**\n * Check to see if _any_ of the matched elements have the given `className`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').hasClass('pear');\n * //=> true\n *\n * $('apple').hasClass('fruit');\n * //=> false\n *\n * $('li').hasClass('pear');\n * //=> true\n * ```\n *\n * @param className - Name of the class.\n * @returns Indicates if an element has the given `className`.\n * @see {@link https://api.jquery.com/hasClass/}\n */\nexport function hasClass(className) {\n    return this.toArray().some((elem) => {\n        const clazz = isTag(elem) && elem.attribs['class'];\n        let idx = -1;\n        if (clazz && className.length > 0) {\n            while ((idx = clazz.indexOf(className, idx + 1)) > -1) {\n                const end = idx + className.length;\n                if ((idx === 0 || rspace.test(clazz[idx - 1])) &&\n                    (end === clazz.length || rspace.test(clazz[end]))) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    });\n}\n/**\n * Adds class(es) to all of the matched elements. Also accepts a `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').addClass('fruit').prop('outerHTML');\n * //=> <li class=\"pear fruit\">Pear</li>\n *\n * $('.apple').addClass('fruit red').prop('outerHTML');\n * //=> <li class=\"apple fruit red\">Apple</li>\n * ```\n *\n * @param value - Name of new class.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/addClass/}\n */\nexport function addClass(value) {\n    // Support functions\n    if (typeof value === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                const className = el.attribs['class'] || '';\n                addClass.call([el], value.call(el, i, className));\n            }\n        });\n    }\n    // Return if no value or not a string or function\n    if (!value || typeof value !== 'string')\n        return this;\n    const classNames = value.split(rspace);\n    const numElements = this.length;\n    for (let i = 0; i < numElements; i++) {\n        const el = this[i];\n        // If selected element isn't a tag, move on\n        if (!isTag(el))\n            continue;\n        // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes\n        const className = getAttr(el, 'class', false);\n        if (className) {\n            let setClass = ` ${className} `;\n            // Check if class already exists\n            for (const cn of classNames) {\n                const appendClass = `${cn} `;\n                if (!setClass.includes(` ${appendClass}`))\n                    setClass += appendClass;\n            }\n            setAttr(el, 'class', setClass.trim());\n        }\n        else {\n            setAttr(el, 'class', classNames.join(' ').trim());\n        }\n    }\n    return this;\n}\n/**\n * Removes one or more space-separated classes from the selected elements. If no\n * `className` is defined, all classes will be removed. Also accepts a\n * `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').removeClass('pear').prop('outerHTML');\n * //=> <li class=\"\">Pear</li>\n *\n * $('.apple').addClass('red').removeClass().prop('outerHTML');\n * //=> <li class=\"\">Apple</li>\n * ```\n *\n * @param name - Name of the class. If not specified, removes all elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/removeClass/}\n */\nexport function removeClass(name) {\n    // Handle if value is a function\n    if (typeof name === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                removeClass.call([el], name.call(el, i, el.attribs['class'] || ''));\n            }\n        });\n    }\n    const classes = splitNames(name);\n    const numClasses = classes.length;\n    const removeAll = arguments.length === 0;\n    return domEach(this, (el) => {\n        if (!isTag(el))\n            return;\n        if (removeAll) {\n            // Short circuit the remove all case as this is the nice one\n            el.attribs['class'] = '';\n        }\n        else {\n            const elClasses = splitNames(el.attribs['class']);\n            let changed = false;\n            for (let j = 0; j < numClasses; j++) {\n                const index = elClasses.indexOf(classes[j]);\n                if (index !== -1) {\n                    elClasses.splice(index, 1);\n                    changed = true;\n                    /*\n                     * We have to do another pass to ensure that there are not duplicate\n                     * classes listed\n                     */\n                    j--;\n                }\n            }\n            if (changed) {\n                el.attribs['class'] = elClasses.join(' ');\n            }\n        }\n    });\n}\n/**\n * Add or remove class(es) from the matched elements, depending on either the\n * class's presence or the value of the switch argument. Also accepts a\n * `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.apple.green').toggleClass('fruit green red').prop('outerHTML');\n * //=> <li class=\"apple fruit red\">Apple</li>\n *\n * $('.apple.green').toggleClass('fruit green red', true).prop('outerHTML');\n * //=> <li class=\"apple green fruit red\">Apple</li>\n * ```\n *\n * @param value - Name of the class. Can also be a function.\n * @param stateVal - If specified the state of the class.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/toggleClass/}\n */\nexport function toggleClass(value, stateVal) {\n    // Support functions\n    if (typeof value === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal);\n            }\n        });\n    }\n    // Return if no value or not a string or function\n    if (!value || typeof value !== 'string')\n        return this;\n    const classNames = value.split(rspace);\n    const numClasses = classNames.length;\n    const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0;\n    const numElements = this.length;\n    for (let i = 0; i < numElements; i++) {\n        const el = this[i];\n        // If selected element isn't a tag, move on\n        if (!isTag(el))\n            continue;\n        const elementClasses = splitNames(el.attribs['class']);\n        // Check if class already exists\n        for (let j = 0; j < numClasses; j++) {\n            // Check if the class name is currently defined\n            const index = elementClasses.indexOf(classNames[j]);\n            // Add if stateValue === true or we are toggling and there is no value\n            if (state >= 0 && index === -1) {\n                elementClasses.push(classNames[j]);\n            }\n            else if (state <= 0 && index !== -1) {\n                // Otherwise remove but only if the item exists\n                elementClasses.splice(index, 1);\n            }\n        }\n        el.attribs['class'] = elementClasses.join(' ');\n    }\n    return this;\n}\n//# sourceMappingURL=attributes.js.map","import { domEach } from '../utils.js';\nimport { isTag } from 'domhandler';\n/**\n * Set multiple CSS properties for every matched element.\n *\n * @category CSS\n * @param prop - The names of the properties.\n * @param val - The new values.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/css/}\n */\nexport function css(prop, val) {\n    if ((prop != null && val != null) ||\n        // When `prop` is a \"plain\" object\n        (typeof prop === 'object' && !Array.isArray(prop))) {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                // `prop` can't be an array here anymore.\n                setCss(el, prop, val, i);\n            }\n        });\n    }\n    if (this.length === 0) {\n        return undefined;\n    }\n    return getCss(this[0], prop);\n}\n/**\n * Set styles of all elements.\n *\n * @private\n * @param el - Element to set style of.\n * @param prop - Name of property.\n * @param value - Value to set property to.\n * @param idx - Optional index within the selection.\n */\nfunction setCss(el, prop, value, idx) {\n    if (typeof prop === 'string') {\n        const styles = getCss(el);\n        const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value;\n        if (val === '') {\n            delete styles[prop];\n        }\n        else if (val != null) {\n            styles[prop] = val;\n        }\n        el.attribs['style'] = stringify(styles);\n    }\n    else if (typeof prop === 'object') {\n        const keys = Object.keys(prop);\n        for (let i = 0; i < keys.length; i++) {\n            const k = keys[i];\n            setCss(el, k, prop[k], i);\n        }\n    }\n}\nfunction getCss(el, prop) {\n    if (!el || !isTag(el))\n        return;\n    const styles = parse(el.attribs['style']);\n    if (typeof prop === 'string') {\n        return styles[prop];\n    }\n    if (Array.isArray(prop)) {\n        const newStyles = {};\n        for (const item of prop) {\n            if (styles[item] != null) {\n                newStyles[item] = styles[item];\n            }\n        }\n        return newStyles;\n    }\n    return styles;\n}\n/**\n * Stringify `obj` to styles.\n *\n * @private\n * @category CSS\n * @param obj - Object to stringify.\n * @returns The serialized styles.\n */\nfunction stringify(obj) {\n    return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, '');\n}\n/**\n * Parse `styles`.\n *\n * @private\n * @category CSS\n * @param styles - Styles to be parsed.\n * @returns The parsed styles.\n */\nfunction parse(styles) {\n    styles = (styles || '').trim();\n    if (!styles)\n        return {};\n    const obj = {};\n    let key;\n    for (const str of styles.split(';')) {\n        const n = str.indexOf(':');\n        // If there is no :, or if it is the first/last character, add to the previous item's value\n        if (n < 1 || n === str.length - 1) {\n            const trimmed = str.trimEnd();\n            if (trimmed.length > 0 && key !== undefined) {\n                obj[key] += `;${trimmed}`;\n            }\n        }\n        else {\n            key = str.slice(0, n).trim();\n            obj[key] = str.slice(n + 1).trim();\n        }\n    }\n    return obj;\n}\n//# sourceMappingURL=css.js.map","function getExtractDescr(descr) {\n    var _a;\n    if (typeof descr === 'string') {\n        return { selector: descr, value: 'textContent' };\n    }\n    return {\n        selector: descr.selector,\n        value: (_a = descr.value) !== null && _a !== void 0 ? _a : 'textContent',\n    };\n}\n/**\n * Extract multiple values from a document, and store them in an object.\n *\n * @param map - An object containing key-value pairs. The keys are the names of\n *   the properties to be created on the object, and the values are the\n *   selectors to be used to extract the values.\n * @returns An object containing the extracted values.\n */\nexport function extract(map) {\n    const ret = {};\n    for (const key in map) {\n        const descr = map[key];\n        const isArray = Array.isArray(descr);\n        const { selector, value } = getExtractDescr(isArray ? descr[0] : descr);\n        const fn = typeof value === 'function'\n            ? value\n            : typeof value === 'string'\n                ? (el) => this._make(el).prop(value)\n                : (el) => this._make(el).extract(value);\n        if (isArray) {\n            ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY)\n                .map((_, el) => fn(el, key, ret))\n                .get();\n        }\n        else {\n            const $ = this._findBySelector(selector, 1);\n            ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined;\n        }\n    }\n    return ret;\n}\n//# sourceMappingURL=extract.js.map","import { isTag } from 'domhandler';\n/*\n * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js\n * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js\n */\nconst submittableSelector = 'input,select,textarea,keygen';\nconst r20 = /%20/g;\nconst rCRLF = /\\r?\\n/g;\n/**\n * Encode a set of form elements as a string for submission.\n *\n * @category Forms\n * @example\n *\n * ```js\n * $('<form><input name=\"foo\" value=\"bar\" /></form>').serialize();\n * //=> 'foo=bar'\n * ```\n *\n * @returns The serialized form.\n * @see {@link https://api.jquery.com/serialize/}\n */\nexport function serialize() {\n    // Convert form elements into name/value objects\n    const arr = this.serializeArray();\n    // Serialize each element into a key/value string\n    const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`);\n    // Return the resulting serialization\n    return retArr.join('&').replace(r20, '+');\n}\n/**\n * Encode a set of form elements as an array of names and values.\n *\n * @category Forms\n * @example\n *\n * ```js\n * $('<form><input name=\"foo\" value=\"bar\" /></form>').serializeArray();\n * //=> [ { name: 'foo', value: 'bar' } ]\n * ```\n *\n * @returns The serialized form.\n * @see {@link https://api.jquery.com/serializeArray/}\n */\nexport function serializeArray() {\n    // Resolve all form elements from either forms or collections of form elements\n    return this.map((_, elem) => {\n        const $elem = this._make(elem);\n        if (isTag(elem) && elem.name === 'form') {\n            return $elem.find(submittableSelector).toArray();\n        }\n        return $elem.filter(submittableSelector).toArray();\n    })\n        .filter(\n    // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)\n    '[name!=\"\"]:enabled' +\n        // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`)\n        ':not(:submit, :button, :image, :reset, :file)' +\n        // And are either checked/don't have a checkable state\n        ':matches([checked], :not(:checkbox, :radio))')\n        .map((_, elem) => {\n        var _a;\n        const $elem = this._make(elem);\n        const name = $elem.attr('name'); // We have filtered for elements with a name before.\n        // If there is no value set (e.g. `undefined`, `null`), then default value to empty\n        const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : '';\n        // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs\n        if (Array.isArray(value)) {\n            return value.map((val) => \n            /*\n             * We trim replace any line endings (e.g. `\\r` or `\\r\\n` with `\\r\\n`) to guarantee consistency across platforms\n             * These can occur inside of `<textarea>'s`\n             */\n            ({ name, value: val.replace(rCRLF, '\\r\\n') }));\n        }\n        // Otherwise (e.g. `<input type=\"text\">`, return only one key/value pair\n        return { name, value: value.replace(rCRLF, '\\r\\n') };\n    })\n        .toArray();\n}\n//# sourceMappingURL=forms.js.map","/**\n * Methods for modifying the DOM structure.\n *\n * @module cheerio/manipulation\n */\nimport { isTag, Text, hasChildren, cloneNode, Document, } from 'domhandler';\nimport { update as updateDOM } from '../parse.js';\nimport { text as staticText } from '../static.js';\nimport { domEach, isHtml, isCheerio } from '../utils.js';\nimport { removeElement } from 'domutils';\nimport { ElementType } from 'htmlparser2';\n/**\n * Create an array of nodes, recursing into arrays and parsing strings if\n * necessary.\n *\n * @private\n * @category Manipulation\n * @param elem - Elements to make an array of.\n * @param clone - Optionally clone nodes.\n * @returns The array of nodes.\n */\nexport function _makeDomArray(elem, clone) {\n    if (elem == null) {\n        return [];\n    }\n    if (typeof elem === 'string') {\n        return this._parse(elem, this.options, false, null).children.slice(0);\n    }\n    if ('length' in elem) {\n        if (elem.length === 1) {\n            return this._makeDomArray(elem[0], clone);\n        }\n        const result = [];\n        for (let i = 0; i < elem.length; i++) {\n            const el = elem[i];\n            if (typeof el === 'object') {\n                if (el == null) {\n                    continue;\n                }\n                if (!('length' in el)) {\n                    result.push(clone ? cloneNode(el, true) : el);\n                    continue;\n                }\n            }\n            result.push(...this._makeDomArray(el, clone));\n        }\n        return result;\n    }\n    return [clone ? cloneNode(elem, true) : elem];\n}\nfunction _insert(concatenator) {\n    return function (...elems) {\n        const lastIdx = this.length - 1;\n        return domEach(this, (el, i) => {\n            if (!hasChildren(el))\n                return;\n            const domSrc = typeof elems[0] === 'function'\n                ? elems[0].call(el, i, this._render(el.children))\n                : elems;\n            const dom = this._makeDomArray(domSrc, i < lastIdx);\n            concatenator(dom, el.children, el);\n        });\n    };\n}\n/**\n * Modify an array in-place, removing some number of elements and adding new\n * elements directly following them.\n *\n * @private\n * @category Manipulation\n * @param array - Target array to splice.\n * @param spliceIdx - Index at which to begin changing the array.\n * @param spliceCount - Number of elements to remove from the array.\n * @param newElems - Elements to insert into the array.\n * @param parent - The parent of the node.\n * @returns The spliced array.\n */\nfunction uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) {\n    var _a, _b;\n    const spliceArgs = [\n        spliceIdx,\n        spliceCount,\n        ...newElems,\n    ];\n    const prev = spliceIdx === 0 ? null : array[spliceIdx - 1];\n    const next = spliceIdx + spliceCount >= array.length\n        ? null\n        : array[spliceIdx + spliceCount];\n    /*\n     * Before splicing in new elements, ensure they do not already appear in the\n     * current array.\n     */\n    for (let idx = 0; idx < newElems.length; ++idx) {\n        const node = newElems[idx];\n        const oldParent = node.parent;\n        if (oldParent) {\n            const oldSiblings = oldParent.children;\n            const prevIdx = oldSiblings.indexOf(node);\n            if (prevIdx !== -1) {\n                oldParent.children.splice(prevIdx, 1);\n                if (parent === oldParent && spliceIdx > prevIdx) {\n                    spliceArgs[0]--;\n                }\n            }\n        }\n        node.parent = parent;\n        if (node.prev) {\n            node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null;\n        }\n        if (node.next) {\n            node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null;\n        }\n        node.prev = idx === 0 ? prev : newElems[idx - 1];\n        node.next = idx === newElems.length - 1 ? next : newElems[idx + 1];\n    }\n    if (prev) {\n        prev.next = newElems[0];\n    }\n    if (next) {\n        next.prev = newElems[newElems.length - 1];\n    }\n    return array.splice(...spliceArgs);\n}\n/**\n * Insert every element in the set of matched elements to the end of the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').appendTo('#fruits');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //      <li class=\"plum\">Plum</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to append elements to.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/appendTo/}\n */\nexport function appendTo(target) {\n    const appendTarget = isCheerio(target) ? target : this._make(target);\n    appendTarget.append(this);\n    return this;\n}\n/**\n * Insert every element in the set of matched elements to the beginning of the\n * target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').prependTo('#fruits');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to prepend elements to.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/prependTo/}\n */\nexport function prependTo(target) {\n    const prependTarget = isCheerio(target) ? target : this._make(target);\n    prependTarget.prepend(this);\n    return this;\n}\n/**\n * Inserts content as the _last_ child of each of the selected elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').append('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //      <li class=\"plum\">Plum</li>\n * //    </ul>\n * ```\n *\n * @see {@link https://api.jquery.com/append/}\n */\nexport const append = _insert((dom, children, parent) => {\n    uniqueSplice(children, children.length, 0, dom, parent);\n});\n/**\n * Inserts content as the _first_ child of each of the selected elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').prepend('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @see {@link https://api.jquery.com/prepend/}\n */\nexport const prepend = _insert((dom, children, parent) => {\n    uniqueSplice(children, 0, 0, dom, parent);\n});\nfunction _wrap(insert) {\n    return function (wrapper) {\n        const lastIdx = this.length - 1;\n        const lastParent = this.parents().last();\n        for (let i = 0; i < this.length; i++) {\n            const el = this[i];\n            const wrap = typeof wrapper === 'function'\n                ? wrapper.call(el, i, el)\n                : typeof wrapper === 'string' && !isHtml(wrapper)\n                    ? lastParent.find(wrapper).clone()\n                    : wrapper;\n            const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx);\n            if (!wrapperDom || !hasChildren(wrapperDom))\n                continue;\n            let elInsertLocation = wrapperDom;\n            /*\n             * Find the deepest child. Only consider the first tag child of each node\n             * (ignore text); stop if no children are found.\n             */\n            let j = 0;\n            while (j < elInsertLocation.children.length) {\n                const child = elInsertLocation.children[j];\n                if (isTag(child)) {\n                    elInsertLocation = child;\n                    j = 0;\n                }\n                else {\n                    j++;\n                }\n            }\n            insert(el, elInsertLocation, [wrapperDom]);\n        }\n        return this;\n    };\n}\n/**\n * The .wrap() function can take any string or object that could be passed to\n * the $() factory function to specify a DOM structure. This structure may be\n * nested several levels deep, but should contain only one inmost element. A\n * copy of this structure will be wrapped around each of the elements in the set\n * of matched elements. This method returns the original set of elements for\n * chaining purposes.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const redFruit = $('<div class=\"red-fruit\"></div>');\n * $('.apple').wrap(redFruit);\n *\n * //=> <ul id=\"fruits\">\n * //     <div class=\"red-fruit\">\n * //      <li class=\"apple\">Apple</li>\n * //     </div>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"plum\">Plum</li>\n * //   </ul>\n *\n * const healthy = $('<div class=\"healthy\"></div>');\n * $('li').wrap(healthy);\n *\n * //=> <ul id=\"fruits\">\n * //     <div class=\"healthy\">\n * //       <li class=\"apple\">Apple</li>\n * //     </div>\n * //     <div class=\"healthy\">\n * //       <li class=\"orange\">Orange</li>\n * //     </div>\n * //     <div class=\"healthy\">\n * //        <li class=\"plum\">Plum</li>\n * //     </div>\n * //   </ul>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around each element in the\n *   selection.\n * @see {@link https://api.jquery.com/wrap/}\n */\nexport const wrap = _wrap((el, elInsertLocation, wrapperDom) => {\n    const { parent } = el;\n    if (!parent)\n        return;\n    const siblings = parent.children;\n    const index = siblings.indexOf(el);\n    updateDOM([el], elInsertLocation);\n    /*\n     * The previous operation removed the current element from the `siblings`\n     * array, so the `dom` array can be inserted without removing any\n     * additional elements.\n     */\n    uniqueSplice(siblings, index, 0, wrapperDom, parent);\n});\n/**\n * The .wrapInner() function can take any string or object that could be passed\n * to the $() factory function to specify a DOM structure. This structure may be\n * nested several levels deep, but should contain only one inmost element. The\n * structure will be wrapped around the content of each of the elements in the\n * set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const redFruit = $('<div class=\"red-fruit\"></div>');\n * $('.apple').wrapInner(redFruit);\n *\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">\n * //       <div class=\"red-fruit\">Apple</div>\n * //     </li>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"pear\">Pear</li>\n * //   </ul>\n *\n * const healthy = $('<div class=\"healthy\"></div>');\n * $('li').wrapInner(healthy);\n *\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">\n * //       <div class=\"healthy\">Apple</div>\n * //     </li>\n * //     <li class=\"orange\">\n * //       <div class=\"healthy\">Orange</div>\n * //     </li>\n * //     <li class=\"pear\">\n * //       <div class=\"healthy\">Pear</div>\n * //     </li>\n * //   </ul>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around the content of each element\n *   in the selection.\n * @returns The instance itself, for chaining.\n * @see {@link https://api.jquery.com/wrapInner/}\n */\nexport const wrapInner = _wrap((el, elInsertLocation, wrapperDom) => {\n    if (!hasChildren(el))\n        return;\n    updateDOM(el.children, elInsertLocation);\n    updateDOM(wrapperDom, el);\n});\n/**\n * The .unwrap() function, removes the parents of the set of matched elements\n * from the DOM, leaving the matched elements in their place.\n *\n * @category Manipulation\n * @example <caption>without selector</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div id=test>\\n  <div><p>Hello</p></div>\\n  <div><p>World</p></div>\\n</div>',\n * );\n * $('#test p').unwrap();\n *\n * //=> <div id=test>\n * //     <p>Hello</p>\n * //     <p>World</p>\n * //   </div>\n * ```\n *\n * @example <caption>with selector</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div id=test>\\n  <p>Hello</p>\\n  <b><p>World</p></b>\\n</div>',\n * );\n * $('#test p').unwrap('b');\n *\n * //=> <div id=test>\n * //     <p>Hello</p>\n * //     <p>World</p>\n * //   </div>\n * ```\n *\n * @param selector - A selector to check the parent element against. If an\n *   element's parent does not match the selector, the element won't be\n *   unwrapped.\n * @returns The instance itself, for chaining.\n * @see {@link https://api.jquery.com/unwrap/}\n */\nexport function unwrap(selector) {\n    this.parent(selector)\n        .not('body')\n        .each((_, el) => {\n        this._make(el).replaceWith(el.children);\n    });\n    return this;\n}\n/**\n * The .wrapAll() function can take any string or object that could be passed to\n * the $() function to specify a DOM structure. This structure may be nested\n * several levels deep, but should contain only one inmost element. The\n * structure will be wrapped around all of the elements in the set of matched\n * elements, as a single group.\n *\n * @category Manipulation\n * @example <caption>With markup passed to `wrapAll`</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div class=\"container\"><div class=\"inner\">First</div><div class=\"inner\">Second</div></div>',\n * );\n * $('.inner').wrapAll(\"<div class='new'></div>\");\n *\n * //=> <div class=\"container\">\n * //     <div class='new'>\n * //       <div class=\"inner\">First</div>\n * //       <div class=\"inner\">Second</div>\n * //     </div>\n * //   </div>\n * ```\n *\n * @example <caption>With an existing cheerio instance</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>',\n * );\n * const wrap = $('<div><p><em><b></b></em></p></div>');\n * $('span').wrapAll(wrap);\n *\n * //=> <div>\n * //     <p>\n * //       <em>\n * //         <b>\n * //           <span>Span 1</span>\n * //           <span>Span 2</span>\n * //         </b>\n * //       </em>\n * //     </p>\n * //   </div>\n * //   <strong>Strong</strong>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around all matched elements in the\n *   selection.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/wrapAll/}\n */\nexport function wrapAll(wrapper) {\n    const el = this[0];\n    if (el) {\n        const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el);\n        // If html is given as wrapper, wrap may contain text elements\n        let elInsertLocation;\n        for (let i = 0; i < wrap.length; i++) {\n            if (wrap[i].type === ElementType.Tag) {\n                elInsertLocation = wrap[i];\n            }\n        }\n        let j = 0;\n        /*\n         * Find the deepest child. Only consider the first tag child of each node\n         * (ignore text); stop if no children are found.\n         */\n        while (elInsertLocation && j < elInsertLocation.children.length) {\n            const child = elInsertLocation.children[j];\n            if (child.type === ElementType.Tag) {\n                elInsertLocation = child;\n                j = 0;\n            }\n            else {\n                j++;\n            }\n        }\n        if (elInsertLocation)\n            this._make(elInsertLocation).append(this);\n    }\n    return this;\n}\n/**\n * Insert content next to each element in the set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.apple').after('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to\n *   insert after each element in the set of matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/after/}\n */\nexport function after(...elems) {\n    const lastIdx = this.length - 1;\n    return domEach(this, (el, i) => {\n        if (!hasChildren(el) || !el.parent) {\n            return;\n        }\n        const siblings = el.parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index === -1)\n            return;\n        const domSrc = typeof elems[0] === 'function'\n            ? elems[0].call(el, i, this._render(el.children))\n            : elems;\n        const dom = this._makeDomArray(domSrc, i < lastIdx);\n        // Add element after `this` element\n        uniqueSplice(siblings, index + 1, 0, dom, el.parent);\n    });\n}\n/**\n * Insert every element in the set of matched elements after the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').insertAfter('.apple');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to insert elements after.\n * @returns The set of newly inserted elements.\n * @see {@link https://api.jquery.com/insertAfter/}\n */\nexport function insertAfter(target) {\n    if (typeof target === 'string') {\n        target = this._make(target);\n    }\n    this.remove();\n    const clones = [];\n    for (const el of this._makeDomArray(target)) {\n        const clonedSelf = this.clone().toArray();\n        const { parent } = el;\n        if (!parent) {\n            continue;\n        }\n        const siblings = parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index === -1)\n            continue;\n        // Add cloned `this` element(s) after target element\n        uniqueSplice(siblings, index + 1, 0, clonedSelf, parent);\n        clones.push(...clonedSelf);\n    }\n    return this._make(clones);\n}\n/**\n * Insert content previous to each element in the set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.apple').before('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to\n *   insert before each element in the set of matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/before/}\n */\nexport function before(...elems) {\n    const lastIdx = this.length - 1;\n    return domEach(this, (el, i) => {\n        if (!hasChildren(el) || !el.parent) {\n            return;\n        }\n        const siblings = el.parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index === -1)\n            return;\n        const domSrc = typeof elems[0] === 'function'\n            ? elems[0].call(el, i, this._render(el.children))\n            : elems;\n        const dom = this._makeDomArray(domSrc, i < lastIdx);\n        // Add element before `el` element\n        uniqueSplice(siblings, index, 0, dom, el.parent);\n    });\n}\n/**\n * Insert every element in the set of matched elements before the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').insertBefore('.apple');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to insert elements before.\n * @returns The set of newly inserted elements.\n * @see {@link https://api.jquery.com/insertBefore/}\n */\nexport function insertBefore(target) {\n    const targetArr = this._make(target);\n    this.remove();\n    const clones = [];\n    domEach(targetArr, (el) => {\n        const clonedSelf = this.clone().toArray();\n        const { parent } = el;\n        if (!parent) {\n            return;\n        }\n        const siblings = parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index === -1)\n            return;\n        // Add cloned `this` element(s) after target element\n        uniqueSplice(siblings, index, 0, clonedSelf, parent);\n        clones.push(...clonedSelf);\n    });\n    return this._make(clones);\n}\n/**\n * Removes the set of matched elements from the DOM and all their children.\n * `selector` filters the set of matched elements to be removed.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.pear').remove();\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //    </ul>\n * ```\n *\n * @param selector - Optional selector for elements to remove.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/remove/}\n */\nexport function remove(selector) {\n    // Filter if we have selector\n    const elems = selector ? this.filter(selector) : this;\n    domEach(elems, (el) => {\n        removeElement(el);\n        el.prev = el.next = el.parent = null;\n    });\n    return this;\n}\n/**\n * Replaces matched elements with `content`.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const plum = $('<li class=\"plum\">Plum</li>');\n * $('.pear').replaceWith(plum);\n * $.html();\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">Apple</li>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"plum\">Plum</li>\n * //   </ul>\n * ```\n *\n * @param content - Replacement for matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/replaceWith/}\n */\nexport function replaceWith(content) {\n    return domEach(this, (el, i) => {\n        const { parent } = el;\n        if (!parent) {\n            return;\n        }\n        const siblings = parent.children;\n        const cont = typeof content === 'function' ? content.call(el, i, el) : content;\n        const dom = this._makeDomArray(cont);\n        /*\n         * In the case that `dom` contains nodes that already exist in other\n         * structures, ensure those nodes are properly removed.\n         */\n        updateDOM(dom, null);\n        const index = siblings.indexOf(el);\n        // Completely remove old element\n        uniqueSplice(siblings, index, 1, dom, parent);\n        if (!dom.includes(el)) {\n            el.parent = el.prev = el.next = null;\n        }\n    });\n}\n/**\n * Removes all children from each item in the selection. Text nodes and comment\n * nodes are left as is.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').empty();\n * $.html();\n * //=>  <ul id=\"fruits\"></ul>\n * ```\n *\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/empty/}\n */\nexport function empty() {\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        el.children.length = 0;\n    });\n}\nexport function html(str) {\n    if (str === undefined) {\n        const el = this[0];\n        if (!el || !hasChildren(el))\n            return null;\n        return this._render(el.children);\n    }\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        const content = isCheerio(str)\n            ? str.toArray()\n            : this._parse(`${str}`, this.options, false, el).children;\n        updateDOM(content, el);\n    });\n}\n/**\n * Turns the collection to a string. Alias for `.html()`.\n *\n * @category Manipulation\n * @returns The rendered document.\n */\nexport function toString() {\n    return this._render(this);\n}\nexport function text(str) {\n    // If `str` is undefined, act as a \"getter\"\n    if (str === undefined) {\n        return staticText(this);\n    }\n    if (typeof str === 'function') {\n        // Function support\n        return domEach(this, (el, i) => this._make(el).text(str.call(el, i, staticText([el]))));\n    }\n    // Append text node to each selected elements\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        const textNode = new Text(`${str}`);\n        updateDOM(textNode, el);\n    });\n}\n/**\n * Clone the cheerio object.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const moreFruit = $('#fruits').clone();\n * ```\n *\n * @returns The cloned object.\n * @see {@link https://api.jquery.com/clone/}\n */\nexport function clone() {\n    const clone = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true));\n    // Add a root node around the cloned nodes\n    const root = new Document(clone);\n    for (const node of clone) {\n        node.parent = root;\n    }\n    return this._make(clone);\n}\n//# sourceMappingURL=manipulation.js.map","/**\n * Methods for traversing the DOM structure.\n *\n * @module cheerio/traversing\n */\nimport { isTag, hasChildren, isDocument, } from 'domhandler';\nimport * as select from 'cheerio-select';\nimport { domEach, isCheerio } from '../utils.js';\nimport { contains } from '../static.js';\nimport { getChildren, getSiblings, nextElementSibling, prevElementSibling, uniqueSort, } from 'domutils';\nconst reContextSelector = /^\\s*(?:[+~]|:scope\\b)/;\n/**\n * Get the descendants of each element in the current set of matched elements,\n * filtered by a selector, jQuery object, or element.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').find('li').length;\n * //=> 3\n * $('#fruits').find($('.apple')).length;\n * //=> 1\n * ```\n *\n * @param selectorOrHaystack - Element to look for.\n * @returns The found elements.\n * @see {@link https://api.jquery.com/find/}\n */\nexport function find(selectorOrHaystack) {\n    if (!selectorOrHaystack) {\n        return this._make([]);\n    }\n    if (typeof selectorOrHaystack !== 'string') {\n        const haystack = isCheerio(selectorOrHaystack)\n            ? selectorOrHaystack.toArray()\n            : [selectorOrHaystack];\n        const context = this.toArray();\n        return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem))));\n    }\n    return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY);\n}\n/**\n * Find elements by a specific selector.\n *\n * @private\n * @category Traversing\n * @param selector - Selector to filter by.\n * @param limit - Maximum number of elements to match.\n * @returns The found elements.\n */\nexport function _findBySelector(selector, limit) {\n    var _a;\n    const context = this.toArray();\n    const elems = reContextSelector.test(selector)\n        ? context\n        : this.children().toArray();\n    const options = {\n        context,\n        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n        // Pass options that are recognized by `cheerio-select`\n        xmlMode: this.options.xmlMode,\n        lowerCaseTags: this.options.lowerCaseTags,\n        lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,\n        pseudos: this.options.pseudos,\n        quirksMode: this.options.quirksMode,\n    };\n    return this._make(select.select(selector, elems, options, limit));\n}\n/**\n * Creates a matcher, using a particular mapping function. Matchers provide a\n * function that finds elements using a generating function, supporting\n * filtering.\n *\n * @private\n * @param matchMap - Mapping function.\n * @returns - Function for wrapping generating functions.\n */\nfunction _getMatcher(matchMap) {\n    return function (fn, ...postFns) {\n        return function (selector) {\n            var _a;\n            let matched = matchMap(fn, this);\n            if (selector) {\n                matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]);\n            }\n            return this._make(\n            // Post processing is only necessary if there is more than one element.\n            this.length > 1 && matched.length > 1\n                ? postFns.reduce((elems, fn) => fn(elems), matched)\n                : matched);\n        };\n    };\n}\n/** Matcher that adds multiple elements for each entry in the input. */\nconst _matcher = _getMatcher((fn, elems) => {\n    let ret = [];\n    for (let i = 0; i < elems.length; i++) {\n        const value = fn(elems[i]);\n        if (value.length > 0)\n            ret = ret.concat(value);\n    }\n    return ret;\n});\n/** Matcher that adds at most one element for each entry in the input. */\nconst _singleMatcher = _getMatcher((fn, elems) => {\n    const ret = [];\n    for (let i = 0; i < elems.length; i++) {\n        const value = fn(elems[i]);\n        if (value !== null) {\n            ret.push(value);\n        }\n    }\n    return ret;\n});\n/**\n * Matcher that supports traversing until a condition is met.\n *\n * @param nextElem - Function that returns the next element.\n * @param postFns - Post processing functions.\n * @returns A function usable for `*Until` methods.\n */\nfunction _matchUntil(nextElem, ...postFns) {\n    // We use a variable here that is used from within the matcher.\n    let matches = null;\n    const innerMatcher = _getMatcher((nextElem, elems) => {\n        const matched = [];\n        domEach(elems, (elem) => {\n            for (let next; (next = nextElem(elem)); elem = next) {\n                // FIXME: `matched` might contain duplicates here and the index is too large.\n                if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length))\n                    break;\n                matched.push(next);\n            }\n        });\n        return matched;\n    })(nextElem, ...postFns);\n    return function (selector, filterSelector) {\n        // Override `matches` variable with the new target.\n        matches =\n            typeof selector === 'string'\n                ? (elem) => select.is(elem, selector, this.options)\n                : selector\n                    ? getFilterFn(selector)\n                    : null;\n        const ret = innerMatcher.call(this, filterSelector);\n        // Set `matches` to `null`, so we don't waste memory.\n        matches = null;\n        return ret;\n    };\n}\nfunction _removeDuplicates(elems) {\n    return elems.length > 1 ? Array.from(new Set(elems)) : elems;\n}\n/**\n * Get the parent of each element in the current set of matched elements,\n * optionally filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').parent().attr('id');\n * //=> fruits\n * ```\n *\n * @param selector - If specified filter for parent.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parent/}\n */\nexport const parent = _singleMatcher(({ parent }) => (parent && !isDocument(parent) ? parent : null), _removeDuplicates);\n/**\n * Get a set of parents filtered by `selector` of each element in the current\n * set of match elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').parents().length;\n * //=> 2\n * $('.orange').parents('#fruits').length;\n * //=> 1\n * ```\n *\n * @param selector - If specified filter for parents.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parents/}\n */\nexport const parents = _matcher((elem) => {\n    const matched = [];\n    while (elem.parent && !isDocument(elem.parent)) {\n        matched.push(elem.parent);\n        elem = elem.parent;\n    }\n    return matched;\n}, uniqueSort, \n// eslint-disable-next-line unicorn/no-array-reverse\n(elems) => elems.reverse());\n/**\n * Get the ancestors of each element in the current set of matched elements, up\n * to but not including the element matched by the selector, DOM node, or\n * cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').parentsUntil('#food').length;\n * //=> 1\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - Optional filter for parents.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parentsUntil/}\n */\nexport const parentsUntil = _matchUntil(({ parent }) => (parent && !isDocument(parent) ? parent : null), uniqueSort, \n// eslint-disable-next-line unicorn/no-array-reverse\n(elems) => elems.reverse());\n/**\n * For each element in the set, get the first element that matches the selector\n * by testing the element itself and traversing up through its ancestors in the\n * DOM tree.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').closest();\n * //=> []\n *\n * $('.orange').closest('.apple');\n * // => []\n *\n * $('.orange').closest('li');\n * //=> [<li class=\"orange\">Orange</li>]\n *\n * $('.orange').closest('#fruits');\n * //=> [<ul id=\"fruits\"> ... </ul>]\n * ```\n *\n * @param selector - Selector for the element to find.\n * @returns The closest nodes.\n * @see {@link https://api.jquery.com/closest/}\n */\nexport function closest(selector) {\n    var _a;\n    const set = [];\n    if (!selector) {\n        return this._make(set);\n    }\n    const selectOpts = {\n        xmlMode: this.options.xmlMode,\n        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n    };\n    const selectFn = typeof selector === 'string'\n        ? (elem) => select.is(elem, selector, selectOpts)\n        : getFilterFn(selector);\n    domEach(this, (elem) => {\n        if (elem && !isDocument(elem) && !isTag(elem)) {\n            elem = elem.parent;\n        }\n        while (elem && isTag(elem)) {\n            if (selectFn(elem, 0)) {\n                // Do not add duplicate elements to the set\n                if (!set.includes(elem)) {\n                    set.push(elem);\n                }\n                break;\n            }\n            elem = elem.parent;\n        }\n    });\n    return this._make(set);\n}\n/**\n * Gets the next sibling of each selected element, optionally filtered by a\n * selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').next().hasClass('orange');\n * //=> true\n * ```\n *\n * @param selector - If specified filter for sibling.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/next/}\n */\nexport const next = _singleMatcher((elem) => nextElementSibling(elem));\n/**\n * Gets all the following siblings of the each selected element, optionally\n * filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').nextAll();\n * //=> [<li class=\"orange\">Orange</li>, <li class=\"pear\">Pear</li>]\n * $('.apple').nextAll('.orange');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/nextAll/}\n */\nexport const nextAll = _matcher((elem) => {\n    const matched = [];\n    while (elem.next) {\n        elem = elem.next;\n        if (isTag(elem))\n            matched.push(elem);\n    }\n    return matched;\n}, _removeDuplicates);\n/**\n * Gets all the following siblings up to but not including the element matched\n * by the selector, optionally filtered by another selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').nextUntil('.pear');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - If specified filter for siblings.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/nextUntil/}\n */\nexport const nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates);\n/**\n * Gets the previous sibling of each selected element optionally filtered by a\n * selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').prev().hasClass('apple');\n * //=> true\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prev/}\n */\nexport const prev = _singleMatcher((elem) => prevElementSibling(elem));\n/**\n * Gets all the preceding siblings of each selected element, optionally filtered\n * by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').prevAll();\n * //=> [<li class=\"orange\">Orange</li>, <li class=\"apple\">Apple</li>]\n *\n * $('.pear').prevAll('.orange');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prevAll/}\n */\nexport const prevAll = _matcher((elem) => {\n    const matched = [];\n    while (elem.prev) {\n        elem = elem.prev;\n        if (isTag(elem))\n            matched.push(elem);\n    }\n    return matched;\n}, _removeDuplicates);\n/**\n * Gets all the preceding siblings up to but not including the element matched\n * by the selector, optionally filtered by another selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').prevUntil('.apple');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prevUntil/}\n */\nexport const prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates);\n/**\n * Get the siblings of each element (excluding the element) in the set of\n * matched elements, optionally filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').siblings().length;\n * //=> 2\n *\n * $('.pear').siblings('.orange').length;\n * //=> 1\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The siblings.\n * @see {@link https://api.jquery.com/siblings/}\n */\nexport const siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag(el) && el !== elem), uniqueSort);\n/**\n * Gets the element children of each element in the set of matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().length;\n * //=> 3\n *\n * $('#fruits').children('.pear').text();\n * //=> Pear\n * ```\n *\n * @param selector - If specified filter for children.\n * @returns The children.\n * @see {@link https://api.jquery.com/children/}\n */\nexport const children = _matcher((elem) => getChildren(elem).filter(isTag), _removeDuplicates);\n/**\n * Gets the children of each element in the set of matched elements, including\n * text and comment nodes.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').contents().length;\n * //=> 3\n * ```\n *\n * @returns The children.\n * @see {@link https://api.jquery.com/contents/}\n */\nexport function contents() {\n    const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []);\n    return this._make(elems);\n}\n/**\n * Iterates over a cheerio object, executing a function for each matched\n * element. When the callback is fired, the function is fired in the context of\n * the DOM element, so `this` refers to the current element, which is equivalent\n * to the function parameter `element`. To break out of the `each` loop early,\n * return with `false`.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * const fruits = [];\n *\n * $('li').each(function (i, elem) {\n *   fruits[i] = $(this).text();\n * });\n *\n * fruits.join(', ');\n * //=> Apple, Orange, Pear\n * ```\n *\n * @param fn - Function to execute.\n * @returns The instance itself, useful for chaining.\n * @see {@link https://api.jquery.com/each/}\n */\nexport function each(fn) {\n    let i = 0;\n    const len = this.length;\n    while (i < len && fn.call(this[i], i, this[i]) !== false)\n        ++i;\n    return this;\n}\n/**\n * Pass each element in the current matched set through a function, producing a\n * new Cheerio object containing the return values. The function can return an\n * individual data item or an array of data items to be inserted into the\n * resulting set. If an array is returned, the elements inside the array are\n * inserted into the set. If the function returns null or undefined, no element\n * will be inserted.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li')\n *   .map(function (i, el) {\n *     // this === el\n *     return $(this).text();\n *   })\n *   .toArray()\n *   .join(' ');\n * //=> \"apple orange pear\"\n * ```\n *\n * @param fn - Function to execute.\n * @returns The mapped elements, wrapped in a Cheerio collection.\n * @see {@link https://api.jquery.com/map/}\n */\nexport function map(fn) {\n    let elems = [];\n    for (let i = 0; i < this.length; i++) {\n        const el = this[i];\n        const val = fn.call(el, i, el);\n        if (val != null) {\n            elems = elems.concat(val);\n        }\n    }\n    return this._make(elems);\n}\n/**\n * Creates a function to test if a filter is matched.\n *\n * @param match - A filter.\n * @returns A function that determines if a filter has been matched.\n */\nfunction getFilterFn(match) {\n    if (typeof match === 'function') {\n        return (el, i) => match.call(el, i, el);\n    }\n    if (isCheerio(match)) {\n        return (el) => Array.prototype.includes.call(match, el);\n    }\n    return function (el) {\n        return match === el;\n    };\n}\nexport function filter(match) {\n    var _a;\n    return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]));\n}\nexport function filterArray(nodes, match, xmlMode, root) {\n    return typeof match === 'string'\n        ? select.filter(match, nodes, { xmlMode, root })\n        : nodes.filter(getFilterFn(match));\n}\n/**\n * Checks the current list of elements and returns `true` if _any_ of the\n * elements match the selector. If using an element or Cheerio selection,\n * returns `true` if _any_ of the elements match. If using a predicate function,\n * the function is executed in the context of the selected element, so `this`\n * refers to the current element.\n *\n * @category Traversing\n * @param selector - Selector for the selection.\n * @returns Whether or not the selector matches an element of the instance.\n * @see {@link https://api.jquery.com/is/}\n */\nexport function is(selector) {\n    const nodes = this.toArray();\n    return typeof selector === 'string'\n        ? select.some(nodes.filter(isTag), selector, this.options)\n        : selector\n            ? nodes.some(getFilterFn(selector))\n            : false;\n}\n/**\n * Remove elements from the set of matched elements. Given a Cheerio object that\n * represents a set of DOM elements, the `.not()` method constructs a new\n * Cheerio object from a subset of the matching elements. The supplied selector\n * is tested against each element; the elements that don't match the selector\n * will be included in the result.\n *\n * The `.not()` method can take a function as its argument in the same way that\n * `.filter()` does. Elements for which the function returns `true` are excluded\n * from the filtered set; all other elements are included.\n *\n * @category Traversing\n * @example <caption>Selector</caption>\n *\n * ```js\n * $('li').not('.apple').length;\n * //=> 2\n * ```\n *\n * @example <caption>Function</caption>\n *\n * ```js\n * $('li').not(function (i, el) {\n *   // this === el\n *   return $(this).attr('class') === 'orange';\n * }).length; //=> 2\n * ```\n *\n * @param match - Value to look for, following the rules above.\n * @returns The filtered collection.\n * @see {@link https://api.jquery.com/not/}\n */\nexport function not(match) {\n    let nodes = this.toArray();\n    if (typeof match === 'string') {\n        const matches = new Set(select.filter(match, nodes, this.options));\n        nodes = nodes.filter((el) => !matches.has(el));\n    }\n    else {\n        const filterFn = getFilterFn(match);\n        nodes = nodes.filter((el, i) => !filterFn(el, i));\n    }\n    return this._make(nodes);\n}\n/**\n * Filters the set of matched elements to only those which have the given DOM\n * element as a descendant or which have a descendant that matches the given\n * selector. Equivalent to `.filter(':has(selector)')`.\n *\n * @category Traversing\n * @example <caption>Selector</caption>\n *\n * ```js\n * $('ul').has('.pear').attr('id');\n * //=> fruits\n * ```\n *\n * @example <caption>Element</caption>\n *\n * ```js\n * $('ul').has($('.pear')[0]).attr('id');\n * //=> fruits\n * ```\n *\n * @param selectorOrHaystack - Element to look for.\n * @returns The filtered collection.\n * @see {@link https://api.jquery.com/has/}\n */\nexport function has(selectorOrHaystack) {\n    return this.filter(typeof selectorOrHaystack === 'string'\n        ? // Using the `:has` selector here short-circuits searches.\n            `:has(${selectorOrHaystack})`\n        : (_, el) => this._make(el).find(selectorOrHaystack).length > 0);\n}\n/**\n * Will select the first element of a cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().first().text();\n * //=> Apple\n * ```\n *\n * @returns The first element.\n * @see {@link https://api.jquery.com/first/}\n */\nexport function first() {\n    return this.length > 1 ? this._make(this[0]) : this;\n}\n/**\n * Will select the last element of a cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().last().text();\n * //=> Pear\n * ```\n *\n * @returns The last element.\n * @see {@link https://api.jquery.com/last/}\n */\nexport function last() {\n    return this.length > 0 ? this._make(this[this.length - 1]) : this;\n}\n/**\n * Reduce the set of matched elements to the one at the specified index. Use\n * `.eq(-i)` to count backwards from the last selected element.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).text();\n * //=> Apple\n *\n * $('li').eq(-1).text();\n * //=> Pear\n * ```\n *\n * @param i - Index of the element to select.\n * @returns The element at the `i`th position.\n * @see {@link https://api.jquery.com/eq/}\n */\nexport function eq(i) {\n    var _a;\n    i = +i;\n    // Use the first identity optimization if possible\n    if (i === 0 && this.length <= 1)\n        return this;\n    if (i < 0)\n        i = this.length + i;\n    return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []);\n}\nexport function get(i) {\n    if (i == null) {\n        return this.toArray();\n    }\n    return this[i < 0 ? this.length + i : i];\n}\n/**\n * Retrieve all the DOM elements contained in the jQuery set as an array.\n *\n * @example\n *\n * ```js\n * $('li').toArray();\n * //=> [ {...}, {...}, {...} ]\n * ```\n *\n * @returns The contained items.\n */\nexport function toArray() {\n    return Array.prototype.slice.call(this);\n}\n/**\n * Search for a given element from among the matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').index();\n * //=> 2 $('.orange').index('li');\n * //=> 1\n * $('.apple').index($('#fruit, li'));\n * //=> 1\n * ```\n *\n * @param selectorOrNeedle - Element to look for.\n * @returns The index of the element.\n * @see {@link https://api.jquery.com/index/}\n */\nexport function index(selectorOrNeedle) {\n    let $haystack;\n    let needle;\n    if (selectorOrNeedle == null) {\n        $haystack = this.parent().children();\n        needle = this[0];\n    }\n    else if (typeof selectorOrNeedle === 'string') {\n        $haystack = this._make(selectorOrNeedle);\n        needle = this[0];\n    }\n    else {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment\n        $haystack = this;\n        needle = isCheerio(selectorOrNeedle)\n            ? selectorOrNeedle[0]\n            : selectorOrNeedle;\n    }\n    return Array.prototype.indexOf.call($haystack, needle);\n}\n/**\n * Gets the elements matching the specified range (0-based position).\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').slice(1).eq(0).text();\n * //=> 'Orange'\n *\n * $('li').slice(1, 2).length;\n * //=> 1\n * ```\n *\n * @param start - A position at which the elements begin to be selected. If\n *   negative, it indicates an offset from the end of the set.\n * @param end - A position at which the elements stop being selected. If\n *   negative, it indicates an offset from the end of the set. If omitted, the\n *   range continues until the end of the set.\n * @returns The elements matching the specified range.\n * @see {@link https://api.jquery.com/slice/}\n */\nexport function slice(start, end) {\n    return this._make(Array.prototype.slice.call(this, start, end));\n}\n/**\n * End the most recent filtering operation in the current chain and return the\n * set of matched elements to its previous state.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).end().length;\n * //=> 3\n * ```\n *\n * @returns The previous state of the set of matched elements.\n * @see {@link https://api.jquery.com/end/}\n */\nexport function end() {\n    var _a;\n    return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]);\n}\n/**\n * Add elements to the set of matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').add('.orange').length;\n * //=> 2\n * ```\n *\n * @param other - Elements to add.\n * @param context - Optionally the context of the new selection.\n * @returns The combined set.\n * @see {@link https://api.jquery.com/add/}\n */\nexport function add(other, context) {\n    const selection = this._make(other, context);\n    const contents = uniqueSort([...this.get(), ...selection.get()]);\n    return this._make(contents);\n}\n/**\n * Add the previous set of elements on the stack to the current set, optionally\n * filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).addBack('.orange').length;\n * //=> 2\n * ```\n *\n * @param selector - Selector for the elements to add.\n * @returns The combined set.\n * @see {@link https://api.jquery.com/addBack/}\n */\nexport function addBack(selector) {\n    return this.prevObject\n        ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject)\n        : this;\n}\n//# sourceMappingURL=traversing.js.map","import * as Attributes from './api/attributes.js';\nimport * as Traversing from './api/traversing.js';\nimport * as Manipulation from './api/manipulation.js';\nimport * as Css from './api/css.js';\nimport * as Forms from './api/forms.js';\nimport * as Extract from './api/extract.js';\n/**\n * The cheerio class is the central class of the library. It wraps a set of\n * elements and provides an API for traversing, modifying, and interacting with\n * the set.\n *\n * Loading a document will return the Cheerio class bound to the root element of\n * the document. The class will be instantiated when querying the document (when\n * calling `$('selector')`).\n *\n * @example This is the HTML markup we will be using in all of the API examples:\n *\n * ```html\n * <ul id=\"fruits\">\n *   <li class=\"apple\">Apple</li>\n *   <li class=\"orange\">Orange</li>\n *   <li class=\"pear\">Pear</li>\n * </ul>\n * ```\n */\nexport class Cheerio {\n    /**\n     * Instance of cheerio. Methods are specified in the modules. Usage of this\n     * constructor is not recommended. Please use `$.load` instead.\n     *\n     * @private\n     * @param elements - The new selection.\n     * @param root - Sets the root node.\n     * @param options - Options for the instance.\n     */\n    constructor(elements, root, options) {\n        this.length = 0;\n        this.options = options;\n        this._root = root;\n        if (elements) {\n            for (let idx = 0; idx < elements.length; idx++) {\n                this[idx] = elements[idx];\n            }\n            this.length = elements.length;\n        }\n    }\n}\n/** Set a signature of the object. */\nCheerio.prototype.cheerio = '[cheerio object]';\n/*\n * Make cheerio an array-like object\n */\nCheerio.prototype.splice = Array.prototype.splice;\n// Support for (const element of $(...)) iteration:\nCheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];\n// Plug in the API\nObject.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms, Extract);\n//# sourceMappingURL=cheerio.js.map","import { flattenOptions, } from './options.js';\nimport * as staticMethods from './static.js';\nimport { Cheerio } from './cheerio.js';\nimport { isHtml, isCheerio } from './utils.js';\nimport { ElementType } from 'htmlparser2';\nexport function getLoad(parse, render) {\n    /**\n     * Create a querying function, bound to a document created from the provided\n     * markup.\n     *\n     * Note that similar to web browser contexts, this operation may introduce\n     * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to\n     * switch to fragment mode and disable this.\n     *\n     * @param content - Markup to be loaded.\n     * @param options - Options for the created instance.\n     * @param isDocument - Allows parser to be switched to fragment mode.\n     * @returns The loaded document.\n     * @see {@link https://cheerio.js.org/docs/basics/loading#load} for additional usage information.\n     */\n    return function load(content, options, isDocument = true) {\n        if (content == null) {\n            throw new Error('cheerio.load() expects a string');\n        }\n        const internalOpts = flattenOptions(options);\n        const initialRoot = parse(content, internalOpts, isDocument, null);\n        /**\n         * Create an extended class here, so that extensions only live on one\n         * instance.\n         */\n        class LoadedCheerio extends Cheerio {\n            _make(selector, context) {\n                const cheerio = initialize(selector, context);\n                cheerio.prevObject = this;\n                return cheerio;\n            }\n            _parse(content, options, isDocument, context) {\n                return parse(content, options, isDocument, context);\n            }\n            _render(dom) {\n                return render(dom, this.options);\n            }\n        }\n        function initialize(selector, context, root = initialRoot, opts) {\n            // $($)\n            if (selector && isCheerio(selector))\n                return selector;\n            const options = flattenOptions(opts, internalOpts);\n            const r = typeof root === 'string'\n                ? [parse(root, options, false, null)]\n                : 'length' in root\n                    ? root\n                    : [root];\n            const rootInstance = isCheerio(r)\n                ? r\n                : new LoadedCheerio(r, null, options);\n            // Add a cyclic reference, so that calling methods on `_root` never fails.\n            rootInstance._root = rootInstance;\n            // $(), $(null), $(undefined), $(false)\n            if (!selector) {\n                return new LoadedCheerio(undefined, rootInstance, options);\n            }\n            const elements = typeof selector === 'string' && isHtml(selector)\n                ? // $(<html>)\n                    parse(selector, options, false, null).children\n                : isNode(selector)\n                    ? // $(dom)\n                        [selector]\n                    : Array.isArray(selector)\n                        ? // $([dom])\n                            selector\n                        : undefined;\n            const instance = new LoadedCheerio(elements, rootInstance, options);\n            if (elements) {\n                return instance;\n            }\n            if (typeof selector !== 'string') {\n                throw new TypeError('Unexpected type of selector');\n            }\n            // We know that our selector is a string now.\n            let search = selector;\n            const searchContext = context\n                ? // If we don't have a context, maybe we have a root, from loading\n                    typeof context === 'string'\n                        ? isHtml(context)\n                            ? // $('li', '<ul>...</ul>')\n                                new LoadedCheerio([parse(context, options, false, null)], rootInstance, options)\n                            : // $('li', 'ul')\n                                ((search = `${context} ${search}`), rootInstance)\n                        : isCheerio(context)\n                            ? // $('li', $)\n                                context\n                            : // $('li', node), $('li', [nodes])\n                                new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options)\n                : rootInstance;\n            // If we still don't have a context, return\n            if (!searchContext)\n                return instance;\n            /*\n             * #id, .class, tag\n             */\n            return searchContext.find(search);\n        }\n        // Add in static methods & properties\n        Object.assign(initialize, staticMethods, {\n            load,\n            // `_root` and `_options` are used in static methods.\n            _root: initialRoot,\n            _options: internalOpts,\n            // Add `fn` for plugins\n            fn: LoadedCheerio.prototype,\n            // Add the prototype here to maintain `instanceof` behavior.\n            prototype: LoadedCheerio.prototype,\n        });\n        return initialize;\n    };\n}\nfunction isNode(obj) {\n    return (\n    // @ts-expect-error: TS doesn't know about the `name` property.\n    !!obj.name ||\n        // @ts-expect-error: TS doesn't know about the `type` property.\n        obj.type === ElementType.Root ||\n        // @ts-expect-error: TS doesn't know about the `type` property.\n        obj.type === ElementType.Text ||\n        // @ts-expect-error: TS doesn't know about the `type` property.\n        obj.type === ElementType.Comment);\n}\n//# sourceMappingURL=load.js.map","const defaultOpts = {\n    _useHtmlParser2: false,\n};\n/**\n * Flatten the options for Cheerio.\n *\n * This will set `_useHtmlParser2` to true if `xml` is set to true.\n *\n * @param options - The options to flatten.\n * @param baseOptions - The base options to use.\n * @returns The flattened options.\n */\nexport function flattenOptions(options, baseOptions) {\n    if (!options) {\n        return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts;\n    }\n    const opts = {\n        _useHtmlParser2: !!options.xmlMode,\n        ...baseOptions,\n        ...options,\n    };\n    if (options.xml) {\n        opts._useHtmlParser2 = true;\n        opts.xmlMode = true;\n        if (options.xml !== true) {\n            Object.assign(opts, options.xml);\n        }\n    }\n    else if (options.xmlMode) {\n        opts._useHtmlParser2 = true;\n    }\n    return opts;\n}\n//# sourceMappingURL=options.js.map","import { removeElement } from 'domutils';\nimport { Document, isDocument as checkIsDocument, } from 'domhandler';\n/**\n * Get the parse function with options.\n *\n * @param parser - The parser function.\n * @returns The parse function with options.\n */\nexport function getParse(parser) {\n    /**\n     * Parse a HTML string or a node.\n     *\n     * @param content - The HTML string or node.\n     * @param options - The parser options.\n     * @param isDocument - If `content` is a document.\n     * @param context - The context node in the DOM tree.\n     * @returns The parsed document node.\n     */\n    return function parse(content, options, isDocument, context) {\n        if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) {\n            content = content.toString();\n        }\n        if (typeof content === 'string') {\n            return parser(content, options, isDocument, context);\n        }\n        const doc = content;\n        if (!Array.isArray(doc) && checkIsDocument(doc)) {\n            // If `doc` is already a root, just return it\n            return doc;\n        }\n        // Add content to new root element\n        const root = new Document([]);\n        // Update the DOM using the root\n        update(doc, root);\n        return root;\n    };\n}\n/**\n * Update the dom structure, for one changed layer.\n *\n * @param newChilds - The new children.\n * @param parent - The new parent.\n * @returns The parent node.\n */\nexport function update(newChilds, parent) {\n    // Normalize\n    const arr = Array.isArray(newChilds) ? newChilds : [newChilds];\n    // Update parent\n    if (parent) {\n        parent.children = arr;\n    }\n    else {\n        parent = null;\n    }\n    // Update neighbors\n    for (let i = 0; i < arr.length; i++) {\n        const node = arr[i];\n        // Cleanly remove existing nodes from their previous structures.\n        if (node.parent && node.parent.children !== arr) {\n            removeElement(node);\n        }\n        if (parent) {\n            node.prev = arr[i - 1] || null;\n            node.next = arr[i + 1] || null;\n        }\n        else {\n            node.prev = node.next = null;\n        }\n        node.parent = parent;\n    }\n    return parent;\n}\n//# sourceMappingURL=parse.js.map","/**\n * @file Alternative entry point for Cheerio that always uses htmlparser2. This\n *   way, parse5 won't be loaded, saving some memory.\n */\nimport { getLoad } from './load.js';\nimport { getParse } from './parse.js';\nimport render from 'dom-serializer';\nimport { parseDocument } from 'htmlparser2';\nexport { contains, merge } from './static.js';\n/**\n * Create a querying function, bound to a document created from the provided\n * markup.\n *\n * @param content - Markup to be loaded.\n * @param options - Options for the created instance.\n * @param isDocument - Always `false` here, as we are always using\n *   `htmlparser2`.\n * @returns The loaded document.\n * @see {@link https://cheerio.js.org#loading} for additional usage information.\n */\nexport const load = getLoad(getParse(parseDocument), render);\n//# sourceMappingURL=slim.js.map","import { textContent } from 'domutils';\nimport { flattenOptions as flattenOptions, } from './options.js';\n/**\n * Helper function to render a DOM.\n *\n * @param that - Cheerio instance to render.\n * @param dom - The DOM to render. Defaults to `that`'s root.\n * @param options - Options for rendering.\n * @returns The rendered document.\n */\nfunction render(that, dom, options) {\n    if (!that)\n        return '';\n    return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString();\n}\n/**\n * Checks if a passed object is an options object.\n *\n * @param dom - Object to check if it is an options object.\n * @param options - Options object.\n * @returns Whether the object is an options object.\n */\nfunction isOptions(dom, options) {\n    return (!options &&\n        typeof dom === 'object' &&\n        dom != null &&\n        !('length' in dom) &&\n        !('type' in dom));\n}\nexport function html(dom, options) {\n    /*\n     * Be flexible about parameters, sometimes we call html(),\n     * with options as only parameter\n     * check dom argument for dom element specific properties\n     * assume there is no 'length' or 'type' properties in the options object\n     */\n    const toRender = isOptions(dom) ? ((options = dom), undefined) : dom;\n    /*\n     * Sometimes `$.html()` is used without preloading html,\n     * so fallback non-existing options to the default ones.\n     */\n    const opts = {\n        ...this === null || this === void 0 ? void 0 : this._options,\n        ...flattenOptions(options),\n    };\n    return render(this, toRender, opts);\n}\n/**\n * Render the document as XML.\n *\n * @category Static\n * @param dom - Element to render.\n * @returns THe rendered document.\n */\nexport function xml(dom) {\n    const options = { ...this._options, xmlMode: true };\n    return render(this, dom, options);\n}\n/**\n * Render the document as text.\n *\n * This returns the `textContent` of the passed elements. The result will\n * include the contents of `<script>` and `<style>` elements. To avoid this, use\n * `.prop('innerText')` instead.\n *\n * @category Static\n * @param elements - Elements to render.\n * @returns The rendered document.\n */\nexport function text(elements) {\n    const elems = elements !== null && elements !== void 0 ? elements : (this ? this.root() : []);\n    let ret = '';\n    for (let i = 0; i < elems.length; i++) {\n        ret += textContent(elems[i]);\n    }\n    return ret;\n}\nexport function parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) {\n    if (!data || typeof data !== 'string') {\n        return null;\n    }\n    if (typeof context === 'boolean') {\n        keepScripts = context;\n    }\n    const parsed = this.load(data, this._options, false);\n    if (!keepScripts) {\n        parsed('script').remove();\n    }\n    /*\n     * The `children` array is used by Cheerio internally to group elements that\n     * share the same parents. When nodes created through `parseHTML` are\n     * inserted into previously-existing DOM structures, they will be removed\n     * from the `children` array. The results of `parseHTML` should remain\n     * constant across these operations, so a shallow copy should be returned.\n     */\n    return [...parsed.root()[0].children];\n}\n/**\n * Sometimes you need to work with the top-level root element. To query it, you\n * can use `$.root()`.\n *\n * @category Static\n * @example\n *\n * ```js\n * $.root().append('<ul id=\"vegetables\"></ul>').html();\n * //=> <ul id=\"fruits\">...</ul><ul id=\"vegetables\"></ul>\n * ```\n *\n * @returns Cheerio instance wrapping the root node.\n * @alias Cheerio.root\n */\nexport function root() {\n    return this(this._root);\n}\n/**\n * Checks to see if the `contained` DOM element is a descendant of the\n * `container` DOM element.\n *\n * @category Static\n * @param container - Potential parent node.\n * @param contained - Potential child node.\n * @returns Indicates if the nodes contain one another.\n * @alias Cheerio.contains\n * @see {@link https://api.jquery.com/jQuery.contains/}\n */\nexport function contains(container, contained) {\n    // According to the jQuery API, an element does not \"contain\" itself\n    if (contained === container) {\n        return false;\n    }\n    /*\n     * Step up the descendants, stopping when the root element is reached\n     * (signaled by `.parent` returning a reference to the same object)\n     */\n    let next = contained;\n    while (next && next !== next.parent) {\n        next = next.parent;\n        if (next === container) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Extract multiple values from a document, and store them in an object.\n *\n * @category Static\n * @param map - An object containing key-value pairs. The keys are the names of\n *   the properties to be created on the object, and the values are the\n *   selectors to be used to extract the values.\n * @returns An object containing the extracted values.\n */\nexport function extract(map) {\n    return this.root().extract(map);\n}\n/**\n * $.merge().\n *\n * @category Static\n * @param arr1 - First array.\n * @param arr2 - Second array.\n * @returns `arr1`, with elements of `arr2` inserted.\n * @alias Cheerio.merge\n * @see {@link https://api.jquery.com/jQuery.merge/}\n */\nexport function merge(arr1, arr2) {\n    if (!isArrayLike(arr1) || !isArrayLike(arr2)) {\n        return;\n    }\n    let newLength = arr1.length;\n    const len = +arr2.length;\n    for (let i = 0; i < len; i++) {\n        arr1[newLength++] = arr2[i];\n    }\n    arr1.length = newLength;\n    return arr1;\n}\n/**\n * Checks if an object is array-like.\n *\n * @category Static\n * @param item - Item to check.\n * @returns Indicates if the item is array-like.\n */\nfunction isArrayLike(item) {\n    if (Array.isArray(item)) {\n        return true;\n    }\n    if (typeof item !== 'object' ||\n        item === null ||\n        !('length' in item) ||\n        typeof item.length !== 'number' ||\n        item.length < 0) {\n        return false;\n    }\n    for (let i = 0; i < item.length; i++) {\n        if (!(i in item)) {\n            return false;\n        }\n    }\n    return true;\n}\n//# sourceMappingURL=static.js.map","/**\n * Checks if an object is a Cheerio instance.\n *\n * @category Utils\n * @param maybeCheerio - The object to check.\n * @returns Whether the object is a Cheerio instance.\n */\nexport function isCheerio(maybeCheerio) {\n    return maybeCheerio.cheerio != null;\n}\n/**\n * Convert a string to camel case notation.\n *\n * @private\n * @category Utils\n * @param str - The string to be converted.\n * @returns String in camel case notation.\n */\nexport function camelCase(str) {\n    return str.replace(/[._-](\\w|$)/g, (_, x) => x.toUpperCase());\n}\n/**\n * Convert a string from camel case to \"CSS case\", where word boundaries are\n * described by hyphens (\"-\") and all characters are lower-case.\n *\n * @private\n * @category Utils\n * @param str - The string to be converted.\n * @returns String in \"CSS case\".\n */\nexport function cssCase(str) {\n    return str.replace(/[A-Z]/g, '-$&').toLowerCase();\n}\n/**\n * Iterate over each DOM element without creating intermediary Cheerio\n * instances.\n *\n * This is indented for use internally to avoid otherwise unnecessary memory\n * pressure introduced by _make.\n *\n * @category Utils\n * @param array - The array to iterate over.\n * @param fn - Function to call.\n * @returns The original instance.\n */\nexport function domEach(array, fn) {\n    const len = array.length;\n    for (let i = 0; i < len; i++)\n        fn(array[i], i);\n    return array;\n}\nvar CharacterCode;\n(function (CharacterCode) {\n    CharacterCode[CharacterCode[\"LowerA\"] = 97] = \"LowerA\";\n    CharacterCode[CharacterCode[\"LowerZ\"] = 122] = \"LowerZ\";\n    CharacterCode[CharacterCode[\"UpperA\"] = 65] = \"UpperA\";\n    CharacterCode[CharacterCode[\"UpperZ\"] = 90] = \"UpperZ\";\n    CharacterCode[CharacterCode[\"Exclamation\"] = 33] = \"Exclamation\";\n})(CharacterCode || (CharacterCode = {}));\n/**\n * Check if string is HTML.\n *\n * Tests for a `<` within a string, immediate followed by a letter and\n * eventually followed by a `>`.\n *\n * @private\n * @category Utils\n * @param str - The string to check.\n * @returns Indicates if `str` is HTML.\n */\nexport function isHtml(str) {\n    if (typeof str !== 'string') {\n        return false;\n    }\n    const tagStart = str.indexOf('<');\n    if (tagStart === -1 || tagStart > str.length - 3)\n        return false;\n    const tagChar = str.charCodeAt(tagStart + 1);\n    return (((tagChar >= CharacterCode.LowerA && tagChar <= CharacterCode.LowerZ) ||\n        (tagChar >= CharacterCode.UpperA && tagChar <= CharacterCode.UpperZ) ||\n        tagChar === CharacterCode.Exclamation) &&\n        str.includes('>', tagStart + 2));\n}\n//# sourceMappingURL=utils.js.map","import boolbase from \"boolbase\";\n/**\n * All reserved characters in a regex, used for escaping.\n *\n * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license\n * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794\n */\nconst reChars = /[-[\\]{}()*+?.,\\\\^$|#\\s]/g;\nfunction escapeRegex(value) {\n    return value.replace(reChars, \"\\\\$&\");\n}\n/**\n * Attributes that are case-insensitive in HTML.\n *\n * @private\n * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors\n */\nconst caseInsensitiveAttributes = new Set([\n    \"accept\",\n    \"accept-charset\",\n    \"align\",\n    \"alink\",\n    \"axis\",\n    \"bgcolor\",\n    \"charset\",\n    \"checked\",\n    \"clear\",\n    \"codetype\",\n    \"color\",\n    \"compact\",\n    \"declare\",\n    \"defer\",\n    \"dir\",\n    \"direction\",\n    \"disabled\",\n    \"enctype\",\n    \"face\",\n    \"frame\",\n    \"hreflang\",\n    \"http-equiv\",\n    \"lang\",\n    \"language\",\n    \"link\",\n    \"media\",\n    \"method\",\n    \"multiple\",\n    \"nohref\",\n    \"noresize\",\n    \"noshade\",\n    \"nowrap\",\n    \"readonly\",\n    \"rel\",\n    \"rev\",\n    \"rules\",\n    \"scope\",\n    \"scrolling\",\n    \"selected\",\n    \"shape\",\n    \"target\",\n    \"text\",\n    \"type\",\n    \"valign\",\n    \"valuetype\",\n    \"vlink\",\n]);\nfunction shouldIgnoreCase(selector, options) {\n    return typeof selector.ignoreCase === \"boolean\"\n        ? selector.ignoreCase\n        : selector.ignoreCase === \"quirks\"\n            ? !!options.quirksMode\n            : !options.xmlMode && caseInsensitiveAttributes.has(selector.name);\n}\n/**\n * Attribute selectors\n */\nexport const attributeRules = {\n    equals(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length === value.length &&\n                    attr.toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return (elem) => adapter.getAttributeValue(elem, name) === value && next(elem);\n    },\n    hyphen(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = value.length;\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return function hyphenIC(elem) {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    (attr.length === len || attr.charAt(len) === \"-\") &&\n                    attr.substr(0, len).toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return function hyphen(elem) {\n            const attr = adapter.getAttributeValue(elem, name);\n            return (attr != null &&\n                (attr.length === len || attr.charAt(len) === \"-\") &&\n                attr.substr(0, len) === value &&\n                next(elem));\n        };\n    },\n    element(next, data, options) {\n        const { adapter } = options;\n        const { name, value } = data;\n        if (/\\s/.test(value)) {\n            return boolbase.falseFunc;\n        }\n        const regex = new RegExp(`(?:^|\\\\s)${escapeRegex(value)}(?:$|\\\\s)`, shouldIgnoreCase(data, options) ? \"i\" : \"\");\n        return function element(elem) {\n            const attr = adapter.getAttributeValue(elem, name);\n            return (attr != null &&\n                attr.length >= value.length &&\n                regex.test(attr) &&\n                next(elem));\n        };\n    },\n    exists(next, { name }, { adapter }) {\n        return (elem) => adapter.hasAttrib(elem, name) && next(elem);\n    },\n    start(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = value.length;\n        if (len === 0) {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length >= len &&\n                    attr.substr(0, len).toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&\n                next(elem);\n        };\n    },\n    end(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = -value.length;\n        if (len === 0) {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                var _a;\n                return ((_a = adapter\n                    .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&\n                next(elem);\n        };\n    },\n    any(next, data, options) {\n        const { adapter } = options;\n        const { name, value } = data;\n        if (value === \"\") {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            const regex = new RegExp(escapeRegex(value), \"i\");\n            return function anyIC(elem) {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length >= value.length &&\n                    regex.test(attr) &&\n                    next(elem));\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&\n                next(elem);\n        };\n    },\n    not(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        if (value === \"\") {\n            return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem);\n        }\n        else if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return ((attr == null ||\n                    attr.length !== value.length ||\n                    attr.toLowerCase() !== value) &&\n                    next(elem));\n            };\n        }\n        return (elem) => adapter.getAttributeValue(elem, name) !== value && next(elem);\n    },\n};\n//# sourceMappingURL=attributes.js.map","import { parse, SelectorType } from \"css-what\";\nimport boolbase from \"boolbase\";\nimport sortRules, { isTraversal } from \"./sort.js\";\nimport { compileGeneralSelector } from \"./general.js\";\nimport { ensureIsTag, PLACEHOLDER_ELEMENT, } from \"./pseudo-selectors/subselects.js\";\n/**\n * Compiles a selector to an executable function.\n *\n * @param selector Selector to compile.\n * @param options Compilation options.\n * @param context Optional context for the selector.\n */\nexport function compile(selector, options, context) {\n    const next = compileUnsafe(selector, options, context);\n    return ensureIsTag(next, options.adapter);\n}\nexport function compileUnsafe(selector, options, context) {\n    const token = typeof selector === \"string\" ? parse(selector) : selector;\n    return compileToken(token, options, context);\n}\nfunction includesScopePseudo(t) {\n    return (t.type === SelectorType.Pseudo &&\n        (t.name === \"scope\" ||\n            (Array.isArray(t.data) &&\n                t.data.some((data) => data.some(includesScopePseudo)))));\n}\nconst DESCENDANT_TOKEN = { type: SelectorType.Descendant };\nconst FLEXIBLE_DESCENDANT_TOKEN = {\n    type: \"_flexibleDescendant\",\n};\nconst SCOPE_TOKEN = {\n    type: SelectorType.Pseudo,\n    name: \"scope\",\n    data: null,\n};\n/*\n * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector\n * http://www.w3.org/TR/selectors4/#absolutizing\n */\nfunction absolutize(token, { adapter }, context) {\n    // TODO Use better check if the context is a document\n    const hasContext = !!(context === null || context === void 0 ? void 0 : context.every((e) => {\n        const parent = adapter.isTag(e) && adapter.getParent(e);\n        return e === PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent));\n    }));\n    for (const t of token) {\n        if (t.length > 0 &&\n            isTraversal(t[0]) &&\n            t[0].type !== SelectorType.Descendant) {\n            // Don't continue in else branch\n        }\n        else if (hasContext && !t.some(includesScopePseudo)) {\n            t.unshift(DESCENDANT_TOKEN);\n        }\n        else {\n            continue;\n        }\n        t.unshift(SCOPE_TOKEN);\n    }\n}\nexport function compileToken(token, options, context) {\n    var _a;\n    token.forEach(sortRules);\n    context = (_a = options.context) !== null && _a !== void 0 ? _a : context;\n    const isArrayContext = Array.isArray(context);\n    const finalContext = context && (Array.isArray(context) ? context : [context]);\n    // Check if the selector is relative\n    if (options.relativeSelector !== false) {\n        absolutize(token, options, finalContext);\n    }\n    else if (token.some((t) => t.length > 0 && isTraversal(t[0]))) {\n        throw new Error(\"Relative selectors are not allowed when the `relativeSelector` option is disabled\");\n    }\n    let shouldTestNextSiblings = false;\n    const query = token\n        .map((rules) => {\n        if (rules.length >= 2) {\n            const [first, second] = rules;\n            if (first.type !== SelectorType.Pseudo ||\n                first.name !== \"scope\") {\n                // Ignore\n            }\n            else if (isArrayContext &&\n                second.type === SelectorType.Descendant) {\n                rules[1] = FLEXIBLE_DESCENDANT_TOKEN;\n            }\n            else if (second.type === SelectorType.Adjacent ||\n                second.type === SelectorType.Sibling) {\n                shouldTestNextSiblings = true;\n            }\n        }\n        return compileRules(rules, options, finalContext);\n    })\n        .reduce(reduceRules, boolbase.falseFunc);\n    query.shouldTestNextSiblings = shouldTestNextSiblings;\n    return query;\n}\nfunction compileRules(rules, options, context) {\n    var _a;\n    return rules.reduce((previous, rule) => previous === boolbase.falseFunc\n        ? boolbase.falseFunc\n        : compileGeneralSelector(previous, rule, options, context, compileToken), (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase.trueFunc);\n}\nfunction reduceRules(a, b) {\n    if (b === boolbase.falseFunc || a === boolbase.trueFunc) {\n        return a;\n    }\n    if (a === boolbase.falseFunc || b === boolbase.trueFunc) {\n        return b;\n    }\n    return function combine(elem) {\n        return a(elem) || b(elem);\n    };\n}\n//# sourceMappingURL=compile.js.map","import { attributeRules } from \"./attributes.js\";\nimport { compilePseudoSelector } from \"./pseudo-selectors/index.js\";\nimport { SelectorType } from \"css-what\";\nfunction getElementParent(node, adapter) {\n    const parent = adapter.getParent(node);\n    if (parent && adapter.isTag(parent)) {\n        return parent;\n    }\n    return null;\n}\n/*\n * All available rules\n */\nexport function compileGeneralSelector(next, selector, options, context, compileToken) {\n    const { adapter, equals } = options;\n    switch (selector.type) {\n        case SelectorType.PseudoElement: {\n            throw new Error(\"Pseudo-elements are not supported by css-select\");\n        }\n        case SelectorType.ColumnCombinator: {\n            throw new Error(\"Column combinators are not yet supported by css-select\");\n        }\n        case SelectorType.Attribute: {\n            if (selector.namespace != null) {\n                throw new Error(\"Namespaced attributes are not yet supported by css-select\");\n            }\n            if (!options.xmlMode || options.lowerCaseAttributeNames) {\n                selector.name = selector.name.toLowerCase();\n            }\n            return attributeRules[selector.action](next, selector, options);\n        }\n        case SelectorType.Pseudo: {\n            return compilePseudoSelector(next, selector, options, context, compileToken);\n        }\n        // Tags\n        case SelectorType.Tag: {\n            if (selector.namespace != null) {\n                throw new Error(\"Namespaced tag names are not yet supported by css-select\");\n            }\n            let { name } = selector;\n            if (!options.xmlMode || options.lowerCaseTags) {\n                name = name.toLowerCase();\n            }\n            return function tag(elem) {\n                return adapter.getName(elem) === name && next(elem);\n            };\n        }\n        // Traversal\n        case SelectorType.Descendant: {\n            if (options.cacheResults === false ||\n                typeof WeakSet === \"undefined\") {\n                return function descendant(elem) {\n                    let current = elem;\n                    while ((current = getElementParent(current, adapter))) {\n                        if (next(current)) {\n                            return true;\n                        }\n                    }\n                    return false;\n                };\n            }\n            // @ts-expect-error `ElementNode` is not extending object\n            const isFalseCache = new WeakSet();\n            return function cachedDescendant(elem) {\n                let current = elem;\n                while ((current = getElementParent(current, adapter))) {\n                    if (!isFalseCache.has(current)) {\n                        if (adapter.isTag(current) && next(current)) {\n                            return true;\n                        }\n                        isFalseCache.add(current);\n                    }\n                }\n                return false;\n            };\n        }\n        case \"_flexibleDescendant\": {\n            // Include element itself, only used while querying an array\n            return function flexibleDescendant(elem) {\n                let current = elem;\n                do {\n                    if (next(current))\n                        return true;\n                } while ((current = getElementParent(current, adapter)));\n                return false;\n            };\n        }\n        case SelectorType.Parent: {\n            return function parent(elem) {\n                return adapter\n                    .getChildren(elem)\n                    .some((elem) => adapter.isTag(elem) && next(elem));\n            };\n        }\n        case SelectorType.Child: {\n            return function child(elem) {\n                const parent = adapter.getParent(elem);\n                return parent != null && adapter.isTag(parent) && next(parent);\n            };\n        }\n        case SelectorType.Sibling: {\n            return function sibling(elem) {\n                const siblings = adapter.getSiblings(elem);\n                for (let i = 0; i < siblings.length; i++) {\n                    const currentSibling = siblings[i];\n                    if (equals(elem, currentSibling))\n                        break;\n                    if (adapter.isTag(currentSibling) && next(currentSibling)) {\n                        return true;\n                    }\n                }\n                return false;\n            };\n        }\n        case SelectorType.Adjacent: {\n            if (adapter.prevElementSibling) {\n                return function adjacent(elem) {\n                    const previous = adapter.prevElementSibling(elem);\n                    return previous != null && next(previous);\n                };\n            }\n            return function adjacent(elem) {\n                const siblings = adapter.getSiblings(elem);\n                let lastElement;\n                for (let i = 0; i < siblings.length; i++) {\n                    const currentSibling = siblings[i];\n                    if (equals(elem, currentSibling))\n                        break;\n                    if (adapter.isTag(currentSibling)) {\n                        lastElement = currentSibling;\n                    }\n                }\n                return !!lastElement && next(lastElement);\n            };\n        }\n        case SelectorType.Universal: {\n            if (selector.namespace != null && selector.namespace !== \"*\") {\n                throw new Error(\"Namespaced universal selectors are not yet supported by css-select\");\n            }\n            return next;\n        }\n    }\n}\n//# sourceMappingURL=general.js.map","import * as DomUtils from \"domutils\";\nimport boolbase from \"boolbase\";\nimport { compile as compileRaw, compileUnsafe, compileToken, } from \"./compile.js\";\nimport { getNextSiblings } from \"./pseudo-selectors/subselects.js\";\nconst defaultEquals = (a, b) => a === b;\nconst defaultOptions = {\n    adapter: DomUtils,\n    equals: defaultEquals,\n};\nfunction convertOptionFormats(options) {\n    var _a, _b, _c, _d;\n    /*\n     * We force one format of options to the other one.\n     */\n    // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`.\n    const opts = options !== null && options !== void 0 ? options : defaultOptions;\n    // @ts-expect-error Same as above.\n    (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);\n    // @ts-expect-error `equals` does not exist on `Options`\n    (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);\n    return opts;\n}\nfunction wrapCompile(func) {\n    return function addAdapter(selector, options, context) {\n        const opts = convertOptionFormats(options);\n        return func(selector, opts, context);\n    };\n}\n/**\n * Compiles the query, returns a function.\n */\nexport const compile = wrapCompile(compileRaw);\nexport const _compileUnsafe = wrapCompile(compileUnsafe);\nexport const _compileToken = wrapCompile(compileToken);\nfunction getSelectorFunc(searchFunc) {\n    return function select(query, elements, options) {\n        const opts = convertOptionFormats(options);\n        if (typeof query !== \"function\") {\n            query = compileUnsafe(query, opts, elements);\n        }\n        const filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings);\n        return searchFunc(query, filteredElements, opts);\n    };\n}\nexport function prepareContext(elems, adapter, shouldTestNextSiblings = false) {\n    /*\n     * Add siblings if the query requires them.\n     * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692\n     */\n    if (shouldTestNextSiblings) {\n        elems = appendNextSiblings(elems, adapter);\n    }\n    return Array.isArray(elems)\n        ? adapter.removeSubsets(elems)\n        : adapter.getChildren(elems);\n}\nfunction appendNextSiblings(elem, adapter) {\n    // Order matters because jQuery seems to check the children before the siblings\n    const elems = Array.isArray(elem) ? elem.slice(0) : [elem];\n    const elemsLength = elems.length;\n    for (let i = 0; i < elemsLength; i++) {\n        const nextSiblings = getNextSiblings(elems[i], adapter);\n        elems.push(...nextSiblings);\n    }\n    return elems;\n}\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns All matching elements.\n *\n */\nexport const selectAll = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0\n    ? []\n    : options.adapter.findAll(query, elems));\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns the first match, or null if there was no match.\n */\nexport const selectOne = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0\n    ? null\n    : options.adapter.findOne(query, elems));\n/**\n * Tests whether or not an element is matched by query.\n *\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elem The element to test if it matches the query.\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns\n */\nexport function is(elem, query, options) {\n    const opts = convertOptionFormats(options);\n    return (typeof query === \"function\" ? query : compileRaw(query, opts))(elem);\n}\n/**\n * Alias for selectAll(query, elems, options).\n * @see [compile] for supported selector queries.\n */\nexport default selectAll;\n// Export filters, pseudos and aliases to allow users to supply their own.\n/** @deprecated Use the `pseudos` option instead. */\nexport { filters, pseudos, aliases } from \"./pseudo-selectors/index.js\";\n//# sourceMappingURL=index.js.map","/**\n * Aliases are pseudos that are expressed as selectors.\n */\nexport const aliases = {\n    // Links\n    \"any-link\": \":is(a, area, link)[href]\",\n    link: \":any-link:not(:visited)\",\n    // Forms\n    // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements\n    disabled: `:is(\n        :is(button, input, select, textarea, optgroup, option)[disabled],\n        optgroup[disabled] > option,\n        fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n    )`,\n    enabled: \":not(:disabled)\",\n    checked: \":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)\",\n    required: \":is(input, select, textarea)[required]\",\n    optional: \":is(input, select, textarea):not([required])\",\n    // JQuery extensions\n    // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness\n    selected: \"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)\",\n    checkbox: \"[type=checkbox]\",\n    file: \"[type=file]\",\n    password: \"[type=password]\",\n    radio: \"[type=radio]\",\n    reset: \"[type=reset]\",\n    image: \"[type=image]\",\n    submit: \"[type=submit]\",\n    parent: \":not(:empty)\",\n    header: \":is(h1, h2, h3, h4, h5, h6)\",\n    button: \":is(button, input[type=button])\",\n    input: \":is(input, textarea, select, button)\",\n    text: \"input:is(:not([type!='']), [type=text])\",\n};\n//# sourceMappingURL=aliases.js.map","import getNCheck from \"nth-check\";\nimport boolbase from \"boolbase\";\nfunction getChildFunc(next, adapter) {\n    return (elem) => {\n        const parent = adapter.getParent(elem);\n        return parent != null && adapter.isTag(parent) && next(elem);\n    };\n}\nexport const filters = {\n    contains(next, text, { adapter }) {\n        return function contains(elem) {\n            return next(elem) && adapter.getText(elem).includes(text);\n        };\n    },\n    icontains(next, text, { adapter }) {\n        const itext = text.toLowerCase();\n        return function icontains(elem) {\n            return (next(elem) &&\n                adapter.getText(elem).toLowerCase().includes(itext));\n        };\n    },\n    // Location specific methods\n    \"nth-child\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthChild(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = 0; i < siblings.length; i++) {\n                if (equals(elem, siblings[i]))\n                    break;\n                if (adapter.isTag(siblings[i])) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-last-child\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthLastChild(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = siblings.length - 1; i >= 0; i--) {\n                if (equals(elem, siblings[i]))\n                    break;\n                if (adapter.isTag(siblings[i])) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-of-type\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthOfType(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = 0; i < siblings.length; i++) {\n                const currentSibling = siblings[i];\n                if (equals(elem, currentSibling))\n                    break;\n                if (adapter.isTag(currentSibling) &&\n                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-last-of-type\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthLastOfType(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = siblings.length - 1; i >= 0; i--) {\n                const currentSibling = siblings[i];\n                if (equals(elem, currentSibling))\n                    break;\n                if (adapter.isTag(currentSibling) &&\n                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    // TODO determine the actual root element\n    root(next, _rule, { adapter }) {\n        return (elem) => {\n            const parent = adapter.getParent(elem);\n            return (parent == null || !adapter.isTag(parent)) && next(elem);\n        };\n    },\n    scope(next, rule, options, context) {\n        const { equals } = options;\n        if (!context || context.length === 0) {\n            // Equivalent to :root\n            return filters[\"root\"](next, rule, options);\n        }\n        if (context.length === 1) {\n            // NOTE: can't be unpacked, as :has uses this for side-effects\n            return (elem) => equals(context[0], elem) && next(elem);\n        }\n        return (elem) => context.includes(elem) && next(elem);\n    },\n    hover: dynamicStatePseudo(\"isHovered\"),\n    visited: dynamicStatePseudo(\"isVisited\"),\n    active: dynamicStatePseudo(\"isActive\"),\n};\n/**\n * Dynamic state pseudos. These depend on optional Adapter methods.\n *\n * @param name The name of the adapter method to call.\n * @returns Pseudo for the `filters` object.\n */\nfunction dynamicStatePseudo(name) {\n    return function dynamicPseudo(next, _rule, { adapter }) {\n        const func = adapter[name];\n        if (typeof func !== \"function\") {\n            return boolbase.falseFunc;\n        }\n        return function active(elem) {\n            return func(elem) && next(elem);\n        };\n    };\n}\n//# sourceMappingURL=filters.js.map","import { parse } from \"css-what\";\nimport { filters } from \"./filters.js\";\nimport { pseudos, verifyPseudoArgs } from \"./pseudos.js\";\nimport { aliases } from \"./aliases.js\";\nimport { subselects } from \"./subselects.js\";\nexport { filters, pseudos, aliases };\nexport function compilePseudoSelector(next, selector, options, context, compileToken) {\n    var _a;\n    const { name, data } = selector;\n    if (Array.isArray(data)) {\n        if (!(name in subselects)) {\n            throw new Error(`Unknown pseudo-class :${name}(${data})`);\n        }\n        return subselects[name](next, data, options, context, compileToken);\n    }\n    const userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name];\n    const stringPseudo = typeof userPseudo === \"string\" ? userPseudo : aliases[name];\n    if (typeof stringPseudo === \"string\") {\n        if (data != null) {\n            throw new Error(`Pseudo ${name} doesn't have any arguments`);\n        }\n        // The alias has to be parsed here, to make sure options are respected.\n        const alias = parse(stringPseudo);\n        return subselects[\"is\"](next, alias, options, context, compileToken);\n    }\n    if (typeof userPseudo === \"function\") {\n        verifyPseudoArgs(userPseudo, name, data, 1);\n        return (elem) => userPseudo(elem, data) && next(elem);\n    }\n    if (name in filters) {\n        return filters[name](next, data, options, context);\n    }\n    if (name in pseudos) {\n        const pseudo = pseudos[name];\n        verifyPseudoArgs(pseudo, name, data, 2);\n        return (elem) => pseudo(elem, options, data) && next(elem);\n    }\n    throw new Error(`Unknown pseudo-class :${name}`);\n}\n//# sourceMappingURL=index.js.map","// While filters are precompiled, pseudos get called when they are needed\nexport const pseudos = {\n    empty(elem, { adapter }) {\n        return !adapter.getChildren(elem).some((elem) => \n        // FIXME: `getText` call is potentially expensive.\n        adapter.isTag(elem) || adapter.getText(elem) !== \"\");\n    },\n    \"first-child\"(elem, { adapter, equals }) {\n        if (adapter.prevElementSibling) {\n            return adapter.prevElementSibling(elem) == null;\n        }\n        const firstChild = adapter\n            .getSiblings(elem)\n            .find((elem) => adapter.isTag(elem));\n        return firstChild != null && equals(elem, firstChild);\n    },\n    \"last-child\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        for (let i = siblings.length - 1; i >= 0; i--) {\n            if (equals(elem, siblings[i]))\n                return true;\n            if (adapter.isTag(siblings[i]))\n                break;\n        }\n        return false;\n    },\n    \"first-of-type\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        const elemName = adapter.getName(elem);\n        for (let i = 0; i < siblings.length; i++) {\n            const currentSibling = siblings[i];\n            if (equals(elem, currentSibling))\n                return true;\n            if (adapter.isTag(currentSibling) &&\n                adapter.getName(currentSibling) === elemName) {\n                break;\n            }\n        }\n        return false;\n    },\n    \"last-of-type\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        const elemName = adapter.getName(elem);\n        for (let i = siblings.length - 1; i >= 0; i--) {\n            const currentSibling = siblings[i];\n            if (equals(elem, currentSibling))\n                return true;\n            if (adapter.isTag(currentSibling) &&\n                adapter.getName(currentSibling) === elemName) {\n                break;\n            }\n        }\n        return false;\n    },\n    \"only-of-type\"(elem, { adapter, equals }) {\n        const elemName = adapter.getName(elem);\n        return adapter\n            .getSiblings(elem)\n            .every((sibling) => equals(elem, sibling) ||\n            !adapter.isTag(sibling) ||\n            adapter.getName(sibling) !== elemName);\n    },\n    \"only-child\"(elem, { adapter, equals }) {\n        return adapter\n            .getSiblings(elem)\n            .every((sibling) => equals(elem, sibling) || !adapter.isTag(sibling));\n    },\n};\nexport function verifyPseudoArgs(func, name, subselect, argIndex) {\n    if (subselect === null) {\n        if (func.length > argIndex) {\n            throw new Error(`Pseudo-class :${name} requires an argument`);\n        }\n    }\n    else if (func.length === argIndex) {\n        throw new Error(`Pseudo-class :${name} doesn't have any arguments`);\n    }\n}\n//# sourceMappingURL=pseudos.js.map","import boolbase from \"boolbase\";\nimport { isTraversal } from \"../sort.js\";\n/** Used as a placeholder for :has. Will be replaced with the actual element. */\nexport const PLACEHOLDER_ELEMENT = {};\nexport function ensureIsTag(next, adapter) {\n    if (next === boolbase.falseFunc)\n        return boolbase.falseFunc;\n    return (elem) => adapter.isTag(elem) && next(elem);\n}\nexport function getNextSiblings(elem, adapter) {\n    const siblings = adapter.getSiblings(elem);\n    if (siblings.length <= 1)\n        return [];\n    const elemIndex = siblings.indexOf(elem);\n    if (elemIndex < 0 || elemIndex === siblings.length - 1)\n        return [];\n    return siblings.slice(elemIndex + 1).filter(adapter.isTag);\n}\nfunction copyOptions(options) {\n    // Not copied: context, rootFunc\n    return {\n        xmlMode: !!options.xmlMode,\n        lowerCaseAttributeNames: !!options.lowerCaseAttributeNames,\n        lowerCaseTags: !!options.lowerCaseTags,\n        quirksMode: !!options.quirksMode,\n        cacheResults: !!options.cacheResults,\n        pseudos: options.pseudos,\n        adapter: options.adapter,\n        equals: options.equals,\n    };\n}\nconst is = (next, token, options, context, compileToken) => {\n    const func = compileToken(token, copyOptions(options), context);\n    return func === boolbase.trueFunc\n        ? next\n        : func === boolbase.falseFunc\n            ? boolbase.falseFunc\n            : (elem) => func(elem) && next(elem);\n};\n/*\n * :not, :has, :is, :matches and :where have to compile selectors\n * doing this in src/pseudos.ts would lead to circular dependencies,\n * so we add them here\n */\nexport const subselects = {\n    is,\n    /**\n     * `:matches` and `:where` are aliases for `:is`.\n     */\n    matches: is,\n    where: is,\n    not(next, token, options, context, compileToken) {\n        const func = compileToken(token, copyOptions(options), context);\n        return func === boolbase.falseFunc\n            ? next\n            : func === boolbase.trueFunc\n                ? boolbase.falseFunc\n                : (elem) => !func(elem) && next(elem);\n    },\n    has(next, subselect, options, _context, compileToken) {\n        const { adapter } = options;\n        const opts = copyOptions(options);\n        opts.relativeSelector = true;\n        const context = subselect.some((s) => s.some(isTraversal))\n            ? // Used as a placeholder. Will be replaced with the actual element.\n                [PLACEHOLDER_ELEMENT]\n            : undefined;\n        const compiled = compileToken(subselect, opts, context);\n        if (compiled === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        const hasElement = ensureIsTag(compiled, adapter);\n        // If `compiled` is `trueFunc`, we can skip this.\n        if (context && compiled !== boolbase.trueFunc) {\n            /*\n             * `shouldTestNextSiblings` will only be true if the query starts with\n             * a traversal (sibling or adjacent). That means we will always have a context.\n             */\n            const { shouldTestNextSiblings = false } = compiled;\n            return (elem) => {\n                if (!next(elem))\n                    return false;\n                context[0] = elem;\n                const childs = adapter.getChildren(elem);\n                const nextElements = shouldTestNextSiblings\n                    ? [...childs, ...getNextSiblings(elem, adapter)]\n                    : childs;\n                return adapter.existsOne(hasElement, nextElements);\n            };\n        }\n        return (elem) => next(elem) &&\n            adapter.existsOne(hasElement, adapter.getChildren(elem));\n    },\n};\n//# sourceMappingURL=subselects.js.map","import { AttributeAction, SelectorType } from \"css-what\";\nconst procedure = new Map([\n    [SelectorType.Universal, 50],\n    [SelectorType.Tag, 30],\n    [SelectorType.Attribute, 1],\n    [SelectorType.Pseudo, 0],\n]);\nexport function isTraversal(token) {\n    return !procedure.has(token.type);\n}\nconst attributes = new Map([\n    [AttributeAction.Exists, 10],\n    [AttributeAction.Equals, 8],\n    [AttributeAction.Not, 7],\n    [AttributeAction.Start, 6],\n    [AttributeAction.End, 6],\n    [AttributeAction.Any, 5],\n]);\n/**\n * Sort the parts of the passed selector,\n * as there is potential for optimization\n * (some types of selectors are faster than others)\n *\n * @param arr Selector to sort\n */\nexport default function sortByProcedure(arr) {\n    const procs = arr.map(getProcedure);\n    for (let i = 1; i < arr.length; i++) {\n        const procNew = procs[i];\n        if (procNew < 0)\n            continue;\n        for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n            const token = arr[j + 1];\n            arr[j + 1] = arr[j];\n            arr[j] = token;\n            procs[j + 1] = procs[j];\n            procs[j] = procNew;\n        }\n    }\n}\nfunction getProcedure(token) {\n    var _a, _b;\n    let proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1;\n    if (token.type === SelectorType.Attribute) {\n        proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4;\n        if (token.action === AttributeAction.Equals && token.name === \"id\") {\n            // Prefer ID selectors (eg. #ID)\n            proc = 9;\n        }\n        if (token.ignoreCase) {\n            /*\n             * IgnoreCase adds some overhead, prefer \"normal\" token\n             * this is a binary operation, to ensure it's still an int\n             */\n            proc >>= 1;\n        }\n    }\n    else if (token.type === SelectorType.Pseudo) {\n        if (!token.data) {\n            proc = 3;\n        }\n        else if (token.name === \"has\" || token.name === \"contains\") {\n            proc = 0; // Expensive in any case\n        }\n        else if (Array.isArray(token.data)) {\n            // Eg. :matches, :not\n            proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure))));\n            // If we have traversals, try to avoid executing this selector\n            if (proc < 0) {\n                proc = 0;\n            }\n        }\n        else {\n            proc = 2;\n        }\n    }\n    return proc;\n}\n//# sourceMappingURL=sort.js.map","export const elementNames = new Map([\n    \"altGlyph\",\n    \"altGlyphDef\",\n    \"altGlyphItem\",\n    \"animateColor\",\n    \"animateMotion\",\n    \"animateTransform\",\n    \"clipPath\",\n    \"feBlend\",\n    \"feColorMatrix\",\n    \"feComponentTransfer\",\n    \"feComposite\",\n    \"feConvolveMatrix\",\n    \"feDiffuseLighting\",\n    \"feDisplacementMap\",\n    \"feDistantLight\",\n    \"feDropShadow\",\n    \"feFlood\",\n    \"feFuncA\",\n    \"feFuncB\",\n    \"feFuncG\",\n    \"feFuncR\",\n    \"feGaussianBlur\",\n    \"feImage\",\n    \"feMerge\",\n    \"feMergeNode\",\n    \"feMorphology\",\n    \"feOffset\",\n    \"fePointLight\",\n    \"feSpecularLighting\",\n    \"feSpotLight\",\n    \"feTile\",\n    \"feTurbulence\",\n    \"foreignObject\",\n    \"glyphRef\",\n    \"linearGradient\",\n    \"radialGradient\",\n    \"textPath\",\n].map((val) => [val.toLowerCase(), val]));\nexport const attributeNames = new Map([\n    \"definitionURL\",\n    \"attributeName\",\n    \"attributeType\",\n    \"baseFrequency\",\n    \"baseProfile\",\n    \"calcMode\",\n    \"clipPathUnits\",\n    \"diffuseConstant\",\n    \"edgeMode\",\n    \"filterUnits\",\n    \"glyphRef\",\n    \"gradientTransform\",\n    \"gradientUnits\",\n    \"kernelMatrix\",\n    \"kernelUnitLength\",\n    \"keyPoints\",\n    \"keySplines\",\n    \"keyTimes\",\n    \"lengthAdjust\",\n    \"limitingConeAngle\",\n    \"markerHeight\",\n    \"markerUnits\",\n    \"markerWidth\",\n    \"maskContentUnits\",\n    \"maskUnits\",\n    \"numOctaves\",\n    \"pathLength\",\n    \"patternContentUnits\",\n    \"patternTransform\",\n    \"patternUnits\",\n    \"pointsAtX\",\n    \"pointsAtY\",\n    \"pointsAtZ\",\n    \"preserveAlpha\",\n    \"preserveAspectRatio\",\n    \"primitiveUnits\",\n    \"refX\",\n    \"refY\",\n    \"repeatCount\",\n    \"repeatDur\",\n    \"requiredExtensions\",\n    \"requiredFeatures\",\n    \"specularConstant\",\n    \"specularExponent\",\n    \"spreadMethod\",\n    \"startOffset\",\n    \"stdDeviation\",\n    \"stitchTiles\",\n    \"surfaceScale\",\n    \"systemLanguage\",\n    \"tableValues\",\n    \"targetX\",\n    \"targetY\",\n    \"textLength\",\n    \"viewBox\",\n    \"viewTarget\",\n    \"xChannelSelector\",\n    \"yChannelSelector\",\n    \"zoomAndPan\",\n].map((val) => [val.toLowerCase(), val]));\n","/*\n * Module dependencies\n */\nimport * as ElementType from \"domelementtype\";\nimport { encodeXML, escapeAttribute, escapeText } from \"entities\";\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nimport { elementNames, attributeNames } from \"./foreignNames.js\";\nconst unencodedElements = new Set([\n    \"style\",\n    \"script\",\n    \"xmp\",\n    \"iframe\",\n    \"noembed\",\n    \"noframes\",\n    \"plaintext\",\n    \"noscript\",\n]);\nfunction replaceQuotes(value) {\n    return value.replace(/\"/g, \"&quot;\");\n}\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n    var _a;\n    if (!attributes)\n        return;\n    const encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false\n        ? replaceQuotes\n        : opts.xmlMode || opts.encodeEntities !== \"utf8\"\n            ? encodeXML\n            : escapeAttribute;\n    return Object.keys(attributes)\n        .map((key) => {\n        var _a, _b;\n        const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n        if (opts.xmlMode === \"foreign\") {\n            /* Fix up mixed-case attribute names */\n            key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n        }\n        if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n            return key;\n        }\n        return `${key}=\"${encode(value)}\"`;\n    })\n        .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nconst singleTag = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nexport function render(node, options = {}) {\n    const nodes = \"length\" in node ? node : [node];\n    let output = \"\";\n    for (let i = 0; i < nodes.length; i++) {\n        output += renderNode(nodes[i], options);\n    }\n    return output;\n}\nexport default render;\nfunction renderNode(node, options) {\n    switch (node.type) {\n        case ElementType.Root:\n            return render(node.children, options);\n        // @ts-expect-error We don't use `Doctype` yet\n        case ElementType.Doctype:\n        case ElementType.Directive:\n            return renderDirective(node);\n        case ElementType.Comment:\n            return renderComment(node);\n        case ElementType.CDATA:\n            return renderCdata(node);\n        case ElementType.Script:\n        case ElementType.Style:\n        case ElementType.Tag:\n            return renderTag(node, options);\n        case ElementType.Text:\n            return renderText(node, options);\n    }\n}\nconst foreignModeIntegrationPoints = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignObject\",\n    \"desc\",\n    \"title\",\n]);\nconst foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n    var _a;\n    // Handle SVG / MathML in HTML\n    if (opts.xmlMode === \"foreign\") {\n        /* Fix up mixed-case element names */\n        elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n        /* Exit foreign mode at integration points */\n        if (elem.parent &&\n            foreignModeIntegrationPoints.has(elem.parent.name)) {\n            opts = { ...opts, xmlMode: false };\n        }\n    }\n    if (!opts.xmlMode && foreignElements.has(elem.name)) {\n        opts = { ...opts, xmlMode: \"foreign\" };\n    }\n    let tag = `<${elem.name}`;\n    const attribs = formatAttributes(elem.attribs, opts);\n    if (attribs) {\n        tag += ` ${attribs}`;\n    }\n    if (elem.children.length === 0 &&\n        (opts.xmlMode\n            ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n                opts.selfClosingTags !== false\n            : // User explicitly asked for self-closing tags, even in HTML mode\n                opts.selfClosingTags && singleTag.has(elem.name))) {\n        if (!opts.xmlMode)\n            tag += \" \";\n        tag += \"/>\";\n    }\n    else {\n        tag += \">\";\n        if (elem.children.length > 0) {\n            tag += render(elem.children, opts);\n        }\n        if (opts.xmlMode || !singleTag.has(elem.name)) {\n            tag += `</${elem.name}>`;\n        }\n    }\n    return tag;\n}\nfunction renderDirective(elem) {\n    return `<${elem.data}>`;\n}\nfunction renderText(elem, opts) {\n    var _a;\n    let data = elem.data || \"\";\n    // If entities weren't decoded, no need to encode them back\n    if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&\n        !(!opts.xmlMode &&\n            elem.parent &&\n            unencodedElements.has(elem.parent.name))) {\n        data =\n            opts.xmlMode || opts.encodeEntities !== \"utf8\"\n                ? encodeXML(data)\n                : escapeText(data);\n    }\n    return data;\n}\nfunction renderCdata(elem) {\n    return `<![CDATA[${elem.children[0].data}]]>`;\n}\nfunction renderComment(elem) {\n    return `<!--${elem.data}-->`;\n}\n","/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n    /** Type for the root element of a document */\n    ElementType[\"Root\"] = \"root\";\n    /** Type for Text */\n    ElementType[\"Text\"] = \"text\";\n    /** Type for <? ... ?> */\n    ElementType[\"Directive\"] = \"directive\";\n    /** Type for <!-- ... --> */\n    ElementType[\"Comment\"] = \"comment\";\n    /** Type for <script> tags */\n    ElementType[\"Script\"] = \"script\";\n    /** Type for <style> tags */\n    ElementType[\"Style\"] = \"style\";\n    /** Type for Any tag */\n    ElementType[\"Tag\"] = \"tag\";\n    /** Type for <![CDATA[ ... ]]> */\n    ElementType[\"CDATA\"] = \"cdata\";\n    /** Type for <!doctype ...> */\n    ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n *\n * @param elem Element to test\n */\nexport function isTag(elem) {\n    return (elem.type === ElementType.Tag ||\n        elem.type === ElementType.Script ||\n        elem.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\nexport const Root = ElementType.Root;\n/** Type for Text */\nexport const Text = ElementType.Text;\n/** Type for <? ... ?> */\nexport const Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\nexport const Comment = ElementType.Comment;\n/** Type for <script> tags */\nexport const Script = ElementType.Script;\n/** Type for <style> tags */\nexport const Style = ElementType.Style;\n/** Type for Any tag */\nexport const Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\nexport const CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\nexport const Doctype = ElementType.Doctype;\n","import { ElementType } from \"domelementtype\";\nimport { Element, Text, Comment, CDATA, Document, ProcessingInstruction, } from \"./node.js\";\nexport * from \"./node.js\";\n// Default options\nconst defaultOpts = {\n    withStartIndices: false,\n    withEndIndices: false,\n    xmlMode: false,\n};\nexport class DomHandler {\n    /**\n     * @param callback Called once parsing has completed.\n     * @param options Settings for the handler.\n     * @param elementCB Callback whenever a tag is closed.\n     */\n    constructor(callback, options, elementCB) {\n        /** The elements of the DOM */\n        this.dom = [];\n        /** The root element for the DOM */\n        this.root = new Document(this.dom);\n        /** Indicated whether parsing has been completed. */\n        this.done = false;\n        /** Stack of open tags. */\n        this.tagStack = [this.root];\n        /** A data node that is still being written to. */\n        this.lastNode = null;\n        /** Reference to the parser instance. Used for location information. */\n        this.parser = null;\n        // Make it possible to skip arguments, for backwards-compatibility\n        if (typeof options === \"function\") {\n            elementCB = options;\n            options = defaultOpts;\n        }\n        if (typeof callback === \"object\") {\n            options = callback;\n            callback = undefined;\n        }\n        this.callback = callback !== null && callback !== void 0 ? callback : null;\n        this.options = options !== null && options !== void 0 ? options : defaultOpts;\n        this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n    }\n    onparserinit(parser) {\n        this.parser = parser;\n    }\n    // Resets the handler back to starting state\n    onreset() {\n        this.dom = [];\n        this.root = new Document(this.dom);\n        this.done = false;\n        this.tagStack = [this.root];\n        this.lastNode = null;\n        this.parser = null;\n    }\n    // Signals the handler that parsing is done\n    onend() {\n        if (this.done)\n            return;\n        this.done = true;\n        this.parser = null;\n        this.handleCallback(null);\n    }\n    onerror(error) {\n        this.handleCallback(error);\n    }\n    onclosetag() {\n        this.lastNode = null;\n        const elem = this.tagStack.pop();\n        if (this.options.withEndIndices) {\n            elem.endIndex = this.parser.endIndex;\n        }\n        if (this.elementCB)\n            this.elementCB(elem);\n    }\n    onopentag(name, attribs) {\n        const type = this.options.xmlMode ? ElementType.Tag : undefined;\n        const element = new Element(name, attribs, undefined, type);\n        this.addNode(element);\n        this.tagStack.push(element);\n    }\n    ontext(data) {\n        const { lastNode } = this;\n        if (lastNode && lastNode.type === ElementType.Text) {\n            lastNode.data += data;\n            if (this.options.withEndIndices) {\n                lastNode.endIndex = this.parser.endIndex;\n            }\n        }\n        else {\n            const node = new Text(data);\n            this.addNode(node);\n            this.lastNode = node;\n        }\n    }\n    oncomment(data) {\n        if (this.lastNode && this.lastNode.type === ElementType.Comment) {\n            this.lastNode.data += data;\n            return;\n        }\n        const node = new Comment(data);\n        this.addNode(node);\n        this.lastNode = node;\n    }\n    oncommentend() {\n        this.lastNode = null;\n    }\n    oncdatastart() {\n        const text = new Text(\"\");\n        const node = new CDATA([text]);\n        this.addNode(node);\n        text.parent = node;\n        this.lastNode = text;\n    }\n    oncdataend() {\n        this.lastNode = null;\n    }\n    onprocessinginstruction(name, data) {\n        const node = new ProcessingInstruction(name, data);\n        this.addNode(node);\n    }\n    handleCallback(error) {\n        if (typeof this.callback === \"function\") {\n            this.callback(error, this.dom);\n        }\n        else if (error) {\n            throw error;\n        }\n    }\n    addNode(node) {\n        const parent = this.tagStack[this.tagStack.length - 1];\n        const previousSibling = parent.children[parent.children.length - 1];\n        if (this.options.withStartIndices) {\n            node.startIndex = this.parser.startIndex;\n        }\n        if (this.options.withEndIndices) {\n            node.endIndex = this.parser.endIndex;\n        }\n        parent.children.push(node);\n        if (previousSibling) {\n            node.prev = previousSibling;\n            previousSibling.next = node;\n        }\n        node.parent = parent;\n        this.lastNode = null;\n    }\n}\nexport default DomHandler;\n","import { ElementType, isTag as isTagRaw } from \"domelementtype\";\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nexport class Node {\n    constructor() {\n        /** Parent of the node */\n        this.parent = null;\n        /** Previous sibling */\n        this.prev = null;\n        /** Next sibling */\n        this.next = null;\n        /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n        this.startIndex = null;\n        /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n        this.endIndex = null;\n    }\n    // Read-write aliases for properties\n    /**\n     * Same as {@link parent}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get parentNode() {\n        return this.parent;\n    }\n    set parentNode(parent) {\n        this.parent = parent;\n    }\n    /**\n     * Same as {@link prev}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get previousSibling() {\n        return this.prev;\n    }\n    set previousSibling(prev) {\n        this.prev = prev;\n    }\n    /**\n     * Same as {@link next}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get nextSibling() {\n        return this.next;\n    }\n    set nextSibling(next) {\n        this.next = next;\n    }\n    /**\n     * Clone this node, and optionally its children.\n     *\n     * @param recursive Clone child nodes as well.\n     * @returns A clone of the node.\n     */\n    cloneNode(recursive = false) {\n        return cloneNode(this, recursive);\n    }\n}\n/**\n * A node that contains some data.\n */\nexport class DataNode extends Node {\n    /**\n     * @param data The content of the data node\n     */\n    constructor(data) {\n        super();\n        this.data = data;\n    }\n    /**\n     * Same as {@link data}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get nodeValue() {\n        return this.data;\n    }\n    set nodeValue(data) {\n        this.data = data;\n    }\n}\n/**\n * Text within the document.\n */\nexport class Text extends DataNode {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Text;\n    }\n    get nodeType() {\n        return 3;\n    }\n}\n/**\n * Comments within the document.\n */\nexport class Comment extends DataNode {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Comment;\n    }\n    get nodeType() {\n        return 8;\n    }\n}\n/**\n * Processing instructions, including doc types.\n */\nexport class ProcessingInstruction extends DataNode {\n    constructor(name, data) {\n        super(data);\n        this.name = name;\n        this.type = ElementType.Directive;\n    }\n    get nodeType() {\n        return 1;\n    }\n}\n/**\n * A `Node` that can have children.\n */\nexport class NodeWithChildren extends Node {\n    /**\n     * @param children Children of the node. Only certain node types can have children.\n     */\n    constructor(children) {\n        super();\n        this.children = children;\n    }\n    // Aliases\n    /** First child of the node. */\n    get firstChild() {\n        var _a;\n        return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n    }\n    /** Last child of the node. */\n    get lastChild() {\n        return this.children.length > 0\n            ? this.children[this.children.length - 1]\n            : null;\n    }\n    /**\n     * Same as {@link children}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get childNodes() {\n        return this.children;\n    }\n    set childNodes(children) {\n        this.children = children;\n    }\n}\nexport class CDATA extends NodeWithChildren {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.CDATA;\n    }\n    get nodeType() {\n        return 4;\n    }\n}\n/**\n * The root node of the document.\n */\nexport class Document extends NodeWithChildren {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Root;\n    }\n    get nodeType() {\n        return 9;\n    }\n}\n/**\n * An element within the DOM.\n */\nexport class Element extends NodeWithChildren {\n    /**\n     * @param name Name of the tag, eg. `div`, `span`.\n     * @param attribs Object mapping attribute names to attribute values.\n     * @param children Children of the node.\n     */\n    constructor(name, attribs, children = [], type = name === \"script\"\n        ? ElementType.Script\n        : name === \"style\"\n            ? ElementType.Style\n            : ElementType.Tag) {\n        super(children);\n        this.name = name;\n        this.attribs = attribs;\n        this.type = type;\n    }\n    get nodeType() {\n        return 1;\n    }\n    // DOM Level 1 aliases\n    /**\n     * Same as {@link name}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get tagName() {\n        return this.name;\n    }\n    set tagName(name) {\n        this.name = name;\n    }\n    get attributes() {\n        return Object.keys(this.attribs).map((name) => {\n            var _a, _b;\n            return ({\n                name,\n                value: this.attribs[name],\n                namespace: (_a = this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n                prefix: (_b = this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n            });\n        });\n    }\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nexport function isTag(node) {\n    return isTagRaw(node);\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nexport function isCDATA(node) {\n    return node.type === ElementType.CDATA;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nexport function isText(node) {\n    return node.type === ElementType.Text;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nexport function isComment(node) {\n    return node.type === ElementType.Comment;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nexport function isDirective(node) {\n    return node.type === ElementType.Directive;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nexport function isDocument(node) {\n    return node.type === ElementType.Root;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has children, `false` otherwise.\n */\nexport function hasChildren(node) {\n    return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nexport function cloneNode(node, recursive = false) {\n    let result;\n    if (isText(node)) {\n        result = new Text(node.data);\n    }\n    else if (isComment(node)) {\n        result = new Comment(node.data);\n    }\n    else if (isTag(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new Element(node.name, { ...node.attribs }, children);\n        children.forEach((child) => (child.parent = clone));\n        if (node.namespace != null) {\n            clone.namespace = node.namespace;\n        }\n        if (node[\"x-attribsNamespace\"]) {\n            clone[\"x-attribsNamespace\"] = { ...node[\"x-attribsNamespace\"] };\n        }\n        if (node[\"x-attribsPrefix\"]) {\n            clone[\"x-attribsPrefix\"] = { ...node[\"x-attribsPrefix\"] };\n        }\n        result = clone;\n    }\n    else if (isCDATA(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new CDATA(children);\n        children.forEach((child) => (child.parent = clone));\n        result = clone;\n    }\n    else if (isDocument(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new Document(children);\n        children.forEach((child) => (child.parent = clone));\n        if (node[\"x-mode\"]) {\n            clone[\"x-mode\"] = node[\"x-mode\"];\n        }\n        result = clone;\n    }\n    else if (isDirective(node)) {\n        const instruction = new ProcessingInstruction(node.name, node.data);\n        if (node[\"x-name\"] != null) {\n            instruction[\"x-name\"] = node[\"x-name\"];\n            instruction[\"x-publicId\"] = node[\"x-publicId\"];\n            instruction[\"x-systemId\"] = node[\"x-systemId\"];\n        }\n        result = instruction;\n    }\n    else {\n        throw new Error(`Not implemented yet: ${node.type}`);\n    }\n    result.startIndex = node.startIndex;\n    result.endIndex = node.endIndex;\n    if (node.sourceCodeLocation != null) {\n        result.sourceCodeLocation = node.sourceCodeLocation;\n    }\n    return result;\n}\nfunction cloneChildren(childs) {\n    const children = childs.map((child) => cloneNode(child, true));\n    for (let i = 1; i < children.length; i++) {\n        children[i].prev = children[i - 1];\n        children[i - 1].next = children[i];\n    }\n    return children;\n}\n","import { textContent } from \"./stringify.js\";\nimport { getElementsByTagName } from \"./legacy.js\";\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @category Feeds\n * @param doc - The DOM to to extract the feed from.\n * @returns The feed.\n */\nexport function getFeed(doc) {\n    const feedRoot = getOneElement(isValidFeed, doc);\n    return !feedRoot\n        ? null\n        : feedRoot.name === \"feed\"\n            ? getAtomFeed(feedRoot)\n            : getRssFeed(feedRoot);\n}\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot) {\n    var _a;\n    const childs = feedRoot.children;\n    const feed = {\n        type: \"atom\",\n        items: getElementsByTagName(\"entry\", childs).map((item) => {\n            var _a;\n            const { children } = item;\n            const entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"id\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            const href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n            if (href) {\n                entry.link = href;\n            }\n            const description = fetch(\"summary\", children) || fetch(\"content\", children);\n            if (description) {\n                entry.description = description;\n            }\n            const pubDate = fetch(\"updated\", children);\n            if (pubDate) {\n                entry.pubDate = new Date(pubDate);\n            }\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"id\", \"id\", childs);\n    addConditionally(feed, \"title\", \"title\", childs);\n    const href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n    if (href) {\n        feed.link = href;\n    }\n    addConditionally(feed, \"description\", \"subtitle\", childs);\n    const updated = fetch(\"updated\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"email\", childs, true);\n    return feed;\n}\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot) {\n    var _a, _b;\n    const childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n    const feed = {\n        type: feedRoot.name.substr(0, 3),\n        id: \"\",\n        items: getElementsByTagName(\"item\", feedRoot.children).map((item) => {\n            const { children } = item;\n            const entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"guid\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            addConditionally(entry, \"link\", \"link\", children);\n            addConditionally(entry, \"description\", \"description\", children);\n            const pubDate = fetch(\"pubDate\", children) || fetch(\"dc:date\", children);\n            if (pubDate)\n                entry.pubDate = new Date(pubDate);\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"title\", \"title\", childs);\n    addConditionally(feed, \"link\", \"link\", childs);\n    addConditionally(feed, \"description\", \"description\", childs);\n    const updated = fetch(\"lastBuildDate\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n    return feed;\n}\nconst MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\nconst MEDIA_KEYS_INT = [\n    \"fileSize\",\n    \"bitrate\",\n    \"framerate\",\n    \"samplingrate\",\n    \"channels\",\n    \"duration\",\n    \"height\",\n    \"width\",\n];\n/**\n * Get all media elements of a feed item.\n *\n * @param where Nodes to search in.\n * @returns Media elements.\n */\nfunction getMediaElements(where) {\n    return getElementsByTagName(\"media:content\", where).map((elem) => {\n        const { attribs } = elem;\n        const media = {\n            medium: attribs[\"medium\"],\n            isDefault: !!attribs[\"isDefault\"],\n        };\n        for (const attrib of MEDIA_KEYS_STRING) {\n            if (attribs[attrib]) {\n                media[attrib] = attribs[attrib];\n            }\n        }\n        for (const attrib of MEDIA_KEYS_INT) {\n            if (attribs[attrib]) {\n                media[attrib] = parseInt(attribs[attrib], 10);\n            }\n        }\n        if (attribs[\"expression\"]) {\n            media.expression = attribs[\"expression\"];\n        }\n        return media;\n    });\n}\n/**\n * Get one element by tag name.\n *\n * @param tagName Tag name to look for\n * @param node Node to search in\n * @returns The element or null\n */\nfunction getOneElement(tagName, node) {\n    return getElementsByTagName(tagName, node, true, 1)[0];\n}\n/**\n * Get the text content of an element with a certain tag name.\n *\n * @param tagName Tag name to look for.\n * @param where Node to search in.\n * @param recurse Whether to recurse into child nodes.\n * @returns The text content of the element.\n */\nfunction fetch(tagName, where, recurse = false) {\n    return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim();\n}\n/**\n * Adds a property to an object if it has a value.\n *\n * @param obj Object to be extended\n * @param prop Property name\n * @param tagName Tag name that contains the conditionally added property\n * @param where Element to search for the property\n * @param recurse Whether to recurse into child nodes.\n */\nfunction addConditionally(obj, prop, tagName, where, recurse = false) {\n    const val = fetch(tagName, where, recurse);\n    if (val)\n        obj[prop] = val;\n}\n/**\n * Checks if an element is a feed root node.\n *\n * @param value The name of the element to check.\n * @returns Whether an element is a feed root node.\n */\nfunction isValidFeed(value) {\n    return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n//# sourceMappingURL=feeds.js.map","import { hasChildren } from \"domhandler\";\n/**\n * Given an array of nodes, remove any member that is contained by another\n * member.\n *\n * @category Helpers\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't contained by other nodes.\n */\nexport function removeSubsets(nodes) {\n    let idx = nodes.length;\n    /*\n     * Check if each node (or one of its ancestors) is already contained in the\n     * array.\n     */\n    while (--idx >= 0) {\n        const node = nodes[idx];\n        /*\n         * Remove the node if it is not unique.\n         * We are going through the array from the end, so we only\n         * have to check nodes that preceed the node under consideration in the array.\n         */\n        if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n            nodes.splice(idx, 1);\n            continue;\n        }\n        for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n            if (nodes.includes(ancestor)) {\n                nodes.splice(idx, 1);\n                break;\n            }\n        }\n    }\n    return nodes;\n}\n/**\n * @category Helpers\n * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}\n */\nexport var DocumentPosition;\n(function (DocumentPosition) {\n    DocumentPosition[DocumentPosition[\"DISCONNECTED\"] = 1] = \"DISCONNECTED\";\n    DocumentPosition[DocumentPosition[\"PRECEDING\"] = 2] = \"PRECEDING\";\n    DocumentPosition[DocumentPosition[\"FOLLOWING\"] = 4] = \"FOLLOWING\";\n    DocumentPosition[DocumentPosition[\"CONTAINS\"] = 8] = \"CONTAINS\";\n    DocumentPosition[DocumentPosition[\"CONTAINED_BY\"] = 16] = \"CONTAINED_BY\";\n})(DocumentPosition || (DocumentPosition = {}));\n/**\n * Compare the position of one node against another node in any other document,\n * returning a bitmask with the values from {@link DocumentPosition}.\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent.\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @category Helpers\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nexport function compareDocumentPosition(nodeA, nodeB) {\n    const aParents = [];\n    const bParents = [];\n    if (nodeA === nodeB) {\n        return 0;\n    }\n    let current = hasChildren(nodeA) ? nodeA : nodeA.parent;\n    while (current) {\n        aParents.unshift(current);\n        current = current.parent;\n    }\n    current = hasChildren(nodeB) ? nodeB : nodeB.parent;\n    while (current) {\n        bParents.unshift(current);\n        current = current.parent;\n    }\n    const maxIdx = Math.min(aParents.length, bParents.length);\n    let idx = 0;\n    while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n        idx++;\n    }\n    if (idx === 0) {\n        return DocumentPosition.DISCONNECTED;\n    }\n    const sharedParent = aParents[idx - 1];\n    const siblings = sharedParent.children;\n    const aSibling = aParents[idx];\n    const bSibling = bParents[idx];\n    if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n        if (sharedParent === nodeB) {\n            return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;\n        }\n        return DocumentPosition.FOLLOWING;\n    }\n    if (sharedParent === nodeA) {\n        return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;\n    }\n    return DocumentPosition.PRECEDING;\n}\n/**\n * Sort an array of nodes based on their relative position in the document,\n * removing any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @category Helpers\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nexport function uniqueSort(nodes) {\n    nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1));\n    nodes.sort((a, b) => {\n        const relative = compareDocumentPosition(a, b);\n        if (relative & DocumentPosition.PRECEDING) {\n            return -1;\n        }\n        else if (relative & DocumentPosition.FOLLOWING) {\n            return 1;\n        }\n        return 0;\n    });\n    return nodes;\n}\n//# sourceMappingURL=helpers.js.map","import { isTag, isText } from \"domhandler\";\nimport { filter, findOne } from \"./querying.js\";\n/**\n * A map of functions to check nodes against.\n */\nconst Checks = {\n    tag_name(name) {\n        if (typeof name === \"function\") {\n            return (elem) => isTag(elem) && name(elem.name);\n        }\n        else if (name === \"*\") {\n            return isTag;\n        }\n        return (elem) => isTag(elem) && elem.name === name;\n    },\n    tag_type(type) {\n        if (typeof type === \"function\") {\n            return (elem) => type(elem.type);\n        }\n        return (elem) => elem.type === type;\n    },\n    tag_contains(data) {\n        if (typeof data === \"function\") {\n            return (elem) => isText(elem) && data(elem.data);\n        }\n        return (elem) => isText(elem) && elem.data === data;\n    },\n};\n/**\n * Returns a function to check whether a node has an attribute with a particular\n * value.\n *\n * @param attrib Attribute to check.\n * @param value Attribute value to look for.\n * @returns A function to check whether the a node has an attribute with a\n *   particular value.\n */\nfunction getAttribCheck(attrib, value) {\n    if (typeof value === \"function\") {\n        return (elem) => isTag(elem) && value(elem.attribs[attrib]);\n    }\n    return (elem) => isTag(elem) && elem.attribs[attrib] === value;\n}\n/**\n * Returns a function that returns `true` if either of the input functions\n * returns `true` for a node.\n *\n * @param a First function to combine.\n * @param b Second function to combine.\n * @returns A function taking a node and returning `true` if either of the input\n *   functions returns `true` for the node.\n */\nfunction combineFuncs(a, b) {\n    return (elem) => a(elem) || b(elem);\n}\n/**\n * Returns a function that executes all checks in `options` and returns `true`\n * if any of them match a node.\n *\n * @param options An object describing nodes to look for.\n * @returns A function that executes all checks in `options` and returns `true`\n *   if any of them match a node.\n */\nfunction compileTest(options) {\n    const funcs = Object.keys(options).map((key) => {\n        const value = options[key];\n        return Object.prototype.hasOwnProperty.call(Checks, key)\n            ? Checks[key](value)\n            : getAttribCheck(key, value);\n    });\n    return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n}\n/**\n * Checks whether a node matches the description in `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param node The element to test.\n * @returns Whether the element matches the description in `options`.\n */\nexport function testElement(options, node) {\n    const test = compileTest(options);\n    return test ? test(node) : true;\n}\n/**\n * Returns all nodes that match `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes that match `options`.\n */\nexport function getElements(options, nodes, recurse, limit = Infinity) {\n    const test = compileTest(options);\n    return test ? filter(test, nodes, recurse, limit) : [];\n}\n/**\n * Returns the node with the supplied ID.\n *\n * @category Legacy Query Functions\n * @param id The unique ID attribute value to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @returns The node with the supplied ID.\n */\nexport function getElementById(id, nodes, recurse = true) {\n    if (!Array.isArray(nodes))\n        nodes = [nodes];\n    return findOne(getAttribCheck(\"id\", id), nodes, recurse);\n}\n/**\n * Returns all nodes with the supplied `tagName`.\n *\n * @category Legacy Query Functions\n * @param tagName Tag name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `tagName`.\n */\nexport function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {\n    return filter(Checks[\"tag_name\"](tagName), nodes, recurse, limit);\n}\n/**\n * Returns all nodes with the supplied `className`.\n *\n * @category Legacy Query Functions\n * @param className Class name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `className`.\n */\nexport function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) {\n    return filter(getAttribCheck(\"class\", className), nodes, recurse, limit);\n}\n/**\n * Returns all nodes with the supplied `type`.\n *\n * @category Legacy Query Functions\n * @param type Element type to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `type`.\n */\nexport function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) {\n    return filter(Checks[\"tag_type\"](type), nodes, recurse, limit);\n}\n//# sourceMappingURL=legacy.js.map","/**\n * Remove an element from the dom\n *\n * @category Manipulation\n * @param elem The element to be removed\n */\nexport function removeElement(elem) {\n    if (elem.prev)\n        elem.prev.next = elem.next;\n    if (elem.next)\n        elem.next.prev = elem.prev;\n    if (elem.parent) {\n        const childs = elem.parent.children;\n        const childsIndex = childs.lastIndexOf(elem);\n        if (childsIndex >= 0) {\n            childs.splice(childsIndex, 1);\n        }\n    }\n    elem.next = null;\n    elem.prev = null;\n    elem.parent = null;\n}\n/**\n * Replace an element in the dom\n *\n * @category Manipulation\n * @param elem The element to be replaced\n * @param replacement The element to be added\n */\nexport function replaceElement(elem, replacement) {\n    const prev = (replacement.prev = elem.prev);\n    if (prev) {\n        prev.next = replacement;\n    }\n    const next = (replacement.next = elem.next);\n    if (next) {\n        next.prev = replacement;\n    }\n    const parent = (replacement.parent = elem.parent);\n    if (parent) {\n        const childs = parent.children;\n        childs[childs.lastIndexOf(elem)] = replacement;\n        elem.parent = null;\n    }\n}\n/**\n * Append a child to an element.\n *\n * @category Manipulation\n * @param parent The element to append to.\n * @param child The element to be added as a child.\n */\nexport function appendChild(parent, child) {\n    removeElement(child);\n    child.next = null;\n    child.parent = parent;\n    if (parent.children.push(child) > 1) {\n        const sibling = parent.children[parent.children.length - 2];\n        sibling.next = child;\n        child.prev = sibling;\n    }\n    else {\n        child.prev = null;\n    }\n}\n/**\n * Append an element after another.\n *\n * @category Manipulation\n * @param elem The element to append after.\n * @param next The element be added.\n */\nexport function append(elem, next) {\n    removeElement(next);\n    const { parent } = elem;\n    const currNext = elem.next;\n    next.next = currNext;\n    next.prev = elem;\n    elem.next = next;\n    next.parent = parent;\n    if (currNext) {\n        currNext.prev = next;\n        if (parent) {\n            const childs = parent.children;\n            childs.splice(childs.lastIndexOf(currNext), 0, next);\n        }\n    }\n    else if (parent) {\n        parent.children.push(next);\n    }\n}\n/**\n * Prepend a child to an element.\n *\n * @category Manipulation\n * @param parent The element to prepend before.\n * @param child The element to be added as a child.\n */\nexport function prependChild(parent, child) {\n    removeElement(child);\n    child.parent = parent;\n    child.prev = null;\n    if (parent.children.unshift(child) !== 1) {\n        const sibling = parent.children[1];\n        sibling.prev = child;\n        child.next = sibling;\n    }\n    else {\n        child.next = null;\n    }\n}\n/**\n * Prepend an element before another.\n *\n * @category Manipulation\n * @param elem The element to prepend before.\n * @param prev The element be added.\n */\nexport function prepend(elem, prev) {\n    removeElement(prev);\n    const { parent } = elem;\n    if (parent) {\n        const childs = parent.children;\n        childs.splice(childs.indexOf(elem), 0, prev);\n    }\n    if (elem.prev) {\n        elem.prev.next = prev;\n    }\n    prev.parent = parent;\n    prev.prev = elem.prev;\n    prev.next = elem;\n    elem.prev = prev;\n}\n//# sourceMappingURL=manipulation.js.map","import { isTag, hasChildren } from \"domhandler\";\n/**\n * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param node Node to search. Will be included in the result set if it matches.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function filter(test, node, recurse = true, limit = Infinity) {\n    return find(test, Array.isArray(node) ? node : [node], recurse, limit);\n}\n/**\n * Search an array of nodes and their children for nodes passing a test function.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function find(test, nodes, recurse, limit) {\n    const result = [];\n    /** Stack of the arrays we are looking at. */\n    const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];\n    /** Stack of the indices within the arrays. */\n    const indexStack = [0];\n    for (;;) {\n        // First, check if the current array has any more elements to look at.\n        if (indexStack[0] >= nodeStack[0].length) {\n            // If we have no more arrays to look at, we are done.\n            if (indexStack.length === 1) {\n                return result;\n            }\n            // Otherwise, remove the current array from the stack.\n            nodeStack.shift();\n            indexStack.shift();\n            // Loop back to the start to continue with the next array.\n            continue;\n        }\n        const elem = nodeStack[0][indexStack[0]++];\n        if (test(elem)) {\n            result.push(elem);\n            if (--limit <= 0)\n                return result;\n        }\n        if (recurse && hasChildren(elem) && elem.children.length > 0) {\n            /*\n             * Add the children to the stack. We are depth-first, so this is\n             * the next array we look at.\n             */\n            indexStack.unshift(0);\n            nodeStack.unshift(elem.children);\n        }\n    }\n}\n/**\n * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns The first node in the array that passes `test`.\n * @deprecated Use `Array.prototype.find` directly.\n */\nexport function findOneChild(test, nodes) {\n    return nodes.find(test);\n}\n/**\n * Finds one element in a tree that passes a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Node or array of nodes to search.\n * @param recurse Also consider child nodes.\n * @returns The first node that passes `test`.\n */\nexport function findOne(test, nodes, recurse = true) {\n    const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];\n    for (let i = 0; i < searchedNodes.length; i++) {\n        const node = searchedNodes[i];\n        if (isTag(node) && test(node)) {\n            return node;\n        }\n        if (recurse && hasChildren(node) && node.children.length > 0) {\n            const found = findOne(test, node.children, true);\n            if (found)\n                return found;\n        }\n    }\n    return null;\n}\n/**\n * Checks if a tree of nodes contains at least one node passing a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns Whether a tree of nodes contains at least one node passing the test.\n */\nexport function existsOne(test, nodes) {\n    return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||\n        (hasChildren(node) && existsOne(test, node.children)));\n}\n/**\n * Search an array of nodes and their children for elements passing a test function.\n *\n * Same as `find`, but limited to elements and with less options, leading to reduced complexity.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns All nodes passing `test`.\n */\nexport function findAll(test, nodes) {\n    const result = [];\n    const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];\n    const indexStack = [0];\n    for (;;) {\n        if (indexStack[0] >= nodeStack[0].length) {\n            if (nodeStack.length === 1) {\n                return result;\n            }\n            // Otherwise, remove the current array from the stack.\n            nodeStack.shift();\n            indexStack.shift();\n            // Loop back to the start to continue with the next array.\n            continue;\n        }\n        const elem = nodeStack[0][indexStack[0]++];\n        if (isTag(elem) && test(elem))\n            result.push(elem);\n        if (hasChildren(elem) && elem.children.length > 0) {\n            indexStack.unshift(0);\n            nodeStack.unshift(elem.children);\n        }\n    }\n}\n//# sourceMappingURL=querying.js.map","import { isTag, isCDATA, isText, hasChildren, isComment, } from \"domhandler\";\nimport renderHTML from \"dom-serializer\";\nimport { ElementType } from \"domelementtype\";\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the outer HTML of.\n * @param options Options for serialization.\n * @returns `node`'s outer HTML.\n */\nexport function getOuterHTML(node, options) {\n    return renderHTML(node, options);\n}\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the inner HTML of.\n * @param options Options for serialization.\n * @returns `node`'s inner HTML.\n */\nexport function getInnerHTML(node, options) {\n    return hasChildren(node)\n        ? node.children.map((node) => getOuterHTML(node, options)).join(\"\")\n        : \"\";\n}\n/**\n * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments.\n *\n * @category Stringify\n * @deprecated Use `textContent` instead.\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n */\nexport function getText(node) {\n    if (Array.isArray(node))\n        return node.map(getText).join(\"\");\n    if (isTag(node))\n        return node.name === \"br\" ? \"\\n\" : getText(node.children);\n    if (isCDATA(node))\n        return getText(node.children);\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n/**\n * Get a node's text content. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the text content of.\n * @returns `node`'s text content.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n */\nexport function textContent(node) {\n    if (Array.isArray(node))\n        return node.map(textContent).join(\"\");\n    if (hasChildren(node) && !isComment(node)) {\n        return textContent(node.children);\n    }\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n/**\n * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n */\nexport function innerText(node) {\n    if (Array.isArray(node))\n        return node.map(innerText).join(\"\");\n    if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) {\n        return innerText(node.children);\n    }\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n//# sourceMappingURL=stringify.js.map","import { isTag, hasChildren, } from \"domhandler\";\n/**\n * Get a node's children.\n *\n * @category Traversal\n * @param elem Node to get the children of.\n * @returns `elem`'s children, or an empty array.\n */\nexport function getChildren(elem) {\n    return hasChildren(elem) ? elem.children : [];\n}\n/**\n * Get a node's parent.\n *\n * @category Traversal\n * @param elem Node to get the parent of.\n * @returns `elem`'s parent node, or `null` if `elem` is a root node.\n */\nexport function getParent(elem) {\n    return elem.parent || null;\n}\n/**\n * Gets an elements siblings, including the element itself.\n *\n * Attempts to get the children through the element's parent first. If we don't\n * have a parent (the element is a root node), we walk the element's `prev` &\n * `next` to get all remaining nodes.\n *\n * @category Traversal\n * @param elem Element to get the siblings of.\n * @returns `elem`'s siblings, including `elem`.\n */\nexport function getSiblings(elem) {\n    const parent = getParent(elem);\n    if (parent != null)\n        return getChildren(parent);\n    const siblings = [elem];\n    let { prev, next } = elem;\n    while (prev != null) {\n        siblings.unshift(prev);\n        ({ prev } = prev);\n    }\n    while (next != null) {\n        siblings.push(next);\n        ({ next } = next);\n    }\n    return siblings;\n}\n/**\n * Gets an attribute from an element.\n *\n * @category Traversal\n * @param elem Element to check.\n * @param name Attribute name to retrieve.\n * @returns The element's attribute value, or `undefined`.\n */\nexport function getAttributeValue(elem, name) {\n    var _a;\n    return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];\n}\n/**\n * Checks whether an element has an attribute.\n *\n * @category Traversal\n * @param elem Element to check.\n * @param name Attribute name to look for.\n * @returns Returns whether `elem` has the attribute `name`.\n */\nexport function hasAttrib(elem, name) {\n    return (elem.attribs != null &&\n        Object.prototype.hasOwnProperty.call(elem.attribs, name) &&\n        elem.attribs[name] != null);\n}\n/**\n * Get the tag name of an element.\n *\n * @category Traversal\n * @param elem The element to get the name for.\n * @returns The tag name of `elem`.\n */\nexport function getName(elem) {\n    return elem.name;\n}\n/**\n * Returns the next element sibling of a node.\n *\n * @category Traversal\n * @param elem The element to get the next sibling of.\n * @returns `elem`'s next sibling that is a tag, or `null` if there is no next\n * sibling.\n */\nexport function nextElementSibling(elem) {\n    let { next } = elem;\n    while (next !== null && !isTag(next))\n        ({ next } = next);\n    return next;\n}\n/**\n * Returns the previous element sibling of a node.\n *\n * @category Traversal\n * @param elem The element to get the previous sibling of.\n * @returns `elem`'s previous sibling that is a tag, or `null` if there is no\n * previous sibling.\n */\nexport function prevElementSibling(elem) {\n    let { prev } = elem;\n    while (prev !== null && !isTag(prev))\n        ({ prev } = prev);\n    return prev;\n}\n//# sourceMappingURL=traversal.js.map","export const xmlReplacer = /[\"&'<>$\\x80-\\uFFFF]/g;\nconst xmlCodeMap = new Map([\n    [34, \"&quot;\"],\n    [38, \"&amp;\"],\n    [39, \"&apos;\"],\n    [60, \"&lt;\"],\n    [62, \"&gt;\"],\n]);\n// For compatibility with node < 4, we wrap `codePointAt`\nexport const getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n    ? (str, index) => str.codePointAt(index)\n    : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n        (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800\n            ? (c.charCodeAt(index) - 0xd800) * 0x400 +\n                c.charCodeAt(index + 1) -\n                0xdc00 +\n                0x10000\n            : c.charCodeAt(index);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexport function encodeXML(str) {\n    let ret = \"\";\n    let lastIdx = 0;\n    let match;\n    while ((match = xmlReplacer.exec(str)) !== null) {\n        const i = match.index;\n        const char = str.charCodeAt(i);\n        const next = xmlCodeMap.get(char);\n        if (next !== undefined) {\n            ret += str.substring(lastIdx, i) + next;\n            lastIdx = i + 1;\n        }\n        else {\n            ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;\n            // Increase by 1 if we have a surrogate pair\n            lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);\n        }\n    }\n    return ret + str.substr(lastIdx);\n}\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nexport const escape = encodeXML;\n/**\n * Creates a function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n *\n * @param regex Regular expression to match characters to escape.\n * @param map Map of characters to escape to their entities.\n *\n * @returns Function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n */\nfunction getEscaper(regex, map) {\n    return function escape(data) {\n        let match;\n        let lastIdx = 0;\n        let result = \"\";\n        while ((match = regex.exec(data))) {\n            if (lastIdx !== match.index) {\n                result += data.substring(lastIdx, match.index);\n            }\n            // We know that this character will be in the map.\n            result += map.get(match[0].charCodeAt(0));\n            // Every match will be of length 1\n            lastIdx = match.index + 1;\n        }\n        return result + data.substring(lastIdx);\n    };\n}\n/**\n * Encodes all characters not valid in XML documents using XML entities.\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nexport const escapeUTF8 = getEscaper(/[&<>'\"]/g, xmlCodeMap);\n/**\n * Encodes all characters that have to be escaped in HTML attributes,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeAttribute = getEscaper(/[\"&\\u00A0]/g, new Map([\n    [34, \"&quot;\"],\n    [38, \"&amp;\"],\n    [160, \"&nbsp;\"],\n]));\n/**\n * Encodes all characters that have to be escaped in HTML text,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeText = getEscaper(/[&<>\\u00A0]/g, new Map([\n    [38, \"&amp;\"],\n    [60, \"&lt;\"],\n    [62, \"&gt;\"],\n    [160, \"&nbsp;\"],\n]));\n//# sourceMappingURL=escape.js.map","import Tokenizer, { QuoteType } from \"./Tokenizer.js\";\nimport { fromCodePoint } from \"entities/decode\";\nconst formTags = new Set([\n    \"input\",\n    \"option\",\n    \"optgroup\",\n    \"select\",\n    \"button\",\n    \"datalist\",\n    \"textarea\",\n]);\nconst pTag = new Set([\"p\"]);\nconst tableSectionTags = new Set([\"thead\", \"tbody\"]);\nconst ddtTags = new Set([\"dd\", \"dt\"]);\nconst rtpTags = new Set([\"rt\", \"rp\"]);\nconst openImpliesClose = new Map([\n    [\"tr\", new Set([\"tr\", \"th\", \"td\"])],\n    [\"th\", new Set([\"th\"])],\n    [\"td\", new Set([\"thead\", \"th\", \"td\"])],\n    [\"body\", new Set([\"head\", \"link\", \"script\"])],\n    [\"li\", new Set([\"li\"])],\n    [\"p\", pTag],\n    [\"h1\", pTag],\n    [\"h2\", pTag],\n    [\"h3\", pTag],\n    [\"h4\", pTag],\n    [\"h5\", pTag],\n    [\"h6\", pTag],\n    [\"select\", formTags],\n    [\"input\", formTags],\n    [\"output\", formTags],\n    [\"button\", formTags],\n    [\"datalist\", formTags],\n    [\"textarea\", formTags],\n    [\"option\", new Set([\"option\"])],\n    [\"optgroup\", new Set([\"optgroup\", \"option\"])],\n    [\"dd\", ddtTags],\n    [\"dt\", ddtTags],\n    [\"address\", pTag],\n    [\"article\", pTag],\n    [\"aside\", pTag],\n    [\"blockquote\", pTag],\n    [\"details\", pTag],\n    [\"div\", pTag],\n    [\"dl\", pTag],\n    [\"fieldset\", pTag],\n    [\"figcaption\", pTag],\n    [\"figure\", pTag],\n    [\"footer\", pTag],\n    [\"form\", pTag],\n    [\"header\", pTag],\n    [\"hr\", pTag],\n    [\"main\", pTag],\n    [\"nav\", pTag],\n    [\"ol\", pTag],\n    [\"pre\", pTag],\n    [\"section\", pTag],\n    [\"table\", pTag],\n    [\"ul\", pTag],\n    [\"rt\", rtpTags],\n    [\"rp\", rtpTags],\n    [\"tbody\", tableSectionTags],\n    [\"tfoot\", tableSectionTags],\n]);\nconst voidElements = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\nconst foreignContextElements = new Set([\"math\", \"svg\"]);\nconst htmlIntegrationElements = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignobject\",\n    \"desc\",\n    \"title\",\n]);\nconst reNameEnd = /\\s|\\//;\nexport class Parser {\n    constructor(cbs, options = {}) {\n        var _a, _b, _c, _d, _e, _f;\n        this.options = options;\n        /** The start index of the last event. */\n        this.startIndex = 0;\n        /** The end index of the last event. */\n        this.endIndex = 0;\n        /**\n         * Store the start index of the current open tag,\n         * so we can update the start index for attributes.\n         */\n        this.openTagStart = 0;\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribvalue = \"\";\n        this.attribs = null;\n        this.stack = [];\n        this.buffers = [];\n        this.bufferOffset = 0;\n        /** The index of the last written buffer. Used when resuming after a `pause()`. */\n        this.writeIndex = 0;\n        /** Indicates whether the parser has finished running / `.end` has been called. */\n        this.ended = false;\n        this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n        this.htmlMode = !this.options.xmlMode;\n        this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode;\n        this.lowerCaseAttributeNames =\n            (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode;\n        this.recognizeSelfClosing =\n            (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode;\n        this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer)(this.options, this);\n        this.foreignContext = [!this.htmlMode];\n        (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this);\n    }\n    // Tokenizer event handlers\n    /** @internal */\n    ontext(start, endIndex) {\n        var _a, _b;\n        const data = this.getSlice(start, endIndex);\n        this.endIndex = endIndex - 1;\n        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n        this.startIndex = endIndex;\n    }\n    /** @internal */\n    ontextentity(cp, endIndex) {\n        var _a, _b;\n        this.endIndex = endIndex - 1;\n        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, fromCodePoint(cp));\n        this.startIndex = endIndex;\n    }\n    /**\n     * Checks if the current tag is a void element. Override this if you want\n     * to specify your own additional void elements.\n     */\n    isVoidElement(name) {\n        return this.htmlMode && voidElements.has(name);\n    }\n    /** @internal */\n    onopentagname(start, endIndex) {\n        this.endIndex = endIndex;\n        let name = this.getSlice(start, endIndex);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        this.emitOpenTag(name);\n    }\n    emitOpenTag(name) {\n        var _a, _b, _c, _d;\n        this.openTagStart = this.startIndex;\n        this.tagname = name;\n        const impliesClose = this.htmlMode && openImpliesClose.get(name);\n        if (impliesClose) {\n            while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {\n                const element = this.stack.shift();\n                (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true);\n            }\n        }\n        if (!this.isVoidElement(name)) {\n            this.stack.unshift(name);\n            if (this.htmlMode) {\n                if (foreignContextElements.has(name)) {\n                    this.foreignContext.unshift(true);\n                }\n                else if (htmlIntegrationElements.has(name)) {\n                    this.foreignContext.unshift(false);\n                }\n            }\n        }\n        (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);\n        if (this.cbs.onopentag)\n            this.attribs = {};\n    }\n    endOpenTag(isImplied) {\n        var _a, _b;\n        this.startIndex = this.openTagStart;\n        if (this.attribs) {\n            (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);\n            this.attribs = null;\n        }\n        if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {\n            this.cbs.onclosetag(this.tagname, true);\n        }\n        this.tagname = \"\";\n    }\n    /** @internal */\n    onopentagend(endIndex) {\n        this.endIndex = endIndex;\n        this.endOpenTag(false);\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onclosetag(start, endIndex) {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        this.endIndex = endIndex;\n        let name = this.getSlice(start, endIndex);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        if (this.htmlMode &&\n            (foreignContextElements.has(name) ||\n                htmlIntegrationElements.has(name))) {\n            this.foreignContext.shift();\n        }\n        if (!this.isVoidElement(name)) {\n            const pos = this.stack.indexOf(name);\n            if (pos !== -1) {\n                for (let index = 0; index <= pos; index++) {\n                    const element = this.stack.shift();\n                    // We know the stack has sufficient elements.\n                    (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos);\n                }\n            }\n            else if (this.htmlMode && name === \"p\") {\n                // Implicit open before close\n                this.emitOpenTag(\"p\");\n                this.closeCurrentTag(true);\n            }\n        }\n        else if (this.htmlMode && name === \"br\") {\n            // We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.\n            (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, \"br\");\n            (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, \"br\", {}, true);\n            (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, \"br\", false);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onselfclosingtag(endIndex) {\n        this.endIndex = endIndex;\n        if (this.recognizeSelfClosing || this.foreignContext[0]) {\n            this.closeCurrentTag(false);\n            // Set `startIndex` for next node\n            this.startIndex = endIndex + 1;\n        }\n        else {\n            // Ignore the fact that the tag is self-closing.\n            this.onopentagend(endIndex);\n        }\n    }\n    closeCurrentTag(isOpenImplied) {\n        var _a, _b;\n        const name = this.tagname;\n        this.endOpenTag(isOpenImplied);\n        // Self-closing tags will be on the top of the stack\n        if (this.stack[0] === name) {\n            // If the opening tag isn't implied, the closing tag has to be implied.\n            (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);\n            this.stack.shift();\n        }\n    }\n    /** @internal */\n    onattribname(start, endIndex) {\n        this.startIndex = start;\n        const name = this.getSlice(start, endIndex);\n        this.attribname = this.lowerCaseAttributeNames\n            ? name.toLowerCase()\n            : name;\n    }\n    /** @internal */\n    onattribdata(start, endIndex) {\n        this.attribvalue += this.getSlice(start, endIndex);\n    }\n    /** @internal */\n    onattribentity(cp) {\n        this.attribvalue += fromCodePoint(cp);\n    }\n    /** @internal */\n    onattribend(quote, endIndex) {\n        var _a, _b;\n        this.endIndex = endIndex;\n        (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double\n            ? '\"'\n            : quote === QuoteType.Single\n                ? \"'\"\n                : quote === QuoteType.NoValue\n                    ? undefined\n                    : null);\n        if (this.attribs &&\n            !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n            this.attribs[this.attribname] = this.attribvalue;\n        }\n        this.attribvalue = \"\";\n    }\n    getInstructionName(value) {\n        const index = value.search(reNameEnd);\n        let name = index < 0 ? value : value.substr(0, index);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        return name;\n    }\n    /** @internal */\n    ondeclaration(start, endIndex) {\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex);\n        if (this.cbs.onprocessinginstruction) {\n            const name = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onprocessinginstruction(start, endIndex) {\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex);\n        if (this.cbs.onprocessinginstruction) {\n            const name = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    oncomment(start, endIndex, offset) {\n        var _a, _b, _c, _d;\n        this.endIndex = endIndex;\n        (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset));\n        (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    oncdata(start, endIndex, offset) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex - offset);\n        if (!this.htmlMode || this.options.recognizeCDATA) {\n            (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n            (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n            (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n        }\n        else {\n            (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);\n            (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onend() {\n        var _a, _b;\n        if (this.cbs.onclosetag) {\n            // Set the end index for all remaining tags\n            this.endIndex = this.startIndex;\n            for (let index = 0; index < this.stack.length; index++) {\n                this.cbs.onclosetag(this.stack[index], true);\n            }\n        }\n        (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n    }\n    /**\n     * Resets the parser to a blank state, ready to parse a new HTML document\n     */\n    reset() {\n        var _a, _b, _c, _d;\n        (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n        this.tokenizer.reset();\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribs = null;\n        this.stack.length = 0;\n        this.startIndex = 0;\n        this.endIndex = 0;\n        (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n        this.buffers.length = 0;\n        this.foreignContext.length = 0;\n        this.foreignContext.unshift(!this.htmlMode);\n        this.bufferOffset = 0;\n        this.writeIndex = 0;\n        this.ended = false;\n    }\n    /**\n     * Resets the parser, then parses a complete document and\n     * pushes it to the handler.\n     *\n     * @param data Document to parse.\n     */\n    parseComplete(data) {\n        this.reset();\n        this.end(data);\n    }\n    getSlice(start, end) {\n        while (start - this.bufferOffset >= this.buffers[0].length) {\n            this.shiftBuffer();\n        }\n        let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);\n        while (end - this.bufferOffset > this.buffers[0].length) {\n            this.shiftBuffer();\n            slice += this.buffers[0].slice(0, end - this.bufferOffset);\n        }\n        return slice;\n    }\n    shiftBuffer() {\n        this.bufferOffset += this.buffers[0].length;\n        this.writeIndex--;\n        this.buffers.shift();\n    }\n    /**\n     * Parses a chunk of data and calls the corresponding callbacks.\n     *\n     * @param chunk Chunk to parse.\n     */\n    write(chunk) {\n        var _a, _b;\n        if (this.ended) {\n            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(\".write() after done!\"));\n            return;\n        }\n        this.buffers.push(chunk);\n        if (this.tokenizer.running) {\n            this.tokenizer.write(chunk);\n            this.writeIndex++;\n        }\n    }\n    /**\n     * Parses the end of the buffer and clears the stack, calls onend.\n     *\n     * @param chunk Optional final chunk to parse.\n     */\n    end(chunk) {\n        var _a, _b;\n        if (this.ended) {\n            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(\".end() after done!\"));\n            return;\n        }\n        if (chunk)\n            this.write(chunk);\n        this.ended = true;\n        this.tokenizer.end();\n    }\n    /**\n     * Pauses parsing. The parser won't emit events until `resume` is called.\n     */\n    pause() {\n        this.tokenizer.pause();\n    }\n    /**\n     * Resumes parsing after `pause` was called.\n     */\n    resume() {\n        this.tokenizer.resume();\n        while (this.tokenizer.running &&\n            this.writeIndex < this.buffers.length) {\n            this.tokenizer.write(this.buffers[this.writeIndex++]);\n        }\n        if (this.ended)\n            this.tokenizer.end();\n    }\n    /**\n     * Alias of `write`, for backwards compatibility.\n     *\n     * @param chunk Chunk to parse.\n     * @deprecated\n     */\n    parseChunk(chunk) {\n        this.write(chunk);\n    }\n    /**\n     * Alias of `end`, for backwards compatibility.\n     *\n     * @param chunk Optional final chunk to parse.\n     * @deprecated\n     */\n    done(chunk) {\n        this.end(chunk);\n    }\n}\n//# sourceMappingURL=Parser.js.map","import { EntityDecoder, DecodingMode, htmlDecodeTree, xmlDecodeTree, } from \"entities/decode\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"Tab\"] = 9] = \"Tab\";\n    CharCodes[CharCodes[\"NewLine\"] = 10] = \"NewLine\";\n    CharCodes[CharCodes[\"FormFeed\"] = 12] = \"FormFeed\";\n    CharCodes[CharCodes[\"CarriageReturn\"] = 13] = \"CarriageReturn\";\n    CharCodes[CharCodes[\"Space\"] = 32] = \"Space\";\n    CharCodes[CharCodes[\"ExclamationMark\"] = 33] = \"ExclamationMark\";\n    CharCodes[CharCodes[\"Number\"] = 35] = \"Number\";\n    CharCodes[CharCodes[\"Amp\"] = 38] = \"Amp\";\n    CharCodes[CharCodes[\"SingleQuote\"] = 39] = \"SingleQuote\";\n    CharCodes[CharCodes[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n    CharCodes[CharCodes[\"Dash\"] = 45] = \"Dash\";\n    CharCodes[CharCodes[\"Slash\"] = 47] = \"Slash\";\n    CharCodes[CharCodes[\"Zero\"] = 48] = \"Zero\";\n    CharCodes[CharCodes[\"Nine\"] = 57] = \"Nine\";\n    CharCodes[CharCodes[\"Semi\"] = 59] = \"Semi\";\n    CharCodes[CharCodes[\"Lt\"] = 60] = \"Lt\";\n    CharCodes[CharCodes[\"Eq\"] = 61] = \"Eq\";\n    CharCodes[CharCodes[\"Gt\"] = 62] = \"Gt\";\n    CharCodes[CharCodes[\"Questionmark\"] = 63] = \"Questionmark\";\n    CharCodes[CharCodes[\"UpperA\"] = 65] = \"UpperA\";\n    CharCodes[CharCodes[\"LowerA\"] = 97] = \"LowerA\";\n    CharCodes[CharCodes[\"UpperF\"] = 70] = \"UpperF\";\n    CharCodes[CharCodes[\"LowerF\"] = 102] = \"LowerF\";\n    CharCodes[CharCodes[\"UpperZ\"] = 90] = \"UpperZ\";\n    CharCodes[CharCodes[\"LowerZ\"] = 122] = \"LowerZ\";\n    CharCodes[CharCodes[\"LowerX\"] = 120] = \"LowerX\";\n    CharCodes[CharCodes[\"OpeningSquareBracket\"] = 91] = \"OpeningSquareBracket\";\n})(CharCodes || (CharCodes = {}));\n/** All the states the tokenizer can be in. */\nvar State;\n(function (State) {\n    State[State[\"Text\"] = 1] = \"Text\";\n    State[State[\"BeforeTagName\"] = 2] = \"BeforeTagName\";\n    State[State[\"InTagName\"] = 3] = \"InTagName\";\n    State[State[\"InSelfClosingTag\"] = 4] = \"InSelfClosingTag\";\n    State[State[\"BeforeClosingTagName\"] = 5] = \"BeforeClosingTagName\";\n    State[State[\"InClosingTagName\"] = 6] = \"InClosingTagName\";\n    State[State[\"AfterClosingTagName\"] = 7] = \"AfterClosingTagName\";\n    // Attributes\n    State[State[\"BeforeAttributeName\"] = 8] = \"BeforeAttributeName\";\n    State[State[\"InAttributeName\"] = 9] = \"InAttributeName\";\n    State[State[\"AfterAttributeName\"] = 10] = \"AfterAttributeName\";\n    State[State[\"BeforeAttributeValue\"] = 11] = \"BeforeAttributeValue\";\n    State[State[\"InAttributeValueDq\"] = 12] = \"InAttributeValueDq\";\n    State[State[\"InAttributeValueSq\"] = 13] = \"InAttributeValueSq\";\n    State[State[\"InAttributeValueNq\"] = 14] = \"InAttributeValueNq\";\n    // Declarations\n    State[State[\"BeforeDeclaration\"] = 15] = \"BeforeDeclaration\";\n    State[State[\"InDeclaration\"] = 16] = \"InDeclaration\";\n    // Processing instructions\n    State[State[\"InProcessingInstruction\"] = 17] = \"InProcessingInstruction\";\n    // Comments & CDATA\n    State[State[\"BeforeComment\"] = 18] = \"BeforeComment\";\n    State[State[\"CDATASequence\"] = 19] = \"CDATASequence\";\n    State[State[\"InSpecialComment\"] = 20] = \"InSpecialComment\";\n    State[State[\"InCommentLike\"] = 21] = \"InCommentLike\";\n    // Special tags\n    State[State[\"BeforeSpecialS\"] = 22] = \"BeforeSpecialS\";\n    State[State[\"BeforeSpecialT\"] = 23] = \"BeforeSpecialT\";\n    State[State[\"SpecialStartSequence\"] = 24] = \"SpecialStartSequence\";\n    State[State[\"InSpecialTag\"] = 25] = \"InSpecialTag\";\n    State[State[\"InEntity\"] = 26] = \"InEntity\";\n})(State || (State = {}));\nfunction isWhitespace(c) {\n    return (c === CharCodes.Space ||\n        c === CharCodes.NewLine ||\n        c === CharCodes.Tab ||\n        c === CharCodes.FormFeed ||\n        c === CharCodes.CarriageReturn);\n}\nfunction isEndOfTagSection(c) {\n    return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);\n}\nfunction isASCIIAlpha(c) {\n    return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||\n        (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));\n}\nexport var QuoteType;\n(function (QuoteType) {\n    QuoteType[QuoteType[\"NoValue\"] = 0] = \"NoValue\";\n    QuoteType[QuoteType[\"Unquoted\"] = 1] = \"Unquoted\";\n    QuoteType[QuoteType[\"Single\"] = 2] = \"Single\";\n    QuoteType[QuoteType[\"Double\"] = 3] = \"Double\";\n})(QuoteType || (QuoteType = {}));\n/**\n * Sequences used to match longer strings.\n *\n * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End\n * sequences with an increased offset.\n */\nconst Sequences = {\n    Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[\n    CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>\n    CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->`\n    ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`\n    StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`\n    TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`\n    TextareaEnd: new Uint8Array([\n        0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61,\n    ]), // `</textarea`\n    XmpEnd: new Uint8Array([0x3c, 0x2f, 0x78, 0x6d, 0x70]), // `</xmp`\n};\nexport default class Tokenizer {\n    constructor({ xmlMode = false, decodeEntities = true, }, cbs) {\n        this.cbs = cbs;\n        /** The current state the tokenizer is in. */\n        this.state = State.Text;\n        /** The read buffer. */\n        this.buffer = \"\";\n        /** The beginning of the section that is currently being read. */\n        this.sectionStart = 0;\n        /** The index within the buffer that we are currently looking at. */\n        this.index = 0;\n        /** The start of the last entity. */\n        this.entityStart = 0;\n        /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n        this.baseState = State.Text;\n        /** For special parsing behavior inside of script and style tags. */\n        this.isSpecial = false;\n        /** Indicates whether the tokenizer has been paused. */\n        this.running = true;\n        /** The offset of the current buffer. */\n        this.offset = 0;\n        this.currentSequence = undefined;\n        this.sequenceIndex = 0;\n        this.xmlMode = xmlMode;\n        this.decodeEntities = decodeEntities;\n        this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));\n    }\n    reset() {\n        this.state = State.Text;\n        this.buffer = \"\";\n        this.sectionStart = 0;\n        this.index = 0;\n        this.baseState = State.Text;\n        this.currentSequence = undefined;\n        this.running = true;\n        this.offset = 0;\n    }\n    write(chunk) {\n        this.offset += this.buffer.length;\n        this.buffer = chunk;\n        this.parse();\n    }\n    end() {\n        if (this.running)\n            this.finish();\n    }\n    pause() {\n        this.running = false;\n    }\n    resume() {\n        this.running = true;\n        if (this.index < this.buffer.length + this.offset) {\n            this.parse();\n        }\n    }\n    stateText(c) {\n        if (c === CharCodes.Lt ||\n            (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {\n            if (this.index > this.sectionStart) {\n                this.cbs.ontext(this.sectionStart, this.index);\n            }\n            this.state = State.BeforeTagName;\n            this.sectionStart = this.index;\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateSpecialStartSequence(c) {\n        const isEnd = this.sequenceIndex === this.currentSequence.length;\n        const isMatch = isEnd\n            ? // If we are at the end of the sequence, make sure the tag name has ended\n                isEndOfTagSection(c)\n            : // Otherwise, do a case-insensitive comparison\n                (c | 0x20) === this.currentSequence[this.sequenceIndex];\n        if (!isMatch) {\n            this.isSpecial = false;\n        }\n        else if (!isEnd) {\n            this.sequenceIndex++;\n            return;\n        }\n        this.sequenceIndex = 0;\n        this.state = State.InTagName;\n        this.stateInTagName(c);\n    }\n    /** Look for an end tag. For <title> tags, also decode entities. */\n    stateInSpecialTag(c) {\n        if (this.sequenceIndex === this.currentSequence.length) {\n            if (c === CharCodes.Gt || isWhitespace(c)) {\n                const endOfText = this.index - this.currentSequence.length;\n                if (this.sectionStart < endOfText) {\n                    // Spoof the index so that reported locations match up.\n                    const actualIndex = this.index;\n                    this.index = endOfText;\n                    this.cbs.ontext(this.sectionStart, endOfText);\n                    this.index = actualIndex;\n                }\n                this.isSpecial = false;\n                this.sectionStart = endOfText + 2; // Skip over the `</`\n                this.stateInClosingTagName(c);\n                return; // We are done; skip the rest of the function.\n            }\n            this.sequenceIndex = 0;\n        }\n        if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {\n            this.sequenceIndex += 1;\n        }\n        else if (this.sequenceIndex === 0) {\n            if (this.currentSequence === Sequences.TitleEnd) {\n                // We have to parse entities in <title> tags.\n                if (this.decodeEntities && c === CharCodes.Amp) {\n                    this.startEntity();\n                }\n            }\n            else if (this.fastForwardTo(CharCodes.Lt)) {\n                // Outside of <title> tags, we can fast-forward.\n                this.sequenceIndex = 1;\n            }\n        }\n        else {\n            // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.\n            this.sequenceIndex = Number(c === CharCodes.Lt);\n        }\n    }\n    stateCDATASequence(c) {\n        if (c === Sequences.Cdata[this.sequenceIndex]) {\n            if (++this.sequenceIndex === Sequences.Cdata.length) {\n                this.state = State.InCommentLike;\n                this.currentSequence = Sequences.CdataEnd;\n                this.sequenceIndex = 0;\n                this.sectionStart = this.index + 1;\n            }\n        }\n        else {\n            this.sequenceIndex = 0;\n            this.state = State.InDeclaration;\n            this.stateInDeclaration(c); // Reconsume the character\n        }\n    }\n    /**\n     * When we wait for one specific character, we can speed things up\n     * by skipping through the buffer until we find it.\n     *\n     * @returns Whether the character was found.\n     */\n    fastForwardTo(c) {\n        while (++this.index < this.buffer.length + this.offset) {\n            if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n                return true;\n            }\n        }\n        /*\n         * We increment the index at the end of the `parse` loop,\n         * so set it to `buffer.length - 1` here.\n         *\n         * TODO: Refactor `parse` to increment index before calling states.\n         */\n        this.index = this.buffer.length + this.offset - 1;\n        return false;\n    }\n    /**\n     * Comments and CDATA end with `-->` and `]]>`.\n     *\n     * Their common qualities are:\n     * - Their end sequences have a distinct character they start with.\n     * - That character is then repeated, so we have to check multiple repeats.\n     * - All characters but the start character of the sequence can be skipped.\n     */\n    stateInCommentLike(c) {\n        if (c === this.currentSequence[this.sequenceIndex]) {\n            if (++this.sequenceIndex === this.currentSequence.length) {\n                if (this.currentSequence === Sequences.CdataEnd) {\n                    this.cbs.oncdata(this.sectionStart, this.index, 2);\n                }\n                else {\n                    this.cbs.oncomment(this.sectionStart, this.index, 2);\n                }\n                this.sequenceIndex = 0;\n                this.sectionStart = this.index + 1;\n                this.state = State.Text;\n            }\n        }\n        else if (this.sequenceIndex === 0) {\n            // Fast-forward to the first character of the sequence\n            if (this.fastForwardTo(this.currentSequence[0])) {\n                this.sequenceIndex = 1;\n            }\n        }\n        else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n            // Allow long sequences, eg. --->, ]]]>\n            this.sequenceIndex = 0;\n        }\n    }\n    /**\n     * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n     *\n     * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n     * We allow anything that wouldn't end the tag.\n     */\n    isTagStartChar(c) {\n        return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n    }\n    startSpecial(sequence, offset) {\n        this.isSpecial = true;\n        this.currentSequence = sequence;\n        this.sequenceIndex = offset;\n        this.state = State.SpecialStartSequence;\n    }\n    stateBeforeTagName(c) {\n        if (c === CharCodes.ExclamationMark) {\n            this.state = State.BeforeDeclaration;\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.Questionmark) {\n            this.state = State.InProcessingInstruction;\n            this.sectionStart = this.index + 1;\n        }\n        else if (this.isTagStartChar(c)) {\n            const lower = c | 0x20;\n            this.sectionStart = this.index;\n            if (this.xmlMode) {\n                this.state = State.InTagName;\n            }\n            else if (lower === Sequences.ScriptEnd[2]) {\n                this.state = State.BeforeSpecialS;\n            }\n            else if (lower === Sequences.TitleEnd[2] ||\n                lower === Sequences.XmpEnd[2]) {\n                this.state = State.BeforeSpecialT;\n            }\n            else {\n                this.state = State.InTagName;\n            }\n        }\n        else if (c === CharCodes.Slash) {\n            this.state = State.BeforeClosingTagName;\n        }\n        else {\n            this.state = State.Text;\n            this.stateText(c);\n        }\n    }\n    stateInTagName(c) {\n        if (isEndOfTagSection(c)) {\n            this.cbs.onopentagname(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n    }\n    stateBeforeClosingTagName(c) {\n        if (isWhitespace(c)) {\n            // Ignore\n        }\n        else if (c === CharCodes.Gt) {\n            this.state = State.Text;\n        }\n        else {\n            this.state = this.isTagStartChar(c)\n                ? State.InClosingTagName\n                : State.InSpecialComment;\n            this.sectionStart = this.index;\n        }\n    }\n    stateInClosingTagName(c) {\n        if (c === CharCodes.Gt || isWhitespace(c)) {\n            this.cbs.onclosetag(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.state = State.AfterClosingTagName;\n            this.stateAfterClosingTagName(c);\n        }\n    }\n    stateAfterClosingTagName(c) {\n        // Skip everything until \">\"\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeAttributeName(c) {\n        if (c === CharCodes.Gt) {\n            this.cbs.onopentagend(this.index);\n            if (this.isSpecial) {\n                this.state = State.InSpecialTag;\n                this.sequenceIndex = 0;\n            }\n            else {\n                this.state = State.Text;\n            }\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.Slash) {\n            this.state = State.InSelfClosingTag;\n        }\n        else if (!isWhitespace(c)) {\n            this.state = State.InAttributeName;\n            this.sectionStart = this.index;\n        }\n    }\n    stateInSelfClosingTag(c) {\n        if (c === CharCodes.Gt) {\n            this.cbs.onselfclosingtag(this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n            this.isSpecial = false; // Reset special state, in case of self-closing special tags\n        }\n        else if (!isWhitespace(c)) {\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n    }\n    stateInAttributeName(c) {\n        if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n            this.cbs.onattribname(this.sectionStart, this.index);\n            this.sectionStart = this.index;\n            this.state = State.AfterAttributeName;\n            this.stateAfterAttributeName(c);\n        }\n    }\n    stateAfterAttributeName(c) {\n        if (c === CharCodes.Eq) {\n            this.state = State.BeforeAttributeValue;\n        }\n        else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n            this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);\n            this.sectionStart = -1;\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n        else if (!isWhitespace(c)) {\n            this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);\n            this.state = State.InAttributeName;\n            this.sectionStart = this.index;\n        }\n    }\n    stateBeforeAttributeValue(c) {\n        if (c === CharCodes.DoubleQuote) {\n            this.state = State.InAttributeValueDq;\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.SingleQuote) {\n            this.state = State.InAttributeValueSq;\n            this.sectionStart = this.index + 1;\n        }\n        else if (!isWhitespace(c)) {\n            this.sectionStart = this.index;\n            this.state = State.InAttributeValueNq;\n            this.stateInAttributeValueNoQuotes(c); // Reconsume token\n        }\n    }\n    handleInAttributeValue(c, quote) {\n        if (c === quote ||\n            (!this.decodeEntities && this.fastForwardTo(quote))) {\n            this.cbs.onattribdata(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.cbs.onattribend(quote === CharCodes.DoubleQuote\n                ? QuoteType.Double\n                : QuoteType.Single, this.index + 1);\n            this.state = State.BeforeAttributeName;\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateInAttributeValueDoubleQuotes(c) {\n        this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n    }\n    stateInAttributeValueSingleQuotes(c) {\n        this.handleInAttributeValue(c, CharCodes.SingleQuote);\n    }\n    stateInAttributeValueNoQuotes(c) {\n        if (isWhitespace(c) || c === CharCodes.Gt) {\n            this.cbs.onattribdata(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.cbs.onattribend(QuoteType.Unquoted, this.index);\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateBeforeDeclaration(c) {\n        if (c === CharCodes.OpeningSquareBracket) {\n            this.state = State.CDATASequence;\n            this.sequenceIndex = 0;\n        }\n        else {\n            this.state =\n                c === CharCodes.Dash\n                    ? State.BeforeComment\n                    : State.InDeclaration;\n        }\n    }\n    stateInDeclaration(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.ondeclaration(this.sectionStart, this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateInProcessingInstruction(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeComment(c) {\n        if (c === CharCodes.Dash) {\n            this.state = State.InCommentLike;\n            this.currentSequence = Sequences.CommentEnd;\n            // Allow short comments (eg. <!-->)\n            this.sequenceIndex = 2;\n            this.sectionStart = this.index + 1;\n        }\n        else {\n            this.state = State.InDeclaration;\n        }\n    }\n    stateInSpecialComment(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.oncomment(this.sectionStart, this.index, 0);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeSpecialS(c) {\n        const lower = c | 0x20;\n        if (lower === Sequences.ScriptEnd[3]) {\n            this.startSpecial(Sequences.ScriptEnd, 4);\n        }\n        else if (lower === Sequences.StyleEnd[3]) {\n            this.startSpecial(Sequences.StyleEnd, 4);\n        }\n        else {\n            this.state = State.InTagName;\n            this.stateInTagName(c); // Consume the token again\n        }\n    }\n    stateBeforeSpecialT(c) {\n        const lower = c | 0x20;\n        switch (lower) {\n            case Sequences.TitleEnd[3]: {\n                this.startSpecial(Sequences.TitleEnd, 4);\n                break;\n            }\n            case Sequences.TextareaEnd[3]: {\n                this.startSpecial(Sequences.TextareaEnd, 4);\n                break;\n            }\n            case Sequences.XmpEnd[3]: {\n                this.startSpecial(Sequences.XmpEnd, 4);\n                break;\n            }\n            default: {\n                this.state = State.InTagName;\n                this.stateInTagName(c); // Consume the token again\n            }\n        }\n    }\n    startEntity() {\n        this.baseState = this.state;\n        this.state = State.InEntity;\n        this.entityStart = this.index;\n        this.entityDecoder.startEntity(this.xmlMode\n            ? DecodingMode.Strict\n            : this.baseState === State.Text ||\n                this.baseState === State.InSpecialTag\n                ? DecodingMode.Legacy\n                : DecodingMode.Attribute);\n    }\n    stateInEntity() {\n        const indexInBuffer = this.index - this.offset;\n        const length = this.entityDecoder.write(this.buffer, indexInBuffer);\n        // If `length` is positive, we are done with the entity.\n        if (length >= 0) {\n            this.state = this.baseState;\n            if (length === 0) {\n                this.index -= 1;\n            }\n        }\n        else {\n            if (indexInBuffer < this.buffer.length &&\n                this.buffer.charCodeAt(indexInBuffer) === CharCodes.Amp) {\n                this.state = this.baseState;\n                this.index -= 1;\n                return;\n            }\n            // Mark buffer as consumed.\n            this.index = this.offset + this.buffer.length - 1;\n        }\n    }\n    /**\n     * Remove data that has already been consumed from the buffer.\n     */\n    cleanup() {\n        // If we are inside of text or attributes, emit what we already have.\n        if (this.running && this.sectionStart !== this.index) {\n            if (this.state === State.Text ||\n                (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {\n                this.cbs.ontext(this.sectionStart, this.index);\n                this.sectionStart = this.index;\n            }\n            else if (this.state === State.InAttributeValueDq ||\n                this.state === State.InAttributeValueSq ||\n                this.state === State.InAttributeValueNq) {\n                this.cbs.onattribdata(this.sectionStart, this.index);\n                this.sectionStart = this.index;\n            }\n        }\n    }\n    shouldContinue() {\n        return this.index < this.buffer.length + this.offset && this.running;\n    }\n    /**\n     * Iterates through the buffer, calling the function corresponding to the current state.\n     *\n     * States that are more likely to be hit are higher up, as a performance improvement.\n     */\n    parse() {\n        while (this.shouldContinue()) {\n            const c = this.buffer.charCodeAt(this.index - this.offset);\n            switch (this.state) {\n                case State.Text: {\n                    this.stateText(c);\n                    break;\n                }\n                case State.SpecialStartSequence: {\n                    this.stateSpecialStartSequence(c);\n                    break;\n                }\n                case State.InSpecialTag: {\n                    this.stateInSpecialTag(c);\n                    break;\n                }\n                case State.CDATASequence: {\n                    this.stateCDATASequence(c);\n                    break;\n                }\n                case State.InAttributeValueDq: {\n                    this.stateInAttributeValueDoubleQuotes(c);\n                    break;\n                }\n                case State.InAttributeName: {\n                    this.stateInAttributeName(c);\n                    break;\n                }\n                case State.InCommentLike: {\n                    this.stateInCommentLike(c);\n                    break;\n                }\n                case State.InSpecialComment: {\n                    this.stateInSpecialComment(c);\n                    break;\n                }\n                case State.BeforeAttributeName: {\n                    this.stateBeforeAttributeName(c);\n                    break;\n                }\n                case State.InTagName: {\n                    this.stateInTagName(c);\n                    break;\n                }\n                case State.InClosingTagName: {\n                    this.stateInClosingTagName(c);\n                    break;\n                }\n                case State.BeforeTagName: {\n                    this.stateBeforeTagName(c);\n                    break;\n                }\n                case State.AfterAttributeName: {\n                    this.stateAfterAttributeName(c);\n                    break;\n                }\n                case State.InAttributeValueSq: {\n                    this.stateInAttributeValueSingleQuotes(c);\n                    break;\n                }\n                case State.BeforeAttributeValue: {\n                    this.stateBeforeAttributeValue(c);\n                    break;\n                }\n                case State.BeforeClosingTagName: {\n                    this.stateBeforeClosingTagName(c);\n                    break;\n                }\n                case State.AfterClosingTagName: {\n                    this.stateAfterClosingTagName(c);\n                    break;\n                }\n                case State.BeforeSpecialS: {\n                    this.stateBeforeSpecialS(c);\n                    break;\n                }\n                case State.BeforeSpecialT: {\n                    this.stateBeforeSpecialT(c);\n                    break;\n                }\n                case State.InAttributeValueNq: {\n                    this.stateInAttributeValueNoQuotes(c);\n                    break;\n                }\n                case State.InSelfClosingTag: {\n                    this.stateInSelfClosingTag(c);\n                    break;\n                }\n                case State.InDeclaration: {\n                    this.stateInDeclaration(c);\n                    break;\n                }\n                case State.BeforeDeclaration: {\n                    this.stateBeforeDeclaration(c);\n                    break;\n                }\n                case State.BeforeComment: {\n                    this.stateBeforeComment(c);\n                    break;\n                }\n                case State.InProcessingInstruction: {\n                    this.stateInProcessingInstruction(c);\n                    break;\n                }\n                case State.InEntity: {\n                    this.stateInEntity();\n                    break;\n                }\n            }\n            this.index++;\n        }\n        this.cleanup();\n    }\n    finish() {\n        if (this.state === State.InEntity) {\n            this.entityDecoder.end();\n            this.state = this.baseState;\n        }\n        this.handleTrailingData();\n        this.cbs.onend();\n    }\n    /** Handle any trailing data. */\n    handleTrailingData() {\n        const endIndex = this.buffer.length + this.offset;\n        // If there is no remaining data, we are done.\n        if (this.sectionStart >= endIndex) {\n            return;\n        }\n        if (this.state === State.InCommentLike) {\n            if (this.currentSequence === Sequences.CdataEnd) {\n                this.cbs.oncdata(this.sectionStart, endIndex, 0);\n            }\n            else {\n                this.cbs.oncomment(this.sectionStart, endIndex, 0);\n            }\n        }\n        else if (this.state === State.InTagName ||\n            this.state === State.BeforeAttributeName ||\n            this.state === State.BeforeAttributeValue ||\n            this.state === State.AfterAttributeName ||\n            this.state === State.InAttributeName ||\n            this.state === State.InAttributeValueSq ||\n            this.state === State.InAttributeValueDq ||\n            this.state === State.InAttributeValueNq ||\n            this.state === State.InClosingTagName) {\n            /*\n             * If we are currently in an opening or closing tag, us not calling the\n             * respective callback signals that the tag should be ignored.\n             */\n        }\n        else {\n            this.cbs.ontext(this.sectionStart, endIndex);\n        }\n    }\n    emitCodePoint(cp, consumed) {\n        if (this.baseState !== State.Text &&\n            this.baseState !== State.InSpecialTag) {\n            if (this.sectionStart < this.entityStart) {\n                this.cbs.onattribdata(this.sectionStart, this.entityStart);\n            }\n            this.sectionStart = this.entityStart + consumed;\n            this.index = this.sectionStart - 1;\n            this.cbs.onattribentity(cp);\n        }\n        else {\n            if (this.sectionStart < this.entityStart) {\n                this.cbs.ontext(this.sectionStart, this.entityStart);\n            }\n            this.sectionStart = this.entityStart + consumed;\n            this.index = this.sectionStart - 1;\n            this.cbs.ontextentity(cp, this.sectionStart);\n        }\n    }\n}\n//# sourceMappingURL=Tokenizer.js.map","import { Parser } from \"./Parser.js\";\nexport { Parser } from \"./Parser.js\";\nimport { DomHandler, } from \"domhandler\";\nexport { DomHandler, \n// Old name for DomHandler\nDomHandler as DefaultHandler, } from \"domhandler\";\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM handler.\n */\nexport function parseDocument(data, options) {\n    const handler = new DomHandler(undefined, options);\n    new Parser(handler, options).end(data);\n    return handler.root;\n}\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM handler.\n * @deprecated Use `parseDocument` instead.\n */\nexport function parseDOM(data, options) {\n    return parseDocument(data, options).children;\n}\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed, with the resulting document.\n * @param options Optional options for the parser and DOM handler.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nexport function createDocumentStream(callback, options, elementCallback) {\n    const handler = new DomHandler((error) => callback(error, handler.root), options, elementCallback);\n    return new Parser(handler, options);\n}\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed, with an array of root nodes.\n * @param options Optional options for the parser and DOM handler.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n * @deprecated Use `createDocumentStream` instead.\n */\nexport function createDomStream(callback, options, elementCallback) {\n    const handler = new DomHandler(callback, options, elementCallback);\n    return new Parser(handler, options);\n}\nexport { default as Tokenizer, QuoteType, } from \"./Tokenizer.js\";\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexport * as ElementType from \"domelementtype\";\nimport { getFeed } from \"domutils\";\nexport { getFeed } from \"domutils\";\nconst parseFeedDefaultOptions = { xmlMode: true };\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nexport function parseFeed(feed, options = parseFeedDefaultOptions) {\n    return getFeed(parseDOM(feed, options));\n}\nexport * as DomUtils from \"domutils\";\n//# sourceMappingURL=index.js.map","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n    [0, 65533],\n    // C1 Unicode control character reference replacements\n    [128, 8364],\n    [130, 8218],\n    [131, 402],\n    [132, 8222],\n    [133, 8230],\n    [134, 8224],\n    [135, 8225],\n    [136, 710],\n    [137, 8240],\n    [138, 352],\n    [139, 8249],\n    [140, 338],\n    [142, 381],\n    [145, 8216],\n    [146, 8217],\n    [147, 8220],\n    [148, 8221],\n    [149, 8226],\n    [150, 8211],\n    [151, 8212],\n    [152, 732],\n    [153, 8482],\n    [154, 353],\n    [155, 8250],\n    [156, 339],\n    [158, 382],\n    [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : ((codePoint) => {\n    let output = \"\";\n    if (codePoint > 65535) {\n        codePoint -= 65536;\n        output += String.fromCharCode(((codePoint >>> 10) & 1023) | 55296);\n        codePoint = 56320 | (codePoint & 1023);\n    }\n    output += String.fromCharCode(codePoint);\n    return output;\n});\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n    var _a;\n    if ((codePoint >= 55296 && codePoint <= 57343) ||\n        codePoint > 1114111) {\n        return 65533;\n    }\n    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport function decodeCodePoint(codePoint) {\n    return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode-codepoint.js.map","import { fromCodePoint, replaceCodePoint } from \"./decode-codepoint.js\";\nimport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nimport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\nimport { BinTrieFlags } from \"./internal/bin-trie-flags.js\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n    CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n    CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n    CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n    CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n    CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n    CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n    CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n    CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n    CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n    CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n    CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 32;\nfunction isNumber(code) {\n    return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n        isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n    EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n    EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n    EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n    /** Entities in text nodes that can end with any character. */\n    DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n    /** Only allow entities terminated with a semicolon. */\n    DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n    /** Entities in attributes have limitations on ending characters. */\n    DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n    constructor(\n    /** The tree used to decode entities. */\n    // biome-ignore lint/correctness/noUnusedPrivateClassMembers: False positive\n    decodeTree, \n    /**\n     * The function that is called when a codepoint is decoded.\n     *\n     * For multi-byte named entities, this will be called multiple times,\n     * with the second codepoint, and the same `consumed` value.\n     *\n     * @param codepoint The decoded codepoint.\n     * @param consumed The number of bytes consumed by the decoder.\n     */\n    emitCodePoint, \n    /** An object that is used to produce errors. */\n    errors) {\n        this.decodeTree = decodeTree;\n        this.emitCodePoint = emitCodePoint;\n        this.errors = errors;\n        /** The current state of the decoder. */\n        this.state = EntityDecoderState.EntityStart;\n        /** Characters that were consumed while parsing an entity. */\n        this.consumed = 1;\n        /**\n         * The result of the entity.\n         *\n         * Either the result index of a numeric entity, or the codepoint of a\n         * numeric entity.\n         */\n        this.result = 0;\n        /** The current index in the decode tree. */\n        this.treeIndex = 0;\n        /** The number of characters that were consumed in excess. */\n        this.excess = 1;\n        /** The mode in which the decoder is operating. */\n        this.decodeMode = DecodingMode.Strict;\n        /** The number of characters that have been consumed in the current run. */\n        this.runConsumed = 0;\n    }\n    /** Resets the instance to make it reusable. */\n    startEntity(decodeMode) {\n        this.decodeMode = decodeMode;\n        this.state = EntityDecoderState.EntityStart;\n        this.result = 0;\n        this.treeIndex = 0;\n        this.excess = 1;\n        this.consumed = 1;\n        this.runConsumed = 0;\n    }\n    /**\n     * Write an entity to the decoder. This can be called multiple times with partial entities.\n     * If the entity is incomplete, the decoder will return -1.\n     *\n     * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n     * entity is incomplete, and resume when the next string is written.\n     *\n     * @param input The string containing the entity (or a continuation of the entity).\n     * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    write(input, offset) {\n        switch (this.state) {\n            case EntityDecoderState.EntityStart: {\n                if (input.charCodeAt(offset) === CharCodes.NUM) {\n                    this.state = EntityDecoderState.NumericStart;\n                    this.consumed += 1;\n                    return this.stateNumericStart(input, offset + 1);\n                }\n                this.state = EntityDecoderState.NamedEntity;\n                return this.stateNamedEntity(input, offset);\n            }\n            case EntityDecoderState.NumericStart: {\n                return this.stateNumericStart(input, offset);\n            }\n            case EntityDecoderState.NumericDecimal: {\n                return this.stateNumericDecimal(input, offset);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.stateNumericHex(input, offset);\n            }\n            case EntityDecoderState.NamedEntity: {\n                return this.stateNamedEntity(input, offset);\n            }\n        }\n    }\n    /**\n     * Switches between the numeric decimal and hexadecimal states.\n     *\n     * Equivalent to the `Numeric character reference state` in the HTML spec.\n     *\n     * @param input The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericStart(input, offset) {\n        if (offset >= input.length) {\n            return -1;\n        }\n        if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n            this.state = EntityDecoderState.NumericHex;\n            this.consumed += 1;\n            return this.stateNumericHex(input, offset + 1);\n        }\n        this.state = EntityDecoderState.NumericDecimal;\n        return this.stateNumericDecimal(input, offset);\n    }\n    /**\n     * Parses a hexadecimal numeric entity.\n     *\n     * Equivalent to the `Hexademical character reference state` in the HTML spec.\n     *\n     * @param input The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericHex(input, offset) {\n        while (offset < input.length) {\n            const char = input.charCodeAt(offset);\n            if (isNumber(char) || isHexadecimalCharacter(char)) {\n                // Convert hex digit to value (0-15); 'a'/'A' -> 10.\n                const digit = char <= CharCodes.NINE\n                    ? char - CharCodes.ZERO\n                    : (char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10;\n                this.result = this.result * 16 + digit;\n                this.consumed++;\n                offset++;\n            }\n            else {\n                return this.emitNumericEntity(char, 3);\n            }\n        }\n        return -1; // Incomplete entity\n    }\n    /**\n     * Parses a decimal numeric entity.\n     *\n     * Equivalent to the `Decimal character reference state` in the HTML spec.\n     *\n     * @param input The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericDecimal(input, offset) {\n        while (offset < input.length) {\n            const char = input.charCodeAt(offset);\n            if (isNumber(char)) {\n                this.result = this.result * 10 + (char - CharCodes.ZERO);\n                this.consumed++;\n                offset++;\n            }\n            else {\n                return this.emitNumericEntity(char, 2);\n            }\n        }\n        return -1; // Incomplete entity\n    }\n    /**\n     * Validate and emit a numeric entity.\n     *\n     * Implements the logic from the `Hexademical character reference start\n     * state` and `Numeric character reference end state` in the HTML spec.\n     *\n     * @param lastCp The last code point of the entity. Used to see if the\n     *               entity was terminated with a semicolon.\n     * @param expectedLength The minimum number of characters that should be\n     *                       consumed. Used to validate that at least one digit\n     *                       was consumed.\n     * @returns The number of characters that were consumed.\n     */\n    emitNumericEntity(lastCp, expectedLength) {\n        var _a;\n        // Ensure we consumed at least one digit.\n        if (this.consumed <= expectedLength) {\n            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n            return 0;\n        }\n        // Figure out if this is a legit end of the entity\n        if (lastCp === CharCodes.SEMI) {\n            this.consumed += 1;\n        }\n        else if (this.decodeMode === DecodingMode.Strict) {\n            return 0;\n        }\n        this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n        if (this.errors) {\n            if (lastCp !== CharCodes.SEMI) {\n                this.errors.missingSemicolonAfterCharacterReference();\n            }\n            this.errors.validateNumericCharacterReference(this.result);\n        }\n        return this.consumed;\n    }\n    /**\n     * Parses a named entity.\n     *\n     * Equivalent to the `Named character reference state` in the HTML spec.\n     *\n     * @param input The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNamedEntity(input, offset) {\n        const { decodeTree } = this;\n        let current = decodeTree[this.treeIndex];\n        // The length is the number of bytes of the value, including the current byte.\n        let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n        while (offset < input.length) {\n            // Handle compact runs (possibly inline): valueLength == 0 and SEMI_REQUIRED bit set.\n            if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) {\n                const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; /* 2..63 */\n                // If we are starting a run, check the first char.\n                if (this.runConsumed === 0) {\n                    const firstChar = current & BinTrieFlags.JUMP_TABLE;\n                    if (input.charCodeAt(offset) !== firstChar) {\n                        return this.result === 0\n                            ? 0\n                            : this.emitNotTerminatedNamedEntity();\n                    }\n                    offset++;\n                    this.excess++;\n                    this.runConsumed++;\n                }\n                // Check remaining characters in the run.\n                while (this.runConsumed < runLength) {\n                    if (offset >= input.length) {\n                        return -1;\n                    }\n                    const charIndexInPacked = this.runConsumed - 1;\n                    const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];\n                    const expectedChar = charIndexInPacked % 2 === 0\n                        ? packedWord & 0xff\n                        : (packedWord >> 8) & 0xff;\n                    if (input.charCodeAt(offset) !== expectedChar) {\n                        this.runConsumed = 0;\n                        return this.result === 0\n                            ? 0\n                            : this.emitNotTerminatedNamedEntity();\n                    }\n                    offset++;\n                    this.excess++;\n                    this.runConsumed++;\n                }\n                this.runConsumed = 0;\n                this.treeIndex += 1 + (runLength >> 1);\n                current = decodeTree[this.treeIndex];\n                valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n            }\n            if (offset >= input.length)\n                break;\n            const char = input.charCodeAt(offset);\n            /*\n             * Implicit semicolon handling for nodes that require a semicolon but\n             * don't have an explicit ';' branch stored in the trie. If we have\n             * a value on the current node, it requires a semicolon, and the\n             * current input character is a semicolon, emit the entity using the\n             * current node (without descending further).\n             */\n            if (char === CharCodes.SEMI &&\n                valueLength !== 0 &&\n                (current & BinTrieFlags.FLAG13) !== 0) {\n                return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n            }\n            this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n            if (this.treeIndex < 0) {\n                return this.result === 0 ||\n                    // If we are parsing an attribute\n                    (this.decodeMode === DecodingMode.Attribute &&\n                        // We shouldn't have consumed any characters after the entity,\n                        (valueLength === 0 ||\n                            // And there should be no invalid characters.\n                            isEntityInAttributeInvalidEnd(char)))\n                    ? 0\n                    : this.emitNotTerminatedNamedEntity();\n            }\n            current = decodeTree[this.treeIndex];\n            valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n            // If the branch is a value, store it and continue\n            if (valueLength !== 0) {\n                // If the entity is terminated by a semicolon, we are done.\n                if (char === CharCodes.SEMI) {\n                    return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n                }\n                // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n                if (this.decodeMode !== DecodingMode.Strict &&\n                    (current & BinTrieFlags.FLAG13) === 0) {\n                    this.result = this.treeIndex;\n                    this.consumed += this.excess;\n                    this.excess = 0;\n                }\n            }\n            // Increment offset & excess for next iteration\n            offset++;\n            this.excess++;\n        }\n        return -1;\n    }\n    /**\n     * Emit a named entity that was not terminated with a semicolon.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNotTerminatedNamedEntity() {\n        var _a;\n        const { result, decodeTree } = this;\n        const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n        this.emitNamedEntityData(result, valueLength, this.consumed);\n        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n        return this.consumed;\n    }\n    /**\n     * Emit a named entity.\n     *\n     * @param result The index of the entity in the decode tree.\n     * @param valueLength The number of bytes in the entity.\n     * @param consumed The number of characters consumed.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNamedEntityData(result, valueLength, consumed) {\n        const { decodeTree } = this;\n        this.emitCodePoint(valueLength === 1\n            ? decodeTree[result] &\n                ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13)\n            : decodeTree[result + 1], consumed);\n        if (valueLength === 3) {\n            // For multi-byte values, we need to emit the second byte.\n            this.emitCodePoint(decodeTree[result + 2], consumed);\n        }\n        return consumed;\n    }\n    /**\n     * Signal to the parser that the end of the input was reached.\n     *\n     * Remaining data will be emitted and relevant errors will be produced.\n     *\n     * @returns The number of characters consumed.\n     */\n    end() {\n        var _a;\n        switch (this.state) {\n            case EntityDecoderState.NamedEntity: {\n                // Emit a named entity if we have one.\n                return this.result !== 0 &&\n                    (this.decodeMode !== DecodingMode.Attribute ||\n                        this.result === this.treeIndex)\n                    ? this.emitNotTerminatedNamedEntity()\n                    : 0;\n            }\n            // Otherwise, emit a numeric entity if we have one.\n            case EntityDecoderState.NumericDecimal: {\n                return this.emitNumericEntity(0, 2);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.emitNumericEntity(0, 3);\n            }\n            case EntityDecoderState.NumericStart: {\n                (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n                return 0;\n            }\n            case EntityDecoderState.EntityStart: {\n                // Return 0 if we have no entity.\n                return 0;\n            }\n        }\n    }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n    let returnValue = \"\";\n    const decoder = new EntityDecoder(decodeTree, (data) => (returnValue += fromCodePoint(data)));\n    return function decodeWithTrie(input, decodeMode) {\n        let lastIndex = 0;\n        let offset = 0;\n        while ((offset = input.indexOf(\"&\", offset)) >= 0) {\n            returnValue += input.slice(lastIndex, offset);\n            decoder.startEntity(decodeMode);\n            const length = decoder.write(input, \n            // Skip the \"&\"\n            offset + 1);\n            if (length < 0) {\n                lastIndex = offset + decoder.end();\n                break;\n            }\n            lastIndex = offset + length;\n            // If `length` is 0, skip the current `&` and continue.\n            offset = length === 0 ? lastIndex + 1 : lastIndex;\n        }\n        const result = returnValue + input.slice(lastIndex);\n        // Make sure we don't keep a reference to the final string.\n        returnValue = \"\";\n        return result;\n    };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIndex, char) {\n    const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n    const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n    // Case 1: Single branch encoded in jump offset\n    if (branchCount === 0) {\n        return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;\n    }\n    // Case 2: Multiple branches encoded in jump table\n    if (jumpOffset) {\n        const value = char - jumpOffset;\n        return value < 0 || value >= branchCount\n            ? -1\n            : decodeTree[nodeIndex + value] - 1;\n    }\n    // Case 3: Multiple branches encoded in packed dictionary (two keys per uint16)\n    const packedKeySlots = (branchCount + 1) >> 1;\n    /*\n     * Treat packed keys as a virtual sorted array of length `branchCount`.\n     * Key(i) = low byte for even i, high byte for odd i in slot i>>1.\n     */\n    let lo = 0;\n    let hi = branchCount - 1;\n    while (lo <= hi) {\n        const mid = (lo + hi) >>> 1;\n        const slot = mid >> 1;\n        const packed = decodeTree[nodeIndex + slot];\n        const midKey = (packed >> ((mid & 1) * 8)) & 0xff;\n        if (midKey < char) {\n            lo = mid + 1;\n        }\n        else if (midKey > char) {\n            hi = mid - 1;\n        }\n        else {\n            return decodeTree[nodeIndex + packedKeySlots + mid];\n        }\n    }\n    return -1;\n}\nconst htmlDecoder = /* #__PURE__ */ getDecoder(htmlDecodeTree);\nconst xmlDecoder = /* #__PURE__ */ getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param htmlString The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(htmlString, mode = DecodingMode.Legacy) {\n    return htmlDecoder(htmlString, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param htmlAttribute The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(htmlAttribute) {\n    return htmlDecoder(htmlAttribute, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param htmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(htmlString) {\n    return htmlDecoder(htmlString, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param xmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(xmlString) {\n    return xmlDecoder(xmlString, DecodingMode.Strict);\n}\nexport { decodeCodePoint, fromCodePoint, replaceCodePoint, } from \"./decode-codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nexport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\n//# sourceMappingURL=decode.js.map","// Generated using scripts/write-decode-map.ts\nimport { decodeBase64 } from \"../internal/decode-shared.js\";\nexport const htmlDecodeTree = /* #__PURE__ */ decodeBase64(\"QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQC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AHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg\");\n//# sourceMappingURL=decode-data-html.js.map","// Generated using scripts/write-decode-map.ts\nimport { decodeBase64 } from \"../internal/decode-shared.js\";\nexport const xmlDecodeTree = /* #__PURE__ */ decodeBase64(\"AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg\");\n//# sourceMappingURL=decode-data-xml.js.map","/**\n * Bit flags & masks for the binary trie encoding used for entity decoding.\n *\n * Bit layout (16 bits total):\n * 15..14 VALUE_LENGTH   (+1 encoding; 0 => no value)\n * 13     FLAG13.        If valueLength>0: semicolon required flag (implicit ';').\n *                       If valueLength==0: compact run flag.\n * 12..7  BRANCH_LENGTH  Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)\n * 6..0   JUMP_TABLE     Jump offset (jump table) OR single-branch char code OR first run char\n */\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n    BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"FLAG13\"] = 8192] = \"FLAG13\";\n    BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 8064] = \"BRANCH_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\n//# sourceMappingURL=bin-trie-flags.js.map","/*\n * Shared base64 decode helper for generated decode data.\n * Assumes global atob is available.\n */\nexport function decodeBase64(input) {\n    const binary = \n    // eslint-disable-next-line n/no-unsupported-features/node-builtins\n    typeof atob === \"function\"\n        ? // Browser (and Node >=16)\n            // eslint-disable-next-line n/no-unsupported-features/node-builtins\n            atob(input)\n        : // Older Node versions (<16)\n            // eslint-disable-next-line n/no-unsupported-features/node-builtins\n            typeof Buffer.from === \"function\"\n                ? // eslint-disable-next-line n/no-unsupported-features/node-builtins\n                    Buffer.from(input, \"base64\").toString(\"binary\")\n                : // eslint-disable-next-line unicorn/no-new-buffer, n/no-deprecated-api\n                    new Buffer(input, \"base64\").toString(\"binary\");\n    const evenLength = binary.length & ~1; // Round down to even length\n    const out = new Uint16Array(evenLength / 2);\n    for (let index = 0, outIndex = 0; index < evenLength; index += 2) {\n        const lo = binary.charCodeAt(index);\n        const hi = binary.charCodeAt(index + 1);\n        out[outIndex++] = lo | (hi << 8);\n    }\n    return out;\n}\n//# sourceMappingURL=decode-shared.js.map","import boolbase from \"boolbase\";\n/**\n * Returns a function that checks if an elements index matches the given rule\n * highly optimized to return the fastest solution.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A highly optimized function that returns whether an index matches the nth-check.\n * @example\n *\n * ```js\n * const check = nthCheck.compile([2, 3]);\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n * ```\n */\nexport function compile(parsed) {\n    const a = parsed[0];\n    // Subtract 1 from `b`, to convert from one- to zero-indexed.\n    const b = parsed[1] - 1;\n    /*\n     * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n     * Besides, the specification states that no elements are\n     * matched when `a` and `b` are 0.\n     *\n     * `b < 0` here as we subtracted 1 from `b` above.\n     */\n    if (b < 0 && a <= 0)\n        return boolbase.falseFunc;\n    // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n    if (a === -1)\n        return (index) => index <= b;\n    if (a === 0)\n        return (index) => index === b;\n    // When `b <= 0` and `a === 1`, they match any element.\n    if (a === 1)\n        return b < 0 ? boolbase.trueFunc : (index) => index >= b;\n    /*\n     * Otherwise, modulo can be used to check if there is a match.\n     *\n     * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n     */\n    const absA = Math.abs(a);\n    // Get `b mod a`, + a if this is negative.\n    const bMod = ((b % absA) + absA) % absA;\n    return a > 1\n        ? (index) => index >= b && index % absA === bMod\n        : (index) => index <= b && index % absA === bMod;\n}\n/**\n * Returns a function that produces a monotonously increasing sequence of indices.\n *\n * If the sequence has an end, the returned function will return `null` after\n * the last index in the sequence.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing (2n+3)</caption>\n *\n * ```js\n * const gen = nthCheck.generate([2, 3])\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value (-2n+10)</caption>\n *\n * ```js\n *\n * const gen = nthCheck.generate([-2, 5]);\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\nexport function generate(parsed) {\n    const a = parsed[0];\n    // Subtract 1 from `b`, to convert from one- to zero-indexed.\n    let b = parsed[1] - 1;\n    let n = 0;\n    // Make sure to always return an increasing sequence\n    if (a < 0) {\n        const aPos = -a;\n        // Get `b mod a`\n        const minValue = ((b % aPos) + aPos) % aPos;\n        return () => {\n            const val = minValue + aPos * n++;\n            return val > b ? null : val;\n        };\n    }\n    if (a === 0)\n        return b < 0\n            ? // There are no result — always return `null`\n                () => null\n            : // Return `b` exactly once\n                () => (n++ === 0 ? b : null);\n    if (b < 0) {\n        b += a * Math.ceil(-b / a);\n    }\n    return () => a * n++ + b;\n}\n//# sourceMappingURL=compile.js.map","import { parse } from \"./parse.js\";\nimport { compile, generate } from \"./compile.js\";\nexport { parse, compile, generate };\n/**\n * Parses and compiles a formula to a highly optimized function.\n * Combination of {@link parse} and {@link compile}.\n *\n * If the formula doesn't match any elements,\n * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`.\n * Otherwise, a function accepting an _index_ is returned, which returns\n * whether or not the passed _index_ matches the formula.\n *\n * Note: The nth-rule starts counting at `1`, the returned function at `0`.\n *\n * @param formula The formula to compile.\n * @example\n * const check = nthCheck(\"2n+3\");\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n */\nexport default function nthCheck(formula) {\n    return compile(parse(formula));\n}\n/**\n * Parses and compiles a formula to a generator that produces a sequence of indices.\n * Combination of {@link parse} and {@link generate}.\n *\n * @param formula The formula to compile.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing</caption>\n *\n * ```js\n * const gen = nthCheck.sequence('2n+3')\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value</caption>\n *\n * ```js\n *\n * const gen = nthCheck.sequence('-2n+5');\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\nexport function sequence(formula) {\n    return generate(parse(formula));\n}\n//# sourceMappingURL=index.js.map","// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo\n// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is \" \\t\\r\\n\\f\"\nconst whitespace = new Set([9, 10, 12, 13, 32]);\nconst ZERO = \"0\".charCodeAt(0);\nconst NINE = \"9\".charCodeAt(0);\n/**\n * Parses an expression.\n *\n * @throws An `Error` if parsing fails.\n * @returns An array containing the integer step size and the integer offset of the nth rule.\n * @example nthCheck.parse(\"2n+3\"); // returns [2, 3]\n */\nexport function parse(formula) {\n    formula = formula.trim().toLowerCase();\n    if (formula === \"even\") {\n        return [2, 0];\n    }\n    else if (formula === \"odd\") {\n        return [2, 1];\n    }\n    // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]?\n    let idx = 0;\n    let a = 0;\n    let sign = readSign();\n    let number = readNumber();\n    if (idx < formula.length && formula.charAt(idx) === \"n\") {\n        idx++;\n        a = sign * (number !== null && number !== void 0 ? number : 1);\n        skipWhitespace();\n        if (idx < formula.length) {\n            sign = readSign();\n            skipWhitespace();\n            number = readNumber();\n        }\n        else {\n            sign = number = 0;\n        }\n    }\n    // Throw if there is anything else\n    if (number === null || idx < formula.length) {\n        throw new Error(`n-th rule couldn't be parsed ('${formula}')`);\n    }\n    return [a, sign * number];\n    function readSign() {\n        if (formula.charAt(idx) === \"-\") {\n            idx++;\n            return -1;\n        }\n        if (formula.charAt(idx) === \"+\") {\n            idx++;\n        }\n        return 1;\n    }\n    function readNumber() {\n        const start = idx;\n        let value = 0;\n        while (idx < formula.length &&\n            formula.charCodeAt(idx) >= ZERO &&\n            formula.charCodeAt(idx) <= NINE) {\n            value = value * 10 + (formula.charCodeAt(idx) - ZERO);\n            idx++;\n        }\n        // Return `null` if we didn't read anything.\n        return idx === start ? null : value;\n    }\n    function skipWhitespace() {\n        while (idx < formula.length &&\n            whitespace.has(formula.charCodeAt(idx))) {\n            idx++;\n        }\n    }\n}\n//# sourceMappingURL=parse.js.map","// the data a precompiled template carries beside its emitted javascript, written out and read back\n//\n// emitting javascript is what makes a render fast, and it needs to build a function from a string to do it, which a page under a strict content security policy may not do. a template compiled ahead of time does not have to: the function is written to a file as source, and the browser loads it as a script like any other. what has to travel with it is the data the emitted code indexes into, which is what this module writes and reads\n//\n// the shapes involved are not plain json. the same node list is reached from more than one place, an arm holds its branch and the branch holds the arm back, and a dynamic include keeps a map. so every object is written once into a table and referred to by its place in it, which handles sharing and circularity alike\n\nexport const FORMAT = 1 // precompile version: a template compiled by one version of teddy and loaded by another whose format differs is refused rather than rendered into something wrong\n\nconst REF = '$r'\nconst MAP = '$m'\nconst UNDEFINED = '$u'\n\n// the node types the compiler produces. a decoded object is rebuilt as a node when its type is one of these, so that it comes out with the same shape every other node has\nconst NODE_TYPES = new Set(['text', 'var', 'arm', 'loop', 'attrs', 'scope', 'raw', 'inline', 'computedVar', 'selection', 'cache', 'dynamicInclude'])\n\n// true for an object that came out of the compiler's node factory. checking the type alone is not enough: a binding also has a name, and a conditional also has a type of sorts\nfunction isNode (value) {\n  return typeof value.type === 'string' && NODE_TYPES.has(value.type) && Object.prototype.hasOwnProperty.call(value, 'bodySource')\n}\n\nexport function encode (value) {\n  const table = []\n  const places = new Map()\n\n  function write (value) {\n    if (value === undefined) return { [UNDEFINED]: 1 }\n    if (value === null || typeof value !== 'object') {\n      if (typeof value === 'function') throw new Error('teddy: a template holding a function in its compiled form cannot be precompiled')\n      return value\n    }\n\n    const seen = places.get(value)\n    if (seen !== undefined) return { [REF]: seen }\n    // the place is claimed before the contents are written, so that something reaching back to this object finds a reference rather than going round again\n    const place = table.length\n    places.set(value, place)\n    table.push(null)\n\n    if (value instanceof Map) {\n      table[place] = { [MAP]: [...value].map(([k, v]) => [write(k), write(v)]) }\n      return { [REF]: place }\n    }\n    if (Array.isArray(value)) {\n      table[place] = value.map(write)\n      return { [REF]: place }\n    }\n    const written = {}\n    for (const key of Object.keys(value)) written[key] = write(value[key])\n    if (isNode(value)) written.$n = value.type\n    table[place] = written\n    return { [REF]: place }\n  }\n\n  const root = write(value)\n  return { root, table }\n}\n\n// makeNode is the compiler's own node factory, passed in so that this module does not have to know what fields a node has\nexport function decode (encoded, makeNode) {\n  const { root, table } = encoded\n  const built = new Array(table.length).fill(undefined)\n  const done = new Array(table.length).fill(false)\n\n  function read (value) {\n    if (value === null || typeof value !== 'object') return value\n    if (value[UNDEFINED] !== undefined) return undefined\n    // anything else write produced is a reference into the table\n    return at(value[REF])\n  }\n\n  function at (place) {\n    if (done[place]) return built[place]\n    const raw = table[place]\n\n    // the container is made and recorded before what is in it is read, so that something inside it referring back finds the same object rather than a second copy of it\n    if (Array.isArray(raw)) {\n      const out = []\n      built[place] = out\n      done[place] = true\n      for (const item of raw) out.push(read(item))\n      return out\n    }\n    if (raw[MAP] !== undefined) {\n      const out = new Map()\n      built[place] = out\n      done[place] = true\n      for (const [k, v] of raw[MAP]) out.set(read(k), read(v))\n      return out\n    }\n    const out = raw.$n === undefined ? {} : makeNode(raw.$n)\n    built[place] = out\n    done[place] = true\n    for (const key of Object.keys(raw)) {\n      if (key === '$n') continue\n      out[key] = read(raw[key])\n    }\n    return out\n  }\n\n  return read(root)\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tif (!(moduleId in __webpack_modules__)) {\n\t\tdelete __webpack_module_cache__[moduleId];\n\t\tconst e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// #region globals\n\nimport fs from 'fs' // node filesystem module\nimport path from 'path' // node path module\nimport { load as cheerioLoad } from 'cheerio/slim' // dom parser\nimport { createCompiler } from './compiler.js' // walks a template once so a render does not have to\nimport { canEmit, emit } from './codegen.js' // turns what the compiler worked out into javascript; browser builds swap this for a stub\nimport { encode, decode, FORMAT } from './precompiled.js' // reads and writes the data a template compiled ahead of time carries\n\nconst cheerioOptions = { lowerCaseAttributeNames: false, decodeEntities: false }\nconst browser = cheerioLoad.isCheerioPolyfill // true if we are executing in the browser context\nconst params = {} // teddy parameters\nsetDefaultParams() // set params to the defaults\nlet templates = {} // templates registered by hand with setTemplate, e.g. { \"myTemplate.html\": \"<p>some markup</p>\"}; this is how templates reach the browser, where there is no filesystem to read them from\nlet fileCache = {} // templates that were read from the filesystem, kept only when template caching is switched on\nlet compiledCache = new Map() // node trees built by the compiler, kept on the same terms as fileCache: only when template caching is switched on, so that editing a template still takes effect without a restart\nconst maxCompiledCache = 10000 // a caller that renders markup passed in as a string rather than by name must not grow this without bound\nconst caches = {} // a place to store cached portions of templates\n// building a regular expression costs far more than using one, and a loop substitutes the same variables out of the same body on every iteration, so the patterns are compiled once and kept\nconst varPatterns = new Map()\nfunction varPattern (source, escape) {\n  const key = escape ? source : '\\u0000raw:' + source\n  let pattern = varPatterns.get(key)\n  if (pattern === undefined) {\n    pattern = new RegExp(escape ? source.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d') : source, 'i')\n    if (varPatterns.size > 10000) varPatterns.clear() // a model that invents variable names without bound must not grow this forever\n    varPatterns.set(key, pattern)\n  }\n  return pattern\n}\nconst templateCaches = {} // a place to store cached full templates\n\n// #endregion\n\n// #region private methods\n\n// resolves a template to its markup:\n//\n// a template may be the markup itself, the name of a template registered with setTemplate, or the path of a file to read\n//\n// returns null when a name is neither registered nor readable, so that callers can tell a template that is missing apart from one that legitimately rendered to nothing\nfunction loadTemplate (template) {\n  // ensure template is a string\n  if (typeof template !== 'string') {\n    if (params.verbosity > 1) console.warn('teddy.loadTemplate attempted to load a template which is not a string.')\n    return null\n  }\n\n  // markup passed in directly rather than a name to look up\n  if (template.includes('<')) return removeTeddyComments(template)\n\n  const name = template\n  const withExtension = name.slice(-5) === '.html' ? name : name + '.html'\n\n  // a template registered by hand wins over anything on the filesystem, which is what makes the same template work in the browser\n  for (const key of [name, withExtension]) {\n    if (typeof templates[key] === 'string') return removeTeddyComments(templates[key])\n  }\n\n  // then whatever was read from the filesystem last time, if the caller asked for templates to be cached\n  if (params.cacheTemplates && typeof fileCache[name] === 'string') return fileCache[name]\n\n  // then the filesystem itself\n  if (fs && fs.readFileSync) {\n    for (const candidate of [withExtension, params.templateRoot + withExtension, params.templateRoot + '/' + withExtension]) {\n      let contents\n      try {\n        contents = fs.readFileSync(candidate, 'utf8')\n      } catch (e) {\n        continue // try the next place it might be\n      }\n      contents = removeTeddyComments(contents)\n      if (params.cacheTemplates) fileCache[name] = contents\n      return contents\n    }\n  }\n\n  return null // it is not a registered template and there is no file by that name\n}\n\n// remove teddy {! comments !} and <!--! comments -->; also replace <escape>tags</escape> and <!--# content -->\nfunction removeTeddyComments (renderedTemplate) {\n  let oldTemplate\n  do {\n    oldTemplate = renderedTemplate\n    let vars\n\n    // server-side comments\n    try {\n      vars = matchByDelimiter(renderedTemplate, '{!', '!}')\n    } catch (e) {\n      return renderedTemplate // it will match {! comments {! with comments in them !} !} but if there are unbalanced brackets, just return the original text\n    }\n    for (let i = 0; i < vars.length; i++) renderedTemplate = renderedTemplate.replace(`{!${vars[i]}!}`, '')\n\n    try {\n      vars = matchByDelimiter(renderedTemplate, '<!--!', '-->')\n    } catch (e) {\n      return renderedTemplate\n    }\n    for (let i = 0; i < vars.length; i++) renderedTemplate = renderedTemplate.replace(`<!--!${vars[i]}-->`, '')\n\n    // <!--# escape --> blocks and <escape> tags\n    let firstMatch\n    try {\n      firstMatch = getFirstMatchByDelimiters(renderedTemplate, [['<!--#', '-->'], ['<escape>', '</escape>']])\n    } catch (e) {\n      return renderedTemplate\n    }\n    let newContent = firstMatch\n    if (firstMatch) {\n      if (firstMatch.startsWith('<!--#')) {\n        newContent = newContent.substring(0, newContent.length - 3).slice(5)\n        renderedTemplate = renderedTemplate.replace(firstMatch, escapeEntities(newContent.trim()))\n      } else {\n        newContent = newContent.substring(0, newContent.length - 9).slice(8)\n        renderedTemplate = renderedTemplate.replace(firstMatch, escapeEntities(newContent.trim()))\n      }\n    }\n  } while (oldTemplate !== renderedTemplate)\n  return renderedTemplate\n}\n\n// evaluates a single <if> or <unless> tag\nfunction evaluateConditional (conditions, model, values) {\n  const conditionsLength = conditions.length\n  // loop through conditions and reduce them to booleans\n  for (let i = 0; i < conditionsLength; i++) {\n    const condition = conditions[i]\n    if (typeof condition === 'boolean') continue // if the condition is already a boolean then we don't need to reduce it to a boolean to evaluate it\n    // reject conditions with invalid formatting\n    if (condition.startsWith('=') || condition.endsWith('=')) {\n      if (params.verbosity > 1) console.warn('teddy encountered a conditional statement with \"=\" at the beginning or end of a condition.')\n      return false\n    }\n    if (condition.includes(':') && !condition.startsWith('not:')) {\n      if (params.verbosity > 1) console.warn('teddy encountered a conditional statement with a \"not:\" that isn\\'t at the beginning of a condition.')\n      return false\n    }\n    // deal with boolean logic\n    if (condition === 'and') {\n      if (conditions[i - 1] && evaluateCondition(conditions[i + 1], model, values, i + 1)) {\n        // if both sides of an and are true, then reduce all 3 condition blocks to true\n        conditions[i - 1] = true\n        conditions[i] = true\n        conditions[i + 1] = true\n      } else {\n        // if either side of an and is false, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      }\n    } else if (condition === 'or') {\n      if (conditions[i - 1] || evaluateCondition(conditions[i + 1], model, values, i + 1)) {\n        // if either side of an or is true, then reduce all 3 condition blocks to true, as well as all condition blocks that preceded this or\n        conditions.fill(true, 0, i + 2)\n      } else {\n        // if both sides of an or are false, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      }\n    } else if (condition === 'xor') {\n      if (!!conditions[i - 1] === !!evaluateCondition(conditions[i + 1], model, values, i + 1)) {\n        // if both sides of an xor are equal to each other, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      } else {\n        // if the two sides of an xor are not equal to each other, then reduce all 3 condition blocks to true\n        conditions[i - 1] = true\n        conditions[i] = true\n        conditions[i + 1] = true\n      }\n    } else conditions[i] = evaluateCondition(condition, model, values, i)\n  }\n  return conditions.every(item => item === true) || false // if any of the booleans are false, then return false. otherwise return true\n}\n\n// the name a condition looks up in the model, or null when it is a boolean operator rather than a condition. this is the same for every render, so a compiled template works it out once and hands the looked up value in rather than having the lookup done again here\nfunction conditionPath (condition) {\n  if (typeof condition !== 'string') return null\n  if (condition === 'and' || condition === 'or' || condition === 'xor') return null\n  let path = condition.startsWith('not:') ? condition.slice(4) : condition\n  const equals = path.indexOf('=')\n  if (equals !== -1) path = path.slice(0, equals)\n  return path\n}\n\n// determines whether a single condition in a teddy conditional is true or false\n//\n// values, when given, holds what each condition looks up already looked up, which is how a compiled template avoids splitting a dotted name apart on every render\nfunction evaluateCondition (condition, model, values, index) {\n  let not // stores whether the :not modifier is present\n  if (typeof condition === 'string' && condition.includes('=')) { // it's an equality check condition\n    not = !!condition.startsWith('not:') // true if \"not:\" is present\n    if (not) condition = condition.slice(4) // remove the :not prefix\n    const parts = condition.split('=') // something=\"Some content\"\n    const cond = parts[0] // something\n    delete parts[0] // remove the something=\n    const val = parts.join('') // \"Some content\" — the path.join method ensures the string gets rebuilt even if it contains another = character\n    const lookup = values ? values[index] : getOrSetObjectByDotNotation(model, cond)\n    // the == is necessary because teddy does type-insensitive equality checks\n    if (lookup == val) return !not // eslint-disable-line\n    else return not // false\n  } else { // it's a presence check\n    not = typeof condition === 'string' ? !!condition.startsWith('not:') : false // true if \"not:\" is present\n    if (not) condition = condition.slice(4) // remove the :not prefix\n    const lookup = values ? values[index] : getOrSetObjectByDotNotation(model, condition)\n    if (lookup) {\n      if (typeof lookup === 'object' && Object.keys(lookup).length === 0) return not // false; empty object or array\n      return !not // true; var is present\n    } else return not // false; var is not present\n  }\n}\n\n// render {variables}\nfunction parseVars (templateString, model) {\n  let vars\n  try {\n    vars = matchByDelimiter(templateString, '{', '}')\n  } catch (e) {\n    return templateString // it will match {vars{withVarsInThem}} but if there are unbalanced brackets, just return the original text\n  }\n  for (let i = 0; i < vars.length; i++) {\n    let match = vars[i]\n    if (match === '') continue // empty {}\n    if (!/^(\\d+|[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*(\\.[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*)*)$/.test(match)) {\n      if (params.verbosity > 2) console.warn(`teddy.parseVars encountered a {variable} that could not be parsed: {${match}}`)\n      continue // skip invalid variables\n    }\n    if (match.includes('{')) {\n      // there's a variable inside the variable name\n      const originalMatch = match\n      match = parseVars(match, model)\n      try {\n        templateString = templateString.replace(varPattern(`\\${${originalMatch}}`, true), () => `\\${${match}}`)\n        templateString = templateString.replace(varPattern(`{${originalMatch}}`, true), () => `{${match}}`)\n      } catch (e) {\n        if (params.verbosity > 2) console.warn(`teddy.parseVars encountered a {variable} that could not be parsed: {${originalMatch}}`)\n      }\n    }\n    const resolved = resolveVariable(match, model)\n    if (!resolved) continue // the variable resolves to nothing that should be written, so it is left in the markup verbatim\n    const { name, text, skipTemplateLiteralReplacement } = resolved\n    try {\n      if (!skipTemplateLiteralReplacement) templateString = templateString.replace(varPattern(`\\${${name}}`, true), () => text)\n      templateString = templateString.replace(varPattern(`{${name}}`, true), () => text)\n    } catch (e) {\n      return templateString\n    }\n  }\n  return templateString\n}\n\n// works out what a single {variable} should be replaced with, given its name and any flags on it\n//\n// this is shared by the interpreter above and by the compiler, which walks a template once and keeps a slot for every variable rather than rescanning the markup for it. the rules it implements are not obvious: a value of false or null resolves to the variable's own text, 0 writes as \"0\" when escaped but resolves to its own text when raw, an object writes as [Object] when escaped and as its own toString when raw, and |h blanks all of them. having one implementation of that is the only way the two paths can be relied on to agree\n//\n// returns null when nothing should be substituted, or { name, text, skipTemplateLiteralReplacement } where name is the variable without its flags and text is what to write\nfunction resolveVariable (match, model) {\n  const flags = variableFlags(match)\n  return formatVariable(flags, getOrSetObjectByDotNotation(model, flags.name), model)\n}\n\n// which flags a {variable} carries and what its name is without them, worked out from the name alone. this is the same for every render of a template, so a compiled template settles it once rather than reading the last x characters of the name on every render\nfunction variableFlags (match) {\n  const lastSixChars = match.slice(-6)\n  const flagCount = lastSixChars.split('|').length - 1\n  const noparse = lastSixChars.includes('|p')\n  const raw = !noparse && lastSixChars.includes('|s')\n  return {\n    match,\n    name: noparse || raw ? match.substring(0, match.length - flagCount * 2) : match,\n    noparse,\n    raw,\n    hide: lastSixChars.includes('|h'),\n    display: lastSixChars.includes('|d')\n  }\n}\n\n// what a variable writes, given its flags and the value the model had for it\n//\n// the rules here are not obvious: a value of false or null resolves to the variable's own text, 0 writes as \"0\" when escaped but resolves to its own text when raw, an object writes as [Object] when escaped and as its own toString when raw, and |h blanks all of them. this is the one place they are implemented, so every caller agrees about them\n//\n// returns null when nothing should be substituted, or { name, text, skipTemplateLiteralReplacement } where name is the variable as written and text is what to write\nfunction formatVariable (flags, value, model) {\n  const { match, noparse, raw, hide, display } = flags\n  let parsed = value\n\n  if (noparse) {\n    if (!parsed && !display && (params.emptyVarBehavior === 'hide' || hide)) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n    if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.includes('|d')) parsed = parsed.replace('|d', '')\n    if (!parsed && parsed !== '') return null\n    const id = model._noTeddyBlocks.push(parsed) - 1\n    return { name: match, text: `<noteddy id=\"${id}\"></noteddy>`, skipTemplateLiteralReplacement: false }\n  }\n\n  let skipTemplateLiteralReplacement = false\n  if (raw) {\n    if (!parsed && !display && (params.emptyVarBehavior === 'hide' || hide)) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n    else if (!parsed && parsed !== '') {\n      skipTemplateLiteralReplacement = true\n      parsed = `{${match}}`\n    }\n  } else {\n    if (!parsed && !display && (params.emptyVarBehavior === 'hide' || hide)) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n    else if (parsed || parsed === '') parsed = escapeEntities(parsed)\n    else if (parsed === 0) parsed = '0'\n    else {\n      skipTemplateLiteralReplacement = true\n      parsed = `{${match}}`\n    }\n  }\n  if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.includes('|d')) parsed = parsed.replace('|d', '')\n  return { name: match, text: parsed, skipTemplateLiteralReplacement }\n}\n\n// escapes sensitive characters to prevent xss\nconst escapeHtmlEntities = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&#34;',\n  \"'\": '&#39;'\n}\n// the same replacements again, indexed by character code, so that finding one costs no comparisons and builds no single character string to compare against\nconst escapeHtmlEntitiesByCode = []\nfor (const character of Object.keys(escapeHtmlEntities)) escapeHtmlEntitiesByCode[character.charCodeAt(0)] = escapeHtmlEntities[character]\n\nconst needsEscaping = /[&<>\"']/g // most values have nothing in them that needs escaping, and one scan settles that\nfunction escapeEntities (value) {\n  if (typeof value === 'object') { // cannot escape on this value\n    if (!value) return false // it is falsy to return false\n    else if (Array.isArray(value)) {\n      if (value.length === 0) return false // empty arrays are falsy\n      else return '[Array]' // print that it is an array with content in it, but do not print the contents\n    }\n    return '[Object]' // just print that it is an object, do not print the contents\n  } else if (value === undefined) return false // cannot escape on this value; undefined is falsy\n  else if (typeof value === 'boolean' || typeof value === 'number') return value // cannot escape on these values; if it's already a boolean or a number just return it\n\n  // the regular expression engine finds the entities, which it does far faster than stepping through the value in javascript, and the stretches between them are copied a piece at a time rather than a character at a time. one pass over the value either way, and a value with nothing to escape is returned as it came in\n  needsEscaping.lastIndex = 0\n  let match = needsEscaping.exec(value)\n  if (match === null) return value\n\n  let escaped = ''\n  let copiedTo = 0\n  do {\n    escaped += value.slice(copiedTo, match.index) + escapeHtmlEntitiesByCode[value.charCodeAt(match.index)]\n    copiedTo = match.index + 1\n    match = needsEscaping.exec(value)\n  } while (match !== null)\n\n  return escaped + value.slice(copiedTo)\n}\n\n// if an entity is double-encoded, this will fix that\nfunction reverseDoubleEncodedEntities (str) {\n  return str.replace(/&amp;(#\\d+;|#x[0-9A-Fa-f]+;|[A-Za-z]+;)/g, '&$1')\n}\n\n// match strings by a custom delimiter\nfunction matchByDelimiter (input, openDelimiter, closeDelimiter) {\n  const stack = []\n  const result = []\n  const openLength = openDelimiter.length\n  const closeLength = closeDelimiter.length\n  for (let i = 0; i < input.length; i++) {\n    if (input.substring(i, i + openLength) === openDelimiter) {\n      stack.push(i + openLength)\n      i += openLength - 1\n    } else if (input.substring(i, i + closeLength) === closeDelimiter) {\n      const start = stack.pop()\n      if (stack.length === 0) result.push(input.substring(start, i))\n      i += closeLength - 1\n    }\n  }\n\n  return result\n}\n\nfunction getFirstMatchByDelimiters (str, delimiters) {\n  const openers = []\n  const closers = []\n  for (const delimiter of delimiters) {\n    openers.push(delimiter[0])\n    closers.push(delimiter[1])\n  }\n  const currentlyOpenBrackets = {}\n  let currentDelimiter = -1\n  let match = ''\n\n  for (let charIndex = 0; charIndex < str.length; charIndex++) {\n    for (let delimiterIndex = 0; delimiterIndex < openers.length; delimiterIndex++) {\n      if (currentDelimiter < 0 || currentDelimiter === delimiterIndex) {\n        const opener = openers[delimiterIndex]\n        const openerLength = opener.length\n        const closer = closers[delimiterIndex]\n        const closerLength = closer.length\n        let chunk = str.substring(charIndex, charIndex + openerLength)\n        if (chunk === opener) {\n          if (!currentlyOpenBrackets[opener]) {\n            match = opener.slice(0, -1)\n            currentlyOpenBrackets[opener] = 1\n            currentDelimiter = delimiterIndex\n            charIndex = charIndex + openerLength - 1 // move the loop ahead beyond the delimiter\n          } else {\n            currentlyOpenBrackets[opener]++\n          }\n        } else {\n          chunk = str.substring(charIndex, charIndex + closerLength)\n          if (chunk === closer) {\n            if (currentlyOpenBrackets[opener]) {\n              if (currentlyOpenBrackets[opener] > 1) currentlyOpenBrackets[opener]-- // they're nested; keep going\n              else if (currentlyOpenBrackets[opener] === 1) {\n                match += closer\n                return match\n              }\n            }\n          }\n        }\n        if (currentlyOpenBrackets[opener]) match += str.charAt(charIndex)\n      }\n    }\n  }\n\n  return match\n}\n\n// gets or sets an object by dot notation, e.g. thing.nestedThing.furtherNestedThing: two arguments gets, three arguments sets\nfunction getOrSetObjectByDotNotation (obj, dotNotation, value) {\n  if (!obj) return false\n  if (!dotNotation || typeof dotNotation === 'boolean' || typeof dotNotation === 'number') return dotNotation\n  if (typeof dotNotation === 'string') return getOrSetObjectByDotNotation(obj, dotNotation.split('.'), value)\n  else if (dotNotation.length === 1 && value !== undefined) {\n    // a lookup is case insensitive, so a key that differs from this one only in case has to go: leaving both in place means which one a later lookup finds depends on the order the keys happen to be in. this matters most for <include> <arg> names, because the browser lowercases attribute names and cheerio does not, so an <arg camelCase> would otherwise sit next to a model key of the same name in a different case\n    //\n    // only a key this object owns is ambiguous with the one about to be written, so only those are looked at. a key it merely inherits from the model an enclosing loop or include was reached with is shadowed by the write rather than left sitting behind it, and deleting one would reach back into a model that enclosing scope is still rendering from\n    const key = dotNotation[0]\n    if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n      const lowerCaseKey = key.toLowerCase()\n      for (const existing of Object.keys(obj)) {\n        if (existing !== key && existing.toLowerCase() === lowerCaseKey) delete obj[existing]\n      }\n    }\n    obj[key] = value\n    return obj[key]\n  } else {\n    // walked rather than recursed: the recursion handed each step a copy of the rest of the path, so a name of three segments allocated two arrays every time it was read\n    let current = obj\n    for (let i = 0; i < dotNotation.length; i++) {\n      if (!current) return false\n      current = caseInsensitiveLookup(current, dotNotation[i])\n    }\n    return current\n  }\n  function caseInsensitiveLookup (obj, key) {\n    if (key === 'length') return obj.length\n    // a key that matches exactly is the overwhelming case, and answering it costs one lookup. the lowercased copy of the object below is only built when there is no exact match to be had, which is what stops a model lookup from costing as much as the object is wide on every single step of every single path\n    //\n    // asking what the object owns, rather than reading the key straight off it, is what makes an <arg> win against a model key that differs from it only in case. the browser lowercases attribute names, so an <arg escapeTest> arrives owned as escapetest while the model's own spelling is still reachable through the prototype chain: a plain read would find that one and stop, where the walk below prefers the key this object owns\n    if (Object.prototype.hasOwnProperty.call(obj, key)) return obj[key]\n    // a loop body and an included template see the model they were reached with through the prototype chain rather than through a copy of it, so the keys worth looking at are the inherited ones too. a key the object owns answers ahead of one it inherits, which is what an exact match one line above would have done\n    const lowerCaseKey = key.toLowerCase()\n    let own\n    let ownFound = false\n    let inherited\n    let inheritedFound = false\n    for (const k in obj) {\n      if (k.toLowerCase() !== lowerCaseKey) continue\n      if (Object.prototype.hasOwnProperty.call(obj, k)) {\n        own = obj[k]\n        ownFound = true\n      } else if (!inheritedFound) {\n        inherited = obj[k]\n        inheritedFound = true\n      }\n    }\n    return ownFound ? own : inherited\n  }\n}\n\n// cheerio polyfill\nfunction getAttribs (element) {\n  const attributes = element.attributes\n  const attributesObject = {}\n  for (let i = 0; i < attributes.length; i++) {\n    const attr = attributes[i]\n    attributesObject[attr.name] = attr.value\n  }\n  return attributesObject\n}\n\n// #endregion\n\n// #region public methods\n\n// set params to the defaults\nfunction setDefaultParams () {\n  params.verbosity = 1\n  params.templateRoot = './'\n  params.emptyVarBehavior = 'display' // or 'hide'\n  params.includeNotFoundBehavior = 'display' // or 'hide'\n  params.cacheTemplates = false // whether to keep templates read from the filesystem in memory rather than reading them again on the next render\n}\n\n// mutator method to set verbosity param. takes human-readable string argument and converts it to an integer for more efficient checks against the setting\nfunction setVerbosity (v) {\n  switch (v) {\n    case 'none':\n    case 0:\n      v = 0\n      break\n    case 'verbose':\n    case 2:\n      v = 2\n      break\n    case 'debug':\n    case 'DEBUG':\n    case 3:\n      v = 3\n      break\n    default: // concise\n      v = 1\n  }\n  params.verbosity = v\n}\n\n// mutator method to set template root param; must be a string\nfunction setTemplateRoot (v) {\n  params.templateRoot = String(v)\n}\n\n// mutator method to set empty var behavior param: whether to display {variables} that don't resolve as text ('display') or as an empty string ('hide')\nfunction setEmptyVarBehavior (v) {\n  if (v === 'hide') params.emptyVarBehavior = 'hide'\n  else params.emptyVarBehavior = 'display'\n}\n\n// mutator method to set include tag not found param: whether to display an error when an <include> tag src can't be found\nfunction setIncludeNotFoundBehavior (v) {\n  if (v === 'hide') params.includeNotFoundBehavior = 'hide'\n  else params.includeNotFoundBehavior = 'display'\n}\n\n// mutator method to set whether templates read from the filesystem are kept in memory\n//\n// off by default, matching how most other templating engines (e.g. ejs and pug) treat their own caching, so that editing a template takes effect without a restart\n//\n// express sets its own `view cache` setting per mode and teddy picks that up in render, so an express app gets caching in production and fresh reads in development without having to ask for either\nfunction setCacheTemplates (v) {\n  params.cacheTemplates = !!v\n}\n\n// access templates\nfunction getTemplates () {\n  return templates\n}\n\n// takes in a template string and outputs a function which when given data will render out html\nfunction compile (templateString) {\n  return function (model) {\n    return render(templateString, model)\n  }\n}\n\nconst compiler = createCompiler({\n  cheerioLoad,\n  cheerioOptions,\n  browser,\n  params,\n  variableFlags,\n  formatVariable,\n  escapeEntities,\n  conditionPath,\n  evaluateConditional,\n  loadTemplate,\n  caches,\n  parseVars,\n  getAttribs,\n  getOrSetObjectByDotNotation\n})\n\n// everything about a template that does not depend on the model: its markup with repeated attributes renamed, and the node tree the compiler built from it\n//\n// nodes is null for a template the compiler does not handle, and that answer is kept too, so a template it has already turned down is not walked again on every render only to be turned down again\n//\n// keyIsMarkup says the key is the template's own markup rather than a name it was looked up by. such an entry can never go stale, because the key is the content, so it is always kept: that is what makes teddy.compile() compile once even in development. an entry keyed by a name can go stale, since the file behind the name may change, so it is kept only on the same terms as the template source itself\nfunction prepareTemplate (cacheKey, markup, keyIsMarkup, emittedOut) {\n  const keep = keyIsMarkup || params.cacheTemplates\n  // give every repeated attribute name a unique one before the markup is parsed since html parsers strip duplicate attributes\n  const prepared = markup.replace(/<([a-zA-Z][a-zA-Z0-9-]*)([^>]*)>/g, (match, tagName, attributes) => {\n    const attrRegex = /([a-zA-Z0-9-:._]+)(?:=([\"'])(.*?)\\2|([^>\\s]+))?/g\n    const attrMap = new Map()\n    let count = 1\n    const processedAttributes = attributes.replace(attrRegex, (attrMatch, attrName, quote, attrValue) => {\n      if (attrMap.has(attrName)) {\n        const newAttrName = `${attrName}-teddyduplicate${count++}`\n        return attrMatch.replace(attrName, newAttrName)\n      } else {\n        attrMap.set(attrName, true)\n        return attrMatch\n      }\n    })\n    return `<${tagName}${processedAttributes}>`\n  })\n  const nodes = compiler.compileTemplate(prepared)\n  // emitting javascript is faster than walking the tree, and needs to build a function from a string to do it, which a page under a strict content security policy may not do. browser builds therefore walk the tree, and so does any template holding a construct the emitter does not write code for\n  let render = null\n  if (canEmit(nodes)) {\n    try {\n      const emitted = emit(nodes, compiler.helpers)\n      // only precompiling asks for this, and it is not kept on the entry: the source and the data behind it are wanted once, to be written out\n      if (emittedOut) emittedOut.emitted = emitted\n      render = emitted.render\n    } catch (err) {\n      if (params.verbosity > 1) console.warn(`teddy: could not emit javascript for this template, so it will be rendered by walking it instead: ${err.message}`)\n      render = null\n    }\n  }\n  const entry = { markup: prepared, nodes, render, keyIsMarkup }\n  if (keep) {\n    if (compiledCache.size > maxCompiledCache) compiledCache = new Map()\n    compiledCache.set(cacheKey, entry)\n  }\n  return entry\n}\n\n// mutator method to cache template\nfunction setTemplate (file, template) {\n  templates[file] = template\n  // whatever was compiled under this name was compiled from the old markup\n  compiledCache.delete(file)\n  compiledCache.delete(file.slice(-5) === '.html' ? file.substring(0, file.length - 5) : file + '.html')\n}\n\n// mutator method to clear template cache entirely\nfunction clearTemplates () {\n  templates = {}\n  fileCache = {}\n  compiledCache = new Map()\n}\n\nfunction setCache (params) {\n  if (!templateCaches[params.template]) templateCaches[params.template] = {}\n  if (params.key) {\n    templateCaches[params.template][params.key] = {\n      maxAge: params.maxAge || params.maxage,\n      maxCaches: (params.maxCaches || params.maxcaches) || 1000,\n      entries: {}\n    }\n  } else {\n    templateCaches[params.template].none = {\n      maxAge: params.maxAge || params.maxage,\n      markup: null,\n      created: null\n    }\n  }\n}\n\n// delete one or more cached templates\n//\n// 1 string argument deletes the whole cache at that name for template partial caches\n//\n// 2 arguments deletes just the value at that keyVal for template partial caches\n//\n// 1 object argument assumes we're clearing whole template level cache\nfunction clearCache (name, keyVal) {\n  if (typeof name === 'string') {\n    if (keyVal) delete caches[name].entries[keyVal]\n    else delete caches[name]\n  } else if (typeof name === 'object') {\n    const params = name\n    if (params.key) delete templateCaches[params.template][params.key]\n    else delete templateCaches[params.template]\n  } else if (params.verbosity > 0) console.error('teddy: invalid params passed to clearCache.')\n}\n\n// parses a template\nfunction render (template, model, callback) {\n  // ensure template is a string\n  if (typeof template !== 'string') {\n    if (params.verbosity > 1) console.warn('teddy.render attempted to render a template which is not a string.')\n    if (typeof callback === 'function') return callback(null, '')\n    else return ''\n  }\n\n  // ensure model is an object\n  if (typeof model !== 'object') {\n    if (params.verbosity > 1) console.warn('teddy.render was passed an invalid model.')\n    model = {} // allow the template to render if an invalid model is supplied, but it will have an empty model\n  }\n\n  // declare vars\n  let renderedTemplate\n  model._noTeddyBlocks = [] // will store code blocks exempt from teddy parsing\n\n  // express.js support\n  if (model.settings && model.settings.views && path) params.templateRoot = path.resolve(model.settings.views)\n\n  // caching is taken from the render options the way other templating engines (e.g. ejs and pug) take theirs, so that whoever is calling teddy decides\n  //\n  // an explicit `cache` option wins; otherwise express' own `view cache` setting is used, which express turns on in production and off in development, so an express app gets the right behavior without asking for it\n  if (typeof model.cache === 'boolean') params.cacheTemplates = model.cache\n  else if (model.settings && typeof model.settings['view cache'] === 'boolean') params.cacheTemplates = model.settings['view cache']\n\n  // remove templateRoot from template name if necessary\n  if (template.slice(params.templateRoot.length) === params.templateRoot) template = template.replace(params.templateRoot, '')\n\n  // whole template caching\n  const templateCache = templateCaches[template]\n  let cacheKey = null\n  let cacheKeyModelVal = null\n  if (templateCache) {\n    const singletonCache = templateCache.none\n    if (singletonCache) {\n      // an entry with no max age set never goes stale\n      if (!singletonCache.created) cacheKey = 'none'\n      else if (singletonCache.maxAge && singletonCache.created + singletonCache.maxAge < Date.now()) cacheKey = 'none' // it has gone stale, so render it again and keep the new markup\n      else {\n        if (typeof callback === 'function') return callback(null, singletonCache.markup)\n        else return singletonCache.markup\n      }\n    } else {\n      for (const key in templateCache) {\n        const modelVal = getOrSetObjectByDotNotation(model, key)\n        // the model says nothing about this key, so this render is not cached under it. saying zero, or an empty string, is still saying something\n        if (modelVal === false || modelVal === null || modelVal === undefined) continue\n\n        // the value names an entry, and the name of anything is a string: a number used as one becomes its own digits, so it has to be read back the same way it was written. searching the entries for it instead would cost as much as the cache is wide, and would never match a value that was not a string to begin with\n        cacheKeyModelVal = String(modelVal)\n        const templateCacheAtThisKey = templateCache[key]\n        const entry = templateCacheAtThisKey.entries[cacheKeyModelVal]\n        const maxAge = templateCacheAtThisKey.maxAge\n\n        // an entry with no max age set never goes stale\n        if (entry && (!maxAge || entry.created + maxAge >= Date.now())) {\n          if (typeof callback === 'function') return callback(null, entry.markup)\n          else return entry.markup\n        }\n\n        // either nothing is cached for this value yet or what was there has gone stale\n        cacheKey = key\n        break\n      }\n    }\n  }\n\n  // everything about a template that does not depend on the model is done once and kept together against the argument the caller passed, whether that was a name or the markup itself\n  //\n  // the entry is looked for before anything else happens, because reading the template and stripping its comments are template level work too\n  let prepared = compiledCache.get(template)\n  // a name may point at different markup than it did last time, so an entry keyed by one is only trusted on the same terms as the template source itself. an entry keyed by markup cannot go stale, because the key is the content\n  if (prepared && !prepared.keyIsMarkup && !prepared.precompiled && !params.cacheTemplates) prepared = undefined\n  if (!prepared) {\n    let source = loadTemplate(template)\n    // a name that resolves to nothing falls back to being rendered as though it were markup\n    if (source === null) source = template.slice(-5) === '.html' ? template.substring(0, template.length - 5) : template\n    prepared = prepareTemplate(template, source, template.includes('<'))\n  }\n  renderedTemplate = prepared.markup\n\n  // render from what the compiler worked out about this template: emitted javascript where that was possible, and a walk of the node tree otherwise. neither reparses the markup\n  const state = { values: [] }\n  renderedTemplate = prepared.render ? prepared.render(model, state) : compiler.renderNodes(prepared.nodes, model, state)\n\n  // replace <noteddy> blocks with the hidden code\n  for (const blockId in model._noTeddyBlocks) {\n    renderedTemplate = renderedTemplate.replace(`<noteddy id=\"${blockId}\"></noteddy>`, () => model._noTeddyBlocks[blockId])\n    renderedTemplate = renderedTemplate.replace(`<noteddy id=\"${blockId}\" pre=\"true\"></noteddy>`, () => model._noTeddyBlocks[blockId])\n  }\n\n  if (browser) {\n    // the renamed src and href attributes are put back as the markup leaves the dom now, so a render no longer sweeps its whole output for them\n    //\n    // what is left is the double encoding, which can still arrive in a value the model supplied rather than through the parser. asking whether there is any is far cheaper than rewriting a page that has none, and nearly every page has none\n    if (renderedTemplate.includes('&amp;')) renderedTemplate = reverseDoubleEncodedEntities(renderedTemplate)\n  }\n\n  // cache the template\n  if (cacheKey === 'none') {\n    templateCaches[template].none.markup = renderedTemplate\n    templateCaches[template].none.created = Date.now()\n  } else if (cacheKey) {\n    if (!templateCaches[template][cacheKey].entries[cacheKeyModelVal]) templateCaches[template][cacheKey].entries[cacheKeyModelVal] = {}\n    templateCaches[template][cacheKey].entries[cacheKeyModelVal].markup = renderedTemplate\n    templateCaches[template][cacheKey].entries[cacheKeyModelVal].created = Date.now()\n    // invalidate oldest cache if we've reached max caches limit\n    if (Object.keys(templateCaches[template][cacheKey].entries).length > templateCaches[template][cacheKey].maxCaches) {\n      const lowestKeyVal = Object.keys(templateCaches[template][cacheKey].entries).reduce((a, b) => templateCaches[template][cacheKey].entries[a].created < templateCaches[template][cacheKey].entries[b].created ? a : b)\n      delete templateCaches[template][cacheKey].entries[lowestKeyVal]\n    }\n  }\n\n  if (typeof callback === 'function') return callback(null, renderedTemplate)\n  else return renderedTemplate\n}\n\n// #endregion\n\n// writes a template out as the javascript teddy would otherwise have built for it at runtime, so that a browser can be handed the fast render rather than the slow one\n//\n// this runs where the emitter is, which is node: the returned string is an es module, meant to be written to a file at build time and loaded by the page that needs it. registerPrecompiled below is what the page then calls. nothing is built from a string at runtime, so a strict content security policy is satisfied\nconst PRECOMPILED_WRAPPERS = {\n  // for a bundler, for node's `import`, and for a browser's <script type=\"module\">\n  esm: body => `export default ${body}\\n`,\n\n  // for `require`, and for a bundler that would rather have commonjs\n  cjs: body => `module.exports = ${body}\\n`,\n\n  // for a plain <script src> with no module loader anywhere: the templates collect on one global, keyed by name, so that a page can load as many of them as it likes without them colliding\n  global: (body, name) => `;(function (root) {\\n  root.teddyPrecompiled = root.teddyPrecompiled || {}\\n  root.teddyPrecompiled[${JSON.stringify(name)}] = ${body}\\n})(typeof globalThis !== 'undefined' ? globalThis : this)\\n`\n}\n\nfunction precompile (template, options = {}) {\n  // the emitter is not in a browser build, so there would be nothing here to write out. saying so plainly beats reporting it as a template the emitter does not cover\n  if (browser) throw new Error('teddy: precompiling needs the code emitter, which browser builds do not carry. run teddy.precompile in node, at build time, and load what it writes with teddy.registerPrecompiled')\n  const format = options.format ?? 'esm'\n  const wrap = PRECOMPILED_WRAPPERS[format]\n  if (!wrap) throw new Error(`teddy: \"${format}\" is not a way teddy can write a precompiled template. it writes ${Object.keys(PRECOMPILED_WRAPPERS).join(', ')}`)\n  let source = loadTemplate(template)\n  if (source === null) source = template.slice(-5) === '.html' ? template.substring(0, template.length - 5) : template\n  const out = {}\n  prepareTemplate(template, source, template.includes('<'), out)\n  if (!out.emitted) throw new Error(`teddy: \"${template}\" holds something the emitter does not write code for, so it cannot be precompiled. it still renders by walking its node tree`)\n  const body = `{\n  format: ${FORMAT},\n  name: ${JSON.stringify(template)},\n  data: ${JSON.stringify(encode(out.emitted.data))},\n  render: function (m, r, s) {\n${out.emitted.source}\n  }\n}`\n  return `// teddy precompiled template: ${template}\n// generated: do not edit. rebuild this by running teddy.precompile() against the template again\n${wrap(body, template)}`\n}\n\n// takes what precompile wrote and renders with it from here on, in place of compiling the template\nfunction registerPrecompiled (artifact) {\n  if (!artifact || typeof artifact.render !== 'function') throw new Error('teddy: registerPrecompiled needs what teddy.precompile wrote')\n  if (artifact.format !== FORMAT) throw new Error(`teddy: this template was precompiled for teddy's format ${artifact.format}, and this teddy reads format ${FORMAT}. precompile it again`)\n  const data = decode(artifact.data, compiler.helpers.node)\n  const runtime = { ...compiler.helpers, ...data }\n  compiledCache.set(artifact.name, {\n    markup: '',\n    // there is no node tree behind a precompiled template: the emitted render is the only way it renders, and it is never the one that falls back to walking\n    nodes: null,\n    render: (model, state) => artifact.render(model, runtime, state),\n    keyIsMarkup: false,\n    precompiled: true\n  })\n  return artifact.name\n}\n\nexport default {\n  params,\n  caches,\n  templateCaches,\n\n  // functions\n  compile,\n  setDefaultParams,\n  setVerbosity,\n  setTemplateRoot,\n  setEmptyVarBehavior,\n  setIncludeNotFoundBehavior,\n  setCacheTemplates,\n  getTemplates,\n  setTemplate,\n  clearTemplates,\n  setCache,\n  clearCache,\n  render,\n  precompile,\n  registerPrecompiled,\n  __express: render\n}\n"],"names":["module","exports","trueFunc","falseFunc","reName","reEscape","actionTypes","Map","_types__WEBPACK_IMPORTED_MODULE_0__","AttributeAction","Element","Start","End","Any","Not","Hyphen","unpackPseudos","Set","isTraversal","selector","type","SelectorType","Adjacent","Child","Descendant","Parent","Sibling","ColumnCombinator","stripQuotesFromPseudos","funescape","_","escaped","escapedWhitespace","high","parseInt","String","fromCharCode","unescapeCSS","str","replace","isQuote","c","isWhitespace","parse","subselects","endIndex","parseSelector","length","Error","slice","selectorIndex","tokens","getName","offset","match","name","stripWhitespace","charCodeAt","readValueWithParenthesis","start","counter","isEscaped","pos","slashCount","ensureNotTraversal","addTraversal","push","addSpecialAttribute","action","Attribute","value","namespace","ignoreCase","finalizeSubselector","pop","loop","firstChar","Equals","startsWith","Exists","possibleAction","get","quote","sectionEnd","valueStart","forceIgnore","attributeSelector","PseudoElement","toLowerCase","data","has","quot","Pseudo","indexOf","test","Universal","Tag","IgnoreCaseMode","Unknown","QuirksMode","IgnoreCase","CaseSensitive","__WEBPACK_EXTERNAL_MODULE_fs__","__WEBPACK_EXTERNAL_MODULE_path__","EMITTABLE","canEmit","nodes","node","body","branch","arms","index","nameNodes","variants","variant","bindings","binding","armPaths","checkPaths","attrsVariants","emit","helpers","paths","state","locals","model","base","uid","flags","branches","branchIds","mergeWrites","walk","compiled","Function","runtime","source","render","renderState","LITERAL_WRITE","lines","target","pending","flush","JSON","stringify","line","split","write","exec","join","out","js","emitVar","chain","emitChain","consumed","emitArm","emitLoop","emitAttrs","emitScope","nodeRef","emitComputedVar","emitSelection","emitCache","emitDynamicInclude","access","path","keys","local","root","rest","setup","expr","found","map","key","plain","noparse","raw","hide","display","slow","dollar","quick","branchId","id","undefined","set","winner","emitPick","total","between","cursor","text","depth","settled","i","kind","armTest","repeat","arm","values","checks","bare","not","compare","inverted","wantsModel","attribs","some","includes","ref","marked","closeTag","acc","scope","outcomes","sets","conditional","conditionals","slots","outcomesNeedModel","variantNeedsModel","open","element","openNodes","mode","fallbackNodes","closing","lightNodes","hydrate","outerModel","outerBase","collection","val","keyName","valName","through","items","outerLocals","internalError","detail","warn","params","message","verbosity","console","TOKEN_CANDIDATES","SELECTION_ATTRS","STRUCTURAL","ARM_TAGS","ORPHANABLE","OPENERS","JOINERS","OUTCOMES","CONSTRUCTS","VALID_VARIABLE","LOOKS_LIKE_TEDDY","HAS_TEDDY_TAGS","NOTEDDY_PLACEHOLDER","VOID_ELEMENTS","UNPARSED_CONTENT","tagsOutsideUnparsedContent","tag","trimEnd","endsWith","close","RegExp","lastIndex","NEEDS_MODEL","Symbol","MAX_EMITTED_VARIANTS","QUICK_VALUE_STOP","MAX_VALUE_TEMPLATES","MAX_VALUE_DEPTH","createCompiler","deps","cheerioLoad","cheerioOptions","browser","variableFlags","formatVariable","escapeEntities","conditionPath","evaluateConditional","loadTemplate","caches","parseVars","getAttribs","getOrSetObjectByDotNotation","token","tokenFor","compileTemplate","stack","find","candidate","compileMarkup","compileSlotBody","slot","bodySource","lightSource","fallbackSource","makeNode","openTag","tagName","src","valueSource","ownValue","maxAge","maxCaches","css","reportStrayClosingTags","dom","applySelectionAttributes","outermost","Array","from","filter","el","hasConstructAncestor","claimed","tagNameOf","claimConditional","claimLoop","claimInclude","claimInline","claimCache","claimNoParse","claimPre","claimOneLineIf","sweepOrphanedTags","buildNodes","html","conditionChecks","pairs","rawName","rawValue","shapeIsOne","shapeIsPair","valuePresent","Object","settleCheck","check","result","settleChecks","first","second","collectChain","add","readAttribs","armNode","replaceWith","attribValue","current","ifTrue","ifFalse","argSources","args","dynamic","condition","replaceAll","removeAttr","oneLineArgs","splitTag","CUSTOM_ELEMENT_NAME","COMPONENT_ATTRIBUTES","COMPONENT_MODES","FALLBACK_SLOT","UNPARSED","hasUnparsedAncestor","parent","parentNode","teddyTemplateHost","carriesParse","fallbackMarkup","markup","held","remove","stripped","readArgs","concat","included","includeNotFoundBehavior","passed","pushText","contents","child","toString","trim","Boolean","attr","childSelector","marker","inlineIncludes","candidates","claimSelectionCandidate","container","round","children","probe","rebuilt","keepTags","prototype","hasOwnProperty","call","splice","lastIndexOf","outer","inner","openTagFor","clean","outcome","parts","sibling","nextSibling","nodeName","carriesOneLineIf","Number","isInteger","pushTextNode","notFoundBody","literalFrom","computed","spanStart","valueTemplates","compileValue","isSelfContained","size","clear","renderValue","error","renderNodes","openBranch","winningArm","resolved","skipTemplateLiteralReplacement","writeValue","pickArm","attrsVariant","attrsOutcomes","rawBlock","inlineBlock","computedVariable","selectionMarked","cacheBlock","dynamicBody","bindArgs","scoped","componentPayload","renderLoop","writePlainValue","quickValue","isNaN","slowValue","written","needsAnotherLook","valueSets","all","sent","json","localModel","create","_noTeddyBlocks","own","armMatches","isFirst","conditionArgs","conditionCheckPaths","resolveValues","loopWalk","needsKey","isArray","iterable","loopCollection","loopScope","renderBody","keySource","keyVal","existing","entry","entries","now","Date","lastAccessed","stamp","created","reduce","a","b","format","pick","needs","present","bind","payload","inline","cache","getDocumentRoot","groupSelectors","selectors","filteredSelectors","plainSelectors","_positionals_js__WEBPACK_IMPORTED_MODULE_0__","isFilter","UNIVERSAL_SELECTOR","css_what__WEBPACK_IMPORTED_MODULE_0__","SCOPE_PSEUDO","is","options","elements","filtered","_helpers_js__WEBPACK_IMPORTED_MODULE_9__","css_what__WEBPACK_IMPORTED_MODULE_1__","css_select__WEBPACK_IMPORTED_MODULE_2__","_compileToken","sel","filterBySelector","filterByPosition","elems","num","NaN","isFinite","Math","abs","filterParsed","e","filterElements","filteredSelector","missing","domutils__WEBPACK_IMPORTED_MODULE_5__","isTag","forEach","_a","opts","context","relativeSelector","findFilterElements","select","limit","Infinity","results","findElements","domutils__WEBPACK_IMPORTED_MODULE_7__","uniqueSort","queryForSelector","totalLimit","filterIndex","findIndex","_positionals_js__WEBPACK_IMPORTED_MODULE_10__","sub","partLimit","getLimit","elemsNoLimit","domutils__WEBPACK_IMPORTED_MODULE_4__","getChildren","remainingSelector","remainingHasTraversal","prepareContext","domutils__WEBPACK_IMPORTED_MODULE_3__","unshift","rootFunc","boolbase__WEBPACK_IMPORTED_MODULE_8__","query","shouldTestNextSiblings","domutils__WEBPACK_IMPORTED_MODULE_6__","els","filterNames","s","min","hasOwn","object","prop","rspace","dataAttrPrefix","rboolean","rbrace","getAttr","elem","xmlMode","domhandler__WEBPACK_IMPORTED_MODULE_2__","_static_js__WEBPACK_IMPORTED_MODULE_0__","setAttr","removeAttribute","_utils_js__WEBPACK_IMPORTED_MODULE_1__","domEach","this","objName","objValue","arguments","getProp","setProp","property","toUpperCase","URL","baseURI","href","innerText","textContent","htmlparser2__WEBPACK_IMPORTED_MODULE_4__","Root","clone","wrap","TypeError","setData","assign","readAllData","domName","jsName","camelCase","parseDataValue","readData","cssCase","dataEl","querying","option","toArray","splitNames","names","attrNames","attrName","hasClass","className","clazz","idx","end","addClass","classNames","numElements","setClass","cn","appendClass","removeClass","classes","numClasses","removeAll","elClasses","changed","j","toggleClass","stateVal","elementClasses","_utils_js__WEBPACK_IMPORTED_MODULE_0__","domhandler__WEBPACK_IMPORTED_MODULE_1__","setCss","getCss","styles","k","newStyles","item","obj","n","trimmed","getExtractDescr","descr","extract","ret","fn","_make","_findBySelector","POSITIVE_INFINITY","$","submittableSelector","r20","rCRLF","serialize","arr","serializeArray","retArr","encodeURIComponent","$elem","domhandler__WEBPACK_IMPORTED_MODULE_0__","_makeDomArray","_parse","cloneNode","_insert","concatenator","lastIdx","_utils_js__WEBPACK_IMPORTED_MODULE_3__","hasChildren","domSrc","_render","uniqueSplice","array","spliceIdx","spliceCount","newElems","_b","spliceArgs","prev","next","oldParent","oldSiblings","prevIdx","appendTo","appendTarget","isCheerio","append","prependTo","prependTarget","prepend","_wrap","insert","wrapper","lastParent","parents","last","isHtml","wrapperDom","elInsertLocation","siblings","_parse_js__WEBPACK_IMPORTED_MODULE_1__","update","wrapInner","unwrap","each","wrapAll","insertBefore","htmlparser2__WEBPACK_IMPORTED_MODULE_5__","after","insertAfter","clones","clonedSelf","before","targetArr","removeElement","content","cont","empty","_static_js__WEBPACK_IMPORTED_MODULE_2__","textNode","Text","Document","reContextSelector","selectorOrHaystack","haystack","_utils_js__WEBPACK_IMPORTED_MODULE_2__","_static_js__WEBPACK_IMPORTED_MODULE_3__","contains","_root","lowerCaseTags","lowerCaseAttributeNames","pseudos","quirksMode","cheerio_select__WEBPACK_IMPORTED_MODULE_1__","_getMatcher","matchMap","postFns","matched","filterArray","_matcher","_singleMatcher","_matchUntil","nextElem","matches","innerMatcher","filterSelector","getFilterFn","_removeDuplicates","isDocument","reverse","parentsUntil","closest","selectOpts","selectFn","nextElementSibling","nextAll","nextUntil","prevElementSibling","prevAll","prevUntil","getSiblings","len","filterFn","eq","selectorOrNeedle","$haystack","needle","prevObject","other","selection","addBack","Cheerio","constructor","cheerio","iterator","_api_attributes_js__WEBPACK_IMPORTED_MODULE_0__","_api_traversing_js__WEBPACK_IMPORTED_MODULE_1__","_api_manipulation_js__WEBPACK_IMPORTED_MODULE_2__","_api_css_js__WEBPACK_IMPORTED_MODULE_3__","_api_forms_js__WEBPACK_IMPORTED_MODULE_4__","_api_extract_js__WEBPACK_IMPORTED_MODULE_5__","getLoad","load","internalOpts","_options_js__WEBPACK_IMPORTED_MODULE_0__","flattenOptions","initialRoot","LoadedCheerio","_cheerio_js__WEBPACK_IMPORTED_MODULE_2__","initialize","r","rootInstance","isNode","instance","search","searchContext","_static_js__WEBPACK_IMPORTED_MODULE_1__","_options","Comment","defaultOpts","_useHtmlParser2","baseOptions","xml","getParse","parser","Buffer","isBuffer","doc","newChilds","domutils__WEBPACK_IMPORTED_MODULE_0__","_load_js__WEBPACK_IMPORTED_MODULE_0__","htmlparser2__WEBPACK_IMPORTED_MODULE_3__","parseDocument","dom_serializer__WEBPACK_IMPORTED_MODULE_2__","that","isOptions","toRender","_options_js__WEBPACK_IMPORTED_MODULE_1__","parseHTML","keepScripts","parsed","contained","merge","arr1","arr2","isArrayLike","newLength","maybeCheerio","x","CharacterCode","tagStart","tagChar","LowerA","LowerZ","UpperA","UpperZ","Exclamation","reChars","escapeRegex","caseInsensitiveAttributes","shouldIgnoreCase","attributeRules","equals","adapter","getAttributeValue","hyphen","charAt","substr","boolbase__WEBPACK_IMPORTED_MODULE_0__","regex","exists","hasAttrib","any","compile","compileUnsafe","_pseudo_selectors_subselects_js__WEBPACK_IMPORTED_MODULE_5__","ensureIsTag","compileToken","includesScopePseudo","t","DESCENDANT_TOKEN","FLEXIBLE_DESCENDANT_TOKEN","SCOPE_TOKEN","absolutize","hasContext","every","getParent","PLACEHOLDER_ELEMENT","_sort_js__WEBPACK_IMPORTED_MODULE_3__","isArrayContext","finalContext","rules","compileRules","reduceRules","boolbase__WEBPACK_IMPORTED_MODULE_2__","previous","rule","_general_js__WEBPACK_IMPORTED_MODULE_4__","compileGeneralSelector","getElementParent","css_what__WEBPACK_IMPORTED_MODULE_2__","_attributes_js__WEBPACK_IMPORTED_MODULE_0__","_pseudo_selectors_index_js__WEBPACK_IMPORTED_MODULE_1__","compilePseudoSelector","cacheResults","WeakSet","isFalseCache","currentSibling","lastElement","defaultEquals","defaultOptions","convertOptionFormats","_c","_d","wrapCompile","func","_compile_js__WEBPACK_IMPORTED_MODULE_2__","_compileUnsafe","getSelectorFunc","searchFunc","filteredElements","appendNextSiblings","removeSubsets","elemsLength","nextSiblings","_pseudo_selectors_subselects_js__WEBPACK_IMPORTED_MODULE_3__","getNextSiblings","selectAll","boolbase__WEBPACK_IMPORTED_MODULE_1__","findAll","selectOne","findOne","__WEBPACK_DEFAULT_EXPORT__","aliases","link","disabled","enabled","checked","required","optional","selected","checkbox","file","password","radio","reset","image","submit","header","button","input","getChildFunc","filters","getText","icontains","itext","nth_check__WEBPACK_IMPORTED_MODULE_0__","_rule","hover","dynamicStatePseudo","visited","active","_subselects_js__WEBPACK_IMPORTED_MODULE_4__","userPseudo","stringPseudo","_aliases_js__WEBPACK_IMPORTED_MODULE_3__","alias","_pseudos_js__WEBPACK_IMPORTED_MODULE_2__","verifyPseudoArgs","_filters_js__WEBPACK_IMPORTED_MODULE_1__","pseudo","firstChild","elemName","subselect","argIndex","elemIndex","copyOptions","where","_context","_sort_js__WEBPACK_IMPORTED_MODULE_1__","hasElement","childs","nextElements","existsOne","procedure","attributes","sortByProcedure","procs","getProcedure","procNew","proc","d","elementNames","attributeNames","unencodedElements","replaceQuotes","formatAttributes","encode","encodeEntities","decodeEntities","entities__WEBPACK_IMPORTED_MODULE_1__","encodeXML","escapeAttribute","_foreignNames_js__WEBPACK_IMPORTED_MODULE_2__","emptyAttrs","singleTag","output","renderNode","domelementtype__WEBPACK_IMPORTED_MODULE_0__","Doctype","Directive","renderDirective","renderComment","CDATA","renderCdata","Script","Style","renderTag","renderText","foreignModeIntegrationPoints","foreignElements","selfClosingTags","escapeText","ElementType","withStartIndices","withEndIndices","DomHandler","callback","elementCB","_node_js__WEBPACK_IMPORTED_MODULE_1__","done","tagStack","lastNode","onparserinit","onreset","onend","handleCallback","onerror","onclosetag","onopentag","addNode","ontext","oncomment","oncommentend","oncdatastart","oncdataend","onprocessinginstruction","ProcessingInstruction","previousSibling","startIndex","Node","recursive","DataNode","super","nodeValue","nodeType","NodeWithChildren","lastChild","childNodes","prefix","isCDATA","isText","isComment","isDirective","cloneChildren","instruction","sourceCodeLocation","getFeed","feedRoot","getOneElement","isValidFeed","getAtomFeed","getRssFeed","feed","_legacy_js__WEBPACK_IMPORTED_MODULE_1__","getElementsByTagName","media","getMediaElements","addConditionally","description","fetch","pubDate","updated","MEDIA_KEYS_STRING","MEDIA_KEYS_INT","medium","isDefault","attrib","expression","recurse","_stringify_js__WEBPACK_IMPORTED_MODULE_0__","ancestor","DocumentPosition","compareDocumentPosition","nodeA","nodeB","aParents","bParents","maxIdx","DISCONNECTED","sharedParent","aSibling","bSibling","FOLLOWING","CONTAINED_BY","PRECEDING","CONTAINS","sort","relative","Checks","tag_name","tag_type","tag_contains","getAttribCheck","combineFuncs","compileTest","funcs","testElement","getElements","_querying_js__WEBPACK_IMPORTED_MODULE_1__","getElementById","getElementsByClassName","getElementsByTagType","childsIndex","replaceElement","replacement","appendChild","currNext","prependChild","nodeStack","indexStack","shift","findOneChild","searchedNodes","getOuterHTML","dom_serializer__WEBPACK_IMPORTED_MODULE_1__","getInnerHTML","domelementtype__WEBPACK_IMPORTED_MODULE_2__","xmlReplacer","xmlCodeMap","getCodePoint","codePointAt","char","substring","escape","getEscaper","escapeUTF8","formTags","pTag","tableSectionTags","ddtTags","rtpTags","openImpliesClose","voidElements","foreignContextElements","htmlIntegrationElements","reNameEnd","Parser","cbs","_e","_f","openTagStart","tagname","attribname","attribvalue","buffers","bufferOffset","writeIndex","ended","htmlMode","lowerCaseTagNames","recognizeSelfClosing","tokenizer","Tokenizer","_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__","foreignContext","getSlice","ontextentity","cp","entities_decode__WEBPACK_IMPORTED_MODULE_1__","fromCodePoint","isVoidElement","onopentagname","emitOpenTag","impliesClose","endOpenTag","isImplied","onopentagend","_g","_h","closeCurrentTag","onselfclosingtag","isOpenImplied","onattribname","onattribdata","onattribentity","onattribend","onattribute","QuoteType","Double","Single","NoValue","getInstructionName","ondeclaration","oncdata","_j","_k","recognizeCDATA","parseComplete","shiftBuffer","chunk","running","pause","resume","parseChunk","CharCodes","State","Space","NewLine","Tab","FormFeed","CarriageReturn","isEndOfTagSection","Slash","Gt","isASCIIAlpha","Sequences","Cdata","Uint8Array","CdataEnd","CommentEnd","ScriptEnd","StyleEnd","TitleEnd","TextareaEnd","XmpEnd","buffer","sectionStart","entityStart","baseState","isSpecial","currentSequence","sequenceIndex","entityDecoder","entities_decode__WEBPACK_IMPORTED_MODULE_0__","EntityDecoder","entities_decode__WEBPACK_IMPORTED_MODULE_2__","xmlDecodeTree","htmlDecodeTree","emitCodePoint","finish","stateText","Lt","fastForwardTo","BeforeTagName","Amp","startEntity","stateSpecialStartSequence","isEnd","isMatch","InTagName","stateInTagName","stateInSpecialTag","endOfText","actualIndex","stateInClosingTagName","stateCDATASequence","InCommentLike","InDeclaration","stateInDeclaration","stateInCommentLike","isTagStartChar","startSpecial","sequence","SpecialStartSequence","stateBeforeTagName","ExclamationMark","BeforeDeclaration","Questionmark","InProcessingInstruction","lower","BeforeSpecialS","BeforeSpecialT","BeforeClosingTagName","BeforeAttributeName","stateBeforeAttributeName","stateBeforeClosingTagName","InClosingTagName","InSpecialComment","AfterClosingTagName","stateAfterClosingTagName","InSpecialTag","InSelfClosingTag","InAttributeName","stateInSelfClosingTag","stateInAttributeName","Eq","AfterAttributeName","stateAfterAttributeName","BeforeAttributeValue","stateBeforeAttributeValue","DoubleQuote","InAttributeValueDq","SingleQuote","InAttributeValueSq","InAttributeValueNq","stateInAttributeValueNoQuotes","handleInAttributeValue","stateInAttributeValueDoubleQuotes","stateInAttributeValueSingleQuotes","Unquoted","stateBeforeDeclaration","OpeningSquareBracket","CDATASequence","Dash","BeforeComment","stateInProcessingInstruction","stateBeforeComment","stateInSpecialComment","stateBeforeSpecialS","stateBeforeSpecialT","InEntity","DecodingMode","Strict","Legacy","stateInEntity","indexInBuffer","cleanup","shouldContinue","handleTrailingData","handler","_Parser_js__WEBPACK_IMPORTED_MODULE_0__","parseDOM","createDocumentStream","elementCallback","createDomStream","parseFeedDefaultOptions","parseFeed","decodeMap","codePoint","replaceCodePoint","decodeCodePoint","TO_LOWER_BIT","isNumber","code","ZERO","NINE","isHexadecimalCharacter","UPPER_A","UPPER_F","LOWER_A","LOWER_F","isAsciiAlphaNumeric","UPPER_Z","LOWER_Z","isEntityInAttributeInvalidEnd","EQUALS","EntityDecoderState","decodeTree","errors","EntityStart","treeIndex","excess","decodeMode","runConsumed","NUM","NumericStart","stateNumericStart","NamedEntity","stateNamedEntity","NumericDecimal","stateNumericDecimal","NumericHex","stateNumericHex","LOWER_X","digit","emitNumericEntity","lastCp","expectedLength","absenceOfDigitsInNumericCharacterReference","SEMI","_decode_codepoint_js__WEBPACK_IMPORTED_MODULE_0__","missingSemicolonAfterCharacterReference","validateNumericCharacterReference","valueLength","_internal_bin_trie_flags_js__WEBPACK_IMPORTED_MODULE_3__","BinTrieFlags","VALUE_LENGTH","FLAG13","runLength","BRANCH_LENGTH","JUMP_TABLE","emitNotTerminatedNamedEntity","charIndexInPacked","packedWord","expectedChar","emitNamedEntityData","determineBranch","max","getDecoder","returnValue","decoder","nodeIndex","branchCount","jumpOffset","packedKeySlots","lo","hi","mid","packed","midKey","htmlDecoder","_generated_decode_data_html_js__WEBPACK_IMPORTED_MODULE_1__","xmlDecoder","_generated_decode_data_xml_js__WEBPACK_IMPORTED_MODULE_2__","decodeHTML","htmlString","decodeHTMLAttribute","htmlAttribute","decodeHTMLStrict","decodeXML","xmlString","_internal_decode_shared_js__WEBPACK_IMPORTED_MODULE_0__","decodeBase64","binary","atob","evenLength","Uint16Array","outIndex","absA","bMod","generate","aPos","minValue","ceil","nthCheck","formula","whitespace","sign","readSign","number","readNumber","skipWhitespace","FORMAT","REF","MAP","UNDEFINED","NODE_TYPES","table","places","seen","place","v","$n","decode","encoded","built","fill","read","at","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","o","defineProperty","enumerable","toStringTag","cheerio_slim__WEBPACK_IMPORTED_MODULE_2__","isCheerioPolyfill","setDefaultParams","templates","fileCache","compiledCache","maxCompiledCache","varPatterns","varPattern","pattern","templateCaches","template","removeTeddyComments","withExtension","cacheTemplates","fs__WEBPACK_IMPORTED_MODULE_0__","readFileSync","templateRoot","renderedTemplate","oldTemplate","vars","matchByDelimiter","firstMatch","getFirstMatchByDelimiters","newContent","conditions","conditionsLength","evaluateCondition","cond","lookup","templateString","originalMatch","resolveVariable","lastSixChars","flagCount","emptyVarBehavior","escapeHtmlEntities","escapeHtmlEntitiesByCode","character","needsEscaping","copiedTo","reverseDoubleEncodedEntities","openDelimiter","closeDelimiter","openLength","closeLength","delimiters","openers","closers","delimiter","currentlyOpenBrackets","currentDelimiter","charIndex","delimiterIndex","opener","openerLength","closer","closerLength","dotNotation","lowerCaseKey","caseInsensitiveLookup","ownFound","inherited","inheritedFound","attributesObject","setVerbosity","setTemplateRoot","setEmptyVarBehavior","setIncludeNotFoundBehavior","setCacheTemplates","getTemplates","compiler","_compiler_js__WEBPACK_IMPORTED_MODULE_3__","prepareTemplate","cacheKey","keyIsMarkup","emittedOut","keep","prepared","attrRegex","attrMap","count","processedAttributes","attrMatch","attrValue","newAttrName","_codegen_js__WEBPACK_IMPORTED_MODULE_4__","emitted","err","setTemplate","delete","clearTemplates","setCache","maxage","maxcaches","none","clearCache","settings","views","path__WEBPACK_IMPORTED_MODULE_1__","resolve","templateCache","cacheKeyModelVal","singletonCache","modelVal","templateCacheAtThisKey","precompiled","blockId","lowestKeyVal","PRECOMPILED_WRAPPERS","esm","cjs","global","precompile","_precompiled_js__WEBPACK_IMPORTED_MODULE_5__","registerPrecompiled","artifact","__express"],"sourceRoot":""}