From 77dcea14cc468b481486076a8984cb72f7add4a1 Mon Sep 17 00:00:00 2001 From: oxmc <67136658+oxmc@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:01:09 -0800 Subject: [PATCH] Add userStyles support (wip) --- .github/workflows/build-and-release.yml | 4 +- README.md | 43 +++- package-lock.json | 295 ++++++++++++++++++++++- package.json | 30 ++- src/app/main.js | 105 +++++--- src/app/utils/userStyles.js | 210 ++++++++++++++++ src/ui/lib/confetti-1.9.3-browser.min.js | 1 + src/ui/lib/css/stylelint-bundle.min.js | 11 + src/ui/lib/css/stylus-renderer.min.js | 63 +++++ src/ui/preload.js | 6 +- src/ui/rend/register-splash.js | 2 +- src/ui/rend/specialAnimations.js | 109 +++++++++ 12 files changed, 832 insertions(+), 47 deletions(-) create mode 100644 src/app/utils/userStyles.js create mode 100644 src/ui/lib/confetti-1.9.3-browser.min.js create mode 100644 src/ui/lib/css/stylelint-bundle.min.js create mode 100644 src/ui/lib/css/stylus-renderer.min.js create mode 100644 src/ui/rend/specialAnimations.js diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 906914b..d79c399 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -223,8 +223,8 @@ jobs: - name: Extract checksum from sha256sum.txt and change build version run: | new_checksum=$(awk 'NR==1 { print $1 }' ./dist/linux/sha256sum.txt) - sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD - sed -i "s/^pkgver=.*$/pkgver=${{ steps.version.outputs.version }}/" ./build/PKGBUILD + sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/arch-pkg/PKGBUILD + sed -i "s/^pkgver=.*$/pkgver=${{ steps.version.outputs.version }}/" ./build/arch-pkg/PKGBUILD - name: Publish AUR package uses: KSXGitHub/github-actions-deploy-aur@v3.0.1 diff --git a/README.md b/README.md index 2b898bb..3d2e189 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,44 @@ # Bsky Desktop -Bsky Desktop is an application for Bsky built using Electron. It allows users to manage their Bsky account and feeds from the app instead of the web. \ No newline at end of file +Bsky Desktop is an Electron-based application for Bsky that allows users to manage their accounts and feeds directly from the app, rather than through the web interface. + +### Features: +- Support for user styles (work in progress; currently only LESS preprocessor is supported) +- Compatibility with both Manifest V2 and V3 Chrome extensions, though only a limited set of Chrome extension APIs are supported. For more information, visit: [Electron Extensions API Documentation](https://www.electronjs.org/docs/latest/api/extensions#supported-extensions-apis) + +### Working on: +- Auto updates (for all platforms) + +### Build and release status: +[![Build and Release bsky-desktop](https://github.com/oxmc/bsky-desktop/actions/workflows/build-and-release.yml/badge.svg)](https://github.com/oxmc/bsky-desktop/actions/workflows/build-and-release.yml) + +[![Packaging status](https://repology.org/badge/vertical-allrepos/bskydesktop.svg?columns=4&exclude_unsupported=1)](https://repology.org/project/bskydesktop/versions) + +### Build Instructions for Bsky Desktop + +To build and run Bsky Desktop locally, follow these steps: + +1. **Clone the repository:** + ```sh + git clone https://github.com/oxmc/bsky-desktop.git + cd bsky-desktop + ``` + +2. **Install dependencies:** + ```sh + npm install + ``` + + **(Optional) Run the application locally:** + If you want to test the application locally before building it, use the following command: + ```sh + npm run start + ``` + This step is **not required for building** but is useful if you want to see the app in action during development. + +3. **Build the application:** + To compile the application, run: + ```sh + npm run build + ``` + This will generate the necessary files for the app. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c07489f..e7352bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bsky-desktop", - "version": "1.0.6", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bsky-desktop", - "version": "1.0.6", + "version": "1.1.0", "license": "AGPL-3.0-only", "dependencies": { "@electron/asar": "^3.2.17", @@ -14,9 +14,11 @@ "adm-zip": "^0.5.12", "axios": "^1.6.8", "electron-window-state": "^5.0.3", + "less": "^4.2.1", "log4js": "^6.9.1", "node-notifier": "^10.0.0", "semver": "^7.6.3", + "usercss-meta": "^0.12.0", "v8-compile-cache": "^2.3.0" }, "devDependencies": { @@ -1324,6 +1326,18 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "license": "MIT", + "dependencies": { + "is-what": "^3.14.1" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -1711,6 +1725,19 @@ "dev": true, "license": "MIT" }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "license": "MIT", + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -2265,7 +2292,7 @@ }, "node_modules/iconv-lite": { "version": "0.6.3", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -2295,6 +2322,19 @@ ], "license": "BSD-3-Clause" }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "license": "MIT", + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/inflight": { "version": "1.0.6", "license": "ISC", @@ -2343,6 +2383,12 @@ "node": ">=8" } }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "license": "MIT" + }, "node_modules/is-wsl": { "version": "2.2.0", "license": "MIT", @@ -2522,6 +2568,45 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/less": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/less/-/less-4.2.1.tgz", + "integrity": "sha512-CasaJidTIhWmjcqv0Uj5vccMI7pJgfD9lMkKtlnTHAdJdYK/7l8pM9tumLyJ0zhbD4KJLo/YvTj+xznQd5NBhg==", + "license": "Apache-2.0", + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^2.3.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "source-map": "~0.6.0" + } + }, + "node_modules/less/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -2604,6 +2689,30 @@ "node": ">=10" } }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "license": "MIT", + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -2723,6 +2832,23 @@ "version": "2.1.2", "license": "MIT" }, + "node_modules/needle": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", + "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, "node_modules/node-addon-api": { "version": "1.7.2", "dev": true, @@ -2797,6 +2923,15 @@ "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "license": "MIT", @@ -2842,6 +2977,16 @@ "version": "1.2.0", "license": "MIT" }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/plist": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", @@ -2894,6 +3039,13 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "license": "MIT", + "optional": true + }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -3063,7 +3215,7 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/sanitize-filename": { @@ -3080,7 +3232,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/semver": { @@ -3189,7 +3341,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -3466,6 +3618,12 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/type-fest": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", @@ -3517,6 +3675,15 @@ "punycode": "^2.1.0" } }, + "node_modules/usercss-meta": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/usercss-meta/-/usercss-meta-0.12.0.tgz", + "integrity": "sha512-zKrXCKdpeIwtVe87omxGo9URf+7mbozduMZEg79dmT4KB3XJwfIkEi/Uk0PcTwR/nZLtAK1+k7isgbGB/g6E7Q==", + "license": "MIT", + "engines": { + "node": ">=8.3" + } + }, "node_modules/utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", @@ -4647,6 +4814,14 @@ } } }, + "copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "requires": { + "is-what": "^3.14.1" + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -4914,6 +5089,15 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -5289,7 +5473,7 @@ }, "iconv-lite": { "version": "0.6.3", - "dev": true, + "devOptional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -5300,6 +5484,12 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "optional": true + }, "inflight": { "version": "1.0.6", "requires": { @@ -5328,6 +5518,11 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, + "is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + }, "is-wsl": { "version": "2.2.0", "requires": { @@ -5462,6 +5657,31 @@ } } }, + "less": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/less/-/less-4.2.1.tgz", + "integrity": "sha512-CasaJidTIhWmjcqv0Uj5vccMI7pJgfD9lMkKtlnTHAdJdYK/7l8pM9tumLyJ0zhbD4KJLo/YvTj+xznQd5NBhg==", + "requires": { + "copy-anything": "^2.0.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "parse-node-version": "^1.0.1", + "source-map": "~0.6.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "optional": true + } + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -5527,6 +5747,24 @@ "yallist": "^4.0.0" } }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "optional": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "optional": true + } + } + }, "matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -5605,6 +5843,16 @@ "ms": { "version": "2.1.2" }, + "needle": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", + "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", + "optional": true, + "requires": { + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + } + }, "node-addon-api": { "version": "1.7.2", "dev": true, @@ -5656,6 +5904,11 @@ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" + }, "path-is-absolute": { "version": "1.0.1" }, @@ -5686,6 +5939,12 @@ "pend": { "version": "1.2.0" }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "optional": true + }, "plist": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", @@ -5724,6 +5983,12 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "optional": true + }, "pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -5851,7 +6116,7 @@ }, "safer-buffer": { "version": "2.1.2", - "dev": true + "devOptional": true }, "sanitize-filename": { "version": "1.6.3", @@ -5866,7 +6131,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true + "devOptional": true }, "semver": { "version": "7.6.3", @@ -5938,7 +6203,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "devOptional": true }, "source-map-support": { "version": "0.5.21", @@ -6135,6 +6400,11 @@ "utf8-byte-length": "^1.0.1" } }, + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "type-fest": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", @@ -6167,6 +6437,11 @@ "punycode": "^2.1.0" } }, + "usercss-meta": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/usercss-meta/-/usercss-meta-0.12.0.tgz", + "integrity": "sha512-zKrXCKdpeIwtVe87omxGo9URf+7mbozduMZEg79dmT4KB3XJwfIkEi/Uk0PcTwR/nZLtAK1+k7isgbGB/g6E7Q==" + }, "utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", diff --git a/package.json b/package.json index 59737f7..a7fc33a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bsky-desktop", - "version": "1.0.9", + "version": "1.1.0", "description": "A desktop app of bsky.app", "main": "src/app/main.js", "scripts": { @@ -14,6 +14,20 @@ "name": "oxmc", "email": "oxmc7769.mail@gmail.com" }, + "contributors": [ + { + "name": "oxmc", + "email": "contact@oxmc.is-a.dev" + }, + { + "name": "PlOszukiwaczDEV", + "email": "ploszukiwacz1@duck.com" + }, + { + "name": "GizzyUwU", + "email": "me@gizzy.pro" + } + ], "license": "AGPL-3.0-only", "devDependencies": { "electron": "^29.4.6", @@ -25,9 +39,11 @@ "adm-zip": "^0.5.12", "axios": "^1.6.8", "electron-window-state": "^5.0.3", + "less": "^4.2.1", "log4js": "^6.9.1", "node-notifier": "^10.0.0", "semver": "^7.6.3", + "usercss-meta": "^0.12.0", "v8-compile-cache": "^2.3.0" }, "build": { @@ -42,9 +58,19 @@ "dmg", "pkg" ], - "icon": "src/ui/images/logo.icns", + "icon": "build/icons/mac-icon.icns", "category": "Network" }, + "pkg": { + "scripts": "build/mac-pkg/scripts", + "installLocation": "/Applications", + "allowAnywhere": true, + "allowCurrentUserHome": true, + "allowRootDirectory": true, + "isVersionChecked": true, + "isRelocatable": false, + "overwriteAction": "upgrade" + }, "linux": { "target": [ "appimage" diff --git a/src/app/main.js b/src/app/main.js index 4657989..6c78c05 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -8,6 +8,7 @@ const badge = require('./badge'); const contextMenu = require('./context-menu'); const autoUpdater = require('./utils/auto-update'); const loadCRX = require('./utils/loadCRX'); +const userStyles = require('./utils/userStyles'); const log4js = require("log4js"); const path = require("path"); const fs = require("fs"); @@ -37,6 +38,7 @@ global.paths = { }; global.paths.updateDir = path.join(global.paths.data, 'update'); global.paths.extensions = path.join(global.paths.data, 'extensions'); +global.paths.userstyles = path.join(global.paths.data, 'userstyles'); // URLs: global.urls = { @@ -126,6 +128,12 @@ if (!fs.existsSync(global.paths.extensions)) { fs.mkdirSync(global.paths.extensions, { recursive: true }); }; +// Create userstyles directory if it does not exist: +if (!fs.existsSync(global.paths.userstyles)) { + logger.info("Creating Userstyles Directory"); + fs.mkdirSync(global.paths.userstyles, { recursive: true }); +}; + // improve performance on linux? if (process.platform !== "win32" && process.platform !== "darwin") { logger.log("Disabling Hardware Acceleration and Transparent Visuals"); @@ -247,34 +255,6 @@ function createWindow() { // Badge count: (use mainWindow as that shows the badge on the taskbar) new badge(mainWindow, badgeOptions); - // Load extensions (.crx files): - logger.log("Checking for extensions"); - const extensions = fs.readdirSync(global.paths.extensions).filter((file) => file.endsWith('.crx')); - if (extensions.length > 0) { - logger.log(`Unpacking ${extensions.length} extensions and loading them`); - extensions.forEach((extension) => { - loadCRX(path.join(global.paths.extensions, extension)); - }); - } else { - // Check for unpacked extensions: - const unpackedExtensions = fs.readdirSync(global.paths.extensions).filter((file) => fs.lstatSync(path.join(global.paths.extensions, file)).isDirectory()); - - // Check if the directory contains a manifest.json file - unpackedExtensions.forEach((extension) => { - const manifestPath = path.join(global.paths.extensions, extension, 'manifest.json'); - if (fs.existsSync(manifestPath)) { - logger.log(`Loading unpacked extension: ${extension}`); - session.defaultSession.loadExtension(path.join(global.paths.extensions, extension)).then(({ id }) => { - logger.log(`Extension loaded with ID: ${id}`); - }).catch((error) => { - logger.error(`Failed to load extension: ${error}`); - }); - } else { - logger.warn(`Skipping directory ${extension} as it does not contain a manifest.json file`); - }; - }); - }; - logger.log("Main Window Created, Showing splashscreen"); splash.show(); //mainWindow.show(); @@ -302,7 +282,7 @@ function createWindow() { }; }); PageView.webContents.setWindowOpenHandler(({ url }) => { - new BrowserWindow({ show: true, autoHideMenuBar: true }).loadURL(url); + new BrowserWindow({ show: true, autoHideMenuBar: true, icon: path.join(global.paths.app, 'ui', 'images', 'logo.png') }).loadURL(url); return { action: 'deny' }; }); // Log PageView navigations: @@ -322,6 +302,7 @@ function showAboutWindow() { //open_devtools: process.env.NODE_ENV !== 'production', use_version_info: [ ['Application Version', `${global.appInfo.version}`], + ['Contributors', packageJson.contributors.map((contributor) => contributor.name).join(', ')], ], license: `MIT, GPL-2.0, GPL-3.0, ${global.appInfo.license}`, }); @@ -405,7 +386,7 @@ function handleDeeplink(commandLine) { break; case "notiftest": - global.PageView.webContents.send('ui:notif', { title: 'Updater', message: 'Update downloaded', options: { position: 'topRight', timeout: 5000, layout: 2, color: 'blue' } }); + global.PageView.webContents.send('ui:notif', { title: 'Updater', message: 'Update downloaded', options: { izitoast: { position: 'topRight', timeout: 5000, layout: 2, color: 'blue' } } }); break; default: @@ -527,6 +508,70 @@ app.whenReady().then(() => { createWindow(); createTray(); + + // Load extensions (.crx files): + logger.log("Checking for extensions"); + const extensions = fs.readdirSync(global.paths.extensions).filter((file) => file.endsWith('.crx')); + if (extensions.length > 0) { + logger.log(`Unpacking ${extensions.length} extensions and loading them`); + extensions.forEach((extension) => { + loadCRX(path.join(global.paths.extensions, extension)); + }); + } else { + // Check for unpacked extensions: + const unpackedExtensions = fs.readdirSync(global.paths.extensions).filter((file) => fs.lstatSync(path.join(global.paths.extensions, file)).isDirectory()); + + // Check if the directory contains a manifest.json file + unpackedExtensions.forEach((extension) => { + const manifestPath = path.join(global.paths.extensions, extension, 'manifest.json'); + if (fs.existsSync(manifestPath)) { + logger.log(`Loading unpacked extension: ${extension}`); + session.defaultSession.loadExtension(path.join(global.paths.extensions, extension)).then(({ id }) => { + logger.log(`Extension loaded with ID: ${id}`); + }).catch((error) => { + logger.error(`Failed to load extension: ${error}`); + }); + } else { + logger.warn(`Skipping directory ${extension} as it does not contain a manifest.json file`); + }; + }); + }; + + // Load userstyles + logger.log("Checking for userstyles"); + const userStylesDir = path.join(global.paths.userstyles); + if (fs.existsSync(userStylesDir)) { + const files = fs.readdirSync(userStylesDir); + if (files.length > 0) { + const userStylePromises = files.map(async file => { + const cssFile = path.join(userStylesDir, file); + // Parse the CSS file + try { + const cssContent = fs.readFileSync(cssFile, 'utf-8'); + const result = await userStyles.parseCSS(cssContent); + + logger.info(`Loaded userstyle: ${result.metadata.name}`); + + // Compile the userstyle + const compiled = await userStyles.compileStyle(result.css, result.metadata); + + // Check if the site 'bsky.app' is defined + if (compiled.sites && compiled.sites['bsky.app']) { + // Apply the userstyle to the PageView + await PageView.webContents.insertCSS(compiled.sites['bsky.app']); + + logger.info(`Applied userstyle: ${result.metadata.name}`); + } else { + logger.warn(`Userstyle ${result.metadata.name} does not target 'bsky.app'`); + } + } catch (error) { + logger.error(`Error loading userstyle: ${file}`, error); + } + }); + + Promise.all(userStylePromises); + } + } } else { logger.log("Failed to get singleInstanceLock, Quitting"); app.quit(); diff --git a/src/app/utils/userStyles.js b/src/app/utils/userStyles.js new file mode 100644 index 0000000..b99ae1e --- /dev/null +++ b/src/app/utils/userStyles.js @@ -0,0 +1,210 @@ +const usercssMeta = require('usercss-meta'); +const less = require('less'); + +/** + * Extracts all global variable and mixin definitions from CSS. + * @param {string} css - The CSS string. + * @returns {string} The extracted global definitions. + */ +function extractGlobalDefinitions(css) { + const globalDefinitionRegex = /(@[\w-]+\s*(?:{[^}]*}|;))/g; + return (css.match(globalDefinitionRegex) || []).join('\n'); +} + +/** + * Extracts variable definitions from metadata. + * @param {object} metadata - Metadata containing variable definitions. + * @returns {object} A map of variable names to their default values. + */ +function extractMetadataVars(metadata) { + if (!metadata?.vars) return {}; + return Object.fromEntries( + Object.entries(metadata.vars).map(([key, value]) => [key, value.default || value.value || null]) + ); +} + +/** + * Extracts content enclosed within matching braces starting from a given position. + * @param {string} css - The CSS string. + * @param {number} startPos - The starting position to search for braces. + * @returns {object|null} The content and ending position of the matched braces. + */ +function extractBracedContent(css, startPos) { + const braceMatch = matchBraces(css, startPos); + if (!braceMatch) return null; + + return { + content: css.substring(braceMatch.start + 1, braceMatch.end - 1).trim(), + end: braceMatch.end, + }; +} + +/** + * Matches a pair of braces in a string starting from a given position. + * @param {string} content - The string content. + * @param {number} start - The starting position to search for braces. + * @returns {object|null} The start and end positions of the matched braces. + */ +function matchBraces(content, start) { + const openBrace = content.indexOf('{', start); + if (openBrace === -1) return null; + + let braceCount = 1, pos = openBrace + 1; + while (braceCount > 0 && pos < content.length) { + if (content[pos] === '{') braceCount++; + if (content[pos] === '}') braceCount--; + pos++; + } + + return braceCount === 0 ? { start: openBrace, end: pos } : null; +} + +/** + * Parses domain rules from the provided CSS string. + * @param {string} css - The CSS string. + * @param {number} startPos - The starting position to search for domain rules. + * @returns {object|null} The domains and the rule start position. + */ +function parseDomainRule(css, startPos) { + const domainRuleRegex = /@-moz-document\s+domain\(\s*'([^']+)'(?:\s*,\s*'([^']+)')*\s*\)/g; + domainRuleRegex.lastIndex = startPos; + const match = domainRuleRegex.exec(css); + if (!match) return null; + + const domains = match[0] + .match(/'[^']+'/g) // Extract all single-quoted domain values + .map(domain => domain.replace(/'/g, '').trim()); + + return { + domains, + ruleStart: match.index + match[0].length - 1, + }; +} + +/** + * Parses @-moz-document rules and extracts domain-specific CSS. + * @param {string} css - The CSS string. + * @returns {object} A map of domains to their associated CSS. + */ +function parseMozRules(css) { + const rules = {}; + let currentPos = 0; + + const globalCode = extractGlobalDefinitions(css); + + while (true) { + const domainRule = parseDomainRule(css, currentPos); + if (!domainRule) break; + + const bracedContent = extractBracedContent(css, domainRule.ruleStart); + if (!bracedContent) break; + + // Add the CSS to all matched domains + for (const domain of domainRule.domains) { + rules[domain] = `${globalCode}\n${bracedContent.content}`; + } + + currentPos = bracedContent.end; + } + + return rules; +} + +/** + * Parses metadata from the provided CSS string. + * @param {string} css - The CSS string. + * @returns {object} Parsed metadata. + */ +function parseCSS(css) { + try { + const normalizedCss = css.replace(/\r\n?/g, '\n'); + const nocommentsCss = normalizedCss.replace(/\/\*[\s\S]*?\*\//g, ''); // Remove comments + return { + ...usercssMeta.parse(normalizedCss), + css: nocommentsCss, + }; + } catch (error) { + throw new Error(`Failed to parse CSS metadata: ${error.message}`); + } +} + +/** + * Compiles CSS code with a preprocessor if specified in the metadata. + * @param {string} code - The CSS code. + * @param {object} metadata - Metadata containing preprocessor information. + * @param {object} [userVars={}] - User-defined variables to override defaults. + * @returns {Promise<{compiledCss: string, sites: object}>} The compiled CSS code and domain-specific mapping. + */ +async function compileStyle(code, metadata, userVars = {}) { + try { + // Extract and merge variables + const vars = { + ...extractMetadataVars(metadata), + ...userVars + }; + + // Generate full code with user variables + const fullCode = [ + '// User variables', + Object.entries(vars).map(([key, value]) => `@${key}: ${value};`).join('\n'), + '// Main code', + code + ].join('\n\n'); + + let compiledCode; + + switch (metadata?.preprocessor?.toLowerCase()) { + case 'less': + compiledCode = await compileLess(fullCode); + break; + default: + compiledCode = code; // Return unmodified for unknown preprocessors + } + + // Parse domain rules + const domainRules = parseMozRules(compiledCode); + + // Compile each domain's CSS if needed + const compiledRules = {}; + for (const [domain, css] of Object.entries(domainRules)) { + if (metadata.preprocessor === 'less') { + compiledRules[domain] = await compileLess(css, vars); + } else { + compiledRules[domain] = css; + } + } + + // Combine all CSS + const combinedCss = Object.entries(compiledRules) + .map(([domain, compiledCss]) => `/* ${domain} */\n${compiledCss}`) + .join('\n\n'); + + return { + compiledCss: combinedCss, + sites: compiledRules // Map of domains to their CSS + }; + + } catch (error) { + console.error('Style compilation error:', error); + throw error; + } +} + +/** + * Compiles LESS code to CSS. + * @param {string} code - The LESS code. + * @returns {Promise} The compiled CSS. + */ +async function compileLess(code) { + const { css } = await less.render(code, { + math: 'parens-division', + javascriptEnabled: true, + compress: false + }); + return css; +} + +module.exports = { + parseCSS, + compileStyle +}; \ No newline at end of file diff --git a/src/ui/lib/confetti-1.9.3-browser.min.js b/src/ui/lib/confetti-1.9.3-browser.min.js new file mode 100644 index 0000000..4a87c5c --- /dev/null +++ b/src/ui/lib/confetti-1.9.3-browser.min.js @@ -0,0 +1 @@ +!function(t,e){!function t(e,a,n,r){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),i="function"==typeof Path2D&&"function"==typeof DOMMatrix,l=function(){if(!e.OffscreenCanvas)return!1;var t=new OffscreenCanvas(1,1),a=t.getContext("2d");a.fillRect(0,0,1,1);var n=t.transferToImageBitmap();try{a.createPattern(n,"no-repeat")}catch(t){return!1}return!0}();function s(){}function c(t){var n=a.exports.Promise,r=void 0!==n?n:e.Promise;return"function"==typeof r?new r(t):(t(s,s),null)}var h,f,u,d,m,g,p,b,M,v,y,w=(h=l,f=new Map,{transform:function(t){if(h)return t;if(f.has(t))return f.get(t);var e=new OffscreenCanvas(t.width,t.height);return e.getContext("2d").drawImage(t,0,0),f.set(t,e),e},clear:function(){f.clear()}}),x=(m=Math.floor(1e3/60),g={},p=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(u=function(t){var e=Math.random();return g[e]=requestAnimationFrame((function a(n){p===n||p+m-1"warning"===e.type))}get content(){return this.css}}t.default=t;var n="(".charCodeAt(0),r=")".charCodeAt(0),o="'".charCodeAt(0),i='"'.charCodeAt(0),s="\\".charCodeAt(0),a="/".charCodeAt(0),l=",".charCodeAt(0),c=":".charCodeAt(0),u="*".charCodeAt(0),d="u".charCodeAt(0),p="U".charCodeAt(0),h="+".charCodeAt(0),f=/^[a-f0-9?-]+$/i;var m=function e(t,n,r){var o,i,s,a;for(o=0,i=t.length;o + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ +function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e){var t,n;return!1!==C(e)&&(void 0===(t=e.constructor)||!1!==C(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function A(e){return"boolean"==typeof e||e instanceof Boolean}function z(e){return"number"==typeof e||e instanceof Number}function E(e){return null!==e&&"object"==typeof e}function N(e){return e instanceof RegExp}function P(e){return"string"==typeof e||e instanceof String}function T(e){return O(e)}function I(e,t){t?console.assert(e,t):console.assert(e)}function j(e){console.assert(z(e),'"'.concat(e,'" must be a number'))}function L(e){console.assert(P(e),'"'.concat(e,'" must be a string'))}function M(e){const t=e.raws,n=t.prop;return[E(n)&&"prefix"in n&&n.prefix,E(n)&&"raw"in n&&n.raw||e.prop,E(n)&&"suffix"in n&&n.suffix,t.between||":",t.value&&"prefix"in t.value&&t.value.prefix].reduce(((e,t)=>P(t)?e+t.length:e),0)}function _(e){const t=e.raws;return t.value&&t.value.raw||e.value}S.prototype.toString=function(){return Array.isArray(this.nodes)?b(this.nodes):""},S.prototype.walk=function(e,t){return m(this.nodes,e,t),this},S.unit=function(e){var t,n,r,o=0,i=e.length;if(0===i||!function(e){var t,n=e.charCodeAt(0);if(n===y||n===w){if((t=e.charCodeAt(1))>=48&&t<=57)return!0;var r=e.charCodeAt(2);return t===v&&r>=48&&r<=57}return n===v?(t=e.charCodeAt(1))>=48&&t<=57:n>=48&&n<=57}(e))return!1;for((t=e.charCodeAt(o))!==y&&t!==w||o++;o57);)o+=1;if(t=e.charCodeAt(o),n=e.charCodeAt(o+1),t===v&&n>=48&&n<=57)for(o+=2;o57);)o+=1;if(t=e.charCodeAt(o),n=e.charCodeAt(o+1),r=e.charCodeAt(o+2),(t===k||t===x)&&(n>=48&&n<=57||(n===y||n===w)&&r>=48&&r<=57))for(o+=n===y||n===w?3:2;o57);)o+=1;return{number:e.slice(0,o),unit:e.slice(o)}},S.walk=m,S.stringify=b;const R=/@\{.+?\}/;function F(e){return R.test(e)}const D=/\$\(.+?\)/;function U(e){return D.test(e)}const q=/#\{[\s\S]+?\}/;function W(e){return q.test(e)}const B=/\{[\s\S]+?\}/;function $(e){return B.test(e)}function Q(e){return!!(F(e)||W(e)||$(e)||U(e))}function V(e){let t=e;return/^[-+*/]/.test(e.charAt(0))&&(t=t.slice(1)),!t.startsWith("$")&&(!/^.+\.\$/.test(e)&&(!/^.+\.[-\w]+\(/.test(e)&&(!t.startsWith("@")&&(!Q(t)&&!/__MSG_\S+__/.test(e)))))}function G(e,t){if(!Array.isArray(e))return Y(e,t);for(const n of e){const e=Y(n,t);if(e)return e}return!1}function Y(e,t){if(!Array.isArray(t))return K(e,t);for(const n of t){const t=K(e,n);if(t)return t}return!1}function J(e,t){var n;const r=e.match(t);return!!r&&{match:e,pattern:t,substring:null!==(n=r[0])&&void 0!==n?n:""}}function K(e,t){if(t instanceof RegExp)return J(e,t);if(t.startsWith("/")&&(t.endsWith("/")||t.endsWith("/".concat("i")))){const n=J(e,t.endsWith("i")?new RegExp(t.slice(1,-2),"i"):new RegExp(t.slice(1,-1)));return n&&(n.pattern=t),n}return e===t&&{match:e,pattern:t,substring:e}}function H(e,t,n){return Boolean(e&&e[t]&&"string"==typeof n&&G(n,e[t]))}function X(e){var t,n;const{ruleName:r,result:o,message:i,messageArgs:s,line:a,node:l,index:c,endIndex:u,word:d,severity:p}=e;o.stylelint=o.stylelint||{ruleSeverities:{},customMessages:{},ruleMetadata:{}};const h=p||(null===(t=o.stylelint.ruleSeverities)||void 0===t?void 0:t[r]),f=(null===(n=o.stylelint.config)||void 0===n?void 0:n.defaultSeverity)||"error",m="function"==typeof h?h(...s||[])||f:h;if(o.stylelint.quiet&&"error"!==m)return;const{start:g}=l&&l.rangeBy({index:c,endIndex:u})||{},b=a||g&&g.line;if(!b)throw new Error('The "'.concat(r,'" rule failed to pass either a node or a line number to the `report()` function.'));const{ignoreDisables:w}=o.stylelint.config||{};if(o.stylelint.disabledRanges){const e=o.stylelint.disabledRanges[r]||o.stylelint.disabledRanges.all||[];for(const t of e)if(t.start<=b&&(void 0===t.end||t.end>=b)&&(!t.rules||t.rules.includes(r))){if((o.stylelint.disabledWarnings||(o.stylelint.disabledWarnings=[])).push({rule:r,line:b}),!w)return;break}}o.stylelint.stylelintError||"error"!==m||(o.stylelint.stylelintError=!0),o.stylelint.stylelintWarning||"warning"!==m||(o.stylelint.stylelintWarning=!0);const y={severity:m,rule:r};l&&(y.node=l),e.start?y.start=e.start:"number"==typeof c&&(y.index=c),e.end?y.end=e.end:"number"==typeof u&&(y.endIndex=u),d&&(y.word=d);const{customMessages:v}=o.stylelint,k=function(e,t){const n=t||[];if("string"==typeof e)return function(e,...t){return t.reduce(((e,t)=>e.replace(/%[ds]/,String(t))),e)}(e,...n);return e(...n)}(v&&v[r]||i,s);o.warn(k,y)}function Z(e,t){const n={};for(const[r,o]of Object.entries(t))n[r]="string"==typeof o?"".concat(o," (").concat(e,")"):(...t)=>"".concat(o(...t)," (").concat(e,")");return n}function ee(e,t){const n=e.raws;return n.value?n.value.raw=t:e.value=t,e}function te(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every(((e,n)=>e===t[n])))}const ne=new Set(["severity","message","reportDisables","disableFix"]);function re(e,t,...n){let r=!0;for(const e of n)oe(e,t,o);function o(t){r=!1,e.warn(t,{stylelintType:"invalidOption"}),e.stylelint=e.stylelint||{disabledRanges:{},ruleSeverities:{},customMessages:{},ruleMetadata:{}},e.stylelint.stylelintError=!0}return r}function oe({possible:e,actual:t,optional:n},r,o){if(!1===t&&!r.startsWith("report"))return o('Invalid option value "false" for rule "'.concat(r,'". Are you trying to disable this rule? If so use "null" instead'));if(null===t||te(t,[null]))return;const i=null==e||Array.isArray(e)&&0===e.length||T(e)&&0===Object.keys(e).length;if(!i||!0!==t)if(void 0!==t){if(i)return n?void o('Incorrect configuration for rule "'.concat(r,'". Rule should have "possible" values for options validation')):void o("Unexpected option value ".concat(se(t),' for rule "').concat(r,'"'));if("function"!=typeof e)if(Array.isArray(e))for(const n of[t].flat())ie(e,n)||o("Invalid option value ".concat(se(n),' for rule "').concat(r,'"'));else if(T(t)&&"object"==typeof t&&null!==t)for(const[n,i]of Object.entries(t)){if(ne.has(n))continue;const t=e&&e[n];if(t)for(const e of[i].flat())ie(t,e)||o("Invalid value ".concat(se(e),' for option "').concat(n,'" of rule "').concat(r,'"'));else o('Invalid option name "'.concat(n,'" for rule "').concat(r,'"'))}else o("Invalid option value ".concat(se(t),' for rule "').concat(r,'": should be an object'));else e(t)||o("Invalid option ".concat(se(t),' for rule "').concat(r,'"'))}else{if(i||n)return;o('Expected option value for rule "'.concat(r,'"'))}}function ie(e,t){for(const n of[e].flat()){if("function"==typeof n&&n(t))return!0;if(t===n)return!0}return!1}function se(e){return'"'.concat("string"==typeof e?e:JSON.stringify(e),'"')}const ae="alpha-value-notation",le=Z(ae,{expected:(e,t)=>'Expected "'.concat(e,'" to be "').concat(t,'"')}),ce=/^(?:opacity|shape-image-threshold|fill-opacity|flood-opacity|stop-opacity|stroke-opacity)$/i,ue=/(?:color|hsla?|rgba?|hwb|lab|lch|oklab|oklch)\(/i,de=/^(?:color|hsla?|rgba?|hwb|lab|lch|oklab|oklch)$/i,pe=/\d/,he=(e,t,n)=>(r,o)=>{if(!re(o,ae,{actual:e,possible:["number","percentage"]},{actual:t,possible:{exceptProperties:[P,N]},optional:!0}))return;const i=Object.freeze({number:{expFunc:be,fixFunc:me},percentage:{expFunc:ge,fixFunc:fe}});r.walkDecls((r=>{const s=_(r),a=ce.test(r.prop);if(!a&&!ue.test(s)||!pe.test(s))return;let l=!1;const c=S(s);c.walk((s=>{let c;if(a&&pe.test(s.value)?c=function(e){return"word"===e.type||"function"===e.type?e:void 0}(s):"function"===s.type&&de.test(s.value)&&(c=function(e){const t=e.nodes.some((({type:e,value:t})=>"div"===e&&","===t));if(t){const t=e.nodes.filter((({type:e})=>"word"===e||"function"===e));return 4===t.length?t[3]:void 0}const n=e.nodes.findIndex((({type:e,value:t})=>"div"===e&&"/"===t));if(-1!==n){return e.nodes.slice(n+1,e.nodes.length).find((({type:e})=>"word"===e))}return}(s)),!c)return;const{value:u}=c;if(!V(u))return;if(!be(u)&&!ge(u))return;let d=e;if(H(t,"exceptProperties",r.prop)&&("number"===d?d="percentage":"percentage"===d&&(d="number")),i[d].expFunc(u))return;const p=i[d].fixFunc(u),h=u;if(n.fix)return c.value=String(p),void(l=!0);const f=M(r)+c.sourceIndex,m=f+c.value.length;X({message:le.expected,messageArgs:[h,p],node:r,index:f,endIndex:m,result:o,ruleName:ae})})),l&&ee(r,c.toString())}))};function fe(e){const t=Number(e);return"".concat(Number((100*t).toPrecision(3)),"%")}function me(e){const t=S.unit(e);I(t);const n=Number(t.number);return Number((n/100).toPrecision(3)).toString()}function ge(e){const t=S.unit(e);return t&&"%"===t.unit}function be(e){const t=S.unit(e);return t&&""===t.unit}he.ruleName=ae,he.messages=le,he.meta={url:"https://stylelint.io/user-guide/rules/alpha-value-notation",fixable:!0};const we="annotation-no-unknown",ye=Z(we,{rejected:e=>'Unexpected unknown annotation "'.concat(e,'"')}),ve=(e,t)=>(n,r)=>{re(r,we,{actual:e},{actual:t,possible:{ignoreAnnotations:[P,N]},optional:!0})&&n.walkDecls((function(e){if(!V(e.value))return;if(e.important)return;if(!e.value.includes("!"))return;S(_(e)).walk((n=>{if(!function(e){return"word"===e.type&&e.value.startsWith("!")}(n))return;const o=n.value,i=o.slice(1);H(t,"ignoreAnnotations",i)||X({message:ye.rejected,messageArgs:[o],node:e,result:r,ruleName:we,word:o})}))}))};function ke(e){return!(!e.nodes&&""===e.params)&&((!("mixin"in e)||!e.mixin)&&!("variable"in e&&e.variable||!e.nodes&&""===e.raws.afterName&&"("===e.params[0]))}ve.ruleName=we,ve.messages=ye,ve.meta={url:"https://stylelint.io/user-guide/rules/annotation-no-unknown"};var xe={prefix(e){const t=e.match(/^(-\w+-)/);return t&&t[0]||""},unprefixed:e=>e.replace(/^-\w+-/,"")};const Se="at-rule-allowed-list",Ce=Z(Se,{rejected:e=>'Unexpected at-rule "'.concat(e,'"')}),Oe=e=>(t,n)=>{if(!re(n,Se,{actual:e,possible:[P]}))return;const r=[e].flat();t.walkAtRules((e=>{const t=e.name;ke(e)&&(r.includes(xe.unprefixed(t).toLowerCase())||X({message:Ce.rejected,messageArgs:[t],node:e,result:n,ruleName:Se,word:"@".concat(t)}))}))};Oe.primaryOptionArray=!0,Oe.ruleName=Se,Oe.messages=Ce,Oe.meta={url:"https://stylelint.io/user-guide/rules/at-rule-allowed-list"};const Ae="at-rule-disallowed-list",ze=Z(Ae,{rejected:e=>'Unexpected at-rule "'.concat(e,'"')}),Ee=e=>(t,n)=>{if(!re(n,Ae,{actual:e,possible:[P]}))return;const r=[e].flat();t.walkAtRules((e=>{const t=e.name;ke(e)&&r.includes(xe.unprefixed(t).toLowerCase())&&X({message:ze.rejected,messageArgs:[t],node:e,result:n,ruleName:Ae,word:"@".concat(e.name)})}))};function Ne(e,t){const{raws:n}=e;return"string"!=typeof n.before||(n.before=/\r?\n/.test(n.before)?n.before.replace(/(\r?\n)/,"".concat(t,"$1")):t.repeat(2)+n.before),e}function Pe(e){return e.source&&e.source.start&&e.source.start.line}function Te(e){if(void 0===e)return;const t=e.prev();if(!t||"comment"!==t.type)return t;if(Pe(e)===Pe(t))return Te(t);const n=t.prev();return n&&Pe(t)===Pe(n)?Te(t):t}Ee.primaryOptionArray=!0,Ee.ruleName=Ae,Ee.messages=ze,Ee.meta={url:"https://stylelint.io/user-guide/rules/at-rule-disallowed-list"};const Ie=/\n[\r\t ]*\n/;function je(e){return""!==e&&void 0!==e&&Ie.test(e)}function Le(e){return"root"===e.type}function Me(e){return"rule"===e.type}function _e(e){return"atrule"===e.type}function Re(e){return"comment"===e.type}function Fe(e){return"decl"===e.type}function De(e){return"function"===e.type}function Ue(e){return"space"===e.type}function qe({type:e}){return"word"===e}function We(e){return Boolean(e.source)}function Be(e){return e&&e.source&&e.source.start&&e.source.start.line}function $e(e){if(void 0===e)return;const t=e.next();return t&&"comment"===t.type&&(Be(e)===Be(t)||Be(t)===Be(t.next()))?$e(t):t}function Qe(e,t){return(e&&e.source&&e.source.end&&e.source.end.line)===(t&&t.source&&t.source.start&&t.source.start.line)}function Ve(e){if(!Re(e))return!1;if(Qe(Te(e),e))return!0;const t=$e(e);if(t&&Qe(e,t))return!0;const n=e.parent;return void 0!==n&&!Le(n)&&0===n.index(e)&&void 0!==e.raws.before&&!e.raws.before.includes("\n")}function Ge(e){const t=e.prev();return!(!t||"comment"!==t.type)&&!Ve(t)}function Ye(e){return void 0!==e.nodes}function Je(e){if("atrule"!==e.type)return!1;const t=Te(e);return void 0!==t&&(_e(t)&&!Ye(t)&&!Ye(e))}function Ke(e){if(!Je(e))return!1;const t=Te(e);return!(!t||!_e(t))&&t.name===e.name}function He(e){const t=e.parent;if(void 0===t)return!1;if(Le(t)&&!function({parent:e}){return Boolean(e&&(t=e,"document"===t.type));var t}(t))return!1;if(e===t.first)return!0;const n=t.nodes;if(!n)return!1;const r=n[0];if(!r)return!1;if(!Re(r)||"string"==typeof r.raws.before&&r.raws.before.includes("\n"))return!1;if(!We(r)||!r.source.start)return!1;const o=r.source.start.line;if(!r.source.end||o!==r.source.end.line)return!1;for(const[t,r]of n.entries())if(0!==t){if(r===e)return!0;if(!Re(r)||We(r)&&r.source.end&&r.source.end.line!==o)return!1}return!1}function Xe(e){if(Le(e))return!1;const t=e.parent;return!!t&&(Le(t)&&e===t.first)}function Ze(e,t){return e.raws.before=e.raws.before?e.raws.before.replace(/(\r?\n\s*\n)+/g,t):"",e}const et="at-rule-empty-line-before",tt=Z(et,{expected:"Expected empty line before at-rule",rejected:"Unexpected empty line before at-rule"}),nt=(e,t,n)=>(r,o)=>{if(!re(o,et,{actual:e,possible:["always","never"]},{actual:t,possible:{except:["after-same-name","inside-block","blockless-after-same-name-blockless","blockless-after-blockless","first-nested"],ignore:["after-comment","first-nested","inside-block","blockless-after-same-name-blockless","blockless-after-blockless"],ignoreAtRules:[P]},optional:!0}))return;const i=e;r.walkAtRules((e=>{const r=e.parent&&"root"!==e.parent.type;if(Xe(e))return;if(!ke(e))return;if(H(t,"ignoreAtRules",e.name))return;if(H(t,"ignore","blockless-after-blockless")&&Je(e))return;if(H(t,"ignore","first-nested")&&He(e))return;if(H(t,"ignore","blockless-after-same-name-blockless")&&Ke(e))return;if(H(t,"ignore","inside-block")&&r)return;if(H(t,"ignore","after-comment")&&Ge(e))return;const s=je(e.raws.before);let a="always"===i;if((H(t,"except","after-same-name")&&function(e){const t=Te(e);return t&&_e(t)&&t.name===e.name}(e)||H(t,"except","inside-block")&&r||H(t,"except","first-nested")&&He(e)||H(t,"except","blockless-after-blockless")&&Je(e)||H(t,"except","blockless-after-same-name-blockless")&&Ke(e))&&(a=!a),a===s)return;if(n.fix&&n.newline)return void(a?Ne(e,n.newline):Ze(e,n.newline));X({message:a?tt.expected:tt.rejected,node:e,result:o,ruleName:et})}))};function rt(...e){return new Set([...e].reduce(((e,t)=>[...e,...t]),[]))}nt.ruleName=et,nt.messages=tt,nt.meta={url:"https://stylelint.io/user-guide/rules/at-rule-empty-line-before",fixable:!0};const ot=new Set(["container","layer","media","scope","starting-style","supports"]),it=new Set(["top-left-corner","top-left","top-center","top-right","top-right-corner","bottom-left-corner","bottom-left","bottom-center","bottom-right","bottom-right-corner","left-top","left-middle","left-bottom","right-top","right-middle","right-bottom"]),st=rt(ot,it,["annotation","apply","character-variant","charset","counter-style","custom-media","custom-selector","document","font-face","font-feature-values","import","keyframes","namespace","nest","ornaments","page","property","scroll-timeline","styleset","stylistic","swash","viewport"]),at="at-rule-no-unknown",lt=Z(at,{rejected:e=>'Unexpected unknown at-rule "'.concat(e,'"')}),ct=(e,t)=>(n,r)=>{re(r,at,{actual:e},{actual:t,possible:{ignoreAtRules:[P,N]},optional:!0})&&n.walkAtRules((e=>{if(!ke(e))return;const n=e.name;if(H(t,"ignoreAtRules",e.name))return;if(xe.prefix(n)||st.has(n.toLowerCase()))return;const o="@".concat(n);X({message:lt.rejected,messageArgs:[o],node:e,ruleName:at,result:r,word:o})}))};ct.ruleName=at,ct.messages=lt,ct.meta={url:"https://stylelint.io/user-guide/rules/at-rule-no-unknown"};const ut=new Set(["@-khtml-keyframes","@-moz-keyframes","@-ms-keyframes","@-ms-viewport","@-o-keyframes","@-o-viewport","@-webkit-keyframes","@resolution"]),dt=new Set([":-moz-any-link",":-moz-full-screen",":-moz-placeholder",":-moz-placeholder-shown",":-moz-read-only",":-moz-read-write",":-ms-fullscreen",":-ms-input-placeholder",":-webkit-any-link",":-webkit-full-screen","::-moz-placeholder","::-moz-selection","::-ms-input-placeholder","::-webkit-backdrop","::-webkit-input-placeholder"]),pt=new Set(["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backdrop-filter","backface-visibility","background-clip","background-origin","background-size","border-block-end","border-block-start","border-bottom-left-radius","border-bottom-right-radius","border-image","border-inline-end","border-inline-start","border-radius","border-top-left-radius","border-top-right-radius","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","clip-path","color-adjust","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","flow-from","flow-into","font-feature-settings","font-kerning","font-language-override","font-variant-ligatures","grid-area","grid-column","grid-column-align","grid-column-end","grid-column-start","grid-row","grid-row-align","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hyphens","image-rendering","justify-content","margin-block-end","margin-block-start","margin-inline-end","margin-inline-start","mask","mask-border","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-origin","mask-position","mask-repeat","mask-size","object-fit","object-position","order","overscroll-behavior","padding-block-end","padding-block-start","padding-inline-end","padding-inline-start","perspective","perspective-origin","place-self","region-fragment","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","tab-size","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-orientation","text-overflow","text-size-adjust","text-spacing","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","user-select","writing-mode"]),ht=new Set(["-moz-all","-moz-calc","-moz-crisp-edges","-moz-element","-moz-fit-content","-moz-grab","-moz-grabbing","-moz-initial","-moz-isolate","-moz-isolate-override","-moz-linear-gradient","-moz-max-content","-moz-min-content","-moz-pre-wrap","-moz-plaintext","-moz-radial-gradient","-moz-repeating-linear-gradient","-moz-repeating-radial-gradient","-moz-zoom-in","-moz-zoom-out","-ms-flexbox","-ms-grid","-ms-inline-grid","-ms-linear-gradient","-ms-radial-gradient","-ms-repeating-linear-gradient","-ms-repeating-radial-gradient","-o-crisp-edges","-o-linear-gradient","-o-pre-wrap","-o-radial-gradient","-o-repeating-linear-gradient","-o-repeating-radial-gradient","-webkit-calc","-webkit-cross-fade","-webkit-filter","-webkit-fit-content","-webkit-flex","-webkit-grab","-webkit-grabbing","-webkit-image-set","-webkit-inline-flex","-webkit-isolate","-webkit-linear-gradient","-webkit-max-content","-webkit-min-content","-webkit-plaintext","-webkit-radial-gradient","-webkit-repeating-linear-gradient","-webkit-repeating-radial-gradient","-webkit-sticky","-webkit-zoom-in","-webkit-zoom-out","-xv-digits","-xv-literal-punctuation","-xv-no-punctuation","-moz-arabic-indic","-moz-bengali","-moz-cjk-earthly-branch","-moz-cjk-heavenly-stem","-moz-devanagari","-moz-ethiopic-numeric","-moz-gujarati","-moz-gurmukhi","-moz-hangul","-moz-hangul-consonant","-moz-japanese-formal","-moz-japanese-informal","-moz-kannada","-moz-khmer","-moz-lao","-moz-malayalam","-moz-myanmar","-moz-oriya","-moz-persian","-moz-simp-chinese-formal","-moz-simp-chinese-informal","-moz-tamil","-moz-telugu","-moz-thai","-moz-trad-chinese-formal","-moz-trad-chinese-informal"]);var ft={atRuleName:e=>ut.has("@".concat(e.toLowerCase())),selector:e=>dt.has(e.toLowerCase()),mediaFeatureName:e=>e.toLowerCase().includes("device-pixel-ratio"),property(e){const t=e.toLowerCase();return"-ms-interpolation-mode"===t||0!==xe.prefix(t).length&&pt.has(xe.unprefixed(t))},propertyValue:e=>ht.has(e.toLowerCase()),unprefix:e=>e.replace(/-\w+-/,"")};const mt="at-rule-no-vendor-prefix",gt=Z(mt,{rejected:e=>'Unexpected vendor-prefixed at-rule "@'.concat(e,'"')}),bt=(e,t,n)=>(t,r)=>{re(r,mt,{actual:e})&&t.walkAtRules((e=>{if(!ke(e))return;const t=e.name;t.startsWith("-")&&ft.atRuleName(t)&&(n.fix?e.name=ft.unprefix(e.name):X({message:gt.rejected,messageArgs:[t],node:e,word:"@".concat(t),result:r,ruleName:mt}))}))};function wt(...e){return t=>!!T(t)&&Object.values(t).flat().every((t=>e.some((e=>e(t)))))}bt.ruleName=mt,bt.messages=gt,bt.meta={url:"https://stylelint.io/user-guide/rules/at-rule-no-vendor-prefix",fixable:!0};const yt="at-rule-property-required-list",vt=Z(yt,{expected:(e,t)=>'Expected property "'.concat(t,'" for at-rule "').concat(e,'"')}),kt=e=>(t,n)=>{if(!re(n,yt,{actual:e,possible:[wt(P)]}))return;const r=function(e){const t=new Map;for(const[n,r]of Object.entries(e)){const e=Array.isArray(r)?r:[r];t.set(n,new Set(e))}return t}(e),o=new Set;t.walkAtRules((e=>{if(!ke(e))return;const{name:t,nodes:i}=e;if(!i)return;const s=t.toLowerCase(),a=r.get(s);if(a){o.clear();for(const e of i){if(!e||"decl"!==e.type)continue;const t=e.prop.toLowerCase();a.has(t)&&o.add(t)}if(o.size!==a.size)for(const t of a)o.has(t)||X({message:vt.expected,messageArgs:[s,t],node:e,word:"@".concat(e.name),result:n,ruleName:yt})}}))};function xt(e,{noRawBefore:t}={noRawBefore:!1}){let n="";const r=e.raws.before||"";if(t||(n+=r),Me(e))n+=e.selector;else{if(!_e(e))return"";n+="@".concat(e.name).concat(e.raws.afterName||"").concat(e.params)}return n+=e.raws.between||"",n}kt.ruleName=yt,kt.messages=vt,kt.meta={url:"https://stylelint.io/user-guide/rules/at-rule-property-required-list"};const St="-disable",Ct="-disable-line",Ot="-disable-next-line",At="-enable",zt=new Set([St,Ct,Ot,At]),Et="stylelint";function Nt(e,t="stylelint"){const[n]=e.text.split(/\s/,1);return L(n),n.replace(t,"")}function Pt(e,t="stylelint"){const n=Nt(e,t);return void 0!==n&&zt.has(n)}const Tt="block-no-empty",It=Z(Tt,{rejected:"Unexpected empty block"}),jt=(e,t,n)=>(r,o)=>{if(!re(o,Tt,{actual:e,possible:A},{actual:t,possible:{ignore:["comments"]},optional:!0}))return;const i=H(t,"ignore","comments");function s(e){if(!Ye(e))return;if(function(e){var t;return(null!==(t=e.nodes)&&void 0!==t?t:[]).some((e=>{if(Re(e)){if(i)return!1;if(Pt(e,n.configurationComment))return!1}return!0}))}(e))return;if(function(e){const{after:t}=e.raws;return"string"==typeof t&&/\S/.test(t)}(e))return;let t=xt(e,{noRawBefore:!0}).length;void 0===e.raws.between&&t--,X({message:It.rejected,node:e,start:e.positionBy({index:t}),result:o,ruleName:Tt})}r.walkRules(s),r.walkAtRules(s)};function Lt(e){return!!e.value&&(!e.value.startsWith("#{")&&(!e.value.startsWith("${")&&!e.value.startsWith("`")))}function Mt(e){if(!Lt(e))return!1;for(const t of e.nodes){if("function"===t.type)return Mt(t);if("word"===t.type&&(t.value.startsWith("#")||t.value.startsWith("$")||t.value.includes(".$")))return!1}return!0}jt.ruleName=Tt,jt.messages=It,jt.meta={url:"https://stylelint.io/user-guide/rules/block-no-empty"};const _t="color-function-notation",Rt=Z(_t,{expected:e=>"Expected ".concat(e," color-function notation")}),Ft=/^(?:rgba|hsla)$/i,Dt=/\b(?:rgba?|hsla?)\(/i,Ut=/^(?:rgba?|hsla?)$/i,qt=(e,t,n)=>(r,o)=>{if(!re(o,_t,{actual:e,possible:["modern","legacy"]},{actual:t,possible:{ignore:["with-var-inside"]},optional:!0}))return;const i=H(t,"ignore","with-var-inside");r.walkDecls((t=>{if(!Dt.test(t.value))return;if("modern"===e&&!t.value.includes(","))return;let r=!1;const s=S(_(t));s.walk((s=>{if(!De(s))return;if(!Mt(s))return;const{value:a,sourceIndex:l,sourceEndIndex:c,nodes:u}=s;if(i&&function(e){return e.some((({type:e,value:t})=>"function"===e&&"var"===t.toLowerCase()))}(u))return;if(!Ut.test(a))return;if("modern"===e&&!$t(s))return;if("legacy"===e&&$t(s))return;if(n.fix&&"modern"===e){let e=0;return s.nodes=u.map((t=>(Bt(t)&&(e<2?(t.type="space",t.value=Wt(t.after),e++):(t.value="/",t.before=Wt(t.before),t.after=Wt(t.after))),t))),Ft.test(a)&&(s.value=a.slice(0,-1)),void(r=!0)}const d=M(t)+l,p=d+(c-l);X({message:Rt.expected,messageArgs:[e],node:t,index:d,endIndex:p,result:o,ruleName:_t})})),r&&ee(t,s.toString())}))};function Wt(e){return""!==e?e:" "}function Bt(e){return"div"===e.type&&","===e.value}function $t(e){return e.nodes&&e.nodes.some((e=>Bt(e)))}qt.ruleName=_t,qt.messages=Rt,qt.meta={url:"https://stylelint.io/user-guide/rules/color-function-notation",fixable:!0};const Qt=/#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})(?:$|[^\da-f])/i;function Vt(e){return Qt.test(e)}const Gt=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Yt(e){return Gt.test(e)}function Jt({type:e,value:t}){return"word"===e&&Yt(t)}const Kt="color-hex-alpha",Ht=Z(Kt,{expected:e=>'Expected alpha channel in "'.concat(e,'"'),unexpected:e=>'Unexpected alpha channel in "'.concat(e,'"')}),Xt=e=>(t,n)=>{re(n,Kt,{actual:e,possible:["always","never"]})&&t.walkDecls((t=>{if(!Vt(t.value))return;S(t.value).walk((r=>{if(function({type:e,value:t}){return"function"===e&&"url"===t}(r))return!1;if(!Jt(r))return;const{value:o}=r;if("always"===e&&Zt(o))return;if("never"===e&&!Zt(o))return;const i=M(t)+r.sourceIndex,s=i+o.length;X({message:"never"===e?Ht.unexpected:Ht.expected,messageArgs:[o],node:t,index:i,endIndex:s,result:n,ruleName:Kt})}))}))};function Zt(e){return 5===e.length||9===e.length}Xt.ruleName=Kt,Xt.messages=Ht,Xt.meta={url:"https://stylelint.io/user-guide/rules/color-hex-alpha"};const en=new Set(["url"]);function tn({type:e,value:t}){return"function"===e&&en.has(t.toLowerCase())}const nn="color-hex-length",rn=Z(nn,{expected:(e,t)=>'Expected "'.concat(e,'" to be "').concat(t,'"')}),on=/#[\da-z]+/i,sn=(e,t,n)=>(t,r)=>{re(r,nn,{actual:e,possible:["short","long"]})&&t.walkDecls((t=>{if(!on.test(t.value))return;const o=S(_(t));let i=!1;o.walk((o=>{const{value:s}=o;if(tn(o))return!1;if(!Jt(o))return;if("long"===e&&4!==s.length&&5!==s.length)return;if("short"===e&&(s.length<6||!function(e){return(e=e.toLowerCase())[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]&&(7===e.length||9===e.length&&e[7]===e[8])}(s)))return;const a=("long"===e?ln:an)(s);if(n.fix)return o.value=a,void(i=!0);const l=M(t)+o.sourceIndex,c=l+o.value.length;X({message:rn.expected,messageArgs:[s,a],node:t,index:l,endIndex:c,result:r,ruleName:nn})})),i&&ee(t,o.toString())}))};function an(e){let t="#";for(let n=1;n=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yn={grad:.9,turn:360,rad:360/(2*Math.PI)},vn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},kn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},xn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Sn=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Cn=function(e){return{r:xn(e.r,0,255),g:xn(e.g,0,255),b:xn(e.b,0,255),a:xn(e.a)}},On=function(e){return{r:kn(e.r),g:kn(e.g),b:kn(e.b),a:kn(e.a,3)}},An=/^#([0-9a-f]{3,8})$/i,zn=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},En=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}},Nn=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:o}},Pn=function(e){return{h:Sn(e.h),s:xn(e.s,0,100),l:xn(e.l,0,100),a:xn(e.a)}},Tn=function(e){return{h:kn(e.h),s:kn(e.s),l:kn(e.l),a:kn(e.a,3)}},In=function(e){return Nn((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},jn=function(e){return{h:(t=En(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},Ln=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_n=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fn={string:[[function(e){var t=An.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?kn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?kn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=_n.exec(e)||Rn.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Cn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Ln.exec(e)||Mn.exec(e);if(!t)return null;var n,r,o=Pn({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(yn[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return In(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return vn(t)&&vn(n)&&vn(r)?Cn({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!vn(t)||!vn(n)||!vn(r))return null;var s=Pn({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return In(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!vn(t)||!vn(n)||!vn(r))return null;var s=function(e){return{h:Sn(e.h),s:xn(e.s,0,100),v:xn(e.v,0,100),a:xn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Nn(s)},"hsv"]]},Dn=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=On(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?zn(kn(255*o)):"","#"+zn(t)+zn(n)+zn(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return On(this.rgba)},e.prototype.toRgbString=function(){return t=(e=On(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return Tn(jn(this.rgba))},e.prototype.toHslString=function(){return t=(e=Tn(jn(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=En(this.rgba),{h:kn(e.h),s:kn(e.s),v:kn(e.v),a:kn(e.a,3)};var e},e.prototype.invert=function(){return $n({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),$n(Un(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),$n(Un(this.rgba,-e))},e.prototype.grayscale=function(){return $n(Un(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),$n(Wn(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),$n(Wn(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?$n({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):kn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=jn(this.rgba);return"number"==typeof e?$n({h:e,s:t.s,l:t.l,a:t.a}):kn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===$n(e).toHex()},e}(),$n=function(e){return e instanceof Bn?e:new Bn(e)},Qn=[];var Vn={grad:.9,turn:360,rad:360/(2*Math.PI)},Gn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Yn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Jn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Kn=function(e){return{h:(t=e.h,(t=isFinite(t)?t%360:0)>0?t:t+360),w:Jn(e.w,0,100),b:Jn(e.b,0,100),a:Jn(e.a)};var t},Hn=function(e){return{h:Yn(e.h),w:Yn(e.w),b:Yn(e.b),a:Yn(e.a,3)}},Xn=function(e){return{h:function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),a=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:i?s/i*100:0,v:i/255*100,a:o}}(e).h,w:Math.min(e.r,e.g,e.b)/255*100,b:100-Math.max(e.r,e.g,e.b)/255*100,a:e.a}},Zn=function(e){return function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),a=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:o}}({h:e.h,s:100===e.b?0:100-e.w/(100-e.b)*100,v:100-e.b,a:e.a})},er=function(e){var t=e.h,n=e.w,r=e.b,o=e.a,i=void 0===o?1:o;if(!Gn(t)||!Gn(n)||!Gn(r))return null;var s=Kn({h:Number(t),w:Number(n),b:Number(r),a:Number(i)});return Zn(s)},tr=/^hwb\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nr=function(e){var t=tr.exec(e);if(!t)return null;var n,r,o=Kn({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Vn[r]||1)),w:Number(t[3]),b:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Zn(o)};var rr=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},or=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ir=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},sr=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ar=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},lr=96.422,cr=82.521,ur=216/24389,dr=24389/27,pr=function(e){var t=e.l,n=e.a,r=e.b,o=e.alpha,i=void 0===o?1:o;if(!rr(t)||!rr(n)||!rr(r))return null;var s=function(e){return{l:ir(e.l,0,400),a:e.a,b:e.b,alpha:ir(e.alpha)}}({l:Number(t),a:Number(n),b:Number(r),alpha:Number(i)});return hr(s)},hr=function(e){var t=(e.l+16)/116,n=e.a/500+t,r=t-e.b/200;return function(e){var t,n,r=.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,o=-.0282895*t.x+1.0099416*t.y+.0210077*t.z,i=.0122982*t.x+-.020483*t.y+1.3299098*t.z;return n={r:ar(.032404542*r-.015371385*o-.004985314*i),g:ar(-.00969266*r+.018760108*o+41556e-8*i),b:ar(556434e-9*r-.002040259*o+.010572252*i),a:e.a},{r:ir(n.r,0,255),g:ir(n.g,0,255),b:ir(n.b,0,255),a:ir(n.a)}}({x:(Math.pow(n,3)>ur?Math.pow(n,3):(116*n-16)/dr)*lr,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/dr),z:(Math.pow(r,3)>ur?Math.pow(r,3):(116*r-16)/dr)*cr,a:e.alpha})};var fr={grad:.9,turn:360,rad:360/(2*Math.PI)},mr=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},gr=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},br=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},wr=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},yr=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},vr=96.422,kr=82.521,xr=216/24389,Sr=24389/27,Cr=function(e){return{l:br(e.l,0,100),c:e.c,h:(t=e.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:e.a};var t},Or=function(e){return{l:gr(e.l,2),c:gr(e.c,2),h:gr(e.h,2),a:gr(e.a,3)}},Ar=function(e){var t=e.l,n=e.c,r=e.h,o=e.a,i=void 0===o?1:o;if(!mr(t)||!mr(n)||!mr(r))return null;var s=Cr({l:Number(t),c:Number(n),h:Number(r),a:Number(i)});return Er(s)},zr=function(e){var t=function(e){var t=function(e){var t=wr(e.r),n=wr(e.g),r=wr(e.b);return function(e){return{x:br(e.x,0,vr),y:br(e.y,0,100),z:br(e.z,0,kr),a:br(e.a)}}(function(e){return{x:1.0478112*e.x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a}}({x:100*(.4124564*t+.3575761*n+.1804375*r),y:100*(.2126729*t+.7151522*n+.072175*r),z:100*(.0193339*t+.119192*n+.9503041*r),a:e.a}))}(e),n=t.x/vr,r=t.y/100,o=t.z/kr;return n=n>xr?Math.cbrt(n):(Sr*n+16)/116,{l:116*(r=r>xr?Math.cbrt(r):(Sr*r+16)/116)-16,a:500*(n-r),b:200*(r-(o=o>xr?Math.cbrt(o):(Sr*o+16)/116)),alpha:t.a}}(e),n=gr(t.a,3),r=gr(t.b,3),o=Math.atan2(r,n)/Math.PI*180;return{l:t.l,c:Math.sqrt(n*n+r*r),h:o<0?o+360:o,a:t.alpha}},Er=function(e){return r=(t={l:e.l,a:e.c*Math.cos(e.h*Math.PI/180),b:e.c*Math.sin(e.h*Math.PI/180),alpha:e.a}).a/500+(n=(t.l+16)/116),o=n-t.b/200,function(e){var t,n,r=.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,o=-.0282895*t.x+1.0099416*t.y+.0210077*t.z,i=.0122982*t.x+-.020483*t.y+1.3299098*t.z;return n={r:yr(.032404542*r-.015371385*o-.004985314*i),g:yr(-.00969266*r+.018760108*o+41556e-8*i),b:yr(556434e-9*r-.002040259*o+.010572252*i),a:e.a},{r:br(n.r,0,255),g:br(n.g,0,255),b:br(n.b,0,255),a:br(n.a)}}({x:(Math.pow(r,3)>xr?Math.pow(r,3):(116*r-16)/Sr)*vr,y:100*(t.l>8?Math.pow((t.l+16)/116,3):t.l/Sr),z:(Math.pow(o,3)>xr?Math.pow(o,3):(116*o-16)/Sr)*kr,a:t.alpha});var t,n,r,o},Nr=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pr=function(e){var t=Nr.exec(e);if(!t)return null;var n,r,o=Cr({l:Number(t[1]),c:Number(t[2]),h:(n=t[3],r=t[4],void 0===r&&(r="deg"),Number(n)*(fr[r]||1)),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Er(o)};!function(e){e.forEach((function(e){Qn.indexOf(e)<0&&(e(Bn,Fn),Qn.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(o=l,s=i[p],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));hur?Math.cbrt(n):(dr*n+16)/116,e={l:116*(r=r>ur?Math.cbrt(r):(dr*r+16)/116)-16,a:500*(n-r),b:200*(r-(o=o>ur?Math.cbrt(o):(dr*o+16)/116)),alpha:t.a},{l:or(e.l,2),a:or(e.a,2),b:or(e.b,2),alpha:or(e.alpha,3)};var e,t,n,r,o},e.prototype.delta=function(t){void 0===t&&(t="#FFF");var n=t instanceof e?t:new e(t),r=function(e,t){var n=e.l,r=e.a,o=e.b,i=t.l,s=t.a,a=t.b,l=180/Math.PI,c=Math.PI/180,u=Math.pow(Math.pow(r,2)+Math.pow(o,2),.5),d=Math.pow(Math.pow(s,2)+Math.pow(a,2),.5),p=(n+i)/2,h=Math.pow((u+d)/2,7),f=.5*(1-Math.pow(h/(h+Math.pow(25,7)),.5)),m=r*(1+f),g=s*(1+f),b=Math.pow(Math.pow(m,2)+Math.pow(o,2),.5),w=Math.pow(Math.pow(g,2)+Math.pow(a,2),.5),y=(b+w)/2,v=0===m&&0===o?0:Math.atan2(o,m)*l,k=0===g&&0===a?0:Math.atan2(a,g)*l;v<0&&(v+=360),k<0&&(k+=360);var x=k-v,S=Math.abs(k-v);S>180&&k<=v?x+=360:S>180&&k>v&&(x-=360);var C=v+k;S<=180?C/=2:C=(v+k<360?C+360:C-360)/2;var O=1-.17*Math.cos(c*(C-30))+.24*Math.cos(2*c*C)+.32*Math.cos(c*(3*C+6))-.2*Math.cos(c*(4*C-63)),A=i-n,z=w-b,E=2*Math.sin(c*x/2)*Math.pow(b*w,.5),N=1+.015*Math.pow(p-50,2)/Math.pow(20+Math.pow(p-50,2),.5),P=1+.045*y,T=1+.015*y*O,I=30*Math.exp(-1*Math.pow((C-275)/25,2)),j=-2*Math.pow(h/(h+Math.pow(25,7)),.5)*Math.sin(2*c*I);return Math.pow(Math.pow(A/1/N,2)+Math.pow(z/1/P,2)+Math.pow(E/1/T,2)+j*z*E/(1*P*1*T),.5)}(this.toLab(),n.toLab())/100;return ir(or(r,3))},t.object.push([pr,"lab"])},function(e,t){e.prototype.toLch=function(){return Or(zr(this.rgba))},e.prototype.toLchString=function(){return t=(e=Or(zr(this.rgba))).l,n=e.c,r=e.h,(o=e.a)<1?"lch("+t+"% "+n+" "+r+" / "+o+")":"lch("+t+"% "+n+" "+r+")";var e,t,n,r,o},t.string.push([Pr,"lch"]),t.object.push([Ar,"lch"])},(e,t)=>{t.string.push([Ir,"hwb-with-comma"])},(e,t)=>{t.string.push([jr,"gray"])}]);const Tr=$n;function Ir(e){if(!(e=e.toLowerCase()).startsWith("hwb(")||!e.endsWith(")")||e.includes("/"))return null;const[t,n="",r="",o,...i]=e.slice(4,-1).split(",");if(!t||!t.trim()||!n.trim()||!r.trim()||i.length>0)return null;const s=Tr("hwb(".concat(t," ").concat(n," ").concat(r).concat(o?" / ".concat(o):"",")"));return s.isValid()?s.rgba:null}function jr(e){if(!(e=e.toLowerCase()).startsWith("gray(")||!e.endsWith(")"))return null;const[t,n,...r]=e.slice(5,-1).split(",");if(!t||r.length>0)return null;const o=S.unit(t.trim());if(!o||!["","%"].includes(o.unit))return null;let i={l:Number(o.number),a:0,b:0};if(n){const e=S.unit(n.trim());if(!e||!["","%"].includes(e.unit))return null;i=mn(mn({},i),{},{alpha:Number(e.number)/(e.unit?100:1)})}return Tr(i).rgba}const Lr=new Set(["translateX","translateY","translateZ","scaleX","scaleY","scaleZ","rotateX","rotateY","rotateZ","skewX","skewY"]),Mr=new Set(["color","color-mix","hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"]),_r=new Set(["abs","acos","asin","atan","calc","cos","exp","sign","sin","sqrt","tan"]),Rr=new Set([..._r,"atan2","clamp","hypot","log","max","min","mod","pow","rem","round"]),Fr=new RegExp("\\b(?:".concat([...Mr.values()].join("|"),")\\("),"i");const Dr=new Set(["initial","inherit","revert","revert-layer","unset"]),Ur=rt(Dr,["caption","icon","menu","message-box","small-caption","status-bar"]),qr=rt(Dr,["serif","sans-serif","cursive","fantasy","monospace","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Wr=new Set(["bolder","lighter"]),Br=new Set(["normal","bold"]),$r=rt(Wr,Br),Qr=new Set(["100","200","300","400","500","600","700","800","900"]),Vr=rt(Dr,$r,Qr),Gr=rt(Dr,["normal","italic","oblique"]),Yr=rt(Dr,["normal","none","historical-forms","none","common-ligatures","no-common-ligatures","discretionary-ligatures","no-discretionary-ligatures","historical-ligatures","no-historical-ligatures","contextual","no-contextual","small-caps","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","ordinal","slashed-zero","jis78","jis83","jis90","jis04","simplified","traditional","full-width","proportional-width","ruby"]),Jr=rt(Dr,["semi-condensed","condensed","extra-condensed","ultra-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded"]),Kr=rt(Dr,["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]),Hr=rt(Dr,["normal"]),Xr=rt(Dr,Gr,Yr,Vr,Jr,Kr,Hr,qr),Zr=rt(Dr,["none"]),eo=rt(Dr,["linear","ease","ease-in","ease-in-out","ease-out","step-start","step-end","steps","cubic-bezier"]),to=new Set(["infinite"]),no=rt(Dr,["normal","reverse","alternate","alternate-reverse"]),ro=new Set(["none","forwards","backwards","both"]),oo=rt(Dr,["running","paused"]),io=rt(Dr,Zr,eo,to,no,ro,oo),so=rt(Dr,["auto","span"]),ao=rt(Dr,["auto","span"]),lo=rt(Dr,["auto","span"]),co=rt(Dr,["none"]),uo=rt(Dr,["none"]),po=rt(Dr,["none","disc","circle","square","decimal","cjk-decimal","decimal-leading-zero","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","arabic-indic","armenian","bengali","cambodian","cjk-earthly-branch","cjk-ideographic","devanagari","ethiopic-numeric","georgian","gujarati","gurmukhi","hebrew","hiragana","hiragana-iroha","japanese-formal","japanese-informal","kannada","katakana","katakana-iroha","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","lao","lower-armenian","malayalam","mongolian","myanmar","oriya","persian","simp-chinese-formal","simp-chinese-informal","tamil","telugu","thai","tibetan","trad-chinese-formal","trad-chinese-informal","upper-armenian","disclosure-open","disclosure-closed","ethiopic-halehame","ethiopic-halehame-am","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","hangul","hangul-consonant","urdu"]),ho=rt(Dr,["inside","outside"]),fo=rt(Dr,["none"]),mo=rt(Dr,po,ho,fo),go=new Set(["optimizeSpeed","optimizeQuality","optimizeLegibility","geometricPrecision","currentColor","crispEdges","visiblePainted","visibleFill","visibleStroke","sRGB","linearRGB"]),bo=new Set(["from","to"]),wo=new Set(["activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","accentcolor","accentcolortext","activetext","buttonborder","buttonface","buttontext","canvas","canvastext","field","fieldtext","graytext","highlight","highlighttext","linktext","mark","marktext","selecteditem","selecteditemtext","visitedtext"]),yo=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),vo=new RegExp("\\b(?:".concat([...yo.values()].join("|"),")\\b"),"i");const ko="color-named",xo=Z(ko,{expected:(e,t)=>'Expected "'.concat(t,'" to be "').concat(e,'"'),rejected:e=>'Unexpected named color "'.concat(e,'"')}),So=new Set(["word","function"]),Co=/\bgray\(/i,Oo=(e,t)=>(n,r)=>{function o(e,t,n,o){X({result:r,ruleName:ko,message:e,node:t,index:n,endIndex:n+o})}re(r,ko,{actual:e,possible:["never","always-where-possible"]},{actual:t,possible:{ignoreProperties:[P,N],ignore:["inside-function"]},optional:!0})&&n.walkDecls((n=>{if(cn.has(n.prop))return;if(H(t,"ignoreProperties",n.prop))return;const{value:r}=n;var i;("never"!==e||(i=r,vo.test(i)))&&(("always-where-possible"!==e||Vt(r)||function(e){return Fr.test(e)}(r)||Co.test(r))&&S(r).walk((r=>{const i=r.value,s=r.type,a=r.sourceIndex;if(H(t,"ignore","inside-function")&&"function"===s)return!1;if(!Lt(r))return!1;if(!V(i))return;if(!So.has(s))return;if("never"===e&&"word"===s&&yo.has(i.toLowerCase()))return void o(xo.rejected(i),n,M(n)+a,i.length);if("always-where-possible"!==e)return;let l=null,c=null;if("function"===s)l=S.stringify(r),c=l.replace(/\s*([,/()])\s*/g,"$1").replace(/\s{2,}/g," ");else{if("word"!==s||!i.startsWith("#"))return;l=c=i}const u=Tr(c);if(!u.isValid())return;const d=u.toName();d&&"transparent"!==d.toLowerCase()&&o(xo.expected(d,c),n,M(n)+a,l.length)})))}))};Oo.ruleName=ko,Oo.messages=xo,Oo.meta={url:"https://stylelint.io/user-guide/rules/color-named"};const Ao="color-no-hex",zo=Z(Ao,{rejected:e=>'Unexpected hex color "'.concat(e,'"')}),Eo=/^#[\da-z]+$/i,No=/#[\da-z]+/i,Po=e=>(t,n)=>{re(n,Ao,{actual:e})&&t.walkDecls((e=>{if(!No.test(e.value))return;S(_(e)).walk((t=>{if(tn(t))return!1;if(!function({type:e,value:t}){return"word"===e&&Eo.test(t)}(t))return;const r=M(e)+t.sourceIndex,o=r+t.value.length;X({message:zo.rejected,messageArgs:[t.value],node:e,index:r,endIndex:o,result:n,ruleName:Ao})}))}))};Po.ruleName=Ao,Po.messages=zo,Po.meta={url:"https://stylelint.io/user-guide/rules/color-no-hex"};const To="color-no-invalid-hex",Io=Z(To,{rejected:e=>'Unexpected invalid hex color "'.concat(e,'"')}),jo=/#[\da-z]+/i,Lo=e=>(t,n)=>{re(n,To,{actual:e})&&t.walkDecls((e=>{(function(e){return!e.includes("[")})(e.value)&&jo.test(e.value)&&S(e.value).walk((({value:t,type:r,sourceIndex:o})=>{if("function"===r&&t.endsWith("url"))return!1;if("word"!==r)return;const i=/^#[\da-z]+/i.exec(t);if(!i)return;const s=i[0];if(!s||Yt(s))return;const a=M(e)+o,l=a+s.length;X({message:Io.rejected,messageArgs:[s],node:e,index:a,endIndex:l,result:n,ruleName:To})}))}))};function Mo(e){return!("inline"in e)&&!("inline"in e.raws)}Lo.ruleName=To,Lo.messages=Io,Lo.meta={url:"https://stylelint.io/user-guide/rules/color-no-invalid-hex"};const _o="comment-empty-line-before",Ro=Z(_o,{expected:"Expected empty line before comment",rejected:"Unexpected empty line before comment"}),Fo=(e,t,n)=>(r,o)=>{re(o,_o,{actual:e,possible:["always","never"]},{actual:t,possible:{except:["first-nested"],ignore:["stylelint-commands","after-comment"],ignoreComments:[P,N]},optional:!0})&&r.walkComments((r=>{if(Xe(r))return;if(Pt(r,n.configurationComment)&&H(t,"ignore","stylelint-commands"))return;if(H(t,"ignore","after-comment")&&Ge(r))return;if(H(t,"ignoreComments",r.text))return;if(Ve(r))return;if(!Mo(r))return;const i=!(H(t,"except","first-nested")&&He(r)||"always"!==e);if(i===je(r.raws.before||""))return;if(n.fix){if("string"!=typeof n.newline)return;return void(i?Ne(r,n.newline):Ze(r,n.newline))}X({message:i?Ro.expected:Ro.rejected,node:r,result:o,ruleName:_o})}))};Fo.ruleName=_o,Fo.messages=Ro,Fo.meta={url:"https://stylelint.io/user-guide/rules/comment-empty-line-before",fixable:!0};const Do="comment-no-empty",Uo=Z(Do,{rejected:"Unexpected empty comment"}),qo=e=>(t,n)=>{re(n,Do,{actual:e})&&t.walkComments((e=>{Mo(e)&&(e.text&&0!==e.text.length||X({message:Uo.rejected,node:e,result:n,ruleName:Do}))}))};qo.ruleName=Do,qo.messages=Uo,qo.meta={url:"https://stylelint.io/user-guide/rules/comment-no-empty"};const Wo="comment-pattern",Bo=Z(Wo,{expected:e=>'Expected comment to match pattern "'.concat(e,'"')}),$o=e=>(t,n)=>{if(!re(n,Wo,{actual:e,possible:[N,P]}))return;const r=P(e)?new RegExp(e):e;t.walkComments((t=>{const o=t.text;r.test(o)||X({message:Bo.expected,messageArgs:[e],node:t,result:n,ruleName:Wo})}))};function Qo(e){return[" ","\n","\t","\r","\f"].includes(e)}$o.ruleName=Wo,$o.messages=Bo,$o.meta={url:"https://stylelint.io/user-guide/rules/comment-pattern"};const Vo="comment-whitespace-inside",Go=Z(Vo,{expectedOpening:'Expected whitespace after "/*"',rejectedOpening:'Unexpected whitespace after "/*"',expectedClosing:'Expected whitespace before "*/"',rejectedClosing:'Unexpected whitespace before "*/"'});const Yo=(e,t,n)=>(t,r)=>{re(r,Vo,{actual:e,possible:["always","never"]})&&t.walkComments((t=>{if(!Mo(t))return;const o=t.toString(),i=o.slice(0,4);if(/^\/\*[#!]\s/.test(i))return;const s=o.match(/(^\/\*+)(\s)?/);if(null==s||null==s[1])throw new Error('Invalid comment: "'.concat(o,'"'));const a=o.match(/(\s)?(\*+\/)$/);if(null==a||null==a[2])throw new Error('Invalid comment: "'.concat(o,'"'));const l=s[1],c=s[2]||"",u=a[1]||"",d=a[2];function p(o,i){n.fix?"never"===e?(t.raws.left="",t.raws.right="",t.text=t.text.replace(/^(\*+)(\s+)?/,"$1").replace(/(\s+)?(\*+)$/,"$2")):(c||function(e){e.text.startsWith("*")?e.text=e.text.replace(/^(\*+)/,"$1 "):e.raws.left=" "}(t),u||function(e){"*"===e.text[e.text.length-1]?e.text=e.text.replace(/(\*+)$/," $1"):e.raws.right=" "}(t)):X({message:o,index:i,result:r,ruleName:Vo,node:t})}"never"===e&&""!==c&&p(Go.rejectedOpening,l.length),"always"!==e||Qo(c)||p(Go.expectedOpening,l.length),"never"===e&&""!==u&&p(Go.rejectedClosing,t.toString().length-d.length-1),"always"!==e||Qo(u)||p(Go.expectedClosing,t.toString().length-d.length-1)}))};function Jo(e,t){return!!t&&(!!P(t)&&((!t.startsWith("/")||!t.endsWith("/"))&&(!!e.includes(t)&&{match:e,pattern:t,substring:t})))}Yo.ruleName=Vo,Yo.messages=Go,Yo.meta={url:"https://stylelint.io/user-guide/rules/comment-whitespace-inside",fixable:!0};const Ko="comment-word-disallowed-list",Ho=Z(Ko,{rejected:e=>'Unexpected word matching pattern "'.concat(e,'"')}),Xo=e=>(t,n)=>{re(n,Ko,{actual:e,possible:[P,N]})&&t.walkComments((t=>{const r=t.text;if("/*# "===t.toString().slice(0,4))return;const o=G(r,e)||function(e,t){if(!Array.isArray(t))return Jo(e,t);for(const n of t){const t=Jo(e,n);if(t)return t}return!1}(r,e);o&&X({message:Ho.rejected,messageArgs:[o.pattern],node:t,word:o.substring,result:n,ruleName:Ko})}))};function Zo(e){let t=1+e.name.length;return e.raws.afterName&&(t+=e.raws.afterName.length),t}Xo.primaryOptionArray=!0,Xo.ruleName=Ko,Xo.messages=Ho,Xo.meta={url:"https://stylelint.io/user-guide/rules/comment-word-disallowed-list"};const ei="custom-media-pattern",ti=Z(ei,{expected:(e,t)=>'Expected "'.concat(e,'" to match pattern "').concat(t,'"')}),ni=e=>(t,n)=>{if(!re(n,ei,{actual:e,possible:[N,P]}))return;const r=P(e)?new RegExp(e):e;t.walkAtRules((t=>{if("custom-media"!==t.name.toLowerCase())return;const[o,i]=t.params.match(/^--(\S+)\b/)||[];if(void 0===o||void 0===i)throw new Error('Unexpected at-rule params: "'.concat(t.params,'"'));if(r.test(i))return;const s=Zo(t);X({message:ti.expected,messageArgs:[o,e],node:t,index:s,endIndex:s+o.length,result:n,ruleName:ei})}))};function ri(e){return Ye(e)?function(e){let t="";return e.raws.before&&(t+=e.raws.before),t+=e.toString(),t}(e).slice(xt(e).length):""}function oi(e){return e.startsWith("--")}function ii(e){return!/[\n\r]/.test(e)}function si(e){return!!e.startsWith("$")||!!e.includes(".$")}function ai(e){const t=e.prop,n=e.parent;return!si(t)&&(("@"!==t[0]||"{"===t[1])&&((!n||"atrule"!==n.type||":"!==n.raws.afterName)&&(!(n&&Me(n)&&n.selector&&n.selector.startsWith("#")&&n.selector.endsWith("()"))&&(!(n&&Me(n)&&n.selector&&":"===n.selector[n.selector.length-1]&&"--"!==n.selector.substring(0,2))&&(!("extend"in e)||!e.extend)))))}ni.ruleName=ei,ni.messages=ti,ni.meta={url:"https://stylelint.io/user-guide/rules/custom-media-pattern"};const li="custom-property-empty-line-before",ci=Z(li,{expected:"Expected empty line before custom property",rejected:"Unexpected empty line before custom property"}),ui=(e,t,n)=>(r,o)=>{re(o,li,{actual:e,possible:["always","never"]},{actual:t,possible:{except:["first-nested","after-comment","after-custom-property"],ignore:["after-comment","first-nested","inside-single-line-block"]},optional:!0})&&r.walkDecls((r=>{const i=r.prop,s=r.parent;if(!ai(r))return;if(!oi(i))return;if(H(t,"ignore","after-comment")&&Ge(r))return;if(H(t,"ignore","first-nested")&&He(r))return;if(H(t,"ignore","inside-single-line-block")&&null!=s&&(_e(s)||Me(s))&&ii(ri(s)))return;let a="always"===e;(H(t,"except","first-nested")&&He(r)||H(t,"except","after-comment")&&Ge(r)||H(t,"except","after-custom-property")&&function(e){const t=Te(e);return null!=t&&Fe(t)&&oi(t.prop)}(r))&&(a=!a);if(a===je(r.raws.before))return;if(n.fix){if(null==n.newline)return;return void(a?Ne(r,n.newline):Ze(r,n.newline))}X({message:a?ci.expected:ci.rejected,node:r,result:o,ruleName:li})}))};ui.ruleName=li,ui.messages=ci,ui.meta={url:"https://stylelint.io/user-guide/rules/custom-property-empty-line-before",fixable:!0};const di="custom-property-no-missing-var-function",pi=Z(di,{rejected:e=>'Unexpected missing var function for "'.concat(e,'"')}),hi=new Set(["animation","animation-name","counter-increment","counter-reset","counter-set","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","list-style","list-style-type","transition","transition-property","will-change"]),fi=e=>(t,n)=>{if(!re(n,di,{actual:e}))return;const r=new Set;t.walkAtRules(/^property$/i,(({params:e})=>{r.add(e)})),t.walkDecls(/^--/,(({prop:e})=>{r.add(e)})),t.walkDecls((e=>{const{prop:t,value:o}=e;o.includes("--")&&(hi.has(t.toLowerCase())||S(o).walk((t=>{if(function({type:e,value:t}){return"function"===e&&"var"===t}(t))return!1;if(!function({type:e,value:t}){return"word"===e&&t.startsWith("--")}(t))return;if(!r.has(t.value))return;const o=M(e)+t.sourceIndex,i=o+t.value.length;return X({message:pi.rejected,messageArgs:[t.value],node:e,index:o,endIndex:i,result:n,ruleName:di}),!1})))}))};function mi(e){return!si(e)&&(!e.startsWith("@")&&(!e.endsWith("+")&&!e.endsWith("+_")&&!Q(e)))}fi.ruleName=di,fi.messages=pi,fi.meta={url:"https://stylelint.io/user-guide/rules/custom-property-no-missing-var-function"};const gi="custom-property-pattern",bi=Z(gi,{expected:(e,t)=>'Expected "'.concat(e,'" to match pattern "').concat(t,'"')}),wi=/var\(/i,yi=e=>(t,n)=>{if(!re(n,gi,{actual:e,possible:[N,P]}))return;const r=P(e)?new RegExp(e):e;function o(e){return!oi(e)||!mi(e)||r.test(e.slice(2))}function i(t,r,o){X({result:n,ruleName:gi,message:bi.expected,messageArgs:[r,e],node:o,index:t,endIndex:t+r.length})}t.walkDecls((e=>{const{prop:t,value:n}=e;if(wi.test(n)){S(n).walk((t=>{if(!De(t))return;if("var"!==t.value.toLowerCase())return;const{nodes:n}=t,r=n[0];r&&!o(r.value)&&i(M(e)+r.sourceIndex,r.value,e)}))}o(t)||i(0,t,e)}))};function vi(e,t){!function e(n){var r;if((Me(r=n)||_e(r)||Le(r))&&n.nodes&&n.nodes.length){const r=[];for(const t of n.nodes)"decl"===t.type&&r.push(t),e(t);r.length&&t(r.forEach.bind(r))}}(e)}yi.ruleName=gi,yi.messages=bi,yi.meta={url:"https://stylelint.io/user-guide/rules/custom-property-pattern"};const ki="declaration-block-no-duplicate-custom-properties",xi=Z(ki,{rejected:e=>'Unexpected duplicate "'.concat(e,'"')}),Si=(e,t)=>(n,r)=>{re(r,ki,{actual:e},{actual:t,possible:{ignoreProperties:[P,N]},optional:!0})&&vi(n,(e=>{const n=new Set;e((e=>{const o=e.prop;if(!mi(o))return;if(!oi(o))return;if(H(t,"ignoreProperties",o))return;n.has(o)?X({message:xi.rejected,messageArgs:[o],node:e,result:r,ruleName:ki,word:o}):n.add(o)}))}))};Si.ruleName=ki,Si.messages=xi,Si.meta={url:"https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-custom-properties"};var Ci=Object.create,Oi=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,zi=Object.getOwnPropertyNames,Ei=Object.getPrototypeOf,Ni=Object.prototype.hasOwnProperty,Pi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ti=(e,t)=>{for(var n in t)Oi(e,n,{get:t[n],enumerable:!0})},Ii=Pi((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e{var t=Ii();e.encode=function(e){var n,r="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{n=31&o,(o>>>=5)>0&&(n|=32),r+=t.encode(n)}while(o>0);return r},e.decode=function(e,n,r){var o,i,s=e.length,a=0,l=0;do{if(n>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));o=!!(32&i),a+=(i&=31)<>1;return 1==(1&e)?-t:t}(a),r.rest=n}})),Li=Pi((e=>{e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=r,e.urlGenerate=o;var i=function(e){var t=[];return function(n){for(var r=0;r32&&t.pop(),i}}((function(t){var n=t,i=r(t);if(i){if(!i.path)return t;n=i.path}for(var s=e.isAbsolute(n),a=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){a.push(n.slice(l));break}for(a.push(n.slice(l,c));c=0;c--)"."===(u=a[c])?a.splice(c,1):".."===u?d++:d>0&&(""===u?(a.splice(c+1,d),d=0):(a.splice(c,2),d--));return""===(n=a.join("/"))&&(n=s?"/":"."),i?(i.path=n,o(i)):n}));function s(e,t){""===e&&(e="."),""===t&&(t=".");var s=r(t),a=r(e);if(a&&(e=a.path||"/"),s&&!s.scheme)return a&&(s.scheme=a.scheme),o(s);if(s||t.match(n))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l="/"===t.charAt(0)?t:i(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l}e.normalize=i,e.join=s,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=a?l:function(e){return c(e)?"$"+e:e},e.fromSetString=a?l:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!==(r=e.originalLine-t.originalLine)||(0!==(r=e.originalColumn-t.originalColumn)||n)||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||(0!==(r=e.generatedColumn-t.generatedColumn)||n)||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=u(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var a=r(n);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var l=a.path.lastIndexOf("/");l>=0&&(a.path=a.path.substring(0,l+1))}t=s(o(a),t)}return i(t)}})),Mi=Pi((e=>{var t=Li(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r=0)return o}else{var i=t.toSetString(e);if(n.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e{var t=Li();function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,n){var r=e.generatedLine,o=n.generatedLine,i=e.generatedColumn,s=n.generatedColumn;return o>r||o==r&&s>=i||t.compareByGeneratedPositionsInflated(e,n)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),Ri=Pi((e=>{var t=ji(),n=Li(),r=Mi().ArraySet,o=_i().MappingList;function i(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,r=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=n.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),r.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=n.relative(t,o)),r._sources.has(i)||r._sources.add(i);var s=e.sourceContentFor(o);null!=s&&r.setSourceContent(o,s)})),r},i.prototype.addMapping=function(e){var t=n.getArg(e,"generated"),r=n.getArg(e,"original",null),o=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=n.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=n.relative(s,i));var a=new r,l=new r;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=o&&(t.source=n.join(o,t.source)),null!=s&&(t.source=n.relative(s,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}var c=t.source;null!=c&&!a.has(c)&&a.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=o&&(t=n.join(o,t)),null!=s&&(t=n.relative(s,t)),this.setSourceContent(t,r))}),this)},i.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("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(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}},i.prototype._serializeMappings=function(){for(var e,r,o,i,s=0,a=1,l=0,c=0,u=0,d=0,p="",h=this._mappings.toArray(),f=0,m=h.length;f0){if(!n.compareByGeneratedPositionsInflated(r,h[f-1]))continue;e+=","}e+=t.encode(r.generatedColumn-s),s=r.generatedColumn,null!=r.source&&(i=this._sources.indexOf(r.source),e+=t.encode(i-d),d=i,e+=t.encode(r.originalLine-1-c),c=r.originalLine-1,e+=t.encode(r.originalColumn-l),l=r.originalColumn,null!=r.name&&(o=this._names.indexOf(r.name),e+=t.encode(o-u),u=o)),p+=e}return p},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}));Ti({},{AtKeyword:()=>qi,BadString:()=>$i,BadUrl:()=>Vi,CDC:()=>Zi,CDO:()=>Xi,Colon:()=>es,Comma:()=>ns,Comment:()=>cs,Delim:()=>Gi,Dimension:()=>Ki,EOF:()=>Fi,Function:()=>Ui,Hash:()=>Wi,Ident:()=>Di,LeftCurlyBracket:()=>as,LeftParenthesis:()=>is,LeftSquareBracket:()=>rs,Number:()=>Yi,Percentage:()=>Ji,RightCurlyBracket:()=>ls,RightParenthesis:()=>ss,RightSquareBracket:()=>os,Semicolon:()=>ts,String:()=>Bi,Url:()=>Qi,WhiteSpace:()=>Hi});var Fi=0,Di=1,Ui=2,qi=3,Wi=4,Bi=5,$i=6,Qi=7,Vi=8,Gi=9,Yi=10,Ji=11,Ki=12,Hi=13,Xi=14,Zi=15,es=16,ts=17,ns=18,rs=19,os=20,is=21,ss=22,as=23,ls=24,cs=25;function us(e){return e>=48&&e<=57}function ds(e){return us(e)||e>=65&&e<=70||e>=97&&e<=102}function ps(e){return e>=65&&e<=90}function hs(e){return function(e){return ps(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function fs(e){return hs(e)||us(e)||45===e}function ms(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function gs(e){return 10===e||13===e||12===e}function bs(e){return gs(e)||32===e||9===e}function ws(e,t){return!(92!==e||gs(t)||0===t)}function ys(e,t,n){return 45===e?hs(t)||45===t||ws(t,n):!!hs(e)||92===e&&ws(e,t)}function vs(e,t,n){return 43===e||45===e?us(t)?2:46===t&&us(n)?3:0:46===e?us(t)?2:0:us(e)?1:0}function ks(e){return 65279===e||65534===e?1:0}var xs=new Array(128),Ss=130;for(let e=0;ee.length)return!1;for(let o=t;o=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var _s=["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"];function Rs(e=null,t){return null===e||e.length0?ks(t.charCodeAt(0)):0,o=Rs(e.lines,n),i=Rs(e.columns,n),s=e.startLine,a=e.startColumn;for(let e=r;e=e.length?void(cString(e+n+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;(n+=(Vs.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length)>100&&(c=n-60+3,n=58);for(let e=s;e<=a;e++)e>=0&&e0&&i[e].length>c?"…":"")+i[e].substr(c,98)+(i[e].length>c+100-1?"…":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join("\n")}function Ys(e,t,n,r,o){return Object.assign(Qs("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment:e=>Gs({source:t,line:r,column:o},isNaN(e)?0:e),get formattedMessage(){return"Parse error: ".concat(e,"\n")+Gs({source:t,line:r,column:o},2)}})}function Js(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(void 0===o)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Ks=()=>{};function Hs(e){return function(){return this[e]()}}function Xs(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}function Zs(e){let t="",n="",r=!1,o=Ks,i=!1,s=new class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Fs(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Fs(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},a=Object.assign(new class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=(()=>{})){let n=(e=String(e||"")).length,r=Rs(this.offsetAndType,e.length+1),o=Rs(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=n;break;case s:{let e=a&Ds;for(a=o[e],s=a>>Us,o[i]=e,o[e++]=i;e>Us:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>Us,this.tokenEnd=t&Ds):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>Us,this.tokenEnd=e&Ds):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let n,r,o=e;e:for(;o0?this.offsetAndType[o-1]&Ds:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:o++;break e;default:this.balance[n]===o&&(o=n)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t>Us,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,o)=>{e[o]={idx:o,type:_s[t],chunk:this.source.substring(n,r),balance:this.balance[o]}})),e}},function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Xs(e.atrule),pseudo:Xs(e.pseudo),node:Xs(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Hs(e.parseContext[n])}return mn(mn({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Js,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new $s,createSingleNodeList:e=>(new $s).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let r=t.call(this,n);return i=!0,o(e,r),i=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&et.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>zs(t,e,n),cmpStr:(e,n,r)=>Es(t,e,n,r),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,js(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=_s[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),n="".concat(/[[\](){}]/.test(t)?'"'.concat(t,'"'):t," is expected"),r=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),r++,n="Name is expected");break;case 11:10===this.tokenType&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error('Identifier "'.concat(e,'" is expected')),this.next()},eatDelim(e){this.isDelim(e)||this.error('Delim "'.concat(String.fromCharCode(e),'" is expected')),this.next()},getLocation:(e,t)=>r?s.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return s.getLocationRange(null!==t?t.loc.start.offset-s.startOffset:this.tokenStart,null!==r?r.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(e,n){let r=typeof n<"u"&&n=0&&bs(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):s.getLocation(this.tokenStart);throw new Ys(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},a.setSource(t,Ws),s.setSource(t,l.offset,l.line,l.column),n=l.filename||"",r=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:Ks,i=!1,a.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),a.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),a.parseValue=!("parseValue"in l)||Boolean(l.parseValue),a.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in a.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&a.forEachToken(((e,n,r)=>{if(25===e){let e=a.getLocation(n,r),o=Es(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(o,e)}}));let d=a.context[c].call(a,l);return a.eof||a.error(),d}),{SyntaxError:Ys,config:a.config})}var ea=((e,t,n)=>(n=null!=e?Ci(Ei(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of zi(t))!Ni.call(e,o)&&o!==n&&Oi(e,o,{get:()=>t[o],enumerable:!(r=Ai(t,o))||r.enumerable});return e})(Oi(n,"default",{value:e,enumerable:!0}),e)))(Ri()),ta=new Set(["Atrule","Selector","Declaration"]);var na={};Ti(na,{safe:()=>la,spec:()=>aa});var ra=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},oa=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],ia=oa.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function sa(e){let t=new Set(e.map((([e,t])=>ra(e)<<16|ra(t))));return function(e,n,r){let o=ra(n,r),i=r.charCodeAt(0);return(45===i&&1!==n&&2!==n&&15!==n||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var aa=sa(oa),la=sa(ia);function ca(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function ua(e){Ws(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}function da(e){let t=new Map;for(let n in e.node){let r=e.node[n];"function"==typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",o=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:la,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){r+=e},result:()=>r};n&&("function"==typeof n.decorator&&(i=n.decorator(i)),n.sourceMap&&(i=function(e){let t=new ea.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&ta.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(r.line!==c||r.column!==u)&&(r.line=c,r.column=u,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&ta.has(e.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;ti.node(e),children:ca,token:(e,t)=>i.token(e,t),tokenize:ua};return i.node(e),i.result()}}var{hasOwnProperty:pa}=Object.prototype,ha=function(){};function fa(e){return"function"==typeof e?e:ha}function ma(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function ga(e,t){let n=t.structure,r=[];for(let e in n){if(!1===pa.call(n,e))continue;let t=n[e],o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?o.nullable=!0:"string"==typeof e?o.type="node":Array.isArray(e)&&(o.type="list");o.type&&r.push(o)}return r.length?{context:t.walkContext,fields:r}:null}function ba(e,t){let n=e.fields.slice(),r=e.context,o="string"==typeof r;return t&&n.reverse(),function(e,i,s,a){let l;o&&(l=i[r],i[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n)if("list"===r.type){if(t?n.reduceRight(a,!1):n.reduce(a,!1))return!0}else if(s(n))return!0}o&&(i[r]=l)}}function wa({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function ya(e){let t=function(e){let t={};for(let n in e.node)if(pa.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=ga(0,r)}return t}(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)pa.call(t,e)&&null!==t[e]&&(n[e]=ba(t[e],!1),r[e]=ba(t[e],!0));let s=wa(n),a=wa(r),l=function(e,l){function c(e,t,n){let r=u.call(f,e,t,n);return r===o||r!==i&&!!(p.hasOwnProperty(e.type)&&p[e.type](e,f,c,h)||d.call(f,e,t,n)===o)}let u=ha,d=ha,p=n,h=(e,t,n,r)=>e||c(t,n,r),f={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=fa(l.enter),d=fa(l.leave),l.reverse&&(p=r),l.visit)){if(s.hasOwnProperty(l.visit))p=l.reverse?a[l.visit]:s[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=ma(u,l.visit),d=ma(d,l.visit)}if(u===ha&&d===ha)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let n=null;return l(e,(function(e,r,i){if(t.call(this,e,r,i))return n=e,o})),n},l.findLast=function(e,t){let n=null;return l(e,{reverse:!0,enter(e,r,i){if(t.call(this,e,r,i))return n=e,o}}),n},l.findAll=function(e,t){let n=[];return l(e,(function(e,r,o){t.call(this,e,r,o)&&n.push(e)})),n},l}function va(e){return e}function ka(e,t,n,r){let o;switch(e.type){case"Group":o=function(e,t,n,r){let o=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",i=e.terms.map((e=>ka(e,t,n,r))).join(o);return e.explicit||n?(r||","===i[0]?"[":"[ ")+i+(r?"]":" ]"):i}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return ka(e.term,t,n,r)+t(function(e){let{min:t,max:n,comma:r}=e;return 0===t&&0===n?r?"#?":"*":0===t&&1===n?"?":1===t&&0===n?r?"#":"+":1===t&&1===n?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(0!==n?n:"")+"}")}(e),e);case"Type":o="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function xa(e,t){let n=va,r=!1,o=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),ka(e,n,r,o)}var Sa={offset:0,line:1,column:1};function Ca(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Oa(n):n:null}function Oa({offset:e,line:t,column:n},r){let o={offset:e,line:t,column:n};if(r){let e=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=e.length-1,o.column=1===e.length?o.column+r.length:e.pop().length+1}return o}var Aa=function(e,t){let n=Qs("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},za=function(e,t,n,r){let o=Qs("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=function(e,t){let n,r,o=e.tokens,i=e.longestMatch,s=i1?(n=Ca(a||t,"end")||Oa(Sa,d),r=Oa(n)):(n=Ca(a,"start")||Oa(Ca(t,"start")||Sa,d.slice(0,l)),r=Ca(a,"end")||Oa(n,d.substr(l,c))),{css:d,mismatchOffset:l,mismatchLength:c,start:n,end:r}}(r,n);return o.rawMessage=e,o.syntax=t?xa(t):"",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"",start:l,end:c},o},Ea=new Map,Na=new Map,Pa=function(e){if(Ea.has(e))return Ea.get(e);let t=e.toLowerCase(),n=Ea.get(t);if(void 0===n){let e=Ia(t,0),r=e?"":ja(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return Ea.set(e,n),n},Ta=function(e){if(Na.has(e))return Na.get(e);let t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");let r=Ia(t,n.length);if(!r&&(t=t.toLowerCase(),Na.has(t))){let n=Na.get(t);return Na.set(e,n),n}let o=r?"":ja(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return Na.set(e,s),s};function Ia(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function ja(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){let n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var La=["initial","inherit","unset","revert","revert-layer"],Ma=45,_a=!0;function Ra(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Fa(e,t,n){for(;null!==e&&(13===e.type||25===e.type);)e=n(++t);return t}function Da(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(43===o||o===Ma){if(n)return 0;t++}for(;t6)return 0}return r}function Ba(e,t,n){if(!e)return 0;for(;qa(n(t),63);){if(++e>6)return 0;t++}return t}var $a=["calc(","-moz-calc(","-webkit-calc("],Qa=new Map([[2,22],[21,22],[19,20],[23,24]]);function Va(e,t){return te.max&&"string"!=typeof e.max)return!0}return!1}function Ha(e){return function(t,n,r){return null===t?0:2===t.type&&Ya(t.value,$a)?function(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),0===r.length){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=Qa.get(e.type)}o++}while(e=t(o));return o}(t,n):e(t,n,r)}}function Xa(e){return function(t){return null===t||t.type!==e?0:1}}function Za(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||12!==t.type)return 0;let o=js(t.value,0);if(null!==e){let n=t.value.indexOf("\\",o),r=-1!==n&&Ja(t.value,n)?t.value.substring(o,n):t.value.substr(o);if(!1===e.has(r.toLowerCase()))return 0}return Ka(r,t.value,o)?0:1}}function el(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,n,r)}}var tl={"ident-token":Xa(1),"function-token":Xa(2),"at-keyword-token":Xa(3),"hash-token":Xa(4),"string-token":Xa(5),"bad-string-token":Xa(6),"url-token":Xa(7),"bad-url-token":Xa(8),"delim-token":Xa(9),"number-token":Xa(10),"percentage-token":Xa(11),"dimension-token":Xa(12),"whitespace-token":Xa(13),"CDO-token":Xa(14),"CDC-token":Xa(15),"colon-token":Xa(16),"semicolon-token":Xa(17),"comma-token":Xa(18),"[-token":Xa(19),"]-token":Xa(20),"(-token":Xa(21),")-token":Xa(22),"{-token":Xa(23),"}-token":Xa(24)},nl={string:Xa(5),ident:Xa(1),percentage:Ha((function(e,t,n){return null===e||11!==e.type||Ka(n,e.value,e.value.length-1)?0:1})),zero:el(),number:Ha((function(e,t,n){if(null===e)return 0;let r=js(e.value,0);return r!==e.value.length&&!Ja(e.value,r)||Ka(n,e.value,r)?0:1})),integer:Ha((function(e,t,n){if(null===e||10!==e.type)return 0;let r=43===Va(e.value,0)||45===Va(e.value,0)?1:0;for(;rsl,decibel:()=>dl,flex:()=>ul,frequency:()=>ll,length:()=>il,resolution:()=>cl,semitones:()=>pl,time:()=>al});var il=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],sl=["deg","grad","rad","turn"],al=["s","ms"],ll=["hz","khz"],cl=["dpi","dpcm","dppx","x"],ul=["fr"],dl=["db"],pl=["st"];function hl(e,t,n){return Object.assign(Qs("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((n||t.length)+1).join("-")+"^"})}Ti({},{SyntaxError:()=>hl,generate:()=>xa,parse:()=>El,walk:()=>Tl});var fl=123,ml=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),gl={" ":1,"&&":2,"||":3,"|":4};function bl(e){return e.substringToPos(e.findWsEnd(e.pos))}function wl(e){let t=e.pos;for(;t=128||0===ml[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function yl(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function vl(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function kl(e){let t=null,n=null;return e.eat(fl),t=yl(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=yl(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function xl(e,t){let n=function(e){let t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,e.charCode()===fl?t=kl(e):63===e.charCode()?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case fl:t=kl(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,35===e.charCode()&&43===e.charCodeAt(e.pos-1)?xl(e,n):n):t}function Sl(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function Cl(e){let t,n=null;return e.eat(60),t=wl(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(bl(e),n=function(e){let t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():(t=r*Number(yl(e)),0!==ml[e.charCode()]&&(t+=wl(e))),bl(e),e.eat(44),bl(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(yl(e)),0!==ml[e.charCode()]&&(n+=wl(e))),e.eat(93),{type:"Range",min:t,max:n}}(e)),e.eat(62),xl(e,{type:"Type",name:t,opts:n})}function Ol(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort(((e,t)=>gl[e]-gl[t]));t.length>0;){r=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function Al(e){let t,n=[],r={},o=null,i=e.pos;for(;t=zl(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===o||"Combinator"===o.type)&&(e.pos=i,e.error("Unexpected combinator")),r[t.value]=!0):null!==o&&"Combinator"!==o.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),o=t,i=e.pos);return null!==o&&"Combinator"===o.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:Ol(n,r)||" ",disallowEmpty:!1,explicit:!1}}function zl(e){let t=e.charCode();if(t<128&&1===ml[t])return function(e){let t=wl(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):xl(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return xl(e,function(e){let t;return e.eat(91),t=Al(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=wl(e),e.eat(39),e.eat(62),xl(e,{type:"Property",name:t})}(e):Cl(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return xl(e,{type:"String",value:vl(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:bl(e)};case 64:return t=e.nextCharCode(),t<128&&1===ml[t]?(e.pos++,{type:"AtKeyword",name:wl(e)}):Sl(e);case 42:case 43:case 63:case 35:case 33:break;case fl:if(t=e.nextCharCode(),t<48||t>57)return Sl(e);break;default:return Sl(e)}}function El(e){let t=new class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return et})}};function jl(e,t){return"string"==typeof e?function(e){let t=[];return Ws(e,((n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null}))),t}(e):t.generate(e,Il)}var Ll={type:"Match"},Ml={type:"Mismatch"},_l={type:"DisallowEmpty"};function Rl(e,t,n){return t===Ll&&n===Ml||e===Ll&&t===Ll&&n===Ll?e:("If"===e.type&&e.else===Ml&&t===Ll&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Fl(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function Dl(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&Fl(e.name)}function Ul(e,t,n){switch(e){case" ":{let e=Ll;for(let n=t.length-1;n>=0;n--){e=Rl(t[n],e,Ml)}return e}case"|":{let e=Ml,n=null;for(let r=t.length-1;r>=0;r--){let o=t[r];if(Dl(o)&&(null===n&&r>0&&Dl(t[r-1])&&(n=Object.create(null),e=Rl({type:"Enum",map:n},Ll,e)),null!==n)){let e=(Fl(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in n)){n[e]=o;continue}}n=null,e=Rl(o,Ll,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=Ml;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?Ul(e,t.filter((function(e){return e!==i})),!1):Ll,n=Rl(i,o,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?Ll:Ml;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?Ul(e,t.filter((function(e){return e!==i})),!0):Ll,r=Rl(i,o,r)}return r}}}function ql(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Ul(e.combinator,e.terms.map(ql),!1);return e.disallowEmpty&&(t=Rl(t,_l,Ml)),t}case"Multiplier":return function(e){let t=Ll,n=ql(e.term);if(0===e.max)n=Rl(n,_l,Ml),t=Rl(n,null,Ml),t.then=Rl(Ll,Ll,t),e.comma&&(t.then.else=Rl({type:"Comma",syntax:e},t,Ml));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==Ll&&(t=Rl({type:"Comma",syntax:e},t,Ml)),t=Rl(n,Rl(Ll,Ll,t),Ml);if(0===e.min)t=Rl(Ll,Ll,t);else for(let r=0;r=65&&o<=90&&(o|=32),o!==r)return!1}return!0}function Vl(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function Gl(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&"/"===e.value)}function Yl(e,t,n){let r=function(e,t,n){function r(){do{b++,g=bw&&(w=b)}function c(){y=2===y.type?y.prev:{type:3,syntax:u.syntax,token:y.token,prev:y},u=u.prev}let u=null,d=null,p=null,h=null,f=0,m=null,g=null,b=-1,w=0,y={type:0,syntax:null,token:null,prev:null};for(r();null===m&&++f<15e3;)switch(t.type){case"Match":if(null===d){if(null!==g&&(b!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=Ml;break}m=$l;break}if((t=d.nextState)===_l){if(d.matchStack===y){t=Ml;break}t=Ll}for(;d.syntaxStack!==u;)c();d=d.prev;break;case"Mismatch":if(null!==h&&!1!==h)(null===p||b>p.tokenIndex)&&(p=h,h=!1);else if(null===p){m="Mismatch";break}t=p.nextState,d=p.thenStack,u=p.syntaxStack,y=p.matchStack,b=p.tokenIndex,g=bb){for(;b":"<'"+t.name+"'>"));if(!1!==h&&null!==g&&"Type"===t.type&&("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value)){null===h&&(h=i(t,p)),t=Ml;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},y={type:2,syntax:t.syntax,token:y.token,prev:y},t=r.match;break}case"Keyword":{let e=t.name;if(null!==g){let n=g.value;if(-1!==n.indexOf("\\")&&(n=n.replace(/\\[09].*$/,"")),Ql(n,e)){l(),t=Ll;break}}t=Ml;break}case"AtKeyword":case"Function":if(null!==g&&Ql(g.value,t.name)){l(),t=Ll;break}t=Ml;break;case"Token":if(null!==g&&g.value===t.value){l(),t=Ll;break}t=Ml;break;case"Comma":null!==g&&18===g.type?Vl(y.token)?t=Ml:(l(),t=Gl(g)?Ml:Ll):t=Vl(y.token)||Gl(g)?Ll:Ml;break;case"String":let r="",f=b;for(;f"Type"===e.type&&e.name===t))}function Xl(e,t){return ec(this,e,(e=>"Property"===e.type&&e.name===t))}function Zl(e){return ec(this,e,(e=>"Keyword"===e.type))}function ec(e,t,n){let r=Kl.call(e,t);return null!==r&&r.some(n)}function tc(e){return"node"in e?e.node:tc(e.match[0])}function nc(e){return"node"in e?e.node:nc(e.match[e.match.length-1])}function rc(e,t,n,r,o){let i=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===o){let n=tc(s),r=nc(s);e.syntax.walk(t,(function(e,t,o){if(e===n){let e=new $s;do{if(e.appendData(t.data),t.data===r)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(s.match)&&s.match.forEach(n)}(n.matched),i}Ti(Jl,{getTrace:()=>Kl,isKeyword:()=>Zl,isProperty:()=>Xl,isType:()=>Hl});var{hasOwnProperty:oc}=Object.prototype;function ic(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function sc(e){return Boolean(e)&&ic(e.offset)&&ic(e.line)&&ic(e.column)}function ac(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(!1!==oc.call(n,o)){if("type"===o)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===o){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)o+=".source";else if(sc(n.loc.start)){if(sc(n.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e");else{if(!Array.isArray(r))throw new Error("Wrong value `"+r+"` in `"+e+"."+t+"` structure definition");i.push("List")}}o[t]=i.join(" | ")}return{docs:o,check:ac(e,r)}}var cc=Wl(La.join(" | "));function uc(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:xa(e[o].syntax,{compact:t}));return r}function dc(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:xa(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&uc(i.descriptors,t,n)};return r}function pc(e,t,n){return mn({matched:e,iterations:n,error:t},Jl)}function hc(e,t,n,r){let o,i=jl(n,e.syntax);return function(e){for(let t=0;t(Object.defineProperty(i,"syntax",{value:El(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Wl(i.syntax,o)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Aa("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||hc(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=Pa(t);return r.descriptors?r.descriptors[o.name]||r.descriptors[o.basename]?void 0:new Aa("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new Aa("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return pc(null,n);let r=this.getAtrule(e);return r.prelude?hc(this,r.prelude,t||"",!1):pc(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return pc(null,r);let o=this.getAtrule(e),i=Pa(t);return hc(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return"Declaration"!==e.type?pc(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Ta(e).custom)return pc(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?pc(null,n):hc(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?hc(this,n,t,!1):pc(null,new Aa("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),hc(this,e,t,!1)):pc(null,new Aa("Bad syntax"))}findValueFragments(e,t,n,r){return rc(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return rc(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e,t=!0){let n=Pa(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=Ta(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),null!==s.syntax&&Tl(s.syntax,(function(s){if("Type"!==s.type&&"Property"!==s.type)return;let a="Type"===s.type?r.types:r.properties,l="Type"===s.type?t:n;(!hasOwnProperty.call(a,s.name)||e(r,s.name,l,a[s.name]))&&i.set(o,!0)}),this)}let t=new Map,n=new Map;for(let n in this.types)e(this,n,t,this.types[n]);for(let t in this.properties)e(this,t,n,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),n=[...n.keys()].filter((e=>n.get(e))),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:uc(this.types,!t,e),properties:uc(this.properties,!t,e),atrules:dc(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function mc(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function gc(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let e of Object.keys(o))t.includes(e)&&(n[r][e]=o[e])}return n}function bc(e,t){let n=mn({},e);for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=Boolean(o);break;case"units":n[r]=mn({},e[r]);for(let[e,t]of Object.entries(o))n[r][e]=Array.isArray(t)?t:[];break;case"atrules":n[r]=mn({},e[r]);for(let[e,t]of Object.entries(o)){let o=n[r][e]||{},i=n[r][e]={prelude:o.prelude||null,descriptors:mn({},o.descriptors)};if(t){i.prelude=t.prelude?mc(i.prelude,t.prelude):i.prelude||null;for(let[e,n]of Object.entries(t.descriptors||{}))i.descriptors[e]=n?mc(i.descriptors[e],n):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":n[r]=mn({},e[r]);for(let[e,t]of Object.entries(o))n[r][e]=mc(n[r][e],t);break;case"scope":n[r]=mn({},e[r]);for(let[e,t]of Object.entries(o))n[r][e]=mn(mn({},n[r][e]),t);break;case"parseContext":n[r]=mn(mn({},e[r]),o);break;case"atrule":case"pseudo":n[r]=mn(mn({},e[r]),gc(o,["parse"]));break;case"node":n[r]=mn(mn({},e[r]),gc(o,["name","structure","parse","generate","walkContext"]))}return n}function wc(e){let t=Zs(e),n=ya(e),r=da(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof $s)&&(e.children=(new $s).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof $s&&(e.children=e.children.toArray())}}),t)}}(n),s={lexer:null,createLexer:e=>new fc(e,s,s.lexer.structure),tokenize:Ws,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let n=bc({},e);return wc("function"==typeof t?t(n,Object.assign):bc(n,t))}};return s.lexer=new fc({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var yc={};Ti(yc,{AnPlusB:()=>vc,Atrule:()=>jc,AtrulePrelude:()=>qc,AttributeSelector:()=>Gc,Block:()=>eu,Brackets:()=>uu,CDC:()=>mu,CDO:()=>vu,ClassSelector:()=>Ou,Combinator:()=>Pu,Comment:()=>Mu,Declaration:()=>Uu,DeclarationList:()=>Hu,Dimension:()=>rd,Function:()=>ld,Hash:()=>fd,IdSelector:()=>Od,Identifier:()=>vd,MediaFeature:()=>Pd,MediaQuery:()=>Md,MediaQueryList:()=>Ud,NestingSelector:()=>Qd,Nth:()=>Kd,Number:()=>tp,Operator:()=>sp,Parentheses:()=>dp,Percentage:()=>gp,PseudoClassSelector:()=>kp,PseudoElementSelector:()=>zp,Ratio:()=>jp,Raw:()=>Dp,Rule:()=>Qp,Selector:()=>Zp,SelectorList:()=>oh,String:()=>uh,StyleSheet:()=>wh,TypeSelector:()=>Oh,UnicodeRange:()=>Th,Url:()=>Uh,Value:()=>Gh,WhiteSpace:()=>Xh});var vc={};Ti(vc,{generate:()=>Ic,name:()=>Nc,parse:()=>Tc,structure:()=>Pc});var kc=43,xc=45,Sc=110,Cc=!0;function Oc(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===kc||r===xc)&&(t&&this.error("Number sign is not allowed"),n++);n0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==kc&&n!==xc&&this.error("Number sign is expected")),Ac.call(this,0!==t),t===xc?"-"+this.consume(10):this.consume(10)}var Nc="AnPlusB",Pc={a:[String,null],b:[String,null]};function Tc(){let e=this.tokenStart,t=null,n=null;if(10===this.tokenType)Ac.call(this,false),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,xc))switch(t="-1",zc.call(this,1,Sc),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ec.call(this);break;case 3:zc.call(this,2,xc),this.next(),this.skipSC(),Ac.call(this,Cc),n="-"+this.consume(10);break;default:zc.call(this,2,xc),Oc.call(this,3,Cc),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(kc)&&1===this.lookupType(1)){let r=0;switch(t="1",this.isDelim(kc)&&(r=1,this.next()),zc.call(this,0,Sc),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ec.call(this);break;case 2:zc.call(this,1,xc),this.next(),this.skipSC(),Ac.call(this,Cc),n="-"+this.consume(10);break;default:zc.call(this,1,xc),Oc.call(this,2,Cc),this.next(),n=this.substrToCursor(e+r+1)}}else if(12===this.tokenType){let r=this.charCodeAt(this.tokenStart),o=r===kc||r===xc,i=this.tokenStart+o;for(;iUc,name:()=>_c,parse:()=>Dc,structure:()=>Fc,walkContext:()=>Rc});var _c="Atrule",Rc="atrule",Fc={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Dc(e=!1){let t,n,r=this.tokenStart,o=null,i=null;switch(this.eat(3),t=this.substrToCursor(r+1),n=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),Lc):Lc.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,n)&&"function"==typeof this.atrule[n].block?this.atrule[n].block.call(this,e):this.Block(Mc.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:t,prelude:o,block:i}}function Uc(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var qc={};Ti(qc,{generate:()=>Vc,name:()=>Wc,parse:()=>Qc,structure:()=>$c,walkContext:()=>Bc});var Wc="AtrulePrelude",Bc="atrulePrelude",$c={children:[[]]};function Qc(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Vc(e){this.children(e)}var Gc={};Ti(Gc,{generate:()=>Zc,name:()=>Kc,parse:()=>Xc,structure:()=>Hc});function Yc(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Jc(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Kc="AttributeSelector",Hc={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Xc(){let e,t=this.tokenStart,n=null,r=null,o=null;return this.eat(19),this.skipSC(),e=Yc.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=Jc.call(this),this.skipSC(),r=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:o}}function Zc(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var eu={};Ti(eu,{generate:()=>cu,name:()=>iu,parse:()=>lu,structure:()=>au,walkContext:()=>su});function tu(e){return this.Raw(e,null,!0)}function nu(){return this.parseWithFallback(this.Rule,tu)}function ru(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function ou(){if(17===this.tokenType)return ru.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,ru);return 17===this.tokenType&&this.next(),e}var iu="Block",su="block",au={children:[["Atrule","Rule","Declaration"]]};function lu(e){let t=e?ou:nu,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),tu));break;default:e&&this.isDelim(38)?r.push(nu.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function cu(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var uu={};Ti(uu,{generate:()=>fu,name:()=>du,parse:()=>hu,structure:()=>pu});var du="Brackets",pu={children:[[]]};function hu(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function fu(e){this.token(9,"["),this.children(e),this.token(9,"]")}var mu={};Ti(mu,{generate:()=>yu,name:()=>gu,parse:()=>wu,structure:()=>bu});var gu="CDC",bu=[];function wu(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function yu(){this.token(15,"--\x3e")}var vu={};Ti(vu,{generate:()=>Cu,name:()=>ku,parse:()=>Su,structure:()=>xu});var ku="CDO",xu=[];function Su(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Cu(){this.token(14,"\x3c!--")}var Ou={};Ti(Ou,{generate:()=>Nu,name:()=>Au,parse:()=>Eu,structure:()=>zu});var Au="ClassSelector",zu={name:String};function Eu(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Nu(e){this.token(9,"."),this.token(1,e.name)}var Pu={};Ti(Pu,{generate:()=>Lu,name:()=>Tu,parse:()=>ju,structure:()=>Iu});var Tu="Combinator",Iu={name:String};function ju(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function Lu(e){this.tokenize(e.name)}var Mu={};Ti(Mu,{generate:()=>Du,name:()=>_u,parse:()=>Fu,structure:()=>Ru});var _u="Comment",Ru={value:String};function Fu(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Du(e){this.token(25,"/*"+e.value+"*/")}var Uu={};Ti(Uu,{generate:()=>Yu,name:()=>$u,parse:()=>Gu,structure:()=>Vu,walkContext:()=>Qu});function qu(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Wu(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Bu(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var $u="Declaration",Qu="declaration",Vu={important:[Boolean,String],property:String,value:["Value","Raw"]};function Gu(){let e,t=this.tokenStart,n=this.tokenIndex,r=Ju.call(this),o=Ia(r),i=o?this.parseCustomProperty:this.parseValue,s=o?Wu:qu,a=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(Bu,s):s.call(this,this.tokenIndex),o&&"Value"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(a=Ku.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:a,property:r,value:e}}function Yu(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Ju(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Ku(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var Hu={};Ti(Hu,{generate:()=>nd,name:()=>Zu,parse:()=>td,structure:()=>ed});function Xu(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var Zu="DeclarationList",ed={children:[["Declaration","Atrule","Rule"]]};function td(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Xu));break;default:this.isDelim(38)?e.push(this.parseWithFallback(this.Rule,Xu)):e.push(this.parseWithFallback(this.Declaration,Xu))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function nd(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var rd={};Ti(rd,{generate:()=>ad,name:()=>od,parse:()=>sd,structure:()=>id});var od="Dimension",id={value:String,unit:String};function sd(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function ad(e){this.token(12,e.value+e.unit)}var ld={};Ti(ld,{generate:()=>hd,name:()=>cd,parse:()=>pd,structure:()=>dd,walkContext:()=>ud});var cd="Function",ud="function",dd={name:String,children:[[]]};function pd(e,t){let n,r=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return n=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:o,children:n}}function hd(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var fd={};Ti(fd,{generate:()=>yd,name:()=>gd,parse:()=>wd,structure:()=>bd,xxx:()=>md});var md="XXX",gd="Hash",bd={value:String};function wd(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function yd(e){this.token(4,"#"+e.value)}var vd={};Ti(vd,{generate:()=>Cd,name:()=>kd,parse:()=>Sd,structure:()=>xd});var kd="Identifier",xd={name:String};function Sd(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Cd(e){this.token(1,e.name)}var Od={};Ti(Od,{generate:()=>Nd,name:()=>Ad,parse:()=>Ed,structure:()=>zd});var Ad="IdSelector",zd={name:String};function Ed(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Nd(e){this.token(9,"#"+e.name)}var Pd={};Ti(Pd,{generate:()=>Ld,name:()=>Td,parse:()=>jd,structure:()=>Id});var Td="MediaFeature",Id={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function jd(){let e,t=this.tokenStart,n=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:n=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:n}}function Ld(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Md={};Ti(Md,{generate:()=>Dd,name:()=>_d,parse:()=>Fd,structure:()=>Rd});var _d="MediaQuery",Rd={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Fd(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function Dd(e){this.children(e)}var Ud={};Ti(Ud,{generate:()=>$d,name:()=>qd,parse:()=>Bd,structure:()=>Wd});var qd="MediaQueryList",Wd={children:[["MediaQuery"]]};function Bd(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function $d(e){this.children(e,(()=>this.token(18,",")))}var Qd={};Ti(Qd,{generate:()=>Jd,name:()=>Vd,parse:()=>Yd,structure:()=>Gd});var Vd="NestingSelector",Gd={};function Yd(){let e=this.tokenStart;return this.eatDelim(38),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function Jd(){this.token(9,"&")}var Kd={};Ti(Kd,{generate:()=>ep,name:()=>Hd,parse:()=>Zd,structure:()=>Xd});var Hd="Nth",Xd={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Zd(){this.skipSC();let e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function ep(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var tp={};Ti(tp,{generate:()=>ip,name:()=>np,parse:()=>op,structure:()=>rp});var np="Number",rp={value:String};function op(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function ip(e){this.token(10,e.value)}var sp={};Ti(sp,{generate:()=>up,name:()=>ap,parse:()=>cp,structure:()=>lp});var ap="Operator",lp={value:String};function cp(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function up(e){this.tokenize(e.value)}var dp={};Ti(dp,{generate:()=>mp,name:()=>pp,parse:()=>fp,structure:()=>hp});var pp="Parentheses",hp={children:[[]]};function fp(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function mp(e){this.token(21,"("),this.children(e),this.token(22,")")}var gp={};Ti(gp,{generate:()=>vp,name:()=>bp,parse:()=>yp,structure:()=>wp});var bp="Percentage",wp={value:String};function yp(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function vp(e){this.token(11,e.value+"%")}var kp={};Ti(kp,{generate:()=>Ap,name:()=>xp,parse:()=>Op,structure:()=>Cp,walkContext:()=>Sp});var xp="PseudoClassSelector",Sp="function",Cp={name:String,children:[["Raw"],null]};function Op(){let e,t,n=this.tokenStart,r=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Ap(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var zp={};Ti(zp,{generate:()=>Ip,name:()=>Ep,parse:()=>Tp,structure:()=>Pp,walkContext:()=>Np});var Ep="PseudoElementSelector",Np="function",Pp={name:String,children:[["Raw"],null]};function Tp(){let e,t,n=this.tokenStart,r=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Ip(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var jp={};Ti(jp,{generate:()=>Fp,name:()=>Mp,parse:()=>Rp,structure:()=>_p});function Lp(){this.skipSC();let e=this.consume(10);for(let t=0;t0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}Ti(Dp,{generate:()=>$p,name:()=>qp,parse:()=>Bp,structure:()=>Wp});var qp="Raw",Wp={value:String};function Bp(e,t,n){let r,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>o?Up.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,r),value:this.substring(o,r)}}function $p(e){this.tokenize(e.value)}var Qp={};function Vp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Gp(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}Ti(Qp,{generate:()=>Xp,name:()=>Yp,parse:()=>Hp,structure:()=>Kp,walkContext:()=>Jp});var Yp="Rule",Jp="rule",Kp={prelude:["SelectorList","Raw"],block:["Block"]};function Hp(){let e,t,n=this.tokenIndex,r=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Gp,Vp):Vp.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.tokenStart),prelude:e,block:t}}function Xp(e){this.node(e.prelude),this.node(e.block)}var Zp={};Ti(Zp,{generate:()=>rh,name:()=>eh,parse:()=>nh,structure:()=>th});var eh="Selector",th={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function nh(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function rh(e){this.children(e)}var oh={};Ti(oh,{generate:()=>ch,name:()=>ih,parse:()=>lh,structure:()=>ah,walkContext:()=>sh});var ih="SelectorList",sh="selector",ah={children:[["Selector","Raw"]]};function lh(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function ch(e){this.children(e,(()=>this.token(18,",")))}var uh={};Ti(uh,{generate:()=>bh,name:()=>fh,parse:()=>gh,structure:()=>mh});var dh={};Ti(dh,{decode:()=>ph,encode:()=>hh});function ph(e){let t=e.length,n=e.charCodeAt(0),r=34===n||39===n?1:0,o=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let n=r;n<=o;n++){let r=e.charCodeAt(n);if(92===r){if(n===o){n!==t-1&&(i=e.substr(n+1));break}if(r=e.charCodeAt(++n),ws(92,r)){let t=n-1,r=Ts(e,t);n=r-1,i+=Ms(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else i+=e[n]}return i}function hh(e,t){let n=t?"'":'"',r=t?39:34,o="",i=!1;for(let t=0;tCh,name:()=>vh,parse:()=>Sh,structure:()=>xh,walkContext:()=>kh});function yh(e){return this.Raw(e,null,!1)}var vh="StyleSheet",kh="stylesheet",xh={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Sh(){let e,t=this.tokenStart,n=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(33!==this.charCodeAt(this.tokenStart+2)){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,yh);break;default:e=this.parseWithFallback(this.Rule,yh)}n.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:n}}function Ch(e){this.children(e)}var Oh={};Ti(Oh,{generate:()=>Ph,name:()=>zh,parse:()=>Nh,structure:()=>Eh});function Ah(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}var zh="TypeSelector",Eh={name:String};function Nh(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),Ah.call(this)):(Ah.call(this),this.isDelim(124)&&(this.next(),Ah.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Ph(e){this.tokenize(e.name)}var Th={};Ti(Th,{generate:()=>Dh,name:()=>_h,parse:()=>Fh,structure:()=>Rh});function Ih(e,t){let n=0;for(let r=this.tokenStart+e;r6&&this.error("Too many hex digits",r)}return this.next(),n}function jh(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function Lh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function Mh(){let e=0;switch(this.tokenType){case 10:if(e=Ih.call(this,1,!0),this.isDelim(63)){jh.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){Lh.call(this,45),Ih.call(this,1,!1);break}break;case 12:e=Ih.call(this,1,!0),e>0&&jh.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){e=Ih.call(this,0,!0),e>0&&jh.call(this,6-e);break}if(this.isDelim(63)){this.next(),jh.call(this,5);break}this.error("Hex digit or question mark is expected")}}var _h="UnicodeRange",Rh={value:String};function Fh(){let e=this.tokenStart;return this.eatIdent("u"),Mh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Dh(e){this.tokenize(e.value)}var Uh={};Ti(Uh,{generate:()=>Vh,name:()=>Bh,parse:()=>Qh,structure:()=>$h});Ti({},{decode:()=>qh,encode:()=>Wh});function qh(e){let t=e.length,n=4,r=41===e.charCodeAt(t-1)?t-2:t-1,o="";for(;nHh,name:()=>Yh,parse:()=>Kh,structure:()=>Jh});var Yh="Value",Jh={children:[[]]};function Kh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function Hh(e){this.children(e)}var Xh={};Ti(Xh,{generate:()=>rf,name:()=>ef,parse:()=>nf,structure:()=>tf});var Zh=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),ef="WhiteSpace",tf={value:String};function nf(){return this.eat(13),Zh}function rf(e){this.token(13,e.value)}var of=mn(mn({generic:!0},{generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","cos()":"cos( )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","exp()":"exp( )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )","hypot()":"hypot( # )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"|min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","log()":"log( , ? )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )","mod()":"mod( , )","name-repeat":"repeat( [|auto-fill] , + )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[#]?","page-selector":"+| *","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( [|none] )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )",ratio:" [/ ]?","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","reversed-counter-name":"reversed( )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( )","single-animation":"