From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- node_modules/csso/LICENSE | 20 - node_modules/csso/README.md | 422 - node_modules/csso/cjs/clean/Atrule.cjs | 73 - node_modules/csso/cjs/clean/Comment.cjs | 7 - node_modules/csso/cjs/clean/Declaration.cjs | 18 - node_modules/csso/cjs/clean/Raw.cjs | 13 - node_modules/csso/cjs/clean/Rule.cjs | 104 - node_modules/csso/cjs/clean/TypeSelector.cjs | 23 - node_modules/csso/cjs/clean/WhiteSpace.cjs | 7 - node_modules/csso/cjs/clean/index.cjs | 32 - node_modules/csso/cjs/clean/utils.cjs | 12 - node_modules/csso/cjs/compress.cjs | 200 - node_modules/csso/cjs/index.cjs | 127 - node_modules/csso/cjs/replace/Atrule.cjs | 13 - .../csso/cjs/replace/AttributeSelector.cjs | 32 - node_modules/csso/cjs/replace/Dimension.cjs | 67 - node_modules/csso/cjs/replace/Number.cjs | 45 - node_modules/csso/cjs/replace/Percentage.cjs | 41 - node_modules/csso/cjs/replace/Url.cjs | 8 - node_modules/csso/cjs/replace/Value.cjs | 29 - node_modules/csso/cjs/replace/atrule/keyframes.cjs | 25 - node_modules/csso/cjs/replace/color.cjs | 504 -- node_modules/csso/cjs/replace/index.cjs | 36 - .../csso/cjs/replace/property/background.cjs | 54 - node_modules/csso/cjs/replace/property/border.cjs | 20 - .../csso/cjs/replace/property/font-weight.cjs | 26 - node_modules/csso/cjs/replace/property/font.cjs | 34 - .../csso/cjs/restructure/1-mergeAtrule.cjs | 109 - .../csso/cjs/restructure/2-initialMergeRuleset.cjs | 51 - .../csso/cjs/restructure/3-disjoinRuleset.cjs | 46 - .../csso/cjs/restructure/4-restructShorthand.cjs | 429 - .../csso/cjs/restructure/6-restructBlock.cjs | 307 - .../csso/cjs/restructure/7-mergeRuleset.cjs | 90 - .../csso/cjs/restructure/8-restructRuleset.cjs | 175 - node_modules/csso/cjs/restructure/index.cjs | 39 - .../prepare/createDeclarationIndexer.cjs | 34 - .../csso/cjs/restructure/prepare/index.cjs | 45 - .../cjs/restructure/prepare/processSelector.cjs | 101 - .../csso/cjs/restructure/prepare/specificity.cjs | 133 - node_modules/csso/cjs/restructure/utils.cjs | 151 - node_modules/csso/cjs/syntax.cjs | 60 - node_modules/csso/cjs/usage.cjs | 75 - node_modules/csso/cjs/utils.cjs | 14 - node_modules/csso/cjs/version.cjs | 5 - node_modules/csso/dist/csso.esm.js | 16 - node_modules/csso/dist/csso.js | 16 - node_modules/csso/dist/version.cjs | 1 - node_modules/csso/dist/version.js | 1 - node_modules/csso/lib/clean/Atrule.js | 69 - node_modules/csso/lib/clean/Comment.js | 3 - node_modules/csso/lib/clean/Declaration.js | 14 - node_modules/csso/lib/clean/Raw.js | 9 - node_modules/csso/lib/clean/Rule.js | 100 - node_modules/csso/lib/clean/TypeSelector.js | 19 - node_modules/csso/lib/clean/WhiteSpace.js | 3 - node_modules/csso/lib/clean/index.js | 28 - node_modules/csso/lib/clean/utils.js | 7 - node_modules/csso/lib/compress.js | 196 - node_modules/csso/lib/index.js | 131 - node_modules/csso/lib/replace/Atrule.js | 9 - node_modules/csso/lib/replace/AttributeSelector.js | 28 - node_modules/csso/lib/replace/Dimension.js | 63 - node_modules/csso/lib/replace/Number.js | 40 - node_modules/csso/lib/replace/Percentage.js | 37 - node_modules/csso/lib/replace/Url.js | 4 - node_modules/csso/lib/replace/Value.js | 26 - node_modules/csso/lib/replace/atrule/keyframes.js | 21 - node_modules/csso/lib/replace/color.js | 498 -- node_modules/csso/lib/replace/index.js | 32 - .../csso/lib/replace/property/background.js | 50 - node_modules/csso/lib/replace/property/border.js | 16 - .../csso/lib/replace/property/font-weight.js | 22 - node_modules/csso/lib/replace/property/font.js | 30 - node_modules/csso/lib/restructure/1-mergeAtrule.js | 106 - .../csso/lib/restructure/2-initialMergeRuleset.js | 53 - .../csso/lib/restructure/3-disjoinRuleset.js | 42 - .../csso/lib/restructure/4-restructShorthand.js | 425 - .../csso/lib/restructure/6-restructBlock.js | 308 - .../csso/lib/restructure/7-mergeRuleset.js | 86 - .../csso/lib/restructure/8-restructRuleset.js | 176 - node_modules/csso/lib/restructure/index.js | 35 - .../prepare/createDeclarationIndexer.js | 31 - node_modules/csso/lib/restructure/prepare/index.js | 41 - .../lib/restructure/prepare/processSelector.js | 97 - .../csso/lib/restructure/prepare/specificity.js | 131 - node_modules/csso/lib/restructure/utils.js | 142 - node_modules/csso/lib/syntax.js | 60 - node_modules/csso/lib/usage.js | 71 - node_modules/csso/lib/utils.js | 2 - node_modules/csso/lib/version.js | 5 - node_modules/csso/node_modules/css-tree/LICENSE | 19 - node_modules/csso/node_modules/css-tree/README.md | 193 - .../node_modules/css-tree/cjs/convertor/create.cjs | 32 - .../node_modules/css-tree/cjs/convertor/index.cjs | 8 - .../csso/node_modules/css-tree/cjs/data-patch.cjs | 7 - .../csso/node_modules/css-tree/cjs/data.cjs | 97 - .../css-tree/cjs/definition-syntax/SyntaxError.cjs | 16 - .../css-tree/cjs/definition-syntax/generate.cjs | 135 - .../css-tree/cjs/definition-syntax/index.cjs | 13 - .../css-tree/cjs/definition-syntax/parse.cjs | 588 -- .../css-tree/cjs/definition-syntax/tokenizer.cjs | 56 - .../css-tree/cjs/definition-syntax/walk.cjs | 56 - .../node_modules/css-tree/cjs/generator/create.cjs | 103 - .../node_modules/css-tree/cjs/generator/index.cjs | 8 - .../css-tree/cjs/generator/sourceMap.cjs | 96 - .../css-tree/cjs/generator/token-before.cjs | 170 - .../csso/node_modules/css-tree/cjs/index.cjs | 63 - .../csso/node_modules/css-tree/cjs/lexer/Lexer.cjs | 459 - .../csso/node_modules/css-tree/cjs/lexer/error.cjs | 128 - .../css-tree/cjs/lexer/generic-an-plus-b.cjs | 235 - .../css-tree/cjs/lexer/generic-const.cjs | 12 - .../css-tree/cjs/lexer/generic-urange.cjs | 149 - .../node_modules/css-tree/cjs/lexer/generic.cjs | 573 -- .../csso/node_modules/css-tree/cjs/lexer/index.cjs | 7 - .../css-tree/cjs/lexer/match-graph.cjs | 459 - .../csso/node_modules/css-tree/cjs/lexer/match.cjs | 632 -- .../css-tree/cjs/lexer/prepare-tokens.cjs | 54 - .../node_modules/css-tree/cjs/lexer/search.cjs | 65 - .../node_modules/css-tree/cjs/lexer/structure.cjs | 168 - .../csso/node_modules/css-tree/cjs/lexer/trace.cjs | 73 - .../css-tree/cjs/parser/SyntaxError.cjs | 69 - .../node_modules/css-tree/cjs/parser/create.cjs | 336 - .../node_modules/css-tree/cjs/parser/index.cjs | 8 - .../css-tree/cjs/parser/parse-selector.cjs | 8 - .../node_modules/css-tree/cjs/parser/sequence.cjs | 47 - .../css-tree/cjs/syntax/atrule/font-face.cjs | 12 - .../css-tree/cjs/syntax/atrule/import.cjs | 37 - .../css-tree/cjs/syntax/atrule/index.cjs | 17 - .../css-tree/cjs/syntax/atrule/media.cjs | 16 - .../css-tree/cjs/syntax/atrule/page.cjs | 16 - .../css-tree/cjs/syntax/atrule/supports.cjs | 77 - .../css-tree/cjs/syntax/config/generator.cjs | 9 - .../css-tree/cjs/syntax/config/lexer.cjs | 12 - .../css-tree/cjs/syntax/config/mix.cjs | 142 - .../css-tree/cjs/syntax/config/parser-selector.cjs | 19 - .../css-tree/cjs/syntax/config/parser.cjs | 34 - .../css-tree/cjs/syntax/config/walker.cjs | 9 - .../node_modules/css-tree/cjs/syntax/create.cjs | 56 - .../css-tree/cjs/syntax/function/expression.cjs | 11 - .../css-tree/cjs/syntax/function/var.cjs | 43 - .../node_modules/css-tree/cjs/syntax/index.cjs | 14 - .../css-tree/cjs/syntax/node/AnPlusB.cjs | 293 - .../css-tree/cjs/syntax/node/Atrule.cjs | 103 - .../css-tree/cjs/syntax/node/AtrulePrelude.cjs | 52 - .../css-tree/cjs/syntax/node/AttributeSelector.cjs | 148 - .../css-tree/cjs/syntax/node/Block.cjs | 90 - .../css-tree/cjs/syntax/node/Brackets.cjs | 38 - .../node_modules/css-tree/cjs/syntax/node/CDC.cjs | 26 - .../node_modules/css-tree/cjs/syntax/node/CDO.cjs | 26 - .../css-tree/cjs/syntax/node/ClassSelector.cjs | 31 - .../css-tree/cjs/syntax/node/Combinator.cjs | 61 - .../css-tree/cjs/syntax/node/Comment.cjs | 40 - .../css-tree/cjs/syntax/node/Declaration.cjs | 166 - .../css-tree/cjs/syntax/node/DeclarationList.cjs | 50 - .../css-tree/cjs/syntax/node/Dimension.cjs | 30 - .../css-tree/cjs/syntax/node/Function.cjs | 45 - .../node_modules/css-tree/cjs/syntax/node/Hash.cjs | 30 - .../css-tree/cjs/syntax/node/IdSelector.cjs | 33 - .../css-tree/cjs/syntax/node/Identifier.cjs | 25 - .../css-tree/cjs/syntax/node/MediaFeature.cjs | 76 - .../css-tree/cjs/syntax/node/MediaQuery.cjs | 61 - .../css-tree/cjs/syntax/node/MediaQueryList.cjs | 41 - .../node_modules/css-tree/cjs/syntax/node/Nth.cjs | 54 - .../css-tree/cjs/syntax/node/Number.cjs | 25 - .../css-tree/cjs/syntax/node/Operator.cjs | 28 - .../css-tree/cjs/syntax/node/Parentheses.cjs | 38 - .../css-tree/cjs/syntax/node/Percentage.cjs | 25 - .../cjs/syntax/node/PseudoClassSelector.cjs | 65 - .../cjs/syntax/node/PseudoElementSelector.cjs | 67 - .../css-tree/cjs/syntax/node/Ratio.cjs | 67 - .../node_modules/css-tree/cjs/syntax/node/Raw.cjs | 48 - .../node_modules/css-tree/cjs/syntax/node/Rule.cjs | 58 - .../css-tree/cjs/syntax/node/Selector.cjs | 39 - .../css-tree/cjs/syntax/node/SelectorList.cjs | 43 - .../css-tree/cjs/syntax/node/String.cjs | 26 - .../css-tree/cjs/syntax/node/StyleSheet.cjs | 83 - .../css-tree/cjs/syntax/node/TypeSelector.cjs | 59 - .../css-tree/cjs/syntax/node/UnicodeRange.cjs | 158 - .../node_modules/css-tree/cjs/syntax/node/Url.cjs | 54 - .../css-tree/cjs/syntax/node/Value.cjs | 26 - .../css-tree/cjs/syntax/node/WhiteSpace.cjs | 34 - .../css-tree/cjs/syntax/node/index-generate.cjs | 85 - .../cjs/syntax/node/index-parse-selector.cjs | 35 - .../css-tree/cjs/syntax/node/index-parse.cjs | 85 - .../css-tree/cjs/syntax/node/index.cjs | 85 - .../css-tree/cjs/syntax/pseudo/index.cjs | 52 - .../css-tree/cjs/syntax/scope/atrulePrelude.cjs | 9 - .../css-tree/cjs/syntax/scope/default.cjs | 76 - .../css-tree/cjs/syntax/scope/index.cjs | 11 - .../css-tree/cjs/syntax/scope/selector.cjs | 84 - .../css-tree/cjs/syntax/scope/value.cjs | 29 - .../css-tree/cjs/tokenizer/OffsetToLocation.cjs | 91 - .../css-tree/cjs/tokenizer/TokenStream.cjs | 264 - .../css-tree/cjs/tokenizer/adopt-buffer.cjs | 13 - .../cjs/tokenizer/char-code-definitions.cjs | 231 - .../node_modules/css-tree/cjs/tokenizer/index.cjs | 554 -- .../node_modules/css-tree/cjs/tokenizer/names.cjs | 31 - .../node_modules/css-tree/cjs/tokenizer/types.cjs | 57 - .../node_modules/css-tree/cjs/tokenizer/utils.cjs | 261 - .../csso/node_modules/css-tree/cjs/utils/List.cjs | 473 - .../csso/node_modules/css-tree/cjs/utils/clone.cjs | 25 - .../css-tree/cjs/utils/create-custom-error.cjs | 18 - .../csso/node_modules/css-tree/cjs/utils/ident.cjs | 102 - .../csso/node_modules/css-tree/cjs/utils/index.cjs | 20 - .../csso/node_modules/css-tree/cjs/utils/names.cjs | 113 - .../node_modules/css-tree/cjs/utils/string.cjs | 99 - .../csso/node_modules/css-tree/cjs/utils/url.cjs | 108 - .../csso/node_modules/css-tree/cjs/version.cjs | 5 - .../node_modules/css-tree/cjs/walker/create.cjs | 291 - .../node_modules/css-tree/cjs/walker/index.cjs | 8 - .../csso/node_modules/css-tree/data/patch.json | 739 -- .../csso/node_modules/css-tree/dist/csstree.esm.js | 11 - .../csso/node_modules/css-tree/dist/csstree.js | 11 - .../csso/node_modules/css-tree/dist/data.cjs | 1028 --- .../csso/node_modules/css-tree/dist/data.js | 1028 --- .../csso/node_modules/css-tree/dist/version.cjs | 1 - .../csso/node_modules/css-tree/dist/version.js | 1 - .../node_modules/css-tree/lib/convertor/create.js | 28 - .../node_modules/css-tree/lib/convertor/index.js | 4 - .../csso/node_modules/css-tree/lib/data-patch.js | 6 - .../csso/node_modules/css-tree/lib/data.js | 95 - .../css-tree/lib/definition-syntax/SyntaxError.js | 12 - .../css-tree/lib/definition-syntax/generate.js | 131 - .../css-tree/lib/definition-syntax/index.js | 4 - .../css-tree/lib/definition-syntax/parse.js | 584 -- .../css-tree/lib/definition-syntax/tokenizer.js | 52 - .../css-tree/lib/definition-syntax/walk.js | 52 - .../node_modules/css-tree/lib/generator/create.js | 98 - .../node_modules/css-tree/lib/generator/index.js | 4 - .../css-tree/lib/generator/sourceMap.js | 92 - .../css-tree/lib/generator/token-before.js | 182 - .../csso/node_modules/css-tree/lib/index.js | 30 - .../csso/node_modules/css-tree/lib/lexer/Lexer.js | 453 - .../csso/node_modules/css-tree/lib/lexer/error.js | 123 - .../css-tree/lib/lexer/generic-an-plus-b.js | 238 - .../css-tree/lib/lexer/generic-const.js | 8 - .../css-tree/lib/lexer/generic-urange.js | 151 - .../node_modules/css-tree/lib/lexer/generic.js | 598 -- .../csso/node_modules/css-tree/lib/lexer/index.js | 1 - .../node_modules/css-tree/lib/lexer/match-graph.js | 456 - .../csso/node_modules/css-tree/lib/lexer/match.js | 630 -- .../css-tree/lib/lexer/prepare-tokens.js | 50 - .../csso/node_modules/css-tree/lib/lexer/search.js | 61 - .../node_modules/css-tree/lib/lexer/structure.js | 164 - .../csso/node_modules/css-tree/lib/lexer/trace.js | 66 - .../css-tree/lib/parser/SyntaxError.js | 65 - .../node_modules/css-tree/lib/parser/create.js | 346 - .../csso/node_modules/css-tree/lib/parser/index.js | 4 - .../css-tree/lib/parser/parse-selector.js | 4 - .../node_modules/css-tree/lib/parser/sequence.js | 43 - .../css-tree/lib/syntax/atrule/font-face.js | 8 - .../css-tree/lib/syntax/atrule/import.js | 39 - .../css-tree/lib/syntax/atrule/index.js | 13 - .../css-tree/lib/syntax/atrule/media.js | 12 - .../css-tree/lib/syntax/atrule/page.js | 12 - .../css-tree/lib/syntax/atrule/supports.js | 80 - .../css-tree/lib/syntax/config/generator.js | 5 - .../css-tree/lib/syntax/config/lexer.js | 8 - .../node_modules/css-tree/lib/syntax/config/mix.js | 138 - .../css-tree/lib/syntax/config/parser-selector.js | 15 - .../css-tree/lib/syntax/config/parser.js | 30 - .../css-tree/lib/syntax/config/walker.js | 5 - .../node_modules/css-tree/lib/syntax/create.js | 53 - .../css-tree/lib/syntax/function/expression.js | 7 - .../css-tree/lib/syntax/function/var.js | 39 - .../csso/node_modules/css-tree/lib/syntax/index.js | 10 - .../css-tree/lib/syntax/node/AnPlusB.js | 292 - .../css-tree/lib/syntax/node/Atrule.js | 100 - .../css-tree/lib/syntax/node/AtrulePrelude.js | 47 - .../css-tree/lib/syntax/node/AttributeSelector.js | 147 - .../node_modules/css-tree/lib/syntax/node/Block.js | 89 - .../css-tree/lib/syntax/node/Brackets.js | 35 - .../node_modules/css-tree/lib/syntax/node/CDC.js | 19 - .../node_modules/css-tree/lib/syntax/node/CDO.js | 19 - .../css-tree/lib/syntax/node/ClassSelector.js | 24 - .../css-tree/lib/syntax/node/Combinator.js | 54 - .../css-tree/lib/syntax/node/Comment.js | 33 - .../css-tree/lib/syntax/node/Declaration.js | 165 - .../css-tree/lib/syntax/node/DeclarationList.js | 49 - .../css-tree/lib/syntax/node/Dimension.js | 23 - .../css-tree/lib/syntax/node/Function.js | 41 - .../node_modules/css-tree/lib/syntax/node/Hash.js | 23 - .../css-tree/lib/syntax/node/IdSelector.js | 26 - .../css-tree/lib/syntax/node/Identifier.js | 18 - .../css-tree/lib/syntax/node/MediaFeature.js | 77 - .../css-tree/lib/syntax/node/MediaQuery.js | 60 - .../css-tree/lib/syntax/node/MediaQueryList.js | 34 - .../node_modules/css-tree/lib/syntax/node/Nth.js | 47 - .../css-tree/lib/syntax/node/Number.js | 18 - .../css-tree/lib/syntax/node/Operator.js | 21 - .../css-tree/lib/syntax/node/Parentheses.js | 34 - .../css-tree/lib/syntax/node/Percentage.js | 18 - .../lib/syntax/node/PseudoClassSelector.js | 63 - .../lib/syntax/node/PseudoElementSelector.js | 64 - .../node_modules/css-tree/lib/syntax/node/Ratio.js | 59 - .../node_modules/css-tree/lib/syntax/node/Raw.js | 41 - .../node_modules/css-tree/lib/syntax/node/Rule.js | 51 - .../css-tree/lib/syntax/node/Selector.js | 32 - .../css-tree/lib/syntax/node/SelectorList.js | 35 - .../css-tree/lib/syntax/node/String.js | 19 - .../css-tree/lib/syntax/node/StyleSheet.js | 82 - .../css-tree/lib/syntax/node/TypeSelector.js | 52 - .../css-tree/lib/syntax/node/UnicodeRange.js | 156 - .../node_modules/css-tree/lib/syntax/node/Url.js | 52 - .../node_modules/css-tree/lib/syntax/node/Value.js | 19 - .../css-tree/lib/syntax/node/WhiteSpace.js | 27 - .../css-tree/lib/syntax/node/index-generate.js | 40 - .../lib/syntax/node/index-parse-selector.js | 15 - .../css-tree/lib/syntax/node/index-parse.js | 40 - .../node_modules/css-tree/lib/syntax/node/index.js | 40 - .../css-tree/lib/syntax/pseudo/index.js | 48 - .../css-tree/lib/syntax/scope/atrulePrelude.js | 5 - .../css-tree/lib/syntax/scope/default.js | 85 - .../css-tree/lib/syntax/scope/index.js | 3 - .../css-tree/lib/syntax/scope/selector.js | 90 - .../css-tree/lib/syntax/scope/value.js | 25 - .../css-tree/lib/tokenizer/OffsetToLocation.js | 87 - .../css-tree/lib/tokenizer/TokenStream.js | 272 - .../css-tree/lib/tokenizer/adopt-buffer.js | 9 - .../lib/tokenizer/char-code-definitions.js | 207 - .../node_modules/css-tree/lib/tokenizer/index.js | 513 -- .../node_modules/css-tree/lib/tokenizer/names.js | 27 - .../node_modules/css-tree/lib/tokenizer/types.js | 28 - .../node_modules/css-tree/lib/tokenizer/utils.js | 254 - .../csso/node_modules/css-tree/lib/utils/List.js | 469 - .../csso/node_modules/css-tree/lib/utils/clone.js | 21 - .../css-tree/lib/utils/create-custom-error.js | 14 - .../csso/node_modules/css-tree/lib/utils/ident.js | 101 - .../csso/node_modules/css-tree/lib/utils/index.js | 6 - .../csso/node_modules/css-tree/lib/utils/names.js | 106 - .../csso/node_modules/css-tree/lib/utils/string.js | 99 - .../csso/node_modules/css-tree/lib/utils/url.js | 108 - .../csso/node_modules/css-tree/lib/version.js | 5 - .../node_modules/css-tree/lib/walker/create.js | 287 - .../csso/node_modules/css-tree/lib/walker/index.js | 4 - .../css-tree/node_modules/mdn-data/CHANGELOG.md | 50 - .../css-tree/node_modules/mdn-data/LICENSE | 116 - .../css-tree/node_modules/mdn-data/README.md | 56 - .../css-tree/node_modules/mdn-data/api/index.js | 3 - .../node_modules/mdn-data/api/inheritance.json | 2681 ------ .../mdn-data/api/inheritance.schema.json | 31 - .../node_modules/mdn-data/css/at-rules.json | 620 -- .../node_modules/mdn-data/css/at-rules.schema.json | 132 - .../node_modules/mdn-data/css/definitions.json | 78 - .../css-tree/node_modules/mdn-data/css/index.js | 8 - .../node_modules/mdn-data/css/properties.json | 9297 -------------------- .../mdn-data/css/properties.schema.json | 411 - .../css-tree/node_modules/mdn-data/css/readme.md | 32 - .../node_modules/mdn-data/css/selectors.json | 1044 --- .../mdn-data/css/selectors.schema.json | 36 - .../node_modules/mdn-data/css/syntaxes.json | 794 -- .../node_modules/mdn-data/css/syntaxes.schema.json | 15 - .../css-tree/node_modules/mdn-data/css/types.json | 265 - .../node_modules/mdn-data/css/types.schema.json | 32 - .../css-tree/node_modules/mdn-data/css/units.json | 213 - .../node_modules/mdn-data/css/units.schema.json | 28 - .../css-tree/node_modules/mdn-data/index.js | 5 - .../css-tree/node_modules/mdn-data/l10n/css.json | 1715 ---- .../css-tree/node_modules/mdn-data/l10n/index.js | 3 - .../css-tree/node_modules/mdn-data/package.json | 38 - .../css-tree/node_modules/source-map-js/LICENSE | 28 - .../css-tree/node_modules/source-map-js/README.md | 765 -- .../node_modules/source-map-js/lib/array-set.js | 121 - .../node_modules/source-map-js/lib/base64-vlq.js | 140 - .../node_modules/source-map-js/lib/base64.js | 67 - .../source-map-js/lib/binary-search.js | 111 - .../node_modules/source-map-js/lib/mapping-list.js | 79 - .../node_modules/source-map-js/lib/quick-sort.js | 132 - .../source-map-js/lib/source-map-consumer.js | 1184 --- .../source-map-js/lib/source-map-generator.js | 444 - .../node_modules/source-map-js/lib/source-node.js | 413 - .../node_modules/source-map-js/lib/util.js | 594 -- .../node_modules/source-map-js/package.json | 71 - .../node_modules/source-map-js/source-map.d.ts | 115 - .../node_modules/source-map-js/source-map.js | 8 - .../csso/node_modules/css-tree/package.json | 127 - node_modules/csso/package.json | 82 - 377 files changed, 54184 deletions(-) delete mode 100644 node_modules/csso/LICENSE delete mode 100644 node_modules/csso/README.md delete mode 100644 node_modules/csso/cjs/clean/Atrule.cjs delete mode 100644 node_modules/csso/cjs/clean/Comment.cjs delete mode 100644 node_modules/csso/cjs/clean/Declaration.cjs delete mode 100644 node_modules/csso/cjs/clean/Raw.cjs delete mode 100644 node_modules/csso/cjs/clean/Rule.cjs delete mode 100644 node_modules/csso/cjs/clean/TypeSelector.cjs delete mode 100644 node_modules/csso/cjs/clean/WhiteSpace.cjs delete mode 100644 node_modules/csso/cjs/clean/index.cjs delete mode 100644 node_modules/csso/cjs/clean/utils.cjs delete mode 100644 node_modules/csso/cjs/compress.cjs delete mode 100644 node_modules/csso/cjs/index.cjs delete mode 100644 node_modules/csso/cjs/replace/Atrule.cjs delete mode 100644 node_modules/csso/cjs/replace/AttributeSelector.cjs delete mode 100644 node_modules/csso/cjs/replace/Dimension.cjs delete mode 100644 node_modules/csso/cjs/replace/Number.cjs delete mode 100644 node_modules/csso/cjs/replace/Percentage.cjs delete mode 100644 node_modules/csso/cjs/replace/Url.cjs delete mode 100644 node_modules/csso/cjs/replace/Value.cjs delete mode 100644 node_modules/csso/cjs/replace/atrule/keyframes.cjs delete mode 100644 node_modules/csso/cjs/replace/color.cjs delete mode 100644 node_modules/csso/cjs/replace/index.cjs delete mode 100644 node_modules/csso/cjs/replace/property/background.cjs delete mode 100644 node_modules/csso/cjs/replace/property/border.cjs delete mode 100644 node_modules/csso/cjs/replace/property/font-weight.cjs delete mode 100644 node_modules/csso/cjs/replace/property/font.cjs delete mode 100644 node_modules/csso/cjs/restructure/1-mergeAtrule.cjs delete mode 100644 node_modules/csso/cjs/restructure/2-initialMergeRuleset.cjs delete mode 100644 node_modules/csso/cjs/restructure/3-disjoinRuleset.cjs delete mode 100644 node_modules/csso/cjs/restructure/4-restructShorthand.cjs delete mode 100644 node_modules/csso/cjs/restructure/6-restructBlock.cjs delete mode 100644 node_modules/csso/cjs/restructure/7-mergeRuleset.cjs delete mode 100644 node_modules/csso/cjs/restructure/8-restructRuleset.cjs delete mode 100644 node_modules/csso/cjs/restructure/index.cjs delete mode 100644 node_modules/csso/cjs/restructure/prepare/createDeclarationIndexer.cjs delete mode 100644 node_modules/csso/cjs/restructure/prepare/index.cjs delete mode 100644 node_modules/csso/cjs/restructure/prepare/processSelector.cjs delete mode 100644 node_modules/csso/cjs/restructure/prepare/specificity.cjs delete mode 100644 node_modules/csso/cjs/restructure/utils.cjs delete mode 100644 node_modules/csso/cjs/syntax.cjs delete mode 100644 node_modules/csso/cjs/usage.cjs delete mode 100644 node_modules/csso/cjs/utils.cjs delete mode 100644 node_modules/csso/cjs/version.cjs delete mode 100644 node_modules/csso/dist/csso.esm.js delete mode 100644 node_modules/csso/dist/csso.js delete mode 100644 node_modules/csso/dist/version.cjs delete mode 100644 node_modules/csso/dist/version.js delete mode 100644 node_modules/csso/lib/clean/Atrule.js delete mode 100644 node_modules/csso/lib/clean/Comment.js delete mode 100644 node_modules/csso/lib/clean/Declaration.js delete mode 100644 node_modules/csso/lib/clean/Raw.js delete mode 100644 node_modules/csso/lib/clean/Rule.js delete mode 100644 node_modules/csso/lib/clean/TypeSelector.js delete mode 100644 node_modules/csso/lib/clean/WhiteSpace.js delete mode 100644 node_modules/csso/lib/clean/index.js delete mode 100644 node_modules/csso/lib/clean/utils.js delete mode 100644 node_modules/csso/lib/compress.js delete mode 100644 node_modules/csso/lib/index.js delete mode 100644 node_modules/csso/lib/replace/Atrule.js delete mode 100644 node_modules/csso/lib/replace/AttributeSelector.js delete mode 100644 node_modules/csso/lib/replace/Dimension.js delete mode 100644 node_modules/csso/lib/replace/Number.js delete mode 100644 node_modules/csso/lib/replace/Percentage.js delete mode 100644 node_modules/csso/lib/replace/Url.js delete mode 100644 node_modules/csso/lib/replace/Value.js delete mode 100644 node_modules/csso/lib/replace/atrule/keyframes.js delete mode 100644 node_modules/csso/lib/replace/color.js delete mode 100644 node_modules/csso/lib/replace/index.js delete mode 100644 node_modules/csso/lib/replace/property/background.js delete mode 100644 node_modules/csso/lib/replace/property/border.js delete mode 100644 node_modules/csso/lib/replace/property/font-weight.js delete mode 100644 node_modules/csso/lib/replace/property/font.js delete mode 100644 node_modules/csso/lib/restructure/1-mergeAtrule.js delete mode 100644 node_modules/csso/lib/restructure/2-initialMergeRuleset.js delete mode 100644 node_modules/csso/lib/restructure/3-disjoinRuleset.js delete mode 100644 node_modules/csso/lib/restructure/4-restructShorthand.js delete mode 100644 node_modules/csso/lib/restructure/6-restructBlock.js delete mode 100644 node_modules/csso/lib/restructure/7-mergeRuleset.js delete mode 100644 node_modules/csso/lib/restructure/8-restructRuleset.js delete mode 100644 node_modules/csso/lib/restructure/index.js delete mode 100644 node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js delete mode 100644 node_modules/csso/lib/restructure/prepare/index.js delete mode 100644 node_modules/csso/lib/restructure/prepare/processSelector.js delete mode 100644 node_modules/csso/lib/restructure/prepare/specificity.js delete mode 100644 node_modules/csso/lib/restructure/utils.js delete mode 100644 node_modules/csso/lib/syntax.js delete mode 100644 node_modules/csso/lib/usage.js delete mode 100644 node_modules/csso/lib/utils.js delete mode 100644 node_modules/csso/lib/version.js delete mode 100644 node_modules/csso/node_modules/css-tree/LICENSE delete mode 100644 node_modules/csso/node_modules/css-tree/README.md delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/convertor/create.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/convertor/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/data-patch.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/data.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/SyntaxError.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/generate.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/parse.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/tokenizer.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/definition-syntax/walk.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/generator/create.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/generator/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/generator/sourceMap.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/generator/token-before.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/Lexer.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/error.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/generic-an-plus-b.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/generic-const.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/generic-urange.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/generic.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/match-graph.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/match.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/prepare-tokens.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/search.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/structure.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/lexer/trace.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/parser/SyntaxError.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/parser/create.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/parser/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/parser/parse-selector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/parser/sequence.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/font-face.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/import.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/media.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/page.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/atrule/supports.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/generator.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/lexer.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/mix.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/parser-selector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/parser.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/config/walker.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/create.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/function/expression.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/function/var.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/AnPlusB.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Atrule.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/AtrulePrelude.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/AttributeSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Block.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Brackets.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/CDC.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/CDO.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/ClassSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Combinator.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Comment.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Declaration.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/DeclarationList.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Dimension.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Function.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Hash.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/IdSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Identifier.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/MediaFeature.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/MediaQuery.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/MediaQueryList.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Nth.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Number.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Operator.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Parentheses.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Percentage.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/PseudoClassSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/PseudoElementSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Ratio.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Raw.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Rule.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Selector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/SelectorList.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/String.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/StyleSheet.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/TypeSelector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/UnicodeRange.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Url.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/Value.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/WhiteSpace.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/index-generate.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/index-parse-selector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/index-parse.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/node/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/pseudo/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/scope/atrulePrelude.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/scope/default.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/scope/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/scope/selector.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/syntax/scope/value.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/OffsetToLocation.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/TokenStream.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/adopt-buffer.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/char-code-definitions.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/names.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/types.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/tokenizer/utils.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/List.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/clone.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/create-custom-error.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/ident.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/names.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/string.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/utils/url.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/version.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/walker/create.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/cjs/walker/index.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/data/patch.json delete mode 100644 node_modules/csso/node_modules/css-tree/dist/csstree.esm.js delete mode 100644 node_modules/csso/node_modules/css-tree/dist/csstree.js delete mode 100644 node_modules/csso/node_modules/css-tree/dist/data.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/dist/data.js delete mode 100644 node_modules/csso/node_modules/css-tree/dist/version.cjs delete mode 100644 node_modules/csso/node_modules/css-tree/dist/version.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/convertor/create.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/convertor/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/data-patch.js delete mode 100755 node_modules/csso/node_modules/css-tree/lib/data.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/SyntaxError.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/generate.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/parse.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/tokenizer.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/definition-syntax/walk.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/generator/create.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/generator/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/generator/sourceMap.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/generator/token-before.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/Lexer.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/error.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/generic-an-plus-b.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/generic-const.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/generic-urange.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/generic.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/match-graph.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/match.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/prepare-tokens.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/search.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/structure.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/lexer/trace.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/parser/SyntaxError.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/parser/create.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/parser/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/parser/parse-selector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/parser/sequence.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/font-face.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/import.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/media.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/page.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/atrule/supports.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/generator.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/lexer.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/mix.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/parser-selector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/parser.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/config/walker.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/create.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/function/expression.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/function/var.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/AnPlusB.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Atrule.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/AttributeSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Block.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Brackets.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/CDC.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/CDO.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/ClassSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Comment.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Declaration.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/DeclarationList.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Dimension.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Function.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Hash.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/IdSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Identifier.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/MediaFeature.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/MediaQuery.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/MediaQueryList.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Nth.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Number.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Operator.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Parentheses.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Percentage.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Ratio.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Raw.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Rule.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Selector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/SelectorList.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/String.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/StyleSheet.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/TypeSelector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/UnicodeRange.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Url.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/Value.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/WhiteSpace.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/index-generate.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/index-parse-selector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/index-parse.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/node/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/pseudo/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/scope/default.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/scope/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/scope/selector.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/syntax/scope/value.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/OffsetToLocation.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/TokenStream.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/adopt-buffer.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/char-code-definitions.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/names.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/types.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/tokenizer/utils.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/List.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/clone.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/create-custom-error.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/ident.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/names.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/string.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/utils/url.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/version.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/walker/create.js delete mode 100644 node_modules/csso/node_modules/css-tree/lib/walker/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/CHANGELOG.md delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/LICENSE delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/README.md delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/api/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/api/inheritance.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/api/inheritance.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/at-rules.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/at-rules.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/definitions.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/properties.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/properties.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/readme.md delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/selectors.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/selectors.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/syntaxes.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/syntaxes.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/types.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/types.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/units.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/css/units.schema.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/l10n/css.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/l10n/index.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/mdn-data/package.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/LICENSE delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/README.md delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/array-set.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/base64-vlq.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/base64.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/binary-search.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/mapping-list.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/quick-sort.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/source-map-consumer.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/source-map-generator.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/source-node.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/lib/util.js delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/package.json delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/source-map.d.ts delete mode 100644 node_modules/csso/node_modules/css-tree/node_modules/source-map-js/source-map.js delete mode 100644 node_modules/csso/node_modules/css-tree/package.json delete mode 100644 node_modules/csso/package.json (limited to 'node_modules/csso') diff --git a/node_modules/csso/LICENSE b/node_modules/csso/LICENSE deleted file mode 100644 index a200643d..00000000 --- a/node_modules/csso/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2015-2021 by Roman Dvornov -Copyright (C) 2011-2015 by Sergey Kryzhanovsky - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/csso/README.md b/node_modules/csso/README.md deleted file mode 100644 index 9b746b4f..00000000 --- a/node_modules/csso/README.md +++ /dev/null @@ -1,422 +0,0 @@ -[![NPM version](https://img.shields.io/npm/v/csso.svg)](https://www.npmjs.com/package/csso) -[![Build Status](https://github.com/css/csso/actions/workflows/build.yml/badge.svg)](https://github.com/css/csso/actions/workflows/build.yml) -[![Coverage Status](https://coveralls.io/repos/github/css/csso/badge.svg?branch=master)](https://coveralls.io/github/css/csso?branch=master) -[![NPM Downloads](https://img.shields.io/npm/dm/csso.svg)](https://www.npmjs.com/package/csso) -[![Twitter](https://img.shields.io/badge/Twitter-@cssoptimizer-blue.svg)](https://twitter.com/cssoptimizer) - -CSSO (CSS Optimizer) is a CSS minifier. It performs three sort of transformations: cleaning (removing redundants), compression (replacement for the shorter forms) and restructuring (merge of declarations, rules and so on). As a result an output CSS becomes much smaller in size. - -## Install - -``` -npm install csso -``` - -## Usage - -```js -import { minify } from 'csso'; -// CommonJS is also supported -// const { minify } = require('csso'); - -const minifiedCss = minify('.test { color: #ff0000; }').css; - -console.log(minifiedCss); -// .test{color:red} -``` - -Bundles are also available for use in a browser: - -- `dist/csso.js` – minified IIFE with `csso` as global -```html - - -``` - -- `dist/csso.esm.js` – minified ES module -```html - -``` - -One of CDN services like `unpkg` or `jsDelivr` can be used. By default (for short path) a ESM version is exposing. For IIFE version a full path to a bundle should be specified: - -```html - - - - - - -``` - -CSSO is based on [CSSTree](https://github.com/csstree/csstree) to parse CSS into AST, AST traversal and to generate AST back to CSS. All `CSSTree` API is available behind `syntax` field extended with `compress()` method. You may minify CSS step by step: - -```js -import { syntax } from 'csso'; - -const ast = syntax.parse('.test { color: #ff0000; }'); -const compressedAst = syntax.compress(ast).ast; -const minifiedCss = syntax.generate(compressedAst); - -console.log(minifiedCss); -// .test{color:red} -``` - -Also syntax can be imported using `csso/syntax` entry point: - -```js -import { parse, compress, generate } from 'csso/syntax'; - -const ast = parse('.test { color: #ff0000; }'); -const compressedAst = compress(ast).ast; -const minifiedCss = generate(compressedAst); - -console.log(minifiedCss); -// .test{color:red} -``` - -> Warning: CSSO doesn't guarantee API behind a `syntax` field as well as AST format. Both might be changed with changes in CSSTree. If you rely heavily on `syntax` API, a better option might be to use CSSTree directly. - -## Related projects - -- [Web interface](http://css.github.io/csso/csso.html) -- [csso-cli](https://github.com/css/csso-cli) – command line interface -- [gulp-csso](https://github.com/ben-eb/gulp-csso) – `Gulp` plugin -- [grunt-csso](https://github.com/t32k/grunt-csso) – `Grunt` plugin -- [broccoli-csso](https://github.com/sindresorhus/broccoli-csso) – `Broccoli` plugin -- [postcss-csso](https://github.com/lahmatiy/postcss-csso) – `PostCSS` plugin -- [csso-loader](https://github.com/sandark7/csso-loader) – `webpack` loader -- [csso-webpack-plugin](https://github.com/zoobestik/csso-webpack-plugin) – `webpack` plugin -- [CSSO Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=Aneryu.csso) -- [vscode-csso](https://github.com/1000ch/vscode-csso) - Visual Studio Code plugin -- [atom-csso](https://github.com/1000ch/atom-csso) - Atom plugin -- [Sublime-csso](https://github.com/1000ch/Sublime-csso) - Sublime plugin - -## API - - - -- [minify(source[, options])](#minifysource-options) -- [minifyBlock(source[, options])](#minifyblocksource-options) -- [syntax.compress(ast[, options])](#syntaxcompressast-options) -- [Source maps](#source-maps) -- [Usage data](#usage-data) - - [White list filtering](#white-list-filtering) - - [Black list filtering](#black-list-filtering) - - [Scopes](#scopes) - - - -### minify(source[, options]) - -Minify `source` CSS passed as `String`. - -```js -const result = csso.minify('.test { color: #ff0000; }', { - restructure: false, // don't change CSS structure, i.e. don't merge declarations, rulesets etc - debug: true // show additional debug information: - // true or number from 1 to 3 (greater number - more details) -}); - -console.log(result.css); -// > .test{color:red} -``` - -Returns an object with properties: - -- css `String` – resulting CSS -- map `Object` – instance of [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) or `null` - -Options: - -- sourceMap - - Type: `Boolean` - Default: `false` - - Generate a source map when `true`. - -- filename - - Type: `String` - Default: `''` - - Filename of input CSS, uses for source map generation. - -- debug - - Type: `Boolean` - Default: `false` - - Output debug information to `stderr`. - -- beforeCompress - - Type: `function(ast, options)` or `Array` or `null` - Default: `null` - - Called right after parse is run. - -- afterCompress - - Type: `function(compressResult, options)` or `Array` or `null` - Default: `null` - - Called right after [`syntax.compress()`](#syntaxcompressast-options) is run. - -- Other options are the same as for [`syntax.compress()`](#syntaxcompressast-options) function. - -### minifyBlock(source[, options]) - -The same as `minify()` but for list of declarations. Usually it's a `style` attribute value. - -```js -const result = csso.minifyBlock('color: rgba(255, 0, 0, 1); color: #ff0000'); - -console.log(result.css); -// > color:red -``` - -### syntax.compress(ast[, options]) - -Does the main task – compress an AST. This is CSSO's extension in CSSTree syntax API. - -> NOTE: `syntax.compress()` performs AST compression by transforming input AST by default (since AST cloning is expensive and needed in rare cases). Use `clone` option with truthy value in case you want to keep input AST untouched. - -Returns an object with properties: - -- ast `Object` – resulting AST - -Options: - -- restructure - - Type: `Boolean` - Default: `true` - - Disable or enable a structure optimisations. - -- forceMediaMerge - - Type: `Boolean` - Default: `false` - - Enables merging of `@media` rules with the same media query by splitted by other rules. The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. - -- clone - - Type: `Boolean` - Default: `false` - - Transform a copy of input AST if `true`. Useful in case of AST reuse. - -- comments - - Type: `String` or `Boolean` - Default: `true` - - Specify what comments to leave: - - - `'exclamation'` or `true` – leave all exclamation comments (i.e. `/*! .. */`) - - `'first-exclamation'` – remove every comment except first one - - `false` – remove all comments - -- usage - - Type: `Object` or `null` - Default: `null` - - Usage data for advanced optimisations (see [Usage data](#usage-data) for details) - -- logger - - Type: `Function` or `null` - Default: `null` - - Function to track every step of transformation. - -### Source maps - -To get a source map set `true` for `sourceMap` option. Additianaly `filename` option can be passed to specify source file. When `sourceMap` option is `true`, `map` field of result object will contain a [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) instance. This object can be mixed with another source map or translated to string. - -```js -const csso = require('csso'); -const css = fs.readFileSync('path/to/my.css', 'utf8'); -const result = csso.minify(css, { - filename: 'path/to/my.css', // will be added to source map as reference to source file - sourceMap: true // generate source map -}); - -console.log(result); -// { css: '...minified...', map: SourceMapGenerator {} } - -console.log(result.map.toString()); -// '{ .. source map content .. }' -``` - -Example of generating source map with respect of source map from input CSS: - -```js -import { SourceMapConsumer } from 'source-map'; -import * as csso from 'csso'; - -const inputFile = 'path/to/my.css'; -const input = fs.readFileSync(inputFile, 'utf8'); -const inputMap = input.match(/\/\*# sourceMappingURL=(\S+)\s*\*\/\s*$/); -const output = csso.minify(input, { - filename: inputFile, - sourceMap: true -}); - -// apply input source map to output -if (inputMap) { - output.map.applySourceMap( - new SourceMapConsumer(inputMap[1]), - inputFile - ) -} - -// result CSS with source map -console.log( - output.css + - '/*# sourceMappingURL=data:application/json;base64,' + - Buffer.from(output.map.toString()).toString('base64') + - ' */' -); -``` - -### Usage data - -`CSSO` can use data about how `CSS` is used in a markup for better compression. File with this data (`JSON`) can be set using `usage` option. Usage data may contain following sections: - -- `blacklist` – a set of black lists (see [Black list filtering](#black-list-filtering)) -- `tags` – white list of tags -- `ids` – white list of ids -- `classes` – white list of classes -- `scopes` – groups of classes which never used with classes from other groups on the same element - -All sections are optional. Value of `tags`, `ids` and `classes` should be an array of a string, value of `scopes` should be an array of arrays of strings. Other values are ignoring. - -#### White list filtering - -`tags`, `ids` and `classes` are using on clean stage to filter selectors that contain something not in the lists. Selectors are filtering only by those kind of simple selector which white list is specified. For example, if only `tags` list is specified then type selectors are checking, and if all type selectors in selector present in list or selector has no any type selector it isn't filter. - -> `ids` and `classes` are case sensitive, `tags` – is not. - -Input CSS: - -```css -* { color: green; } -ul, ol, li { color: blue; } -UL.foo, span.bar { color: red; } -``` - -Usage data: - -```json -{ - "tags": ["ul", "LI"] -} -``` - -Resulting CSS: - -```css -*{color:green}ul,li{color:blue}ul.foo{color:red} -``` - -Filtering performs for nested selectors too. `:not()` pseudos content is ignoring since the result of matching is unpredictable. Example for the same usage data as above: - -```css -:nth-child(2n of ul, ol) { color: red } -:nth-child(3n + 1 of img) { color: yellow } -:not(div, ol, ul) { color: green } -:has(:matches(ul, ol), ul, ol) { color: blue } -``` - -Turns into: - -```css -:nth-child(2n of ul){color:red}:not(div,ol,ul){color:green}:has(:matches(ul),ul){color:blue} -``` - -#### Black list filtering - -Black list filtering performs the same as white list filtering, but filters things that mentioned in the lists. `blacklist` can contain the lists `tags`, `ids` and `classes`. - -Black list has a higher priority, so when something mentioned in the white list and in the black list then white list occurrence is ignoring. The `:not()` pseudos content ignoring as well. - -```css -* { color: green; } -ul, ol, li { color: blue; } -UL.foo, li.bar { color: red; } -``` - -Usage data: - -```json -{ - "blacklist": { - "tags": ["ul"] - }, - "tags": ["ul", "LI"] -} -``` - -Resulting CSS: - -```css -*{color:green}li{color:blue}li.bar{color:red} -``` - -#### Scopes - -Scopes is designed for CSS scope isolation solutions such as [css-modules](https://github.com/css-modules/css-modules). Scopes are similar to namespaces and define lists of class names that exclusively used on some markup. This information allows the optimizer to move rules more agressive. Since it assumes selectors from different scopes don't match for the same element. This can improve rule merging. - -Suppose we have a file: - -```css -.module1-foo { color: red; } -.module1-bar { font-size: 1.5em; background: yellow; } - -.module2-baz { color: red; } -.module2-qux { font-size: 1.5em; background: yellow; width: 50px; } -``` - -It can be assumed that first two rules are never used with the second two on the same markup. But we can't say that for sure without a markup review. The optimizer doesn't know it either and will perform safe transformations only. The result will be the same as input but with no spaces and some semicolons: - -```css -.module1-foo{color:red}.module1-bar{font-size:1.5em;background:#ff0}.module2-baz{color:red}.module2-qux{font-size:1.5em;background:#ff0;width:50px} -``` - -With usage data `CSSO` can produce better output. If follow usage data is provided: - -```json -{ - "scopes": [ - ["module1-foo", "module1-bar"], - ["module2-baz", "module2-qux"] - ] -} -``` - -The result will be (29 bytes extra saving): - -```css -.module1-foo,.module2-baz{color:red}.module1-bar,.module2-qux{font-size:1.5em;background:#ff0}.module2-qux{width:50px} -``` - -If class name isn't mentioned in the `scopes` it belongs to default scope. `scopes` data doesn't affect `classes` whitelist. If class name mentioned in `scopes` but missed in `classes` (both sections are specified) it will be filtered. - -Note that class name can't be set for several scopes. Also a selector can't have class names from different scopes. In both cases an exception will thrown. - -Currently the optimizer doesn't care about changing order safety for out-of-bounds selectors (i.e. selectors that match to elements without class name, e.g. `.scope div` or `.scope ~ :last-child`). It assumes that scoped CSS modules doesn't relay on it's order. It may be fix in future if to be an issue. diff --git a/node_modules/csso/cjs/clean/Atrule.cjs b/node_modules/csso/cjs/clean/Atrule.cjs deleted file mode 100644 index 22af87b6..00000000 --- a/node_modules/csso/cjs/clean/Atrule.cjs +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const utils = require('./utils.cjs'); - -function cleanAtrule(node, item, list) { - if (node.block) { - // otherwise removed at-rule don't prevent @import for removal - if (this.stylesheet !== null) { - this.stylesheet.firstAtrulesAllowed = false; - } - - if (utils.hasNoChildren(node.block)) { - list.remove(item); - return; - } - } - - switch (node.name) { - case 'charset': - if (utils.hasNoChildren(node.prelude)) { - list.remove(item); - return; - } - - // if there is any rule before @charset -> remove it - if (item.prev) { - list.remove(item); - return; - } - - break; - - case 'import': - if (this.stylesheet === null || !this.stylesheet.firstAtrulesAllowed) { - list.remove(item); - return; - } - - // if there are some rules that not an @import or @charset before @import - // remove it - list.prevUntil(item.prev, function(rule) { - if (rule.type === 'Atrule') { - if (rule.name === 'import' || rule.name === 'charset') { - return; - } - } - - this.root.firstAtrulesAllowed = false; - list.remove(item); - - return true; - }, this); - - break; - - default: { - const name = cssTree.keyword(node.name).basename; - - if (name === 'keyframes' || - name === 'media' || - name === 'supports') { - - // drop at-rule with no prelude - if (utils.hasNoChildren(node.prelude) || utils.hasNoChildren(node.block)) { - list.remove(item); - } - } - } - } -} - -module.exports = cleanAtrule; diff --git a/node_modules/csso/cjs/clean/Comment.cjs b/node_modules/csso/cjs/clean/Comment.cjs deleted file mode 100644 index a76253e9..00000000 --- a/node_modules/csso/cjs/clean/Comment.cjs +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -function cleanComment(data, item, list) { - list.remove(item); -} - -module.exports = cleanComment; diff --git a/node_modules/csso/cjs/clean/Declaration.cjs b/node_modules/csso/cjs/clean/Declaration.cjs deleted file mode 100644 index 92a2afbf..00000000 --- a/node_modules/csso/cjs/clean/Declaration.cjs +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -function cleanDeclartion(node, item, list) { - if (node.value.children && node.value.children.isEmpty) { - list.remove(item); - return; - } - - if (cssTree.property(node.property).custom) { - if (/\S/.test(node.value.value)) { - node.value.value = node.value.value.trim(); - } - } -} - -module.exports = cleanDeclartion; diff --git a/node_modules/csso/cjs/clean/Raw.cjs b/node_modules/csso/cjs/clean/Raw.cjs deleted file mode 100644 index 0286e198..00000000 --- a/node_modules/csso/cjs/clean/Raw.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const utils = require('./utils.cjs'); - -function cleanRaw(node, item, list) { - // raw in stylesheet or block children - if (utils.isNodeChildrenList(this.stylesheet, list) || - utils.isNodeChildrenList(this.block, list)) { - list.remove(item); - } -} - -module.exports = cleanRaw; diff --git a/node_modules/csso/cjs/clean/Rule.cjs b/node_modules/csso/cjs/clean/Rule.cjs deleted file mode 100644 index 064bc7d7..00000000 --- a/node_modules/csso/cjs/clean/Rule.cjs +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const utils = require('./utils.cjs'); - -const { hasOwnProperty } = Object.prototype; -const skipUsageFilteringAtrule = new Set(['keyframes']); - -function cleanUnused(selectorList, usageData) { - selectorList.children.forEach((selector, item, list) => { - let shouldRemove = false; - - cssTree.walk(selector, function(node) { - // ignore nodes in nested selectors - if (this.selector === null || this.selector === selectorList) { - switch (node.type) { - case 'SelectorList': - // TODO: remove toLowerCase when pseudo selectors will be normalized - // ignore selectors inside :not() - if (this.function === null || this.function.name.toLowerCase() !== 'not') { - if (cleanUnused(node, usageData)) { - shouldRemove = true; - } - } - break; - - case 'ClassSelector': - if (usageData.whitelist !== null && - usageData.whitelist.classes !== null && - !hasOwnProperty.call(usageData.whitelist.classes, node.name)) { - shouldRemove = true; - } - if (usageData.blacklist !== null && - usageData.blacklist.classes !== null && - hasOwnProperty.call(usageData.blacklist.classes, node.name)) { - shouldRemove = true; - } - break; - - case 'IdSelector': - if (usageData.whitelist !== null && - usageData.whitelist.ids !== null && - !hasOwnProperty.call(usageData.whitelist.ids, node.name)) { - shouldRemove = true; - } - if (usageData.blacklist !== null && - usageData.blacklist.ids !== null && - hasOwnProperty.call(usageData.blacklist.ids, node.name)) { - shouldRemove = true; - } - break; - - case 'TypeSelector': - // TODO: remove toLowerCase when type selectors will be normalized - // ignore universal selectors - if (node.name.charAt(node.name.length - 1) !== '*') { - if (usageData.whitelist !== null && - usageData.whitelist.tags !== null && - !hasOwnProperty.call(usageData.whitelist.tags, node.name.toLowerCase())) { - shouldRemove = true; - } - if (usageData.blacklist !== null && - usageData.blacklist.tags !== null && - hasOwnProperty.call(usageData.blacklist.tags, node.name.toLowerCase())) { - shouldRemove = true; - } - } - break; - } - } - }); - - if (shouldRemove) { - list.remove(item); - } - }); - - return selectorList.children.isEmpty; -} - -function cleanRule(node, item, list, options) { - if (utils.hasNoChildren(node.prelude) || utils.hasNoChildren(node.block)) { - list.remove(item); - return; - } - - // avoid usage filtering for some at-rules - if (this.atrule && skipUsageFilteringAtrule.has(cssTree.keyword(this.atrule.name).basename)) { - return; - } - - const { usage } = options; - - if (usage && (usage.whitelist !== null || usage.blacklist !== null)) { - cleanUnused(node.prelude, usage); - - if (utils.hasNoChildren(node.prelude)) { - list.remove(item); - return; - } - } -} - -module.exports = cleanRule; diff --git a/node_modules/csso/cjs/clean/TypeSelector.cjs b/node_modules/csso/cjs/clean/TypeSelector.cjs deleted file mode 100644 index 2c6f46a1..00000000 --- a/node_modules/csso/cjs/clean/TypeSelector.cjs +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -// remove useless universal selector -function cleanTypeSelector(node, item, list) { - const name = item.data.name; - - // check it's a non-namespaced universal selector - if (name !== '*') { - return; - } - - // remove when universal selector before other selectors - const nextType = item.next && item.next.data.type; - if (nextType === 'IdSelector' || - nextType === 'ClassSelector' || - nextType === 'AttributeSelector' || - nextType === 'PseudoClassSelector' || - nextType === 'PseudoElementSelector') { - list.remove(item); - } -} - -module.exports = cleanTypeSelector; diff --git a/node_modules/csso/cjs/clean/WhiteSpace.cjs b/node_modules/csso/cjs/clean/WhiteSpace.cjs deleted file mode 100644 index c045ed1f..00000000 --- a/node_modules/csso/cjs/clean/WhiteSpace.cjs +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -function cleanWhitespace(node, item, list) { - list.remove(item); -} - -module.exports = cleanWhitespace; diff --git a/node_modules/csso/cjs/clean/index.cjs b/node_modules/csso/cjs/clean/index.cjs deleted file mode 100644 index ba7b25a1..00000000 --- a/node_modules/csso/cjs/clean/index.cjs +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const Atrule = require('./Atrule.cjs'); -const Comment = require('./Comment.cjs'); -const Declaration = require('./Declaration.cjs'); -const Raw = require('./Raw.cjs'); -const Rule = require('./Rule.cjs'); -const TypeSelector = require('./TypeSelector.cjs'); -const WhiteSpace = require('./WhiteSpace.cjs'); - -const handlers = { - Atrule, - Comment, - Declaration, - Raw, - Rule, - TypeSelector, - WhiteSpace -}; - -function clean(ast, options) { - cssTree.walk(ast, { - leave(node, item, list) { - if (handlers.hasOwnProperty(node.type)) { - handlers[node.type].call(this, node, item, list, options); - } - } - }); -} - -module.exports = clean; diff --git a/node_modules/csso/cjs/clean/utils.cjs b/node_modules/csso/cjs/clean/utils.cjs deleted file mode 100644 index 8d3260f7..00000000 --- a/node_modules/csso/cjs/clean/utils.cjs +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -function hasNoChildren(node) { - return !node || !node.children || node.children.isEmpty; -} - -function isNodeChildrenList(node, list) { - return node !== null && node.children === list; -} - -exports.hasNoChildren = hasNoChildren; -exports.isNodeChildrenList = isNodeChildrenList; diff --git a/node_modules/csso/cjs/compress.cjs b/node_modules/csso/cjs/compress.cjs deleted file mode 100644 index 1a224e2e..00000000 --- a/node_modules/csso/cjs/compress.cjs +++ /dev/null @@ -1,200 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const usage = require('./usage.cjs'); -const index = require('./clean/index.cjs'); -const index$1 = require('./replace/index.cjs'); -const index$2 = require('./restructure/index.cjs'); - -function readChunk(input, specialComments) { - const children = new cssTree.List(); - let nonSpaceTokenInBuffer = false; - let protectedComment; - - input.nextUntil(input.head, (node, item, list) => { - if (node.type === 'Comment') { - if (!specialComments || node.value.charAt(0) !== '!') { - list.remove(item); - return; - } - - if (nonSpaceTokenInBuffer || protectedComment) { - return true; - } - - list.remove(item); - protectedComment = node; - - return; - } - - if (node.type !== 'WhiteSpace') { - nonSpaceTokenInBuffer = true; - } - - children.insert(list.remove(item)); - }); - - return { - comment: protectedComment, - stylesheet: { - type: 'StyleSheet', - loc: null, - children - } - }; -} - -function compressChunk(ast, firstAtrulesAllowed, num, options) { - options.logger(`Compress block #${num}`, null, true); - - let seed = 1; - - if (ast.type === 'StyleSheet') { - ast.firstAtrulesAllowed = firstAtrulesAllowed; - ast.id = seed++; - } - - cssTree.walk(ast, { - visit: 'Atrule', - enter(node) { - if (node.block !== null) { - node.block.id = seed++; - } - } - }); - options.logger('init', ast); - - // remove redundant - index(ast, options); - options.logger('clean', ast); - - // replace nodes for shortened forms - index$1(ast); - options.logger('replace', ast); - - // structure optimisations - if (options.restructuring) { - index$2(ast, options); - } - - return ast; -} - -function getCommentsOption(options) { - let comments = 'comments' in options ? options.comments : 'exclamation'; - - if (typeof comments === 'boolean') { - comments = comments ? 'exclamation' : false; - } else if (comments !== 'exclamation' && comments !== 'first-exclamation') { - comments = false; - } - - return comments; -} - -function getRestructureOption(options) { - if ('restructure' in options) { - return options.restructure; - } - - return 'restructuring' in options ? options.restructuring : true; -} - -function wrapBlock(block) { - return new cssTree.List().appendData({ - type: 'Rule', - loc: null, - prelude: { - type: 'SelectorList', - loc: null, - children: new cssTree.List().appendData({ - type: 'Selector', - loc: null, - children: new cssTree.List().appendData({ - type: 'TypeSelector', - loc: null, - name: 'x' - }) - }) - }, - block - }); -} - -function compress(ast, options) { - ast = ast || { type: 'StyleSheet', loc: null, children: new cssTree.List() }; - options = options || {}; - - const compressOptions = { - logger: typeof options.logger === 'function' ? options.logger : function() {}, - restructuring: getRestructureOption(options), - forceMediaMerge: Boolean(options.forceMediaMerge), - usage: options.usage ? usage.buildIndex(options.usage) : false - }; - const output = new cssTree.List(); - let specialComments = getCommentsOption(options); - let firstAtrulesAllowed = true; - let input; - let chunk; - let chunkNum = 1; - let chunkChildren; - - if (options.clone) { - ast = cssTree.clone(ast); - } - - if (ast.type === 'StyleSheet') { - input = ast.children; - ast.children = output; - } else { - input = wrapBlock(ast); - } - - do { - chunk = readChunk(input, Boolean(specialComments)); - compressChunk(chunk.stylesheet, firstAtrulesAllowed, chunkNum++, compressOptions); - chunkChildren = chunk.stylesheet.children; - - if (chunk.comment) { - // add \n before comment if there is another content in output - if (!output.isEmpty) { - output.insert(cssTree.List.createItem({ - type: 'Raw', - value: '\n' - })); - } - - output.insert(cssTree.List.createItem(chunk.comment)); - - // add \n after comment if chunk is not empty - if (!chunkChildren.isEmpty) { - output.insert(cssTree.List.createItem({ - type: 'Raw', - value: '\n' - })); - } - } - - if (firstAtrulesAllowed && !chunkChildren.isEmpty) { - const lastRule = chunkChildren.last; - - if (lastRule.type !== 'Atrule' || - (lastRule.name !== 'import' && lastRule.name !== 'charset')) { - firstAtrulesAllowed = false; - } - } - - if (specialComments !== 'exclamation') { - specialComments = false; - } - - output.appendList(chunkChildren); - } while (!input.isEmpty); - - return { - ast - }; -} - -module.exports = compress; diff --git a/node_modules/csso/cjs/index.cjs b/node_modules/csso/cjs/index.cjs deleted file mode 100644 index 5bcb9d18..00000000 --- a/node_modules/csso/cjs/index.cjs +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -const version = require('./version.cjs'); -const syntax = require('./syntax.cjs'); -const utils = require('./utils.cjs'); - -const { parse, generate, compress } = syntax; - -function debugOutput(name, options, startTime, data) { - if (options.debug) { - console.error(`## ${name} done in %d ms\n`, Date.now() - startTime); - } - - return data; -} - -function createDefaultLogger(level) { - let lastDebug; - - return function logger(title, ast) { - let line = title; - - if (ast) { - line = `[${((Date.now() - lastDebug) / 1000).toFixed(3)}s] ${line}`; - } - - if (level > 1 && ast) { - let css = generate(ast); - - // when level 2, limit css to 256 symbols - if (level === 2 && css.length > 256) { - css = css.substr(0, 256) + '...'; - } - - line += `\n ${css}\n`; - } - - console.error(line); - lastDebug = Date.now(); - }; -} - -function buildCompressOptions(options) { - options = { ...options }; - - if (typeof options.logger !== 'function' && options.debug) { - options.logger = createDefaultLogger(options.debug); - } - - return options; -} - -function runHandler(ast, options, handlers) { - if (!Array.isArray(handlers)) { - handlers = [handlers]; - } - - handlers.forEach(fn => fn(ast, options)); -} - -function minify(context, source, options) { - options = options || {}; - - const filename = options.filename || ''; - let result; - - // parse - const ast = debugOutput('parsing', options, Date.now(), - parse(source, { - context, - filename, - positions: Boolean(options.sourceMap) - }) - ); - - // before compress handlers - if (options.beforeCompress) { - debugOutput('beforeCompress', options, Date.now(), - runHandler(ast, options, options.beforeCompress) - ); - } - - // compress - const compressResult = debugOutput('compress', options, Date.now(), - compress(ast, buildCompressOptions(options)) - ); - - // after compress handlers - if (options.afterCompress) { - debugOutput('afterCompress', options, Date.now(), - runHandler(compressResult, options, options.afterCompress) - ); - } - - // generate - if (options.sourceMap) { - result = debugOutput('generate(sourceMap: true)', options, Date.now(), (() => { - const tmp = generate(compressResult.ast, { sourceMap: true }); - - tmp.map._file = filename; // since other tools can relay on file in source map transform chain - tmp.map.setSourceContent(filename, source); - - return tmp; - })()); - } else { - result = debugOutput('generate', options, Date.now(), { - css: generate(compressResult.ast), - map: null - }); - } - - return result; -} - -function minifyStylesheet(source, options) { - return minify('stylesheet', source, options); -} - -function minifyBlock(source, options) { - return minify('declarationList', source, options); -} - -exports.version = version.version; -exports.syntax = syntax; -exports.utils = utils; -exports.minify = minifyStylesheet; -exports.minifyBlock = minifyBlock; diff --git a/node_modules/csso/cjs/replace/Atrule.cjs b/node_modules/csso/cjs/replace/Atrule.cjs deleted file mode 100644 index 1843bcde..00000000 --- a/node_modules/csso/cjs/replace/Atrule.cjs +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const keyframes = require('./atrule/keyframes.cjs'); - -function Atrule(node) { - // compress @keyframe selectors - if (cssTree.keyword(node.name).basename === 'keyframes') { - keyframes(node); - } -} - -module.exports = Atrule; diff --git a/node_modules/csso/cjs/replace/AttributeSelector.cjs b/node_modules/csso/cjs/replace/AttributeSelector.cjs deleted file mode 100644 index f06724fc..00000000 --- a/node_modules/csso/cjs/replace/AttributeSelector.cjs +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// Can unquote attribute detection -// Adopted implementation of Mathias Bynens -// https://github.com/mathiasbynens/mothereff.in/blob/master/unquoted-attributes/eff.js -const blockUnquoteRx = /^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/; - -function canUnquote(value) { - if (value === '' || value === '-') { - return false; - } - - return !blockUnquoteRx.test(value); -} - -function AttributeSelector(node) { - const attrValue = node.value; - - if (!attrValue || attrValue.type !== 'String') { - return; - } - - if (canUnquote(attrValue.value)) { - node.value = { - type: 'Identifier', - loc: attrValue.loc, - name: attrValue.value - }; - } -} - -module.exports = AttributeSelector; diff --git a/node_modules/csso/cjs/replace/Dimension.cjs b/node_modules/csso/cjs/replace/Dimension.cjs deleted file mode 100644 index 20ad193c..00000000 --- a/node_modules/csso/cjs/replace/Dimension.cjs +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -const _Number = require('./Number.cjs'); - -const MATH_FUNCTIONS = new Set([ - 'calc', - 'min', - 'max', - 'clamp' -]); -const LENGTH_UNIT = new Set([ - // absolute length units - 'px', - 'mm', - 'cm', - 'in', - 'pt', - 'pc', - - // relative length units - 'em', - 'ex', - 'ch', - 'rem', - - // viewport-percentage lengths - 'vh', - 'vw', - 'vmin', - 'vmax', - 'vm' -]); - -function compressDimension(node, item) { - const value = _Number.packNumber(node.value); - - node.value = value; - - if (value === '0' && this.declaration !== null && this.atrulePrelude === null) { - const unit = node.unit.toLowerCase(); - - // only length values can be compressed - if (!LENGTH_UNIT.has(unit)) { - return; - } - - // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11 - // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11 - if (this.declaration.property === '-ms-flex' || - this.declaration.property === 'flex') { - return; - } - - // issue #222: don't remove units inside calc - if (this.function && MATH_FUNCTIONS.has(this.function.name)) { - return; - } - - item.data = { - type: 'Number', - loc: node.loc, - value - }; - } -} - -module.exports = compressDimension; diff --git a/node_modules/csso/cjs/replace/Number.cjs b/node_modules/csso/cjs/replace/Number.cjs deleted file mode 100644 index d85d6b52..00000000 --- a/node_modules/csso/cjs/replace/Number.cjs +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/; -const KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/; -const unsafeToRemovePlusSignAfter = new Set([ - 'Dimension', - 'Hash', - 'Identifier', - 'Number', - 'Raw', - 'UnicodeRange' -]); - -function packNumber(value, item) { - // omit plus sign only if no prev or prev is safe type - const regexp = item && item.prev !== null && unsafeToRemovePlusSignAfter.has(item.prev.data.type) - ? KEEP_PLUSSIGN - : OMIT_PLUSSIGN; - - // 100 -> '100' - // 00100 -> '100' - // +100 -> '100' - // -100 -> '-100' - // 0.123 -> '.123' - // 0.12300 -> '.123' - // 0.0 -> '' - // 0 -> '' - // -0 -> '-' - value = String(value).replace(regexp, '$1$2$3'); - - if (value === '' || value === '-') { - value = '0'; - } - // FIXME: is it solution simplier? - // value = String(Number(value)).replace(/^(-?)0+\./, '$1.'); - - return value; -} - -function Number(node) { - node.value = packNumber(node.value); -} - -exports.Number = Number; -exports.packNumber = packNumber; diff --git a/node_modules/csso/cjs/replace/Percentage.cjs b/node_modules/csso/cjs/replace/Percentage.cjs deleted file mode 100644 index 46829981..00000000 --- a/node_modules/csso/cjs/replace/Percentage.cjs +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const _Number = require('./Number.cjs'); - -const blacklist = new Set([ - // see https://github.com/jakubpawlowicz/clean-css/issues/957 - 'width', - 'min-width', - 'max-width', - 'height', - 'min-height', - 'max-height', - - // issue #410: Don’t remove units in flex-basis value for (-ms-)flex shorthand - // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11 - // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11 - 'flex', - '-ms-flex' -]); - -function compressPercentage(node, item) { - node.value = _Number.packNumber(node.value); - - if (node.value === '0' && this.declaration && !blacklist.has(this.declaration.property)) { - // try to convert a number - item.data = { - type: 'Number', - loc: node.loc, - value: node.value - }; - - // that's ok only when new value matches on length - if (!cssTree.lexer.matchDeclaration(this.declaration).isType(item.data, 'length')) { - // otherwise rollback changes - item.data = node; - } - } -} - -module.exports = compressPercentage; diff --git a/node_modules/csso/cjs/replace/Url.cjs b/node_modules/csso/cjs/replace/Url.cjs deleted file mode 100644 index 20734a2d..00000000 --- a/node_modules/csso/cjs/replace/Url.cjs +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -function Url(node) { - // convert `\\` to `/` - node.value = node.value.replace(/\\/g, '/'); -} - -module.exports = Url; diff --git a/node_modules/csso/cjs/replace/Value.cjs b/node_modules/csso/cjs/replace/Value.cjs deleted file mode 100644 index 8979bdc0..00000000 --- a/node_modules/csso/cjs/replace/Value.cjs +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const font = require('./property/font.cjs'); -const fontWeight = require('./property/font-weight.cjs'); -const background = require('./property/background.cjs'); -const border = require('./property/border.cjs'); - -const handlers = { - 'font': font, - 'font-weight': fontWeight, - 'background': background, - 'border': border, - 'outline': border -}; - -function compressValue(node) { - if (!this.declaration) { - return; - } - - const property = cssTree.property(this.declaration.property); - - if (handlers.hasOwnProperty(property.basename)) { - handlers[property.basename](node); - } -} - -module.exports = compressValue; diff --git a/node_modules/csso/cjs/replace/atrule/keyframes.cjs b/node_modules/csso/cjs/replace/atrule/keyframes.cjs deleted file mode 100644 index d5181a7d..00000000 --- a/node_modules/csso/cjs/replace/atrule/keyframes.cjs +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -function compressKeyframes(node) { - node.block.children.forEach((rule) => { - rule.prelude.children.forEach((simpleselector) => { - simpleselector.children.forEach((data, item) => { - if (data.type === 'Percentage' && data.value === '100') { - item.data = { - type: 'TypeSelector', - loc: data.loc, - name: 'to' - }; - } else if (data.type === 'TypeSelector' && data.name === 'from') { - item.data = { - type: 'Percentage', - loc: data.loc, - value: '0' - }; - } - }); - }); - }); -} - -module.exports = compressKeyframes; diff --git a/node_modules/csso/cjs/replace/color.cjs b/node_modules/csso/cjs/replace/color.cjs deleted file mode 100644 index 94978cbd..00000000 --- a/node_modules/csso/cjs/replace/color.cjs +++ /dev/null @@ -1,504 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const _Number = require('./Number.cjs'); - -// http://www.w3.org/TR/css3-color/#svg-color -const NAME_TO_HEX = { - 'aliceblue': 'f0f8ff', - 'antiquewhite': 'faebd7', - 'aqua': '0ff', - 'aquamarine': '7fffd4', - 'azure': 'f0ffff', - 'beige': 'f5f5dc', - 'bisque': 'ffe4c4', - 'black': '000', - 'blanchedalmond': 'ffebcd', - 'blue': '00f', - 'blueviolet': '8a2be2', - 'brown': 'a52a2a', - 'burlywood': 'deb887', - 'cadetblue': '5f9ea0', - 'chartreuse': '7fff00', - 'chocolate': 'd2691e', - 'coral': 'ff7f50', - 'cornflowerblue': '6495ed', - 'cornsilk': 'fff8dc', - 'crimson': 'dc143c', - 'cyan': '0ff', - 'darkblue': '00008b', - 'darkcyan': '008b8b', - 'darkgoldenrod': 'b8860b', - 'darkgray': 'a9a9a9', - 'darkgrey': 'a9a9a9', - 'darkgreen': '006400', - 'darkkhaki': 'bdb76b', - 'darkmagenta': '8b008b', - 'darkolivegreen': '556b2f', - 'darkorange': 'ff8c00', - 'darkorchid': '9932cc', - 'darkred': '8b0000', - 'darksalmon': 'e9967a', - 'darkseagreen': '8fbc8f', - 'darkslateblue': '483d8b', - 'darkslategray': '2f4f4f', - 'darkslategrey': '2f4f4f', - 'darkturquoise': '00ced1', - 'darkviolet': '9400d3', - 'deeppink': 'ff1493', - 'deepskyblue': '00bfff', - 'dimgray': '696969', - 'dimgrey': '696969', - 'dodgerblue': '1e90ff', - 'firebrick': 'b22222', - 'floralwhite': 'fffaf0', - 'forestgreen': '228b22', - 'fuchsia': 'f0f', - 'gainsboro': 'dcdcdc', - 'ghostwhite': 'f8f8ff', - 'gold': 'ffd700', - 'goldenrod': 'daa520', - 'gray': '808080', - 'grey': '808080', - 'green': '008000', - 'greenyellow': 'adff2f', - 'honeydew': 'f0fff0', - 'hotpink': 'ff69b4', - 'indianred': 'cd5c5c', - 'indigo': '4b0082', - 'ivory': 'fffff0', - 'khaki': 'f0e68c', - 'lavender': 'e6e6fa', - 'lavenderblush': 'fff0f5', - 'lawngreen': '7cfc00', - 'lemonchiffon': 'fffacd', - 'lightblue': 'add8e6', - 'lightcoral': 'f08080', - 'lightcyan': 'e0ffff', - 'lightgoldenrodyellow': 'fafad2', - 'lightgray': 'd3d3d3', - 'lightgrey': 'd3d3d3', - 'lightgreen': '90ee90', - 'lightpink': 'ffb6c1', - 'lightsalmon': 'ffa07a', - 'lightseagreen': '20b2aa', - 'lightskyblue': '87cefa', - 'lightslategray': '789', - 'lightslategrey': '789', - 'lightsteelblue': 'b0c4de', - 'lightyellow': 'ffffe0', - 'lime': '0f0', - 'limegreen': '32cd32', - 'linen': 'faf0e6', - 'magenta': 'f0f', - 'maroon': '800000', - 'mediumaquamarine': '66cdaa', - 'mediumblue': '0000cd', - 'mediumorchid': 'ba55d3', - 'mediumpurple': '9370db', - 'mediumseagreen': '3cb371', - 'mediumslateblue': '7b68ee', - 'mediumspringgreen': '00fa9a', - 'mediumturquoise': '48d1cc', - 'mediumvioletred': 'c71585', - 'midnightblue': '191970', - 'mintcream': 'f5fffa', - 'mistyrose': 'ffe4e1', - 'moccasin': 'ffe4b5', - 'navajowhite': 'ffdead', - 'navy': '000080', - 'oldlace': 'fdf5e6', - 'olive': '808000', - 'olivedrab': '6b8e23', - 'orange': 'ffa500', - 'orangered': 'ff4500', - 'orchid': 'da70d6', - 'palegoldenrod': 'eee8aa', - 'palegreen': '98fb98', - 'paleturquoise': 'afeeee', - 'palevioletred': 'db7093', - 'papayawhip': 'ffefd5', - 'peachpuff': 'ffdab9', - 'peru': 'cd853f', - 'pink': 'ffc0cb', - 'plum': 'dda0dd', - 'powderblue': 'b0e0e6', - 'purple': '800080', - 'rebeccapurple': '639', - 'red': 'f00', - 'rosybrown': 'bc8f8f', - 'royalblue': '4169e1', - 'saddlebrown': '8b4513', - 'salmon': 'fa8072', - 'sandybrown': 'f4a460', - 'seagreen': '2e8b57', - 'seashell': 'fff5ee', - 'sienna': 'a0522d', - 'silver': 'c0c0c0', - 'skyblue': '87ceeb', - 'slateblue': '6a5acd', - 'slategray': '708090', - 'slategrey': '708090', - 'snow': 'fffafa', - 'springgreen': '00ff7f', - 'steelblue': '4682b4', - 'tan': 'd2b48c', - 'teal': '008080', - 'thistle': 'd8bfd8', - 'tomato': 'ff6347', - 'turquoise': '40e0d0', - 'violet': 'ee82ee', - 'wheat': 'f5deb3', - 'white': 'fff', - 'whitesmoke': 'f5f5f5', - 'yellow': 'ff0', - 'yellowgreen': '9acd32' -}; - -const HEX_TO_NAME = { - '800000': 'maroon', - '800080': 'purple', - '808000': 'olive', - '808080': 'gray', - '00ffff': 'cyan', - 'f0ffff': 'azure', - 'f5f5dc': 'beige', - 'ffe4c4': 'bisque', - '000000': 'black', - '0000ff': 'blue', - 'a52a2a': 'brown', - 'ff7f50': 'coral', - 'ffd700': 'gold', - '008000': 'green', - '4b0082': 'indigo', - 'fffff0': 'ivory', - 'f0e68c': 'khaki', - '00ff00': 'lime', - 'faf0e6': 'linen', - '000080': 'navy', - 'ffa500': 'orange', - 'da70d6': 'orchid', - 'cd853f': 'peru', - 'ffc0cb': 'pink', - 'dda0dd': 'plum', - 'f00': 'red', - 'ff0000': 'red', - 'fa8072': 'salmon', - 'a0522d': 'sienna', - 'c0c0c0': 'silver', - 'fffafa': 'snow', - 'd2b48c': 'tan', - '008080': 'teal', - 'ff6347': 'tomato', - 'ee82ee': 'violet', - 'f5deb3': 'wheat', - 'ffffff': 'white', - 'ffff00': 'yellow' -}; - -function hueToRgb(p, q, t) { - if (t < 0) { - t += 1; - } - if (t > 1) { - t -= 1; - } - if (t < 1 / 6) { - return p + (q - p) * 6 * t; - } - if (t < 1 / 2) { - return q; - } - if (t < 2 / 3) { - return p + (q - p) * (2 / 3 - t) * 6; - } - return p; -} - -function hslToRgb(h, s, l, a) { - let r; - let g; - let b; - - if (s === 0) { - r = g = b = l; // achromatic - } else { - const q = l < 0.5 ? l * (1 + s) : l + s - l * s; - const p = 2 * l - q; - - r = hueToRgb(p, q, h + 1 / 3); - g = hueToRgb(p, q, h); - b = hueToRgb(p, q, h - 1 / 3); - } - - return [ - Math.round(r * 255), - Math.round(g * 255), - Math.round(b * 255), - a - ]; -} - -function toHex(value) { - value = value.toString(16); - - return value.length === 1 ? '0' + value : value; -} - -function parseFunctionArgs(functionArgs, count, rgb) { - let cursor = functionArgs.head; - let args = []; - let wasValue = false; - - while (cursor !== null) { - const { type, value } = cursor.data; - - switch (type) { - case 'Number': - case 'Percentage': - if (wasValue) { - return; - } - - wasValue = true; - args.push({ - type, - value: Number(value) - }); - - break; - - case 'Operator': - if (value === ',') { - if (!wasValue) { - return; - } - wasValue = false; - } else if (wasValue || value !== '+') { - return; - } - - break; - - default: - // something we couldn't understand - return; - } - - cursor = cursor.next; - } - - if (args.length !== count) { - // invalid arguments count - // TODO: remove those tokens - return; - } - - if (args.length === 4) { - if (args[3].type !== 'Number') { - // 4th argument should be a number - // TODO: remove those tokens - return; - } - - args[3].type = 'Alpha'; - } - - if (rgb) { - if (args[0].type !== args[1].type || args[0].type !== args[2].type) { - // invalid color, numbers and percentage shouldn't be mixed - // TODO: remove those tokens - return; - } - } else { - if (args[0].type !== 'Number' || - args[1].type !== 'Percentage' || - args[2].type !== 'Percentage') { - // invalid color, for hsl values should be: number, percentage, percentage - // TODO: remove those tokens - return; - } - - args[0].type = 'Angle'; - } - - return args.map(function(arg) { - let value = Math.max(0, arg.value); - - switch (arg.type) { - case 'Number': - // fit value to [0..255] range - value = Math.min(value, 255); - break; - - case 'Percentage': - // convert 0..100% to value in [0..255] range - value = Math.min(value, 100) / 100; - - if (!rgb) { - return value; - } - - value = 255 * value; - break; - - case 'Angle': - // fit value to (-360..360) range - return (((value % 360) + 360) % 360) / 360; - - case 'Alpha': - // fit value to [0..1] range - return Math.min(value, 1); - } - - return Math.round(value); - }); -} - -function compressFunction(node, item) { - let functionName = node.name; - let args; - - if (functionName === 'rgba' || functionName === 'hsla') { - args = parseFunctionArgs(node.children, 4, functionName === 'rgba'); - - if (!args) { - // something went wrong - return; - } - - if (functionName === 'hsla') { - args = hslToRgb(...args); - node.name = 'rgba'; - } - - if (args[3] === 0) { - // try to replace `rgba(x, x, x, 0)` to `transparent` - // always replace `rgba(0, 0, 0, 0)` to `transparent` - // otherwise avoid replacement in gradients since it may break color transition - // http://stackoverflow.com/questions/11829410/css3-gradient-rendering-issues-from-transparent-to-white - const scopeFunctionName = this.function && this.function.name; - - if ((args[0] === 0 && args[1] === 0 && args[2] === 0) || - !/^(?:to|from|color-stop)$|gradient$/i.test(scopeFunctionName)) { - - item.data = { - type: 'Identifier', - loc: node.loc, - name: 'transparent' - }; - - return; - } - } - - if (args[3] !== 1) { - // replace argument values for normalized/interpolated - node.children.forEach((node, item, list) => { - if (node.type === 'Operator') { - if (node.value !== ',') { - list.remove(item); - } - return; - } - - item.data = { - type: 'Number', - loc: node.loc, - value: _Number.packNumber(args.shift()) - }; - }); - - return; - } - - // otherwise convert to rgb, i.e. rgba(255, 0, 0, 1) -> rgb(255, 0, 0) - functionName = 'rgb'; - } - - if (functionName === 'hsl') { - args = args || parseFunctionArgs(node.children, 3, false); - - if (!args) { - // something went wrong - return; - } - - // convert to rgb - args = hslToRgb(...args); - functionName = 'rgb'; - } - - if (functionName === 'rgb') { - args = args || parseFunctionArgs(node.children, 3, true); - - if (!args) { - // something went wrong - return; - } - - item.data = { - type: 'Hash', - loc: node.loc, - value: toHex(args[0]) + toHex(args[1]) + toHex(args[2]) - }; - - compressHex(item.data, item); - } -} - -function compressIdent(node, item) { - if (this.declaration === null) { - return; - } - - let color = node.name.toLowerCase(); - - if (NAME_TO_HEX.hasOwnProperty(color) && - cssTree.lexer.matchDeclaration(this.declaration).isType(node, 'color')) { - const hex = NAME_TO_HEX[color]; - - if (hex.length + 1 <= color.length) { - // replace for shorter hex value - item.data = { - type: 'Hash', - loc: node.loc, - value: hex - }; - } else { - // special case for consistent colors - if (color === 'grey') { - color = 'gray'; - } - - // just replace value for lower cased name - node.name = color; - } - } -} - -function compressHex(node, item) { - let color = node.value.toLowerCase(); - - // #112233 -> #123 - if (color.length === 6 && - color[0] === color[1] && - color[2] === color[3] && - color[4] === color[5]) { - color = color[0] + color[2] + color[4]; - } - - if (HEX_TO_NAME[color]) { - item.data = { - type: 'Identifier', - loc: node.loc, - name: HEX_TO_NAME[color] - }; - } else { - node.value = color; - } -} - -exports.compressFunction = compressFunction; -exports.compressHex = compressHex; -exports.compressIdent = compressIdent; diff --git a/node_modules/csso/cjs/replace/index.cjs b/node_modules/csso/cjs/replace/index.cjs deleted file mode 100644 index 59bdf476..00000000 --- a/node_modules/csso/cjs/replace/index.cjs +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const Atrule = require('./Atrule.cjs'); -const AttributeSelector = require('./AttributeSelector.cjs'); -const Value = require('./Value.cjs'); -const Dimension = require('./Dimension.cjs'); -const Percentage = require('./Percentage.cjs'); -const _Number = require('./Number.cjs'); -const Url = require('./Url.cjs'); -const color = require('./color.cjs'); - -const handlers = { - Atrule, - AttributeSelector, - Value, - Dimension, - Percentage, - Number: _Number.Number, - Url, - Hash: color.compressHex, - Identifier: color.compressIdent, - Function: color.compressFunction -}; - -function replace(ast) { - cssTree.walk(ast, { - leave(node, item, list) { - if (handlers.hasOwnProperty(node.type)) { - handlers[node.type].call(this, node, item, list); - } - } - }); -} - -module.exports = replace; diff --git a/node_modules/csso/cjs/replace/property/background.cjs b/node_modules/csso/cjs/replace/property/background.cjs deleted file mode 100644 index fd407809..00000000 --- a/node_modules/csso/cjs/replace/property/background.cjs +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -function compressBackground(node) { - function flush() { - if (!buffer.length) { - buffer.unshift( - { - type: 'Number', - loc: null, - value: '0' - }, - { - type: 'Number', - loc: null, - value: '0' - } - ); - } - - newValue.push.apply(newValue, buffer); - - buffer = []; - } - - let newValue = []; - let buffer = []; - - node.children.forEach((node) => { - if (node.type === 'Operator' && node.value === ',') { - flush(); - newValue.push(node); - return; - } - - // remove defaults - if (node.type === 'Identifier') { - if (node.name === 'transparent' || - node.name === 'none' || - node.name === 'repeat' || - node.name === 'scroll') { - return; - } - } - - buffer.push(node); - }); - - flush(); - node.children = new cssTree.List().fromArray(newValue); -} - -module.exports = compressBackground; diff --git a/node_modules/csso/cjs/replace/property/border.cjs b/node_modules/csso/cjs/replace/property/border.cjs deleted file mode 100644 index 4fc505f7..00000000 --- a/node_modules/csso/cjs/replace/property/border.cjs +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function compressBorder(node) { - node.children.forEach((node, item, list) => { - if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') { - if (list.head === list.tail) { - // replace `none` for zero when `none` is a single term - item.data = { - type: 'Number', - loc: node.loc, - value: '0' - }; - } else { - list.remove(item); - } - } - }); -} - -module.exports = compressBorder; diff --git a/node_modules/csso/cjs/replace/property/font-weight.cjs b/node_modules/csso/cjs/replace/property/font-weight.cjs deleted file mode 100644 index 0824f1dd..00000000 --- a/node_modules/csso/cjs/replace/property/font-weight.cjs +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -function compressFontWeight(node) { - const value = node.children.head.data; - - if (value.type === 'Identifier') { - switch (value.name) { - case 'normal': - node.children.head.data = { - type: 'Number', - loc: value.loc, - value: '400' - }; - break; - case 'bold': - node.children.head.data = { - type: 'Number', - loc: value.loc, - value: '700' - }; - break; - } - } -} - -module.exports = compressFontWeight; diff --git a/node_modules/csso/cjs/replace/property/font.cjs b/node_modules/csso/cjs/replace/property/font.cjs deleted file mode 100644 index a23cf363..00000000 --- a/node_modules/csso/cjs/replace/property/font.cjs +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -function compressFont(node) { - const list = node.children; - - list.forEachRight(function(node, item) { - if (node.type === 'Identifier') { - if (node.name === 'bold') { - item.data = { - type: 'Number', - loc: node.loc, - value: '700' - }; - } else if (node.name === 'normal') { - const prev = item.prev; - - if (prev && prev.data.type === 'Operator' && prev.data.value === '/') { - this.remove(prev); - } - - this.remove(item); - } - } - }); - - if (list.isEmpty) { - list.insert(list.createItem({ - type: 'Identifier', - name: 'normal' - })); - } -} - -module.exports = compressFont; diff --git a/node_modules/csso/cjs/restructure/1-mergeAtrule.cjs b/node_modules/csso/cjs/restructure/1-mergeAtrule.cjs deleted file mode 100644 index 308587a0..00000000 --- a/node_modules/csso/cjs/restructure/1-mergeAtrule.cjs +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -const { hasOwnProperty } = Object.prototype; - -function addRuleToMap(map, item, list, single) { - const node = item.data; - const name = cssTree.keyword(node.name).basename; - const id = node.name.toLowerCase() + '/' + (node.prelude ? node.prelude.id : null); - - if (!hasOwnProperty.call(map, name)) { - map[name] = Object.create(null); - } - - if (single) { - delete map[name][id]; - } - - if (!hasOwnProperty.call(map[name], id)) { - map[name][id] = new cssTree.List(); - } - - map[name][id].append(list.remove(item)); -} - -function relocateAtrules(ast, options) { - const collected = Object.create(null); - let topInjectPoint = null; - - ast.children.forEach(function(node, item, list) { - if (node.type === 'Atrule') { - const name = cssTree.keyword(node.name).basename; - - switch (name) { - case 'keyframes': - addRuleToMap(collected, item, list, true); - return; - - case 'media': - if (options.forceMediaMerge) { - addRuleToMap(collected, item, list, false); - return; - } - break; - } - - if (topInjectPoint === null && - name !== 'charset' && - name !== 'import') { - topInjectPoint = item; - } - } else { - if (topInjectPoint === null) { - topInjectPoint = item; - } - } - }); - - for (const atrule in collected) { - for (const id in collected[atrule]) { - ast.children.insertList( - collected[atrule][id], - atrule === 'media' ? null : topInjectPoint - ); - } - } -} -function isMediaRule(node) { - return node.type === 'Atrule' && node.name === 'media'; -} - -function processAtrule(node, item, list) { - if (!isMediaRule(node)) { - return; - } - - const prev = item.prev && item.prev.data; - - if (!prev || !isMediaRule(prev)) { - return; - } - - // merge @media with same query - if (node.prelude && - prev.prelude && - node.prelude.id === prev.prelude.id) { - prev.block.children.appendList(node.block.children); - list.remove(item); - - // TODO: use it when we can refer to several points in source - // prev.loc = { - // primary: prev.loc, - // merged: node.loc - // }; - } -} - -function rejoinAtrule(ast, options) { - relocateAtrules(ast, options); - - cssTree.walk(ast, { - visit: 'Atrule', - reverse: true, - enter: processAtrule - }); -} - -module.exports = rejoinAtrule; diff --git a/node_modules/csso/cjs/restructure/2-initialMergeRuleset.cjs b/node_modules/csso/cjs/restructure/2-initialMergeRuleset.cjs deleted file mode 100644 index 1a1f90ce..00000000 --- a/node_modules/csso/cjs/restructure/2-initialMergeRuleset.cjs +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const utils = require('./utils.cjs'); - -function processRule(node, item, list) { - const selectors = node.prelude.children; - const declarations = node.block.children; - - list.prevUntil(item.prev, function(prev) { - // skip non-ruleset node if safe - if (prev.type !== 'Rule') { - return utils.unsafeToSkipNode.call(selectors, prev); - } - - const prevSelectors = prev.prelude.children; - const prevDeclarations = prev.block.children; - - // try to join rulesets with equal pseudo signature - if (node.pseudoSignature === prev.pseudoSignature) { - // try to join by selectors - if (utils.isEqualSelectors(prevSelectors, selectors)) { - prevDeclarations.appendList(declarations); - list.remove(item); - return true; - } - - // try to join by declarations - if (utils.isEqualDeclarations(declarations, prevDeclarations)) { - utils.addSelectors(prevSelectors, selectors); - list.remove(item); - return true; - } - } - - // go to prev ruleset if has no selector similarities - return utils.hasSimilarSelectors(selectors, prevSelectors); - }); -} - -// NOTE: direction should be left to right, since rulesets merge to left -// ruleset. When direction right to left unmerged rulesets may prevent lookup -// TODO: remove initial merge -function initialMergeRule(ast) { - cssTree.walk(ast, { - visit: 'Rule', - enter: processRule - }); -} - -module.exports = initialMergeRule; diff --git a/node_modules/csso/cjs/restructure/3-disjoinRuleset.cjs b/node_modules/csso/cjs/restructure/3-disjoinRuleset.cjs deleted file mode 100644 index bf1d627d..00000000 --- a/node_modules/csso/cjs/restructure/3-disjoinRuleset.cjs +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -function processRule(node, item, list) { - const selectors = node.prelude.children; - - // generate new rule sets: - // .a, .b { color: red; } - // -> - // .a { color: red; } - // .b { color: red; } - - // while there are more than 1 simple selector split for rulesets - while (selectors.head !== selectors.tail) { - const newSelectors = new cssTree.List(); - - newSelectors.insert(selectors.remove(selectors.head)); - - list.insert(list.createItem({ - type: 'Rule', - loc: node.loc, - prelude: { - type: 'SelectorList', - loc: node.prelude.loc, - children: newSelectors - }, - block: { - type: 'Block', - loc: node.block.loc, - children: node.block.children.copy() - }, - pseudoSignature: node.pseudoSignature - }), item); - } -} - -function disjoinRule(ast) { - cssTree.walk(ast, { - visit: 'Rule', - reverse: true, - enter: processRule - }); -} - -module.exports = disjoinRule; diff --git a/node_modules/csso/cjs/restructure/4-restructShorthand.cjs b/node_modules/csso/cjs/restructure/4-restructShorthand.cjs deleted file mode 100644 index a2acfa2b..00000000 --- a/node_modules/csso/cjs/restructure/4-restructShorthand.cjs +++ /dev/null @@ -1,429 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -const REPLACE = 1; -const REMOVE = 2; -const TOP = 0; -const RIGHT = 1; -const BOTTOM = 2; -const LEFT = 3; -const SIDES = ['top', 'right', 'bottom', 'left']; -const SIDE = { - 'margin-top': 'top', - 'margin-right': 'right', - 'margin-bottom': 'bottom', - 'margin-left': 'left', - - 'padding-top': 'top', - 'padding-right': 'right', - 'padding-bottom': 'bottom', - 'padding-left': 'left', - - 'border-top-color': 'top', - 'border-right-color': 'right', - 'border-bottom-color': 'bottom', - 'border-left-color': 'left', - 'border-top-width': 'top', - 'border-right-width': 'right', - 'border-bottom-width': 'bottom', - 'border-left-width': 'left', - 'border-top-style': 'top', - 'border-right-style': 'right', - 'border-bottom-style': 'bottom', - 'border-left-style': 'left' -}; -const MAIN_PROPERTY = { - 'margin': 'margin', - 'margin-top': 'margin', - 'margin-right': 'margin', - 'margin-bottom': 'margin', - 'margin-left': 'margin', - - 'padding': 'padding', - 'padding-top': 'padding', - 'padding-right': 'padding', - 'padding-bottom': 'padding', - 'padding-left': 'padding', - - 'border-color': 'border-color', - 'border-top-color': 'border-color', - 'border-right-color': 'border-color', - 'border-bottom-color': 'border-color', - 'border-left-color': 'border-color', - 'border-width': 'border-width', - 'border-top-width': 'border-width', - 'border-right-width': 'border-width', - 'border-bottom-width': 'border-width', - 'border-left-width': 'border-width', - 'border-style': 'border-style', - 'border-top-style': 'border-style', - 'border-right-style': 'border-style', - 'border-bottom-style': 'border-style', - 'border-left-style': 'border-style' -}; - -class TRBL { - constructor(name) { - this.name = name; - this.loc = null; - this.iehack = undefined; - this.sides = { - 'top': null, - 'right': null, - 'bottom': null, - 'left': null - }; - } - - getValueSequence(declaration, count) { - const values = []; - let iehack = ''; - const hasBadValues = declaration.value.type !== 'Value' || declaration.value.children.some(function(child) { - let special = false; - - switch (child.type) { - case 'Identifier': - switch (child.name) { - case '\\0': - case '\\9': - iehack = child.name; - return; - - case 'inherit': - case 'initial': - case 'unset': - case 'revert': - special = child.name; - break; - } - break; - - case 'Dimension': - switch (child.unit) { - // is not supported until IE11 - case 'rem': - - // v* units is too buggy across browsers and better - // don't merge values with those units - case 'vw': - case 'vh': - case 'vmin': - case 'vmax': - case 'vm': // IE9 supporting "vm" instead of "vmin". - special = child.unit; - break; - } - break; - - case 'Hash': // color - case 'Number': - case 'Percentage': - break; - - case 'Function': - if (child.name === 'var') { - return true; - } - - special = child.name; - break; - - default: - return true; // bad value - } - - values.push({ - node: child, - special, - important: declaration.important - }); - }); - - if (hasBadValues || values.length > count) { - return false; - } - - if (typeof this.iehack === 'string' && this.iehack !== iehack) { - return false; - } - - this.iehack = iehack; // move outside - - return values; - } - - canOverride(side, value) { - const currentValue = this.sides[side]; - - return !currentValue || (value.important && !currentValue.important); - } - - add(name, declaration) { - function attemptToAdd() { - const sides = this.sides; - const side = SIDE[name]; - - if (side) { - if (side in sides === false) { - return false; - } - - const values = this.getValueSequence(declaration, 1); - - if (!values || !values.length) { - return false; - } - - // can mix only if specials are equal - for (const key in sides) { - if (sides[key] !== null && sides[key].special !== values[0].special) { - return false; - } - } - - if (!this.canOverride(side, values[0])) { - return true; - } - - sides[side] = values[0]; - - return true; - } else if (name === this.name) { - const values = this.getValueSequence(declaration, 4); - - if (!values || !values.length) { - return false; - } - - switch (values.length) { - case 1: - values[RIGHT] = values[TOP]; - values[BOTTOM] = values[TOP]; - values[LEFT] = values[TOP]; - break; - - case 2: - values[BOTTOM] = values[TOP]; - values[LEFT] = values[RIGHT]; - break; - - case 3: - values[LEFT] = values[RIGHT]; - break; - } - - // can mix only if specials are equal - for (let i = 0; i < 4; i++) { - for (const key in sides) { - if (sides[key] !== null && sides[key].special !== values[i].special) { - return false; - } - } - } - - for (let i = 0; i < 4; i++) { - if (this.canOverride(SIDES[i], values[i])) { - sides[SIDES[i]] = values[i]; - } - } - - return true; - } - } - - if (!attemptToAdd.call(this)) { - return false; - } - - // TODO: use it when we can refer to several points in source - // if (this.loc) { - // this.loc = { - // primary: this.loc, - // merged: declaration.loc - // }; - // } else { - // this.loc = declaration.loc; - // } - if (!this.loc) { - this.loc = declaration.loc; - } - - return true; - } - - isOkToMinimize() { - const top = this.sides.top; - const right = this.sides.right; - const bottom = this.sides.bottom; - const left = this.sides.left; - - if (top && right && bottom && left) { - const important = - top.important + - right.important + - bottom.important + - left.important; - - return important === 0 || important === 4; - } - - return false; - } - - getValue() { - const result = new cssTree.List(); - const sides = this.sides; - const values = [ - sides.top, - sides.right, - sides.bottom, - sides.left - ]; - const stringValues = [ - cssTree.generate(sides.top.node), - cssTree.generate(sides.right.node), - cssTree.generate(sides.bottom.node), - cssTree.generate(sides.left.node) - ]; - - if (stringValues[LEFT] === stringValues[RIGHT]) { - values.pop(); - if (stringValues[BOTTOM] === stringValues[TOP]) { - values.pop(); - if (stringValues[RIGHT] === stringValues[TOP]) { - values.pop(); - } - } - } - - for (let i = 0; i < values.length; i++) { - result.appendData(values[i].node); - } - - if (this.iehack) { - result.appendData({ - type: 'Identifier', - loc: null, - name: this.iehack - }); - } - - return { - type: 'Value', - loc: null, - children: result - }; - } - - getDeclaration() { - return { - type: 'Declaration', - loc: this.loc, - important: this.sides.top.important, - property: this.name, - value: this.getValue() - }; - } -} - -function processRule(rule, shorts, shortDeclarations, lastShortSelector) { - const declarations = rule.block.children; - const selector = rule.prelude.children.first.id; - - rule.block.children.forEachRight(function(declaration, item) { - const property = declaration.property; - - if (!MAIN_PROPERTY.hasOwnProperty(property)) { - return; - } - - const key = MAIN_PROPERTY[property]; - let shorthand; - let operation; - - if (!lastShortSelector || selector === lastShortSelector) { - if (key in shorts) { - operation = REMOVE; - shorthand = shorts[key]; - } - } - - if (!shorthand || !shorthand.add(property, declaration)) { - operation = REPLACE; - shorthand = new TRBL(key); - - // if can't parse value ignore it and break shorthand children - if (!shorthand.add(property, declaration)) { - lastShortSelector = null; - return; - } - } - - shorts[key] = shorthand; - shortDeclarations.push({ - operation, - block: declarations, - item, - shorthand - }); - - lastShortSelector = selector; - }); - - return lastShortSelector; -} - -function processShorthands(shortDeclarations, markDeclaration) { - shortDeclarations.forEach(function(item) { - const shorthand = item.shorthand; - - if (!shorthand.isOkToMinimize()) { - return; - } - - if (item.operation === REPLACE) { - item.item.data = markDeclaration(shorthand.getDeclaration()); - } else { - item.block.remove(item.item); - } - }); -} - -function restructBlock(ast, indexer) { - const stylesheetMap = {}; - const shortDeclarations = []; - - cssTree.walk(ast, { - visit: 'Rule', - reverse: true, - enter(node) { - const stylesheet = this.block || this.stylesheet; - const ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first.id; - let ruleMap; - let shorts; - - if (!stylesheetMap.hasOwnProperty(stylesheet.id)) { - ruleMap = { - lastShortSelector: null - }; - stylesheetMap[stylesheet.id] = ruleMap; - } else { - ruleMap = stylesheetMap[stylesheet.id]; - } - - if (ruleMap.hasOwnProperty(ruleId)) { - shorts = ruleMap[ruleId]; - } else { - shorts = {}; - ruleMap[ruleId] = shorts; - } - - ruleMap.lastShortSelector = processRule.call(this, node, shorts, shortDeclarations, ruleMap.lastShortSelector); - } - }); - - processShorthands(shortDeclarations, indexer.declaration); -} - -module.exports = restructBlock; diff --git a/node_modules/csso/cjs/restructure/6-restructBlock.cjs b/node_modules/csso/cjs/restructure/6-restructBlock.cjs deleted file mode 100644 index ba2d0f0d..00000000 --- a/node_modules/csso/cjs/restructure/6-restructBlock.cjs +++ /dev/null @@ -1,307 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -let fingerprintId = 1; -const dontRestructure = new Set([ - 'src' // https://github.com/afelix/csso/issues/50 -]); - -const DONT_MIX_VALUE = { - // https://developer.mozilla.org/en-US/docs/Web/CSS/display#Browser_compatibility - 'display': /table|ruby|flex|-(flex)?box$|grid|contents|run-in/i, - // https://developer.mozilla.org/en/docs/Web/CSS/text-align - 'text-align': /^(start|end|match-parent|justify-all)$/i -}; - -const SAFE_VALUES = { - cursor: [ - 'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help', - 'n-resize', 'e-resize', 's-resize', 'w-resize', - 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', - 'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll', - 'col-resize', 'row-resize' - ], - overflow: [ - 'hidden', 'visible', 'scroll', 'auto' - ], - position: [ - 'static', 'relative', 'absolute', 'fixed' - ] -}; - -const NEEDLESS_TABLE = { - 'border-width': ['border'], - 'border-style': ['border'], - 'border-color': ['border'], - 'border-top': ['border'], - 'border-right': ['border'], - 'border-bottom': ['border'], - 'border-left': ['border'], - 'border-top-width': ['border-top', 'border-width', 'border'], - 'border-right-width': ['border-right', 'border-width', 'border'], - 'border-bottom-width': ['border-bottom', 'border-width', 'border'], - 'border-left-width': ['border-left', 'border-width', 'border'], - 'border-top-style': ['border-top', 'border-style', 'border'], - 'border-right-style': ['border-right', 'border-style', 'border'], - 'border-bottom-style': ['border-bottom', 'border-style', 'border'], - 'border-left-style': ['border-left', 'border-style', 'border'], - 'border-top-color': ['border-top', 'border-color', 'border'], - 'border-right-color': ['border-right', 'border-color', 'border'], - 'border-bottom-color': ['border-bottom', 'border-color', 'border'], - 'border-left-color': ['border-left', 'border-color', 'border'], - 'margin-top': ['margin'], - 'margin-right': ['margin'], - 'margin-bottom': ['margin'], - 'margin-left': ['margin'], - 'padding-top': ['padding'], - 'padding-right': ['padding'], - 'padding-bottom': ['padding'], - 'padding-left': ['padding'], - 'font-style': ['font'], - 'font-variant': ['font'], - 'font-weight': ['font'], - 'font-size': ['font'], - 'font-family': ['font'], - 'list-style-type': ['list-style'], - 'list-style-position': ['list-style'], - 'list-style-image': ['list-style'] -}; - -function getPropertyFingerprint(propertyName, declaration, fingerprints) { - const realName = cssTree.property(propertyName).basename; - - if (realName === 'background') { - return propertyName + ':' + cssTree.generate(declaration.value); - } - - const declarationId = declaration.id; - let fingerprint = fingerprints[declarationId]; - - if (!fingerprint) { - switch (declaration.value.type) { - case 'Value': - const special = {}; - let vendorId = ''; - let iehack = ''; - let raw = false; - - declaration.value.children.forEach(function walk(node) { - switch (node.type) { - case 'Value': - case 'Brackets': - case 'Parentheses': - node.children.forEach(walk); - break; - - case 'Raw': - raw = true; - break; - - case 'Identifier': { - const { name } = node; - - if (!vendorId) { - vendorId = cssTree.keyword(name).vendor; - } - - if (/\\[09]/.test(name)) { - iehack = RegExp.lastMatch; - } - - if (SAFE_VALUES.hasOwnProperty(realName)) { - if (SAFE_VALUES[realName].indexOf(name) === -1) { - special[name] = true; - } - } else if (DONT_MIX_VALUE.hasOwnProperty(realName)) { - if (DONT_MIX_VALUE[realName].test(name)) { - special[name] = true; - } - } - - break; - } - - case 'Function': { - let { name } = node; - - if (!vendorId) { - vendorId = cssTree.keyword(name).vendor; - } - - if (name === 'rect') { - // there are 2 forms of rect: - // rect(, , , ) - standart - // rect( ) – backwards compatible syntax - // only the same form values can be merged - const hasComma = node.children.some((node) => - node.type === 'Operator' && node.value === ',' - ); - - if (!hasComma) { - name = 'rect-backward'; - } - } - - special[name + '()'] = true; - - // check nested tokens too - node.children.forEach(walk); - - break; - } - - case 'Dimension': { - const { unit } = node; - - if (/\\[09]/.test(unit)) { - iehack = RegExp.lastMatch; - } - - switch (unit) { - // is not supported until IE11 - case 'rem': - - // v* units is too buggy across browsers and better - // don't merge values with those units - case 'vw': - case 'vh': - case 'vmin': - case 'vmax': - case 'vm': // IE9 supporting "vm" instead of "vmin". - special[unit] = true; - break; - } - - break; - } - } - }); - - fingerprint = raw - ? '!' + fingerprintId++ - : '!' + Object.keys(special).sort() + '|' + iehack + vendorId; - break; - - case 'Raw': - fingerprint = '!' + declaration.value.value; - break; - - default: - fingerprint = cssTree.generate(declaration.value); - } - - fingerprints[declarationId] = fingerprint; - } - - return propertyName + fingerprint; -} - -function needless(props, declaration, fingerprints) { - const property = cssTree.property(declaration.property); - - if (NEEDLESS_TABLE.hasOwnProperty(property.basename)) { - const table = NEEDLESS_TABLE[property.basename]; - - for (const entry of table) { - const ppre = getPropertyFingerprint(property.prefix + entry, declaration, fingerprints); - const prev = props.hasOwnProperty(ppre) ? props[ppre] : null; - - if (prev && (!declaration.important || prev.item.data.important)) { - return prev; - } - } - } -} - -function processRule(rule, item, list, props, fingerprints) { - const declarations = rule.block.children; - - declarations.forEachRight(function(declaration, declarationItem) { - const { property } = declaration; - const fingerprint = getPropertyFingerprint(property, declaration, fingerprints); - const prev = props[fingerprint]; - - if (prev && !dontRestructure.has(property)) { - if (declaration.important && !prev.item.data.important) { - props[fingerprint] = { - block: declarations, - item: declarationItem - }; - - prev.block.remove(prev.item); - - // TODO: use it when we can refer to several points in source - // declaration.loc = { - // primary: declaration.loc, - // merged: prev.item.data.loc - // }; - } else { - declarations.remove(declarationItem); - - // TODO: use it when we can refer to several points in source - // prev.item.data.loc = { - // primary: prev.item.data.loc, - // merged: declaration.loc - // }; - } - } else { - const prev = needless(props, declaration, fingerprints); - - if (prev) { - declarations.remove(declarationItem); - - // TODO: use it when we can refer to several points in source - // prev.item.data.loc = { - // primary: prev.item.data.loc, - // merged: declaration.loc - // }; - } else { - declaration.fingerprint = fingerprint; - - props[fingerprint] = { - block: declarations, - item: declarationItem - }; - } - } - }); - - if (declarations.isEmpty) { - list.remove(item); - } -} - -function restructBlock(ast) { - const stylesheetMap = {}; - const fingerprints = Object.create(null); - - cssTree.walk(ast, { - visit: 'Rule', - reverse: true, - enter(node, item, list) { - const stylesheet = this.block || this.stylesheet; - const ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first.id; - let ruleMap; - let props; - - if (!stylesheetMap.hasOwnProperty(stylesheet.id)) { - ruleMap = {}; - stylesheetMap[stylesheet.id] = ruleMap; - } else { - ruleMap = stylesheetMap[stylesheet.id]; - } - - if (ruleMap.hasOwnProperty(ruleId)) { - props = ruleMap[ruleId]; - } else { - props = {}; - ruleMap[ruleId] = props; - } - - processRule.call(this, node, item, list, props, fingerprints); - } - }); -} - -module.exports = restructBlock; diff --git a/node_modules/csso/cjs/restructure/7-mergeRuleset.cjs b/node_modules/csso/cjs/restructure/7-mergeRuleset.cjs deleted file mode 100644 index 797b9401..00000000 --- a/node_modules/csso/cjs/restructure/7-mergeRuleset.cjs +++ /dev/null @@ -1,90 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const utils = require('./utils.cjs'); - -/* - At this step all rules has single simple selector. We try to join by equal - declaration blocks to first rule, e.g. - - .a { color: red } - b { ... } - .b { color: red } - -> - .a, .b { color: red } - b { ... } -*/ - -function processRule(node, item, list) { - const selectors = node.prelude.children; - const declarations = node.block.children; - const nodeCompareMarker = selectors.first.compareMarker; - const skippedCompareMarkers = {}; - - list.nextUntil(item.next, function(next, nextItem) { - // skip non-ruleset node if safe - if (next.type !== 'Rule') { - return utils.unsafeToSkipNode.call(selectors, next); - } - - if (node.pseudoSignature !== next.pseudoSignature) { - return true; - } - - const nextFirstSelector = next.prelude.children.head; - const nextDeclarations = next.block.children; - const nextCompareMarker = nextFirstSelector.data.compareMarker; - - // if next ruleset has same marked as one of skipped then stop joining - if (nextCompareMarker in skippedCompareMarkers) { - return true; - } - - // try to join by selectors - if (selectors.head === selectors.tail) { - if (selectors.first.id === nextFirstSelector.data.id) { - declarations.appendList(nextDeclarations); - list.remove(nextItem); - return; - } - } - - // try to join by properties - if (utils.isEqualDeclarations(declarations, nextDeclarations)) { - const nextStr = nextFirstSelector.data.id; - - selectors.some((data, item) => { - const curStr = data.id; - - if (nextStr < curStr) { - selectors.insert(nextFirstSelector, item); - return true; - } - - if (!item.next) { - selectors.insert(nextFirstSelector); - return true; - } - }); - - list.remove(nextItem); - return; - } - - // go to next ruleset if current one can be skipped (has no equal specificity nor element selector) - if (nextCompareMarker === nodeCompareMarker) { - return true; - } - - skippedCompareMarkers[nextCompareMarker] = true; - }); -} - -function mergeRule(ast) { - cssTree.walk(ast, { - visit: 'Rule', - enter: processRule - }); -} - -module.exports = mergeRule; diff --git a/node_modules/csso/cjs/restructure/8-restructRuleset.cjs b/node_modules/csso/cjs/restructure/8-restructRuleset.cjs deleted file mode 100644 index 3eda382f..00000000 --- a/node_modules/csso/cjs/restructure/8-restructRuleset.cjs +++ /dev/null @@ -1,175 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const utils = require('./utils.cjs'); - -function calcSelectorLength(list) { - return list.reduce((res, data) => res + data.id.length + 1, 0) - 1; -} - -function calcDeclarationsLength(tokens) { - let length = 0; - - for (const token of tokens) { - length += token.length; - } - - return ( - length + // declarations - tokens.length - 1 // delimeters - ); -} - -function processRule(node, item, list) { - const avoidRulesMerge = this.block !== null ? this.block.avoidRulesMerge : false; - const selectors = node.prelude.children; - const block = node.block; - const disallowDownMarkers = Object.create(null); - let allowMergeUp = true; - let allowMergeDown = true; - - list.prevUntil(item.prev, function(prev, prevItem) { - const prevBlock = prev.block; - const prevType = prev.type; - - if (prevType !== 'Rule') { - const unsafe = utils.unsafeToSkipNode.call(selectors, prev); - - if (!unsafe && prevType === 'Atrule' && prevBlock) { - cssTree.walk(prevBlock, { - visit: 'Rule', - enter(node) { - node.prelude.children.forEach((data) => { - disallowDownMarkers[data.compareMarker] = true; - }); - } - }); - } - - return unsafe; - } - - if (node.pseudoSignature !== prev.pseudoSignature) { - return true; - } - - const prevSelectors = prev.prelude.children; - - allowMergeDown = !prevSelectors.some((selector) => - selector.compareMarker in disallowDownMarkers - ); - - // try prev ruleset if simpleselectors has no equal specifity and element selector - if (!allowMergeDown && !allowMergeUp) { - return true; - } - - // try to join by selectors - if (allowMergeUp && utils.isEqualSelectors(prevSelectors, selectors)) { - prevBlock.children.appendList(block.children); - list.remove(item); - - return true; - } - - // try to join by properties - const diff = utils.compareDeclarations(block.children, prevBlock.children); - - // console.log(diff.eq, diff.ne1, diff.ne2); - - if (diff.eq.length) { - if (!diff.ne1.length && !diff.ne2.length) { - // equal blocks - if (allowMergeDown) { - utils.addSelectors(selectors, prevSelectors); - list.remove(prevItem); - } - - return true; - } else if (!avoidRulesMerge) { /* probably we don't need to prevent those merges for @keyframes - TODO: need to be checked */ - - if (diff.ne1.length && !diff.ne2.length) { - // prevBlock is subset block - const selectorLength = calcSelectorLength(selectors); - const blockLength = calcDeclarationsLength(diff.eq); // declarations length - - if (allowMergeUp && selectorLength < blockLength) { - utils.addSelectors(prevSelectors, selectors); - block.children.fromArray(diff.ne1); - } - } else if (!diff.ne1.length && diff.ne2.length) { - // node is subset of prevBlock - const selectorLength = calcSelectorLength(prevSelectors); - const blockLength = calcDeclarationsLength(diff.eq); // declarations length - - if (allowMergeDown && selectorLength < blockLength) { - utils.addSelectors(selectors, prevSelectors); - prevBlock.children.fromArray(diff.ne2); - } - } else { - // diff.ne1.length && diff.ne2.length - // extract equal block - const newSelector = { - type: 'SelectorList', - loc: null, - children: utils.addSelectors(prevSelectors.copy(), selectors) - }; - const newBlockLength = calcSelectorLength(newSelector.children) + 2; // selectors length + curly braces length - const blockLength = calcDeclarationsLength(diff.eq); // declarations length - - // create new ruleset if declarations length greater than - // ruleset description overhead - if (blockLength >= newBlockLength) { - const newItem = list.createItem({ - type: 'Rule', - loc: null, - prelude: newSelector, - block: { - type: 'Block', - loc: null, - children: new cssTree.List().fromArray(diff.eq) - }, - pseudoSignature: node.pseudoSignature - }); - - block.children.fromArray(diff.ne1); - prevBlock.children.fromArray(diff.ne2overrided); - - if (allowMergeUp) { - list.insert(newItem, prevItem); - } else { - list.insert(newItem, item); - } - - return true; - } - } - } - } - - if (allowMergeUp) { - // TODO: disallow up merge only if any property interception only (i.e. diff.ne2overrided.length > 0); - // await property families to find property interception correctly - allowMergeUp = !prevSelectors.some((prevSelector) => - selectors.some((selector) => - selector.compareMarker === prevSelector.compareMarker - ) - ); - } - - prevSelectors.forEach((data) => { - disallowDownMarkers[data.compareMarker] = true; - }); - }); -} - -function restructRule(ast) { - cssTree.walk(ast, { - visit: 'Rule', - reverse: true, - enter: processRule - }); -} - -module.exports = restructRule; diff --git a/node_modules/csso/cjs/restructure/index.cjs b/node_modules/csso/cjs/restructure/index.cjs deleted file mode 100644 index dac7a3c3..00000000 --- a/node_modules/csso/cjs/restructure/index.cjs +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const index = require('./prepare/index.cjs'); -const _1MergeAtrule = require('./1-mergeAtrule.cjs'); -const _2InitialMergeRuleset = require('./2-initialMergeRuleset.cjs'); -const _3DisjoinRuleset = require('./3-disjoinRuleset.cjs'); -const _4RestructShorthand = require('./4-restructShorthand.cjs'); -const _6RestructBlock = require('./6-restructBlock.cjs'); -const _7MergeRuleset = require('./7-mergeRuleset.cjs'); -const _8RestructRuleset = require('./8-restructRuleset.cjs'); - -function restructure(ast, options) { - // prepare ast for restructing - const indexer = index(ast, options); - options.logger('prepare', ast); - - _1MergeAtrule(ast, options); - options.logger('mergeAtrule', ast); - - _2InitialMergeRuleset(ast); - options.logger('initialMergeRuleset', ast); - - _3DisjoinRuleset(ast); - options.logger('disjoinRuleset', ast); - - _4RestructShorthand(ast, indexer); - options.logger('restructShorthand', ast); - - _6RestructBlock(ast); - options.logger('restructBlock', ast); - - _7MergeRuleset(ast); - options.logger('mergeRuleset', ast); - - _8RestructRuleset(ast); - options.logger('restructRuleset', ast); -} - -module.exports = restructure; diff --git a/node_modules/csso/cjs/restructure/prepare/createDeclarationIndexer.cjs b/node_modules/csso/cjs/restructure/prepare/createDeclarationIndexer.cjs deleted file mode 100644 index 94489728..00000000 --- a/node_modules/csso/cjs/restructure/prepare/createDeclarationIndexer.cjs +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -class Index { - constructor() { - this.map = new Map(); - } - resolve(str) { - let index = this.map.get(str); - - if (index === undefined) { - index = this.map.size + 1; - this.map.set(str, index); - } - - return index; - } -} -function createDeclarationIndexer() { - const ids = new Index(); - - return function markDeclaration(node) { - const id = cssTree.generate(node); - - node.id = ids.resolve(id); - node.length = id.length; - node.fingerprint = null; - - return node; - }; -} - -module.exports = createDeclarationIndexer; diff --git a/node_modules/csso/cjs/restructure/prepare/index.cjs b/node_modules/csso/cjs/restructure/prepare/index.cjs deleted file mode 100644 index 42b49127..00000000 --- a/node_modules/csso/cjs/restructure/prepare/index.cjs +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const createDeclarationIndexer = require('./createDeclarationIndexer.cjs'); -const processSelector = require('./processSelector.cjs'); - -function prepare(ast, options) { - const markDeclaration = createDeclarationIndexer(); - - cssTree.walk(ast, { - visit: 'Rule', - enter(node) { - node.block.children.forEach(markDeclaration); - processSelector(node, options.usage); - } - }); - - cssTree.walk(ast, { - visit: 'Atrule', - enter(node) { - if (node.prelude) { - node.prelude.id = null; // pre-init property to avoid multiple hidden class for generate - node.prelude.id = cssTree.generate(node.prelude); - } - - // compare keyframe selectors by its values - // NOTE: still no clarification about problems with keyframes selector grouping (issue #197) - if (cssTree.keyword(node.name).basename === 'keyframes') { - node.block.avoidRulesMerge = true; /* probably we don't need to prevent those merges for @keyframes - TODO: need to be checked */ - node.block.children.forEach(function(rule) { - rule.prelude.children.forEach(function(simpleselector) { - simpleselector.compareMarker = simpleselector.id; - }); - }); - } - } - }); - - return { - declaration: markDeclaration - }; -} - -module.exports = prepare; diff --git a/node_modules/csso/cjs/restructure/prepare/processSelector.cjs b/node_modules/csso/cjs/restructure/prepare/processSelector.cjs deleted file mode 100644 index 5c9e1d21..00000000 --- a/node_modules/csso/cjs/restructure/prepare/processSelector.cjs +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const specificity = require('./specificity.cjs'); - -const nonFreezePseudoElements = new Set([ - 'first-letter', - 'first-line', - 'after', - 'before' -]); -const nonFreezePseudoClasses = new Set([ - 'link', - 'visited', - 'hover', - 'active', - 'first-letter', - 'first-line', - 'after', - 'before' -]); - -function processSelector(node, usageData) { - const pseudos = new Set(); - - node.prelude.children.forEach(function(simpleSelector) { - let tagName = '*'; - let scope = 0; - - simpleSelector.children.forEach(function(node) { - switch (node.type) { - case 'ClassSelector': - if (usageData && usageData.scopes) { - const classScope = usageData.scopes[node.name] || 0; - - if (scope !== 0 && classScope !== scope) { - throw new Error('Selector can\'t has classes from different scopes: ' + cssTree.generate(simpleSelector)); - } - - scope = classScope; - } - - break; - - case 'PseudoClassSelector': { - const name = node.name.toLowerCase(); - - if (!nonFreezePseudoClasses.has(name)) { - pseudos.add(`:${name}`); - } - - break; - } - - case 'PseudoElementSelector': { - const name = node.name.toLowerCase(); - - if (!nonFreezePseudoElements.has(name)) { - pseudos.add(`::${name}`); - } - - break; - } - - case 'TypeSelector': - tagName = node.name.toLowerCase(); - break; - - case 'AttributeSelector': - if (node.flags) { - pseudos.add(`[${node.flags.toLowerCase()}]`); - } - - break; - - case 'Combinator': - tagName = '*'; - break; - } - }); - - simpleSelector.compareMarker = specificity(simpleSelector).toString(); - simpleSelector.id = null; // pre-init property to avoid multiple hidden class - simpleSelector.id = cssTree.generate(simpleSelector); - - if (scope) { - simpleSelector.compareMarker += ':' + scope; - } - - if (tagName !== '*') { - simpleSelector.compareMarker += ',' + tagName; - } - }); - - // add property to all rule nodes to avoid multiple hidden class - node.pseudoSignature = pseudos.size > 0 - ? [...pseudos].sort().join(',') - : false; -} - -module.exports = processSelector; diff --git a/node_modules/csso/cjs/restructure/prepare/specificity.cjs b/node_modules/csso/cjs/restructure/prepare/specificity.cjs deleted file mode 100644 index b62c3291..00000000 --- a/node_modules/csso/cjs/restructure/prepare/specificity.cjs +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); - -function ensureSelectorList(node) { - if (node.type === 'Raw') { - return cssTree.parse(node.value, { context: 'selectorList' }); - } - - return node; -} - -function maxSpecificity(a, b) { - for (let i = 0; i < 3; i++) { - if (a[i] !== b[i]) { - return a[i] > b[i] ? a : b; - } - } - - return a; -} - -function maxSelectorListSpecificity(selectorList) { - return ensureSelectorList(selectorList).children.reduce( - (result, node) => maxSpecificity(specificity(node), result), - [0, 0, 0] - ); -} - -// §16. Calculating a selector’s specificity -// https://www.w3.org/TR/selectors-4/#specificity-rules -function specificity(simpleSelector) { - let A = 0; - let B = 0; - let C = 0; - - // A selector’s specificity is calculated for a given element as follows: - simpleSelector.children.forEach((node) => { - switch (node.type) { - // count the number of ID selectors in the selector (= A) - case 'IdSelector': - A++; - break; - - // count the number of class selectors, attributes selectors, ... - case 'ClassSelector': - case 'AttributeSelector': - B++; - break; - - // ... and pseudo-classes in the selector (= B) - case 'PseudoClassSelector': - switch (node.name.toLowerCase()) { - // The specificity of an :is(), :not(), or :has() pseudo-class is replaced - // by the specificity of the most specific complex selector in its selector list argument. - case 'not': - case 'has': - case 'is': - // :matches() is used before it was renamed to :is() - // https://github.com/w3c/csswg-drafts/issues/3258 - case 'matches': - // Older browsers support :is() functionality as prefixed pseudo-class :any() - // https://developer.mozilla.org/en-US/docs/Web/CSS/:is - case '-webkit-any': - case '-moz-any': { - const [a, b, c] = maxSelectorListSpecificity(node.children.first); - - A += a; - B += b; - C += c; - - break; - } - - // Analogously, the specificity of an :nth-child() or :nth-last-child() selector - // is the specificity of the pseudo class itself (counting as one pseudo-class selector) - // plus the specificity of the most specific complex selector in its selector list argument (if any). - case 'nth-child': - case 'nth-last-child': { - const arg = node.children.first; - - if (arg.type === 'Nth' && arg.selector) { - const [a, b, c] = maxSelectorListSpecificity(arg.selector); - - A += a; - B += b + 1; - C += c; - } else { - B++; - } - - break; - } - - // The specificity of a :where() pseudo-class is replaced by zero. - case 'where': - break; - - // The four Level 2 pseudo-elements (::before, ::after, ::first-line, and ::first-letter) may, - // for legacy reasons, be represented using the grammar, - // with only a single ":" character at their start. - // https://www.w3.org/TR/selectors-4/#single-colon-pseudos - case 'before': - case 'after': - case 'first-line': - case 'first-letter': - C++; - break; - - default: - B++; - } - break; - - // count the number of type selectors ... - case 'TypeSelector': - // ignore the universal selector - if (!node.name.endsWith('*')) { - C++; - } - break; - - // ... and pseudo-elements in the selector (= C) - case 'PseudoElementSelector': - C++; - break; - } - }); - - return [A, B, C]; -} - -module.exports = specificity; diff --git a/node_modules/csso/cjs/restructure/utils.cjs b/node_modules/csso/cjs/restructure/utils.cjs deleted file mode 100644 index cd66a6a8..00000000 --- a/node_modules/csso/cjs/restructure/utils.cjs +++ /dev/null @@ -1,151 +0,0 @@ -'use strict'; - -const { hasOwnProperty } = Object.prototype; - -function isEqualSelectors(a, b) { - let cursor1 = a.head; - let cursor2 = b.head; - - while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) { - cursor1 = cursor1.next; - cursor2 = cursor2.next; - } - - return cursor1 === null && cursor2 === null; -} - -function isEqualDeclarations(a, b) { - let cursor1 = a.head; - let cursor2 = b.head; - - while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) { - cursor1 = cursor1.next; - cursor2 = cursor2.next; - } - - return cursor1 === null && cursor2 === null; -} - -function compareDeclarations(declarations1, declarations2) { - const result = { - eq: [], - ne1: [], - ne2: [], - ne2overrided: [] - }; - - const fingerprints = Object.create(null); - const declarations2hash = Object.create(null); - - for (let cursor = declarations2.head; cursor; cursor = cursor.next) { - declarations2hash[cursor.data.id] = true; - } - - for (let cursor = declarations1.head; cursor; cursor = cursor.next) { - const data = cursor.data; - - if (data.fingerprint) { - fingerprints[data.fingerprint] = data.important; - } - - if (declarations2hash[data.id]) { - declarations2hash[data.id] = false; - result.eq.push(data); - } else { - result.ne1.push(data); - } - } - - for (let cursor = declarations2.head; cursor; cursor = cursor.next) { - const data = cursor.data; - - if (declarations2hash[data.id]) { - // when declarations1 has an overriding declaration, this is not a difference - // unless no !important is used on prev and !important is used on the following - if (!hasOwnProperty.call(fingerprints, data.fingerprint) || - (!fingerprints[data.fingerprint] && data.important)) { - result.ne2.push(data); - } - - result.ne2overrided.push(data); - } - } - - return result; -} - -function addSelectors(dest, source) { - source.forEach((sourceData) => { - const newStr = sourceData.id; - let cursor = dest.head; - - while (cursor) { - const nextStr = cursor.data.id; - - if (nextStr === newStr) { - return; - } - - if (nextStr > newStr) { - break; - } - - cursor = cursor.next; - } - - dest.insert(dest.createItem(sourceData), cursor); - }); - - return dest; -} - -// check if simpleselectors has no equal specificity and element selector -function hasSimilarSelectors(selectors1, selectors2) { - let cursor1 = selectors1.head; - - while (cursor1 !== null) { - let cursor2 = selectors2.head; - - while (cursor2 !== null) { - if (cursor1.data.compareMarker === cursor2.data.compareMarker) { - return true; - } - - cursor2 = cursor2.next; - } - - cursor1 = cursor1.next; - } - - return false; -} - -// test node can't to be skipped -function unsafeToSkipNode(node) { - switch (node.type) { - case 'Rule': - // unsafe skip ruleset with selector similarities - return hasSimilarSelectors(node.prelude.children, this); - - case 'Atrule': - // can skip at-rules with blocks - if (node.block) { - // unsafe skip at-rule if block contains something unsafe to skip - return node.block.children.some(unsafeToSkipNode, this); - } - break; - - case 'Declaration': - return false; - } - - // unsafe by default - return true; -} - -exports.addSelectors = addSelectors; -exports.compareDeclarations = compareDeclarations; -exports.hasSimilarSelectors = hasSimilarSelectors; -exports.isEqualDeclarations = isEqualDeclarations; -exports.isEqualSelectors = isEqualSelectors; -exports.unsafeToSkipNode = unsafeToSkipNode; diff --git a/node_modules/csso/cjs/syntax.cjs b/node_modules/csso/cjs/syntax.cjs deleted file mode 100644 index 527604c0..00000000 --- a/node_modules/csso/cjs/syntax.cjs +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -const cssTree = require('css-tree'); -const compress = require('./compress.cjs'); -const specificity = require('./restructure/prepare/specificity.cjs'); - -function encodeString(value) { - const stringApostrophe = cssTree.string.encode(value, true); - const stringQuote = cssTree.string.encode(value); - - return stringApostrophe.length < stringQuote.length - ? stringApostrophe - : stringQuote; -} - -const { - lexer, - tokenize, - parse, - generate, - walk, - find, - findLast, - findAll, - fromPlainObject, - toPlainObject -} = cssTree.fork({ - node: { - String: { - generate(node) { - this.token(cssTree.tokenTypes.String, encodeString(node.value)); - } - }, - Url: { - generate(node) { - const encodedUrl = cssTree.url.encode(node.value); - const string = encodeString(node.value); - - this.token(cssTree.tokenTypes.Url, - encodedUrl.length <= string.length + 5 /* "url()".length */ - ? encodedUrl - : 'url(' + string + ')' - ); - } - } - } -}); - -exports.compress = compress; -exports.specificity = specificity; -exports.find = find; -exports.findAll = findAll; -exports.findLast = findLast; -exports.fromPlainObject = fromPlainObject; -exports.generate = generate; -exports.lexer = lexer; -exports.parse = parse; -exports.toPlainObject = toPlainObject; -exports.tokenize = tokenize; -exports.walk = walk; diff --git a/node_modules/csso/cjs/usage.cjs b/node_modules/csso/cjs/usage.cjs deleted file mode 100644 index 90abe9d2..00000000 --- a/node_modules/csso/cjs/usage.cjs +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -const { hasOwnProperty } = Object.prototype; - -function buildMap(list, caseInsensitive) { - const map = Object.create(null); - - if (!Array.isArray(list)) { - return null; - } - - for (let name of list) { - if (caseInsensitive) { - name = name.toLowerCase(); - } - - map[name] = true; - } - - return map; -} - -function buildList(data) { - if (!data) { - return null; - } - - const tags = buildMap(data.tags, true); - const ids = buildMap(data.ids); - const classes = buildMap(data.classes); - - if (tags === null && - ids === null && - classes === null) { - return null; - } - - return { - tags, - ids, - classes - }; -} - -function buildIndex(data) { - let scopes = false; - - if (data.scopes && Array.isArray(data.scopes)) { - scopes = Object.create(null); - - for (let i = 0; i < data.scopes.length; i++) { - const list = data.scopes[i]; - - if (!list || !Array.isArray(list)) { - throw new Error('Wrong usage format'); - } - - for (const name of list) { - if (hasOwnProperty.call(scopes, name)) { - throw new Error(`Class can't be used for several scopes: ${name}`); - } - - scopes[name] = i + 1; - } - } - } - - return { - whitelist: buildList(data), - blacklist: buildList(data.blacklist), - scopes - }; -} - -exports.buildIndex = buildIndex; diff --git a/node_modules/csso/cjs/utils.cjs b/node_modules/csso/cjs/utils.cjs deleted file mode 100644 index 61e75ec8..00000000 --- a/node_modules/csso/cjs/utils.cjs +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -const processSelector = require('./restructure/prepare/processSelector.cjs'); -const utils$1 = require('./restructure/utils.cjs'); - - - -exports.processSelector = processSelector; -exports.addSelectors = utils$1.addSelectors; -exports.compareDeclarations = utils$1.compareDeclarations; -exports.hasSimilarSelectors = utils$1.hasSimilarSelectors; -exports.isEqualDeclarations = utils$1.isEqualDeclarations; -exports.isEqualSelectors = utils$1.isEqualSelectors; -exports.unsafeToSkipNode = utils$1.unsafeToSkipNode; diff --git a/node_modules/csso/cjs/version.cjs b/node_modules/csso/cjs/version.cjs deleted file mode 100644 index eaa2fef2..00000000 --- a/node_modules/csso/cjs/version.cjs +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -const { version } = require('../package.json'); - -exports.version = version; diff --git a/node_modules/csso/dist/csso.esm.js b/node_modules/csso/dist/csso.esm.js deleted file mode 100644 index 57afe611..00000000 --- a/node_modules/csso/dist/csso.esm.js +++ /dev/null @@ -1,16 +0,0 @@ -var zl=Object.create;var Sr=Object.defineProperty;var Fl=Object.getOwnPropertyDescriptor;var Bl=Object.getOwnPropertyNames;var _l=Object.getPrototypeOf,Ul=Object.prototype.hasOwnProperty;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t)=>{for(var r in t)Sr(e,r,{get:t[r],enumerable:!0})},jl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bl(t))!Ul.call(e,o)&&o!==r&&Sr(e,o,{get:()=>t[o],enumerable:!(n=Fl(t,o))||n.enumerable});return e};var ql=(e,t,r)=>(r=e!=null?zl(_l(e)):{},jl(t||!e||!e.__esModule?Sr(r,"default",{value:e,enumerable:!0}):r,e));var Zi=Ue(Dr=>{var Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Dr.encode=function(e){if(0<=e&&e{var Ji=Zi(),Nr=5,ea=1<>1;return t?-r:r}Mr.encode=function(t){var r="",n,o=tc(t);do n=o&ta,o>>>=Nr,o>0&&(n|=ra),r+=Ji.encode(n);while(o>0);return r};Mr.decode=function(t,r,n){var o=t.length,i=0,a=0,l,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Ji.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));l=!!(c&ra),c&=ta,i=i+(c<{function nc(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}X.getArg=nc;var oa=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,oc=/^data:.+\,.+$/;function dt(e){var t=e.match(oa);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}X.urlParse=dt;function Ve(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}X.urlGenerate=Ve;var ic=32;function ac(e){var t=[];return function(r){for(var n=0;nic&&t.pop(),i}}var Rr=ac(function(t){var r=t,n=dt(t);if(n){if(!n.path)return t;r=n.path}for(var o=X.isAbsolute(r),i=[],a=0,l=0;;)if(a=l,l=r.indexOf("/",a),l===-1){i.push(r.slice(a));break}else for(i.push(r.slice(a,l));l=0;l--)c=i[l],c==="."?i.splice(l,1):c===".."?s++:s>0&&(c===""?(i.splice(l+1,s),s=0):(i.splice(l,2),s--));return r=i.join("/"),r===""&&(r=o?"/":"."),n?(n.path=r,Ve(n)):r});X.normalize=Rr;function ia(e,t){e===""&&(e="."),t===""&&(t=".");var r=dt(t),n=dt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ve(r);if(r||t.match(oc))return t;if(n&&!n.host&&!n.path)return n.host=t,Ve(n);var o=t.charAt(0)==="/"?t:Rr(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Ve(n)):o}X.join=ia;X.isAbsolute=function(e){return e.charAt(0)==="/"||oa.test(e)};function sc(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}X.relative=sc;var aa=function(){var e=Object.create(null);return!("__proto__"in e)}();function sa(e){return e}function lc(e){return la(e)?"$"+e:e}X.toSetString=aa?sa:lc;function cc(e){return la(e)?e.slice(1):e}X.fromSetString=aa?sa:cc;function la(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function uc(e,t,r){var n=we(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositions=uc;function pc(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositionsNoSource=pc;function hc(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflated=hc;function fc(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflatedNoLine=fc;function we(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function mc(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=we(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:we(e.name,t.name)}X.compareByGeneratedPositionsInflated=mc;function dc(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}X.parseSourceMapInput=dc;function gc(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=dt(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=ia(Ve(n),t)}return Rr(t)}X.computeSourceURL=gc});var ua=Ue(ca=>{var zr=Gt(),Fr=Object.prototype.hasOwnProperty,ze=typeof Map<"u";function ve(){this._array=[],this._set=ze?new Map:Object.create(null)}ve.fromArray=function(t,r){for(var n=new ve,o=0,i=t.length;o=0)return r}else{var n=zr.toSetString(t);if(Fr.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};ve.prototype.at=function(t){if(t>=0&&t{var pa=Gt();function bc(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||pa.compareByGeneratedPositionsInflated(e,t)<=0}function Kt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Kt.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Kt.prototype.add=function(t){bc(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Kt.prototype.toArray=function(){return this._sorted||(this._array.sort(pa.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ha.MappingList=Kt});var da=Ue(ma=>{var gt=na(),Y=Gt(),Qt=ua().ArraySet,yc=fa().MappingList;function se(e){e||(e={}),this._file=Y.getArg(e,"file",null),this._sourceRoot=Y.getArg(e,"sourceRoot",null),this._skipValidation=Y.getArg(e,"skipValidation",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new yc,this._sourcesContents=null}se.prototype._version=3;se.fromSourceMap=function(t){var r=t.sourceRoot,n=new se({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=Y.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=Y.relative(r,o)),n._sources.has(i)||n._sources.add(i);var a=t.sourceContentFor(o);a!=null&&n.setSourceContent(o,a)}),n};se.prototype.addMapping=function(t){var r=Y.getArg(t,"generated"),n=Y.getArg(t,"original",null),o=Y.getArg(t,"source",null),i=Y.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};se.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Y.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};se.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=Y.relative(i,o));var a=new Qt,l=new Qt;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var s=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});s.source!=null&&(c.source=s.source,n!=null&&(c.source=Y.join(n,c.source)),i!=null&&(c.source=Y.relative(i,c.source)),c.originalLine=s.line,c.originalColumn=s.column,s.name!=null&&(c.name=s.name))}var u=c.source;u!=null&&!a.has(u)&&a.add(u);var p=c.name;p!=null&&!l.has(p)&&l.add(p)},this),this._sources=a,this._names=l,t.sources.forEach(function(c){var s=t.sourceContentFor(c);s!=null&&(n!=null&&(c=Y.join(n,c)),i!=null&&(c=Y.relative(i,c)),this.setSourceContent(c,s))},this)};se.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};se.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,a=0,l="",c,s,u,p,h=this._mappings.toArray(),m=0,b=h.length;m0){if(!Y.compareByGeneratedPositionsInflated(s,h[m-1]))continue;c+=","}c+=gt.encode(s.generatedColumn-t),t=s.generatedColumn,s.source!=null&&(p=this._sources.indexOf(s.source),c+=gt.encode(p-a),a=p,c+=gt.encode(s.originalLine-1-o),o=s.originalLine-1,c+=gt.encode(s.originalColumn-n),n=s.originalColumn,s.name!=null&&(u=this._names.indexOf(s.name),c+=gt.encode(u-i),i=u)),l+=c}return l};se.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Y.relative(r,n));var o=Y.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};se.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};se.prototype.toString=function(){return JSON.stringify(this.toJSON())};ma.SourceMapGenerator=se});var Hl="5.0.4";var Fi={};y(Fi,{compress:()=>zi,find:()=>ld,findAll:()=>ud,findLast:()=>cd,fromPlainObject:()=>pd,generate:()=>ad,lexer:()=>nd,parse:()=>id,specificity:()=>kr,toPlainObject:()=>hd,tokenize:()=>od,walk:()=>sd});var Ee={};y(Ee,{AtKeyword:()=>M,BadString:()=>Ne,BadUrl:()=>K,CDC:()=>W,CDO:()=>pe,Colon:()=>R,Comma:()=>Q,Comment:()=>I,Delim:()=>g,Dimension:()=>k,EOF:()=>st,Function:()=>x,Hash:()=>A,Ident:()=>f,LeftCurlyBracket:()=>_,LeftParenthesis:()=>P,LeftSquareBracket:()=>H,Number:()=>d,Percentage:()=>L,RightCurlyBracket:()=>G,RightParenthesis:()=>S,RightSquareBracket:()=>$,Semicolon:()=>q,String:()=>V,Url:()=>U,WhiteSpace:()=>v});var st=0,f=1,x=2,M=3,A=4,V=5,Ne=6,U=7,K=8,g=9,d=10,L=11,k=12,v=13,pe=14,W=15,R=16,q=17,Q=18,H=19,$=20,P=21,S=22,_=23,G=24,I=25;function j(e){return e>=48&&e<=57}function oe(e){return j(e)||e>=65&&e<=70||e>=97&&e<=102}function _t(e){return e>=65&&e<=90}function Wl(e){return e>=97&&e<=122}function Yl(e){return _t(e)||Wl(e)}function Vl(e){return e>=128}function Bt(e){return Yl(e)||Vl(e)||e===95}function lt(e){return Bt(e)||j(e)||e===45}function Gl(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ct(e){return e===10||e===13||e===12}function he(e){return ct(e)||e===32||e===9}function re(e,t){return!(e!==92||ct(t)||t===0)}function je(e,t,r){return e===45?Bt(t)||t===45||re(t,r):Bt(e)?!0:e===92?re(e,t):!1}function Ut(e,t,r){return e===43||e===45?j(t)?2:t===46&&j(r)?3:0:e===46?j(t)?2:0:j(e)?1:0}function jt(e){return e===65279||e===65534?1:0}var Cr=new Array(128),Kl=128,ut=130,Ar=131,qt=132,Er=133;for(let e=0;ee.length)return!1;for(let o=t;o=0&&he(e.charCodeAt(t));t--);return t+1}function pt(e,t){for(;t=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var He=["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 We(e=null,t){return e===null||e.length0?jt(t.charCodeAt(0)):0,o=We(e.lines,r),i=We(e.columns,r),a=e.startLine,l=e.startColumn;for(let c=n;c{}){t=String(t||"");let n=t.length,o=We(this.offsetAndType,t.length+1),i=We(this.balance,t.length+1),a=0,l=0,c=0,s=-1;for(this.offsetAndType=null,this.balance=null,r(t,(u,p,h)=>{switch(u){default:i[a]=n;break;case l:{let m=c&ae;for(c=i[m],l=c>>Te,i[a]=m,i[m++]=a;m>Te:0}lookupOffset(t){return t+=this.tokenIndex,t0?t>Te,this.tokenEnd=r&ae):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t>Te,this.tokenEnd=t&ae):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(t,r){let n=t,o,i;e:for(;n0?this.offsetAndType[n-1]&ae:this.firstCharOffset,r(this.source.charCodeAt(i))){case 1:break e;case 2:n++;break e;default:this.balance[o]===n&&(n=o)}}this.skip(n-this.tokenIndex)}forEachToken(t){for(let r=0,n=this.firstCharOffset;r>Te;n=a,t(l,o,a,r)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,o,i)=>{t[i]={idx:i,type:He[r],chunk:this.source.substring(n,o),balance:this.balance[i]}}),t}};function Le(e,t){function r(p){return p=e.length){sString(u+m+1).padStart(c)+" |"+h).join(` -`)}let i=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,l=Math.min(t+n,i.length+1),c=Math.max(4,String(l).length)+1,s=0;r+=(Wi.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>Lr&&(s=r-Hi+3,r=Hi-2);for(let u=a;u<=l;u++)u>=0&&u0&&i[u].length>s?"\u2026":"")+i[u].substr(s,Lr-2)+(i[u].length>s+Lr-1?"\u2026":""));return[o(a,t),new Array(r+c+2).join("-")+"^",o(t,l)].filter(Boolean).join(` -`)}function Pr(e,t,r,n,o){return Object.assign(Re("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment(a){return Yi({source:t,line:n,column:o},isNaN(a)?0:a)},get formattedMessage(){return`Parse error: ${e} -`+Yi({source:t,line:n,column:o},2)}})}function Vi(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(o===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Gi=()=>{},Xl=33,Zl=35,Ir=59,Ki=123,Qi=0;function Jl(e){return function(){return this[e]()}}function Or(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function ec(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Or(e.atrule),pseudo:Or(e.pseudo),node:Or(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Jl(e.parseContext[r]);break}return{config:t,...t,...t.node}}function $i(e){let t="",r="",n=!1,o=Gi,i=!1,a=new Vt,l=Object.assign(new mt,ec(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Vi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===Ki?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===Ki||s===Ir?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Xl||s===Ir?1:0},consumeUntilSemicolonIncluded(s){return s===Ir?2:0},createList(){return new w},createSingleNodeList(s){return new w().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,u){let p=this.tokenIndex;try{return s.call(this)}catch(h){if(i)throw h;let m=u.call(this,p);return i=!0,o(h,m),i=!1,m}},lookupNonWSType(s){let u;do if(u=this.lookupType(s++),u!==13)return u;while(u!==Qi);return Qi},charCodeAt(s){return s>=0&&sm.toUpperCase()),p=`${/[[\](){}]/.test(u)?`"${u}"`:u} is expected`,h=this.tokenStart;switch(s){case 1:this.tokenType===2||this.tokenType===7?(h=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(Zl)&&(this.next(),h++,p="Name is expected");break;case 11:this.tokenType===10&&(h=this.tokenEnd,p="Percent sign is expected");break}this.error(p,h)}this.next()},eatIdent(s){(this.tokenType!==1||this.lookupValue(0,s)===!1)&&this.error(`Identifier "${s}" is expected`),this.next()},eatDelim(s){this.isDelim(s)||this.error(`Delim "${String.fromCharCode(s)}" is expected`),this.next()},getLocation(s,u){return n?a.getLocationRange(s,u,r):null},getLocationFromList(s){if(n){let u=this.getFirstListNode(s),p=this.getLastListNode(s);return a.getLocationRange(u!==null?u.loc.start.offset-a.startOffset:this.tokenStart,p!==null?p.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(s,u){let p=typeof u<"u"&&u",n=Boolean(u.positions),o=typeof u.onParseError=="function"?u.onParseError:Gi,i=!1,l.parseAtrulePrelude="parseAtrulePrelude"in u?Boolean(u.parseAtrulePrelude):!0,l.parseRulePrelude="parseRulePrelude"in u?Boolean(u.parseRulePrelude):!0,l.parseValue="parseValue"in u?Boolean(u.parseValue):!0,l.parseCustomProperty="parseCustomProperty"in u?Boolean(u.parseCustomProperty):!1;let{context:p="default",onComment:h}=u;if(!(p in l.context))throw new Error("Unknown context `"+p+"`");typeof h=="function"&&l.forEachToken((b,T,N)=>{if(b===25){let C=l.getLocation(T,N),D=ke(t,N-2,N,"*/")?t.slice(T+2,N-2):t.slice(T+2,N);h(D,C)}});let m=l.context[p].call(l,u);return l.eof||l.error(),m},{SyntaxError:Pr,config:l.config})}var ba=ql(da(),1),ga=new Set(["Atrule","Selector","Declaration"]);function ya(e){let t=new ba.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,l=0,c=!1,s=e.node;e.node=function(h){if(h.loc&&h.loc.start&&ga.has(h.type)){let m=h.loc.start.line,b=h.loc.start.column-1;(n.line!==m||n.column!==b)&&(n.line=m,n.column=b,r.line=a,r.column=l,c&&(c=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),c=!0,t.addMapping({source:h.loc.source,original:n,generated:r}))}s.call(this,h),c&&ga.has(h.type)&&(o.line=a,o.column=l)};let u=e.emit;e.emit=function(h,m,b){for(let T=0;T_r,spec:()=>vc});var xc=43,kc=45,Br=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let r=e.charCodeAt(0);return r>127?32768:r<<8}return e},xa=[[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],["/","*"]],wc=xa.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 ka(e){let t=new Set(e.map(([r,n])=>Br(r)<<16|Br(n)));return function(r,n,o){let i=Br(n,o),a=o.charCodeAt(0);return(a===kc&&n!==1&&n!==2&&n!==15||a===xc?t.has(r<<16|a<<8):t.has(r<<16|i))&&this.emit(" ",13,!0),i}}var vc=ka(xa),_r=ka(wc);var Sc=92;function Cc(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n});return}e.children.forEach(this.node,this)}function Ac(e){Le(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function wa(e){let t=new Map;for(let r in e.node){let n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n)}return function(r,n){let o="",i=0,a={node(c){if(t.has(c.type))t.get(c.type).call(l,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:_r,token(c,s){i=this.tokenBefore(i,c,s),this.emit(s,c,!1),c===9&&s.charCodeAt(0)===Sc&&this.emit(` -`,13,!0)},emit(c){o+=c},result(){return o}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=ya(a)),n.mode in $t&&(a.tokenBefore=$t[n.mode]));let l={node:c=>a.node(c),children:Cc,token:(c,s)=>a.token(c,s),tokenize:Ac};return a.node(r),a.result()}}function va(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof w)&&(r.children=new w().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof w&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:Ur}=Object.prototype,bt=function(){};function Sa(e){return typeof e=="function"?e:bt}function Ca(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Ec(e,t){let r=t.structure,n=[];for(let o in r){if(Ur.call(r,o)===!1)continue;let i=r[o],a={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let l of i)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Tc(e){let t={};for(let r in e.node)if(Ur.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Ec(r,n)}return t}function Aa(e,t){let r=e.fields.slice(),n=e.context,o=typeof n=="string";return t&&r.reverse(),function(i,a,l,c){let s;o&&(s=a[n],a[n]=i);for(let u of r){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return!0}else if(l(p))return!0}}o&&(a[n]=s)}}function Ea({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function Ta(e){let t=Tc(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let s in t)Ur.call(t,s)&&t[s]!==null&&(r[s]=Aa(t[s],!1),n[s]=Aa(t[s],!0));let a=Ea(r),l=Ea(n),c=function(s,u){function p(C,D,Ae){let B=h.call(N,C,D,Ae);return B===o?!0:B===i?!1:!!(b.hasOwnProperty(C.type)&&b[C.type](C,N,p,T)||m.call(N,C,D,Ae)===o)}let h=bt,m=bt,b=r,T=(C,D,Ae,B)=>C||p(D,Ae,B),N={break:o,skip:i,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Sa(u.enter),m=Sa(u.leave),u.reverse&&(b=n),u.visit)){if(a.hasOwnProperty(u.visit))b=u.reverse?l[u.visit]:a[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=Ca(h,u.visit),m=Ca(m,u.visit)}if(h===bt&&m===bt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(s)};return c.break=o,c.skip=i,c.find=function(s,u){let p=null;return c(s,function(h,m,b){if(u.call(this,h,m,b))return p=h,o}),p},c.findLast=function(s,u){let p=null;return c(s,{reverse:!0,enter(h,m,b){if(u.call(this,h,m,b))return p=h,o}}),p},c.findAll=function(s,u){let p=[];return c(s,function(h,m,b){u.call(this,h,m,b)&&p.push(h)}),p},c}function Lc(e){return e}function Pc(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function Ic(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function Oc(e,t,r,n){let o=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",i=e.terms.map(a=>jr(a,t,r,n)).join(o);return e.explicit||r?(n||i[0]===","?"[":"[ ")+i+(n?"]":" ]"):i}function jr(e,t,r,n){let o;switch(e.type){case"Group":o=Oc(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return jr(e.term,t,r,n)+t(Pc(e),e);case"Type":o="<"+e.name+(e.opts?t(Ic(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 Ge(e,t){let r=Lc,n=!1,o=!1;return typeof t=="function"?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),typeof t.decorate=="function"&&(r=t.decorate)),jr(e,r,n,o)}var La={offset:0,line:1,column:1};function Dc(e,t){let r=e.tokens,n=e.longestMatch,o=n1?(u=Xt(i||t,"end")||yt(La,s),p=yt(u)):(u=Xt(i,"start")||yt(Xt(t,"start")||La,s.slice(0,a)),p=Xt(i,"end")||yt(u,s.substr(a,l))),{css:s,mismatchOffset:a,mismatchLength:l,start:u,end:p}}function Xt(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?yt(r):r:null}function yt({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let i=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=i.length-1,o.column=i.length===1?o.column+n.length:i.pop().length+1}return o}var Ke=function(e,t){let r=Re("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Pa=function(e,t,r,n){let o=Re("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:l,start:c,end:s}=Dc(n,r);return o.rawMessage=e,o.syntax=t?Ge(t):"",o.css=i,o.mismatchOffset=a,o.mismatchLength=l,o.message=e+` - syntax: `+o.syntax+` - value: `+(i||"")+` - --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,c),o.loc={source:r&&r.loc&&r.loc.source||"",start:c,end:s},o};var Zt=new Map,Qe=new Map,Jt=45,Z=Nc,me=Mc;function er(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)===Jt}function Ia(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Jt&&e.charCodeAt(t+1)!==Jt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function Nc(e){if(Zt.has(e))return Zt.get(e);let t=e.toLowerCase(),r=Zt.get(t);if(r===void 0){let n=er(t,0),o=n?"":Ia(t,0);r=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:n})}return Zt.set(e,r),r}function Mc(e){if(Qe.has(e))return Qe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=er(t,r.length);if(!n&&(t=t.toLowerCase(),Qe.has(t))){let l=Qe.get(t);return Qe.set(e,l),l}let o=n?"":Ia(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return Qe.set(e,a),a}var tr=["initial","inherit","unset","revert","revert-layer"];var kt=43,de=45,qr=110,$e=!0,zc=!1;function Wr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function xt(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Pe(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===kt||o===de){if(r)return 0;t++}for(;t6)return 0}return n}function rr(e,t,r){if(!e)return 0;for(;Vr(r(t),Da);){if(++e>6)return 0;t++}return t}function Gr(e,t){let r=0;if(e===null||e.type!==1||!xe(e.value,0,Bc)||(e=t(++r),e===null))return 0;if(Vr(e,Fc))return e=t(++r),e===null?0:e.type===1?rr(wt(e,0,!0),++r,t):Vr(e,Da)?rr(1,++r,t):0;if(e.type===10){let n=wt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!_c(e,Oa)||!wt(e,1,!1)?0:r+1:rr(n,r,t))}return e.type===12?rr(wt(e,1,!0),++r,t):0}var Uc=["calc(","-moz-calc(","-webkit-calc("],Kr=new Map([[2,22],[21,22],[19,20],[23,24]]),jc=["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"],qc=["deg","grad","rad","turn"],Hc=["s","ms"],Wc=["hz","khz"],Yc=["dpi","dpcm","dppx","x"],Vc=["fr"],Gc=["db"],Kc=["st"];function ue(e,t){return te.max&&typeof e.max!="string")return!0}return!1}function Qc(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Kr.get(e.type);break}o++}while(e=t(o));return o}function le(e){return function(t,r,n){return t===null?0:t.type===2&&Ra(t.value,Uc)?Qc(t,r):e(t,r,n)}}function z(e){return function(t){return t===null||t.type!==e?0:1}}function $c(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Ra(t,tr)||Ma(t,"default")?0:1}function Xc(e){return e===null||e.type!==1||ue(e.value,0)!==45||ue(e.value,1)!==45?0:1}function Zc(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),qa={" ":1,"&&":2,"||":3,"|":4};function sr(e){return e.substringToPos(e.findWsEnd(e.pos))}function Xe(e){let t=e.pos;for(;t=128||vt[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function lr(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function bu(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Ha(e){let t=null,r=null;return e.eat(ar),t=lr(e),e.charCode()===tn?(e.pos++,e.charCode()!==Ua&&(r=lr(e))):r=t,e.eat(Ua),{min:Number(t),max:r?Number(r):0}}function yu(e){let t=null,r=!1;switch(e.charCode()){case Va:e.pos++,t={min:0,max:0};break;case en:e.pos++,t={min:1,max:0};break;case Zr:e.pos++,t={min:0,max:1};break;case Jr:e.pos++,r=!0,e.charCode()===ar?t=Ha(e):e.charCode()===Zr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case ar:t=Ha(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ze(e,t){let r=yu(e);return r!==null?(r.term=t,e.charCode()===Jr&&e.charCodeAt(e.pos-1)===en?Ze(e,r):r):t}function Xr(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function xu(e){let t;return e.eat(rn),e.eat(ir),t=Xe(e),e.eat(ir),e.eat(Ga),Ze(e,{type:"Property",name:t})}function ku(e){let t=null,r=null,n=1;return e.eat(cr),e.charCode()===Ba&&(e.peek(),n=-1),n==-1&&e.charCode()===ja?e.peek():(t=n*Number(lr(e)),vt[e.charCode()]!==0&&(t+=Xe(e))),sr(e),e.eat(tn),sr(e),e.charCode()===ja?e.peek():(n=1,e.charCode()===Ba&&(e.peek(),n=-1),r=n*Number(lr(e)),vt[e.charCode()]!==0&&(r+=Xe(e))),e.eat(nn),{type:"Range",min:t,max:r}}function wu(e){let t,r=null;return e.eat(rn),t=Xe(e),e.charCode()===Ya&&e.nextCharCode()===du&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===cr&&(sr(e),r=ku(e)),e.eat(Ga),Ze(e,{type:"Type",name:t,opts:r})}function vu(e){let t=Xe(e);return e.charCode()===Ya?(e.pos++,{type:"Function",name:t}):Ze(e,{type:"Keyword",name:t})}function Su(e,t){function r(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((o,i)=>qa[o]-qa[i]);t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Ka(e){let t=[],r={},n,o=null,i=e.pos;for(;n=Au(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),r[n.value]=!0):o!==null&&o.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),o=n,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Su(t,r)||" ",disallowEmpty:!1,explicit:!1}}function Cu(e){let t;return e.eat(cr),t=Ka(e),e.eat(nn),t.explicit=!0,e.charCode()===Wa&&(e.pos++,t.disallowEmpty=!0),t}function Au(e){let t=e.charCode();if(t<128&&vt[t]===1)return vu(e);switch(t){case nn:break;case cr:return Ze(e,Cu(e));case rn:return e.nextCharCode()===ir?xu(e):wu(e);case _a:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===_a?2:1))};case Fa:return e.pos++,e.eat(Fa),{type:"Combinator",value:"&&"};case tn:return e.pos++,{type:"Comma"};case ir:return Ze(e,{type:"String",value:bu(e)});case mu:case uu:case pu:case fu:case hu:return{type:"Spaces",value:sr(e)};case gu:return t=e.nextCharCode(),t<128&&vt[t]===1?(e.pos++,{type:"AtKeyword",name:Xe(e)}):Xr(e);case Va:case en:case Zr:case Jr:case Wa:break;case ar:if(t=e.nextCharCode(),t<48||t>57)return Xr(e);break;default:return Xr(e)}}function St(e){let t=new or(e),r=Ka(t);return t.pos!==e.length&&t.error("Unexpected input"),r.terms.length===1&&r.terms[0].type==="Group"?r.terms[0]:r}var Ct=function(){};function Qa(e){return typeof e=="function"?e:Ct}function on(e,t,r){function n(a){switch(o.call(r,a),a.type){case"Group":a.terms.forEach(n);break;case"Multiplier":n(a.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+a.type)}i.call(r,a)}let o=Ct,i=Ct;if(typeof t=="function"?o=t:t&&(o=Qa(t.enter),i=Qa(t.leave)),o===Ct&&i===Ct)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");n(e,r)}var Tu={decorator(e){let t=[],r=null;return{...e,node(n){let o=r;r=n,e.node.call(this,n),r=o},emit(n,o,i){t.push({type:o,value:n,node:i?null:r})},result(){return t}}}};function Lu(e){let t=[];return Le(e,(r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null})),t}function $a(e,t){return typeof e=="string"?Lu(e):t.generate(e,Tu)}var E={type:"Match"},O={type:"Mismatch"},ur={type:"DisallowEmpty"},Pu=40,Iu=41;function ee(e,t,r){return t===E&&r===O||e===E&&t===E&&r===E?e:(e.type==="If"&&e.else===O&&t===E&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function Za(e){return e.length>2&&e.charCodeAt(e.length-2)===Pu&&e.charCodeAt(e.length-1)===Iu}function Xa(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Za(e.name)}function an(e,t,r){switch(e){case" ":{let n=E;for(let o=t.length-1;o>=0;o--){let i=t[o];n=ee(i,n,O)}return n}case"|":{let n=O,o=null;for(let i=t.length-1;i>=0;i--){let a=t[i];if(Xa(a)&&(o===null&&i>0&&Xa(t[i-1])&&(o=Object.create(null),n=ee({type:"Enum",map:o},E,n)),o!==null)){let l=(Za(a.name)?a.name.slice(0,-1):a.name).toLowerCase();if(!(l in o)){o[l]=a;continue}}o=null,n=ee(a,E,n)}return n}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=an(e,t.filter(function(l){return l!==i}),!1):a=E,n=ee(i,a,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?E:O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=an(e,t.filter(function(l){return l!==i}),!0):a=E,n=ee(i,a,n)}return n}}}function Ou(e){let t=E,r=sn(e.term);if(e.max===0)r=ee(r,ur,O),t=ee(r,null,O),t.then=ee(E,E,t),e.comma&&(t.then.else=ee({type:"Comma",syntax:e},t,O));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==E&&(t=ee({type:"Comma",syntax:e},t,O)),t=ee(r,ee(E,E,t),O);if(e.min===0)t=ee(E,E,t);else for(let n=0;n=65&&o<=90&&(o=o|32),o!==n)return!1}return!0}function Bu(e){return e.type!==9?!1:e.value!=="?"}function rs(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||Bu(e)}function ns(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function _u(e,t,r){function n(){do D++,C=DAe&&(Ae=D)}function s(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},B={type:cn,syntax:t.syntax,token:B.token,prev:B}}function u(){B.type===cn?B=B.prev:B={type:os,syntax:p.syntax,token:B.token,prev:B},p=p.prev}let p=null,h=null,m=null,b=null,T=0,N=null,C=null,D=-1,Ae=0,B={type:Du,syntax:null,token:null,prev:null};for(n();N===null&&++Tm.tokenIndex)&&(m=b,b=!1);else if(m===null){N=Mu;break}t=m.nextState,h=m.thenStack,p=m.syntaxStack,B=m.matchStack,D=m.tokenIndex,C=DD){for(;D":"<'"+t.name+"'>"));if(b!==!1&&C!==null&&t.type==="Type"&&(t.name==="custom-ident"&&C.type===1||t.name==="length"&&C.value==="0")){b===null&&(b=i(t,m)),t=O;break}s(),t=te.match;break}case"Keyword":{let J=t.name;if(C!==null){let te=C.value;if(te.indexOf("\\")!==-1&&(te=te.replace(/\\[09].*$/,"")),ln(te,J)){c(),t=E;break}}t=O;break}case"AtKeyword":case"Function":if(C!==null&&ln(C.value,t.name)){c(),t=E;break}t=O;break;case"Token":if(C!==null&&C.value===t.value){c(),t=E;break}t=O;break;case"Comma":C!==null&&C.type===18?rs(B.token)?t=O:(c(),t=ns(C)?O:E):t=rs(B.token)||ns(C)?E:O;break;case"String":let ce="",ye=D;for(;yeis,isKeyword:()=>qu,isProperty:()=>ju,isType:()=>Uu});function is(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function r(o){if(Array.isArray(o.match)){for(let i=0;ir.type==="Type"&&r.name===t)}function ju(e,t){return pn(this,e,r=>r.type==="Property"&&r.name===t)}function qu(e){return pn(this,e,t=>t.type==="Keyword")}function pn(e,t,r){let n=is.call(e,t);return n===null?!1:n.some(r)}function as(e){return"node"in e?e.node:as(e.match[0])}function ss(e){return"node"in e?e.node:ss(e.match[e.match.length-1])}function fn(e,t,r,n,o){function i(l){if(l.syntax!==null&&l.syntax.type===n&&l.syntax.name===o){let c=as(l),s=ss(l);e.syntax.walk(t,function(u,p,h){if(u===c){let m=new w;do{if(m.appendData(p.data),p.data===s)break;p=p.next}while(p!==null);a.push({parent:h,nodes:m})}})}Array.isArray(l.match)&&l.match.forEach(i)}let a=[];return r.matched!==null&&i(r.matched),a}var{hasOwnProperty:At}=Object.prototype;function mn(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ls(e){return Boolean(e)&&mn(e.offset)&&mn(e.line)&&mn(e.column)}function Hu(e,t){return function(n,o){if(!n||n.constructor!==Object)return o(n,"Type of node should be an Object");for(let i in n){let a=!0;if(At.call(n,i)!==!1){if(i==="type")n.type!==e&&o(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(i==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")i+=".source";else if(!ls(n.loc.start))i+=".start";else if(!ls(n.loc.end))i+=".end";else continue;a=!1}else if(t.hasOwnProperty(i)){a=!1;for(let l=0;!a&&l");else if(Array.isArray(s))a.push("List");else throw new Error("Wrong value `"+s+"` in `"+e+"."+i+"` structure definition")}o[i]=a.join(" | ")}return{docs:o,check:Hu(e,n)}}function cs(e){let t={};if(e.node){for(let r in e.node)if(At.call(e.node,r)){let n=e.node[r];if(n.structure)t[r]=Wu(r,n);else throw new Error("Missed `structure` field in `"+r+"` node type definition")}}return t}var Yu=pr(tr.join(" | "));function dn(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Ge(e[o].syntax,{compact:t}));return n}function Vu(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Ge(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&dn(i.descriptors,t,r)};return n}function Gu(e){for(let t=0;t(n[o]=this.createDescriptor(r.descriptors[o],"AtruleDescriptor",o,t),n),Object.create(null)):null})}addProperty_(t,r){!r||(this.properties[t]=this.createDescriptor(r,"Property",t))}addType_(t,r){!r||(this.types[t]=this.createDescriptor(r,"Type",t))}checkAtruleName(t){if(!this.getAtrule(t))return new Ke("Unknown at-rule","@"+t)}checkAtrulePrelude(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t);if(!o.prelude&&r)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!r&&!Je(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t),i=Z(r);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new Ke("Unknown at-rule descriptor",r)}checkPropertyName(t){if(!this.getProperty(t))return new Ke("Unknown property",t)}matchAtrulePrelude(t,r){let n=this.checkAtrulePrelude(t,r);return n?ge(null,n):Je(this,this.getAtrule(t).prelude,r||"",!1)}matchAtruleDescriptor(t,r,n){let o=this.checkAtruleDescriptorName(t,r);if(o)return ge(null,o);let i=this.getAtrule(t),a=Z(r);return Je(this,i.descriptors[a.name]||i.descriptors[a.basename],n,!1)}matchDeclaration(t){return t.type!=="Declaration"?ge(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,r){if(me(t).custom)return ge(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(t);return n?ge(null,n):Je(this,this.getProperty(t),r,!0)}matchType(t,r){let n=this.getType(t);return n?Je(this,n,r,!1):ge(null,new Ke("Unknown type",t))}match(t,r){return typeof t!="string"&&(!t||!t.type)?ge(null,new Ke("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),Je(this,t,r,!1))}findValueFragments(t,r,n,o){return fn(this,r,this.matchProperty(t,r),n,o)}findDeclarationValueFragments(t,r,n){return fn(this,t.value,this.matchDeclaration(t),r,n)}findAllFragments(t,r,n){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,r,n))}}),o}getAtrule(t,r=!0){let n=Z(t);return(n.vendor&&r?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(t,r=!0){let n=this.getAtrule(t,r);return n&&n.prelude||null}getAtruleDescriptor(t,r){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[r]||null}getProperty(t,r=!0){let n=me(t);return(n.vendor&&r?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(o,i,a,l){if(a.has(i))return a.get(i);a.set(i,!1),l.syntax!==null&&on(l.syntax,function(c){if(c.type!=="Type"&&c.type!=="Property")return;let s=c.type==="Type"?o.types:o.properties,u=c.type==="Type"?r:n;(!hasOwnProperty.call(s,c.name)||t(o,c.name,u,s[c.name]))&&a.set(i,!0)},this)}let r=new Map,n=new Map;for(let o in this.types)t(this,o,r,this.types[o]);for(let o in this.properties)t(this,o,n,this.properties[o]);return r=[...r.keys()].filter(o=>r.get(o)),n=[...n.keys()].filter(o=>n.get(o)),r.length||n.length?{types:r,properties:n}:null}dump(t,r){return{generic:this.generic,types:dn(this.types,!r,t),properties:dn(this.properties,!r,t),atrules:Vu(this.atrules,!r,t)}}toString(){return JSON.stringify(this.dump())}};var{hasOwnProperty:tt}=Object.prototype,Ku={generic:!0,types:gn,atrules:{prelude:ps,descriptors:ps},properties:gn,parseContext:Qu,scope:fs,atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function hr(e){return e&&e.constructor===Object}function hs(e){return hr(e)?{...e}:e}function Qu(e,t){return Object.assign(e,t)}function fs(e,t){for(let r in t)tt.call(t,r)&&(hr(e[r])?fs(e[r],t[r]):e[r]=hs(t[r]));return e}function us(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function gn(e,t){if(typeof t=="string")return us(e,t);let r={...e};for(let n in t)tt.call(t,n)&&(r[n]=us(tt.call(e,n)?e[n]:void 0,t[n]));return r}function ps(e,t){let r=gn(e,t);return!hr(r)||Object.keys(r).length?r:null}function Et(e,t,r){for(let n in r)if(tt.call(r,n)!==!1){if(r[n]===!0)tt.call(t,n)&&(e[n]=hs(t[n]));else if(r[n]){if(typeof r[n]=="function"){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if(hr(r[n])){let o={};for(let i in e[n])o[i]=Et({},e[n][i],r[n]);for(let i in t[n])o[i]=Et(o[i]||{},t[n][i],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce(function(a,l){return a[l]=!0,a},{});for(let[a,l]of Object.entries(e[n]||{}))o[a]={},l&&Et(o[a],l,i);for(let a in t[n])tt.call(t[n],a)&&(o[a]||(o[a]={}),t[n]&&t[n][a]&&Et(o[a],t[n][a],i));e[n]=o}}}return e}var fr=(e,t)=>Et(e,t,Ku);function ms(e){let t=$i(e),r=Ta(e),n=wa(e),{fromPlainObject:o,toPlainObject:i}=va(r),a={lexer:null,createLexer:l=>new et(l,a,a.lexer.structure),tokenize:Le,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(l){let c=fr({},e);return ms(typeof l=="function"?l(c,Object.assign):fr(c,l))}};return a.lexer=new et({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var bn=e=>ms(fr({},e));var ds={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","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":"|||( )","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( [] )",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( , ? )","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'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","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]]? )",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|","layer()":"layer( )","layer-name":" ['.' ]*","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 ]? , )","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] )","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( )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","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 ]? , )","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","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 ]? , )","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( [|] )","saturate()":"saturate( )","scale()":"scale( , ? )","scale3d()":"scale3d( , , )","scaleX()":"scaleX( )","scaleY()":"scaleY( )","scaleZ()":"scaleZ( )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","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]","single-animation":"