From ff94918ddc2b29a5f6f4d0e2812034827b0516dd Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 3 Sep 2026 08:31:05 -0700 Subject: [PATCH] Stabilize bundled parser generation Use exact-pinned esbuild so the committed bundle is reproducible across CI runners, generate and ship complete dependency licenses, keep the bundle under a size ceiling, and route degraded scans through the shared operational-failure exit handling. AI assistance: Codex audited PR #693 and implemented this hardening. --- NOTICE.md | 10 +- bun.lock | 55 + cli/engine/cli/main.mjs | 7 +- .../engines/static-html/detect-html.mjs | 8 +- .../vendor/static-html-parsers.LICENSES.txt | 233 + cli/engine/vendor/static-html-parsers.mjs | 9592 +---------------- package.json | 1 + scripts/build-static-html-parsers.js | 132 +- tests/lib/detector-bundle.test.js | 77 +- 9 files changed, 475 insertions(+), 9640 deletions(-) create mode 100644 cli/engine/vendor/static-html-parsers.LICENSES.txt diff --git a/NOTICE.md b/NOTICE.md index 83ff3f664..2da92a10e 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -12,12 +12,4 @@ The `skill/reference/ios.md` and `skill/reference/android.md` platform reference ## Static HTML parser bundle -`cli/engine/vendor/static-html-parsers.mjs` is a generated bundle of the parser packages the static-HTML detector needs at runtime. Skill and plugin installs copy that file with the detector; they do not install these packages from npm. - -| Package | License | -|---|---| -| htmlparser2 | MIT | -| css-select | BSD-2-Clause | -| css-tree | MIT | -| domutils | BSD-2-Clause | -| source-map-js (via css-tree) | BSD-3-Clause | +`cli/engine/vendor/static-html-parsers.mjs` is a generated bundle of the parser packages the static-HTML detector needs at runtime. Skill and plugin installs copy that file with the detector; they do not install these packages from npm. Complete copyright and license texts for every package included in the bundle ship beside it in `cli/engine/vendor/static-html-parsers.LICENSES.txt`. diff --git a/bun.lock b/bun.lock index 6d2390091..f5705f49d 100644 --- a/bun.lock +++ b/bun.lock @@ -21,6 +21,7 @@ "@babel/parser": "^8.0.4", "ai": "^7.0.14", "archiver": "^8.0.0", + "esbuild": "0.28.1", "playwright": "^1.59.1", "svelte": "^5", "zod": "^4.3.6", @@ -73,6 +74,58 @@ "@babel/types": ["@babel/types@8.0.4", "", { "dependencies": { "@babel/helper-string-parser": "^8.0.0", "@babel/helper-validator-identifier": "^8.0.4" } }, "sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g=="], + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.1", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.1", "", { "os": "android", "cpu": "arm" }, "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.1", "", { "os": "android", "cpu": "arm64" }, "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.1", "", { "os": "android", "cpu": "x64" }, "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.1", "", { "os": "linux", "cpu": "arm" }, "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.1", "", { "os": "linux", "cpu": "ia32" }, "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.1", "", { "os": "linux", "cpu": "x64" }, "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.1", "", { "os": "none", "cpu": "x64" }, "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.1", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.1", "", { "os": "sunos", "cpu": "x64" }, "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.1", "", { "os": "win32", "cpu": "x64" }, "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A=="], + "@hono/node-server": ["@hono/node-server@1.19.14", "", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="], "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], @@ -225,6 +278,8 @@ "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], + "esbuild": ["esbuild@0.28.1", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.1", "@esbuild/android-arm": "0.28.1", "@esbuild/android-arm64": "0.28.1", "@esbuild/android-x64": "0.28.1", "@esbuild/darwin-arm64": "0.28.1", "@esbuild/darwin-x64": "0.28.1", "@esbuild/freebsd-arm64": "0.28.1", "@esbuild/freebsd-x64": "0.28.1", "@esbuild/linux-arm": "0.28.1", "@esbuild/linux-arm64": "0.28.1", "@esbuild/linux-ia32": "0.28.1", "@esbuild/linux-loong64": "0.28.1", "@esbuild/linux-mips64el": "0.28.1", "@esbuild/linux-ppc64": "0.28.1", "@esbuild/linux-riscv64": "0.28.1", "@esbuild/linux-s390x": "0.28.1", "@esbuild/linux-x64": "0.28.1", "@esbuild/netbsd-arm64": "0.28.1", "@esbuild/netbsd-x64": "0.28.1", "@esbuild/openbsd-arm64": "0.28.1", "@esbuild/openbsd-x64": "0.28.1", "@esbuild/openharmony-arm64": "0.28.1", "@esbuild/sunos-x64": "0.28.1", "@esbuild/win32-arm64": "0.28.1", "@esbuild/win32-ia32": "0.28.1", "@esbuild/win32-x64": "0.28.1" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw=="], + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], diff --git a/cli/engine/cli/main.mjs b/cli/engine/cli/main.mjs index 663b7e860..28bcef272 100644 --- a/cli/engine/cli/main.mjs +++ b/cli/engine/cli/main.mjs @@ -297,7 +297,11 @@ async function detectCli() { // apply by default. `--no-config` (raw scan) and the dedicated // `--no-inline-ignores` both turn them off. const inlineIgnoresEnabled = configEnabled && !args.includes('--no-inline-ignores'); - const baseScanOptions = { inlineIgnores: inlineIgnoresEnabled }; + let hadOperationalFailure = false; + const baseScanOptions = { + inlineIgnores: inlineIgnoresEnabled, + onOperationalFailure: () => { hadOperationalFailure = true; }, + }; if (viewport) baseScanOptions.viewport = viewport; // DESIGN.md must resolve from EACH scan target's own project root, not from // process.cwd(): scanning project B's files from inside project A applied A's @@ -315,7 +319,6 @@ async function detectCli() { if (helpMode) { printUsage(); process.exit(0); } let allFindings = []; - let hadOperationalFailure = false; const reportLocalScanFailure = (target, error) => { hadOperationalFailure = true; process.stderr.write(`Error: cannot scan ${target}: ${error.message}\n`); diff --git a/cli/engine/engines/static-html/detect-html.mjs b/cli/engine/engines/static-html/detect-html.mjs index a65827970..2ddac17ba 100644 --- a/cli/engine/engines/static-html/detect-html.mjs +++ b/cli/engine/engines/static-html/detect-html.mjs @@ -133,7 +133,13 @@ async function detectHtml(filePath, options = {}) { 'contrast are NOT evaluated; findings are an undercount, not a clean bill of health.\n', ); } - globalThis.__impeccableStaticHtmlDegraded = true; + if (typeof options.onOperationalFailure === 'function') { + options.onOperationalFailure({ + engine: 'static-html', + reason: 'parser-bundle-unavailable', + target: filePath, + }); + } return detectText(html, filePath, options); } diff --git a/cli/engine/vendor/static-html-parsers.LICENSES.txt b/cli/engine/vendor/static-html-parsers.LICENSES.txt new file mode 100644 index 000000000..c7e4eb11e --- /dev/null +++ b/cli/engine/vendor/static-html-parsers.LICENSES.txt @@ -0,0 +1,233 @@ +Static HTML parser bundle: third-party licenses +Generated by scripts/build-static-html-parsers.js. Do not edit. + +Package: boolbase@2.0.0 +License: ISC + +Copyright (c) 2014-2015, Felix Boehm + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------------ + +Package: css-select@7.0.0 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: css-tree@3.2.1 +License: MIT + +Copyright (C) 2016-2026 by Roman Dvornov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------------ + +Package: css-what@8.0.0 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: dom-serializer@3.1.1 +License: MIT + +Copyright © 2022 The Cheerio contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------ + +Package: domelementtype@3.0.0 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: domhandler@6.0.1 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: domutils@4.0.2 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: entities@8.0.0 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: htmlparser2@12.0.0 +License: MIT + +Copyright 2010, 2011, Chris Winberry . All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +------------------------------------------------------------------------ + +Package: nth-check@3.0.1 +License: BSD-2-Clause + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------ + +Package: source-map-js@1.2.1 +License: BSD-3-Clause + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cli/engine/vendor/static-html-parsers.mjs b/cli/engine/vendor/static-html-parsers.mjs index 910475d96..b8c0a19a8 100644 --- a/cli/engine/vendor/static-html-parsers.mjs +++ b/cli/engine/vendor/static-html-parsers.mjs @@ -3,9589 +3,17 @@ * Rebuild: node scripts/build-static-html-parsers.js * * Bundles htmlparser2, css-select, css-tree, and domutils for skill/plugin installs. - * Third-party licenses: see NOTICE.md. + * Third-party licenses: see static-html-parsers.LICENSES.txt. */ -var __defProp = Object.defineProperty; -var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); -var __returnValue = (v) => v; -function __exportSetter(name, newValue) { - this[name] = __returnValue.bind(null, newValue); -} -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { - get: all[name], - enumerable: true, - configurable: true, - set: __exportSetter.bind(all, name) - }); -}; - -// node_modules/source-map-js/lib/base64.js -var require_base64 = __commonJS((exports) => { - var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); - exports.encode = function(number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - exports.decode = function(charCode) { - var bigA = 65; - var bigZ = 90; - var littleA = 97; - var littleZ = 122; - var zero = 48; - var nine = 57; - var plus = 43; - var slash = 47; - var littleOffset = 26; - var numberOffset = 52; - if (bigA <= charCode && charCode <= bigZ) { - return charCode - bigA; - } - if (littleA <= charCode && charCode <= littleZ) { - return charCode - littleA + littleOffset; - } - if (zero <= charCode && charCode <= nine) { - return charCode - zero + numberOffset; - } - if (charCode == plus) { - return 62; - } - if (charCode == slash) { - return 63; - } - return -1; - }; -}); - -// node_modules/source-map-js/lib/base64-vlq.js -var require_base64_vlq = __commonJS((exports) => { - var base64 = require_base64(); - var VLQ_BASE_SHIFT = 5; - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - var VLQ_BASE_MASK = VLQ_BASE - 1; - var VLQ_CONTINUATION_BIT = VLQ_BASE; - function toVLQSigned(aValue) { - return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; - } - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative ? -shifted : shifted; - } - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - var vlq = toVLQSigned(aValue); - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - return encoded; - }; - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; -}); - -// node_modules/source-map-js/lib/util.js -var require_util = __commonJS((exports) => { - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - function urlGenerate(aParsedUrl) { - var url = ""; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ":"; - } - url += "//"; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + "@"; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - var MAX_CACHED_INPUTS = 32; - function lruMemoize(f) { - var cache = []; - return function(input) { - for (var i = 0;i < cache.length; i++) { - if (cache[i].input === input) { - var temp = cache[0]; - cache[0] = cache[i]; - cache[i] = temp; - return cache[0].result; - } - } - var result = f(input); - cache.unshift({ - input, - result - }); - if (cache.length > MAX_CACHED_INPUTS) { - cache.pop(); - } - return result; - }; - } - var normalize = lruMemoize(function normalize2(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - var parts = []; - var start = 0; - var i = 0; - while (true) { - start = i; - i = path.indexOf("/", start); - if (i === -1) { - parts.push(path.slice(start)); - break; - } else { - parts.push(path.slice(start, i)); - while (i < path.length && path[i] === "/") { - i++; - } - } - } - for (var part, up = 0, i = parts.length - 1;i >= 0; i--) { - part = parts[i]; - if (part === ".") { - parts.splice(i, 1); - } else if (part === "..") { - up++; - } else if (up > 0) { - if (part === "") { - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join("/"); - if (path === "") { - path = isAbsolute ? "/" : "."; - } - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - }); - exports.normalize = normalize; - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || "/"; - } - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - exports.isAbsolute = function(aPath) { - return aPath.charAt(0) === "/" || urlRegexp.test(aPath); - }; - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - aRoot = aRoot.replace(/\/$/, ""); - var level = 0; - while (aPath.indexOf(aRoot + "/") !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - ++level; - } - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - var supportsNullProto = function() { - var obj = Object.create(null); - return !("__proto__" in obj); - }(); - function identity(s) { - return s; - } - function toSetString(aStr) { - if (isProtoString(aStr)) { - return "$" + aStr; - } - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - function isProtoString(s) { - if (!s) { - return false; - } - var length = s.length; - if (length < 9) { - return false; - } - if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { - return false; - } - for (var i = length - 10;i >= 0; i--) { - if (s.charCodeAt(i) !== 36) { - return false; - } - } - return true; - } - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - if (aStr1 === null) { - return 1; - } - if (aStr2 === null) { - return -1; - } - if (aStr1 > aStr2) { - return 1; - } - return -1; - } - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); - } - exports.parseSourceMapInput = parseSourceMapInput; - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ""; - if (sourceRoot) { - if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { - sourceRoot += "/"; - } - sourceURL = sourceRoot + sourceURL; - } - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - var index = parsed.path.lastIndexOf("/"); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; -}); - -// node_modules/source-map-js/lib/array-set.js -var require_array_set = __commonJS((exports) => { - var util = require_util(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map : Object.create(null); - } - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet; - for (var i = 0, len = aArray.length;i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error("No element indexed by " + aIdx); - }; - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - exports.ArraySet = ArraySet; -}); - -// node_modules/source-map-js/lib/mapping-list.js -var require_mapping_list = __commonJS((exports) => { - var util = require_util(); - function generatedPositionAfter(mappingA, mappingB) { - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - function MappingList() { - this._array = []; - this._sorted = true; - this._last = { generatedLine: -1, generatedColumn: 0 }; - } - MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - exports.MappingList = MappingList; -}); - -// node_modules/htmlparser2/dist/index.js -var exports_dist3 = {}; -__export(exports_dist3, { - parseFeed: () => parseFeed, - parseDocument: () => parseDocument, - getFeed: () => getFeed, - createDocumentStream: () => createDocumentStream, - Tokenizer: () => Tokenizer, - QuoteType: () => QuoteType, - Parser: () => Parser, - ElementType: () => exports_dist, - DomUtils: () => exports_dist2, - DomHandler: () => DomHandler, - DefaultHandler: () => DomHandler -}); - -// node_modules/entities/dist/decode-codepoint.js -var decodeMap = new Map([ - [0, 65533], - [128, 8364], - [130, 8218], - [131, 402], - [132, 8222], - [133, 8230], - [134, 8224], - [135, 8225], - [136, 710], - [137, 8240], - [138, 352], - [139, 8249], - [140, 338], - [142, 381], - [145, 8216], - [146, 8217], - [147, 8220], - [148, 8221], - [149, 8226], - [150, 8211], - [151, 8212], - [152, 732], - [153, 8482], - [154, 353], - [155, 8250], - [156, 339], - [158, 382], - [159, 376] -]); -function replaceCodePoint(codePoint) { - if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { - return 65533; - } - return decodeMap.get(codePoint) ?? codePoint; -} - -// node_modules/entities/dist/internal/decode-shared.js -function decodeBase64(input) { - const binary = atob(input); - const evenLength = binary.length & ~1; - const out = new Uint16Array(evenLength / 2); - for (let index = 0, outIndex = 0;index < evenLength; index += 2) { - const lo = binary.charCodeAt(index); - const hi = binary.charCodeAt(index + 1); - out[outIndex++] = lo | hi << 8; - } - return out; -} - -// node_modules/entities/dist/generated/decode-data-html.js -var htmlDecodeTree = /* @__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAt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WxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"); - -// node_modules/entities/dist/generated/decode-data-xml.js -var xmlDecodeTree = /* @__PURE__ */ decodeBase64("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"); - -// node_modules/entities/dist/internal/bin-trie-flags.js -var BinTrieFlags; -(function(BinTrieFlags2) { - BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; - BinTrieFlags2[BinTrieFlags2["FLAG13"] = 8192] = "FLAG13"; - BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH"; - BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE"; -})(BinTrieFlags || (BinTrieFlags = {})); - -// node_modules/entities/dist/decode.js -var CharCodes; -(function(CharCodes2) { - CharCodes2[CharCodes2["NUM"] = 35] = "NUM"; - CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI"; - CharCodes2[CharCodes2["EQUALS"] = 61] = "EQUALS"; - CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO"; - CharCodes2[CharCodes2["NINE"] = 57] = "NINE"; - CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A"; - CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F"; - CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X"; - CharCodes2[CharCodes2["LOWER_Z"] = 122] = "LOWER_Z"; - CharCodes2[CharCodes2["UPPER_A"] = 65] = "UPPER_A"; - CharCodes2[CharCodes2["UPPER_F"] = 70] = "UPPER_F"; - CharCodes2[CharCodes2["UPPER_Z"] = 90] = "UPPER_Z"; -})(CharCodes || (CharCodes = {})); -var TO_LOWER_BIT = 32; -function isNumber(code) { - return code >= CharCodes.ZERO && code <= CharCodes.NINE; -} -function isHexadecimalCharacter(code) { - return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F; -} -function isAsciiAlphaNumeric(code) { - return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code); -} -function isEntityInAttributeInvalidEnd(code) { - return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); -} -var EntityDecoderState; -(function(EntityDecoderState2) { - EntityDecoderState2[EntityDecoderState2["EntityStart"] = 0] = "EntityStart"; - EntityDecoderState2[EntityDecoderState2["NumericStart"] = 1] = "NumericStart"; - EntityDecoderState2[EntityDecoderState2["NumericDecimal"] = 2] = "NumericDecimal"; - EntityDecoderState2[EntityDecoderState2["NumericHex"] = 3] = "NumericHex"; - EntityDecoderState2[EntityDecoderState2["NamedEntity"] = 4] = "NamedEntity"; -})(EntityDecoderState || (EntityDecoderState = {})); -var DecodingMode; -(function(DecodingMode2) { - DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy"; - DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict"; - DecodingMode2[DecodingMode2["Attribute"] = 2] = "Attribute"; -})(DecodingMode || (DecodingMode = {})); - -class EntityDecoder { - decodeTree; - emitCodePoint; - errors; - constructor(decodeTree, emitCodePoint, errors) { - this.decodeTree = decodeTree; - this.emitCodePoint = emitCodePoint; - this.errors = errors; - } - state = EntityDecoderState.EntityStart; - consumed = 1; - result = 0; - treeIndex = 0; - excess = 1; - decodeMode = DecodingMode.Strict; - runConsumed = 0; - startEntity(decodeMode) { - this.decodeMode = decodeMode; - this.state = EntityDecoderState.EntityStart; - this.result = 0; - this.treeIndex = 0; - this.excess = 1; - this.consumed = 1; - this.runConsumed = 0; - } - write(input, offset) { - switch (this.state) { - case EntityDecoderState.EntityStart: { - if (input.charCodeAt(offset) === CharCodes.NUM) { - this.state = EntityDecoderState.NumericStart; - this.consumed += 1; - return this.stateNumericStart(input, offset + 1); - } - this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(input, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(input, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(input, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(input, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(input, offset); - } - } - } - stateNumericStart(input, offset) { - if (offset >= input.length) { - return -1; - } - if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { - this.state = EntityDecoderState.NumericHex; - this.consumed += 1; - return this.stateNumericHex(input, offset + 1); - } - this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(input, offset); - } - stateNumericHex(input, offset) { - while (offset < input.length) { - const char = input.charCodeAt(offset); - if (isNumber(char) || isHexadecimalCharacter(char)) { - const digit = char <= CharCodes.NINE ? char - CharCodes.ZERO : (char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10; - this.result = this.result * 16 + digit; - this.consumed++; - offset++; - } else { - return this.emitNumericEntity(char, 3); - } - } - return -1; - } - stateNumericDecimal(input, offset) { - while (offset < input.length) { - const char = input.charCodeAt(offset); - if (isNumber(char)) { - this.result = this.result * 10 + (char - CharCodes.ZERO); - this.consumed++; - offset++; - } else { - return this.emitNumericEntity(char, 2); - } - } - return -1; - } - emitNumericEntity(lastCp, expectedLength) { - if (this.consumed <= expectedLength) { - this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } else if (this.decodeMode === DecodingMode.Strict) { - return 0; - } - this.emitCodePoint(replaceCodePoint(this.result), this.consumed); - if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } - this.errors.validateNumericCharacterReference(this.result); - } - return this.consumed; - } - stateNamedEntity(input, offset) { - const { decodeTree } = this; - let current = decodeTree[this.treeIndex]; - let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - while (offset < input.length) { - if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) { - const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - if (this.runConsumed === 0) { - const firstChar = current & BinTrieFlags.JUMP_TABLE; - if (input.charCodeAt(offset) !== firstChar) { - return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); - } - offset++; - this.excess++; - this.runConsumed++; - } - while (this.runConsumed < runLength) { - if (offset >= input.length) { - return -1; - } - const charIndexInPacked = this.runConsumed - 1; - const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)]; - const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255; - if (input.charCodeAt(offset) !== expectedChar) { - this.runConsumed = 0; - return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); - } - offset++; - this.excess++; - this.runConsumed++; - } - this.runConsumed = 0; - this.treeIndex += 1 + (runLength >> 1); - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - } - if (offset >= input.length) - break; - const char = input.charCodeAt(offset); - if (char === CharCodes.SEMI && valueLength !== 0 && (current & BinTrieFlags.FLAG13) !== 0) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); - } - current = decodeTree[this.treeIndex]; - valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - if (valueLength !== 0) { - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } - if (this.decodeMode !== DecodingMode.Strict && (current & BinTrieFlags.FLAG13) === 0) { - this.result = this.treeIndex; - this.consumed += this.excess; - this.excess = 0; - } - } - offset++; - this.excess++; - } - return -1; - } - emitNotTerminatedNamedEntity() { - const { result, decodeTree } = this; - const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; - this.emitNamedEntityData(result, valueLength, this.consumed); - this.errors?.missingSemicolonAfterCharacterReference(); - return this.consumed; - } - emitNamedEntityData(result, valueLength, consumed) { - const { decodeTree } = this; - this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13) : decodeTree[result + 1], consumed); - if (valueLength === 3) { - this.emitCodePoint(decodeTree[result + 2], consumed); - } - return consumed; - } - end() { - switch (this.state) { - case EntityDecoderState.NamedEntity: { - return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - } - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState.EntityStart: { - return 0; - } - } - } -} -function determineBranch(decodeTree, current, nodeIndex, char) { - const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; - const jumpOffset = current & BinTrieFlags.JUMP_TABLE; - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; - } - if (jumpOffset) { - const value = char - jumpOffset; - return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; - } - const packedKeySlots = branchCount + 1 >> 1; - let lo = 0; - let hi = branchCount - 1; - while (lo <= hi) { - const mid = lo + hi >>> 1; - const slot = mid >> 1; - const packed = decodeTree[nodeIndex + slot]; - const midKey = packed >> (mid & 1) * 8 & 255; - if (midKey < char) { - lo = mid + 1; - } else if (midKey > char) { - hi = mid - 1; - } else { - return decodeTree[nodeIndex + packedKeySlots + mid]; - } - } - return -1; -} - -// node_modules/htmlparser2/dist/Tokenizer.js -var CharCodes2; -(function(CharCodes3) { - CharCodes3[CharCodes3["Tab"] = 9] = "Tab"; - CharCodes3[CharCodes3["NewLine"] = 10] = "NewLine"; - CharCodes3[CharCodes3["FormFeed"] = 12] = "FormFeed"; - CharCodes3[CharCodes3["CarriageReturn"] = 13] = "CarriageReturn"; - CharCodes3[CharCodes3["Space"] = 32] = "Space"; - CharCodes3[CharCodes3["ExclamationMark"] = 33] = "ExclamationMark"; - CharCodes3[CharCodes3["Number"] = 35] = "Number"; - CharCodes3[CharCodes3["Amp"] = 38] = "Amp"; - CharCodes3[CharCodes3["SingleQuote"] = 39] = "SingleQuote"; - CharCodes3[CharCodes3["DoubleQuote"] = 34] = "DoubleQuote"; - CharCodes3[CharCodes3["Dash"] = 45] = "Dash"; - CharCodes3[CharCodes3["Slash"] = 47] = "Slash"; - CharCodes3[CharCodes3["Zero"] = 48] = "Zero"; - CharCodes3[CharCodes3["Nine"] = 57] = "Nine"; - CharCodes3[CharCodes3["Semi"] = 59] = "Semi"; - CharCodes3[CharCodes3["Lt"] = 60] = "Lt"; - CharCodes3[CharCodes3["Eq"] = 61] = "Eq"; - CharCodes3[CharCodes3["Gt"] = 62] = "Gt"; - CharCodes3[CharCodes3["Questionmark"] = 63] = "Questionmark"; - CharCodes3[CharCodes3["UpperA"] = 65] = "UpperA"; - CharCodes3[CharCodes3["LowerA"] = 97] = "LowerA"; - CharCodes3[CharCodes3["UpperF"] = 70] = "UpperF"; - CharCodes3[CharCodes3["LowerF"] = 102] = "LowerF"; - CharCodes3[CharCodes3["UpperZ"] = 90] = "UpperZ"; - CharCodes3[CharCodes3["LowerZ"] = 122] = "LowerZ"; - CharCodes3[CharCodes3["LowerX"] = 120] = "LowerX"; - CharCodes3[CharCodes3["OpeningSquareBracket"] = 91] = "OpeningSquareBracket"; -})(CharCodes2 || (CharCodes2 = {})); -var State; -(function(State2) { - State2[State2["Text"] = 1] = "Text"; - State2[State2["BeforeTagName"] = 2] = "BeforeTagName"; - State2[State2["InTagName"] = 3] = "InTagName"; - State2[State2["InSelfClosingTag"] = 4] = "InSelfClosingTag"; - State2[State2["BeforeClosingTagName"] = 5] = "BeforeClosingTagName"; - State2[State2["InClosingTagName"] = 6] = "InClosingTagName"; - State2[State2["AfterClosingTagName"] = 7] = "AfterClosingTagName"; - State2[State2["BeforeAttributeName"] = 8] = "BeforeAttributeName"; - State2[State2["InAttributeName"] = 9] = "InAttributeName"; - State2[State2["AfterAttributeName"] = 10] = "AfterAttributeName"; - State2[State2["BeforeAttributeValue"] = 11] = "BeforeAttributeValue"; - State2[State2["InAttributeValueDq"] = 12] = "InAttributeValueDq"; - State2[State2["InAttributeValueSq"] = 13] = "InAttributeValueSq"; - State2[State2["InAttributeValueNq"] = 14] = "InAttributeValueNq"; - State2[State2["BeforeDeclaration"] = 15] = "BeforeDeclaration"; - State2[State2["InDeclaration"] = 16] = "InDeclaration"; - State2[State2["InProcessingInstruction"] = 17] = "InProcessingInstruction"; - State2[State2["BeforeComment"] = 18] = "BeforeComment"; - State2[State2["CDATASequence"] = 19] = "CDATASequence"; - State2[State2["DeclarationSequence"] = 20] = "DeclarationSequence"; - State2[State2["InSpecialComment"] = 21] = "InSpecialComment"; - State2[State2["InCommentLike"] = 22] = "InCommentLike"; - State2[State2["SpecialStartSequence"] = 23] = "SpecialStartSequence"; - State2[State2["InSpecialTag"] = 24] = "InSpecialTag"; - State2[State2["InPlainText"] = 25] = "InPlainText"; - State2[State2["InEntity"] = 26] = "InEntity"; -})(State || (State = {})); -function isWhitespace(c) { - return c === CharCodes2.Space || c === CharCodes2.NewLine || c === CharCodes2.Tab || c === CharCodes2.FormFeed || c === CharCodes2.CarriageReturn; -} -function isEndOfTagSection(c) { - return c === CharCodes2.Slash || c === CharCodes2.Gt || isWhitespace(c); -} -function isASCIIAlpha(c) { - return c >= CharCodes2.LowerA && c <= CharCodes2.LowerZ || c >= CharCodes2.UpperA && c <= CharCodes2.UpperZ; -} -var QuoteType; -(function(QuoteType2) { - QuoteType2[QuoteType2["NoValue"] = 0] = "NoValue"; - QuoteType2[QuoteType2["Unquoted"] = 1] = "Unquoted"; - QuoteType2[QuoteType2["Single"] = 2] = "Single"; - QuoteType2[QuoteType2["Double"] = 3] = "Double"; -})(QuoteType || (QuoteType = {})); -var Sequences = { - Empty: new Uint8Array(0), - Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), - CdataEnd: new Uint8Array([93, 93, 62]), - CommentEnd: new Uint8Array([45, 45, 33, 62]), - Doctype: new Uint8Array([100, 111, 99, 116, 121, 112, 101]), - IframeEnd: new Uint8Array([60, 47, 105, 102, 114, 97, 109, 101]), - NoembedEnd: new Uint8Array([ - 60, - 47, - 110, - 111, - 101, - 109, - 98, - 101, - 100 - ]), - NoframesEnd: new Uint8Array([ - 60, - 47, - 110, - 111, - 102, - 114, - 97, - 109, - 101, - 115 - ]), - Plaintext: new Uint8Array([ - 60, - 47, - 112, - 108, - 97, - 105, - 110, - 116, - 101, - 120, - 116 - ]), - ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), - StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), - TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), - TextareaEnd: new Uint8Array([ - 60, - 47, - 116, - 101, - 120, - 116, - 97, - 114, - 101, - 97 - ]), - XmpEnd: new Uint8Array([60, 47, 120, 109, 112]) -}; -var specialStartSequences = new Map([ - [Sequences.IframeEnd[2], Sequences.IframeEnd], - [Sequences.NoembedEnd[2], Sequences.NoembedEnd], - [Sequences.Plaintext[2], Sequences.Plaintext], - [Sequences.ScriptEnd[2], Sequences.ScriptEnd], - [Sequences.TitleEnd[2], Sequences.TitleEnd], - [Sequences.XmpEnd[2], Sequences.XmpEnd] -]); - -class Tokenizer { - cbs; - state = State.Text; - buffer = ""; - sectionStart = 0; - index = 0; - entityStart = 0; - baseState = State.Text; - isSpecial = false; - running = true; - offset = 0; - xmlMode; - decodeEntities; - recognizeSelfClosing; - entityDecoder; - constructor({ xmlMode = false, decodeEntities = true, recognizeSelfClosing = xmlMode }, cbs) { - this.cbs = cbs; - this.xmlMode = xmlMode; - this.decodeEntities = decodeEntities; - this.recognizeSelfClosing = recognizeSelfClosing; - this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed)); - } - reset() { - this.state = State.Text; - this.buffer = ""; - this.sectionStart = 0; - this.index = 0; - this.baseState = State.Text; - this.isSpecial = false; - this.currentSequence = Sequences.Empty; - this.sequenceIndex = 0; - this.running = true; - this.offset = 0; - } - write(chunk) { - this.offset += this.buffer.length; - this.buffer = chunk; - this.parse(); - } - end() { - if (this.running) - this.finish(); - } - pause() { - this.running = false; - } - resume() { - this.running = true; - if (this.index < this.buffer.length + this.offset) { - this.parse(); - } - } - stateText(c) { - if (c === CharCodes2.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes2.Lt)) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } - this.state = State.BeforeTagName; - this.sectionStart = this.index; - } else if (this.decodeEntities && c === CharCodes2.Amp) { - this.startEntity(); - } - } - currentSequence = Sequences.Empty; - sequenceIndex = 0; - enterTagBody() { - if (this.currentSequence === Sequences.Plaintext) { - this.currentSequence = Sequences.Empty; - this.state = State.InPlainText; - } else if (this.isSpecial) { - this.state = State.InSpecialTag; - this.sequenceIndex = 0; - } else { - this.state = State.Text; - } - } - stateSpecialStartSequence(c) { - const lower = c | 32; - if (this.sequenceIndex < this.currentSequence.length) { - if (lower === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex++; - return; - } - if (this.sequenceIndex === 3) { - if (this.currentSequence === Sequences.ScriptEnd && lower === Sequences.StyleEnd[3]) { - this.currentSequence = Sequences.StyleEnd; - this.sequenceIndex = 4; - return; - } - if (this.currentSequence === Sequences.TitleEnd && lower === Sequences.TextareaEnd[3]) { - this.currentSequence = Sequences.TextareaEnd; - this.sequenceIndex = 4; - return; - } - } else if (this.sequenceIndex === 4 && this.currentSequence === Sequences.NoembedEnd && lower === Sequences.NoframesEnd[4]) { - this.currentSequence = Sequences.NoframesEnd; - this.sequenceIndex = 5; - return; - } - } else if (isEndOfTagSection(c)) { - this.sequenceIndex = 0; - this.state = State.InTagName; - this.stateInTagName(c); - return; - } - this.isSpecial = false; - this.currentSequence = Sequences.Empty; - this.sequenceIndex = 0; - this.state = State.InTagName; - this.stateInTagName(c); - } - stateCDATASequence(c) { - if (c === Sequences.Cdata[this.sequenceIndex]) { - if (++this.sequenceIndex === Sequences.Cdata.length) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CdataEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } - } else { - this.sequenceIndex = 0; - if (this.xmlMode) { - this.state = State.InDeclaration; - this.stateInDeclaration(c); - } else { - this.state = State.InSpecialComment; - this.stateInSpecialComment(c); - } - } - } - fastForwardTo(c) { - while (++this.index < this.buffer.length + this.offset) { - if (this.buffer.charCodeAt(this.index - this.offset) === c) { - return true; - } - } - this.index = this.buffer.length + this.offset - 1; - return false; - } - emitComment(offset) { - this.cbs.oncomment(this.sectionStart, this.index, offset); - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = State.Text; - } - stateInCommentLike(c) { - if (!this.xmlMode && this.currentSequence === Sequences.CommentEnd && this.sequenceIndex <= 1 && this.index === this.sectionStart + this.sequenceIndex && c === CharCodes2.Gt) { - this.emitComment(this.sequenceIndex); - } else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === 2 && c === CharCodes2.Gt) { - this.emitComment(2); - } else if (this.currentSequence === Sequences.CommentEnd && this.sequenceIndex === this.currentSequence.length - 1 && c !== CharCodes2.Gt) { - this.sequenceIndex = Number(c === CharCodes2.Dash); - } else if (c === this.currentSequence[this.sequenceIndex]) { - if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index, 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index, 3); - } - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - this.state = State.Text; - } - } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } - } - isTagStartChar(c) { - return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c); - } - stateInSpecialTag(c) { - if (this.sequenceIndex === this.currentSequence.length) { - if (isEndOfTagSection(c)) { - const endOfText = this.index - this.currentSequence.length; - if (this.sectionStart < endOfText) { - const actualIndex = this.index; - this.index = endOfText; - this.cbs.ontext(this.sectionStart, endOfText); - this.index = actualIndex; - } - this.isSpecial = false; - this.sectionStart = endOfText + 2; - this.stateInClosingTagName(c); - return; - } - this.sequenceIndex = 0; - } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { - if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd) { - if (this.decodeEntities && c === CharCodes2.Amp) { - this.startEntity(); - } - } else if (this.fastForwardTo(CharCodes2.Lt)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === CharCodes2.Lt); - } - } - stateBeforeTagName(c) { - if (c === CharCodes2.ExclamationMark) { - this.state = State.BeforeDeclaration; - this.sectionStart = this.index + 1; - } else if (c === CharCodes2.Questionmark) { - if (this.xmlMode) { - this.state = State.InProcessingInstruction; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } else { - this.state = State.InSpecialComment; - this.sectionStart = this.index; - } - } else if (this.isTagStartChar(c)) { - this.sectionStart = this.index; - const special = this.xmlMode || this.cbs.isInForeignContext?.() ? undefined : specialStartSequences.get(c | 32); - if (special === undefined) { - this.state = State.InTagName; - } else { - this.isSpecial = true; - this.currentSequence = special; - this.sequenceIndex = 3; - this.state = State.SpecialStartSequence; - } - } else if (c === CharCodes2.Slash) { - this.state = State.BeforeClosingTagName; - } else { - this.state = State.Text; - this.stateText(c); - } - } - stateInTagName(c) { - if (isEndOfTagSection(c)) { - this.cbs.onopentagname(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - } - stateBeforeClosingTagName(c) { - if (isWhitespace(c)) { - if (this.xmlMode) {} else { - this.state = State.InSpecialComment; - this.sectionStart = this.index; - } - } else if (c === CharCodes2.Gt) { - this.state = State.Text; - if (!this.xmlMode) { - this.sectionStart = this.index + 1; - } - } else { - this.state = this.isTagStartChar(c) ? State.InClosingTagName : State.InSpecialComment; - this.sectionStart = this.index; - } - } - stateInClosingTagName(c) { - if (isEndOfTagSection(c)) { - this.cbs.onclosetag(this.sectionStart, this.index); - this.sectionStart = -1; - this.state = State.AfterClosingTagName; - this.stateAfterClosingTagName(c); - } - } - stateAfterClosingTagName(c) { - if (c === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) { - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateBeforeAttributeName(c) { - if (c === CharCodes2.Gt) { - this.cbs.onopentagend(this.index); - this.enterTagBody(); - this.sectionStart = this.index + 1; - } else if (c === CharCodes2.Slash) { - this.state = State.InSelfClosingTag; - } else if (!isWhitespace(c)) { - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - } - stateInSelfClosingTag(c) { - if (c === CharCodes2.Gt) { - this.cbs.onselfclosingtag(this.index); - this.sectionStart = this.index + 1; - if (!this.recognizeSelfClosing) { - this.enterTagBody(); - return; - } - this.state = State.Text; - this.isSpecial = false; - this.currentSequence = Sequences.Empty; - } else if (!isWhitespace(c)) { - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } - } - stateInAttributeName(c) { - if (c === CharCodes2.Eq || isEndOfTagSection(c)) { - this.cbs.onattribname(this.sectionStart, this.index); - this.sectionStart = this.index; - this.state = State.AfterAttributeName; - this.stateAfterAttributeName(c); - } - } - stateAfterAttributeName(c) { - if (c === CharCodes2.Eq) { - this.state = State.BeforeAttributeValue; - } else if (c === CharCodes2.Slash || c === CharCodes2.Gt) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.sectionStart = -1; - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } else if (!isWhitespace(c)) { - this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); - this.state = State.InAttributeName; - this.sectionStart = this.index; - } - } - stateBeforeAttributeValue(c) { - if (c === CharCodes2.DoubleQuote) { - this.state = State.InAttributeValueDq; - this.sectionStart = this.index + 1; - } else if (c === CharCodes2.SingleQuote) { - this.state = State.InAttributeValueSq; - this.sectionStart = this.index + 1; - } else if (!isWhitespace(c)) { - this.sectionStart = this.index; - this.state = State.InAttributeValueNq; - this.stateInAttributeValueNoQuotes(c); - } - } - handleInAttributeValue(c, quote) { - if (c === quote || !this.decodeEntities && this.fastForwardTo(quote)) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(quote === CharCodes2.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index + 1); - this.state = State.BeforeAttributeName; - } else if (this.decodeEntities && c === CharCodes2.Amp) { - this.startEntity(); - } - } - stateInAttributeValueDoubleQuotes(c) { - this.handleInAttributeValue(c, CharCodes2.DoubleQuote); - } - stateInAttributeValueSingleQuotes(c) { - this.handleInAttributeValue(c, CharCodes2.SingleQuote); - } - stateInAttributeValueNoQuotes(c) { - if (isWhitespace(c) || c === CharCodes2.Gt) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = -1; - this.cbs.onattribend(QuoteType.Unquoted, this.index); - this.state = State.BeforeAttributeName; - this.stateBeforeAttributeName(c); - } else if (this.decodeEntities && c === CharCodes2.Amp) { - this.startEntity(); - } - } - stateBeforeDeclaration(c) { - if (c === CharCodes2.OpeningSquareBracket) { - this.state = State.CDATASequence; - this.sequenceIndex = 0; - } else if (this.xmlMode) { - this.state = c === CharCodes2.Dash ? State.BeforeComment : State.InDeclaration; - } else if ((c | 32) === Sequences.Doctype[0]) { - this.state = State.DeclarationSequence; - this.currentSequence = Sequences.Doctype; - this.sequenceIndex = 1; - } else if (c === CharCodes2.Gt) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } else if (c === CharCodes2.Dash) { - this.state = State.BeforeComment; - } else { - this.state = State.InSpecialComment; - } - } - stateDeclarationSequence(c) { - if (this.sequenceIndex === this.currentSequence.length) { - this.state = State.InDeclaration; - this.stateInDeclaration(c); - } else if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (c === CharCodes2.Gt) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } else { - this.state = State.InSpecialComment; - } - } - stateInDeclaration(c) { - if (c === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) { - this.cbs.ondeclaration(this.sectionStart, this.index); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - stateInProcessingInstruction(c) { - if (c === CharCodes2.Questionmark) { - this.sequenceIndex = 1; - } else if (c === CharCodes2.Gt && this.sequenceIndex === 1) { - this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1); - this.sequenceIndex = 0; - this.state = State.Text; - this.sectionStart = this.index + 1; - } else { - this.sequenceIndex = Number(this.fastForwardTo(CharCodes2.Questionmark)); - } - } - stateBeforeComment(c) { - if (c === CharCodes2.Dash) { - this.state = State.InCommentLike; - this.currentSequence = Sequences.CommentEnd; - this.sequenceIndex = 0; - this.sectionStart = this.index + 1; - } else if (this.xmlMode) { - this.state = State.InDeclaration; - } else if (c === CharCodes2.Gt) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } else { - this.state = State.InSpecialComment; - } - } - stateInSpecialComment(c) { - if (c === CharCodes2.Gt || this.fastForwardTo(CharCodes2.Gt)) { - this.cbs.oncomment(this.sectionStart, this.index, 0); - this.state = State.Text; - this.sectionStart = this.index + 1; - } - } - startEntity() { - this.baseState = this.state; - this.state = State.InEntity; - this.entityStart = this.index; - this.entityDecoder.startEntity(this.xmlMode ? DecodingMode.Strict : this.baseState === State.Text || this.baseState === State.InSpecialTag ? DecodingMode.Legacy : DecodingMode.Attribute); - } - stateInEntity() { - const indexInBuffer = this.index - this.offset; - const length = this.entityDecoder.write(this.buffer, indexInBuffer); - if (length >= 0) { - this.state = this.baseState; - if (length === 0) { - this.index -= 1; - } - } else { - if (indexInBuffer < this.buffer.length && this.buffer.charCodeAt(indexInBuffer) === CharCodes2.Amp) { - this.state = this.baseState; - this.index -= 1; - return; - } - this.index = this.offset + this.buffer.length - 1; - } - } - cleanup() { - if (this.running && this.sectionStart !== this.index) { - if (this.state === State.Text || this.state === State.InPlainText || this.state === State.InSpecialTag && this.sequenceIndex === 0) { - this.cbs.ontext(this.sectionStart, this.index); - this.sectionStart = this.index; - } else if (this.state === State.InAttributeValueDq || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueNq) { - this.cbs.onattribdata(this.sectionStart, this.index); - this.sectionStart = this.index; - } - } - } - shouldContinue() { - return this.index < this.buffer.length + this.offset && this.running; - } - parse() { - while (this.shouldContinue()) { - const c = this.buffer.charCodeAt(this.index - this.offset); - switch (this.state) { - case State.Text: { - this.stateText(c); - break; - } - case State.InPlainText: { - this.index = this.buffer.length + this.offset - 1; - break; - } - case State.SpecialStartSequence: { - this.stateSpecialStartSequence(c); - break; - } - case State.InSpecialTag: { - this.stateInSpecialTag(c); - break; - } - case State.CDATASequence: { - this.stateCDATASequence(c); - break; - } - case State.DeclarationSequence: { - this.stateDeclarationSequence(c); - break; - } - case State.InAttributeValueDq: { - this.stateInAttributeValueDoubleQuotes(c); - break; - } - case State.InAttributeName: { - this.stateInAttributeName(c); - break; - } - case State.InCommentLike: { - this.stateInCommentLike(c); - break; - } - case State.InSpecialComment: { - this.stateInSpecialComment(c); - break; - } - case State.BeforeAttributeName: { - this.stateBeforeAttributeName(c); - break; - } - case State.InTagName: { - this.stateInTagName(c); - break; - } - case State.InClosingTagName: { - this.stateInClosingTagName(c); - break; - } - case State.BeforeTagName: { - this.stateBeforeTagName(c); - break; - } - case State.AfterAttributeName: { - this.stateAfterAttributeName(c); - break; - } - case State.InAttributeValueSq: { - this.stateInAttributeValueSingleQuotes(c); - break; - } - case State.BeforeAttributeValue: { - this.stateBeforeAttributeValue(c); - break; - } - case State.BeforeClosingTagName: { - this.stateBeforeClosingTagName(c); - break; - } - case State.AfterClosingTagName: { - this.stateAfterClosingTagName(c); - break; - } - case State.InAttributeValueNq: { - this.stateInAttributeValueNoQuotes(c); - break; - } - case State.InSelfClosingTag: { - this.stateInSelfClosingTag(c); - break; - } - case State.InDeclaration: { - this.stateInDeclaration(c); - break; - } - case State.BeforeDeclaration: { - this.stateBeforeDeclaration(c); - break; - } - case State.BeforeComment: { - this.stateBeforeComment(c); - break; - } - case State.InProcessingInstruction: { - this.stateInProcessingInstruction(c); - break; - } - case State.InEntity: { - this.stateInEntity(); - break; - } - } - this.index++; - } - this.cleanup(); - } - finish() { - if (this.state === State.InEntity) { - this.entityDecoder.end(); - this.state = this.baseState; - } - this.handleTrailingData(); - this.cbs.onend(); - } - handleTrailingCommentLikeData(endIndex) { - if (this.state !== State.InCommentLike) { - return false; - } - if (this.currentSequence === Sequences.CdataEnd) { - if (this.xmlMode) { - if (this.sectionStart < endIndex) { - this.cbs.oncdata(this.sectionStart, endIndex, 0); - } - } else { - const cdataStart = this.sectionStart - Sequences.Cdata.length - 1; - this.cbs.oncomment(cdataStart, endIndex, 0); - } - } else { - const offset = this.xmlMode ? 0 : Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1); - this.cbs.oncomment(this.sectionStart, endIndex, offset); - } - return true; - } - handleTrailingMarkupDeclaration(endIndex) { - if (this.xmlMode) { - switch (this.state) { - case State.InSpecialComment: - case State.BeforeComment: - case State.CDATASequence: - case State.DeclarationSequence: - case State.InDeclaration: { - this.cbs.ontext(this.sectionStart, endIndex); - return true; - } - default: { - return false; - } - } - } - switch (this.state) { - case State.BeforeDeclaration: - case State.InSpecialComment: - case State.BeforeComment: - case State.CDATASequence: { - this.cbs.oncomment(this.sectionStart, endIndex, 0); - return true; - } - case State.DeclarationSequence: { - if (this.sequenceIndex !== Sequences.Doctype.length) { - this.cbs.oncomment(this.sectionStart, endIndex, 0); - } - return true; - } - case State.InDeclaration: { - return true; - } - default: { - return false; - } - } - } - handleTrailingData() { - const endIndex = this.buffer.length + this.offset; - if (this.handleTrailingCommentLikeData(endIndex) || this.handleTrailingMarkupDeclaration(endIndex)) { - return; - } - if (this.sectionStart >= endIndex) { - return; - } - switch (this.state) { - case State.InTagName: - case State.BeforeAttributeName: - case State.BeforeAttributeValue: - case State.AfterAttributeName: - case State.InAttributeName: - case State.InAttributeValueSq: - case State.InAttributeValueDq: - case State.InAttributeValueNq: - case State.InClosingTagName: { - break; - } - default: { - this.cbs.ontext(this.sectionStart, endIndex); - } - } - } - emitCodePoint(cp, consumed) { - if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.onattribentity(cp); - } else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } - this.sectionStart = this.entityStart + consumed; - this.index = this.sectionStart - 1; - this.cbs.ontextentity(cp, this.sectionStart); - } - } -} - -// node_modules/htmlparser2/dist/Parser.js -var { fromCodePoint } = String; -var formTags = new Set([ - "input", - "option", - "optgroup", - "select", - "button", - "datalist", - "textarea" -]); -var pTag = new Set(["p"]); -var headingTags = new Set(["h1", "h2", "h3", "h4", "h5", "h6", "p"]); -var tableSectionTags = new Set(["thead", "tbody"]); -var ddtTags = new Set(["dd", "dt"]); -var rtpTags = new Set(["rt", "rp"]); -var openImpliesClose = new Map([ - ["tr", new Set(["tr", "th", "td"])], - ["th", new Set(["th"])], - ["td", new Set(["thead", "th", "td"])], - ["body", new Set(["head", "link", "script"])], - ["a", new Set(["a"])], - ["li", new Set(["li"])], - ["p", pTag], - ["h1", headingTags], - ["h2", headingTags], - ["h3", headingTags], - ["h4", headingTags], - ["h5", headingTags], - ["h6", headingTags], - ["select", formTags], - ["input", formTags], - ["output", formTags], - ["button", formTags], - ["datalist", formTags], - ["textarea", formTags], - ["option", new Set(["option"])], - ["optgroup", new Set(["optgroup", "option"])], - ["dd", ddtTags], - ["dt", ddtTags], - ["address", pTag], - ["article", pTag], - ["aside", pTag], - ["blockquote", pTag], - ["details", pTag], - ["div", pTag], - ["dl", pTag], - ["fieldset", pTag], - ["figcaption", pTag], - ["figure", pTag], - ["footer", pTag], - ["form", pTag], - ["header", pTag], - ["hr", pTag], - ["main", pTag], - ["nav", pTag], - ["ol", pTag], - ["pre", pTag], - ["section", pTag], - ["table", pTag], - ["ul", pTag], - ["rt", rtpTags], - ["rp", rtpTags], - ["tbody", tableSectionTags], - ["tfoot", tableSectionTags] -]); -var DOCUMENT_TYPE = "doctype"; -var voidElements = new Set([ - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr" -]); -var foreignContextElements = new Set(["math", "svg"]); -var htmlIntegrationElements = new Set([ - "mi", - "mo", - "mn", - "ms", - "mtext", - "annotation-xml", - "foreignObject", - "desc", - "title" -]); -var svgTagNameAdjustments = new Map([ - ["altglyph", "altGlyph"], - ["altglyphdef", "altGlyphDef"], - ["altglyphitem", "altGlyphItem"], - ["animatecolor", "animateColor"], - ["animatemotion", "animateMotion"], - ["animatetransform", "animateTransform"], - ["clippath", "clipPath"], - ["feblend", "feBlend"], - ["fecolormatrix", "feColorMatrix"], - ["fecomponenttransfer", "feComponentTransfer"], - ["fecomposite", "feComposite"], - ["feconvolvematrix", "feConvolveMatrix"], - ["fediffuselighting", "feDiffuseLighting"], - ["fedisplacementmap", "feDisplacementMap"], - ["fedistantlight", "feDistantLight"], - ["fedropshadow", "feDropShadow"], - ["feflood", "feFlood"], - ["fefunca", "feFuncA"], - ["fefuncb", "feFuncB"], - ["fefuncg", "feFuncG"], - ["fefuncr", "feFuncR"], - ["fegaussianblur", "feGaussianBlur"], - ["feimage", "feImage"], - ["femerge", "feMerge"], - ["femergenode", "feMergeNode"], - ["femorphology", "feMorphology"], - ["feoffset", "feOffset"], - ["fepointlight", "fePointLight"], - ["fespecularlighting", "feSpecularLighting"], - ["fespotlight", "feSpotLight"], - ["fetile", "feTile"], - ["feturbulence", "feTurbulence"], - ["foreignobject", "foreignObject"], - ["glyphref", "glyphRef"], - ["lineargradient", "linearGradient"], - ["radialgradient", "radialGradient"], - ["textpath", "textPath"] -]); -var ForeignContext; -(function(ForeignContext2) { - ForeignContext2[ForeignContext2["None"] = 0] = "None"; - ForeignContext2[ForeignContext2["Svg"] = 1] = "Svg"; - ForeignContext2[ForeignContext2["MathML"] = 2] = "MathML"; -})(ForeignContext || (ForeignContext = {})); -var reNameEnd = /\s|\//; - -class Parser { - options; - startIndex = 0; - endIndex = 0; - openTagStart = 0; - tagname = ""; - attribname = ""; - attribvalue = ""; - attribs = null; - stack = []; - foreignContext; - cbs; - lowerCaseTagNames; - lowerCaseAttributeNames; - recognizeSelfClosing; - htmlMode; - tokenizer; - buffers = []; - bufferOffset = 0; - writeIndex = 0; - ended = false; - constructor(cbs, options = {}) { - this.options = options; - this.cbs = cbs ?? {}; - this.htmlMode = !this.options.xmlMode; - this.lowerCaseTagNames = options.lowerCaseTags ?? this.htmlMode; - this.lowerCaseAttributeNames = options.lowerCaseAttributeNames ?? this.htmlMode; - this.recognizeSelfClosing = options.recognizeSelfClosing ?? !this.htmlMode; - this.tokenizer = new (options.Tokenizer ?? Tokenizer)(this.options, this); - this.foreignContext = [ForeignContext.None]; - this.cbs.onparserinit?.(this); - } - ontext(start, endIndex) { - const data = this.getSlice(start, endIndex); - this.endIndex = endIndex - 1; - this.cbs.ontext?.(data); - this.startIndex = endIndex; - } - ontextentity(cp, endIndex) { - this.endIndex = endIndex - 1; - this.cbs.ontext?.(fromCodePoint(cp)); - this.startIndex = endIndex; - } - isInForeignContext() { - return this.foreignContext[0] !== ForeignContext.None; - } - isVoidElement(name) { - return this.htmlMode && voidElements.has(name); - } - readTagName(start, endIndex) { - const name = this.lowerCaseTagNames ? this.getSlice(start, endIndex).toLowerCase() : this.getSlice(start, endIndex); - if (!(this.lowerCaseTagNames && this.htmlMode)) { - return name; - } - if (this.foreignContext[0] === ForeignContext.Svg) { - return svgTagNameAdjustments.get(name) ?? name; - } - if (this.foreignContext.length > 1) { - const adjusted = svgTagNameAdjustments.get(name); - if (adjusted !== undefined && this.stack.includes(adjusted)) { - return adjusted; - } - } - if (!this.isInForeignContext()) { - return name === "image" ? "img" : name; - } - return name; - } - onopentagname(start, endIndex) { - this.endIndex = endIndex; - this.emitOpenTag(this.readTagName(start, endIndex)); - } - emitOpenTag(name) { - this.openTagStart = this.startIndex; - this.tagname = name; - if (this.htmlMode && name === "form" && this.stack.includes("form")) { - this.tagname = ""; - return; - } - const impliesClose = this.htmlMode && openImpliesClose.get(name); - if (impliesClose) { - while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { - this.popElement(true); - } - } - if (!this.isVoidElement(name)) { - this.stack.unshift(name); - if (this.htmlMode) { - if (name === "svg") { - this.foreignContext.unshift(ForeignContext.Svg); - } else if (name === "math") { - this.foreignContext.unshift(ForeignContext.MathML); - } else if (htmlIntegrationElements.has(name)) { - this.foreignContext.unshift(ForeignContext.None); - } - } - } - this.cbs.onopentagname?.(name); - if (this.cbs.onopentag) - this.attribs = {}; - } - endOpenTag(isImplied) { - this.startIndex = this.openTagStart; - if (this.attribs) { - this.cbs.onopentag?.(this.tagname, this.attribs, isImplied); - this.attribs = null; - } - if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) { - this.cbs.onclosetag(this.tagname, true); - } - this.tagname = ""; - } - onopentagend(endIndex) { - this.endIndex = endIndex; - this.endOpenTag(false); - this.startIndex = endIndex + 1; - } - onclosetag(start, endIndex) { - this.endIndex = endIndex; - const name = this.readTagName(start, endIndex); - if (!this.isVoidElement(name)) { - const pos = this.stack.indexOf(name); - if (pos !== -1) { - for (let index = 0;index < pos; index++) { - this.popElement(true); - } - this.popElement(false); - } else if (this.htmlMode && name === "p") { - this.emitOpenTag("p"); - this.closeCurrentTag(true); - } - } else if (this.htmlMode && name === "br") { - this.cbs.onopentagname?.("br"); - this.cbs.onopentag?.("br", {}, true); - this.cbs.onclosetag?.("br", false); - } - this.startIndex = endIndex + 1; - } - onselfclosingtag(endIndex) { - this.endIndex = endIndex; - if (this.recognizeSelfClosing || this.isInForeignContext()) { - this.closeCurrentTag(false); - this.startIndex = endIndex + 1; - } else { - this.onopentagend(endIndex); - } - } - popElement(implied) { - const element = this.stack.shift(); - if (this.htmlMode && (foreignContextElements.has(element) || htmlIntegrationElements.has(element))) { - this.foreignContext.shift(); - } - this.cbs.onclosetag?.(element, implied); - } - closeCurrentTag(isOpenImplied) { - const name = this.tagname; - this.endOpenTag(isOpenImplied); - if (this.stack[0] === name) { - this.popElement(!isOpenImplied); - } - } - onattribname(start, endIndex) { - this.startIndex = start; - const name = this.getSlice(start, endIndex); - this.attribname = this.lowerCaseAttributeNames ? name.toLowerCase() : name; - } - onattribdata(start, endIndex) { - this.attribvalue += this.getSlice(start, endIndex); - } - onattribentity(cp) { - this.attribvalue += fromCodePoint(cp); - } - onattribend(quote, endIndex) { - this.endIndex = endIndex; - this.cbs.onattribute?.(this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? undefined : null); - if (this.attribs && !Object.hasOwn(this.attribs, this.attribname)) { - this.attribs[this.attribname] = this.attribvalue; - } - this.attribvalue = ""; - } - getInstructionName(value) { - const index = value.search(reNameEnd); - let name = index < 0 ? value : value.substr(0, index); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - return name; - } - ondeclaration(start, endIndex) { - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - const name = this.htmlMode ? this.lowerCaseTagNames ? DOCUMENT_TYPE : value.slice(0, DOCUMENT_TYPE.length) : this.getInstructionName(value); - this.cbs.onprocessinginstruction(`!${name}`, `!${value}`); - } - this.startIndex = endIndex + 1; - } - onprocessinginstruction(start, endIndex) { - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex); - if (this.cbs.onprocessinginstruction) { - const name = this.getInstructionName(value); - this.cbs.onprocessinginstruction(`?${name}`, `?${value}`); - } - this.startIndex = endIndex + 1; - } - oncomment(start, endIndex, offset) { - this.endIndex = endIndex; - this.cbs.oncomment?.(this.getSlice(start, endIndex - offset)); - this.cbs.oncommentend?.(); - this.startIndex = endIndex + 1; - } - oncdata(start, endIndex, offset) { - this.endIndex = endIndex; - const value = this.getSlice(start, endIndex - offset); - if (!this.htmlMode || this.options.recognizeCDATA) { - this.cbs.oncdatastart?.(); - this.cbs.ontext?.(value); - this.cbs.oncdataend?.(); - } else if (this.isInForeignContext()) { - this.cbs.ontext?.(value); - } else { - this.cbs.oncomment?.(`[CDATA[${value}]]`); - this.cbs.oncommentend?.(); - } - this.startIndex = endIndex + 1; - } - onend() { - if (this.cbs.onclosetag) { - this.endIndex = this.startIndex; - for (let index = 0;index < this.stack.length; index++) { - this.cbs.onclosetag(this.stack[index], true); - } - } - this.cbs.onend?.(); - } - reset() { - this.cbs.onreset?.(); - this.tokenizer.reset(); - this.tagname = ""; - this.attribname = ""; - this.attribvalue = ""; - this.attribs = null; - this.stack.length = 0; - this.startIndex = 0; - this.endIndex = 0; - this.cbs.onparserinit?.(this); - this.buffers.length = 0; - this.foreignContext.length = 0; - this.foreignContext.unshift(ForeignContext.None); - this.bufferOffset = 0; - this.writeIndex = 0; - this.ended = false; - } - parseComplete(data) { - this.reset(); - this.end(data); - } - getSlice(start, end) { - if (start === end) { - return ""; - } - while (start - this.bufferOffset >= this.buffers[0].length) { - this.shiftBuffer(); - } - let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset); - while (end - this.bufferOffset > this.buffers[0].length) { - this.shiftBuffer(); - slice += this.buffers[0].slice(0, end - this.bufferOffset); - } - return slice; - } - shiftBuffer() { - this.bufferOffset += this.buffers[0].length; - this.writeIndex--; - this.buffers.shift(); - } - write(chunk) { - if (this.ended) { - this.cbs.onerror?.(new Error(".write() after done!")); - return; - } - this.buffers.push(chunk); - if (this.tokenizer.running) { - this.tokenizer.write(chunk); - this.writeIndex++; - } - } - end(chunk) { - if (this.ended) { - this.cbs.onerror?.(new Error(".end() after done!")); - return; - } - if (chunk) - this.write(chunk); - this.ended = true; - this.tokenizer.end(); - } - pause() { - this.tokenizer.pause(); - } - resume() { - this.tokenizer.resume(); - while (this.tokenizer.running && this.writeIndex < this.buffers.length) { - this.tokenizer.write(this.buffers[this.writeIndex++]); - } - if (this.ended) - this.tokenizer.end(); - } -} -// node_modules/domelementtype/dist/index.js -var exports_dist = {}; -__export(exports_dist, { - isTag: () => isTag, - Text: () => Text, - Tag: () => Tag, - Style: () => Style, - Script: () => Script, - Root: () => Root, - ElementType: () => ElementType, - Doctype: () => Doctype, - Directive: () => Directive, - Comment: () => Comment, - CDATA: () => CDATA -}); -var ElementType; -(function(ElementType2) { - ElementType2["Root"] = "root"; - ElementType2["Text"] = "text"; - ElementType2["Directive"] = "directive"; - ElementType2["Comment"] = "comment"; - ElementType2["Script"] = "script"; - ElementType2["Style"] = "style"; - ElementType2["Tag"] = "tag"; - ElementType2["CDATA"] = "cdata"; - ElementType2["Doctype"] = "doctype"; -})(ElementType || (ElementType = {})); -function isTag(element) { - return element.type === ElementType.Tag || element.type === ElementType.Script || element.type === ElementType.Style; -} -var Root = ElementType.Root; -var Text = ElementType.Text; -var Directive = ElementType.Directive; -var Comment = ElementType.Comment; -var Script = ElementType.Script; -var Style = ElementType.Style; -var Tag = ElementType.Tag; -var CDATA = ElementType.CDATA; -var Doctype = ElementType.Doctype; - -// node_modules/domhandler/dist/node.js -class Node { - parent = null; - prev = null; - next = null; - startIndex = null; - endIndex = null; - get parentNode() { - return this.parent; - } - set parentNode(parent) { - this.parent = parent; - } - get previousSibling() { - return this.prev; - } - set previousSibling(previous) { - this.prev = previous; - } - get nextSibling() { - return this.next; - } - set nextSibling(next) { - this.next = next; - } - cloneNode(recursive = false) { - return cloneNode(this, recursive); - } -} - -class DataNode extends Node { - data; - constructor(data) { - super(); - this.data = data; - } - get nodeValue() { - return this.data; - } - set nodeValue(data) { - this.data = data; - } -} - -class Text2 extends DataNode { - type = ElementType.Text; - get nodeType() { - return 3; - } -} - -class Comment2 extends DataNode { - type = ElementType.Comment; - get nodeType() { - return 8; - } -} - -class ProcessingInstruction extends DataNode { - type = ElementType.Directive; - name; - constructor(name, data) { - super(data); - this.name = name; - } - get nodeType() { - return 1; - } - "x-name"; - "x-publicId"; - "x-systemId"; -} - -class NodeWithChildren extends Node { - children; - constructor(children) { - super(); - this.children = children; - } - get firstChild() { - return this.children[0] ?? null; - } - get lastChild() { - return this.children.length > 0 ? this.children[this.children.length - 1] : null; - } - get childNodes() { - return this.children; - } - set childNodes(children) { - this.children = children; - } -} - -class CDATA2 extends NodeWithChildren { - type = ElementType.CDATA; - get nodeType() { - return 4; - } -} - -class Document extends NodeWithChildren { - type = ElementType.Root; - get nodeType() { - return 9; - } -} - -class Element extends NodeWithChildren { - name; - attribs; - type; - constructor(name, attribs, children = [], type = name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag) { - super(children); - this.name = name; - this.attribs = attribs; - this.type = type; - } - get nodeType() { - return 1; - } - get tagName() { - return this.name; - } - set tagName(name) { - this.name = name; - } - get attributes() { - return Object.keys(this.attribs).map((name) => ({ - name, - value: this.attribs[name], - namespace: this["x-attribsNamespace"]?.[name], - prefix: this["x-attribsPrefix"]?.[name] - })); - } - namespace; - "x-attribsNamespace"; - "x-attribsPrefix"; -} -function isTag2(node) { - return isTag(node); -} -function isCDATA(node) { - return node.type === ElementType.CDATA; -} -function isText(node) { - return node.type === ElementType.Text; -} -function isComment(node) { - return node.type === ElementType.Comment; -} -function isDirective(node) { - return node.type === ElementType.Directive; -} -function isDocument(node) { - return node.type === ElementType.Root; -} -function hasChildren(node) { - return Object.hasOwn(node, "children"); -} -function cloneNode(node, recursive = false) { - let result; - if (isText(node)) { - result = new Text2(node.data); - } else if (isComment(node)) { - result = new Comment2(node.data); - } else if (isTag2(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new Element(node.name, { ...node.attribs }, children); - for (const child of children) { - child.parent = clone; - } - if (node.namespace != null) { - clone.namespace = node.namespace; - } - if (node["x-attribsNamespace"]) { - clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] }; - } - if (node["x-attribsPrefix"]) { - clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] }; - } - result = clone; - } else if (isCDATA(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new CDATA2(children); - for (const child of children) { - child.parent = clone; - } - result = clone; - } else if (isDocument(node)) { - const children = recursive ? cloneChildren(node.children) : []; - const clone = new Document(children); - for (const child of children) { - child.parent = clone; - } - if (node["x-mode"]) { - clone["x-mode"] = node["x-mode"]; - } - result = clone; - } else if (isDirective(node)) { - const instruction = new ProcessingInstruction(node.name, node.data); - if (node["x-name"] != null) { - instruction["x-name"] = node["x-name"]; - instruction["x-publicId"] = node["x-publicId"]; - instruction["x-systemId"] = node["x-systemId"]; - } - result = instruction; - } else { - throw new Error(`Not implemented yet: ${node.type}`); - } - result.startIndex = node.startIndex; - result.endIndex = node.endIndex; - if (node.sourceCodeLocation != null) { - result.sourceCodeLocation = node.sourceCodeLocation; - } - return result; -} -function cloneChildren(childs) { - const children = childs.map((child) => cloneNode(child, true)); - for (let index = 1;index < children.length; index++) { - children[index].prev = children[index - 1]; - children[index - 1].next = children[index]; - } - return children; -} - -// node_modules/domhandler/dist/index.js -var defaultOptions = { - withStartIndices: false, - withEndIndices: false, - xmlMode: false -}; - -class DomHandler { - dom = []; - root = new Document(this.dom); - callback; - options; - elementCB; - done = false; - tagStack = [this.root]; - lastNode = null; - parser = null; - constructor(callback, options, elementCB) { - if (typeof options === "function") { - elementCB = options; - options = defaultOptions; - } - if (typeof callback === "object") { - options = callback; - callback = undefined; - } - this.callback = callback ?? null; - this.options = options ?? defaultOptions; - this.elementCB = elementCB ?? null; - } - onparserinit(parser) { - this.parser = parser; - } - onreset() { - this.dom = []; - this.root = new Document(this.dom); - this.done = false; - this.tagStack = [this.root]; - this.lastNode = null; - this.parser = null; - } - onend() { - if (this.done) - return; - this.done = true; - this.parser = null; - this.handleCallback(null); - } - onerror(error) { - this.handleCallback(error); - } - onclosetag() { - this.lastNode = null; - const element = this.tagStack.pop(); - if (this.options.withEndIndices && this.parser) { - element.endIndex = this.parser.endIndex; - } - if (this.elementCB) - this.elementCB(element); - } - onopentag(name, attribs) { - const type = this.options.xmlMode ? ElementType.Tag : undefined; - const element = new Element(name, attribs, undefined, type); - this.addNode(element); - this.tagStack.push(element); - } - ontext(data) { - const { lastNode } = this; - if (lastNode && lastNode.type === ElementType.Text) { - lastNode.data += data; - if (this.options.withEndIndices && this.parser) { - lastNode.endIndex = this.parser.endIndex; - } - } else { - const node2 = new Text2(data); - this.addNode(node2); - this.lastNode = node2; - } - } - oncomment(data) { - if (this.lastNode && this.lastNode.type === ElementType.Comment) { - this.lastNode.data += data; - return; - } - const node2 = new Comment2(data); - this.addNode(node2); - this.lastNode = node2; - } - oncommentend() { - this.lastNode = null; - } - oncdatastart() { - const text = new Text2(""); - const node2 = new CDATA2([text]); - this.addNode(node2); - text.parent = node2; - this.lastNode = text; - } - oncdataend() { - this.lastNode = null; - } - onprocessinginstruction(name, data) { - const node2 = new ProcessingInstruction(name, data); - this.addNode(node2); - } - handleCallback(error) { - if (typeof this.callback === "function") { - this.callback(error, this.dom); - } else if (error) { - throw error; - } - } - addNode(node2) { - const parent = this.tagStack[this.tagStack.length - 1]; - const previousSibling = parent.children[parent.children.length - 1]; - if (this.options.withStartIndices && this.parser) { - node2.startIndex = this.parser.startIndex; - } - if (this.options.withEndIndices && this.parser) { - node2.endIndex = this.parser.endIndex; - } - parent.children.push(node2); - if (previousSibling) { - node2.prev = previousSibling; - previousSibling.next = node2; - } - node2.parent = parent; - this.lastNode = null; - } -} -// node_modules/domutils/dist/index.js -var exports_dist2 = {}; -__export(exports_dist2, { - uniqueSort: () => uniqueSort, - textContent: () => textContent, - testElement: () => testElement, - replaceElement: () => replaceElement, - removeSubsets: () => removeSubsets, - removeElement: () => removeElement, - prevElementSibling: () => prevElementSibling, - prependChild: () => prependChild, - prepend: () => prepend, - nextElementSibling: () => nextElementSibling, - innerText: () => innerText, - hasAttrib: () => hasAttrib, - getText: () => getText, - getSiblings: () => getSiblings, - getParent: () => getParent, - getOuterHTML: () => getOuterHTML, - getName: () => getName, - getInnerHTML: () => getInnerHTML, - getFeed: () => getFeed, - getElementsByTagType: () => getElementsByTagType, - getElementsByTagName: () => getElementsByTagName, - getElementsByClassName: () => getElementsByClassName, - getElements: () => getElements, - getElementById: () => getElementById, - getChildren: () => getChildren, - getAttributeValue: () => getAttributeValue, - findOne: () => findOne, - findAll: () => findAll, - find: () => find, - filter: () => filter, - existsOne: () => existsOne, - compareDocumentPosition: () => compareDocumentPosition, - appendChild: () => appendChild, - append: () => append, - DocumentPosition: () => DocumentPosition -}); - -// node_modules/domutils/dist/querying.js -function filter(test, node2, recurse = true, limit = Number.POSITIVE_INFINITY) { - return find(test, Array.isArray(node2) ? node2 : [node2], recurse, limit); -} -function find(test, nodes, recurse, limit) { - const result = []; - const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - const indexStack = [0]; - for (;; ) { - if (indexStack[0] >= nodeStack[0].length) { - if (indexStack.length === 1) { - return result; - } - nodeStack.shift(); - indexStack.shift(); - continue; - } - const element = nodeStack[0][indexStack[0]++]; - if (test(element)) { - result.push(element); - if (--limit <= 0) - return result; - } - if (recurse && hasChildren(element) && element.children.length > 0) { - indexStack.unshift(0); - nodeStack.unshift(element.children); - } - } -} -function findOne(test, nodes, recurse = true) { - const searchedNodes = Array.isArray(nodes) ? nodes : [nodes]; - for (const node2 of searchedNodes) { - if (isTag2(node2) && test(node2)) { - return node2; - } - if (recurse && hasChildren(node2) && node2.children.length > 0) { - const found = findOne(test, node2.children, true); - if (found) - return found; - } - } - return null; -} -function existsOne(test, nodes) { - return (Array.isArray(nodes) ? nodes : [nodes]).some((node2) => isTag2(node2) && test(node2) || hasChildren(node2) && existsOne(test, node2.children)); -} -function findAll(test, nodes) { - const result = []; - const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]]; - const indexStack = [0]; - for (;; ) { - if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return result; - } - nodeStack.shift(); - indexStack.shift(); - continue; - } - const element = nodeStack[0][indexStack[0]++]; - if (isTag2(element) && test(element)) - result.push(element); - if (hasChildren(element) && element.children.length > 0) { - indexStack.unshift(0); - nodeStack.unshift(element.children); - } - } -} - -// node_modules/domutils/dist/legacy.js -var Checks = { - tag_name(name) { - if (typeof name === "function") { - return (element) => isTag2(element) && name(element.name); - } - if (name === "*") { - return isTag2; - } - return (element) => isTag2(element) && element.name === name; - }, - tag_type(type) { - if (typeof type === "function") { - return (element) => type(element.type); - } - return (element) => element.type === type; - }, - tag_contains(data) { - if (typeof data === "function") { - return (element) => isText(element) && data(element.data); - } - return (element) => isText(element) && element.data === data; - } -}; -function getAttribCheck(attrib, value) { - if (typeof value === "function") { - return (element) => isTag2(element) && value(element.attribs[attrib]); - } - return (element) => isTag2(element) && element.attribs[attrib] === value; -} -function combineFuncs(a, b) { - return (element) => a(element) || b(element); -} -function compileTest(options) { - const funcs = Object.keys(options).map((key) => { - const value = options[key]; - return Object.hasOwn(Checks, key) ? Checks[key](value) : getAttribCheck(key, value); - }); - return funcs.length === 0 ? null : funcs.reduce(combineFuncs); -} -function testElement(options, node2) { - const test = compileTest(options); - return test ? test(node2) : true; -} -function getElements(options, nodes, recurse, limit = Number.POSITIVE_INFINITY) { - const test = compileTest(options); - return test ? filter(test, nodes, recurse, limit) : []; -} -function getElementById(id, nodes, recurse = true) { - if (!Array.isArray(nodes)) - nodes = [nodes]; - return findOne(getAttribCheck("id", id), nodes, recurse); -} -function getElementsByTagName(tagName, nodes, recurse = true, limit = Number.POSITIVE_INFINITY) { - return filter(Checks["tag_name"](tagName), nodes, recurse, limit); -} -function getElementsByClassName(className, nodes, recurse = true, limit = Number.POSITIVE_INFINITY) { - return filter(getAttribCheck("class", className), nodes, recurse, limit); -} -function getElementsByTagType(type, nodes, recurse = true, limit = Number.POSITIVE_INFINITY) { - return filter(Checks["tag_type"](type), nodes, recurse, limit); -} - -// node_modules/entities/dist/escape.js -var xmlCodeMap = new Map([ - [34, """], - [38, "&"], - [39, "'"], - [60, "<"], - [62, ">"] -]); -var getCodePoint = typeof String.prototype.codePointAt === "function" ? (input, index) => input.codePointAt(index) : (c, index) => (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index); -var XML_BITSET_VALUE = 1342177476; -function encodeXML(input) { - let out; - let last = 0; - const { length } = input; - for (let index = 0;index < length; index++) { - const char = input.charCodeAt(index); - if (char < 128 && ((XML_BITSET_VALUE >>> char & 1) === 0 || char >= 64 || char < 32)) { - continue; - } - if (out === undefined) - out = input.substring(0, index); - else if (last !== index) - out += input.substring(last, index); - if (char < 64) { - out += xmlCodeMap.get(char); - last = index + 1; - continue; - } - const cp = getCodePoint(input, index); - out += `&#x${cp.toString(16)};`; - if (cp !== char) - index++; - last = index + 1; - } - if (out === undefined) - return input; - if (last < length) - out += input.substr(last); - return out; -} -function getEscaper(regex, map) { - return function escape(data) { - let match; - let lastIndex = 0; - let result = ""; - while (match = regex.exec(data)) { - if (lastIndex !== match.index) { - result += data.substring(lastIndex, match.index); - } - result += map.get(match[0].charCodeAt(0)); - lastIndex = match.index + 1; - } - return result + data.substring(lastIndex); - }; -} -var escapeAttribute = /* @__PURE__ */ getEscaper(/["&\u00A0]/g, new Map([ - [34, """], - [38, "&"], - [160, " "] -])); -var escapeText = /* @__PURE__ */ getEscaper(/[&<>\u00A0]/g, new Map([ - [38, "&"], - [60, "<"], - [62, ">"], - [160, " "] -])); - -// node_modules/entities/dist/index.js -var EntityLevel; -(function(EntityLevel2) { - EntityLevel2[EntityLevel2["XML"] = 0] = "XML"; - EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML"; -})(EntityLevel || (EntityLevel = {})); -var EncodingMode; -(function(EncodingMode2) { - EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8"; - EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII"; - EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive"; - EncodingMode2[EncodingMode2["Attribute"] = 3] = "Attribute"; - EncodingMode2[EncodingMode2["Text"] = 4] = "Text"; -})(EncodingMode || (EncodingMode = {})); - -// node_modules/dom-serializer/dist/foreign-names.js -var elementNames = new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map((name) => [name.toLowerCase(), name])); -var attributeNames = new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map((name) => [name.toLowerCase(), name])); - -// node_modules/dom-serializer/dist/index.js -var unencodedElements = new Set("style script xmp iframe noembed noframes plaintext noscript".split(" ")); -var voidElements2 = new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")); -var foreignElements = new Set(["svg", "math"]); -var foreignModeIntegrationPoints = new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" ")); -function render(node2, options = {}) { - const nodes = "length" in node2 ? node2 : [node2]; - const xmlMode = options.xmlMode ?? false; - let output = ""; - for (let index = 0;index < nodes.length; index++) { - output += renderNode(nodes[index], options, xmlMode); - } - return output; -} -var dist_default = render; -function renderChildren(children, options, xmlMode) { - let output = ""; - for (let index = 0;index < children.length; index++) { - output += renderNode(children[index], options, xmlMode); - } - return output; -} -function renderNode(node2, options, xmlMode) { - switch (node2.type) { - case Root: { - return renderChildren(node2.children, options, xmlMode); - } - case Directive: { - return `<${node2.data}>`; - } - case Comment: { - return ``; - } - case CDATA: { - return ``; - } - case Script: - case Style: - case Tag: { - return renderTag(node2, options, xmlMode); - } - case Text: { - const element = node2; - const data = element.data || ""; - if ((options.encodeEntities ?? options.decodeEntities) !== false && !(!xmlMode && element.parent && unencodedElements.has(element.parent.name))) { - return xmlMode || options.encodeEntities !== "utf8" ? encodeXML(data) : escapeText(data); - } - return data; - } - } -} -function renderTag(element, options, xmlMode) { - if (xmlMode === "foreign") { - element.name = elementNames.get(element.name) ?? element.name; - if (element.parent && foreignModeIntegrationPoints.has(element.parent.name)) { - xmlMode = false; - } - } - if (!xmlMode && foreignElements.has(element.name)) { - xmlMode = "foreign"; - } - const { name, children } = element; - const isVoid = !xmlMode && voidElements2.has(name); - let tag = `<${name}${formatAttributes(element.attribs, options, xmlMode)}`; - if (children.length === 0 && (xmlMode ? options.selfClosingTags !== false : options.selfClosingTags && isVoid)) { - tag += xmlMode ? "/>" : " />"; - } else { - tag += ">"; - if (children.length > 0) { - tag += renderChildren(children, options, xmlMode); - } - if (!isVoid) { - tag += ``; - } - } - return tag; -} -function replaceQuotes(value) { - return value.replaceAll('"', """); -} -function formatAttributes(attributes, options, xmlMode) { - if (!attributes) - return ""; - const encode = (options.encodeEntities ?? options.decodeEntities) === false ? replaceQuotes : xmlMode || options.encodeEntities !== "utf8" ? encodeXML : escapeAttribute; - const isForeign = xmlMode === "foreign"; - const showEmpty = !!(options.emptyAttrs ?? xmlMode); - let result = ""; - for (const key in attributes) { - if (!Object.hasOwn(attributes, key)) - continue; - const value = attributes[key]; - const k = isForeign ? attributeNames.get(key) ?? key : key; - result += !showEmpty && (value == null || value === "") ? ` ${k}` : ` ${k}="${encode(value == null ? "" : String(value))}"`; - } - return result; -} - -// node_modules/domutils/dist/stringify.js -function getOuterHTML(node2, options) { - return dist_default(node2, options); -} -function getInnerHTML(node2, options) { - return hasChildren(node2) ? node2.children.map((node3) => getOuterHTML(node3, options)).join("") : ""; -} -function getText(node2) { - if (Array.isArray(node2)) - return node2.map(getText).join(""); - if (isTag2(node2)) - return node2.name === "br" ? ` -` : getText(node2.children); - if (isCDATA(node2)) - return getText(node2.children); - if (isText(node2)) - return node2.data; - return ""; -} -function textContent(node2) { - if (Array.isArray(node2)) - return node2.map(textContent).join(""); - if (hasChildren(node2) && !isComment(node2)) { - return textContent(node2.children); - } - if (isText(node2)) - return node2.data; - return ""; -} -function innerText(node2) { - if (Array.isArray(node2)) - return node2.map(innerText).join(""); - if (hasChildren(node2) && (node2.type === ElementType.Tag || isCDATA(node2))) { - return innerText(node2.children); - } - if (isText(node2)) - return node2.data; - return ""; -} - -// node_modules/domutils/dist/feeds.js -function getFeed(document) { - const feedRoot = getOneElement(isValidFeed, document); - return feedRoot ? feedRoot.name === "feed" ? getAtomFeed(feedRoot) : getRssFeed(feedRoot) : null; -} -function getAtomFeed(feedRoot) { - const childs = feedRoot.children; - const feed = { - type: "atom", - items: getElementsByTagName("entry", childs).map((item) => { - const { children } = item; - const entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "id", children); - addConditionally(entry, "title", "title", children); - const href2 = getOneElement("link", children)?.attribs["href"]; - if (href2) { - entry.link = href2; - } - const description = fetch("summary", children) || fetch("content", children); - if (description) { - entry.description = description; - } - const pubDate = fetch("updated", children); - if (pubDate) { - entry.pubDate = new Date(pubDate); - } - return entry; - }) - }; - addConditionally(feed, "id", "id", childs); - addConditionally(feed, "title", "title", childs); - const href = getOneElement("link", childs)?.attribs["href"]; - if (href) { - feed.link = href; - } - addConditionally(feed, "description", "subtitle", childs); - const updated = fetch("updated", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "email", childs, true); - return feed; -} -function getRssFeed(feedRoot) { - const childs = getOneElement("channel", feedRoot.children)?.children ?? []; - const feed = { - type: feedRoot.name.substr(0, 3), - id: "", - items: getElementsByTagName("item", feedRoot.children).map((item) => { - const { children } = item; - const entry = { media: getMediaElements(children) }; - addConditionally(entry, "id", "guid", children); - addConditionally(entry, "title", "title", children); - addConditionally(entry, "link", "link", children); - addConditionally(entry, "description", "description", children); - const pubDate = fetch("pubDate", children) || fetch("dc:date", children); - if (pubDate) - entry.pubDate = new Date(pubDate); - return entry; - }) - }; - addConditionally(feed, "title", "title", childs); - addConditionally(feed, "link", "link", childs); - addConditionally(feed, "description", "description", childs); - const updated = fetch("lastBuildDate", childs); - if (updated) { - feed.updated = new Date(updated); - } - addConditionally(feed, "author", "managingEditor", childs, true); - return feed; -} -var MEDIA_KEYS_STRING = ["url", "type", "lang"]; -var MEDIA_KEYS_INT = [ - "fileSize", - "bitrate", - "framerate", - "samplingrate", - "channels", - "duration", - "height", - "width" -]; -function getMediaElements(where) { - return getElementsByTagName("media:content", where).map((element) => { - const { attribs } = element; - const media = { - medium: attribs["medium"], - isDefault: !!attribs["isDefault"] - }; - for (const attrib of MEDIA_KEYS_STRING) { - if (attribs[attrib]) { - media[attrib] = attribs[attrib]; - } - } - for (const attrib of MEDIA_KEYS_INT) { - if (attribs[attrib]) { - media[attrib] = Number.parseInt(attribs[attrib], 10); - } - } - if (attribs["expression"]) { - media.expression = attribs["expression"]; - } - return media; - }); -} -function getOneElement(tagName, node2) { - return getElementsByTagName(tagName, node2, true, 1)[0]; -} -function fetch(tagName, where, recurse = false) { - return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim(); -} -function addConditionally(object, property, tagName, where, recurse = false) { - const value = fetch(tagName, where, recurse); - if (value) - object[property] = value; -} -function isValidFeed(value) { - return value === "rss" || value === "feed" || value === "rdf:RDF"; -} -// node_modules/domutils/dist/helpers.js -function removeSubsets(nodes) { - let index = nodes.length; - while (--index >= 0) { - const node2 = nodes[index]; - if (index > 0 && nodes.lastIndexOf(node2, index - 1) >= 0) { - nodes.splice(index, 1); - continue; - } - for (let ancestor = node2.parent;ancestor; ancestor = ancestor.parent) { - if (nodes.includes(ancestor)) { - nodes.splice(index, 1); - break; - } - } - } - return nodes; -} -var DocumentPosition; -(function(DocumentPosition2) { - DocumentPosition2[DocumentPosition2["DISCONNECTED"] = 1] = "DISCONNECTED"; - DocumentPosition2[DocumentPosition2["PRECEDING"] = 2] = "PRECEDING"; - DocumentPosition2[DocumentPosition2["FOLLOWING"] = 4] = "FOLLOWING"; - DocumentPosition2[DocumentPosition2["CONTAINS"] = 8] = "CONTAINS"; - DocumentPosition2[DocumentPosition2["CONTAINED_BY"] = 16] = "CONTAINED_BY"; -})(DocumentPosition || (DocumentPosition = {})); -function compareDocumentPosition(nodeA, nodeB) { - const aParents = []; - const bParents = []; - if (nodeA === nodeB) { - return 0; - } - let current = hasChildren(nodeA) ? nodeA : nodeA.parent; - while (current) { - aParents.unshift(current); - current = current.parent; - } - current = hasChildren(nodeB) ? nodeB : nodeB.parent; - while (current) { - bParents.unshift(current); - current = current.parent; - } - const maxIndex = Math.min(aParents.length, bParents.length); - let index = 0; - while (index < maxIndex && aParents[index] === bParents[index]) { - index++; - } - if (index === 0) { - return DocumentPosition.DISCONNECTED; - } - const sharedParent = aParents[index - 1]; - const siblings = sharedParent.children; - const aSibling = aParents[index]; - const bSibling = bParents[index]; - if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { - if (sharedParent === nodeB) { - return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; - } - return DocumentPosition.FOLLOWING; - } - if (sharedParent === nodeA) { - return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; - } - return DocumentPosition.PRECEDING; -} -function uniqueSort(nodes) { - nodes = nodes.filter((node2, index, array) => !array.includes(node2, index + 1)); - nodes.sort((a, b) => { - const relative = compareDocumentPosition(a, b); - if (relative & DocumentPosition.PRECEDING) { - return -1; - } - if (relative & DocumentPosition.FOLLOWING) { - return 1; - } - return 0; - }); - return nodes; -} -// node_modules/domutils/dist/manipulation.js -function removeElement(element) { - if (element.prev) - element.prev.next = element.next; - if (element.next) - element.next.prev = element.prev; - if (element.parent) { - const childs = element.parent.children; - const childsIndex = childs.lastIndexOf(element); - if (childsIndex !== -1) { - childs.splice(childsIndex, 1); - } - } - element.next = null; - element.prev = null; - element.parent = null; -} -function replaceElement(element, replacement) { - replacement.prev = element.prev; - if (replacement.prev) { - replacement.prev.next = replacement; - } - replacement.next = element.next; - if (replacement.next) { - replacement.next.prev = replacement; - } - replacement.parent = element.parent; - if (replacement.parent) { - const { children } = replacement.parent; - const elementIndex = children.lastIndexOf(element); - if (elementIndex === -1) { - return; - } - children[elementIndex] = replacement; - element.parent = null; - } -} -function appendChild(parent, child) { - removeElement(child); - child.next = null; - child.parent = parent; - if (parent.children.push(child) > 1) { - const sibling = parent.children[parent.children.length - 2]; - sibling.next = child; - child.prev = sibling; - } else { - child.prev = null; - } -} -function append(element, next) { - removeElement(next); - const { parent } = element; - const currentNext = element.next; - next.next = currentNext; - next.prev = element; - element.next = next; - next.parent = parent; - if (currentNext) { - currentNext.prev = next; - if (parent) { - const childs = parent.children; - childs.splice(childs.lastIndexOf(currentNext), 0, next); - } - } else if (parent) { - parent.children.push(next); - } -} -function prependChild(parent, child) { - removeElement(child); - child.parent = parent; - child.prev = null; - if (parent.children.unshift(child) === 1) { - child.next = null; - } else { - const sibling = parent.children[1]; - sibling.prev = child; - child.next = sibling; - } -} -function prepend(element, previous) { - removeElement(previous); - const { parent } = element; - if (parent) { - const childs = parent.children; - childs.splice(childs.indexOf(element), 0, previous); - } - if (element.prev) { - element.prev.next = previous; - } - previous.parent = parent; - previous.prev = element.prev; - previous.next = element; - element.prev = previous; -} -// node_modules/domutils/dist/traversal.js -function getChildren(element) { - return hasChildren(element) ? element.children : []; -} -function getParent(element) { - return element.parent || null; -} -function getSiblings(element) { - const parent = getParent(element); - if (parent != null) - return getChildren(parent); - const siblings = [element]; - let { prev, next } = element; - while (prev != null) { - siblings.unshift(prev); - ({ prev } = prev); - } - while (next != null) { - siblings.push(next); - ({ next } = next); - } - return siblings; -} -function getAttributeValue(element, name) { - const { attribs } = element; - return attribs?.[name]; -} -function hasAttrib(element, name) { - const { attribs } = element; - return attribs != null && Object.hasOwn(attribs, name) && attribs[name] != null; -} -function getName(element) { - return element.name; -} -function nextElementSibling(element) { - let { next } = element; - while (next !== null && !isTag2(next)) - ({ next } = next); - return next; -} -function prevElementSibling(element) { - let { prev } = element; - while (prev !== null && !isTag2(prev)) - ({ prev } = prev); - return prev; -} -// node_modules/htmlparser2/dist/index.js -function parseDocument(data, options) { - const handler = new DomHandler(undefined, options); - new Parser(handler, options).end(data); - return handler.root; -} -function createDocumentStream(callback, options, elementCallback) { - const handler = new DomHandler((error) => callback(error, handler.root), options, elementCallback); - return new Parser(handler, options); -} -var parseFeedDefaultOptions = { xmlMode: true }; -function parseFeed(feed, options = parseFeedDefaultOptions) { - return getFeed(parseDocument(feed, options).children); -} -// node_modules/css-select/dist/index.js -var exports_dist5 = {}; -__export(exports_dist5, { - selectOne: () => selectOne, - selectAll: () => selectAll, - prepareContext: () => prepareContext, - is: () => is2, - default: () => dist_default2, - compile: () => compile2, - _compileUnsafe: () => _compileUnsafe -}); - -// node_modules/boolbase/dist/index.js -function trueFunc() { - return true; -} -function falseFunc() { - return false; -} - -// node_modules/css-what/dist/types.js -var SelectorType; -(function(SelectorType2) { - SelectorType2["Attribute"] = "attribute"; - SelectorType2["Pseudo"] = "pseudo"; - SelectorType2["PseudoElement"] = "pseudo-element"; - SelectorType2["Tag"] = "tag"; - SelectorType2["Universal"] = "universal"; - SelectorType2["Adjacent"] = "adjacent"; - SelectorType2["Child"] = "child"; - SelectorType2["Descendant"] = "descendant"; - SelectorType2["Parent"] = "parent"; - SelectorType2["Sibling"] = "sibling"; - SelectorType2["ColumnCombinator"] = "column-combinator"; -})(SelectorType || (SelectorType = {})); -var AttributeAction; -(function(AttributeAction2) { - AttributeAction2["Any"] = "any"; - AttributeAction2["Element"] = "element"; - AttributeAction2["End"] = "end"; - AttributeAction2["Equals"] = "equals"; - AttributeAction2["Exists"] = "exists"; - AttributeAction2["Hyphen"] = "hyphen"; - AttributeAction2["Not"] = "not"; - AttributeAction2["Start"] = "start"; -})(AttributeAction || (AttributeAction = {})); - -// node_modules/css-what/dist/parse.js -var reName = /^[^#\\]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\u00B0-\uFFFF-])+/; -var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi; -var CharCode; -(function(CharCode2) { - CharCode2[CharCode2["LeftParenthesis"] = 40] = "LeftParenthesis"; - CharCode2[CharCode2["RightParenthesis"] = 41] = "RightParenthesis"; - CharCode2[CharCode2["LeftSquareBracket"] = 91] = "LeftSquareBracket"; - CharCode2[CharCode2["RightSquareBracket"] = 93] = "RightSquareBracket"; - CharCode2[CharCode2["Comma"] = 44] = "Comma"; - CharCode2[CharCode2["Period"] = 46] = "Period"; - CharCode2[CharCode2["Colon"] = 58] = "Colon"; - CharCode2[CharCode2["SingleQuote"] = 39] = "SingleQuote"; - CharCode2[CharCode2["DoubleQuote"] = 34] = "DoubleQuote"; - CharCode2[CharCode2["Plus"] = 43] = "Plus"; - CharCode2[CharCode2["Tilde"] = 126] = "Tilde"; - CharCode2[CharCode2["QuestionMark"] = 63] = "QuestionMark"; - CharCode2[CharCode2["ExclamationMark"] = 33] = "ExclamationMark"; - CharCode2[CharCode2["Slash"] = 47] = "Slash"; - CharCode2[CharCode2["Equal"] = 61] = "Equal"; - CharCode2[CharCode2["Dollar"] = 36] = "Dollar"; - CharCode2[CharCode2["Pipe"] = 124] = "Pipe"; - CharCode2[CharCode2["Circumflex"] = 94] = "Circumflex"; - CharCode2[CharCode2["Asterisk"] = 42] = "Asterisk"; - CharCode2[CharCode2["GreaterThan"] = 62] = "GreaterThan"; - CharCode2[CharCode2["LessThan"] = 60] = "LessThan"; - CharCode2[CharCode2["Hash"] = 35] = "Hash"; - CharCode2[CharCode2["LowerI"] = 105] = "LowerI"; - CharCode2[CharCode2["LowerS"] = 115] = "LowerS"; - CharCode2[CharCode2["BackSlash"] = 92] = "BackSlash"; - CharCode2[CharCode2["Space"] = 32] = "Space"; - CharCode2[CharCode2["Tab"] = 9] = "Tab"; - CharCode2[CharCode2["NewLine"] = 10] = "NewLine"; - CharCode2[CharCode2["FormFeed"] = 12] = "FormFeed"; - CharCode2[CharCode2["CarriageReturn"] = 13] = "CarriageReturn"; -})(CharCode || (CharCode = {})); -var actionTypes = new Map([ - [CharCode.Tilde, AttributeAction.Element], - [CharCode.Circumflex, AttributeAction.Start], - [CharCode.Dollar, AttributeAction.End], - [CharCode.Asterisk, AttributeAction.Any], - [CharCode.ExclamationMark, AttributeAction.Not], - [CharCode.Pipe, AttributeAction.Hyphen] -]); -var unpackPseudos = new Set([ - "has", - "not", - "matches", - "is", - "where", - "host", - "host-context" -]); -var pseudosToPseudoElements = new Set([ - "before", - "after", - "first-line", - "first-letter" -]); -function isTraversal(selector) { - switch (selector.type) { - case SelectorType.Adjacent: - case SelectorType.Child: - case SelectorType.Descendant: - case SelectorType.Parent: - case SelectorType.Sibling: - case SelectorType.ColumnCombinator: { - return true; - } - case SelectorType.Attribute: - case SelectorType.Pseudo: - case SelectorType.PseudoElement: - case SelectorType.Tag: - case SelectorType.Universal: { - return false; - } - } -} -var stripQuotesFromPseudos = new Set(["contains", "icontains"]); -function funescape(_, escaped, escapedWhitespace) { - const high = Number.parseInt(escaped, 16) - 65536; - return Number.isNaN(high) || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); -} -function unescapeCSS(cssString) { - return cssString.replace(reEscape, funescape); -} -function isQuote(c) { - return c === CharCode.SingleQuote || c === CharCode.DoubleQuote; -} -function isWhitespace2(c) { - return c === CharCode.Space || c === CharCode.Tab || c === CharCode.NewLine || c === CharCode.FormFeed || c === CharCode.CarriageReturn; -} -function parse(selector) { - const subselects = []; - const endIndex = parseSelector(subselects, `${selector}`, 0); - if (endIndex < selector.length) { - throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`); - } - return subselects; -} -function parseSelector(subselects, selector, selectorIndex) { - let tokens = []; - function getName2(offset) { - const match = selector.slice(selectorIndex + offset).match(reName); - if (!match) { - throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`); - } - const [name] = match; - selectorIndex += offset + name.length; - return unescapeCSS(name); - } - function stripWhitespace(offset) { - selectorIndex += offset; - while (selectorIndex < selector.length && isWhitespace2(selector.charCodeAt(selectorIndex))) { - selectorIndex++; - } - } - function readValueWithParenthesis() { - selectorIndex += 1; - const start = selectorIndex; - for (let counter = 1;selectorIndex < selector.length; selectorIndex++) { - switch (selector.charCodeAt(selectorIndex)) { - case CharCode.BackSlash: { - selectorIndex += 1; - break; - } - case CharCode.LeftParenthesis: { - counter += 1; - break; - } - case CharCode.RightParenthesis: { - counter -= 1; - if (counter === 0) { - return unescapeCSS(selector.slice(start, selectorIndex++)); - } - break; - } - } - } - throw new Error("Parenthesis not matched"); - } - function ensureNotTraversal() { - if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { - throw new Error("Did not expect successive traversals."); - } - } - function addTraversal(type) { - if (tokens.length > 0 && tokens[tokens.length - 1].type === SelectorType.Descendant) { - tokens[tokens.length - 1].type = type; - return; - } - ensureNotTraversal(); - tokens.push({ type }); - } - function addSpecialAttribute(name, action) { - tokens.push({ - type: SelectorType.Attribute, - name, - action, - value: getName2(1), - namespace: null, - ignoreCase: "quirks" - }); - } - function finalizeSubselector() { - if (tokens.length > 0 && tokens[tokens.length - 1].type === SelectorType.Descendant) { - tokens.pop(); - } - if (tokens.length === 0) { - throw new Error("Empty sub-selector"); - } - subselects.push(tokens); - } - stripWhitespace(0); - if (selector.length === selectorIndex) { - return selectorIndex; - } - loop: - while (selectorIndex < selector.length) { - const firstChar = selector.charCodeAt(selectorIndex); - switch (firstChar) { - case CharCode.Space: - case CharCode.Tab: - case CharCode.NewLine: - case CharCode.FormFeed: - case CharCode.CarriageReturn: { - if (tokens.length === 0 || tokens[0].type !== SelectorType.Descendant) { - ensureNotTraversal(); - tokens.push({ type: SelectorType.Descendant }); - } - stripWhitespace(1); - break; - } - case CharCode.GreaterThan: { - addTraversal(SelectorType.Child); - stripWhitespace(1); - break; - } - case CharCode.LessThan: { - addTraversal(SelectorType.Parent); - stripWhitespace(1); - break; - } - case CharCode.Tilde: { - addTraversal(SelectorType.Sibling); - stripWhitespace(1); - break; - } - case CharCode.Plus: { - addTraversal(SelectorType.Adjacent); - stripWhitespace(1); - break; - } - case CharCode.Period: { - addSpecialAttribute("class", AttributeAction.Element); - break; - } - case CharCode.Hash: { - addSpecialAttribute("id", AttributeAction.Equals); - break; - } - case CharCode.LeftSquareBracket: { - stripWhitespace(1); - let name; - let namespace = null; - if (selector.charCodeAt(selectorIndex) === CharCode.Pipe) { - name = getName2(1); - } else if (selector.startsWith("*|", selectorIndex)) { - namespace = "*"; - name = getName2(2); - } else { - name = getName2(0); - if (selector.charCodeAt(selectorIndex) === CharCode.Pipe && selector.charCodeAt(selectorIndex + 1) !== CharCode.Equal) { - namespace = name; - name = getName2(1); - } - } - stripWhitespace(0); - let action = AttributeAction.Exists; - const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex)); - if (possibleAction) { - action = possibleAction; - if (selector.charCodeAt(selectorIndex + 1) !== CharCode.Equal) { - throw new Error("Expected `=`"); - } - stripWhitespace(2); - } else if (selector.charCodeAt(selectorIndex) === CharCode.Equal) { - action = AttributeAction.Equals; - stripWhitespace(1); - } - let value = ""; - let ignoreCase = null; - if (action !== "exists") { - if (isQuote(selector.charCodeAt(selectorIndex))) { - const quote = selector.charCodeAt(selectorIndex); - selectorIndex += 1; - const sectionStart = selectorIndex; - while (selectorIndex < selector.length && selector.charCodeAt(selectorIndex) !== quote) { - selectorIndex += selector.charCodeAt(selectorIndex) === CharCode.BackSlash ? 2 : 1; - } - if (selector.charCodeAt(selectorIndex) !== quote) { - throw new Error("Attribute value didn't end"); - } - value = unescapeCSS(selector.slice(sectionStart, selectorIndex)); - selectorIndex += 1; - } else { - const valueStart = selectorIndex; - while (selectorIndex < selector.length && !isWhitespace2(selector.charCodeAt(selectorIndex)) && selector.charCodeAt(selectorIndex) !== CharCode.RightSquareBracket) { - selectorIndex += selector.charCodeAt(selectorIndex) === CharCode.BackSlash ? 2 : 1; - } - value = unescapeCSS(selector.slice(valueStart, selectorIndex)); - } - stripWhitespace(0); - switch (selector.charCodeAt(selectorIndex) | 32) { - case CharCode.LowerI: { - ignoreCase = true; - stripWhitespace(1); - break; - } - case CharCode.LowerS: { - ignoreCase = false; - stripWhitespace(1); - break; - } - } - } - if (selector.charCodeAt(selectorIndex) !== CharCode.RightSquareBracket) { - throw new Error("Attribute selector didn't terminate"); - } - selectorIndex += 1; - const attributeSelector = { - type: SelectorType.Attribute, - name, - action, - value, - namespace, - ignoreCase - }; - tokens.push(attributeSelector); - break; - } - case CharCode.Colon: { - if (selector.charCodeAt(selectorIndex + 1) === CharCode.Colon) { - tokens.push({ - type: SelectorType.PseudoElement, - name: getName2(2).toLowerCase(), - data: selector.charCodeAt(selectorIndex) === CharCode.LeftParenthesis ? readValueWithParenthesis() : null - }); - break; - } - const name = getName2(1).toLowerCase(); - if (pseudosToPseudoElements.has(name)) { - tokens.push({ - type: SelectorType.PseudoElement, - name, - data: null - }); - break; - } - let data = null; - if (selector.charCodeAt(selectorIndex) === CharCode.LeftParenthesis) { - if (unpackPseudos.has(name)) { - if (isQuote(selector.charCodeAt(selectorIndex + 1))) { - throw new Error(`Pseudo-selector ${name} cannot be quoted`); - } - data = []; - selectorIndex = parseSelector(data, selector, selectorIndex + 1); - if (selector.charCodeAt(selectorIndex) !== CharCode.RightParenthesis) { - throw new Error(`Missing closing parenthesis in :${name} (${selector})`); - } - selectorIndex += 1; - } else { - data = readValueWithParenthesis(); - if (stripQuotesFromPseudos.has(name)) { - const quot = data.charCodeAt(0); - if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) { - data = data.slice(1, -1); - } - } - data = unescapeCSS(data); - } - } - tokens.push({ type: SelectorType.Pseudo, name, data }); - break; - } - case CharCode.Comma: { - finalizeSubselector(); - tokens = []; - stripWhitespace(1); - break; - } - default: { - if (selector.startsWith("/*", selectorIndex)) { - const endIndex = selector.indexOf("*/", selectorIndex + 2); - if (endIndex === -1) { - throw new Error("Comment was not terminated"); - } - selectorIndex = endIndex + 2; - if (tokens.length === 0) { - stripWhitespace(0); - } - break; - } - let namespace = null; - let name; - if (firstChar === CharCode.Asterisk) { - selectorIndex += 1; - name = "*"; - } else if (firstChar === CharCode.Pipe) { - name = ""; - if (selector.charCodeAt(selectorIndex + 1) === CharCode.Pipe) { - addTraversal(SelectorType.ColumnCombinator); - stripWhitespace(2); - break; - } - } else if (reName.test(selector.slice(selectorIndex))) { - name = getName2(0); - } else { - break loop; - } - if (selector.charCodeAt(selectorIndex) === CharCode.Pipe && selector.charCodeAt(selectorIndex + 1) !== CharCode.Pipe) { - namespace = name; - if (selector.charCodeAt(selectorIndex + 1) === CharCode.Asterisk) { - name = "*"; - selectorIndex += 2; - } else { - name = getName2(1); - } - } - tokens.push(name === "*" ? { type: SelectorType.Universal, namespace } : { type: SelectorType.Tag, name, namespace }); - } - } - } - finalizeSubselector(); - return selectorIndex; -} -// node_modules/css-select/dist/attributes.js -var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; -var whitespaceRe = /\s/; -function escapeRegex(value) { - return value.replace(reChars, "\\$&"); -} -var caseInsensitiveAttributes = new Set([ - "accept", - "accept-charset", - "align", - "alink", - "axis", - "bgcolor", - "charset", - "checked", - "clear", - "codetype", - "color", - "compact", - "declare", - "defer", - "dir", - "direction", - "disabled", - "enctype", - "face", - "frame", - "hreflang", - "http-equiv", - "lang", - "language", - "link", - "media", - "method", - "multiple", - "nohref", - "noresize", - "noshade", - "nowrap", - "readonly", - "rel", - "rev", - "rules", - "scope", - "scrolling", - "selected", - "shape", - "target", - "text", - "type", - "valign", - "valuetype", - "vlink" -]); -function shouldIgnoreCase(selector, options) { - return typeof selector.ignoreCase === "boolean" ? selector.ignoreCase : selector.ignoreCase === "quirks" ? !!options.quirksMode : !options.xmlMode && caseInsensitiveAttributes.has(selector.name); -} -var attributeRules = { - equals(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (element) => { - const attribute = adapter.getAttributeValue(element, name); - return attribute != null && attribute.length === value.length && attribute.toLowerCase() === value && next(element); - }; - } - return (element) => adapter.getAttributeValue(element, name) === value && next(element); - }, - hyphen(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const { length } = value; - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return function hyphenIC(element) { - const attribute = adapter.getAttributeValue(element, name); - return attribute != null && (attribute.length === length || attribute.charAt(length) === "-") && attribute.substr(0, length).toLowerCase() === value && next(element); - }; - } - return function hyphen(element) { - const attribute = adapter.getAttributeValue(element, name); - return attribute != null && (attribute.length === length || attribute.charAt(length) === "-") && attribute.substr(0, length) === value && next(element); - }; - }, - element(next, data, options) { - const { adapter } = options; - const { name, value } = data; - if (whitespaceRe.test(value)) { - return falseFunc; - } - const regex = new RegExp(`(?:^|\\s)${escapeRegex(value)}(?:$|\\s)`, shouldIgnoreCase(data, options) ? "i" : ""); - return function element(node2) { - const attribute = adapter.getAttributeValue(node2, name); - return attribute != null && attribute.length >= value.length && regex.test(attribute) && next(node2); - }; - }, - exists(next, { name }, { adapter }) { - return (element) => adapter.hasAttrib(element, name) && next(element); - }, - start(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const { length } = value; - if (length === 0) { - return falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (element) => { - const attribute = adapter.getAttributeValue(element, name); - return attribute != null && attribute.length >= length && attribute.substr(0, length).toLowerCase() === value && next(element); - }; - } - return (element) => !!adapter.getAttributeValue(element, name)?.startsWith(value) && next(element); - }, - end(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - const length = -value.length; - if (length === 0) { - return falseFunc; - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (element) => adapter.getAttributeValue(element, name)?.substr(length).toLowerCase() === value && next(element); - } - return (element) => !!adapter.getAttributeValue(element, name)?.endsWith(value) && next(element); - }, - any(next, data, options) { - const { adapter } = options; - const { name, value } = data; - if (value === "") { - return falseFunc; - } - if (shouldIgnoreCase(data, options)) { - const regex = new RegExp(escapeRegex(value), "i"); - return function anyIC(element) { - const attribute = adapter.getAttributeValue(element, name); - return attribute != null && attribute.length >= value.length && regex.test(attribute) && next(element); - }; - } - return (element) => !!adapter.getAttributeValue(element, name)?.includes(value) && next(element); - }, - not(next, data, options) { - const { adapter } = options; - const { name } = data; - let { value } = data; - if (value === "") { - return (element) => !!adapter.getAttributeValue(element, name) && next(element); - } - if (shouldIgnoreCase(data, options)) { - value = value.toLowerCase(); - return (element) => { - const attribute = adapter.getAttributeValue(element, name); - return (attribute == null || attribute.length !== value.length || attribute.toLowerCase() !== value) && next(element); - }; - } - return (element) => adapter.getAttributeValue(element, name) !== value && next(element); - } -}; - -// node_modules/css-select/dist/helpers/querying.js -function findAll2(query, nodes, options) { - const { adapter, xmlMode = false } = options; - const result = []; - const nodeStack = [nodes]; - const indexStack = [0]; - for (;; ) { - if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return result; - } - nodeStack.shift(); - indexStack.shift(); - continue; - } - const element = nodeStack[0][indexStack[0]++]; - if (!adapter.isTag(element)) { - continue; - } - if (query(element)) { - result.push(element); - } - if (xmlMode || adapter.getName(element) !== "template") { - const children = adapter.getChildren(element); - if (children.length > 0) { - nodeStack.unshift(children); - indexStack.unshift(0); - } - } - } -} -function findOne2(query, nodes, options) { - const { adapter, xmlMode = false } = options; - const nodeStack = [nodes]; - const indexStack = [0]; - for (;; ) { - if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return null; - } - nodeStack.shift(); - indexStack.shift(); - continue; - } - const element = nodeStack[0][indexStack[0]++]; - if (!adapter.isTag(element)) { - continue; - } - if (query(element)) { - return element; - } - if (xmlMode || adapter.getName(element) !== "template") { - const children = adapter.getChildren(element); - if (children.length > 0) { - nodeStack.unshift(children); - indexStack.unshift(0); - } - } - } -} -function getNextSiblings(element, adapter) { - const siblings = adapter.getSiblings(element); - if (siblings.length <= 1) { - return []; - } - const elementIndex = siblings.indexOf(element); - if (elementIndex === -1 || elementIndex === siblings.length - 1) { - return []; - } - return siblings.slice(elementIndex + 1).filter(adapter.isTag); -} -function getElementParent(node2, adapter) { - const parent = adapter.getParent(node2); - return parent != null && adapter.isTag(parent) ? parent : null; -} - -// node_modules/css-select/dist/pseudo-selectors/aliases.js -var textControl = "input:is([type=text i],[type=search i],[type=url i],[type=tel i],[type=email i],[type=password i],[type=date i],[type=month i],[type=week i],[type=time i],[type=datetime-local i],[type=number i])"; -var aliases = { - "any-link": ":is(a, area, link)[href]", - link: ":any-link:not(:visited)", - disabled: `:is( +var jA=Object.create;var Cn=Object.defineProperty;var zA=Object.getOwnPropertyDescriptor;var _A=Object.getOwnPropertyNames;var $A=Object.getPrototypeOf,ta=Object.prototype.hasOwnProperty;var vt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},St=(t,e)=>{for(var n in e)Cn(t,n,{get:e[n],enumerable:!0})},ea=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of _A(e))!ta.call(t,r)&&r!==n&&Cn(t,r,{get:()=>e[r],enumerable:!(i=zA(e,r))||i.enumerable});return t};var na=(t,e,n)=>(n=t!=null?jA($A(t)):{},ea(e||!t||!t.__esModule?Cn(n,"default",{value:t,enumerable:!0}):n,t));var kA=vt(di=>{var bA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");di.encode=function(t){if(0<=t&&t{var yA=kA(),mi=5,BA=1<>1;return e?-n:n}xi.encode=function(e){var n="",i,r=zl(e);do i=r&wA,r>>>=mi,r>0&&(i|=EA),n+=yA.encode(i);while(r>0);return n};xi.decode=function(e,n,i){var r=e.length,s=0,o=0,a,l;do{if(n>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=yA.decode(e.charCodeAt(n++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));a=!!(l&EA),l&=wA,s=s+(l<{function $l(t,e,n){if(e in t)return t[e];if(arguments.length===3)return n;throw new Error('"'+e+'" is a required argument.')}M.getArg=$l;var FA=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,th=/^data:.+\,.+$/;function Ee(t){var e=t.match(FA);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}M.urlParse=Ee;function oe(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}M.urlGenerate=oe;var eh=32;function nh(t){var e=[];return function(n){for(var i=0;ieh&&e.pop(),s}}var Ci=nh(function(e){var n=e,i=Ee(e);if(i){if(!i.path)return e;n=i.path}for(var r=M.isAbsolute(n),s=[],o=0,a=0;;)if(o=a,a=n.indexOf("/",o),a===-1){s.push(n.slice(o));break}else for(s.push(n.slice(o,a));a=0;a--)l=s[a],l==="."?s.splice(a,1):l===".."?A++:A>0&&(l===""?(s.splice(a+1,A),A=0):(s.splice(a,2),A--));return n=s.join("/"),n===""&&(n=r?"/":"."),i?(i.path=n,oe(i)):n});M.normalize=Ci;function NA(t,e){t===""&&(t="."),e===""&&(e=".");var n=Ee(e),i=Ee(t);if(i&&(t=i.path||"/"),n&&!n.scheme)return i&&(n.scheme=i.scheme),oe(n);if(n||e.match(th))return e;if(i&&!i.host&&!i.path)return i.host=e,oe(i);var r=e.charAt(0)==="/"?e:Ci(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=r,oe(i)):r}M.join=NA;M.isAbsolute=function(t){return t.charAt(0)==="/"||FA.test(t)};function ih(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var n=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}M.relative=ih;var QA=(function(){var t=Object.create(null);return!("__proto__"in t)})();function TA(t){return t}function rh(t){return LA(t)?"$"+t:t}M.toSetString=QA?TA:rh;function sh(t){return LA(t)?t.slice(1):t}M.fromSetString=QA?TA:sh;function LA(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var n=e-10;n>=0;n--)if(t.charCodeAt(n)!==36)return!1;return!0}function oh(t,e,n){var i=Ct(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||n)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Ct(t.name,e.name)}M.compareByOriginalPositions=oh;function Ah(t,e,n){var i;return i=t.originalLine-e.originalLine,i!==0||(i=t.originalColumn-e.originalColumn,i!==0||n)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Ct(t.name,e.name)}M.compareByOriginalPositionsNoSource=Ah;function ah(t,e,n){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||n)||(i=Ct(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Ct(t.name,e.name)}M.compareByGeneratedPositionsDeflated=ah;function ch(t,e,n){var i=t.generatedColumn-e.generatedColumn;return i!==0||n||(i=Ct(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Ct(t.name,e.name)}M.compareByGeneratedPositionsDeflatedNoLine=ch;function Ct(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function lh(t,e){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=Ct(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ct(t.name,e.name)}M.compareByGeneratedPositionsInflated=lh;function hh(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}M.parseSourceMapInput=hh;function uh(t,e,n){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),n){var i=Ee(n);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var r=i.path.lastIndexOf("/");r>=0&&(i.path=i.path.substring(0,r+1))}e=NA(oe(i),e)}return Ci(e)}M.computeSourceURL=uh});var KA=vt(GA=>{var Ii=pn(),Si=Object.prototype.hasOwnProperty,Rt=typeof Map<"u";function It(){this._array=[],this._set=Rt?new Map:Object.create(null)}It.fromArray=function(e,n){for(var i=new It,r=0,s=e.length;r=0)return n}else{var i=Ii.toSetString(e);if(Si.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};It.prototype.at=function(e){if(e>=0&&e{var WA=pn();function fh(t,e){var n=t.generatedLine,i=e.generatedLine,r=t.generatedColumn,s=e.generatedColumn;return i>n||i==n&&s>=r||WA.compareByGeneratedPositionsInflated(t,e)<=0}function gn(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}gn.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)};gn.prototype.add=function(e){fh(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};gn.prototype.toArray=function(){return this._sorted||(this._array.sort(WA.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};YA.MappingList=gn});var MA=vt(vA=>{var De=DA(),W=pn(),dn=KA().ArraySet,ph=RA().MappingList;function st(t){t||(t={}),this._file=W.getArg(t,"file",null),this._sourceRoot=W.getArg(t,"sourceRoot",null),this._skipValidation=W.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=W.getArg(t,"ignoreInvalidMapping",!1),this._sources=new dn,this._names=new dn,this._mappings=new ph,this._sourcesContents=null}st.prototype._version=3;st.fromSourceMap=function(e,n){var i=e.sourceRoot,r=new st(Object.assign(n||{},{file:e.file,sourceRoot:i}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,i!=null&&(o.source=W.relative(i,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),r.addMapping(o)}),e.sources.forEach(function(s){var o=s;i!==null&&(o=W.relative(i,s)),r._sources.has(o)||r._sources.add(o);var a=e.sourceContentFor(s);a!=null&&r.setSourceContent(s,a)}),r};st.prototype.addMapping=function(e){var n=W.getArg(e,"generated"),i=W.getArg(e,"original",null),r=W.getArg(e,"source",null),s=W.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(n,i,r,s)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:r,name:s}))};st.prototype.setSourceContent=function(e,n){var i=e;this._sourceRoot!=null&&(i=W.relative(this._sourceRoot,i)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[W.toSetString(i)]=n):this._sourcesContents&&(delete this._sourcesContents[W.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};st.prototype.applySourceMap=function(e,n,i){var r=n;if(n==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var s=this._sourceRoot;s!=null&&(r=W.relative(s,r));var o=new dn,a=new dn;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var A=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});A.source!=null&&(l.source=A.source,i!=null&&(l.source=W.join(i,l.source)),s!=null&&(l.source=W.relative(s,l.source)),l.originalLine=A.line,l.originalColumn=A.column,A.name!=null&&(l.name=A.name))}var c=l.source;c!=null&&!o.has(c)&&o.add(c);var h=l.name;h!=null&&!a.has(h)&&a.add(h)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var A=e.sourceContentFor(l);A!=null&&(i!=null&&(l=W.join(i,l)),s!=null&&(l=W.relative(s,l)),this.setSourceContent(l,A))},this)};st.prototype._validateMapping=function(e,n,i,r){if(n&&typeof n.line!="number"&&typeof n.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!i&&!r)){if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&i)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:i,original:n,name:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};st.prototype._serializeMappings=function(){for(var e=0,n=1,i=0,r=0,s=0,o=0,a="",l,A,c,h,f=this._mappings.toArray(),p=0,x=f.length;p0){if(!W.compareByGeneratedPositionsInflated(A,f[p-1]))continue;l+=","}l+=De.encode(A.generatedColumn-e),e=A.generatedColumn,A.source!=null&&(h=this._sources.indexOf(A.source),l+=De.encode(h-o),o=h,l+=De.encode(A.originalLine-1-r),r=A.originalLine-1,l+=De.encode(A.originalColumn-i),i=A.originalColumn,A.name!=null&&(c=this._names.indexOf(A.name),l+=De.encode(c-s),s=c)),a+=l}return a};st.prototype._generateSourcesContent=function(e,n){return e.map(function(i){if(!this._sourcesContents)return null;n!=null&&(i=W.relative(n,i));var r=W.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};st.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};st.prototype.toString=function(){return JSON.stringify(this.toJSON())};vA.SourceMapGenerator=st});var $i={};St($i,{DefaultHandler:()=>kt,DomHandler:()=>kt,DomUtils:()=>Pt,ElementType:()=>Qe,Parser:()=>Nt,QuoteType:()=>_,Tokenizer:()=>Ft,createDocumentStream:()=>tc,getFeed:()=>pe,parseDocument:()=>_i,parseFeed:()=>nc});var ia=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Bi(t){return t>=55296&&t<=57343||t>1114111?65533:ia.get(t)??t}function Fe(t){let e=atob(t),n=e.length&-2,i=new Uint16Array(n/2);for(let r=0,s=0;r=N.ZERO&&t<=N.NINE}function ra(t){return t>=N.UPPER_A&&t<=N.UPPER_F||t>=N.LOWER_A&&t<=N.LOWER_F}function sa(t){return t>=N.UPPER_A&&t<=N.UPPER_Z||t>=N.LOWER_A&&t<=N.LOWER_Z||bn(t)}function oa(t){return t===N.EQUALS||sa(t)}var Y;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Y||(Y={}));var ot;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ot||(ot={}));var Ne=class{decodeTree;emitCodePoint;errors;constructor(e,n,i){this.decodeTree=e,this.emitCodePoint=n,this.errors=i}state=Y.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=ot.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=Y.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,n){switch(this.state){case Y.EntityStart:return e.charCodeAt(n)===N.NUM?(this.state=Y.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Y.NamedEntity,this.stateNamedEntity(e,n));case Y.NumericStart:return this.stateNumericStart(e,n);case Y.NumericDecimal:return this.stateNumericDecimal(e,n);case Y.NumericHex:return this.stateNumericHex(e,n);case Y.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|wi)===N.LOWER_X?(this.state=Y.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Y.NumericDecimal,this.stateNumericDecimal(e,n))}stateNumericHex(e,n){for(;n>14;for(;n>7;if(this.runConsumed===0){let l=r&U.JUMP_TABLE;if(e.charCodeAt(n)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}for(;this.runConsumed=e.length)return-1;let l=this.runConsumed-1,A=i[this.treeIndex+1+(l>>1)],c=l%2===0?A&255:A>>8&255;if(e.charCodeAt(n)!==c)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=i[this.treeIndex],s=(r&U.VALUE_LENGTH)>>14}if(n>=e.length)break;let o=e.charCodeAt(n);if(o===N.SEMI&&s!==0&&(r&U.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Aa(i,r,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===ot.Attribute&&(s===0||oa(o))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],s=(r&U.VALUE_LENGTH)>>14,s!==0){if(o===N.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ot.Strict&&(r&U.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}n++,this.excess++}return-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:n}=this,i=(n[e]&U.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,i,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,i){let{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~(U.VALUE_LENGTH|U.FLAG13):r[e+1],i),n===3&&this.emitCodePoint(r[e+2],i),i}end(){switch(this.state){case Y.NamedEntity:return this.result!==0&&(this.decodeMode!==ot.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Y.NumericDecimal:return this.emitNumericEntity(0,2);case Y.NumericHex:return this.emitNumericEntity(0,3);case Y.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Y.EntityStart:return 0}}};function Aa(t,e,n,i){let r=(e&U.BRANCH_LENGTH)>>7,s=e&U.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){let A=i-s;return A<0||A>=r?-1:t[n+A]-1}let o=r+1>>1,a=0,l=r-1;for(;a<=l;){let A=a+l>>>1,c=A>>1,f=t[n+c]>>(A&1)*8&255;if(fi)l=A-1;else return t[n+o+A]}return-1}var d;(function(t){t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn",t[t.Space=32]="Space",t[t.ExclamationMark=33]="ExclamationMark",t[t.Number=35]="Number",t[t.Amp=38]="Amp",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Dash=45]="Dash",t[t.Slash=47]="Slash",t[t.Zero=48]="Zero",t[t.Nine=57]="Nine",t[t.Semi=59]="Semi",t[t.Lt=60]="Lt",t[t.Eq=61]="Eq",t[t.Gt=62]="Gt",t[t.Questionmark=63]="Questionmark",t[t.UpperA=65]="UpperA",t[t.LowerA=97]="LowerA",t[t.UpperF=70]="UpperF",t[t.LowerF=102]="LowerF",t[t.UpperZ=90]="UpperZ",t[t.LowerZ=122]="LowerZ",t[t.LowerX=120]="LowerX",t[t.OpeningSquareBracket=91]="OpeningSquareBracket"})(d||(d={}));var u;(function(t){t[t.Text=1]="Text",t[t.BeforeTagName=2]="BeforeTagName",t[t.InTagName=3]="InTagName",t[t.InSelfClosingTag=4]="InSelfClosingTag",t[t.BeforeClosingTagName=5]="BeforeClosingTagName",t[t.InClosingTagName=6]="InClosingTagName",t[t.AfterClosingTagName=7]="AfterClosingTagName",t[t.BeforeAttributeName=8]="BeforeAttributeName",t[t.InAttributeName=9]="InAttributeName",t[t.AfterAttributeName=10]="AfterAttributeName",t[t.BeforeAttributeValue=11]="BeforeAttributeValue",t[t.InAttributeValueDq=12]="InAttributeValueDq",t[t.InAttributeValueSq=13]="InAttributeValueSq",t[t.InAttributeValueNq=14]="InAttributeValueNq",t[t.BeforeDeclaration=15]="BeforeDeclaration",t[t.InDeclaration=16]="InDeclaration",t[t.InProcessingInstruction=17]="InProcessingInstruction",t[t.BeforeComment=18]="BeforeComment",t[t.CDATASequence=19]="CDATASequence",t[t.DeclarationSequence=20]="DeclarationSequence",t[t.InSpecialComment=21]="InSpecialComment",t[t.InCommentLike=22]="InCommentLike",t[t.SpecialStartSequence=23]="SpecialStartSequence",t[t.InSpecialTag=24]="InSpecialTag",t[t.InPlainText=25]="InPlainText",t[t.InEntity=26]="InEntity"})(u||(u={}));function Dt(t){return t===d.Space||t===d.NewLine||t===d.Tab||t===d.FormFeed||t===d.CarriageReturn}function Mt(t){return t===d.Slash||t===d.Gt||Dt(t)}function aa(t){return t>=d.LowerA&&t<=d.LowerZ||t>=d.UpperA&&t<=d.UpperZ}var _;(function(t){t[t.NoValue=0]="NoValue",t[t.Unquoted=1]="Unquoted",t[t.Single=2]="Single",t[t.Double=3]="Double"})(_||(_={}));var I={Empty:new Uint8Array(0),Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},ca=new Map([[I.IframeEnd[2],I.IframeEnd],[I.NoembedEnd[2],I.NoembedEnd],[I.Plaintext[2],I.Plaintext],[I.ScriptEnd[2],I.ScriptEnd],[I.TitleEnd[2],I.TitleEnd],[I.XmpEnd[2],I.XmpEnd]]),Ft=class{cbs;state=u.Text;buffer="";sectionStart=0;index=0;entityStart=0;baseState=u.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:e=!1,decodeEntities:n=!0,recognizeSelfClosing:i=e},r){this.cbs=r,this.xmlMode=e,this.decodeEntities=n,this.recognizeSelfClosing=i,this.entityDecoder=new Ne(e?Sn:In,(s,o)=>this.emitCodePoint(s,o))}reset(){this.state=u.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=u.Text,this.isSpecial=!1,this.currentSequence=I.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=u.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===d.Amp&&this.startEntity()}currentSequence=I.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===I.Plaintext?(this.currentSequence=I.Empty,this.state=u.InPlainText):this.isSpecial?(this.state=u.InSpecialTag,this.sequenceIndex=0):this.state=u.Text}stateSpecialStartSequence(e){let n=e|32;if(this.sequenceIndex=0)this.state=this.baseState,n===0&&(this.index-=1);else{if(e=e))switch(this.state){case u.InTagName:case u.BeforeAttributeName:case u.BeforeAttributeValue:case u.AfterAttributeName:case u.InAttributeName:case u.InAttributeValueSq:case u.InAttributeValueDq:case u.InAttributeValueNq:case u.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,e)}}emitCodePoint(e,n){this.baseState!==u.Text&&this.baseState!==u.InSpecialTag?(this.sectionStart1){let r=Li.get(i);if(r!==void 0&&this.stack.includes(r))return r}return this.isInForeignContext()?i:i==="image"?"img":i}onopentagname(e,n){this.endIndex=n,this.emitOpenTag(this.readTagName(e,n))}emitOpenTag(e){if(this.openTagStart=this.startIndex,this.tagname=e,this.htmlMode&&e==="form"&&this.stack.includes("form")){this.tagname="";return}let n=this.htmlMode&&la.get(e);if(n)for(;this.stack.length>0&&n.has(this.stack[0]);)this.popElement(!0);this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(e==="svg"?this.foreignContext.unshift(mt.Svg):e==="math"?this.foreignContext.unshift(mt.MathML):Ti.has(e)&&this.foreignContext.unshift(mt.None))),this.cbs.onopentagname?.(e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){this.startIndex=this.openTagStart,this.attribs&&(this.cbs.onopentag?.(this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,n){this.endIndex=n;let i=this.readTagName(e,n);if(this.isVoidElement(i))this.htmlMode&&i==="br"&&(this.cbs.onopentagname?.("br"),this.cbs.onopentag?.("br",{},!0),this.cbs.onclosetag?.("br",!1));else{let r=this.stack.indexOf(i);if(r!==-1){for(let s=0;s=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(e-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,n-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){if(this.ended){this.cbs.onerror?.(new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){if(this.ended){this.cbs.onerror?.(new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexQn,Comment:()=>En,Directive:()=>wn,Doctype:()=>pa,ElementType:()=>y,Root:()=>yn,Script:()=>Dn,Style:()=>Fn,Tag:()=>Nn,Text:()=>Bn,isTag:()=>kn});var y;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(y||(y={}));function kn(t){return t.type===y.Tag||t.type===y.Script||t.type===y.Style}var yn=y.Root,Bn=y.Text,wn=y.Directive,En=y.Comment,Dn=y.Script,Fn=y.Style,Nn=y.Tag,Qn=y.CDATA,pa=y.Doctype;var Te=class{parent=null;prev=null;next=null;startIndex=null;endIndex=null;get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return Gi(this,e)}},Ae=class extends Te{data;constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},Ht=class extends Ae{type=y.Text;get nodeType(){return 3}},ae=class extends Ae{type=y.Comment;get nodeType(){return 8}},ce=class extends Ae{type=y.Directive;name;constructor(e,n){super(n),this.name=e}get nodeType(){return 1}"x-name";"x-publicId";"x-systemId"},le=class extends Te{children;constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},he=class extends le{type=y.CDATA;get nodeType(){return 4}},Ot=class extends le{type=y.Root;get nodeType(){return 9}},ue=class extends le{name;attribs;type;constructor(e,n,i=[],r=e==="script"?y.Script:e==="style"?y.Style:y.Tag){super(i),this.name=e,this.attribs=n,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this["x-attribsNamespace"]?.[e],prefix:this["x-attribsPrefix"]?.[e]}))}namespace;"x-attribsNamespace";"x-attribsPrefix"};function R(t){return kn(t)}function Le(t){return t.type===y.CDATA}function bt(t){return t.type===y.Text}function Ln(t){return t.type===y.Comment}function ga(t){return t.type===y.Directive}function da(t){return t.type===y.Root}function X(t){return Object.hasOwn(t,"children")}function Gi(t,e=!1){let n;if(bt(t))n=new Ht(t.data);else if(Ln(t))n=new ae(t.data);else if(R(t)){let i=e?Tn(t.children):[],r=new ue(t.name,{...t.attribs},i);for(let s of i)s.parent=r;t.namespace!=null&&(r.namespace=t.namespace),t["x-attribsNamespace"]&&(r["x-attribsNamespace"]={...t["x-attribsNamespace"]}),t["x-attribsPrefix"]&&(r["x-attribsPrefix"]={...t["x-attribsPrefix"]}),n=r}else if(Le(t)){let i=e?Tn(t.children):[],r=new he(i);for(let s of i)s.parent=r;n=r}else if(da(t)){let i=e?Tn(t.children):[],r=new Ot(i);for(let s of i)s.parent=r;t["x-mode"]&&(r["x-mode"]=t["x-mode"]),n=r}else if(ga(t)){let i=new ce(t.name,t.data);t["x-name"]!=null&&(i["x-name"]=t["x-name"],i["x-publicId"]=t["x-publicId"],i["x-systemId"]=t["x-systemId"]),n=i}else throw new Error(`Not implemented yet: ${t.type}`);return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}function Tn(t){let e=t.map(n=>Gi(n,!0));for(let n=1;nnt,append:()=>Za,appendChild:()=>Oa,compareDocumentPosition:()=>qi,existsOne:()=>Yi,filter:()=>Zt,find:()=>Wi,findAll:()=>ma,findOne:()=>Ge,getAttributeValue:()=>qa,getChildren:()=>ji,getElementById:()=>Sa,getElements:()=>Ia,getElementsByClassName:()=>ba,getElementsByTagName:()=>Qt,getElementsByTagType:()=>ka,getFeed:()=>pe,getInnerHTML:()=>Ka,getName:()=>za,getOuterHTML:()=>Vi,getParent:()=>zi,getSiblings:()=>Xa,getText:()=>Ye,hasAttrib:()=>ja,innerText:()=>Yn,nextElementSibling:()=>_a,prepend:()=>Va,prependChild:()=>Pa,prevElementSibling:()=>$a,removeElement:()=>ge,removeSubsets:()=>Ja,replaceElement:()=>Ha,testElement:()=>Ca,textContent:()=>fe,uniqueSort:()=>Ua});function Zt(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Wi(t,Array.isArray(e)?e:[e],n,i)}function Wi(t,e,n,i){let r=[],s=[Array.isArray(e)?e:[e]],o=[0];for(;;){if(o[0]>=s[0].length){if(o.length===1)return r;s.shift(),o.shift();continue}let a=s[0][o[0]++];if(t(a)&&(r.push(a),--i<=0))return r;n&&X(a)&&a.children.length>0&&(o.unshift(0),s.unshift(a.children))}}function Ge(t,e,n=!0){let i=Array.isArray(e)?e:[e];for(let r of i){if(R(r)&&t(r))return r;if(n&&X(r)&&r.children.length>0){let s=Ge(t,r.children,!0);if(s)return s}}return null}function Yi(t,e){return(Array.isArray(e)?e:[e]).some(n=>R(n)&&t(n)||X(n)&&Yi(t,n.children))}function ma(t,e){let n=[],i=[Array.isArray(e)?e:[e]],r=[0];for(;;){if(r[0]>=i[0].length){if(i.length===1)return n;i.shift(),r.shift();continue}let s=i[0][r[0]++];R(s)&&t(s)&&n.push(s),X(s)&&s.children.length>0&&(r.unshift(0),i.unshift(s.children))}}var Ke={tag_name(t){return typeof t=="function"?e=>R(e)&&t(e.name):t==="*"?R:e=>R(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>bt(e)&&t(e.data):e=>bt(e)&&e.data===t}};function Gn(t,e){return typeof e=="function"?n=>R(n)&&e(n.attribs[t]):n=>R(n)&&n.attribs[t]===e}function xa(t,e){return n=>t(n)||e(n)}function Ri(t){let e=Object.keys(t).map(n=>{let i=t[n];return Object.hasOwn(Ke,n)?Ke[n](i):Gn(n,i)});return e.length===0?null:e.reduce(xa)}function Ca(t,e){let n=Ri(t);return n?n(e):!0}function Ia(t,e,n,i=Number.POSITIVE_INFINITY){let r=Ri(t);return r?Zt(r,e,n,i):[]}function Sa(t,e,n=!0){return Array.isArray(e)||(e=[e]),Ge(Gn("id",t),e,n)}function Qt(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Ke.tag_name(t),e,n,i)}function ba(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Gn("class",t),e,n,i)}function ka(t,e,n=!0,i=Number.POSITIVE_INFINITY){return Zt(Ke.tag_type(t),e,n,i)}var ya=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),Ba=typeof String.prototype.codePointAt=="function"?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e),wa=1342177476;function We(t){let e,n=0,{length:i}=t;for(let r=0;r>>s&1)===0||s>=64||s<32))continue;if(e===void 0?e=t.substring(0,r):n!==r&&(e+=t.substring(n,r)),s<64){e+=ya.get(s),n=r+1;continue}let o=Ba(t,r);e+=`&#x${o.toString(16)};`,o!==s&&r++,n=r+1}return e===void 0?t:(n\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Mi;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(Mi||(Mi={}));var Ji;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(Ji||(Ji={}));var Ui=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(t=>[t.toLowerCase(),t])),Hi=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(t=>[t.toLowerCase(),t]));var Ea=new Set("style script xmp iframe noembed noframes plaintext noscript".split(" ")),Da=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),Fa=new Set(["svg","math"]),Na=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));function Qa(t,e={}){let n="length"in t?t:[t],i=e.xmlMode??!1,r="";for(let s=0;s`;case En:return``;case Qn:return``;case Dn:case Fn:case Nn:return Ta(t,e,n);case Bn:{let i=t,r=i.data||"";return(e.encodeEntities??e.decodeEntities)!==!1&&!(!n&&i.parent&&Ea.has(i.parent.name))?n||e.encodeEntities!=="utf8"?We(r):Wn(r):r}}}function Ta(t,e,n){n==="foreign"&&(t.name=Ui.get(t.name)??t.name,t.parent&&Na.has(t.parent.name)&&(n=!1)),!n&&Fa.has(t.name)&&(n="foreign");let{name:i,children:r}=t,s=!n&&Da.has(i),o=`<${i}${Ga(t.attribs,e,n)}`;return r.length===0&&(n?e.selfClosingTags!==!1:e.selfClosingTags&&s)?o+=n?"/>":" />":(o+=">",r.length>0&&(o+=Zi(r,e,n)),s||(o+=``)),o}function La(t){return t.replaceAll('"',""")}function Ga(t,e,n){if(!t)return"";let i=(e.encodeEntities??e.decodeEntities)===!1?La:n||e.encodeEntities!=="utf8"?We:Kn,r=n==="foreign",s=!!(e.emptyAttrs??n),o="";for(let a in t){if(!Object.hasOwn(t,a))continue;let l=t[a],A=r?Hi.get(a)??a:a;o+=!s&&(l==null||l==="")?` ${A}`:` ${A}="${i(l==null?"":String(l))}"`}return o}function Vi(t,e){return Oi(t,e)}function Ka(t,e){return X(t)?t.children.map(n=>Vi(n,e)).join(""):""}function Ye(t){return Array.isArray(t)?t.map(Ye).join(""):R(t)?t.name==="br"?` +`:Ye(t.children):Le(t)?Ye(t.children):bt(t)?t.data:""}function fe(t){return Array.isArray(t)?t.map(fe).join(""):X(t)&&!Ln(t)?fe(t.children):bt(t)?t.data:""}function Yn(t){return Array.isArray(t)?t.map(Yn).join(""):X(t)&&(t.type===y.Tag||Le(t))?Yn(t.children):bt(t)?t.data:""}function pe(t){let e=Re(Ma,t);return e?e.name==="feed"?Wa(e):Ya(e):null}function Wa(t){let e=t.children,n={type:"atom",items:Qt("entry",e).map(s=>{let{children:o}=s,a={media:Xi(o)};q(a,"id","id",o),q(a,"title","title",o);let l=Re("link",o)?.attribs.href;l&&(a.link=l);let A=yt("summary",o)||yt("content",o);A&&(a.description=A);let c=yt("updated",o);return c&&(a.pubDate=new Date(c)),a})};q(n,"id","id",e),q(n,"title","title",e);let i=Re("link",e)?.attribs.href;i&&(n.link=i),q(n,"description","subtitle",e);let r=yt("updated",e);return r&&(n.updated=new Date(r)),q(n,"author","email",e,!0),n}function Ya(t){let e=Re("channel",t.children)?.children??[],n={type:t.name.substr(0,3),id:"",items:Qt("item",t.children).map(r=>{let{children:s}=r,o={media:Xi(s)};q(o,"id","guid",s),q(o,"title","title",s),q(o,"link","link",s),q(o,"description","description",s);let a=yt("pubDate",s)||yt("dc:date",s);return a&&(o.pubDate=new Date(a)),o})};q(n,"title","title",e),q(n,"link","link",e),q(n,"description","description",e);let i=yt("lastBuildDate",e);return i&&(n.updated=new Date(i)),q(n,"author","managingEditor",e,!0),n}var Ra=["url","type","lang"],va=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Xi(t){return Qt("media:content",t).map(e=>{let{attribs:n}=e,i={medium:n.medium,isDefault:!!n.isDefault};for(let r of Ra)n[r]&&(i[r]=n[r]);for(let r of va)n[r]&&(i[r]=Number.parseInt(n[r],10));return n.expression&&(i.expression=n.expression),i})}function Re(t,e){return Qt(t,e,!0,1)[0]}function yt(t,e,n=!1){return fe(Qt(t,e,n,1)).trim()}function q(t,e,n,i,r=!1){let s=yt(n,i,r);s&&(t[e]=s)}function Ma(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}function Ja(t){let e=t.length;for(;--e>=0;){let n=t[e];if(e>0&&t.lastIndexOf(n,e-1)>=0){t.splice(e,1);continue}for(let i=n.parent;i;i=i.parent)if(t.includes(i)){t.splice(e,1);break}}return t}var nt;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(nt||(nt={}));function qi(t,e){let n=[],i=[];if(t===e)return 0;let r=X(t)?t:t.parent;for(;r;)n.unshift(r),r=r.parent;for(r=X(e)?e:e.parent;r;)i.unshift(r),r=r.parent;let s=Math.min(n.length,i.length),o=0;for(;ol.indexOf(c)?a===e?nt.FOLLOWING|nt.CONTAINED_BY:nt.FOLLOWING:a===t?nt.PRECEDING|nt.CONTAINS:nt.PRECEDING}function Ua(t){return t=t.filter((e,n,i)=>!i.includes(e,n+1)),t.sort((e,n)=>{let i=qi(e,n);return i&nt.PRECEDING?-1:i&nt.FOLLOWING?1:0}),t}function ge(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,n=e.lastIndexOf(t);n!==-1&&e.splice(n,1)}t.next=null,t.prev=null,t.parent=null}function Ha(t,e){if(e.prev=t.prev,e.prev&&(e.prev.next=e),e.next=t.next,e.next&&(e.next.prev=e),e.parent=t.parent,e.parent){let{children:n}=e.parent,i=n.lastIndexOf(t);if(i===-1)return;n[i]=e,t.parent=null}}function Oa(t,e){if(ge(e),e.next=null,e.parent=t,t.children.push(e)>1){let n=t.children[t.children.length-2];n.next=e,e.prev=n}else e.prev=null}function Za(t,e){ge(e);let{parent:n}=t,i=t.next;if(e.next=i,e.prev=t,t.next=e,e.parent=n,i){if(i.prev=e,n){let r=n.children;r.splice(r.lastIndexOf(i),0,e)}}else n&&n.children.push(e)}function Pa(t,e){if(ge(e),e.parent=t,e.prev=null,t.children.unshift(e)===1)e.next=null;else{let n=t.children[1];n.prev=e,e.next=n}}function Va(t,e){ge(e);let{parent:n}=t;if(n){let i=n.children;i.splice(i.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,e.next=t,t.prev=e}function ji(t){return X(t)?t.children:[]}function zi(t){return t.parent||null}function Xa(t){let e=zi(t);if(e!=null)return ji(e);let n=[t],{prev:i,next:r}=t;for(;i!=null;)n.unshift(i),{prev:i}=i;for(;r!=null;)n.push(r),{next:r}=r;return n}function qa(t,e){let{attribs:n}=t;return n?.[e]}function ja(t,e){let{attribs:n}=t;return n!=null&&Object.hasOwn(n,e)&&n[e]!=null}function za(t){return t.name}function _a(t){let{next:e}=t;for(;e!==null&&!R(e);)({next:e}=e);return e}function $a(t){let{prev:e}=t;for(;e!==null&&!R(e);)({prev:e}=e);return e}function _i(t,e){let n=new kt(void 0,e);return new Nt(n,e).end(t),n.root}function tc(t,e,n){let i=new kt(r=>t(r,i.root),e,n);return new Nt(i,e)}var ec={xmlMode:!0};function nc(t,e=ec){return pe(_i(t,e).children)}var Ir={};St(Ir,{_compileUnsafe:()=>Vn,compile:()=>dr,default:()=>Ec,is:()=>wc,prepareContext:()=>xr,selectAll:()=>Cr,selectOne:()=>Bc});function At(){return!0}function E(){return!1}var m;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(m||(m={}));var L;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(L||(L={}));var tr=/^[^#\\]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\u00B0-\uFFFF-])+/,ic=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,C;(function(t){t[t.LeftParenthesis=40]="LeftParenthesis",t[t.RightParenthesis=41]="RightParenthesis",t[t.LeftSquareBracket=91]="LeftSquareBracket",t[t.RightSquareBracket=93]="RightSquareBracket",t[t.Comma=44]="Comma",t[t.Period=46]="Period",t[t.Colon=58]="Colon",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Plus=43]="Plus",t[t.Tilde=126]="Tilde",t[t.QuestionMark=63]="QuestionMark",t[t.ExclamationMark=33]="ExclamationMark",t[t.Slash=47]="Slash",t[t.Equal=61]="Equal",t[t.Dollar=36]="Dollar",t[t.Pipe=124]="Pipe",t[t.Circumflex=94]="Circumflex",t[t.Asterisk=42]="Asterisk",t[t.GreaterThan=62]="GreaterThan",t[t.LessThan=60]="LessThan",t[t.Hash=35]="Hash",t[t.LowerI=105]="LowerI",t[t.LowerS=115]="LowerS",t[t.BackSlash=92]="BackSlash",t[t.Space=32]="Space",t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn"})(C||(C={}));var rc=new Map([[C.Tilde,L.Element],[C.Circumflex,L.Start],[C.Dollar,L.End],[C.Asterisk,L.Any],[C.ExclamationMark,L.Not],[C.Pipe,L.Hyphen]]),sc=new Set(["has","not","matches","is","where","host","host-context"]),oc=new Set(["before","after","first-line","first-letter"]);function ve(t){switch(t.type){case m.Adjacent:case m.Child:case m.Descendant:case m.Parent:case m.Sibling:case m.ColumnCombinator:return!0;case m.Attribute:case m.Pseudo:case m.PseudoElement:case m.Tag:case m.Universal:return!1}}var Ac=new Set(["contains","icontains"]);function ac(t,e,n){let i=Number.parseInt(e,16)-65536;return Number.isNaN(i)||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function de(t){return t.replace(ic,ac)}function Rn(t){return t===C.SingleQuote||t===C.DoubleQuote}function er(t){return t===C.Space||t===C.Tab||t===C.NewLine||t===C.FormFeed||t===C.CarriageReturn}function Tt(t){let e=[],n=nr(e,`${t}`,0);if(n0&&ve(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function l(h){if(i.length>0&&i[i.length-1].type===m.Descendant){i[i.length-1].type=h;return}a(),i.push({type:h})}function A(h,f){i.push({type:m.Attribute,name:h,action:f,value:r(1),namespace:null,ignoreCase:"quirks"})}function c(){if(i.length>0&&i[i.length-1].type===m.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");t.push(i)}if(s(0),e.length===n)return n;t:for(;n{let a=i.getAttributeValue(o,r);return a!=null&&a.length===s.length&&a.toLowerCase()===s&&t(o)}):o=>i.getAttributeValue(o,r)===s&&t(o)},hyphen(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,{length:o}=s;return Lt(e,n)?(s=s.toLowerCase(),function(l){let A=i.getAttributeValue(l,r);return A!=null&&(A.length===o||A.charAt(o)==="-")&&A.substr(0,o).toLowerCase()===s&&t(l)}):function(l){let A=i.getAttributeValue(l,r);return A!=null&&(A.length===o||A.charAt(o)==="-")&&A.substr(0,o)===s&&t(l)}},element(t,e,n){let{adapter:i}=n,{name:r,value:s}=e;if(lc.test(s))return E;let o=new RegExp(`(?:^|\\s)${ir(s)}(?:$|\\s)`,Lt(e,n)?"i":"");return function(l){let A=i.getAttributeValue(l,r);return A!=null&&A.length>=s.length&&o.test(A)&&t(l)}},exists(t,{name:e},{adapter:n}){return i=>n.hasAttrib(i,e)&&t(i)},start(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,{length:o}=s;return o===0?E:Lt(e,n)?(s=s.toLowerCase(),a=>{let l=i.getAttributeValue(a,r);return l!=null&&l.length>=o&&l.substr(0,o).toLowerCase()===s&&t(a)}):a=>!!i.getAttributeValue(a,r)?.startsWith(s)&&t(a)},end(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e,o=-s.length;return o===0?E:Lt(e,n)?(s=s.toLowerCase(),a=>i.getAttributeValue(a,r)?.substr(o).toLowerCase()===s&&t(a)):a=>!!i.getAttributeValue(a,r)?.endsWith(s)&&t(a)},any(t,e,n){let{adapter:i}=n,{name:r,value:s}=e;if(s==="")return E;if(Lt(e,n)){let o=new RegExp(ir(s),"i");return function(l){let A=i.getAttributeValue(l,r);return A!=null&&A.length>=s.length&&o.test(A)&&t(l)}}return o=>!!i.getAttributeValue(o,r)?.includes(s)&&t(o)},not(t,e,n){let{adapter:i}=n,{name:r}=e,{value:s}=e;return s===""?o=>!!i.getAttributeValue(o,r)&&t(o):Lt(e,n)?(s=s.toLowerCase(),o=>{let a=i.getAttributeValue(o,r);return(a==null||a.length!==s.length||a.toLowerCase()!==s)&&t(o)}):o=>i.getAttributeValue(o,r)!==s&&t(o)}};function sr(t,e,n){let{adapter:i,xmlMode:r=!1}=n,s=[],o=[e],a=[0];for(;;){if(a[0]>=o[0].length){if(o.length===1)return s;o.shift(),a.shift();continue}let l=o[0][a[0]++];if(i.isTag(l)&&(t(l)&&s.push(l),r||i.getName(l)!=="template")){let A=i.getChildren(l);A.length>0&&(o.unshift(A),a.unshift(0))}}}function Xt(t,e,n){let{adapter:i,xmlMode:r=!1}=n,s=[e],o=[0];for(;;){if(o[0]>=s[0].length){if(s.length===1)return null;s.shift(),o.shift();continue}let a=s[0][o[0]++];if(i.isTag(a)){if(t(a))return a;if(r||i.getName(a)!=="template"){let l=i.getChildren(a);l.length>0&&(s.unshift(l),o.unshift(0))}}}}function Me(t,e){let n=e.getSiblings(t);if(n.length<=1)return[];let i=n.indexOf(t);return i===-1||i===n.length-1?[]:n.slice(i+1).filter(e.isTag)}function it(t,e){let n=e.getParent(t);return n!=null&&e.isTag(n)?n:null}var or="input:is([type=text i],[type=search i],[type=url i],[type=tel i],[type=email i],[type=password i],[type=date i],[type=month i],[type=week i],[type=time i],[type=datetime-local i],[type=number i])",Ar={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) - )`, - enabled: ":is(button, input, select, textarea, optgroup, option, fieldset):not(:disabled)", - checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], :selected)", - required: ":is(input, select, textarea)[required]", - optional: ":is(input, select, textarea):not([required])", - "read-only": `[readonly]:is(textarea, ${textControl})`, - "read-write": `:not([readonly]):is(textarea, ${textControl})`, - selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", - checkbox: "[type=checkbox]", - file: "[type=file]", - password: "[type=password]", - radio: "[type=radio]", - reset: "[type=reset]", - image: "[type=image]", - submit: "[type=submit]", - parent: ":not(:empty)", - header: ":is(h1, h2, h3, h4, h5, h6)", - button: ":is(button, input[type=button])", - input: ":is(input, textarea, select, button)", - text: "input:is(:not([type!='']), [type=text])" -}; - -// node_modules/nth-check/dist/compile.js -function compile(parsed) { - const a = parsed[0]; - const b = parsed[1] - 1; - if (b < 0 && a <= 0) - return falseFunc; - if (a === -1) - return (index) => index <= b; - if (a === 0) - return (index) => index === b; - if (a === 1) - return b < 0 ? trueFunc : (index) => index >= b; - const absA = Math.abs(a); - const bModulo = (b % absA + absA) % absA; - return a > 1 ? (index) => index >= b && index % absA === bModulo : (index) => index <= b && index % absA === bModulo; -} - -// node_modules/nth-check/dist/parse.js -var whitespace = new Set([9, 10, 12, 13, 32]); -var ZERO = 48; -var NINE = 57; -function parse2(formula) { - formula = formula.trim().toLowerCase(); - switch (formula) { - case "even": { - return [2, 0]; - } - case "odd": { - return [2, 1]; - } - } - let index = 0; - let a = 0; - let sign = readSign(); - let number = readNumber(); - if (index < formula.length && formula.charAt(index) === "n") { - index++; - a = sign * (number ?? 1); - skipWhitespace(); - if (index < formula.length) { - sign = readSign(); - skipWhitespace(); - number = readNumber(); - } else { - sign = number = 0; - } - } - if (number === null || index < formula.length) { - throw new Error(`n-th rule couldn't be parsed ('${formula}')`); - } - return [a, sign * number]; - function readSign() { - switch (formula.charAt(index)) { - case "-": { - index++; - return -1; - } - case "+": { - index++; - break; - } - } - return 1; - } - function readNumber() { - const start = index; - let value = 0; - while (index < formula.length && formula.charCodeAt(index) >= ZERO && formula.charCodeAt(index) <= NINE) { - value = value * 10 + (formula.charCodeAt(index) - ZERO); - index++; - } - return index === start ? null : value; - } - function skipWhitespace() { - while (index < formula.length && whitespace.has(formula.charCodeAt(index))) { - index++; - } - } -} - -// node_modules/nth-check/dist/index.js -function nthCheck(formula) { - return compile(parse2(formula)); -} - -// node_modules/css-select/dist/helpers/cache.js -function cacheParentResults(next, { adapter, cacheResults }, matches) { - if (cacheResults === false || typeof WeakMap === "undefined") { - return (element) => next(element) && matches(element); - } - const resultCache = new WeakMap; - function addResultToCache(element) { - const result = matches(element); - resultCache.set(element, result); - return result; - } - return function cachedMatcher(element) { - if (!next(element)) { - return false; - } - if (resultCache.has(element)) { - return resultCache.get(element) ?? false; - } - let node2 = element; - do { - const parent = getElementParent(node2, adapter); - if (parent === null) { - return addResultToCache(element); - } - node2 = parent; - } while (!resultCache.has(node2)); - return resultCache.get(node2) ? addResultToCache(element) : false; - }; -} - -// node_modules/css-select/dist/helpers/options.js -function copyOptions(options) { - const { context: _, rootFunc: __, ...copied } = options; - return copied; -} - -// node_modules/css-select/dist/pseudo-selectors/filters.js -function extendedFilter(tag, range) { - if (range[0] !== "*" && range[0] !== tag[0]) - return false; - let tagIndex = 1; - for (let rangeIndex = 1;rangeIndex < range.length; rangeIndex++) { - if (range[rangeIndex] === "*") - continue; - while (tagIndex < tag.length && tag[tagIndex] !== range[rangeIndex]) { - if (tag[tagIndex++].length <= 1) - return false; - } - if (tagIndex >= tag.length) - return false; - tagIndex++; - } - return true; -} -var nthOfRegex = /^(.+?)\s+of\s+(.+)$/is; -function compileNth(reverse, ofType) { - return function nth(next, rule, options, context, compileToken) { - const { adapter, equals } = options; - const ofMatch = ofType ? null : rule.match(nthOfRegex); - const nthCheck2 = nthCheck(ofMatch ? ofMatch[1].trim() : rule); - if (nthCheck2 === falseFunc) - return falseFunc; - const ofSelector = ofMatch && compileToken ? compileToken(parse(ofMatch[2].trim()), copyOptions(options), context) : undefined; - if (ofSelector === falseFunc) - return falseFunc; - if (nthCheck2 === trueFunc && !ofSelector) { - return (element) => getElementParent(element, adapter) !== null && next(element); - } - const shouldCount = ofSelector ? (_element, sibling) => ofSelector(sibling) : ofType ? (element, sibling) => adapter.getName(sibling) === adapter.getName(element) : trueFunc; - if (reverse) { - return function nthLast(element) { - if (ofSelector && !ofSelector(element)) - return false; - const siblings = adapter.getSiblings(element); - let pos = 0; - for (let index = siblings.length - 1;index >= 0; index--) { - const sibling = siblings[index]; - if (equals(element, sibling)) - break; - if (adapter.isTag(sibling) && shouldCount(element, sibling)) - pos++; - } - return nthCheck2(pos) && next(element); - }; - } - return function nth2(element) { - if (ofSelector && !ofSelector(element)) - return false; - const siblings = adapter.getSiblings(element); - let pos = 0; - for (const sibling of siblings) { - if (equals(element, sibling)) - break; - if (adapter.isTag(sibling) && shouldCount(element, sibling)) - pos++; - } - return nthCheck2(pos) && next(element); - }; - }; -} -var filters = { - contains(next, text, options) { - const { getText: getText2 } = options.adapter; - return cacheParentResults(next, options, (element) => getText2(element).includes(text)); - }, - icontains(next, text, options) { - const itext = text.toLowerCase(); - const { getText: getText2 } = options.adapter; - return cacheParentResults(next, options, (element) => getText2(element).toLowerCase().includes(itext)); - }, - "nth-child": compileNth(false, false), - "nth-last-child": compileNth(true, false), - "nth-of-type": compileNth(false, true), - "nth-last-of-type": compileNth(true, true), - root(next, _rule, { adapter }) { - return (element) => getElementParent(element, adapter) === null && next(element); - }, - scope(next, rule, options, context) { - const { equals } = options; - if (!context || context.length === 0) { - return filters["root"](next, rule, options); - } - if (context.length === 1) { - return (element) => equals(context[0], element) && next(element); - } - return (element) => context.includes(element) && next(element); - }, - lang(next, code, { adapter }) { - const ranges = code.split(",").map((r) => r.trim()).filter((r) => r.length > 0).map((r) => r.replace(/^['"]|['"]$/g, "").toLowerCase().split("-")); - return function lang(element) { - let node2 = element; - while (node2 != null) { - const value = adapter.getAttributeValue(node2, "xml:lang") ?? adapter.getAttributeValue(node2, "lang"); - if (value != null) { - if (!value) { - return ranges.some((r) => r[0] === "") && next(element); - } - const tag = value.toLowerCase().split("-"); - return ranges.some((r) => extendedFilter(tag, r)) && next(element); - } - const parent = adapter.getParent(node2); - node2 = parent != null && adapter.isTag(parent) ? parent : null; - } - return ranges.some((r) => r[0] === "") && next(element); - }; - }, - hover: dynamicStatePseudo("isHovered"), - visited: dynamicStatePseudo("isVisited"), - active: dynamicStatePseudo("isActive") -}; -function dynamicStatePseudo(name) { - return function dynamicPseudo(next, _rule, { adapter }) { - const filterFunction = adapter[name]; - if (typeof filterFunction !== "function") { - return falseFunc; - } - return function active(element) { - return filterFunction(element) && next(element); - }; - }; -} - -// node_modules/css-select/dist/pseudo-selectors/pseudos.js -var isDocumentWhiteSpace = /^[ \t\r\n]*$/; -var pseudos = { - empty(element, { adapter }) { - const children = adapter.getChildren(element); - return children.every((element2) => !adapter.isTag(element2)) && children.every((element2) => isDocumentWhiteSpace.test(adapter.getText(element2))); - }, - "first-child"(element, { adapter, equals }) { - if (adapter.prevElementSibling) { - return adapter.prevElementSibling(element) == null; - } - const firstChild = adapter.getSiblings(element).find((sibling) => adapter.isTag(sibling)); - return firstChild != null && equals(element, firstChild); - }, - "last-child"(element, { adapter, equals }) { - const siblings = adapter.getSiblings(element); - for (let index = siblings.length - 1;index >= 0; index--) { - if (equals(element, siblings[index])) { - return true; - } - if (adapter.isTag(siblings[index])) { - break; - } - } - return false; - }, - "first-of-type"(element, { adapter, equals }) { - const siblings = adapter.getSiblings(element); - const elementName = adapter.getName(element); - for (const currentSibling of siblings) { - if (equals(element, currentSibling)) { - return true; - } - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elementName) { - break; - } - } - return false; - }, - "last-of-type"(element, { adapter, equals }) { - const siblings = adapter.getSiblings(element); - const elementName = adapter.getName(element); - for (let index = siblings.length - 1;index >= 0; index--) { - const currentSibling = siblings[index]; - if (equals(element, currentSibling)) { - return true; - } - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elementName) { - break; - } - } - return false; - }, - "only-of-type"(element, { adapter, equals }) { - const elementName = adapter.getName(element); - return adapter.getSiblings(element).every((sibling) => equals(element, sibling) || !adapter.isTag(sibling) || adapter.getName(sibling) !== elementName); - }, - "only-child"(element, { adapter, equals }) { - return adapter.getSiblings(element).every((sibling) => equals(element, sibling) || !adapter.isTag(sibling)); - } -}; -function verifyPseudoArguments(pseudoClassCondition, name, subselect, argumentIndex) { - if (subselect === null) { - if (pseudoClassCondition.length > argumentIndex) { - throw new Error(`Pseudo-class :${name} requires an argument`); - } - } else if (pseudoClassCondition.length === argumentIndex) { - throw new Error(`Pseudo-class :${name} doesn't have any arguments`); - } -} - -// node_modules/css-select/dist/helpers/selectors.js -function isTraversal2(token) { - return token.type === "_flexibleDescendant" || isTraversal(token); -} -function sortRules(array) { - const ratings = array.map(getQuality); - for (let index = 1;index < array.length; index++) { - const procNew = ratings[index]; - if (procNew < 0) { - continue; - } - for (let currentIndex = index;currentIndex > 0 && procNew < ratings[currentIndex - 1]; currentIndex--) { - const token = array[currentIndex]; - array[currentIndex] = array[currentIndex - 1]; - array[currentIndex - 1] = token; - ratings[currentIndex] = ratings[currentIndex - 1]; - ratings[currentIndex - 1] = procNew; - } - } -} -function getAttributeQuality(token) { - switch (token.action) { - case AttributeAction.Exists: { - return 10; - } - case AttributeAction.Equals: { - return token.name === "id" ? 9 : 8; - } - case AttributeAction.Not: { - return 7; - } - case AttributeAction.Start: { - return 6; - } - case AttributeAction.End: { - return 6; - } - case AttributeAction.Any: { - return 5; - } - case AttributeAction.Hyphen: { - return 4; - } - case AttributeAction.Element: { - return 3; - } - } -} -function getQuality(token) { - switch (token.type) { - case SelectorType.Universal: { - return 50; - } - case SelectorType.Tag: { - return 30; - } - case SelectorType.Attribute: { - return Math.floor(getAttributeQuality(token) / (token.ignoreCase ? 2 : 1)); - } - case SelectorType.Pseudo: { - return token.data ? token.name === "has" || token.name === "contains" || token.name === "icontains" ? 0 : Array.isArray(token.data) ? Math.max(0, Math.min(...token.data.map((d) => Math.min(...d.map(getQuality))))) : 2 : 3; - } - default: { - return -1; - } - } -} -function includesScopePseudo(t) { - return t.type === SelectorType.Pseudo && (t.name === "scope" || Array.isArray(t.data) && t.data.some((data) => data.some(includesScopePseudo))); -} - -// node_modules/css-select/dist/pseudo-selectors/subselects.js -var PLACEHOLDER_ELEMENT = {}; -function hasDependsOnCurrentElement(selector) { - return selector.some((sel) => sel.length > 0 && (isTraversal2(sel[0]) || sel.some(includesScopePseudo))); -} -var is = (next, token, options, context, compileToken) => { - const compiledToken = compileToken(token, copyOptions(options), context); - return compiledToken === trueFunc ? next : compiledToken === falseFunc ? falseFunc : (element) => compiledToken(element) && next(element); -}; -var subselects = { - is, - matches: is, - where: is, - not(next, token, options, context, compileToken) { - const compiledToken = compileToken(token, copyOptions(options), context); - return compiledToken === falseFunc ? next : compiledToken === trueFunc ? falseFunc : (element) => !compiledToken(element) && next(element); - }, - has(next, subselect, options, _context, compileToken) { - const { adapter } = options; - const copiedOptions = copyOptions(options); - copiedOptions.relativeSelector = true; - const context = subselect.some((s) => s.some(isTraversal2)) ? [PLACEHOLDER_ELEMENT] : undefined; - const skipCache = hasDependsOnCurrentElement(subselect); - const compiled = compileToken(subselect, copiedOptions, context); - if (compiled === falseFunc) { - return falseFunc; - } - if (context && compiled !== trueFunc) { - return skipCache ? (element) => { - if (!next(element)) { - return false; - } - context[0] = element; - const childs = adapter.getChildren(element); - return findOne2(compiled, compiled.shouldTestNextSiblings ? [ - ...childs, - ...getNextSiblings(element, adapter) - ] : childs, options) !== null; - } : cacheParentResults(next, options, (element) => { - context[0] = element; - return findOne2(compiled, adapter.getChildren(element), options) !== null; - }); - } - const hasOne = (element) => findOne2(compiled, adapter.getChildren(element), options) !== null; - return skipCache ? (element) => next(element) && hasOne(element) : cacheParentResults(next, options, hasOne); - } -}; - -// node_modules/css-select/dist/pseudo-selectors/index.js -function compilePseudoSelector(next, selector, options, context, compileToken) { - const { name, data } = selector; - if (Array.isArray(data)) { - if (!(name in subselects)) { - throw new Error(`Unknown pseudo-class :${name}(${data})`); - } - return subselects[name](next, data, options, context, compileToken); - } - const userPseudo = options.pseudos?.[name]; - const stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases[name]; - if (typeof stringPseudo === "string") { - if (data != null) { - throw new Error(`Pseudo ${name} doesn't have any arguments`); - } - const alias = parse(stringPseudo); - return subselects["is"](next, alias, options, context, compileToken); - } - if (typeof userPseudo === "function") { - verifyPseudoArguments(userPseudo, name, data, 1); - return (element) => userPseudo(element, data) && next(element); - } - if (name in filters) { - return filters[name](next, data, options, context, compileToken); - } - if (name in pseudos) { - const pseudo = pseudos[name]; - verifyPseudoArguments(pseudo, name, data, 2); - return (element) => pseudo(element, options, data) && next(element); - } - throw new Error(`Unknown pseudo-class :${name}`); -} - -// node_modules/css-select/dist/general.js -function compileGeneralSelector(next, selector, options, context, compileToken, hasExpensiveSubselector) { - const { adapter, equals, cacheResults } = options; - switch (selector.type) { - case SelectorType.PseudoElement: { - throw new Error("Pseudo-elements are not supported by css-select"); - } - case SelectorType.ColumnCombinator: { - throw new Error("Column combinators are not yet supported by css-select"); - } - case SelectorType.Attribute: { - if (selector.namespace != null) { - throw new Error("Namespaced attributes are not yet supported by css-select"); - } - if (!options.xmlMode || options.lowerCaseAttributeNames) { - selector.name = selector.name.toLowerCase(); - } - return attributeRules[selector.action](next, selector, options); - } - case SelectorType.Pseudo: { - return compilePseudoSelector(next, selector, options, context, compileToken); - } - case SelectorType.Tag: { - if (selector.namespace != null) { - throw new Error("Namespaced tag names are not yet supported by css-select"); - } - let { name } = selector; - if (!options.xmlMode || options.lowerCaseTags) { - name = name.toLowerCase(); - } - return function tag(element) { - return adapter.getName(element) === name && next(element); - }; - } - case SelectorType.Descendant: { - if (!hasExpensiveSubselector || cacheResults === false || typeof WeakMap === "undefined") { - return function descendant(element) { - let current = element; - while (current = getElementParent(current, adapter)) { - if (next(current)) { - return true; - } - } - return false; - }; - } - const resultCache = new WeakMap; - return function cachedDescendant(element) { - let current = element; - let result; - while (current = getElementParent(current, adapter)) { - const cached = resultCache.get(current); - if (cached === undefined) { - result ??= { matches: false }; - result.matches = next(current); - resultCache.set(current, result); - if (result.matches) { - return true; - } - } else { - if (result) { - result.matches = cached.matches; - } - return cached.matches; - } - } - return false; - }; - } - case "_flexibleDescendant": { - return function flexibleDescendant(element) { - let current = element; - do { - if (next(current)) { - return true; - } - current = getElementParent(current, adapter); - } while (current); - return false; - }; - } - case SelectorType.Parent: { - return function parent(element) { - return adapter.getChildren(element).some((element2) => adapter.isTag(element2) && next(element2)); - }; - } - case SelectorType.Child: { - return function child(element) { - const parent = getElementParent(element, adapter); - return parent !== null && next(parent); - }; - } - case SelectorType.Sibling: { - return function sibling(element) { - const siblings = adapter.getSiblings(element); - for (const currentSibling of siblings) { - if (equals(element, currentSibling)) { - break; - } - if (adapter.isTag(currentSibling) && next(currentSibling)) { - return true; - } - } - return false; - }; - } - case SelectorType.Adjacent: { - if (adapter.prevElementSibling) { - return function adjacent(element) { - const previous = adapter.prevElementSibling(element); - return previous != null && next(previous); - }; - } - return function adjacent(element) { - const siblings = adapter.getSiblings(element); - let lastElement; - for (const currentSibling of siblings) { - if (equals(element, currentSibling)) { - break; - } - if (adapter.isTag(currentSibling)) { - lastElement = currentSibling; - } - } - return !!lastElement && next(lastElement); - }; - } - case SelectorType.Universal: { - if (selector.namespace != null && selector.namespace !== "*") { - throw new Error("Namespaced universal selectors are not yet supported by css-select"); - } - return next; - } - } -} - -// node_modules/css-select/dist/compile.js -var DESCENDANT_TOKEN = { type: SelectorType.Descendant }; -var FLEXIBLE_DESCENDANT_TOKEN = { - type: "_flexibleDescendant" -}; -var SCOPE_TOKEN = { - type: SelectorType.Pseudo, - name: "scope", - data: null -}; -function absolutize(token, { adapter }, context) { - const hasContext = !!context?.every((element) => element === PLACEHOLDER_ELEMENT || adapter.isTag(element) && getElementParent(element, adapter) !== null); - for (const t of token) { - if (t.length > 0 && isTraversal2(t[0]) && t[0].type !== SelectorType.Descendant) {} else if (hasContext && !t.some(includesScopePseudo)) { - t.unshift(DESCENDANT_TOKEN); - } else { - continue; - } - t.unshift(SCOPE_TOKEN); - } -} -function compileToken(token, options, compilationContext) { - for (const rules of token) { - sortRules(rules); - } - const { context = compilationContext, rootFunc: rootFunction = trueFunc } = options; - const isArrayContext = Array.isArray(context); - const finalContext = context && (Array.isArray(context) ? context : [context]); - if (options.relativeSelector !== false) { - absolutize(token, options, finalContext); - } else if (token.some((t) => t.length > 0 && isTraversal2(t[0]))) { - throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); - } - let shouldTestNextSiblings = false; - let query = falseFunc; - combineLoop: - for (const rules of token) { - if (rules.length >= 2) { - const [first, second] = rules; - if (first.type !== SelectorType.Pseudo || first.name !== "scope") {} else if (isArrayContext && second.type === SelectorType.Descendant) { - rules[1] = FLEXIBLE_DESCENDANT_TOKEN; - } else if (second.type === SelectorType.Adjacent || second.type === SelectorType.Sibling) { - shouldTestNextSiblings = true; - } - } - let next = rootFunction; - let hasExpensiveSubselector = false; - for (const rule of rules) { - next = compileGeneralSelector(next, rule, options, finalContext, compileToken, hasExpensiveSubselector); - const quality = getQuality(rule); - if (quality === 0) { - hasExpensiveSubselector = true; - } - if (next === falseFunc) { - continue combineLoop; - } - } - if (next === rootFunction) { - return rootFunction; - } - query = query === falseFunc ? next : or(query, next); - } - query.shouldTestNextSiblings = shouldTestNextSiblings; - return query; -} -function or(a, b) { - return (element) => a(element) || b(element); -} - -// node_modules/css-select/dist/index.js -var defaultEquals = (a, b) => a === b; -var defaultOptions2 = { - adapter: { ...exports_dist2, isTag: isTag2 }, - equals: defaultEquals -}; -function convertOptionFormats(options) { - const finalOptions = options ?? defaultOptions2; - finalOptions.adapter ??= defaultOptions2.adapter; - finalOptions.equals ??= finalOptions.adapter?.equals ?? defaultEquals; - return finalOptions; -} -function compile2(selector, options, context) { - const convertedOptions = convertOptionFormats(options); - const next = _compileUnsafe(selector, convertedOptions, context); - return next === falseFunc ? falseFunc : (element) => convertedOptions.adapter.isTag(element) && next(element); -} -function _compileUnsafe(selector, options, context) { - return compileToken(typeof selector === "string" ? parse(selector) : selector, convertOptionFormats(options), context); -} -function getSelectorFunction(searchFunction) { - return function select(query, elements, options) { - const convertedOptions = convertOptionFormats(options); - if (typeof query !== "function") { - query = _compileUnsafe(query, convertedOptions, elements); - } - const filteredElements = prepareContext(elements, convertedOptions.adapter, query.shouldTestNextSiblings); - return searchFunction(query, filteredElements, convertedOptions); - }; -} -function prepareContext(elements, adapter, shouldTestNextSiblings = false) { - if (shouldTestNextSiblings) { - elements = appendNextSiblings(elements, adapter); - } - return Array.isArray(elements) ? adapter.removeSubsets(elements) : adapter.getChildren(elements); -} -function appendNextSiblings(element, adapter) { - const elements = Array.isArray(element) ? [...element] : [element]; - const elementsLength = elements.length; - for (let index = 0;index < elementsLength; index++) { - const nextSiblings = getNextSiblings(elements[index], adapter); - elements.push(...nextSiblings); - } - return elements; -} -var selectAll = getSelectorFunction((query, elements, options) => query === falseFunc || !elements || elements.length === 0 ? [] : findAll2(query, elements, options)); -var selectOne = getSelectorFunction((query, elements, options) => query === falseFunc || !elements || elements.length === 0 ? null : findOne2(query, elements, options)); -function is2(element, query, options) { - return (typeof query === "function" ? query : compile2(query, options))(element); -} -var dist_default2 = selectAll; -// node_modules/css-tree/lib/utils/List.js -var releasedCursors = null; - -class List { - static createItem(data) { - return { - prev: null, - next: null, - data - }; - } - constructor() { - this.head = null; - this.tail = null; - this.cursor = null; - } - createItem(data) { - return List.createItem(data); - } - allocateCursor(prev, next) { - let cursor; - if (releasedCursors !== null) { - cursor = releasedCursors; - releasedCursors = releasedCursors.cursor; - cursor.prev = prev; - cursor.next = next; - cursor.cursor = this.cursor; - } else { - cursor = { - prev, - next, - cursor: this.cursor - }; - } - this.cursor = cursor; - return cursor; - } - releaseCursor() { - const { cursor } = this; - this.cursor = cursor.cursor; - cursor.prev = null; - cursor.next = null; - cursor.cursor = releasedCursors; - releasedCursors = cursor; - } - updateCursors(prevOld, prevNew, nextOld, nextNew) { - let { cursor } = this; - while (cursor !== null) { - if (cursor.prev === prevOld) { - cursor.prev = prevNew; - } - if (cursor.next === nextOld) { - cursor.next = nextNew; - } - cursor = cursor.cursor; - } - } - *[Symbol.iterator]() { - for (let cursor = this.head;cursor !== null; cursor = cursor.next) { - yield cursor.data; - } - } - get size() { - let size = 0; - for (let cursor = this.head;cursor !== null; cursor = cursor.next) { - size++; - } - return size; - } - get isEmpty() { - return this.head === null; - } - get first() { - return this.head && this.head.data; - } - get last() { - return this.tail && this.tail.data; - } - fromArray(array) { - let cursor = null; - this.head = null; - for (let data of array) { - const item = List.createItem(data); - if (cursor !== null) { - cursor.next = item; - } else { - this.head = item; - } - item.prev = cursor; - cursor = item; - } - this.tail = cursor; - return this; - } - toArray() { - return [...this]; - } - toJSON() { - return [...this]; - } - forEach(fn, thisArg = this) { - const cursor = this.allocateCursor(null, this.head); - while (cursor.next !== null) { - const item = cursor.next; - cursor.next = item.next; - fn.call(thisArg, item.data, item, this); - } - this.releaseCursor(); - } - forEachRight(fn, thisArg = this) { - const cursor = this.allocateCursor(this.tail, null); - while (cursor.prev !== null) { - const item = cursor.prev; - cursor.prev = item.prev; - fn.call(thisArg, item.data, item, this); - } - this.releaseCursor(); - } - reduce(fn, initialValue, thisArg = this) { - let cursor = this.allocateCursor(null, this.head); - let acc = initialValue; - let item; - while (cursor.next !== null) { - item = cursor.next; - cursor.next = item.next; - acc = fn.call(thisArg, acc, item.data, item, this); - } - this.releaseCursor(); - return acc; - } - reduceRight(fn, initialValue, thisArg = this) { - let cursor = this.allocateCursor(this.tail, null); - let acc = initialValue; - let item; - while (cursor.prev !== null) { - item = cursor.prev; - cursor.prev = item.prev; - acc = fn.call(thisArg, acc, item.data, item, this); - } - this.releaseCursor(); - return acc; - } - some(fn, thisArg = this) { - for (let cursor = this.head;cursor !== null; cursor = cursor.next) { - if (fn.call(thisArg, cursor.data, cursor, this)) { - return true; - } - } - return false; - } - map(fn, thisArg = this) { - const result = new List; - for (let cursor = this.head;cursor !== null; cursor = cursor.next) { - result.appendData(fn.call(thisArg, cursor.data, cursor, this)); - } - return result; - } - filter(fn, thisArg = this) { - const result = new List; - for (let cursor = this.head;cursor !== null; cursor = cursor.next) { - if (fn.call(thisArg, cursor.data, cursor, this)) { - result.appendData(cursor.data); - } - } - return result; - } - nextUntil(start, fn, thisArg = this) { - if (start === null) { - return; - } - const cursor = this.allocateCursor(null, start); - while (cursor.next !== null) { - const item = cursor.next; - cursor.next = item.next; - if (fn.call(thisArg, item.data, item, this)) { - break; - } - } - this.releaseCursor(); - } - prevUntil(start, fn, thisArg = this) { - if (start === null) { - return; - } - const cursor = this.allocateCursor(start, null); - while (cursor.prev !== null) { - const item = cursor.prev; - cursor.prev = item.prev; - if (fn.call(thisArg, item.data, item, this)) { - break; - } - } - this.releaseCursor(); - } - clear() { - this.head = null; - this.tail = null; - } - copy() { - const result = new List; - for (let data of this) { - result.appendData(data); - } - return result; - } - prepend(item) { - this.updateCursors(null, item, this.head, item); - if (this.head !== null) { - this.head.prev = item; - item.next = this.head; - } else { - this.tail = item; - } - this.head = item; - return this; - } - prependData(data) { - return this.prepend(List.createItem(data)); - } - append(item) { - return this.insert(item); - } - appendData(data) { - return this.insert(List.createItem(data)); - } - insert(item, before = null) { - if (before !== null) { - this.updateCursors(before.prev, item, before, item); - if (before.prev === null) { - if (this.head !== before) { - throw new Error("before doesn't belong to list"); - } - this.head = item; - before.prev = item; - item.next = before; - this.updateCursors(null, item); - } else { - before.prev.next = item; - item.prev = before.prev; - before.prev = item; - item.next = before; - } - } else { - this.updateCursors(this.tail, item, null, item); - if (this.tail !== null) { - this.tail.next = item; - item.prev = this.tail; - } else { - this.head = item; - } - this.tail = item; - } - return this; - } - insertData(data, before) { - return this.insert(List.createItem(data), before); - } - remove(item) { - this.updateCursors(item, item.prev, item, item.next); - if (item.prev !== null) { - item.prev.next = item.next; - } else { - if (this.head !== item) { - throw new Error("item doesn't belong to list"); - } - this.head = item.next; - } - if (item.next !== null) { - item.next.prev = item.prev; - } else { - if (this.tail !== item) { - throw new Error("item doesn't belong to list"); - } - this.tail = item.prev; - } - item.prev = null; - item.next = null; - return item; - } - push(data) { - this.insert(List.createItem(data)); - } - pop() { - return this.tail !== null ? this.remove(this.tail) : null; - } - unshift(data) { - this.prepend(List.createItem(data)); - } - shift() { - return this.head !== null ? this.remove(this.head) : null; - } - prependList(list) { - return this.insertList(list, this.head); - } - appendList(list) { - return this.insertList(list); - } - insertList(list, before) { - if (list.head === null) { - return this; - } - if (before !== undefined && before !== null) { - this.updateCursors(before.prev, list.tail, before, list.head); - if (before.prev !== null) { - before.prev.next = list.head; - list.head.prev = before.prev; - } else { - this.head = list.head; - } - before.prev = list.tail; - list.tail.next = before; - } else { - this.updateCursors(this.tail, list.tail, null, list.head); - if (this.tail !== null) { - this.tail.next = list.head; - list.head.prev = this.tail; - } else { - this.head = list.head; - } - this.tail = list.tail; - } - list.head = null; - list.tail = null; - return this; - } - replace(oldItem, newItemOrList) { - if ("head" in newItemOrList) { - this.insertList(newItemOrList, oldItem); - } else { - this.insert(newItemOrList, oldItem); - } - this.remove(oldItem); - } -} - -// node_modules/css-tree/lib/utils/create-custom-error.js -function createCustomError(name, message) { - const error = Object.create(SyntaxError.prototype); - const errorStack = new Error; - return Object.assign(error, { - name, - message, - get stack() { - return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name}: ${message} -`); - } - }); -} - -// node_modules/css-tree/lib/parser/SyntaxError.js -var MAX_LINE_LENGTH = 100; -var OFFSET_CORRECTION = 60; -var TAB_REPLACEMENT = " "; -function sourceFragment({ source, line, column, baseLine, baseColumn }, extraLines) { - function processLines(start, end) { - return lines.slice(start, end).map((line2, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line2).join(` -`); - } - const prelines = ` -`.repeat(Math.max(baseLine - 1, 0)); - const precolumns = " ".repeat(Math.max(baseColumn - 1, 0)); - const lines = (prelines + precolumns + source).split(/\r\n?|\n|\f/); - const startLine = Math.max(1, line - extraLines) - 1; - const endLine = Math.min(line + extraLines, lines.length + 1); - const maxNumLength = Math.max(4, String(endLine).length) + 1; - let cutLeft = 0; - column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length; - if (column > MAX_LINE_LENGTH) { - cutLeft = column - OFFSET_CORRECTION + 3; - column = OFFSET_CORRECTION - 2; - } - for (let i = startLine;i <= endLine; i++) { - if (i >= 0 && i < lines.length) { - lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT); - lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "…" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "…" : ""); - } - } - return [ - processLines(startLine, line), - new Array(column + maxNumLength + 2).join("-") + "^", - processLines(line, endLine) - ].filter(Boolean).join(` -`).replace(/^(\s+\d+\s+\|\n)+/, "").replace(/\n(\s+\d+\s+\|)+$/, ""); -} -function SyntaxError2(message, source, offset, line, column, baseLine = 1, baseColumn = 1) { - const error = Object.assign(createCustomError("SyntaxError", message), { - source, - offset, - line, - column, - sourceFragment(extraLines) { - return sourceFragment({ source, line, column, baseLine, baseColumn }, isNaN(extraLines) ? 0 : extraLines); - }, - get formattedMessage() { - return `Parse error: ${message} -` + sourceFragment({ source, line, column, baseLine, baseColumn }, 2); - } - }); - return error; -} - -// node_modules/css-tree/lib/tokenizer/types.js -var EOF = 0; -var Ident = 1; -var Function = 2; -var AtKeyword = 3; -var Hash = 4; -var String2 = 5; -var BadString = 6; -var Url = 7; -var BadUrl = 8; -var Delim = 9; -var Number2 = 10; -var Percentage = 11; -var Dimension = 12; -var WhiteSpace = 13; -var CDO = 14; -var CDC = 15; -var Colon = 16; -var Semicolon = 17; -var Comma = 18; -var LeftSquareBracket = 19; -var RightSquareBracket = 20; -var LeftParenthesis = 21; -var RightParenthesis = 22; -var LeftCurlyBracket = 23; -var RightCurlyBracket = 24; -var Comment3 = 25; - -// node_modules/css-tree/lib/tokenizer/char-code-definitions.js -var EOF2 = 0; -function isDigit(code) { - return code >= 48 && code <= 57; -} -function isHexDigit(code) { - return isDigit(code) || code >= 65 && code <= 70 || code >= 97 && code <= 102; -} -function isUppercaseLetter(code) { - return code >= 65 && code <= 90; -} -function isLowercaseLetter(code) { - return code >= 97 && code <= 122; -} -function isLetter(code) { - return isUppercaseLetter(code) || isLowercaseLetter(code); -} -function isNonAscii(code) { - return code >= 128; -} -function isNameStart(code) { - return isLetter(code) || isNonAscii(code) || code === 95; -} -function isName(code) { - return isNameStart(code) || isDigit(code) || code === 45; -} -function isNonPrintable(code) { - return code >= 0 && code <= 8 || code === 11 || code >= 14 && code <= 31 || code === 127; -} -function isNewline(code) { - return code === 10 || code === 13 || code === 12; -} -function isWhiteSpace(code) { - return isNewline(code) || code === 32 || code === 9; -} -function isValidEscape(first, second) { - if (first !== 92) { - return false; - } - if (isNewline(second) || second === EOF2) { - return false; - } - return true; -} -function isIdentifierStart(first, second, third) { - if (first === 45) { - return isNameStart(second) || second === 45 || isValidEscape(second, third); - } - if (isNameStart(first)) { - return true; - } - if (first === 92) { - return isValidEscape(first, second); - } - return false; -} -function isNumberStart(first, second, third) { - if (first === 43 || first === 45) { - if (isDigit(second)) { - return 2; - } - return second === 46 && isDigit(third) ? 3 : 0; - } - if (first === 46) { - return isDigit(second) ? 2 : 0; - } - if (isDigit(first)) { - return 1; - } - return 0; -} -function isBOM(code) { - if (code === 65279) { - return 1; - } - if (code === 65534) { - return 1; - } - return 0; -} -var CATEGORY = new Array(128); -var EofCategory = 128; -var WhiteSpaceCategory = 130; -var DigitCategory = 131; -var NameStartCategory = 132; -var NonPrintableCategory = 133; -for (let i = 0;i < CATEGORY.length; i++) { - CATEGORY[i] = isWhiteSpace(i) && WhiteSpaceCategory || isDigit(i) && DigitCategory || isNameStart(i) && NameStartCategory || isNonPrintable(i) && NonPrintableCategory || i || EofCategory; -} -function charCodeCategory(code) { - return code < 128 ? CATEGORY[code] : NameStartCategory; -} - -// node_modules/css-tree/lib/tokenizer/utils.js -function getCharCode(source, offset) { - return offset < source.length ? source.charCodeAt(offset) : 0; -} -function getNewlineLength(source, offset, code) { - if (code === 13 && getCharCode(source, offset + 1) === 10) { - return 2; - } - return 1; -} -function cmpChar(testStr, offset, referenceCode) { - let code = testStr.charCodeAt(offset); - if (isUppercaseLetter(code)) { - code = code | 32; - } - return code === referenceCode; -} -function cmpStr(testStr, start, end, referenceStr) { - if (end - start !== referenceStr.length) { - return false; - } - if (start < 0 || end > testStr.length) { - return false; - } - for (let i = start;i < end; i++) { - const referenceCode = referenceStr.charCodeAt(i - start); - let testCode = testStr.charCodeAt(i); - if (isUppercaseLetter(testCode)) { - testCode = testCode | 32; - } - if (testCode !== referenceCode) { - return false; - } - } - return true; -} -function findWhiteSpaceStart(source, offset) { - for (;offset >= 0; offset--) { - if (!isWhiteSpace(source.charCodeAt(offset))) { - break; - } - } - return offset + 1; -} -function findWhiteSpaceEnd(source, offset) { - for (;offset < source.length; offset++) { - if (!isWhiteSpace(source.charCodeAt(offset))) { - break; - } - } - return offset; -} -function findDecimalNumberEnd(source, offset) { - for (;offset < source.length; offset++) { - if (!isDigit(source.charCodeAt(offset))) { - break; - } - } - return offset; -} -function consumeEscaped(source, offset) { - offset += 2; - if (isHexDigit(getCharCode(source, offset - 1))) { - for (const maxOffset = Math.min(source.length, offset + 5);offset < maxOffset; offset++) { - if (!isHexDigit(getCharCode(source, offset))) { - break; - } - } - const code = getCharCode(source, offset); - if (isWhiteSpace(code)) { - offset += getNewlineLength(source, offset, code); - } - } - return offset; -} -function consumeName(source, offset) { - for (;offset < source.length; offset++) { - const code = source.charCodeAt(offset); - if (isName(code)) { - continue; - } - if (isValidEscape(code, getCharCode(source, offset + 1))) { - offset = consumeEscaped(source, offset) - 1; - continue; - } - break; - } - return offset; -} -function consumeNumber(source, offset) { - let code = source.charCodeAt(offset); - if (code === 43 || code === 45) { - code = source.charCodeAt(offset += 1); - } - if (isDigit(code)) { - offset = findDecimalNumberEnd(source, offset + 1); - code = source.charCodeAt(offset); - } - if (code === 46 && isDigit(source.charCodeAt(offset + 1))) { - offset += 2; - offset = findDecimalNumberEnd(source, offset); - } - if (cmpChar(source, offset, 101)) { - let sign = 0; - code = source.charCodeAt(offset + 1); - if (code === 45 || code === 43) { - sign = 1; - code = source.charCodeAt(offset + 2); - } - if (isDigit(code)) { - offset = findDecimalNumberEnd(source, offset + 1 + sign + 1); - } - } - return offset; -} -function consumeBadUrlRemnants(source, offset) { - for (;offset < source.length; offset++) { - const code = source.charCodeAt(offset); - if (code === 41) { - offset++; - break; - } - if (isValidEscape(code, getCharCode(source, offset + 1))) { - offset = consumeEscaped(source, offset); - } - } - return offset; -} -function decodeEscaped(escaped) { - if (escaped.length === 1 && !isHexDigit(escaped.charCodeAt(0))) { - return escaped[0]; - } - let code = parseInt(escaped, 16); - if (code === 0 || code >= 55296 && code <= 57343 || code > 1114111) { - code = 65533; - } - return String.fromCodePoint(code); -} -// node_modules/css-tree/lib/tokenizer/names.js -var names_default = [ - "EOF-token", - "ident-token", - "function-token", - "at-keyword-token", - "hash-token", - "string-token", - "bad-string-token", - "url-token", - "bad-url-token", - "delim-token", - "number-token", - "percentage-token", - "dimension-token", - "whitespace-token", - "CDO-token", - "CDC-token", - "colon-token", - "semicolon-token", - "comma-token", - "[-token", - "]-token", - "(-token", - ")-token", - "{-token", - "}-token", - "comment-token" -]; -// node_modules/css-tree/lib/tokenizer/adopt-buffer.js -var MIN_SIZE = 16 * 1024; -function adoptBuffer(buffer = null, size) { - if (buffer === null || buffer.length < size) { - return new Uint32Array(Math.max(size + 1024, MIN_SIZE)); - } - return buffer; -} - -// node_modules/css-tree/lib/tokenizer/OffsetToLocation.js -var N = 10; -var F = 12; -var R = 13; -function computeLinesAndColumns(host) { - const source = host.source; - const sourceLength = source.length; - const startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0; - const lines = adoptBuffer(host.lines, sourceLength); - const columns = adoptBuffer(host.columns, sourceLength); - let line = host.startLine; - let column = host.startColumn; - for (let i = startOffset;i < sourceLength; i++) { - const code = source.charCodeAt(i); - lines[i] = line; - columns[i] = column++; - if (code === N || code === R || code === F) { - if (code === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N) { - i++; - lines[i] = line; - columns[i] = column; - } - line++; - column = 1; - } - } - lines[sourceLength] = line; - columns[sourceLength] = column; - host.lines = lines; - host.columns = columns; - host.computed = true; -} - -class OffsetToLocation { - constructor(source, startOffset, startLine, startColumn) { - this.setSource(source, startOffset, startLine, startColumn); - this.lines = null; - this.columns = null; - } - setSource(source = "", startOffset = 0, startLine = 1, startColumn = 1) { - this.source = source; - this.startOffset = startOffset; - this.startLine = startLine; - this.startColumn = startColumn; - this.computed = false; - } - getLocation(offset, filename) { - if (!this.computed) { - computeLinesAndColumns(this); - } - return { - source: filename, - offset: this.startOffset + offset, - line: this.lines[offset], - column: this.columns[offset] - }; - } - getLocationRange(start, end, filename) { - if (!this.computed) { - computeLinesAndColumns(this); - } - return { - source: filename, - start: { - offset: this.startOffset + start, - line: this.lines[start], - column: this.columns[start] - }, - end: { - offset: this.startOffset + end, - line: this.lines[end], - column: this.columns[end] - } - }; - } -} -// node_modules/css-tree/lib/tokenizer/TokenStream.js -var OFFSET_MASK = 16777215; -var TYPE_SHIFT = 24; -var BLOCK_OPEN_TOKEN = 1; -var BLOCK_CLOSE_TOKEN = 2; -var balancePair = new Uint8Array(32); -balancePair[Function] = RightParenthesis; -balancePair[LeftParenthesis] = RightParenthesis; -balancePair[LeftSquareBracket] = RightSquareBracket; -balancePair[LeftCurlyBracket] = RightCurlyBracket; -var blockTokens = new Uint8Array(32); -blockTokens[Function] = BLOCK_OPEN_TOKEN; -blockTokens[LeftParenthesis] = BLOCK_OPEN_TOKEN; -blockTokens[LeftSquareBracket] = BLOCK_OPEN_TOKEN; -blockTokens[LeftCurlyBracket] = BLOCK_OPEN_TOKEN; -blockTokens[RightParenthesis] = BLOCK_CLOSE_TOKEN; -blockTokens[RightSquareBracket] = BLOCK_CLOSE_TOKEN; -blockTokens[RightCurlyBracket] = BLOCK_CLOSE_TOKEN; -function boundIndex(index, min, max) { - return index < min ? min : index > max ? max : index; -} - -class TokenStream { - constructor(source, tokenize) { - this.setSource(source, tokenize); - } - reset() { - this.eof = false; - this.tokenIndex = -1; - this.tokenType = 0; - this.tokenStart = this.firstCharOffset; - this.tokenEnd = this.firstCharOffset; - } - setSource(source = "", tokenize = () => {}) { - source = String(source || ""); - const sourceLength = source.length; - const offsetAndType = adoptBuffer(this.offsetAndType, source.length + 1); - const balance = adoptBuffer(this.balance, source.length + 1); - let tokenCount = 0; - let firstCharOffset = -1; - let balanceCloseType = 0; - let balanceStart = source.length; - this.offsetAndType = null; - this.balance = null; - balance.fill(0); - tokenize(source, (type, start, end) => { - const index = tokenCount++; - offsetAndType[index] = type << TYPE_SHIFT | end; - if (firstCharOffset === -1) { - firstCharOffset = start; - } - balance[index] = balanceStart; - if (type === balanceCloseType) { - const prevBalanceStart = balance[balanceStart]; - balance[balanceStart] = index; - balanceStart = prevBalanceStart; - balanceCloseType = balancePair[offsetAndType[prevBalanceStart] >> TYPE_SHIFT]; - } else if (this.isBlockOpenerTokenType(type)) { - balanceStart = index; - balanceCloseType = balancePair[type]; - } - }); - offsetAndType[tokenCount] = EOF << TYPE_SHIFT | sourceLength; - balance[tokenCount] = tokenCount; - for (let i = 0;i < tokenCount; i++) { - const balanceStart2 = balance[i]; - if (balanceStart2 <= i) { - const balanceEnd = balance[balanceStart2]; - if (balanceEnd !== i) { - balance[i] = balanceEnd; - } - } else if (balanceStart2 > tokenCount) { - balance[i] = tokenCount; - } - } - this.source = source; - this.firstCharOffset = firstCharOffset === -1 ? 0 : firstCharOffset; - this.tokenCount = tokenCount; - this.offsetAndType = offsetAndType; - this.balance = balance; - this.reset(); - this.next(); - } - lookupType(offset) { - offset += this.tokenIndex; - if (offset < this.tokenCount) { - return this.offsetAndType[offset] >> TYPE_SHIFT; - } - return EOF; - } - lookupTypeNonSC(idx) { - for (let offset = this.tokenIndex;offset < this.tokenCount; offset++) { - const tokenType = this.offsetAndType[offset] >> TYPE_SHIFT; - if (tokenType !== WhiteSpace && tokenType !== Comment3) { - if (idx-- === 0) { - return tokenType; - } - } - } - return EOF; - } - lookupOffset(offset) { - offset += this.tokenIndex; - if (offset < this.tokenCount) { - return this.offsetAndType[offset - 1] & OFFSET_MASK; - } - return this.source.length; - } - lookupOffsetNonSC(idx) { - for (let offset = this.tokenIndex;offset < this.tokenCount; offset++) { - const tokenType = this.offsetAndType[offset] >> TYPE_SHIFT; - if (tokenType !== WhiteSpace && tokenType !== Comment3) { - if (idx-- === 0) { - return offset - this.tokenIndex; - } - } - } - return EOF; - } - lookupValue(offset, referenceStr) { - offset += this.tokenIndex; - if (offset < this.tokenCount) { - return cmpStr(this.source, this.offsetAndType[offset - 1] & OFFSET_MASK, this.offsetAndType[offset] & OFFSET_MASK, referenceStr); - } - return false; - } - getTokenStart(tokenIndex) { - if (tokenIndex === this.tokenIndex) { - return this.tokenStart; - } - if (tokenIndex > 0) { - return tokenIndex < this.tokenCount ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK : this.offsetAndType[this.tokenCount] & OFFSET_MASK; - } - return this.firstCharOffset; - } - getTokenEnd(tokenIndex) { - if (tokenIndex === this.tokenIndex) { - return this.tokenEnd; - } - return this.offsetAndType[boundIndex(tokenIndex, 0, this.tokenCount)] & OFFSET_MASK; - } - getTokenType(tokenIndex) { - if (tokenIndex === this.tokenIndex) { - return this.tokenType; - } - return this.offsetAndType[boundIndex(tokenIndex, 0, this.tokenCount)] >> TYPE_SHIFT; - } - substrToCursor(start) { - return this.source.substring(start, this.tokenStart); - } - isBlockOpenerTokenType(tokenType) { - return blockTokens[tokenType] === BLOCK_OPEN_TOKEN; - } - isBlockCloserTokenType(tokenType) { - return blockTokens[tokenType] === BLOCK_CLOSE_TOKEN; - } - getBlockTokenPairIndex(tokenIndex) { - const type = this.getTokenType(tokenIndex); - if (blockTokens[type] === 1) { - const pairIndex = this.balance[tokenIndex]; - const closeType = this.getTokenType(pairIndex); - return balancePair[type] === closeType ? pairIndex : -1; - } else if (blockTokens[type] === 2) { - const pairIndex = this.balance[tokenIndex]; - const openType = this.getTokenType(pairIndex); - return balancePair[openType] === type ? pairIndex : -1; - } - return -1; - } - isBalanceEdge(tokenIndex) { - return this.balance[this.tokenIndex] < tokenIndex; - } - isDelim(code, offset) { - if (offset) { - return this.lookupType(offset) === Delim && this.source.charCodeAt(this.lookupOffset(offset)) === code; - } - return this.tokenType === Delim && this.source.charCodeAt(this.tokenStart) === code; - } - skip(tokenCount) { - let next = this.tokenIndex + tokenCount; - if (next < this.tokenCount) { - this.tokenIndex = next; - this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK; - next = this.offsetAndType[next]; - this.tokenType = next >> TYPE_SHIFT; - this.tokenEnd = next & OFFSET_MASK; - } else { - this.tokenIndex = this.tokenCount; - this.next(); - } - } - next() { - let next = this.tokenIndex + 1; - if (next < this.tokenCount) { - this.tokenIndex = next; - this.tokenStart = this.tokenEnd; - next = this.offsetAndType[next]; - this.tokenType = next >> TYPE_SHIFT; - this.tokenEnd = next & OFFSET_MASK; - } else { - this.eof = true; - this.tokenIndex = this.tokenCount; - this.tokenType = EOF; - this.tokenStart = this.tokenEnd = this.source.length; - } - } - skipSC() { - while (this.tokenType === WhiteSpace || this.tokenType === Comment3) { - this.next(); - } - } - skipUntilBalanced(startToken, stopConsume) { - let cursor = startToken; - let balanceEnd = 0; - let offset = 0; - loop: - for (;cursor < this.tokenCount; cursor++) { - balanceEnd = this.balance[cursor]; - if (balanceEnd < startToken) { - break loop; - } - offset = cursor > 0 ? this.offsetAndType[cursor - 1] & OFFSET_MASK : this.firstCharOffset; - switch (stopConsume(this.source.charCodeAt(offset))) { - case 1: - break loop; - case 2: - cursor++; - break loop; - default: - if (this.isBlockOpenerTokenType(this.offsetAndType[cursor] >> TYPE_SHIFT)) { - cursor = balanceEnd; - } - } - } - this.skip(cursor - this.tokenIndex); - } - forEachToken(fn) { - for (let i = 0, offset = this.firstCharOffset;i < this.tokenCount; i++) { - const start = offset; - const item = this.offsetAndType[i]; - const end = item & OFFSET_MASK; - const type = item >> TYPE_SHIFT; - offset = end; - fn(type, start, end, i); - } - } - dump() { - const tokens = new Array(this.tokenCount); - this.forEachToken((type, start, end, index) => { - tokens[index] = { - idx: index, - type: names_default[type], - chunk: this.source.substring(start, end), - balance: this.balance[index] - }; - }); - return tokens; - } -} - -// node_modules/css-tree/lib/tokenizer/index.js -function tokenize(source, onToken) { - function getCharCode2(offset2) { - return offset2 < sourceLength ? source.charCodeAt(offset2) : 0; - } - function consumeNumericToken() { - offset = consumeNumber(source, offset); - if (isIdentifierStart(getCharCode2(offset), getCharCode2(offset + 1), getCharCode2(offset + 2))) { - type = Dimension; - offset = consumeName(source, offset); - return; - } - if (getCharCode2(offset) === 37) { - type = Percentage; - offset++; - return; - } - type = Number2; - } - function consumeIdentLikeToken() { - const nameStartOffset = offset; - offset = consumeName(source, offset); - if (cmpStr(source, nameStartOffset, offset, "url") && getCharCode2(offset) === 40) { - offset = findWhiteSpaceEnd(source, offset + 1); - if (getCharCode2(offset) === 34 || getCharCode2(offset) === 39) { - type = Function; - offset = nameStartOffset + 4; - return; - } - consumeUrlToken(); - return; - } - if (getCharCode2(offset) === 40) { - type = Function; - offset++; - return; - } - type = Ident; - } - function consumeStringToken(endingCodePoint) { - if (!endingCodePoint) { - endingCodePoint = getCharCode2(offset++); - } - type = String2; - for (;offset < source.length; offset++) { - const code = source.charCodeAt(offset); - switch (charCodeCategory(code)) { - case endingCodePoint: - offset++; - return; - case WhiteSpaceCategory: - if (isNewline(code)) { - offset += getNewlineLength(source, offset, code); - type = BadString; - return; - } - break; - case 92: - if (offset === source.length - 1) { - break; - } - const nextCode = getCharCode2(offset + 1); - if (isNewline(nextCode)) { - offset += getNewlineLength(source, offset + 1, nextCode); - } else if (isValidEscape(code, nextCode)) { - offset = consumeEscaped(source, offset) - 1; - } - break; - } - } - } - function consumeUrlToken() { - type = Url; - offset = findWhiteSpaceEnd(source, offset); - for (;offset < source.length; offset++) { - const code = source.charCodeAt(offset); - switch (charCodeCategory(code)) { - case 41: - offset++; - return; - case WhiteSpaceCategory: - offset = findWhiteSpaceEnd(source, offset); - if (getCharCode2(offset) === 41 || offset >= source.length) { - if (offset < source.length) { - offset++; - } - return; - } - offset = consumeBadUrlRemnants(source, offset); - type = BadUrl; - return; - case 34: - case 39: - case 40: - case NonPrintableCategory: - offset = consumeBadUrlRemnants(source, offset); - type = BadUrl; - return; - case 92: - if (isValidEscape(code, getCharCode2(offset + 1))) { - offset = consumeEscaped(source, offset) - 1; - break; - } - offset = consumeBadUrlRemnants(source, offset); - type = BadUrl; - return; - } - } - } - source = String(source || ""); - const sourceLength = source.length; - let start = isBOM(getCharCode2(0)); - let offset = start; - let type; - while (offset < sourceLength) { - const code = source.charCodeAt(offset); - switch (charCodeCategory(code)) { - case WhiteSpaceCategory: - type = WhiteSpace; - offset = findWhiteSpaceEnd(source, offset + 1); - break; - case 34: - consumeStringToken(); - break; - case 35: - if (isName(getCharCode2(offset + 1)) || isValidEscape(getCharCode2(offset + 1), getCharCode2(offset + 2))) { - type = Hash; - offset = consumeName(source, offset + 1); - } else { - type = Delim; - offset++; - } - break; - case 39: - consumeStringToken(); - break; - case 40: - type = LeftParenthesis; - offset++; - break; - case 41: - type = RightParenthesis; - offset++; - break; - case 43: - if (isNumberStart(code, getCharCode2(offset + 1), getCharCode2(offset + 2))) { - consumeNumericToken(); - } else { - type = Delim; - offset++; - } - break; - case 44: - type = Comma; - offset++; - break; - case 45: - if (isNumberStart(code, getCharCode2(offset + 1), getCharCode2(offset + 2))) { - consumeNumericToken(); - } else { - if (getCharCode2(offset + 1) === 45 && getCharCode2(offset + 2) === 62) { - type = CDC; - offset = offset + 3; - } else { - if (isIdentifierStart(code, getCharCode2(offset + 1), getCharCode2(offset + 2))) { - consumeIdentLikeToken(); - } else { - type = Delim; - offset++; - } - } - } - break; - case 46: - if (isNumberStart(code, getCharCode2(offset + 1), getCharCode2(offset + 2))) { - consumeNumericToken(); - } else { - type = Delim; - offset++; - } - break; - case 47: - if (getCharCode2(offset + 1) === 42) { - type = Comment3; - offset = source.indexOf("*/", offset + 2); - offset = offset === -1 ? source.length : offset + 2; - } else { - type = Delim; - offset++; - } - break; - case 58: - type = Colon; - offset++; - break; - case 59: - type = Semicolon; - offset++; - break; - case 60: - if (getCharCode2(offset + 1) === 33 && getCharCode2(offset + 2) === 45 && getCharCode2(offset + 3) === 45) { - type = CDO; - offset = offset + 4; - } else { - type = Delim; - offset++; - } - break; - case 64: - if (isIdentifierStart(getCharCode2(offset + 1), getCharCode2(offset + 2), getCharCode2(offset + 3))) { - type = AtKeyword; - offset = consumeName(source, offset + 1); - } else { - type = Delim; - offset++; - } - break; - case 91: - type = LeftSquareBracket; - offset++; - break; - case 92: - if (isValidEscape(code, getCharCode2(offset + 1))) { - consumeIdentLikeToken(); - } else { - type = Delim; - offset++; - } - break; - case 93: - type = RightSquareBracket; - offset++; - break; - case 123: - type = LeftCurlyBracket; - offset++; - break; - case 125: - type = RightCurlyBracket; - offset++; - break; - case DigitCategory: - consumeNumericToken(); - break; - case NameStartCategory: - consumeIdentLikeToken(); - break; - default: - type = Delim; - offset++; - } - onToken(type, start, start = offset); - } -} - -// node_modules/css-tree/lib/parser/sequence.js -function readSequence(recognizer) { - const children = this.createList(); - let space = false; - const context = { - recognizer - }; - while (!this.eof) { - switch (this.tokenType) { - case Comment3: - this.next(); - continue; - case WhiteSpace: - space = true; - this.next(); - continue; - } - let child = recognizer.getNode.call(this, context); - if (child === undefined) { - break; - } - if (space) { - if (recognizer.onWhiteSpace) { - recognizer.onWhiteSpace.call(this, child, children, context); - } - space = false; - } - children.push(child); - } - if (space && recognizer.onWhiteSpace) { - recognizer.onWhiteSpace.call(this, null, children, context); - } - return children; -} - -// node_modules/css-tree/lib/parser/create.js -var NOOP = () => {}; -var EXCLAMATIONMARK = 33; -var NUMBERSIGN = 35; -var SEMICOLON = 59; -var LEFTCURLYBRACKET = 123; -var NULL = 0; -var arrayMethods = { - createList() { - return []; - }, - createSingleNodeList(node2) { - return [node2]; - }, - getFirstListNode(list) { - return list && list[0] || null; - }, - getLastListNode(list) { - return list && list.length > 0 ? list[list.length - 1] : null; - } -}; -var listMethods = { - createList() { - return new List; - }, - createSingleNodeList(node2) { - return new List().appendData(node2); - }, - getFirstListNode(list) { - return list && list.first; - }, - getLastListNode(list) { - return list && list.last; - } -}; -function createParseContext(name) { - return function() { - return this[name](); - }; -} -function fetchParseValues(dict) { - const result = Object.create(null); - for (const name of Object.keys(dict)) { - const item = dict[name]; - const fn = item.parse || item; - if (fn) { - result[name] = fn; - } - } - return result; -} -function processConfig(config) { - const parseConfig = { - context: Object.create(null), - features: Object.assign(Object.create(null), config.features), - scope: Object.assign(Object.create(null), config.scope), - atrule: fetchParseValues(config.atrule), - pseudo: fetchParseValues(config.pseudo), - node: fetchParseValues(config.node) - }; - for (const [name, context] of Object.entries(config.parseContext)) { - switch (typeof context) { - case "function": - parseConfig.context[name] = context; - break; - case "string": - parseConfig.context[name] = createParseContext(context); - break; - } - } - return { - config: parseConfig, - ...parseConfig, - ...parseConfig.node - }; -} -function createParser(config) { - let source = ""; - let filename = ""; - let needPositions = false; - let onParseError = NOOP; - let onParseErrorThrow = false; - const locationMap = new OffsetToLocation; - const parser = Object.assign(new TokenStream, processConfig(config || {}), { - parseAtrulePrelude: true, - parseRulePrelude: true, - parseValue: true, - parseCustomProperty: false, - readSequence, - consumeUntilBalanceEnd: () => 0, - consumeUntilLeftCurlyBracket(code) { - return code === LEFTCURLYBRACKET ? 1 : 0; - }, - consumeUntilLeftCurlyBracketOrSemicolon(code) { - return code === LEFTCURLYBRACKET || code === SEMICOLON ? 1 : 0; - }, - consumeUntilExclamationMarkOrSemicolon(code) { - return code === EXCLAMATIONMARK || code === SEMICOLON ? 1 : 0; - }, - consumeUntilSemicolonIncluded(code) { - return code === SEMICOLON ? 2 : 0; - }, - createList: NOOP, - createSingleNodeList: NOOP, - getFirstListNode: NOOP, - getLastListNode: NOOP, - parseWithFallback(consumer, fallback) { - const startIndex = this.tokenIndex; - try { - return consumer.call(this); - } catch (e) { - if (onParseErrorThrow) { - throw e; - } - this.skip(startIndex - this.tokenIndex); - const fallbackNode = fallback.call(this); - onParseErrorThrow = true; - onParseError(e, fallbackNode); - onParseErrorThrow = false; - return fallbackNode; - } - }, - lookupNonWSType(offset) { - let type; - do { - type = this.lookupType(offset++); - if (type !== WhiteSpace && type !== Comment3) { - return type; - } - } while (type !== NULL); - return NULL; - }, - charCodeAt(offset) { - return offset >= 0 && offset < source.length ? source.charCodeAt(offset) : 0; - }, - substring(offsetStart, offsetEnd) { - return source.substring(offsetStart, offsetEnd); - }, - substrToCursor(start) { - return this.source.substring(start, this.tokenStart); - }, - cmpChar(offset, charCode) { - return cmpChar(source, offset, charCode); - }, - cmpStr(offsetStart, offsetEnd, str) { - return cmpStr(source, offsetStart, offsetEnd, str); - }, - consume(tokenType) { - const start = this.tokenStart; - this.eat(tokenType); - return this.substrToCursor(start); - }, - consumeFunctionName() { - const name = source.substring(this.tokenStart, this.tokenEnd - 1); - this.eat(Function); - return name; - }, - consumeNumber(type) { - const number = source.substring(this.tokenStart, consumeNumber(source, this.tokenStart)); - this.eat(type); - return number; - }, - eat(tokenType) { - if (this.tokenType !== tokenType) { - const tokenName = names_default[tokenType].slice(0, -6).replace(/-/g, " ").replace(/^./, (m) => m.toUpperCase()); - let message = `${/[[\](){}]/.test(tokenName) ? `"${tokenName}"` : tokenName} is expected`; - let offset = this.tokenStart; - switch (tokenType) { - case Ident: - if (this.tokenType === Function || this.tokenType === Url) { - offset = this.tokenEnd - 1; - message = "Identifier is expected but function found"; - } else { - message = "Identifier is expected"; - } - break; - case Hash: - if (this.isDelim(NUMBERSIGN)) { - this.next(); - offset++; - message = "Name is expected"; - } - break; - case Percentage: - if (this.tokenType === Number2) { - offset = this.tokenEnd; - message = "Percent sign is expected"; - } - break; - } - this.error(message, offset); - } - this.next(); - }, - eatIdent(name) { - if (this.tokenType !== Ident || this.lookupValue(0, name) === false) { - this.error(`Identifier "${name}" is expected`); - } - this.next(); - }, - eatDelim(code) { - if (!this.isDelim(code)) { - this.error(`Delim "${String.fromCharCode(code)}" is expected`); - } - this.next(); - }, - getLocation(start, end) { - if (needPositions) { - return locationMap.getLocationRange(start, end, filename); - } - return null; - }, - getLocationFromList(list) { - if (needPositions) { - const head = this.getFirstListNode(list); - const tail = this.getLastListNode(list); - return locationMap.getLocationRange(head !== null ? head.loc.start.offset - locationMap.startOffset : this.tokenStart, tail !== null ? tail.loc.end.offset - locationMap.startOffset : this.tokenStart, filename); - } - return null; - }, - error(message, offset) { - const location = typeof offset !== "undefined" && offset < source.length ? locationMap.getLocation(offset) : this.eof ? locationMap.getLocation(findWhiteSpaceStart(source, source.length - 1)) : locationMap.getLocation(this.tokenStart); - throw new SyntaxError2(message || "Unexpected input", source, location.offset, location.line, location.column, locationMap.startLine, locationMap.startColumn); - } - }); - const createTokenIterateAPI = () => ({ - filename, - source, - tokenCount: parser.tokenCount, - getTokenType: (index) => parser.getTokenType(index), - getTokenTypeName: (index) => names_default[parser.getTokenType(index)], - getTokenStart: (index) => parser.getTokenStart(index), - getTokenEnd: (index) => parser.getTokenEnd(index), - getTokenValue: (index) => parser.source.substring(parser.getTokenStart(index), parser.getTokenEnd(index)), - substring: (start, end) => parser.source.substring(start, end), - balance: parser.balance.subarray(0, parser.tokenCount + 1), - isBlockOpenerTokenType: parser.isBlockOpenerTokenType, - isBlockCloserTokenType: parser.isBlockCloserTokenType, - getBlockTokenPairIndex: (index) => parser.getBlockTokenPairIndex(index), - getLocation: (offset) => locationMap.getLocation(offset, filename), - getRangeLocation: (start, end) => locationMap.getLocationRange(start, end, filename) - }); - const parse3 = function(source_, options) { - source = source_; - options = options || {}; - parser.setSource(source, tokenize); - locationMap.setSource(source, options.offset, options.line, options.column); - filename = options.filename || ""; - needPositions = Boolean(options.positions); - onParseError = typeof options.onParseError === "function" ? options.onParseError : NOOP; - onParseErrorThrow = false; - parser.parseAtrulePrelude = "parseAtrulePrelude" in options ? Boolean(options.parseAtrulePrelude) : true; - parser.parseRulePrelude = "parseRulePrelude" in options ? Boolean(options.parseRulePrelude) : true; - parser.parseValue = "parseValue" in options ? Boolean(options.parseValue) : true; - parser.parseCustomProperty = "parseCustomProperty" in options ? Boolean(options.parseCustomProperty) : false; - const { context = "default", list = true, onComment, onToken } = options; - if (context in parser.context === false) { - throw new Error("Unknown context `" + context + "`"); - } - Object.assign(parser, list ? listMethods : arrayMethods); - if (Array.isArray(onToken)) { - parser.forEachToken((type, start, end) => { - onToken.push({ type, start, end }); - }); - } else if (typeof onToken === "function") { - parser.forEachToken(onToken.bind(createTokenIterateAPI())); - } - if (typeof onComment === "function") { - parser.forEachToken((type, start, end) => { - if (type === Comment3) { - const loc = parser.getLocation(start, end); - const value = cmpStr(source, end - 2, end, "*/") ? source.slice(start + 2, end - 2) : source.slice(start + 2, end); - onComment(value, loc); - } - }); - } - const ast = parser.context[context].call(parser, options); - if (!parser.eof) { - parser.error(); - } - return ast; - }; - return Object.assign(parse3, { - SyntaxError: SyntaxError2, - config: parser.config - }); -} - -// node_modules/css-tree/lib/syntax/scope/index.js -var exports_scope = {}; -__export(exports_scope, { - Value: () => value_default, - Selector: () => selector_default, - AtrulePrelude: () => atrulePrelude_default -}); - -// node_modules/css-tree/lib/syntax/scope/default.js -var NUMBERSIGN2 = 35; -var ASTERISK = 42; -var PLUSSIGN = 43; -var HYPHENMINUS = 45; -var SOLIDUS = 47; -var U = 117; -function defaultRecognizer(context) { - switch (this.tokenType) { - case Hash: - return this.Hash(); - case Comma: - return this.Operator(); - case LeftParenthesis: - return this.Parentheses(this.readSequence, context.recognizer); - case LeftSquareBracket: - return this.Brackets(this.readSequence, context.recognizer); - case String2: - return this.String(); - case Dimension: - return this.Dimension(); - case Percentage: - return this.Percentage(); - case Number2: - return this.Number(); - case Function: - return this.cmpStr(this.tokenStart, this.tokenEnd, "url(") ? this.Url() : this.Function(this.readSequence, context.recognizer); - case Url: - return this.Url(); - case Ident: - if (this.cmpChar(this.tokenStart, U) && this.cmpChar(this.tokenStart + 1, PLUSSIGN)) { - return this.UnicodeRange(); - } else { - return this.Identifier(); - } - case Delim: { - const code = this.charCodeAt(this.tokenStart); - if (code === SOLIDUS || code === ASTERISK || code === PLUSSIGN || code === HYPHENMINUS) { - return this.Operator(); - } - if (code === NUMBERSIGN2) { - this.error("Hex or identifier is expected", this.tokenStart + 1); - } - break; - } - } -} - -// node_modules/css-tree/lib/syntax/scope/atrulePrelude.js -var atrulePrelude_default = { - getNode: defaultRecognizer -}; -// node_modules/css-tree/lib/syntax/scope/selector.js -var NUMBERSIGN3 = 35; -var AMPERSAND = 38; -var ASTERISK2 = 42; -var PLUSSIGN2 = 43; -var SOLIDUS2 = 47; -var FULLSTOP = 46; -var GREATERTHANSIGN = 62; -var VERTICALLINE = 124; -var TILDE = 126; -function onWhiteSpace(next, children) { - if (children.last !== null && children.last.type !== "Combinator" && next !== null && next.type !== "Combinator") { - children.push({ - type: "Combinator", - loc: null, - name: " " - }); - } -} -function getNode() { - switch (this.tokenType) { - case LeftSquareBracket: - return this.AttributeSelector(); - case Hash: - return this.IdSelector(); - case Colon: - if (this.lookupType(1) === Colon) { - return this.PseudoElementSelector(); - } else { - return this.PseudoClassSelector(); - } - case Ident: - return this.TypeSelector(); - case Number2: - case Percentage: - return this.Percentage(); - case Dimension: - if (this.charCodeAt(this.tokenStart) === FULLSTOP) { - this.error("Identifier is expected", this.tokenStart + 1); - } - break; - case Delim: { - const code = this.charCodeAt(this.tokenStart); - switch (code) { - case PLUSSIGN2: - case GREATERTHANSIGN: - case TILDE: - case SOLIDUS2: - return this.Combinator(); - case FULLSTOP: - return this.ClassSelector(); - case ASTERISK2: - case VERTICALLINE: - return this.TypeSelector(); - case NUMBERSIGN3: - return this.IdSelector(); - case AMPERSAND: - return this.NestingSelector(); - } - break; - } - } -} -var selector_default = { - onWhiteSpace, - getNode -}; -// node_modules/css-tree/lib/syntax/function/expression.js -function expression_default() { - return this.createSingleNodeList(this.Raw(null, false)); -} - -// node_modules/css-tree/lib/syntax/function/var.js -function var_default() { - const children = this.createList(); - this.skipSC(); - children.push(this.Identifier()); - this.skipSC(); - if (this.tokenType === Comma) { - children.push(this.Operator()); - const startIndex = this.tokenIndex; - const value = this.parseCustomProperty ? this.Value(null) : this.Raw(this.consumeUntilExclamationMarkOrSemicolon, false); - if (value.type === "Value" && value.children.isEmpty) { - for (let offset = startIndex - this.tokenIndex;offset <= 0; offset++) { - if (this.lookupType(offset) === WhiteSpace) { - value.children.appendData({ - type: "WhiteSpace", - loc: null, - value: " " - }); - break; - } - } - } - children.push(value); - } - return children; -} - -// node_modules/css-tree/lib/syntax/scope/value.js -function isPlusMinusOperator(node2) { - return node2 !== null && node2.type === "Operator" && (node2.value[node2.value.length - 1] === "-" || node2.value[node2.value.length - 1] === "+"); -} -var value_default = { - getNode: defaultRecognizer, - onWhiteSpace(next, children) { - if (isPlusMinusOperator(next)) { - next.value = " " + next.value; - } - if (isPlusMinusOperator(children.last)) { - children.last.value += " "; - } - }, - expression: expression_default, - var: var_default -}; -// node_modules/css-tree/lib/syntax/atrule/container.js -var nonContainerNameKeywords = new Set(["none", "and", "not", "or"]); -var container_default = { - parse: { - prelude() { - const children = this.createList(); - if (this.tokenType === Ident) { - const name = this.substring(this.tokenStart, this.tokenEnd); - if (!nonContainerNameKeywords.has(name.toLowerCase())) { - children.push(this.Identifier()); - } - } - children.push(this.Condition("container")); - return children; - }, - block(nested = false) { - return this.Block(nested); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/font-face.js -var font_face_default = { - parse: { - prelude: null, - block() { - return this.Block(true); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/import.js -function parseWithFallback(parse3, fallback) { - return this.parseWithFallback(() => { - try { - return parse3.call(this); - } finally { - this.skipSC(); - if (this.lookupNonWSType(0) !== RightParenthesis) { - this.error(); - } - } - }, fallback || (() => this.Raw(null, true))); -} -var parseFunctions = { - layer() { - this.skipSC(); - const children = this.createList(); - const node2 = parseWithFallback.call(this, this.Layer); - if (node2.type !== "Raw" || node2.value !== "") { - children.push(node2); - } - return children; - }, - supports() { - this.skipSC(); - const children = this.createList(); - const node2 = parseWithFallback.call(this, this.Declaration, () => parseWithFallback.call(this, () => this.Condition("supports"))); - if (node2.type !== "Raw" || node2.value !== "") { - children.push(node2); - } - return children; - } -}; -var import_default3 = { - parse: { - prelude() { - const children = this.createList(); - switch (this.tokenType) { - case String2: - children.push(this.String()); - break; - case Url: - case Function: - children.push(this.Url()); - break; - default: - this.error("String or url() is expected"); - } - this.skipSC(); - if (this.tokenType === Ident && this.cmpStr(this.tokenStart, this.tokenEnd, "layer")) { - children.push(this.Identifier()); - } else if (this.tokenType === Function && this.cmpStr(this.tokenStart, this.tokenEnd, "layer(")) { - children.push(this.Function(null, parseFunctions)); - } - this.skipSC(); - if (this.tokenType === Function && this.cmpStr(this.tokenStart, this.tokenEnd, "supports(")) { - children.push(this.Function(null, parseFunctions)); - } - if (this.lookupNonWSType(0) === Ident || this.lookupNonWSType(0) === LeftParenthesis) { - children.push(this.MediaQueryList()); - } - return children; - }, - block: null - } -}; - -// node_modules/css-tree/lib/syntax/atrule/layer.js -var layer_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.LayerList()); - }, - block() { - return this.Block(false); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/media.js -var media_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.MediaQueryList()); - }, - block(nested = false) { - return this.Block(nested); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/nest.js -var nest_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.SelectorList()); - }, - block() { - return this.Block(true); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/page.js -var page_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.SelectorList()); - }, - block() { - return this.Block(true); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/scope.js -var scope_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.Scope()); - }, - block(nested = false) { - return this.Block(nested); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/starting-style.js -var starting_style_default = { - parse: { - prelude: null, - block(nested = false) { - return this.Block(nested); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/supports.js -var supports_default = { - parse: { - prelude() { - return this.createSingleNodeList(this.Condition("supports")); - }, - block(nested = false) { - return this.Block(nested); - } - } -}; - -// node_modules/css-tree/lib/syntax/atrule/index.js -var atrule_default = { - container: container_default, - "font-face": font_face_default, - import: import_default3, - layer: layer_default, - media: media_default, - nest: nest_default, - page: page_default, - scope: scope_default, - "starting-style": starting_style_default, - supports: supports_default -}; - -// node_modules/css-tree/lib/syntax/pseudo/lang.js -function parseLanguageRangeList() { - const children = this.createList(); - this.skipSC(); - loop: - while (!this.eof) { - switch (this.tokenType) { - case Ident: - children.push(this.Identifier()); - break; - case String2: - children.push(this.String()); - break; - case Comma: - children.push(this.Operator()); - break; - case RightParenthesis: - break loop; - default: - this.error("Identifier, string or comma is expected"); - } - this.skipSC(); - } - return children; -} - -// node_modules/css-tree/lib/syntax/pseudo/index.js -var selectorList = { - parse() { - return this.createSingleNodeList(this.SelectorList()); - } -}; -var selector = { - parse() { - return this.createSingleNodeList(this.Selector()); - } -}; -var identList = { - parse() { - return this.createSingleNodeList(this.Identifier()); - } -}; -var langList = { - parse: parseLanguageRangeList -}; -var nth = { - parse() { - return this.createSingleNodeList(this.Nth()); - } -}; -var pseudo_default = { - dir: identList, - has: selectorList, - lang: langList, - matches: selectorList, - is: selectorList, - "-moz-any": selectorList, - "-webkit-any": selectorList, - where: selectorList, - not: selectorList, - "nth-child": nth, - "nth-last-child": nth, - "nth-last-of-type": nth, - "nth-of-type": nth, - slotted: selector, - host: selector, - "host-context": selector -}; - -// node_modules/css-tree/lib/syntax/node/index-parse.js -var exports_index_parse = {}; -__export(exports_index_parse, { - WhiteSpace: () => parse51, - Value: () => parse50, - Url: () => parse49, - UnicodeRange: () => parse48, - TypeSelector: () => parse47, - SupportsDeclaration: () => parse46, - StyleSheet: () => parse45, - String: () => parse44, - SelectorList: () => parse43, - Selector: () => parse42, - Scope: () => parse41, - Rule: () => parse40, - Raw: () => parse39, - Ratio: () => parse38, - PseudoElementSelector: () => parse37, - PseudoClassSelector: () => parse36, - Percentage: () => parse35, - Parentheses: () => parse34, - Operator: () => parse33, - Number: () => parse32, - Nth: () => parse31, - NestingSelector: () => parse30, - MediaQueryList: () => parse29, - MediaQuery: () => parse28, - LayerList: () => parse27, - Layer: () => parse26, - Identifier: () => parse24, - IdSelector: () => parse25, - Hash: () => parse23, - GeneralEnclosed: () => parse22, - Function: () => parse21, - FeatureRange: () => parse20, - FeatureFunction: () => parse19, - Feature: () => parse18, - Dimension: () => parse17, - DeclarationList: () => parse16, - Declaration: () => parse15, - Condition: () => parse14, - Comment: () => parse13, - Combinator: () => parse12, - ClassSelector: () => parse11, - CDO: () => parse10, - CDC: () => parse9, - Brackets: () => parse8, - Block: () => parse7, - AttributeSelector: () => parse6, - AtrulePrelude: () => parse5, - Atrule: () => parse4, - AnPlusB: () => parse3 -}); - -// node_modules/css-tree/lib/syntax/node/AnPlusB.js -var PLUSSIGN3 = 43; -var HYPHENMINUS2 = 45; -var N2 = 110; -var DISALLOW_SIGN = true; -var ALLOW_SIGN = false; -function checkInteger(offset, disallowSign) { - let pos = this.tokenStart + offset; - const code = this.charCodeAt(pos); - if (code === PLUSSIGN3 || code === HYPHENMINUS2) { - if (disallowSign) { - this.error("Number sign is not allowed"); - } - pos++; - } - for (;pos < this.tokenEnd; pos++) { - if (!isDigit(this.charCodeAt(pos))) { - this.error("Integer is expected", pos); - } - } -} -function checkTokenIsInteger(disallowSign) { - return checkInteger.call(this, 0, disallowSign); -} -function expectCharCode(offset, code) { - if (!this.cmpChar(this.tokenStart + offset, code)) { - let msg = ""; - switch (code) { - case N2: - msg = "N is expected"; - break; - case HYPHENMINUS2: - msg = "HyphenMinus is expected"; - break; - } - this.error(msg, this.tokenStart + offset); - } -} -function consumeB() { - let offset = 0; - let sign = 0; - let type = this.tokenType; - while (type === WhiteSpace || type === Comment3) { - type = this.lookupType(++offset); - } - if (type !== Number2) { - if (this.isDelim(PLUSSIGN3, offset) || this.isDelim(HYPHENMINUS2, offset)) { - sign = this.isDelim(PLUSSIGN3, offset) ? PLUSSIGN3 : HYPHENMINUS2; - do { - type = this.lookupType(++offset); - } while (type === WhiteSpace || type === Comment3); - if (type !== Number2) { - this.skip(offset); - checkTokenIsInteger.call(this, DISALLOW_SIGN); - } - } else { - return null; - } - } - if (offset > 0) { - this.skip(offset); - } - if (sign === 0) { - type = this.charCodeAt(this.tokenStart); - if (type !== PLUSSIGN3 && type !== HYPHENMINUS2) { - this.error("Number sign is expected"); - } - } - checkTokenIsInteger.call(this, sign !== 0); - return sign === HYPHENMINUS2 ? "-" + this.consume(Number2) : this.consume(Number2); -} -function parse3() { - const start = this.tokenStart; - let a = null; - let b = null; - if (this.tokenType === Number2) { - checkTokenIsInteger.call(this, ALLOW_SIGN); - b = this.consume(Number2); - } else if (this.tokenType === Ident && this.cmpChar(this.tokenStart, HYPHENMINUS2)) { - a = "-1"; - expectCharCode.call(this, 1, N2); - switch (this.tokenEnd - this.tokenStart) { - case 2: - this.next(); - b = consumeB.call(this); - break; - case 3: - expectCharCode.call(this, 2, HYPHENMINUS2); - this.next(); - this.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN); - b = "-" + this.consume(Number2); - break; - default: - expectCharCode.call(this, 2, HYPHENMINUS2); - checkInteger.call(this, 3, DISALLOW_SIGN); - this.next(); - b = this.substrToCursor(start + 2); - } - } else if (this.tokenType === Ident || this.isDelim(PLUSSIGN3) && this.lookupType(1) === Ident) { - let sign = 0; - a = "1"; - if (this.isDelim(PLUSSIGN3)) { - sign = 1; - this.next(); - } - expectCharCode.call(this, 0, N2); - switch (this.tokenEnd - this.tokenStart) { - case 1: - this.next(); - b = consumeB.call(this); - break; - case 2: - expectCharCode.call(this, 1, HYPHENMINUS2); - this.next(); - this.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN); - b = "-" + this.consume(Number2); - break; - default: - expectCharCode.call(this, 1, HYPHENMINUS2); - checkInteger.call(this, 2, DISALLOW_SIGN); - this.next(); - b = this.substrToCursor(start + sign + 1); - } - } else if (this.tokenType === Dimension) { - const code = this.charCodeAt(this.tokenStart); - const sign = code === PLUSSIGN3 || code === HYPHENMINUS2; - let i = this.tokenStart + sign; - for (;i < this.tokenEnd; i++) { - if (!isDigit(this.charCodeAt(i))) { - break; - } - } - if (i === this.tokenStart + sign) { - this.error("Integer is expected", this.tokenStart + sign); - } - expectCharCode.call(this, i - this.tokenStart, N2); - a = this.substring(start, i); - if (i + 1 === this.tokenEnd) { - this.next(); - b = consumeB.call(this); - } else { - expectCharCode.call(this, i - this.tokenStart + 1, HYPHENMINUS2); - if (i + 2 === this.tokenEnd) { - this.next(); - this.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN); - b = "-" + this.consume(Number2); - } else { - checkInteger.call(this, i - this.tokenStart + 2, DISALLOW_SIGN); - this.next(); - b = this.substrToCursor(i + 1); - } - } - } else { - this.error(); - } - if (a !== null && a.charCodeAt(0) === PLUSSIGN3) { - a = a.substr(1); - } - if (b !== null && b.charCodeAt(0) === PLUSSIGN3) { - b = b.substr(1); - } - return { - type: "AnPlusB", - loc: this.getLocation(start, this.tokenStart), - a, - b - }; -} -function generate2(node2) { - if (node2.a) { - const a = node2.a === "+1" && "n" || node2.a === "1" && "n" || node2.a === "-1" && "-n" || node2.a + "n"; - if (node2.b) { - const b = node2.b[0] === "-" || node2.b[0] === "+" ? node2.b : "+" + node2.b; - this.tokenize(a + b); - } else { - this.tokenize(a); - } - } else { - this.tokenize(node2.b); - } -} -// node_modules/css-tree/lib/syntax/node/Atrule.js -function consumeRaw() { - return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon, true); -} -function isDeclarationBlockAtrule() { - for (let offset = 1, type;type = this.lookupType(offset); offset++) { - if (type === RightCurlyBracket) { - return true; - } - if (type === LeftCurlyBracket || type === AtKeyword) { - return false; - } - } - return false; -} -function parse4(isDeclaration = false) { - const start = this.tokenStart; - let name; - let nameLowerCase; - let prelude = null; - let block = null; - this.eat(AtKeyword); - name = this.substrToCursor(start + 1); - nameLowerCase = name.toLowerCase(); - this.skipSC(); - if (this.eof === false && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon) { - if (this.parseAtrulePrelude) { - prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name, isDeclaration), consumeRaw); - } else { - prelude = consumeRaw.call(this, this.tokenIndex); - } - this.skipSC(); - } - switch (this.tokenType) { - case Semicolon: - this.next(); - break; - case LeftCurlyBracket: - if (hasOwnProperty.call(this.atrule, nameLowerCase) && typeof this.atrule[nameLowerCase].block === "function") { - block = this.atrule[nameLowerCase].block.call(this, isDeclaration); - } else { - block = this.Block(isDeclarationBlockAtrule.call(this)); - } - break; - } - return { - type: "Atrule", - loc: this.getLocation(start, this.tokenStart), - name, - prelude, - block - }; -} -function generate3(node2) { - this.token(AtKeyword, "@" + node2.name); - if (node2.prelude !== null) { - this.node(node2.prelude); - } - if (node2.block) { - this.node(node2.block); - } else { - this.token(Semicolon, ";"); - } -} -// node_modules/css-tree/lib/syntax/node/AtrulePrelude.js -function parse5(name) { - let children = null; - if (name !== null) { - name = name.toLowerCase(); - } - this.skipSC(); - if (hasOwnProperty.call(this.atrule, name) && typeof this.atrule[name].prelude === "function") { - children = this.atrule[name].prelude.call(this); - } else { - children = this.readSequence(this.scope.AtrulePrelude); - } - this.skipSC(); - if (this.eof !== true && this.tokenType !== LeftCurlyBracket && this.tokenType !== Semicolon) { - this.error("Semicolon or block is expected"); - } - return { - type: "AtrulePrelude", - loc: this.getLocationFromList(children), - children - }; -} -function generate4(node2) { - this.children(node2); -} -// node_modules/css-tree/lib/syntax/node/AttributeSelector.js -var DOLLARSIGN = 36; -var ASTERISK3 = 42; -var EQUALSSIGN = 61; -var CIRCUMFLEXACCENT = 94; -var VERTICALLINE2 = 124; -var TILDE2 = 126; -function getAttributeName() { - if (this.eof) { - this.error("Unexpected end of input"); - } - const start = this.tokenStart; - let expectIdent = false; - if (this.isDelim(ASTERISK3)) { - expectIdent = true; - this.next(); - } else if (!this.isDelim(VERTICALLINE2)) { - this.eat(Ident); - } - if (this.isDelim(VERTICALLINE2)) { - if (this.charCodeAt(this.tokenStart + 1) !== EQUALSSIGN) { - this.next(); - this.eat(Ident); - } else if (expectIdent) { - this.error("Identifier is expected", this.tokenEnd); - } - } else if (expectIdent) { - this.error("Vertical line is expected"); - } - return { - type: "Identifier", - loc: this.getLocation(start, this.tokenStart), - name: this.substrToCursor(start) - }; -} -function getOperator() { - const start = this.tokenStart; - const code = this.charCodeAt(start); - if (code !== EQUALSSIGN && code !== TILDE2 && code !== CIRCUMFLEXACCENT && code !== DOLLARSIGN && code !== ASTERISK3 && code !== VERTICALLINE2) { - this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"); - } - this.next(); - if (code !== EQUALSSIGN) { - if (!this.isDelim(EQUALSSIGN)) { - this.error("Equal sign is expected"); - } - this.next(); - } - return this.substrToCursor(start); -} -function parse6() { - const start = this.tokenStart; - let name; - let matcher = null; - let value = null; - let flags = null; - this.eat(LeftSquareBracket); - this.skipSC(); - name = getAttributeName.call(this); - this.skipSC(); - if (this.tokenType !== RightSquareBracket) { - if (this.tokenType !== Ident) { - matcher = getOperator.call(this); - this.skipSC(); - value = this.tokenType === String2 ? this.String() : this.Identifier(); - this.skipSC(); - } - if (this.tokenType === Ident) { - flags = this.consume(Ident); - this.skipSC(); - } - } - this.eat(RightSquareBracket); - return { - type: "AttributeSelector", - loc: this.getLocation(start, this.tokenStart), - name, - matcher, - value, - flags - }; -} -function generate5(node2) { - this.token(Delim, "["); - this.node(node2.name); - if (node2.matcher !== null) { - this.tokenize(node2.matcher); - this.node(node2.value); - } - if (node2.flags !== null) { - this.token(Ident, node2.flags); - } - this.token(Delim, "]"); -} -// node_modules/css-tree/lib/syntax/node/Block.js -var AMPERSAND2 = 38; -function consumeRaw2() { - return this.Raw(null, true); -} -function consumeRule() { - return this.parseWithFallback(this.Rule, consumeRaw2); -} -function consumeRawDeclaration() { - return this.Raw(this.consumeUntilSemicolonIncluded, true); -} -function consumeDeclaration() { - if (this.tokenType === Semicolon) { - return consumeRawDeclaration.call(this, this.tokenIndex); - } - const node2 = this.parseWithFallback(this.Declaration, consumeRawDeclaration); - if (this.tokenType === Semicolon) { - this.next(); - } - return node2; -} -function parse7(isStyleBlock) { - const consumer = isStyleBlock ? consumeDeclaration : consumeRule; - const start = this.tokenStart; - let children = this.createList(); - this.eat(LeftCurlyBracket); - scan: - while (!this.eof) { - switch (this.tokenType) { - case RightCurlyBracket: - break scan; - case WhiteSpace: - case Comment3: - this.next(); - break; - case AtKeyword: - children.push(this.parseWithFallback(this.Atrule.bind(this, isStyleBlock), consumeRaw2)); - break; - default: - if (isStyleBlock && this.isDelim(AMPERSAND2)) { - children.push(consumeRule.call(this)); - } else { - children.push(consumer.call(this)); - } - } - } - if (!this.eof) { - this.eat(RightCurlyBracket); - } - return { - type: "Block", - loc: this.getLocation(start, this.tokenStart), - children - }; -} -function generate6(node2) { - this.token(LeftCurlyBracket, "{"); - this.children(node2, (prev) => { - if (prev.type === "Declaration") { - this.token(Semicolon, ";"); - } - }); - this.token(RightCurlyBracket, "}"); -} -// node_modules/css-tree/lib/syntax/node/Brackets.js -function parse8(readSequence2, recognizer) { - const start = this.tokenStart; - let children = null; - this.eat(LeftSquareBracket); - children = readSequence2.call(this, recognizer); - if (!this.eof) { - this.eat(RightSquareBracket); - } - return { - type: "Brackets", - loc: this.getLocation(start, this.tokenStart), - children - }; -} -function generate7(node2) { - this.token(Delim, "["); - this.children(node2); - this.token(Delim, "]"); -} -// node_modules/css-tree/lib/syntax/node/CDC.js -function parse9() { - const start = this.tokenStart; - this.eat(CDC); - return { - type: "CDC", - loc: this.getLocation(start, this.tokenStart) - }; -} -function generate8() { - this.token(CDC, "-->"); -} -// node_modules/css-tree/lib/syntax/node/CDO.js -function parse10() { - const start = this.tokenStart; - this.eat(CDO); - return { - type: "CDO", - loc: this.getLocation(start, this.tokenStart) - }; -} -function generate9() { - this.token(CDO, "")}function Ss(){let t=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}function bs(){this.token(14,"