vite 8.0.0-beta.1 → 8.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build2.js +787 -787
- package/dist/node/chunks/lib.js +7 -7
- package/dist/node/chunks/node.js +4220 -4131
- package/dist/node/chunks/postcss-import.js +15 -15
- package/dist/node/index.d.ts +22 -5
- package/package.json +10 -10
|
@@ -29,11 +29,11 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.default = unquote;
|
|
31
31
|
const reg = /['"]/;
|
|
32
|
-
function unquote(str
|
|
33
|
-
if (!str
|
|
34
|
-
if (reg.test(str
|
|
35
|
-
if (reg.test(str
|
|
36
|
-
return str
|
|
32
|
+
function unquote(str) {
|
|
33
|
+
if (!str) return "";
|
|
34
|
+
if (reg.test(str.charAt(0))) str = str.substr(1);
|
|
35
|
+
if (reg.test(str.charAt(str.length - 1))) str = str.substr(0, str.length - 1);
|
|
36
|
+
return str;
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41
41
|
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
42
42
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43
43
|
const matchValueName = /[$]?[\w-]+/g;
|
|
44
|
-
const replaceValueSymbols
|
|
44
|
+
const replaceValueSymbols = (value, replacements) => {
|
|
45
45
|
let matches;
|
|
46
46
|
while (matches = matchValueName.exec(value)) {
|
|
47
47
|
const replacement = replacements[matches[0]];
|
|
@@ -52,21 +52,21 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
52
52
|
}
|
|
53
53
|
return value;
|
|
54
54
|
};
|
|
55
|
-
module.exports = replaceValueSymbols
|
|
55
|
+
module.exports = replaceValueSymbols;
|
|
56
56
|
}));
|
|
57
57
|
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceSymbols.js
|
|
60
60
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
61
|
-
const replaceValueSymbols
|
|
62
|
-
const replaceSymbols
|
|
61
|
+
const replaceValueSymbols = require_replaceValueSymbols();
|
|
62
|
+
const replaceSymbols = (css, replacements) => {
|
|
63
63
|
css.walk((node) => {
|
|
64
|
-
if (node.type === "decl" && node.value) node.value = replaceValueSymbols
|
|
65
|
-
else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols
|
|
66
|
-
else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols
|
|
64
|
+
if (node.type === "decl" && node.value) node.value = replaceValueSymbols(node.value.toString(), replacements);
|
|
65
|
+
else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols(node.selector.toString(), replacements);
|
|
66
|
+
else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols(node.params.toString(), replacements);
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
module.exports = replaceSymbols
|
|
69
|
+
module.exports = replaceSymbols;
|
|
70
70
|
}));
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
@@ -88,7 +88,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88
88
|
* @param {boolean} removeRules
|
|
89
89
|
* @param {'auto' | 'rule' | 'at-rule'} mode
|
|
90
90
|
*/
|
|
91
|
-
const extractICSS
|
|
91
|
+
const extractICSS = (css, removeRules = true, mode = "auto") => {
|
|
92
92
|
const icssImports = {};
|
|
93
93
|
const icssExports = {};
|
|
94
94
|
function addImports(node, path$2) {
|
|
@@ -121,7 +121,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
121
121
|
icssExports
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
module.exports = extractICSS
|
|
124
|
+
module.exports = extractICSS;
|
|
125
125
|
}));
|
|
126
126
|
|
|
127
127
|
//#endregion
|
|
@@ -165,8 +165,8 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
165
165
|
rule.append(declarations);
|
|
166
166
|
return [rule];
|
|
167
167
|
};
|
|
168
|
-
const createICSSRules
|
|
169
|
-
module.exports = createICSSRules
|
|
168
|
+
const createICSSRules = (imports, exports$1, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$1, postcss, mode)];
|
|
169
|
+
module.exports = createICSSRules;
|
|
170
170
|
}));
|
|
171
171
|
|
|
172
172
|
//#endregion
|
|
@@ -174,12 +174,12 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
174
174
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
175
175
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
176
176
|
const replaceSymbols = require_replaceSymbols();
|
|
177
|
-
const extractICSS
|
|
177
|
+
const extractICSS = require_extractICSS();
|
|
178
178
|
const createICSSRules = require_createICSSRules();
|
|
179
179
|
module.exports = {
|
|
180
180
|
replaceValueSymbols,
|
|
181
181
|
replaceSymbols,
|
|
182
|
-
extractICSS
|
|
182
|
+
extractICSS,
|
|
183
183
|
createICSSRules
|
|
184
184
|
};
|
|
185
185
|
}));
|
|
@@ -191,7 +191,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
191
191
|
exports.default = void 0;
|
|
192
192
|
var _icssUtils = require_src$4();
|
|
193
193
|
const importRegexp = /^:import\((.+)\)$/;
|
|
194
|
-
var Parser
|
|
194
|
+
var Parser = class {
|
|
195
195
|
constructor(pathFetcher, trace) {
|
|
196
196
|
this.pathFetcher = pathFetcher;
|
|
197
197
|
this.plugin = this.plugin.bind(this);
|
|
@@ -200,13 +200,13 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
200
200
|
this.trace = trace;
|
|
201
201
|
}
|
|
202
202
|
plugin() {
|
|
203
|
-
const parser
|
|
203
|
+
const parser = this;
|
|
204
204
|
return {
|
|
205
205
|
postcssPlugin: "css-modules-parser",
|
|
206
206
|
async OnceExit(css) {
|
|
207
|
-
await Promise.all(parser
|
|
208
|
-
parser
|
|
209
|
-
return parser
|
|
207
|
+
await Promise.all(parser.fetchAllImports(css));
|
|
208
|
+
parser.linkImportedSymbols(css);
|
|
209
|
+
return parser.extractExports(css);
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
}
|
|
@@ -250,7 +250,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
exports.default = Parser
|
|
253
|
+
exports.default = Parser;
|
|
254
254
|
}));
|
|
255
255
|
|
|
256
256
|
//#endregion
|
|
@@ -258,10 +258,10 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
258
258
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
259
259
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
260
260
|
exports.default = saveJSON;
|
|
261
|
-
var _fs
|
|
261
|
+
var _fs = require_fs();
|
|
262
262
|
function saveJSON(cssFile, json) {
|
|
263
263
|
return new Promise((resolve, reject) => {
|
|
264
|
-
const { writeFile } = (0, _fs
|
|
264
|
+
const { writeFile } = (0, _fs.getFileSystem)();
|
|
265
265
|
writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json));
|
|
266
266
|
});
|
|
267
267
|
}
|
|
@@ -534,7 +534,7 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
534
534
|
/** Detect free variable `self`. */
|
|
535
535
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
536
536
|
/** Used as a reference to the global object. */
|
|
537
|
-
var root
|
|
537
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
538
538
|
/**
|
|
539
539
|
* A specialized version of `_.reduce` for arrays without support for
|
|
540
540
|
* iteratee shorthands.
|
|
@@ -560,8 +560,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
560
560
|
* @param {string} string The string to convert.
|
|
561
561
|
* @returns {Array} Returns the converted array.
|
|
562
562
|
*/
|
|
563
|
-
function asciiToArray(string
|
|
564
|
-
return string
|
|
563
|
+
function asciiToArray(string) {
|
|
564
|
+
return string.split("");
|
|
565
565
|
}
|
|
566
566
|
/**
|
|
567
567
|
* Splits an ASCII `string` into an array of its words.
|
|
@@ -570,8 +570,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
570
570
|
* @param {string} The string to inspect.
|
|
571
571
|
* @returns {Array} Returns the words of `string`.
|
|
572
572
|
*/
|
|
573
|
-
function asciiWords(string
|
|
574
|
-
return string
|
|
573
|
+
function asciiWords(string) {
|
|
574
|
+
return string.match(reAsciiWord) || [];
|
|
575
575
|
}
|
|
576
576
|
/**
|
|
577
577
|
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
@@ -601,8 +601,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
601
601
|
* @param {string} string The string to inspect.
|
|
602
602
|
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
603
603
|
*/
|
|
604
|
-
function hasUnicode(string
|
|
605
|
-
return reHasUnicode.test(string
|
|
604
|
+
function hasUnicode(string) {
|
|
605
|
+
return reHasUnicode.test(string);
|
|
606
606
|
}
|
|
607
607
|
/**
|
|
608
608
|
* Checks if `string` contains a word composed of Unicode symbols.
|
|
@@ -611,8 +611,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
611
611
|
* @param {string} string The string to inspect.
|
|
612
612
|
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
613
613
|
*/
|
|
614
|
-
function hasUnicodeWord(string
|
|
615
|
-
return reHasUnicodeWord.test(string
|
|
614
|
+
function hasUnicodeWord(string) {
|
|
615
|
+
return reHasUnicodeWord.test(string);
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
618
|
* Converts `string` to an array.
|
|
@@ -621,8 +621,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
621
621
|
* @param {string} string The string to convert.
|
|
622
622
|
* @returns {Array} Returns the converted array.
|
|
623
623
|
*/
|
|
624
|
-
function stringToArray(string
|
|
625
|
-
return hasUnicode(string
|
|
624
|
+
function stringToArray(string) {
|
|
625
|
+
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
626
626
|
}
|
|
627
627
|
/**
|
|
628
628
|
* Converts a Unicode `string` to an array.
|
|
@@ -631,8 +631,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
631
631
|
* @param {string} string The string to convert.
|
|
632
632
|
* @returns {Array} Returns the converted array.
|
|
633
633
|
*/
|
|
634
|
-
function unicodeToArray(string
|
|
635
|
-
return string
|
|
634
|
+
function unicodeToArray(string) {
|
|
635
|
+
return string.match(reUnicode) || [];
|
|
636
636
|
}
|
|
637
637
|
/**
|
|
638
638
|
* Splits a Unicode `string` into an array of its words.
|
|
@@ -641,8 +641,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
641
641
|
* @param {string} The string to inspect.
|
|
642
642
|
* @returns {Array} Returns the words of `string`.
|
|
643
643
|
*/
|
|
644
|
-
function unicodeWords(string
|
|
645
|
-
return string
|
|
644
|
+
function unicodeWords(string) {
|
|
645
|
+
return string.match(reUnicodeWord) || [];
|
|
646
646
|
}
|
|
647
647
|
/**
|
|
648
648
|
* Used to resolve the
|
|
@@ -651,9 +651,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
651
651
|
*/
|
|
652
652
|
var objectToString = Object.prototype.toString;
|
|
653
653
|
/** Built-in value references. */
|
|
654
|
-
var Symbol
|
|
654
|
+
var Symbol = root.Symbol;
|
|
655
655
|
/** Used to convert symbols to primitives and strings. */
|
|
656
|
-
var symbolProto = Symbol
|
|
656
|
+
var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
657
657
|
/**
|
|
658
658
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
659
659
|
*
|
|
@@ -710,11 +710,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
710
710
|
* @returns {Function} Returns the new case function.
|
|
711
711
|
*/
|
|
712
712
|
function createCaseFirst(methodName) {
|
|
713
|
-
return function(string
|
|
714
|
-
string
|
|
715
|
-
var strSymbols = hasUnicode(string
|
|
716
|
-
var chr = strSymbols ? strSymbols[0] : string
|
|
717
|
-
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string
|
|
713
|
+
return function(string) {
|
|
714
|
+
string = toString(string);
|
|
715
|
+
var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
|
|
716
|
+
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
717
|
+
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
718
718
|
return chr[methodName]() + trailing;
|
|
719
719
|
};
|
|
720
720
|
}
|
|
@@ -726,8 +726,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
726
726
|
* @returns {Function} Returns the new compounder function.
|
|
727
727
|
*/
|
|
728
728
|
function createCompounder(callback) {
|
|
729
|
-
return function(string
|
|
730
|
-
return arrayReduce(words(deburr(string
|
|
729
|
+
return function(string) {
|
|
730
|
+
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
|
|
731
731
|
};
|
|
732
732
|
}
|
|
733
733
|
/**
|
|
@@ -821,9 +821,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
821
821
|
* _.camelCase('__FOO_BAR__');
|
|
822
822
|
* // => 'fooBar'
|
|
823
823
|
*/
|
|
824
|
-
var camelCase = createCompounder(function(result, word
|
|
825
|
-
word
|
|
826
|
-
return result + (index ? capitalize(word
|
|
824
|
+
var camelCase = createCompounder(function(result, word, index) {
|
|
825
|
+
word = word.toLowerCase();
|
|
826
|
+
return result + (index ? capitalize(word) : word);
|
|
827
827
|
});
|
|
828
828
|
/**
|
|
829
829
|
* Converts the first character of `string` to upper case and the remaining
|
|
@@ -840,8 +840,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
840
840
|
* _.capitalize('FRED');
|
|
841
841
|
* // => 'Fred'
|
|
842
842
|
*/
|
|
843
|
-
function capitalize(string
|
|
844
|
-
return upperFirst(toString(string
|
|
843
|
+
function capitalize(string) {
|
|
844
|
+
return upperFirst(toString(string).toLowerCase());
|
|
845
845
|
}
|
|
846
846
|
/**
|
|
847
847
|
* Deburrs `string` by converting
|
|
@@ -861,9 +861,9 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
861
861
|
* _.deburr('déjà vu');
|
|
862
862
|
* // => 'deja vu'
|
|
863
863
|
*/
|
|
864
|
-
function deburr(string
|
|
865
|
-
string
|
|
866
|
-
return string
|
|
864
|
+
function deburr(string) {
|
|
865
|
+
string = toString(string);
|
|
866
|
+
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
867
867
|
}
|
|
868
868
|
/**
|
|
869
869
|
* Converts the first character of `string` to upper case.
|
|
@@ -902,11 +902,11 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
902
902
|
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
903
903
|
* // => ['fred', 'barney', '&', 'pebbles']
|
|
904
904
|
*/
|
|
905
|
-
function words(string
|
|
906
|
-
string
|
|
905
|
+
function words(string, pattern, guard) {
|
|
906
|
+
string = toString(string);
|
|
907
907
|
pattern = guard ? void 0 : pattern;
|
|
908
|
-
if (pattern === void 0) return hasUnicodeWord(string
|
|
909
|
-
return string
|
|
908
|
+
if (pattern === void 0) return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
909
|
+
return string.match(pattern) || [];
|
|
910
910
|
}
|
|
911
911
|
module.exports = camelCase;
|
|
912
912
|
}));
|
|
@@ -916,38 +916,38 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
916
916
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
917
917
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
918
918
|
exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
|
|
919
|
-
var _lodash = _interopRequireDefault
|
|
920
|
-
function _interopRequireDefault
|
|
919
|
+
var _lodash = _interopRequireDefault(require_lodash());
|
|
920
|
+
function _interopRequireDefault(obj) {
|
|
921
921
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
922
922
|
}
|
|
923
|
-
function dashesCamelCase(string
|
|
924
|
-
return string
|
|
923
|
+
function dashesCamelCase(string) {
|
|
924
|
+
return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
|
|
925
925
|
}
|
|
926
926
|
function makeLocalsConventionReducer(localsConvention, inputFile) {
|
|
927
927
|
const isFunc = typeof localsConvention === "function";
|
|
928
|
-
return (tokens
|
|
928
|
+
return (tokens, [className, value]) => {
|
|
929
929
|
if (isFunc) {
|
|
930
|
-
const convention = localsConvention(className
|
|
931
|
-
tokens
|
|
932
|
-
return tokens
|
|
930
|
+
const convention = localsConvention(className, value, inputFile);
|
|
931
|
+
tokens[convention] = value;
|
|
932
|
+
return tokens;
|
|
933
933
|
}
|
|
934
934
|
switch (localsConvention) {
|
|
935
935
|
case "camelCase":
|
|
936
|
-
tokens
|
|
937
|
-
tokens
|
|
936
|
+
tokens[className] = value;
|
|
937
|
+
tokens[(0, _lodash.default)(className)] = value;
|
|
938
938
|
break;
|
|
939
939
|
case "camelCaseOnly":
|
|
940
|
-
tokens
|
|
940
|
+
tokens[(0, _lodash.default)(className)] = value;
|
|
941
941
|
break;
|
|
942
942
|
case "dashes":
|
|
943
|
-
tokens
|
|
944
|
-
tokens
|
|
943
|
+
tokens[className] = value;
|
|
944
|
+
tokens[dashesCamelCase(className)] = value;
|
|
945
945
|
break;
|
|
946
946
|
case "dashesOnly":
|
|
947
|
-
tokens
|
|
947
|
+
tokens[dashesCamelCase(className)] = value;
|
|
948
948
|
break;
|
|
949
949
|
}
|
|
950
|
-
return tokens
|
|
950
|
+
return tokens;
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
953
|
}));
|
|
@@ -957,11 +957,11 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
957
957
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
958
958
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
959
959
|
exports.default = void 0;
|
|
960
|
-
var _postcss$1 = _interopRequireDefault
|
|
961
|
-
var _path = _interopRequireDefault
|
|
962
|
-
var _Parser
|
|
963
|
-
var _fs
|
|
964
|
-
function _interopRequireDefault
|
|
960
|
+
var _postcss$1 = _interopRequireDefault(__require("postcss"));
|
|
961
|
+
var _path = _interopRequireDefault(__require("path"));
|
|
962
|
+
var _Parser = _interopRequireDefault(require_Parser());
|
|
963
|
+
var _fs = require_fs();
|
|
964
|
+
function _interopRequireDefault(obj) {
|
|
965
965
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
966
966
|
}
|
|
967
967
|
var Core = class Core {
|
|
@@ -969,11 +969,11 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
969
969
|
this.plugins = plugins || Core.defaultPlugins;
|
|
970
970
|
}
|
|
971
971
|
async load(sourceString, sourcePath, trace, pathFetcher) {
|
|
972
|
-
const parser
|
|
973
|
-
const plugins = this.plugins.concat([parser
|
|
972
|
+
const parser = new _Parser.default(pathFetcher, trace);
|
|
973
|
+
const plugins = this.plugins.concat([parser.plugin()]);
|
|
974
974
|
return {
|
|
975
975
|
injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css,
|
|
976
|
-
exportTokens: parser
|
|
976
|
+
exportTokens: parser.exportTokens
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
979
|
};
|
|
@@ -983,20 +983,20 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
983
983
|
return a < b ? -1 : 1;
|
|
984
984
|
};
|
|
985
985
|
var FileSystemLoader = class {
|
|
986
|
-
constructor(root
|
|
987
|
-
if (root
|
|
986
|
+
constructor(root, plugins, fileResolve) {
|
|
987
|
+
if (root === "/" && process.platform === "win32") {
|
|
988
988
|
const cwdDrive = process.cwd().slice(0, 3);
|
|
989
989
|
if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`);
|
|
990
|
-
root
|
|
990
|
+
root = cwdDrive;
|
|
991
991
|
}
|
|
992
|
-
this.root = root
|
|
992
|
+
this.root = root;
|
|
993
993
|
this.fileResolve = fileResolve;
|
|
994
994
|
this.sources = {};
|
|
995
995
|
this.traces = {};
|
|
996
996
|
this.importNr = 0;
|
|
997
997
|
this.core = new Core(plugins);
|
|
998
998
|
this.tokensByFile = {};
|
|
999
|
-
this.fs = (0, _fs
|
|
999
|
+
this.fs = (0, _fs.getFileSystem)();
|
|
1000
1000
|
}
|
|
1001
1001
|
async fetch(_newPath, relativeTo, _trace) {
|
|
1002
1002
|
const newPath = _newPath.replace(/^["']|["']$/g, "");
|
|
@@ -1010,8 +1010,8 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1010
1010
|
if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
|
|
1011
1011
|
fileRelativePath = __require.resolve(newPath);
|
|
1012
1012
|
} catch (e) {}
|
|
1013
|
-
const tokens
|
|
1014
|
-
if (tokens
|
|
1013
|
+
const tokens = this.tokensByFile[fileRelativePath];
|
|
1014
|
+
if (tokens) return tokens;
|
|
1015
1015
|
return new Promise((resolve, reject) => {
|
|
1016
1016
|
this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
|
|
1017
1017
|
if (err) reject(err);
|
|
@@ -1057,32 +1057,32 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
1057
1057
|
state[node] = TEMPORARY_MARKER;
|
|
1058
1058
|
const children = graph[node];
|
|
1059
1059
|
const length = children.length;
|
|
1060
|
-
for (let i
|
|
1061
|
-
const error = walkGraph(children[i
|
|
1060
|
+
for (let i = 0; i < length; ++i) {
|
|
1061
|
+
const error = walkGraph(children[i], graph, state, result, strict);
|
|
1062
1062
|
if (error instanceof Error) return error;
|
|
1063
1063
|
}
|
|
1064
1064
|
state[node] = PERMANENT_MARKER;
|
|
1065
1065
|
result.push(node);
|
|
1066
1066
|
}
|
|
1067
|
-
function topologicalSort
|
|
1067
|
+
function topologicalSort(graph, strict) {
|
|
1068
1068
|
const result = [];
|
|
1069
1069
|
const state = {};
|
|
1070
1070
|
const nodes = Object.keys(graph);
|
|
1071
1071
|
const length = nodes.length;
|
|
1072
|
-
for (let i
|
|
1073
|
-
const er = walkGraph(nodes[i
|
|
1072
|
+
for (let i = 0; i < length; ++i) {
|
|
1073
|
+
const er = walkGraph(nodes[i], graph, state, result, strict);
|
|
1074
1074
|
if (er instanceof Error) return er;
|
|
1075
1075
|
}
|
|
1076
1076
|
return result;
|
|
1077
1077
|
}
|
|
1078
|
-
module.exports = topologicalSort
|
|
1078
|
+
module.exports = topologicalSort;
|
|
1079
1079
|
}));
|
|
1080
1080
|
|
|
1081
1081
|
//#endregion
|
|
1082
1082
|
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/index.js
|
|
1083
1083
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1084
1084
|
const topologicalSort = require_topologicalSort();
|
|
1085
|
-
const matchImports
|
|
1085
|
+
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
1086
1086
|
const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
|
|
1087
1087
|
const VISITED_MARKER = 1;
|
|
1088
1088
|
/**
|
|
@@ -1130,8 +1130,8 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1130
1130
|
const existingImports = {};
|
|
1131
1131
|
const importDecls = {};
|
|
1132
1132
|
const imports = {};
|
|
1133
|
-
return { Once(root
|
|
1134
|
-
root
|
|
1133
|
+
return { Once(root, postcss) {
|
|
1134
|
+
root.walkRules((rule) => {
|
|
1135
1135
|
const matches = icssImport.exec(rule.selector);
|
|
1136
1136
|
if (matches) {
|
|
1137
1137
|
const [, doubleQuotePath, singleQuotePath] = matches;
|
|
@@ -1140,11 +1140,11 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1140
1140
|
existingImports[importPath] = rule;
|
|
1141
1141
|
}
|
|
1142
1142
|
});
|
|
1143
|
-
root
|
|
1143
|
+
root.walkDecls(/^composes$/, (declaration) => {
|
|
1144
1144
|
const multiple = declaration.value.split(",");
|
|
1145
1145
|
const values = [];
|
|
1146
1146
|
multiple.forEach((value) => {
|
|
1147
|
-
const matches = value.trim().match(matchImports
|
|
1147
|
+
const matches = value.trim().match(matchImports);
|
|
1148
1148
|
if (!matches) {
|
|
1149
1149
|
values.push(value);
|
|
1150
1150
|
return;
|
|
@@ -1160,8 +1160,8 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1160
1160
|
parentIndexes = parent.parent.index(parent) + "_" + parentIndexes;
|
|
1161
1161
|
parent = parent.parent;
|
|
1162
1162
|
}
|
|
1163
|
-
const { selector
|
|
1164
|
-
addImportToGraph(importPath, `_${parentIndexes}${selector
|
|
1163
|
+
const { selector } = declaration.parent;
|
|
1164
|
+
addImportToGraph(importPath, `_${parentIndexes}${selector}`, graph, visited);
|
|
1165
1165
|
importDecls[importPath] = declaration;
|
|
1166
1166
|
imports[importPath] = imports[importPath] || {};
|
|
1167
1167
|
tmpSymbols = symbols.split(/\s+/).map((s) => {
|
|
@@ -1187,8 +1187,8 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1187
1187
|
selector: `:import("${path$2}")`,
|
|
1188
1188
|
raws: { after: "\n" }
|
|
1189
1189
|
});
|
|
1190
|
-
if (lastImportRule) root
|
|
1191
|
-
else root
|
|
1190
|
+
if (lastImportRule) root.insertAfter(lastImportRule, rule);
|
|
1191
|
+
else root.prepend(rule);
|
|
1192
1192
|
}
|
|
1193
1193
|
lastImportRule = rule;
|
|
1194
1194
|
if (!importedSymbols) return;
|
|
@@ -1210,7 +1210,7 @@ var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1210
1210
|
//#endregion
|
|
1211
1211
|
//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js
|
|
1212
1212
|
var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1213
|
-
const MAX_SHORT_STRING
|
|
1213
|
+
const MAX_SHORT_STRING = Math.floor(65472 / 4) & -4;
|
|
1214
1214
|
var WasmHash = class {
|
|
1215
1215
|
/**
|
|
1216
1216
|
* @param {WebAssembly.Instance} instance wasm instance
|
|
@@ -1239,9 +1239,9 @@ var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1239
1239
|
*/
|
|
1240
1240
|
update(data, encoding) {
|
|
1241
1241
|
if (typeof data === "string") {
|
|
1242
|
-
while (data.length > MAX_SHORT_STRING
|
|
1243
|
-
this._updateWithShortString(data.slice(0, MAX_SHORT_STRING
|
|
1244
|
-
data = data.slice(MAX_SHORT_STRING
|
|
1242
|
+
while (data.length > MAX_SHORT_STRING) {
|
|
1243
|
+
this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding);
|
|
1244
|
+
data = data.slice(MAX_SHORT_STRING);
|
|
1245
1245
|
}
|
|
1246
1246
|
this._updateWithShortString(data, encoding);
|
|
1247
1247
|
return this;
|
|
@@ -1259,22 +1259,22 @@ var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1259
1259
|
let endPos;
|
|
1260
1260
|
if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") {
|
|
1261
1261
|
endPos = buffered;
|
|
1262
|
-
for (let i
|
|
1263
|
-
const cc = data.charCodeAt(i
|
|
1262
|
+
for (let i = 0; i < data.length; i++) {
|
|
1263
|
+
const cc = data.charCodeAt(i);
|
|
1264
1264
|
if (cc < 128) mem[endPos++] = cc;
|
|
1265
1265
|
else if (cc < 2048) {
|
|
1266
1266
|
mem[endPos] = cc >> 6 | 192;
|
|
1267
1267
|
mem[endPos + 1] = cc & 63 | 128;
|
|
1268
1268
|
endPos += 2;
|
|
1269
1269
|
} else {
|
|
1270
|
-
endPos += mem.write(data.slice(i
|
|
1270
|
+
endPos += mem.write(data.slice(i), endPos, encoding);
|
|
1271
1271
|
break;
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
} else if (encoding === "latin1") {
|
|
1275
1275
|
endPos = buffered;
|
|
1276
|
-
for (let i
|
|
1277
|
-
const cc = data.charCodeAt(i
|
|
1276
|
+
for (let i = 0; i < data.length; i++) {
|
|
1277
|
+
const cc = data.charCodeAt(i);
|
|
1278
1278
|
mem[endPos++] = cc;
|
|
1279
1279
|
}
|
|
1280
1280
|
} else endPos = buffered + mem.write(data, buffered, encoding);
|
|
@@ -1301,17 +1301,17 @@ var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1301
1301
|
} else {
|
|
1302
1302
|
const l = buffered + length & ~(this.chunkSize - 1);
|
|
1303
1303
|
if (l > 65536) {
|
|
1304
|
-
let i
|
|
1305
|
-
data.copy(mem, buffered, 0, i
|
|
1304
|
+
let i = 65536 - buffered;
|
|
1305
|
+
data.copy(mem, buffered, 0, i);
|
|
1306
1306
|
exports$1.update(65536);
|
|
1307
1307
|
const stop = l - buffered - 65536;
|
|
1308
|
-
while (i
|
|
1309
|
-
data.copy(mem, 0, i
|
|
1308
|
+
while (i < stop) {
|
|
1309
|
+
data.copy(mem, 0, i, i + 65536);
|
|
1310
1310
|
exports$1.update(65536);
|
|
1311
|
-
i
|
|
1311
|
+
i += 65536;
|
|
1312
1312
|
}
|
|
1313
|
-
data.copy(mem, 0, i
|
|
1314
|
-
exports$1.update(l - buffered - i
|
|
1313
|
+
data.copy(mem, 0, i, l - buffered);
|
|
1314
|
+
exports$1.update(l - buffered - i);
|
|
1315
1315
|
} else {
|
|
1316
1316
|
data.copy(mem, buffered, 0, l - buffered);
|
|
1317
1317
|
exports$1.update(l);
|
|
@@ -1325,40 +1325,40 @@ var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1325
1325
|
const { exports: exports$1, buffered, mem, digestSize } = this;
|
|
1326
1326
|
exports$1.final(buffered);
|
|
1327
1327
|
this.instancesPool.push(this);
|
|
1328
|
-
const hex
|
|
1329
|
-
if (type === "hex") return hex
|
|
1330
|
-
if (type === "binary" || !type) return Buffer.from(hex
|
|
1331
|
-
return Buffer.from(hex
|
|
1328
|
+
const hex = mem.toString("latin1", 0, digestSize);
|
|
1329
|
+
if (type === "hex") return hex;
|
|
1330
|
+
if (type === "binary" || !type) return Buffer.from(hex, "hex");
|
|
1331
|
+
return Buffer.from(hex, "hex").toString(type);
|
|
1332
1332
|
}
|
|
1333
1333
|
};
|
|
1334
|
-
const create
|
|
1334
|
+
const create = (wasmModule, instancesPool, chunkSize, digestSize) => {
|
|
1335
1335
|
if (instancesPool.length > 0) {
|
|
1336
1336
|
const old = instancesPool.pop();
|
|
1337
1337
|
old.reset();
|
|
1338
1338
|
return old;
|
|
1339
1339
|
} else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
|
|
1340
1340
|
};
|
|
1341
|
-
module.exports = create
|
|
1342
|
-
module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING
|
|
1341
|
+
module.exports = create;
|
|
1342
|
+
module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING;
|
|
1343
1343
|
}));
|
|
1344
1344
|
|
|
1345
1345
|
//#endregion
|
|
1346
1346
|
//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js
|
|
1347
1347
|
var require_xxhash64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1348
|
-
const create
|
|
1348
|
+
const create = require_wasm_hash();
|
|
1349
1349
|
const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64"));
|
|
1350
|
-
module.exports = create
|
|
1350
|
+
module.exports = create.bind(null, xxhash64, [], 32, 16);
|
|
1351
1351
|
}));
|
|
1352
1352
|
|
|
1353
1353
|
//#endregion
|
|
1354
1354
|
//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js
|
|
1355
1355
|
var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1356
1356
|
const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
|
|
1357
|
-
var BatchedHash
|
|
1358
|
-
constructor(hash
|
|
1357
|
+
var BatchedHash = class {
|
|
1358
|
+
constructor(hash) {
|
|
1359
1359
|
this.string = void 0;
|
|
1360
1360
|
this.encoding = void 0;
|
|
1361
|
-
this.hash = hash
|
|
1361
|
+
this.hash = hash;
|
|
1362
1362
|
}
|
|
1363
1363
|
/**
|
|
1364
1364
|
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
@@ -1392,7 +1392,7 @@ var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1392
1392
|
return this.hash.digest(encoding);
|
|
1393
1393
|
}
|
|
1394
1394
|
};
|
|
1395
|
-
module.exports = BatchedHash
|
|
1395
|
+
module.exports = BatchedHash;
|
|
1396
1396
|
}));
|
|
1397
1397
|
|
|
1398
1398
|
//#endregion
|
|
@@ -1408,7 +1408,7 @@ var require_md4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1408
1408
|
var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1409
1409
|
const BULK_SIZE = 2e3;
|
|
1410
1410
|
const digestCaches = {};
|
|
1411
|
-
var BulkUpdateDecorator
|
|
1411
|
+
var BulkUpdateDecorator = class {
|
|
1412
1412
|
/**
|
|
1413
1413
|
* @param {Hash | function(): Hash} hashOrFactory function to create a hash
|
|
1414
1414
|
* @param {string=} hashKey key for caching
|
|
@@ -1470,7 +1470,7 @@ var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
1470
1470
|
return digestResult;
|
|
1471
1471
|
}
|
|
1472
1472
|
};
|
|
1473
|
-
module.exports = BulkUpdateDecorator
|
|
1473
|
+
module.exports = BulkUpdateDecorator;
|
|
1474
1474
|
}));
|
|
1475
1475
|
|
|
1476
1476
|
//#endregion
|
|
@@ -1493,10 +1493,10 @@ var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1493
1493
|
*/
|
|
1494
1494
|
function divmod32(uint32Array, divisor) {
|
|
1495
1495
|
let carry = 0;
|
|
1496
|
-
for (let i
|
|
1497
|
-
const value = carry * 4294967296 + uint32Array[i
|
|
1496
|
+
for (let i = uint32Array.length - 1; i >= 0; i--) {
|
|
1497
|
+
const value = carry * 4294967296 + uint32Array[i];
|
|
1498
1498
|
carry = value % divisor;
|
|
1499
|
-
uint32Array[i
|
|
1499
|
+
uint32Array[i] = Math.floor(value / divisor);
|
|
1500
1500
|
}
|
|
1501
1501
|
return carry;
|
|
1502
1502
|
}
|
|
@@ -1508,7 +1508,7 @@ var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1508
1508
|
const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4));
|
|
1509
1509
|
buffer.copy(Buffer.from(uint32Array.buffer));
|
|
1510
1510
|
let output = "";
|
|
1511
|
-
for (let i
|
|
1511
|
+
for (let i = 0; i < length; i++) output = encodeTable[divmod32(uint32Array, base)] + output;
|
|
1512
1512
|
return output;
|
|
1513
1513
|
}
|
|
1514
1514
|
let crypto = void 0;
|
|
@@ -1516,40 +1516,40 @@ var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1516
1516
|
let createMd4 = void 0;
|
|
1517
1517
|
let BatchedHash = void 0;
|
|
1518
1518
|
let BulkUpdateDecorator = void 0;
|
|
1519
|
-
function getHashDigest
|
|
1519
|
+
function getHashDigest(buffer, algorithm, digestType, maxLength) {
|
|
1520
1520
|
algorithm = algorithm || "xxhash64";
|
|
1521
1521
|
maxLength = maxLength || 9999;
|
|
1522
|
-
let hash
|
|
1522
|
+
let hash;
|
|
1523
1523
|
if (algorithm === "xxhash64") {
|
|
1524
1524
|
if (createXXHash64 === void 0) {
|
|
1525
1525
|
createXXHash64 = require_xxhash64();
|
|
1526
1526
|
if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
|
|
1527
1527
|
}
|
|
1528
|
-
hash
|
|
1528
|
+
hash = new BatchedHash(createXXHash64());
|
|
1529
1529
|
} else if (algorithm === "md4") {
|
|
1530
1530
|
if (createMd4 === void 0) {
|
|
1531
1531
|
createMd4 = require_md4();
|
|
1532
1532
|
if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
|
|
1533
1533
|
}
|
|
1534
|
-
hash
|
|
1534
|
+
hash = new BatchedHash(createMd4());
|
|
1535
1535
|
} else if (algorithm === "native-md4") {
|
|
1536
1536
|
if (typeof crypto === "undefined") {
|
|
1537
1537
|
crypto = __require("crypto");
|
|
1538
1538
|
if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
|
|
1539
1539
|
}
|
|
1540
|
-
hash
|
|
1540
|
+
hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
|
|
1541
1541
|
} else {
|
|
1542
1542
|
if (typeof crypto === "undefined") {
|
|
1543
1543
|
crypto = __require("crypto");
|
|
1544
1544
|
if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
|
|
1545
1545
|
}
|
|
1546
|
-
hash
|
|
1546
|
+
hash = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
|
|
1547
1547
|
}
|
|
1548
|
-
hash
|
|
1549
|
-
if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash
|
|
1550
|
-
return hash
|
|
1548
|
+
hash.update(buffer);
|
|
1549
|
+
if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength);
|
|
1550
|
+
return hash.digest(digestType || "hex").substr(0, maxLength);
|
|
1551
1551
|
}
|
|
1552
|
-
module.exports = getHashDigest
|
|
1552
|
+
module.exports = getHashDigest;
|
|
1553
1553
|
}));
|
|
1554
1554
|
|
|
1555
1555
|
//#endregion
|
|
@@ -1557,7 +1557,7 @@ var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1557
1557
|
var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1558
1558
|
const path$1 = __require("path");
|
|
1559
1559
|
const getHashDigest = require_getHashDigest();
|
|
1560
|
-
function interpolateName
|
|
1560
|
+
function interpolateName(loaderContext, name, options = {}) {
|
|
1561
1561
|
let filename;
|
|
1562
1562
|
const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
|
|
1563
1563
|
if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0);
|
|
@@ -1595,14 +1595,14 @@ var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
1595
1595
|
url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
|
|
1596
1596
|
if (regExp && loaderContext.resourcePath) {
|
|
1597
1597
|
const match = loaderContext.resourcePath.match(new RegExp(regExp));
|
|
1598
|
-
match && match.forEach((matched, i
|
|
1599
|
-
url = url.replace(new RegExp("\\[" + i
|
|
1598
|
+
match && match.forEach((matched, i) => {
|
|
1599
|
+
url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched);
|
|
1600
1600
|
});
|
|
1601
1601
|
}
|
|
1602
1602
|
if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options);
|
|
1603
1603
|
return url;
|
|
1604
1604
|
}
|
|
1605
|
-
module.exports = interpolateName
|
|
1605
|
+
module.exports = interpolateName;
|
|
1606
1606
|
}));
|
|
1607
1607
|
|
|
1608
1608
|
//#endregion
|
|
@@ -1646,43 +1646,43 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1646
1646
|
* @param {string} str
|
|
1647
1647
|
* @returns {[string, number]|undefined}
|
|
1648
1648
|
*/
|
|
1649
|
-
function gobbleHex(str
|
|
1650
|
-
var lower = str
|
|
1651
|
-
var hex
|
|
1649
|
+
function gobbleHex(str) {
|
|
1650
|
+
var lower = str.toLowerCase();
|
|
1651
|
+
var hex = "";
|
|
1652
1652
|
var spaceTerminated = false;
|
|
1653
|
-
for (var i
|
|
1654
|
-
var code = lower.charCodeAt(i
|
|
1653
|
+
for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
|
|
1654
|
+
var code = lower.charCodeAt(i);
|
|
1655
1655
|
var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
|
|
1656
1656
|
spaceTerminated = code === 32;
|
|
1657
1657
|
if (!valid) break;
|
|
1658
|
-
hex
|
|
1658
|
+
hex += lower[i];
|
|
1659
1659
|
}
|
|
1660
|
-
if (hex
|
|
1661
|
-
var codePoint = parseInt(hex
|
|
1662
|
-
if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex
|
|
1663
|
-
return [String.fromCodePoint(codePoint), hex
|
|
1660
|
+
if (hex.length === 0) return;
|
|
1661
|
+
var codePoint = parseInt(hex, 16);
|
|
1662
|
+
if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex.length + (spaceTerminated ? 1 : 0)];
|
|
1663
|
+
return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
|
|
1664
1664
|
}
|
|
1665
1665
|
var CONTAINS_ESCAPE = /\\/;
|
|
1666
|
-
function unesc(str
|
|
1667
|
-
if (!CONTAINS_ESCAPE.test(str
|
|
1666
|
+
function unesc(str) {
|
|
1667
|
+
if (!CONTAINS_ESCAPE.test(str)) return str;
|
|
1668
1668
|
var ret = "";
|
|
1669
|
-
for (var i
|
|
1670
|
-
if (str
|
|
1671
|
-
var gobbled = gobbleHex(str
|
|
1669
|
+
for (var i = 0; i < str.length; i++) {
|
|
1670
|
+
if (str[i] === "\\") {
|
|
1671
|
+
var gobbled = gobbleHex(str.slice(i + 1, i + 7));
|
|
1672
1672
|
if (gobbled !== void 0) {
|
|
1673
1673
|
ret += gobbled[0];
|
|
1674
|
-
i
|
|
1674
|
+
i += gobbled[1];
|
|
1675
1675
|
continue;
|
|
1676
1676
|
}
|
|
1677
|
-
if (str
|
|
1677
|
+
if (str[i + 1] === "\\") {
|
|
1678
1678
|
ret += "\\";
|
|
1679
|
-
i
|
|
1679
|
+
i++;
|
|
1680
1680
|
continue;
|
|
1681
1681
|
}
|
|
1682
|
-
if (str
|
|
1682
|
+
if (str.length === i + 1) ret += str[i];
|
|
1683
1683
|
continue;
|
|
1684
1684
|
}
|
|
1685
|
-
ret += str
|
|
1685
|
+
ret += str[i];
|
|
1686
1686
|
}
|
|
1687
1687
|
return ret;
|
|
1688
1688
|
}
|
|
@@ -1727,18 +1727,18 @@ var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1727
1727
|
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1728
1728
|
exports.__esModule = true;
|
|
1729
1729
|
exports["default"] = stripComments;
|
|
1730
|
-
function stripComments(str
|
|
1730
|
+
function stripComments(str) {
|
|
1731
1731
|
var s = "";
|
|
1732
|
-
var commentStart = str
|
|
1732
|
+
var commentStart = str.indexOf("/*");
|
|
1733
1733
|
var lastEnd = 0;
|
|
1734
1734
|
while (commentStart >= 0) {
|
|
1735
|
-
s = s + str
|
|
1736
|
-
var commentEnd = str
|
|
1735
|
+
s = s + str.slice(lastEnd, commentStart);
|
|
1736
|
+
var commentEnd = str.indexOf("*/", commentStart + 2);
|
|
1737
1737
|
if (commentEnd < 0) return s;
|
|
1738
1738
|
lastEnd = commentEnd + 2;
|
|
1739
|
-
commentStart = str
|
|
1739
|
+
commentStart = str.indexOf("/*", lastEnd);
|
|
1740
1740
|
}
|
|
1741
|
-
s = s + str
|
|
1741
|
+
s = s + str.slice(lastEnd);
|
|
1742
1742
|
return s;
|
|
1743
1743
|
}
|
|
1744
1744
|
module.exports = exports.default;
|
|
@@ -1749,15 +1749,15 @@ var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1749
1749
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1750
1750
|
exports.__esModule = true;
|
|
1751
1751
|
exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
|
|
1752
|
-
var _unesc
|
|
1753
|
-
exports.unesc = _unesc
|
|
1754
|
-
var _getProp = _interopRequireDefault
|
|
1752
|
+
var _unesc = _interopRequireDefault(require_unesc());
|
|
1753
|
+
exports.unesc = _unesc["default"];
|
|
1754
|
+
var _getProp = _interopRequireDefault(require_getProp());
|
|
1755
1755
|
exports.getProp = _getProp["default"];
|
|
1756
|
-
var _ensureObject = _interopRequireDefault
|
|
1756
|
+
var _ensureObject = _interopRequireDefault(require_ensureObject());
|
|
1757
1757
|
exports.ensureObject = _ensureObject["default"];
|
|
1758
|
-
var _stripComments = _interopRequireDefault
|
|
1758
|
+
var _stripComments = _interopRequireDefault(require_stripComments());
|
|
1759
1759
|
exports.stripComments = _stripComments["default"];
|
|
1760
|
-
function _interopRequireDefault
|
|
1760
|
+
function _interopRequireDefault(obj) {
|
|
1761
1761
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1762
1762
|
}
|
|
1763
1763
|
}));
|
|
@@ -1767,46 +1767,46 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1767
1767
|
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1768
1768
|
exports.__esModule = true;
|
|
1769
1769
|
exports["default"] = void 0;
|
|
1770
|
-
var _util
|
|
1771
|
-
function _defineProperties
|
|
1772
|
-
for (var i
|
|
1773
|
-
var descriptor = props[i
|
|
1770
|
+
var _util = require_util();
|
|
1771
|
+
function _defineProperties(target, props) {
|
|
1772
|
+
for (var i = 0; i < props.length; i++) {
|
|
1773
|
+
var descriptor = props[i];
|
|
1774
1774
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
1775
1775
|
descriptor.configurable = true;
|
|
1776
1776
|
if ("value" in descriptor) descriptor.writable = true;
|
|
1777
1777
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
function _createClass
|
|
1781
|
-
if (protoProps) _defineProperties
|
|
1782
|
-
if (staticProps) _defineProperties
|
|
1780
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
1781
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1782
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1783
1783
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1784
1784
|
return Constructor;
|
|
1785
1785
|
}
|
|
1786
|
-
var cloneNode = function cloneNode
|
|
1786
|
+
var cloneNode = function cloneNode(obj, parent) {
|
|
1787
1787
|
if (typeof obj !== "object" || obj === null) return obj;
|
|
1788
1788
|
var cloned = new obj.constructor();
|
|
1789
|
-
for (var i
|
|
1790
|
-
if (!obj.hasOwnProperty(i
|
|
1791
|
-
var value = obj[i
|
|
1792
|
-
if (i
|
|
1793
|
-
if (parent) cloned[i
|
|
1794
|
-
} else if (value instanceof Array) cloned[i
|
|
1795
|
-
return cloneNode
|
|
1789
|
+
for (var i in obj) {
|
|
1790
|
+
if (!obj.hasOwnProperty(i)) continue;
|
|
1791
|
+
var value = obj[i];
|
|
1792
|
+
if (i === "parent" && typeof value === "object") {
|
|
1793
|
+
if (parent) cloned[i] = parent;
|
|
1794
|
+
} else if (value instanceof Array) cloned[i] = value.map(function(j) {
|
|
1795
|
+
return cloneNode(j, cloned);
|
|
1796
1796
|
});
|
|
1797
|
-
else cloned[i
|
|
1797
|
+
else cloned[i] = cloneNode(value, cloned);
|
|
1798
1798
|
}
|
|
1799
1799
|
return cloned;
|
|
1800
1800
|
};
|
|
1801
1801
|
var Node = /* @__PURE__ */ function() {
|
|
1802
|
-
function Node
|
|
1802
|
+
function Node(opts) {
|
|
1803
1803
|
if (opts === void 0) opts = {};
|
|
1804
1804
|
Object.assign(this, opts);
|
|
1805
1805
|
this.spaces = this.spaces || {};
|
|
1806
1806
|
this.spaces.before = this.spaces.before || "";
|
|
1807
1807
|
this.spaces.after = this.spaces.after || "";
|
|
1808
1808
|
}
|
|
1809
|
-
var _proto = Node
|
|
1809
|
+
var _proto = Node.prototype;
|
|
1810
1810
|
_proto.remove = function remove() {
|
|
1811
1811
|
if (this.parent) this.parent.removeChild(this);
|
|
1812
1812
|
this.parent = void 0;
|
|
@@ -1863,14 +1863,14 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1863
1863
|
_proto.valueToString = function valueToString() {
|
|
1864
1864
|
return String(this.stringifyProperty("value"));
|
|
1865
1865
|
};
|
|
1866
|
-
_proto.toString = function toString
|
|
1866
|
+
_proto.toString = function toString() {
|
|
1867
1867
|
return [
|
|
1868
1868
|
this.rawSpaceBefore,
|
|
1869
1869
|
this.valueToString(),
|
|
1870
1870
|
this.rawSpaceAfter
|
|
1871
1871
|
].join("");
|
|
1872
1872
|
};
|
|
1873
|
-
_createClass
|
|
1873
|
+
_createClass(Node, [{
|
|
1874
1874
|
key: "rawSpaceBefore",
|
|
1875
1875
|
get: function get() {
|
|
1876
1876
|
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
|
|
@@ -1878,7 +1878,7 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1878
1878
|
return rawSpace || "";
|
|
1879
1879
|
},
|
|
1880
1880
|
set: function set(raw) {
|
|
1881
|
-
(0, _util
|
|
1881
|
+
(0, _util.ensureObject)(this, "raws", "spaces");
|
|
1882
1882
|
this.raws.spaces.before = raw;
|
|
1883
1883
|
}
|
|
1884
1884
|
}, {
|
|
@@ -1889,11 +1889,11 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1889
1889
|
return rawSpace || "";
|
|
1890
1890
|
},
|
|
1891
1891
|
set: function set(raw) {
|
|
1892
|
-
(0, _util
|
|
1892
|
+
(0, _util.ensureObject)(this, "raws", "spaces");
|
|
1893
1893
|
this.raws.spaces.after = raw;
|
|
1894
1894
|
}
|
|
1895
1895
|
}]);
|
|
1896
|
-
return Node
|
|
1896
|
+
return Node;
|
|
1897
1897
|
}();
|
|
1898
1898
|
exports["default"] = Node;
|
|
1899
1899
|
module.exports = exports.default;
|
|
@@ -1916,8 +1916,8 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1916
1916
|
exports.PSEUDO = PSEUDO;
|
|
1917
1917
|
var NESTING = "nesting";
|
|
1918
1918
|
exports.NESTING = NESTING;
|
|
1919
|
-
var ID
|
|
1920
|
-
exports.ID = ID
|
|
1919
|
+
var ID = "id";
|
|
1920
|
+
exports.ID = ID;
|
|
1921
1921
|
var COMMENT = "comment";
|
|
1922
1922
|
exports.COMMENT = COMMENT;
|
|
1923
1923
|
var COMBINATOR = "combinator";
|
|
@@ -1935,20 +1935,20 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1935
1935
|
var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1936
1936
|
exports.__esModule = true;
|
|
1937
1937
|
exports["default"] = void 0;
|
|
1938
|
-
var _node
|
|
1939
|
-
var types
|
|
1940
|
-
function _getRequireWildcardCache
|
|
1938
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
1939
|
+
var types = _interopRequireWildcard(require_types());
|
|
1940
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
1941
1941
|
if (typeof WeakMap !== "function") return null;
|
|
1942
1942
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
1943
1943
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
1944
|
-
return (_getRequireWildcardCache
|
|
1944
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop$1) {
|
|
1945
1945
|
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
1946
1946
|
})(nodeInterop);
|
|
1947
1947
|
}
|
|
1948
|
-
function _interopRequireWildcard
|
|
1948
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
1949
1949
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
1950
1950
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
1951
|
-
var cache = _getRequireWildcardCache
|
|
1951
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
1952
1952
|
if (cache && cache.has(obj)) return cache.get(obj);
|
|
1953
1953
|
var newObj = {};
|
|
1954
1954
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
@@ -1961,7 +1961,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1961
1961
|
if (cache) cache.set(obj, newObj);
|
|
1962
1962
|
return newObj;
|
|
1963
1963
|
}
|
|
1964
|
-
function _interopRequireDefault
|
|
1964
|
+
function _interopRequireDefault(obj) {
|
|
1965
1965
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1966
1966
|
}
|
|
1967
1967
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
@@ -1969,12 +1969,12 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1969
1969
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
1970
1970
|
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1971
1971
|
if (it) o = it;
|
|
1972
|
-
var i
|
|
1972
|
+
var i = 0;
|
|
1973
1973
|
return function() {
|
|
1974
|
-
if (i
|
|
1974
|
+
if (i >= o.length) return { done: true };
|
|
1975
1975
|
return {
|
|
1976
1976
|
done: false,
|
|
1977
|
-
value: o[i
|
|
1977
|
+
value: o[i++]
|
|
1978
1978
|
};
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
@@ -1990,56 +1990,56 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
function _arrayLikeToArray(arr, len) {
|
|
1992
1992
|
if (len == null || len > arr.length) len = arr.length;
|
|
1993
|
-
for (var i
|
|
1993
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1994
1994
|
return arr2;
|
|
1995
1995
|
}
|
|
1996
|
-
function _defineProperties
|
|
1997
|
-
for (var i
|
|
1998
|
-
var descriptor = props[i
|
|
1996
|
+
function _defineProperties(target, props) {
|
|
1997
|
+
for (var i = 0; i < props.length; i++) {
|
|
1998
|
+
var descriptor = props[i];
|
|
1999
1999
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
2000
2000
|
descriptor.configurable = true;
|
|
2001
2001
|
if ("value" in descriptor) descriptor.writable = true;
|
|
2002
2002
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
function _createClass
|
|
2006
|
-
if (protoProps) _defineProperties
|
|
2007
|
-
if (staticProps) _defineProperties
|
|
2005
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2006
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2007
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2008
2008
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2009
2009
|
return Constructor;
|
|
2010
2010
|
}
|
|
2011
|
-
function _inheritsLoose
|
|
2011
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2012
2012
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2013
2013
|
subClass.prototype.constructor = subClass;
|
|
2014
|
-
_setPrototypeOf
|
|
2014
|
+
_setPrototypeOf(subClass, superClass);
|
|
2015
2015
|
}
|
|
2016
|
-
function _setPrototypeOf
|
|
2017
|
-
_setPrototypeOf
|
|
2016
|
+
function _setPrototypeOf(o, p) {
|
|
2017
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2018
2018
|
o$1.__proto__ = p$1;
|
|
2019
2019
|
return o$1;
|
|
2020
2020
|
};
|
|
2021
|
-
return _setPrototypeOf
|
|
2021
|
+
return _setPrototypeOf(o, p);
|
|
2022
2022
|
}
|
|
2023
2023
|
var Container = /* @__PURE__ */ function(_Node) {
|
|
2024
|
-
_inheritsLoose
|
|
2025
|
-
function Container
|
|
2024
|
+
_inheritsLoose(Container, _Node);
|
|
2025
|
+
function Container(opts) {
|
|
2026
2026
|
var _this = _Node.call(this, opts) || this;
|
|
2027
2027
|
if (!_this.nodes) _this.nodes = [];
|
|
2028
2028
|
return _this;
|
|
2029
2029
|
}
|
|
2030
|
-
var _proto = Container
|
|
2031
|
-
_proto.append = function append(selector
|
|
2032
|
-
selector
|
|
2033
|
-
this.nodes.push(selector
|
|
2030
|
+
var _proto = Container.prototype;
|
|
2031
|
+
_proto.append = function append(selector) {
|
|
2032
|
+
selector.parent = this;
|
|
2033
|
+
this.nodes.push(selector);
|
|
2034
2034
|
return this;
|
|
2035
2035
|
};
|
|
2036
|
-
_proto.prepend = function prepend(selector
|
|
2037
|
-
selector
|
|
2038
|
-
this.nodes.unshift(selector
|
|
2039
|
-
for (var id
|
|
2036
|
+
_proto.prepend = function prepend(selector) {
|
|
2037
|
+
selector.parent = this;
|
|
2038
|
+
this.nodes.unshift(selector);
|
|
2039
|
+
for (var id in this.indexes) this.indexes[id]++;
|
|
2040
2040
|
return this;
|
|
2041
2041
|
};
|
|
2042
|
-
_proto.at = function at
|
|
2042
|
+
_proto.at = function at(index) {
|
|
2043
2043
|
return this.nodes[index];
|
|
2044
2044
|
};
|
|
2045
2045
|
_proto.index = function index(child) {
|
|
@@ -2051,9 +2051,9 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2051
2051
|
this.at(child).parent = void 0;
|
|
2052
2052
|
this.nodes.splice(child, 1);
|
|
2053
2053
|
var index;
|
|
2054
|
-
for (var id
|
|
2055
|
-
index = this.indexes[id
|
|
2056
|
-
if (index >= child) this.indexes[id
|
|
2054
|
+
for (var id in this.indexes) {
|
|
2055
|
+
index = this.indexes[id];
|
|
2056
|
+
if (index >= child) this.indexes[id] = index - 1;
|
|
2057
2057
|
}
|
|
2058
2058
|
return this;
|
|
2059
2059
|
};
|
|
@@ -2073,7 +2073,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2073
2073
|
newNode.parent = this;
|
|
2074
2074
|
var oldIndex = this.index(oldNode);
|
|
2075
2075
|
var resetNode = [];
|
|
2076
|
-
for (var i
|
|
2076
|
+
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
2077
2077
|
(_this$nodes = this.nodes).splice.apply(_this$nodes, [
|
|
2078
2078
|
oldIndex + 1,
|
|
2079
2079
|
0,
|
|
@@ -2081,9 +2081,9 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2081
2081
|
].concat(resetNode));
|
|
2082
2082
|
newNode.parent = this;
|
|
2083
2083
|
var index;
|
|
2084
|
-
for (var id
|
|
2085
|
-
index = this.indexes[id
|
|
2086
|
-
if (oldIndex < index) this.indexes[id
|
|
2084
|
+
for (var id in this.indexes) {
|
|
2085
|
+
index = this.indexes[id];
|
|
2086
|
+
if (oldIndex < index) this.indexes[id] = index + arguments.length - 1;
|
|
2087
2087
|
}
|
|
2088
2088
|
return this;
|
|
2089
2089
|
};
|
|
@@ -2092,7 +2092,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2092
2092
|
newNode.parent = this;
|
|
2093
2093
|
var oldIndex = this.index(oldNode);
|
|
2094
2094
|
var resetNode = [];
|
|
2095
|
-
for (var i
|
|
2095
|
+
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
2096
2096
|
(_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
|
|
2097
2097
|
oldIndex,
|
|
2098
2098
|
0,
|
|
@@ -2100,9 +2100,9 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2100
2100
|
].concat(resetNode));
|
|
2101
2101
|
newNode.parent = this;
|
|
2102
2102
|
var index;
|
|
2103
|
-
for (var id
|
|
2104
|
-
index = this.indexes[id
|
|
2105
|
-
if (index >= oldIndex) this.indexes[id
|
|
2103
|
+
for (var id in this.indexes) {
|
|
2104
|
+
index = this.indexes[id];
|
|
2105
|
+
if (index >= oldIndex) this.indexes[id] = index + arguments.length - 1;
|
|
2106
2106
|
}
|
|
2107
2107
|
return this;
|
|
2108
2108
|
};
|
|
@@ -2137,78 +2137,78 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2137
2137
|
if (!this.lastEach) this.lastEach = 0;
|
|
2138
2138
|
if (!this.indexes) this.indexes = {};
|
|
2139
2139
|
this.lastEach++;
|
|
2140
|
-
var id
|
|
2141
|
-
this.indexes[id
|
|
2140
|
+
var id = this.lastEach;
|
|
2141
|
+
this.indexes[id] = 0;
|
|
2142
2142
|
if (!this.length) return;
|
|
2143
2143
|
var index, result;
|
|
2144
|
-
while (this.indexes[id
|
|
2145
|
-
index = this.indexes[id
|
|
2144
|
+
while (this.indexes[id] < this.length) {
|
|
2145
|
+
index = this.indexes[id];
|
|
2146
2146
|
result = callback(this.at(index), index);
|
|
2147
2147
|
if (result === false) break;
|
|
2148
|
-
this.indexes[id
|
|
2148
|
+
this.indexes[id] += 1;
|
|
2149
2149
|
}
|
|
2150
|
-
delete this.indexes[id
|
|
2150
|
+
delete this.indexes[id];
|
|
2151
2151
|
if (result === false) return false;
|
|
2152
2152
|
};
|
|
2153
2153
|
_proto.walk = function walk(callback) {
|
|
2154
|
-
return this.each(function(node, i
|
|
2155
|
-
var result = callback(node, i
|
|
2154
|
+
return this.each(function(node, i) {
|
|
2155
|
+
var result = callback(node, i);
|
|
2156
2156
|
if (result !== false && node.length) result = node.walk(callback);
|
|
2157
2157
|
if (result === false) return false;
|
|
2158
2158
|
});
|
|
2159
2159
|
};
|
|
2160
2160
|
_proto.walkAttributes = function walkAttributes(callback) {
|
|
2161
2161
|
var _this2 = this;
|
|
2162
|
-
return this.walk(function(selector
|
|
2163
|
-
if (selector
|
|
2162
|
+
return this.walk(function(selector) {
|
|
2163
|
+
if (selector.type === types.ATTRIBUTE) return callback.call(_this2, selector);
|
|
2164
2164
|
});
|
|
2165
2165
|
};
|
|
2166
2166
|
_proto.walkClasses = function walkClasses(callback) {
|
|
2167
2167
|
var _this3 = this;
|
|
2168
|
-
return this.walk(function(selector
|
|
2169
|
-
if (selector
|
|
2168
|
+
return this.walk(function(selector) {
|
|
2169
|
+
if (selector.type === types.CLASS) return callback.call(_this3, selector);
|
|
2170
2170
|
});
|
|
2171
2171
|
};
|
|
2172
2172
|
_proto.walkCombinators = function walkCombinators(callback) {
|
|
2173
2173
|
var _this4 = this;
|
|
2174
|
-
return this.walk(function(selector
|
|
2175
|
-
if (selector
|
|
2174
|
+
return this.walk(function(selector) {
|
|
2175
|
+
if (selector.type === types.COMBINATOR) return callback.call(_this4, selector);
|
|
2176
2176
|
});
|
|
2177
2177
|
};
|
|
2178
2178
|
_proto.walkComments = function walkComments(callback) {
|
|
2179
2179
|
var _this5 = this;
|
|
2180
|
-
return this.walk(function(selector
|
|
2181
|
-
if (selector
|
|
2180
|
+
return this.walk(function(selector) {
|
|
2181
|
+
if (selector.type === types.COMMENT) return callback.call(_this5, selector);
|
|
2182
2182
|
});
|
|
2183
2183
|
};
|
|
2184
2184
|
_proto.walkIds = function walkIds(callback) {
|
|
2185
2185
|
var _this6 = this;
|
|
2186
|
-
return this.walk(function(selector
|
|
2187
|
-
if (selector
|
|
2186
|
+
return this.walk(function(selector) {
|
|
2187
|
+
if (selector.type === types.ID) return callback.call(_this6, selector);
|
|
2188
2188
|
});
|
|
2189
2189
|
};
|
|
2190
2190
|
_proto.walkNesting = function walkNesting(callback) {
|
|
2191
2191
|
var _this7 = this;
|
|
2192
|
-
return this.walk(function(selector
|
|
2193
|
-
if (selector
|
|
2192
|
+
return this.walk(function(selector) {
|
|
2193
|
+
if (selector.type === types.NESTING) return callback.call(_this7, selector);
|
|
2194
2194
|
});
|
|
2195
2195
|
};
|
|
2196
2196
|
_proto.walkPseudos = function walkPseudos(callback) {
|
|
2197
2197
|
var _this8 = this;
|
|
2198
|
-
return this.walk(function(selector
|
|
2199
|
-
if (selector
|
|
2198
|
+
return this.walk(function(selector) {
|
|
2199
|
+
if (selector.type === types.PSEUDO) return callback.call(_this8, selector);
|
|
2200
2200
|
});
|
|
2201
2201
|
};
|
|
2202
2202
|
_proto.walkTags = function walkTags(callback) {
|
|
2203
2203
|
var _this9 = this;
|
|
2204
|
-
return this.walk(function(selector
|
|
2205
|
-
if (selector
|
|
2204
|
+
return this.walk(function(selector) {
|
|
2205
|
+
if (selector.type === types.TAG) return callback.call(_this9, selector);
|
|
2206
2206
|
});
|
|
2207
2207
|
};
|
|
2208
2208
|
_proto.walkUniversals = function walkUniversals(callback) {
|
|
2209
2209
|
var _this10 = this;
|
|
2210
|
-
return this.walk(function(selector
|
|
2211
|
-
if (selector
|
|
2210
|
+
return this.walk(function(selector) {
|
|
2211
|
+
if (selector.type === types.UNIVERSAL) return callback.call(_this10, selector);
|
|
2212
2212
|
});
|
|
2213
2213
|
};
|
|
2214
2214
|
_proto.split = function split(callback) {
|
|
@@ -2242,10 +2242,10 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2242
2242
|
_proto.sort = function sort(callback) {
|
|
2243
2243
|
return this.nodes.sort(callback);
|
|
2244
2244
|
};
|
|
2245
|
-
_proto.toString = function toString
|
|
2245
|
+
_proto.toString = function toString() {
|
|
2246
2246
|
return this.map(String).join("");
|
|
2247
2247
|
};
|
|
2248
|
-
_createClass
|
|
2248
|
+
_createClass(Container, [
|
|
2249
2249
|
{
|
|
2250
2250
|
key: "first",
|
|
2251
2251
|
get: function get() {
|
|
@@ -2265,8 +2265,8 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
]);
|
|
2268
|
-
return Container
|
|
2269
|
-
}(_node
|
|
2268
|
+
return Container;
|
|
2269
|
+
}(_node["default"]);
|
|
2270
2270
|
exports["default"] = Container;
|
|
2271
2271
|
module.exports = exports.default;
|
|
2272
2272
|
}));
|
|
@@ -2276,65 +2276,65 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2276
2276
|
var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2277
2277
|
exports.__esModule = true;
|
|
2278
2278
|
exports["default"] = void 0;
|
|
2279
|
-
var _container
|
|
2280
|
-
var _types
|
|
2281
|
-
function _interopRequireDefault
|
|
2279
|
+
var _container = _interopRequireDefault(require_container());
|
|
2280
|
+
var _types = require_types();
|
|
2281
|
+
function _interopRequireDefault(obj) {
|
|
2282
2282
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2283
2283
|
}
|
|
2284
|
-
function _defineProperties
|
|
2285
|
-
for (var i
|
|
2286
|
-
var descriptor = props[i
|
|
2284
|
+
function _defineProperties(target, props) {
|
|
2285
|
+
for (var i = 0; i < props.length; i++) {
|
|
2286
|
+
var descriptor = props[i];
|
|
2287
2287
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
2288
2288
|
descriptor.configurable = true;
|
|
2289
2289
|
if ("value" in descriptor) descriptor.writable = true;
|
|
2290
2290
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
|
-
function _createClass
|
|
2294
|
-
if (protoProps) _defineProperties
|
|
2295
|
-
if (staticProps) _defineProperties
|
|
2293
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2294
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2295
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2296
2296
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2297
2297
|
return Constructor;
|
|
2298
2298
|
}
|
|
2299
|
-
function _inheritsLoose
|
|
2299
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2300
2300
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2301
2301
|
subClass.prototype.constructor = subClass;
|
|
2302
|
-
_setPrototypeOf
|
|
2302
|
+
_setPrototypeOf(subClass, superClass);
|
|
2303
2303
|
}
|
|
2304
|
-
function _setPrototypeOf
|
|
2305
|
-
_setPrototypeOf
|
|
2304
|
+
function _setPrototypeOf(o, p) {
|
|
2305
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2306
2306
|
o$1.__proto__ = p$1;
|
|
2307
2307
|
return o$1;
|
|
2308
2308
|
};
|
|
2309
|
-
return _setPrototypeOf
|
|
2309
|
+
return _setPrototypeOf(o, p);
|
|
2310
2310
|
}
|
|
2311
2311
|
var Root = /* @__PURE__ */ function(_Container) {
|
|
2312
|
-
_inheritsLoose
|
|
2313
|
-
function Root
|
|
2312
|
+
_inheritsLoose(Root, _Container);
|
|
2313
|
+
function Root(opts) {
|
|
2314
2314
|
var _this = _Container.call(this, opts) || this;
|
|
2315
|
-
_this.type = _types
|
|
2315
|
+
_this.type = _types.ROOT;
|
|
2316
2316
|
return _this;
|
|
2317
2317
|
}
|
|
2318
|
-
var _proto = Root
|
|
2319
|
-
_proto.toString = function toString
|
|
2320
|
-
var str
|
|
2321
|
-
memo.push(String(selector
|
|
2318
|
+
var _proto = Root.prototype;
|
|
2319
|
+
_proto.toString = function toString() {
|
|
2320
|
+
var str = this.reduce(function(memo, selector) {
|
|
2321
|
+
memo.push(String(selector));
|
|
2322
2322
|
return memo;
|
|
2323
2323
|
}, []).join(",");
|
|
2324
|
-
return this.trailingComma ? str
|
|
2324
|
+
return this.trailingComma ? str + "," : str;
|
|
2325
2325
|
};
|
|
2326
2326
|
_proto.error = function error(message, options) {
|
|
2327
2327
|
if (this._error) return this._error(message, options);
|
|
2328
2328
|
else return new Error(message);
|
|
2329
2329
|
};
|
|
2330
|
-
_createClass
|
|
2330
|
+
_createClass(Root, [{
|
|
2331
2331
|
key: "errorGenerator",
|
|
2332
2332
|
set: function set(handler) {
|
|
2333
2333
|
this._error = handler;
|
|
2334
2334
|
}
|
|
2335
2335
|
}]);
|
|
2336
|
-
return Root
|
|
2337
|
-
}(_container
|
|
2336
|
+
return Root;
|
|
2337
|
+
}(_container["default"]);
|
|
2338
2338
|
exports["default"] = Root;
|
|
2339
2339
|
module.exports = exports.default;
|
|
2340
2340
|
}));
|
|
@@ -2344,32 +2344,32 @@ var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2344
2344
|
var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2345
2345
|
exports.__esModule = true;
|
|
2346
2346
|
exports["default"] = void 0;
|
|
2347
|
-
var _container
|
|
2348
|
-
var _types
|
|
2349
|
-
function _interopRequireDefault
|
|
2347
|
+
var _container = _interopRequireDefault(require_container());
|
|
2348
|
+
var _types = require_types();
|
|
2349
|
+
function _interopRequireDefault(obj) {
|
|
2350
2350
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2351
2351
|
}
|
|
2352
|
-
function _inheritsLoose
|
|
2352
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2353
2353
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2354
2354
|
subClass.prototype.constructor = subClass;
|
|
2355
|
-
_setPrototypeOf
|
|
2355
|
+
_setPrototypeOf(subClass, superClass);
|
|
2356
2356
|
}
|
|
2357
|
-
function _setPrototypeOf
|
|
2358
|
-
_setPrototypeOf
|
|
2357
|
+
function _setPrototypeOf(o, p) {
|
|
2358
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2359
2359
|
o$1.__proto__ = p$1;
|
|
2360
2360
|
return o$1;
|
|
2361
2361
|
};
|
|
2362
|
-
return _setPrototypeOf
|
|
2362
|
+
return _setPrototypeOf(o, p);
|
|
2363
2363
|
}
|
|
2364
2364
|
var Selector = /* @__PURE__ */ function(_Container) {
|
|
2365
|
-
_inheritsLoose
|
|
2366
|
-
function Selector
|
|
2365
|
+
_inheritsLoose(Selector, _Container);
|
|
2366
|
+
function Selector(opts) {
|
|
2367
2367
|
var _this = _Container.call(this, opts) || this;
|
|
2368
|
-
_this.type = _types
|
|
2368
|
+
_this.type = _types.SELECTOR;
|
|
2369
2369
|
return _this;
|
|
2370
2370
|
}
|
|
2371
|
-
return Selector
|
|
2372
|
-
}(_container
|
|
2371
|
+
return Selector;
|
|
2372
|
+
}(_container["default"]);
|
|
2373
2373
|
exports["default"] = Selector;
|
|
2374
2374
|
module.exports = exports.default;
|
|
2375
2375
|
}));
|
|
@@ -2378,32 +2378,32 @@ var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2378
2378
|
//#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
|
|
2379
2379
|
/*! https://mths.be/cssesc v3.0.0 by @mathias */
|
|
2380
2380
|
var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2381
|
-
var hasOwnProperty
|
|
2382
|
-
var merge = function merge
|
|
2381
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
2382
|
+
var merge = function merge(options, defaults) {
|
|
2383
2383
|
if (!options) return defaults;
|
|
2384
2384
|
var result = {};
|
|
2385
|
-
for (var key in defaults) result[key] = hasOwnProperty
|
|
2385
|
+
for (var key in defaults) result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
|
|
2386
2386
|
return result;
|
|
2387
2387
|
};
|
|
2388
2388
|
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
|
|
2389
2389
|
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
|
|
2390
2390
|
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
|
|
2391
|
-
var cssesc = function cssesc
|
|
2392
|
-
options = merge(options, cssesc
|
|
2391
|
+
var cssesc = function cssesc(string, options) {
|
|
2392
|
+
options = merge(options, cssesc.options);
|
|
2393
2393
|
if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
|
|
2394
2394
|
var quote = options.quotes == "double" ? "\"" : "'";
|
|
2395
|
-
var isIdentifier
|
|
2396
|
-
var firstChar = string
|
|
2395
|
+
var isIdentifier = options.isIdentifier;
|
|
2396
|
+
var firstChar = string.charAt(0);
|
|
2397
2397
|
var output = "";
|
|
2398
2398
|
var counter = 0;
|
|
2399
|
-
var length = string
|
|
2399
|
+
var length = string.length;
|
|
2400
2400
|
while (counter < length) {
|
|
2401
|
-
var character = string
|
|
2401
|
+
var character = string.charAt(counter++);
|
|
2402
2402
|
var codePoint = character.charCodeAt();
|
|
2403
2403
|
var value = void 0;
|
|
2404
2404
|
if (codePoint < 32 || codePoint > 126) {
|
|
2405
2405
|
if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
|
|
2406
|
-
var extra = string
|
|
2406
|
+
var extra = string.charCodeAt(counter++);
|
|
2407
2407
|
if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
|
|
2408
2408
|
else counter--;
|
|
2409
2409
|
}
|
|
@@ -2411,11 +2411,11 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2411
2411
|
} else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
|
|
2412
2412
|
else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
2413
2413
|
else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
2414
|
-
else if (character == "\\" || !isIdentifier
|
|
2414
|
+
else if (character == "\\" || !isIdentifier && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) value = "\\" + character;
|
|
2415
2415
|
else value = character;
|
|
2416
2416
|
output += value;
|
|
2417
2417
|
}
|
|
2418
|
-
if (isIdentifier
|
|
2418
|
+
if (isIdentifier) {
|
|
2419
2419
|
if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
|
|
2420
2420
|
else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
|
|
2421
2421
|
}
|
|
@@ -2423,7 +2423,7 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2423
2423
|
if ($1 && $1.length % 2) return $0;
|
|
2424
2424
|
return ($1 || "") + $2;
|
|
2425
2425
|
});
|
|
2426
|
-
if (!isIdentifier
|
|
2426
|
+
if (!isIdentifier && options.wrap) return quote + output + quote;
|
|
2427
2427
|
return output;
|
|
2428
2428
|
};
|
|
2429
2429
|
cssesc.options = {
|
|
@@ -2441,70 +2441,70 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2441
2441
|
var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2442
2442
|
exports.__esModule = true;
|
|
2443
2443
|
exports["default"] = void 0;
|
|
2444
|
-
var _cssesc
|
|
2445
|
-
var _util
|
|
2446
|
-
var _node
|
|
2447
|
-
var _types
|
|
2448
|
-
function _interopRequireDefault
|
|
2444
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
2445
|
+
var _util = require_util();
|
|
2446
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
2447
|
+
var _types = require_types();
|
|
2448
|
+
function _interopRequireDefault(obj) {
|
|
2449
2449
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2450
2450
|
}
|
|
2451
|
-
function _defineProperties
|
|
2452
|
-
for (var i
|
|
2453
|
-
var descriptor = props[i
|
|
2451
|
+
function _defineProperties(target, props) {
|
|
2452
|
+
for (var i = 0; i < props.length; i++) {
|
|
2453
|
+
var descriptor = props[i];
|
|
2454
2454
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
2455
2455
|
descriptor.configurable = true;
|
|
2456
2456
|
if ("value" in descriptor) descriptor.writable = true;
|
|
2457
2457
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
function _createClass
|
|
2461
|
-
if (protoProps) _defineProperties
|
|
2462
|
-
if (staticProps) _defineProperties
|
|
2460
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2461
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2462
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2463
2463
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2464
2464
|
return Constructor;
|
|
2465
2465
|
}
|
|
2466
|
-
function _inheritsLoose
|
|
2466
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2467
2467
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2468
2468
|
subClass.prototype.constructor = subClass;
|
|
2469
|
-
_setPrototypeOf
|
|
2469
|
+
_setPrototypeOf(subClass, superClass);
|
|
2470
2470
|
}
|
|
2471
|
-
function _setPrototypeOf
|
|
2472
|
-
_setPrototypeOf
|
|
2471
|
+
function _setPrototypeOf(o, p) {
|
|
2472
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2473
2473
|
o$1.__proto__ = p$1;
|
|
2474
2474
|
return o$1;
|
|
2475
2475
|
};
|
|
2476
|
-
return _setPrototypeOf
|
|
2476
|
+
return _setPrototypeOf(o, p);
|
|
2477
2477
|
}
|
|
2478
2478
|
var ClassName = /* @__PURE__ */ function(_Node) {
|
|
2479
|
-
_inheritsLoose
|
|
2480
|
-
function ClassName
|
|
2479
|
+
_inheritsLoose(ClassName, _Node);
|
|
2480
|
+
function ClassName(opts) {
|
|
2481
2481
|
var _this = _Node.call(this, opts) || this;
|
|
2482
|
-
_this.type = _types
|
|
2482
|
+
_this.type = _types.CLASS;
|
|
2483
2483
|
_this._constructed = true;
|
|
2484
2484
|
return _this;
|
|
2485
2485
|
}
|
|
2486
|
-
var _proto = ClassName
|
|
2486
|
+
var _proto = ClassName.prototype;
|
|
2487
2487
|
_proto.valueToString = function valueToString() {
|
|
2488
2488
|
return "." + _Node.prototype.valueToString.call(this);
|
|
2489
2489
|
};
|
|
2490
|
-
_createClass
|
|
2490
|
+
_createClass(ClassName, [{
|
|
2491
2491
|
key: "value",
|
|
2492
2492
|
get: function get() {
|
|
2493
2493
|
return this._value;
|
|
2494
2494
|
},
|
|
2495
2495
|
set: function set(v) {
|
|
2496
2496
|
if (this._constructed) {
|
|
2497
|
-
var escaped = (0, _cssesc
|
|
2497
|
+
var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
|
|
2498
2498
|
if (escaped !== v) {
|
|
2499
|
-
(0, _util
|
|
2499
|
+
(0, _util.ensureObject)(this, "raws");
|
|
2500
2500
|
this.raws.value = escaped;
|
|
2501
2501
|
} else if (this.raws) delete this.raws.value;
|
|
2502
2502
|
}
|
|
2503
2503
|
this._value = v;
|
|
2504
2504
|
}
|
|
2505
2505
|
}]);
|
|
2506
|
-
return ClassName
|
|
2507
|
-
}(_node
|
|
2506
|
+
return ClassName;
|
|
2507
|
+
}(_node["default"]);
|
|
2508
2508
|
exports["default"] = ClassName;
|
|
2509
2509
|
module.exports = exports.default;
|
|
2510
2510
|
}));
|
|
@@ -2514,32 +2514,32 @@ var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2514
2514
|
var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2515
2515
|
exports.__esModule = true;
|
|
2516
2516
|
exports["default"] = void 0;
|
|
2517
|
-
var _node
|
|
2518
|
-
var _types
|
|
2519
|
-
function _interopRequireDefault
|
|
2517
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
2518
|
+
var _types = require_types();
|
|
2519
|
+
function _interopRequireDefault(obj) {
|
|
2520
2520
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2521
2521
|
}
|
|
2522
|
-
function _inheritsLoose
|
|
2522
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2523
2523
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2524
2524
|
subClass.prototype.constructor = subClass;
|
|
2525
|
-
_setPrototypeOf
|
|
2525
|
+
_setPrototypeOf(subClass, superClass);
|
|
2526
2526
|
}
|
|
2527
|
-
function _setPrototypeOf
|
|
2528
|
-
_setPrototypeOf
|
|
2527
|
+
function _setPrototypeOf(o, p) {
|
|
2528
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2529
2529
|
o$1.__proto__ = p$1;
|
|
2530
2530
|
return o$1;
|
|
2531
2531
|
};
|
|
2532
|
-
return _setPrototypeOf
|
|
2532
|
+
return _setPrototypeOf(o, p);
|
|
2533
2533
|
}
|
|
2534
2534
|
var Comment = /* @__PURE__ */ function(_Node) {
|
|
2535
|
-
_inheritsLoose
|
|
2536
|
-
function Comment
|
|
2535
|
+
_inheritsLoose(Comment, _Node);
|
|
2536
|
+
function Comment(opts) {
|
|
2537
2537
|
var _this = _Node.call(this, opts) || this;
|
|
2538
|
-
_this.type = _types
|
|
2538
|
+
_this.type = _types.COMMENT;
|
|
2539
2539
|
return _this;
|
|
2540
2540
|
}
|
|
2541
|
-
return Comment
|
|
2542
|
-
}(_node
|
|
2541
|
+
return Comment;
|
|
2542
|
+
}(_node["default"]);
|
|
2543
2543
|
exports["default"] = Comment;
|
|
2544
2544
|
module.exports = exports.default;
|
|
2545
2545
|
}));
|
|
@@ -2549,36 +2549,36 @@ var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2549
2549
|
var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2550
2550
|
exports.__esModule = true;
|
|
2551
2551
|
exports["default"] = void 0;
|
|
2552
|
-
var _node
|
|
2553
|
-
var _types
|
|
2554
|
-
function _interopRequireDefault
|
|
2552
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
2553
|
+
var _types = require_types();
|
|
2554
|
+
function _interopRequireDefault(obj) {
|
|
2555
2555
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2556
2556
|
}
|
|
2557
|
-
function _inheritsLoose
|
|
2557
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2558
2558
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2559
2559
|
subClass.prototype.constructor = subClass;
|
|
2560
|
-
_setPrototypeOf
|
|
2560
|
+
_setPrototypeOf(subClass, superClass);
|
|
2561
2561
|
}
|
|
2562
|
-
function _setPrototypeOf
|
|
2563
|
-
_setPrototypeOf
|
|
2562
|
+
function _setPrototypeOf(o, p) {
|
|
2563
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2564
2564
|
o$1.__proto__ = p$1;
|
|
2565
2565
|
return o$1;
|
|
2566
2566
|
};
|
|
2567
|
-
return _setPrototypeOf
|
|
2567
|
+
return _setPrototypeOf(o, p);
|
|
2568
2568
|
}
|
|
2569
2569
|
var ID = /* @__PURE__ */ function(_Node) {
|
|
2570
|
-
_inheritsLoose
|
|
2571
|
-
function ID
|
|
2570
|
+
_inheritsLoose(ID, _Node);
|
|
2571
|
+
function ID(opts) {
|
|
2572
2572
|
var _this = _Node.call(this, opts) || this;
|
|
2573
|
-
_this.type = _types
|
|
2573
|
+
_this.type = _types.ID;
|
|
2574
2574
|
return _this;
|
|
2575
2575
|
}
|
|
2576
|
-
var _proto = ID
|
|
2576
|
+
var _proto = ID.prototype;
|
|
2577
2577
|
_proto.valueToString = function valueToString() {
|
|
2578
2578
|
return "#" + _Node.prototype.valueToString.call(this);
|
|
2579
2579
|
};
|
|
2580
|
-
return ID
|
|
2581
|
-
}(_node
|
|
2580
|
+
return ID;
|
|
2581
|
+
}(_node["default"]);
|
|
2582
2582
|
exports["default"] = ID;
|
|
2583
2583
|
module.exports = exports.default;
|
|
2584
2584
|
}));
|
|
@@ -2588,45 +2588,45 @@ var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2588
2588
|
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2589
2589
|
exports.__esModule = true;
|
|
2590
2590
|
exports["default"] = void 0;
|
|
2591
|
-
var _cssesc
|
|
2592
|
-
var _util
|
|
2593
|
-
var _node
|
|
2594
|
-
function _interopRequireDefault
|
|
2591
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
2592
|
+
var _util = require_util();
|
|
2593
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
2594
|
+
function _interopRequireDefault(obj) {
|
|
2595
2595
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2596
2596
|
}
|
|
2597
|
-
function _defineProperties
|
|
2598
|
-
for (var i
|
|
2599
|
-
var descriptor = props[i
|
|
2597
|
+
function _defineProperties(target, props) {
|
|
2598
|
+
for (var i = 0; i < props.length; i++) {
|
|
2599
|
+
var descriptor = props[i];
|
|
2600
2600
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
2601
2601
|
descriptor.configurable = true;
|
|
2602
2602
|
if ("value" in descriptor) descriptor.writable = true;
|
|
2603
2603
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2604
2604
|
}
|
|
2605
2605
|
}
|
|
2606
|
-
function _createClass
|
|
2607
|
-
if (protoProps) _defineProperties
|
|
2608
|
-
if (staticProps) _defineProperties
|
|
2606
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2607
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2608
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2609
2609
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2610
2610
|
return Constructor;
|
|
2611
2611
|
}
|
|
2612
|
-
function _inheritsLoose
|
|
2612
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2613
2613
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2614
2614
|
subClass.prototype.constructor = subClass;
|
|
2615
|
-
_setPrototypeOf
|
|
2615
|
+
_setPrototypeOf(subClass, superClass);
|
|
2616
2616
|
}
|
|
2617
|
-
function _setPrototypeOf
|
|
2618
|
-
_setPrototypeOf
|
|
2617
|
+
function _setPrototypeOf(o, p) {
|
|
2618
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2619
2619
|
o$1.__proto__ = p$1;
|
|
2620
2620
|
return o$1;
|
|
2621
2621
|
};
|
|
2622
|
-
return _setPrototypeOf
|
|
2622
|
+
return _setPrototypeOf(o, p);
|
|
2623
2623
|
}
|
|
2624
2624
|
var Namespace = /* @__PURE__ */ function(_Node) {
|
|
2625
|
-
_inheritsLoose
|
|
2626
|
-
function Namespace
|
|
2625
|
+
_inheritsLoose(Namespace, _Node);
|
|
2626
|
+
function Namespace() {
|
|
2627
2627
|
return _Node.apply(this, arguments) || this;
|
|
2628
2628
|
}
|
|
2629
|
-
var _proto = Namespace
|
|
2629
|
+
var _proto = Namespace.prototype;
|
|
2630
2630
|
_proto.qualifiedName = function qualifiedName(value) {
|
|
2631
2631
|
if (this.namespace) return this.namespaceString + "|" + value;
|
|
2632
2632
|
else return value;
|
|
@@ -2634,7 +2634,7 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2634
2634
|
_proto.valueToString = function valueToString() {
|
|
2635
2635
|
return this.qualifiedName(_Node.prototype.valueToString.call(this));
|
|
2636
2636
|
};
|
|
2637
|
-
_createClass
|
|
2637
|
+
_createClass(Namespace, [
|
|
2638
2638
|
{
|
|
2639
2639
|
key: "namespace",
|
|
2640
2640
|
get: function get() {
|
|
@@ -2646,10 +2646,10 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2646
2646
|
if (this.raws) delete this.raws.namespace;
|
|
2647
2647
|
return;
|
|
2648
2648
|
}
|
|
2649
|
-
var escaped = (0, _cssesc
|
|
2649
|
+
var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true });
|
|
2650
2650
|
this._namespace = namespace;
|
|
2651
2651
|
if (escaped !== namespace) {
|
|
2652
|
-
(0, _util
|
|
2652
|
+
(0, _util.ensureObject)(this, "raws");
|
|
2653
2653
|
this.raws.namespace = escaped;
|
|
2654
2654
|
} else if (this.raws) delete this.raws.namespace;
|
|
2655
2655
|
}
|
|
@@ -2674,8 +2674,8 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
]);
|
|
2677
|
-
return Namespace
|
|
2678
|
-
}(_node
|
|
2677
|
+
return Namespace;
|
|
2678
|
+
}(_node["default"]);
|
|
2679
2679
|
exports["default"] = Namespace;
|
|
2680
2680
|
module.exports = exports.default;
|
|
2681
2681
|
}));
|
|
@@ -2685,32 +2685,32 @@ var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2685
2685
|
var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2686
2686
|
exports.__esModule = true;
|
|
2687
2687
|
exports["default"] = void 0;
|
|
2688
|
-
var _namespace
|
|
2689
|
-
var _types
|
|
2690
|
-
function _interopRequireDefault
|
|
2688
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
2689
|
+
var _types = require_types();
|
|
2690
|
+
function _interopRequireDefault(obj) {
|
|
2691
2691
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2692
2692
|
}
|
|
2693
|
-
function _inheritsLoose
|
|
2693
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2694
2694
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2695
2695
|
subClass.prototype.constructor = subClass;
|
|
2696
|
-
_setPrototypeOf
|
|
2696
|
+
_setPrototypeOf(subClass, superClass);
|
|
2697
2697
|
}
|
|
2698
|
-
function _setPrototypeOf
|
|
2699
|
-
_setPrototypeOf
|
|
2698
|
+
function _setPrototypeOf(o, p) {
|
|
2699
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2700
2700
|
o$1.__proto__ = p$1;
|
|
2701
2701
|
return o$1;
|
|
2702
2702
|
};
|
|
2703
|
-
return _setPrototypeOf
|
|
2703
|
+
return _setPrototypeOf(o, p);
|
|
2704
2704
|
}
|
|
2705
2705
|
var Tag = /* @__PURE__ */ function(_Namespace) {
|
|
2706
|
-
_inheritsLoose
|
|
2707
|
-
function Tag
|
|
2706
|
+
_inheritsLoose(Tag, _Namespace);
|
|
2707
|
+
function Tag(opts) {
|
|
2708
2708
|
var _this = _Namespace.call(this, opts) || this;
|
|
2709
|
-
_this.type = _types
|
|
2709
|
+
_this.type = _types.TAG;
|
|
2710
2710
|
return _this;
|
|
2711
2711
|
}
|
|
2712
|
-
return Tag
|
|
2713
|
-
}(_namespace
|
|
2712
|
+
return Tag;
|
|
2713
|
+
}(_namespace["default"]);
|
|
2714
2714
|
exports["default"] = Tag;
|
|
2715
2715
|
module.exports = exports.default;
|
|
2716
2716
|
}));
|
|
@@ -2720,33 +2720,33 @@ var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2720
2720
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2721
2721
|
exports.__esModule = true;
|
|
2722
2722
|
exports["default"] = void 0;
|
|
2723
|
-
var _node
|
|
2724
|
-
var _types
|
|
2725
|
-
function _interopRequireDefault
|
|
2723
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
2724
|
+
var _types = require_types();
|
|
2725
|
+
function _interopRequireDefault(obj) {
|
|
2726
2726
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2727
2727
|
}
|
|
2728
|
-
function _inheritsLoose
|
|
2728
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2729
2729
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2730
2730
|
subClass.prototype.constructor = subClass;
|
|
2731
|
-
_setPrototypeOf
|
|
2731
|
+
_setPrototypeOf(subClass, superClass);
|
|
2732
2732
|
}
|
|
2733
|
-
function _setPrototypeOf
|
|
2734
|
-
_setPrototypeOf
|
|
2733
|
+
function _setPrototypeOf(o, p) {
|
|
2734
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2735
2735
|
o$1.__proto__ = p$1;
|
|
2736
2736
|
return o$1;
|
|
2737
2737
|
};
|
|
2738
|
-
return _setPrototypeOf
|
|
2738
|
+
return _setPrototypeOf(o, p);
|
|
2739
2739
|
}
|
|
2740
|
-
var String
|
|
2741
|
-
_inheritsLoose
|
|
2742
|
-
function String$
|
|
2740
|
+
var String = /* @__PURE__ */ function(_Node) {
|
|
2741
|
+
_inheritsLoose(String$1, _Node);
|
|
2742
|
+
function String$1(opts) {
|
|
2743
2743
|
var _this = _Node.call(this, opts) || this;
|
|
2744
|
-
_this.type = _types
|
|
2744
|
+
_this.type = _types.STRING;
|
|
2745
2745
|
return _this;
|
|
2746
2746
|
}
|
|
2747
|
-
return String$
|
|
2748
|
-
}(_node
|
|
2749
|
-
exports["default"] = String
|
|
2747
|
+
return String$1;
|
|
2748
|
+
}(_node["default"]);
|
|
2749
|
+
exports["default"] = String;
|
|
2750
2750
|
module.exports = exports.default;
|
|
2751
2751
|
}));
|
|
2752
2752
|
|
|
@@ -2755,32 +2755,32 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2755
2755
|
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2756
2756
|
exports.__esModule = true;
|
|
2757
2757
|
exports["default"] = void 0;
|
|
2758
|
-
var _container = _interopRequireDefault
|
|
2759
|
-
var _types
|
|
2760
|
-
function _interopRequireDefault
|
|
2758
|
+
var _container = _interopRequireDefault(require_container());
|
|
2759
|
+
var _types = require_types();
|
|
2760
|
+
function _interopRequireDefault(obj) {
|
|
2761
2761
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2762
2762
|
}
|
|
2763
|
-
function _inheritsLoose
|
|
2763
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2764
2764
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2765
2765
|
subClass.prototype.constructor = subClass;
|
|
2766
|
-
_setPrototypeOf
|
|
2766
|
+
_setPrototypeOf(subClass, superClass);
|
|
2767
2767
|
}
|
|
2768
|
-
function _setPrototypeOf
|
|
2769
|
-
_setPrototypeOf
|
|
2768
|
+
function _setPrototypeOf(o, p) {
|
|
2769
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2770
2770
|
o$1.__proto__ = p$1;
|
|
2771
2771
|
return o$1;
|
|
2772
2772
|
};
|
|
2773
|
-
return _setPrototypeOf
|
|
2773
|
+
return _setPrototypeOf(o, p);
|
|
2774
2774
|
}
|
|
2775
2775
|
var Pseudo = /* @__PURE__ */ function(_Container) {
|
|
2776
|
-
_inheritsLoose
|
|
2777
|
-
function Pseudo
|
|
2776
|
+
_inheritsLoose(Pseudo, _Container);
|
|
2777
|
+
function Pseudo(opts) {
|
|
2778
2778
|
var _this = _Container.call(this, opts) || this;
|
|
2779
|
-
_this.type = _types
|
|
2779
|
+
_this.type = _types.PSEUDO;
|
|
2780
2780
|
return _this;
|
|
2781
2781
|
}
|
|
2782
|
-
var _proto = Pseudo
|
|
2783
|
-
_proto.toString = function toString
|
|
2782
|
+
var _proto = Pseudo.prototype;
|
|
2783
|
+
_proto.toString = function toString() {
|
|
2784
2784
|
var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
|
|
2785
2785
|
return [
|
|
2786
2786
|
this.rawSpaceBefore,
|
|
@@ -2789,7 +2789,7 @@ var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2789
2789
|
this.rawSpaceAfter
|
|
2790
2790
|
].join("");
|
|
2791
2791
|
};
|
|
2792
|
-
return Pseudo
|
|
2792
|
+
return Pseudo;
|
|
2793
2793
|
}(_container["default"]);
|
|
2794
2794
|
exports["default"] = Pseudo;
|
|
2795
2795
|
module.exports = exports.default;
|
|
@@ -2810,40 +2810,40 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2810
2810
|
exports.__esModule = true;
|
|
2811
2811
|
exports["default"] = void 0;
|
|
2812
2812
|
exports.unescapeValue = unescapeValue;
|
|
2813
|
-
var _cssesc = _interopRequireDefault
|
|
2814
|
-
var _unesc = _interopRequireDefault
|
|
2815
|
-
var _namespace
|
|
2816
|
-
var _types
|
|
2813
|
+
var _cssesc = _interopRequireDefault(require_cssesc());
|
|
2814
|
+
var _unesc = _interopRequireDefault(require_unesc());
|
|
2815
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
2816
|
+
var _types = require_types();
|
|
2817
2817
|
var _CSSESC_QUOTE_OPTIONS;
|
|
2818
|
-
function _interopRequireDefault
|
|
2818
|
+
function _interopRequireDefault(obj) {
|
|
2819
2819
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
2820
2820
|
}
|
|
2821
|
-
function _defineProperties
|
|
2822
|
-
for (var i
|
|
2823
|
-
var descriptor = props[i
|
|
2821
|
+
function _defineProperties(target, props) {
|
|
2822
|
+
for (var i = 0; i < props.length; i++) {
|
|
2823
|
+
var descriptor = props[i];
|
|
2824
2824
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
2825
2825
|
descriptor.configurable = true;
|
|
2826
2826
|
if ("value" in descriptor) descriptor.writable = true;
|
|
2827
2827
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2828
2828
|
}
|
|
2829
2829
|
}
|
|
2830
|
-
function _createClass
|
|
2831
|
-
if (protoProps) _defineProperties
|
|
2832
|
-
if (staticProps) _defineProperties
|
|
2830
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2831
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2832
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2833
2833
|
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2834
2834
|
return Constructor;
|
|
2835
2835
|
}
|
|
2836
|
-
function _inheritsLoose
|
|
2836
|
+
function _inheritsLoose(subClass, superClass) {
|
|
2837
2837
|
subClass.prototype = Object.create(superClass.prototype);
|
|
2838
2838
|
subClass.prototype.constructor = subClass;
|
|
2839
|
-
_setPrototypeOf
|
|
2839
|
+
_setPrototypeOf(subClass, superClass);
|
|
2840
2840
|
}
|
|
2841
|
-
function _setPrototypeOf
|
|
2842
|
-
_setPrototypeOf
|
|
2841
|
+
function _setPrototypeOf(o, p) {
|
|
2842
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
2843
2843
|
o$1.__proto__ = p$1;
|
|
2844
2844
|
return o$1;
|
|
2845
2845
|
};
|
|
2846
|
-
return _setPrototypeOf
|
|
2846
|
+
return _setPrototypeOf(o, p);
|
|
2847
2847
|
}
|
|
2848
2848
|
var deprecate = require_node();
|
|
2849
2849
|
var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
|
|
@@ -2879,12 +2879,12 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2879
2879
|
return opts;
|
|
2880
2880
|
}
|
|
2881
2881
|
var Attribute = /* @__PURE__ */ function(_Namespace) {
|
|
2882
|
-
_inheritsLoose
|
|
2883
|
-
function Attribute
|
|
2882
|
+
_inheritsLoose(Attribute, _Namespace);
|
|
2883
|
+
function Attribute(opts) {
|
|
2884
2884
|
var _this;
|
|
2885
2885
|
if (opts === void 0) opts = {};
|
|
2886
2886
|
_this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
|
|
2887
|
-
_this.type = _types
|
|
2887
|
+
_this.type = _types.ATTRIBUTE;
|
|
2888
2888
|
_this.raws = _this.raws || {};
|
|
2889
2889
|
Object.defineProperty(_this.raws, "unquoted", {
|
|
2890
2890
|
get: deprecate(function() {
|
|
@@ -2918,7 +2918,7 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2918
2918
|
* and the other options specified here. See the `smartQuoteMark()`
|
|
2919
2919
|
* method.
|
|
2920
2920
|
**/
|
|
2921
|
-
var _proto = Attribute
|
|
2921
|
+
var _proto = Attribute.prototype;
|
|
2922
2922
|
_proto.getQuotedValue = function getQuotedValue(options) {
|
|
2923
2923
|
if (options === void 0) options = {};
|
|
2924
2924
|
var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
|
|
@@ -2939,24 +2939,24 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2939
2939
|
var numDoubleQuotes = v.replace(/[^"]/g, "").length;
|
|
2940
2940
|
if (numSingleQuotes + numDoubleQuotes === 0) {
|
|
2941
2941
|
var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
|
|
2942
|
-
if (escaped === v) return Attribute
|
|
2942
|
+
if (escaped === v) return Attribute.NO_QUOTE;
|
|
2943
2943
|
else {
|
|
2944
2944
|
var pref = this.preferredQuoteMark(options);
|
|
2945
|
-
if (pref === Attribute
|
|
2946
|
-
var quote = this.quoteMark || options.quoteMark || Attribute
|
|
2945
|
+
if (pref === Attribute.NO_QUOTE) {
|
|
2946
|
+
var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
|
|
2947
2947
|
var opts = CSSESC_QUOTE_OPTIONS[quote];
|
|
2948
2948
|
if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote;
|
|
2949
2949
|
}
|
|
2950
2950
|
return pref;
|
|
2951
2951
|
}
|
|
2952
2952
|
} else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
|
|
2953
|
-
else if (numDoubleQuotes < numSingleQuotes) return Attribute
|
|
2954
|
-
else return Attribute
|
|
2953
|
+
else if (numDoubleQuotes < numSingleQuotes) return Attribute.DOUBLE_QUOTE;
|
|
2954
|
+
else return Attribute.SINGLE_QUOTE;
|
|
2955
2955
|
};
|
|
2956
2956
|
_proto.preferredQuoteMark = function preferredQuoteMark(options) {
|
|
2957
2957
|
var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
|
|
2958
2958
|
if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
|
|
2959
|
-
if (quoteMark === void 0) quoteMark = Attribute
|
|
2959
|
+
if (quoteMark === void 0) quoteMark = Attribute.DOUBLE_QUOTE;
|
|
2960
2960
|
return quoteMark;
|
|
2961
2961
|
};
|
|
2962
2962
|
_proto._syncRawValue = function _syncRawValue() {
|
|
@@ -3015,23 +3015,23 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3015
3015
|
if (name === "insensitive") return this.insensitive ? count : -1;
|
|
3016
3016
|
return -1;
|
|
3017
3017
|
};
|
|
3018
|
-
_proto.toString = function toString
|
|
3018
|
+
_proto.toString = function toString() {
|
|
3019
3019
|
var _this2 = this;
|
|
3020
|
-
var selector
|
|
3021
|
-
selector
|
|
3020
|
+
var selector = [this.rawSpaceBefore, "["];
|
|
3021
|
+
selector.push(this._stringFor("qualifiedAttribute", "attribute"));
|
|
3022
3022
|
if (this.operator && (this.value || this.value === "")) {
|
|
3023
|
-
selector
|
|
3024
|
-
selector
|
|
3025
|
-
selector
|
|
3023
|
+
selector.push(this._stringFor("operator"));
|
|
3024
|
+
selector.push(this._stringFor("value"));
|
|
3025
|
+
selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
|
|
3026
3026
|
if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
|
|
3027
3027
|
return defaultAttrConcat(attrValue, attrSpaces);
|
|
3028
3028
|
}));
|
|
3029
3029
|
}
|
|
3030
|
-
selector
|
|
3031
|
-
selector
|
|
3032
|
-
return selector
|
|
3030
|
+
selector.push("]");
|
|
3031
|
+
selector.push(this.rawSpaceAfter);
|
|
3032
|
+
return selector.join("");
|
|
3033
3033
|
};
|
|
3034
|
-
_createClass
|
|
3034
|
+
_createClass(Attribute, [
|
|
3035
3035
|
{
|
|
3036
3036
|
key: "quoted",
|
|
3037
3037
|
get: function get() {
|
|
@@ -3110,8 +3110,8 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
3112
|
]);
|
|
3113
|
-
return Attribute
|
|
3114
|
-
}(_namespace
|
|
3113
|
+
return Attribute;
|
|
3114
|
+
}(_namespace["default"]);
|
|
3115
3115
|
exports["default"] = Attribute;
|
|
3116
3116
|
Attribute.NO_QUOTE = null;
|
|
3117
3117
|
Attribute.SINGLE_QUOTE = "'";
|
|
@@ -3136,32 +3136,32 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3136
3136
|
var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3137
3137
|
exports.__esModule = true;
|
|
3138
3138
|
exports["default"] = void 0;
|
|
3139
|
-
var _namespace = _interopRequireDefault
|
|
3140
|
-
var _types
|
|
3141
|
-
function _interopRequireDefault
|
|
3139
|
+
var _namespace = _interopRequireDefault(require_namespace());
|
|
3140
|
+
var _types = require_types();
|
|
3141
|
+
function _interopRequireDefault(obj) {
|
|
3142
3142
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3143
3143
|
}
|
|
3144
|
-
function _inheritsLoose
|
|
3144
|
+
function _inheritsLoose(subClass, superClass) {
|
|
3145
3145
|
subClass.prototype = Object.create(superClass.prototype);
|
|
3146
3146
|
subClass.prototype.constructor = subClass;
|
|
3147
|
-
_setPrototypeOf
|
|
3147
|
+
_setPrototypeOf(subClass, superClass);
|
|
3148
3148
|
}
|
|
3149
|
-
function _setPrototypeOf
|
|
3150
|
-
_setPrototypeOf
|
|
3149
|
+
function _setPrototypeOf(o, p) {
|
|
3150
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
3151
3151
|
o$1.__proto__ = p$1;
|
|
3152
3152
|
return o$1;
|
|
3153
3153
|
};
|
|
3154
|
-
return _setPrototypeOf
|
|
3154
|
+
return _setPrototypeOf(o, p);
|
|
3155
3155
|
}
|
|
3156
3156
|
var Universal = /* @__PURE__ */ function(_Namespace) {
|
|
3157
|
-
_inheritsLoose
|
|
3158
|
-
function Universal
|
|
3157
|
+
_inheritsLoose(Universal, _Namespace);
|
|
3158
|
+
function Universal(opts) {
|
|
3159
3159
|
var _this = _Namespace.call(this, opts) || this;
|
|
3160
|
-
_this.type = _types
|
|
3160
|
+
_this.type = _types.UNIVERSAL;
|
|
3161
3161
|
_this.value = "*";
|
|
3162
3162
|
return _this;
|
|
3163
3163
|
}
|
|
3164
|
-
return Universal
|
|
3164
|
+
return Universal;
|
|
3165
3165
|
}(_namespace["default"]);
|
|
3166
3166
|
exports["default"] = Universal;
|
|
3167
3167
|
module.exports = exports.default;
|
|
@@ -3172,32 +3172,32 @@ var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3172
3172
|
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3173
3173
|
exports.__esModule = true;
|
|
3174
3174
|
exports["default"] = void 0;
|
|
3175
|
-
var _node
|
|
3176
|
-
var _types
|
|
3177
|
-
function _interopRequireDefault
|
|
3175
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
3176
|
+
var _types = require_types();
|
|
3177
|
+
function _interopRequireDefault(obj) {
|
|
3178
3178
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3179
3179
|
}
|
|
3180
|
-
function _inheritsLoose
|
|
3180
|
+
function _inheritsLoose(subClass, superClass) {
|
|
3181
3181
|
subClass.prototype = Object.create(superClass.prototype);
|
|
3182
3182
|
subClass.prototype.constructor = subClass;
|
|
3183
|
-
_setPrototypeOf
|
|
3183
|
+
_setPrototypeOf(subClass, superClass);
|
|
3184
3184
|
}
|
|
3185
|
-
function _setPrototypeOf
|
|
3186
|
-
_setPrototypeOf
|
|
3185
|
+
function _setPrototypeOf(o, p) {
|
|
3186
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
3187
3187
|
o$1.__proto__ = p$1;
|
|
3188
3188
|
return o$1;
|
|
3189
3189
|
};
|
|
3190
|
-
return _setPrototypeOf
|
|
3190
|
+
return _setPrototypeOf(o, p);
|
|
3191
3191
|
}
|
|
3192
3192
|
var Combinator = /* @__PURE__ */ function(_Node) {
|
|
3193
|
-
_inheritsLoose
|
|
3194
|
-
function Combinator
|
|
3193
|
+
_inheritsLoose(Combinator, _Node);
|
|
3194
|
+
function Combinator(opts) {
|
|
3195
3195
|
var _this = _Node.call(this, opts) || this;
|
|
3196
|
-
_this.type = _types
|
|
3196
|
+
_this.type = _types.COMBINATOR;
|
|
3197
3197
|
return _this;
|
|
3198
3198
|
}
|
|
3199
|
-
return Combinator
|
|
3200
|
-
}(_node
|
|
3199
|
+
return Combinator;
|
|
3200
|
+
}(_node["default"]);
|
|
3201
3201
|
exports["default"] = Combinator;
|
|
3202
3202
|
module.exports = exports.default;
|
|
3203
3203
|
}));
|
|
@@ -3207,9 +3207,9 @@ var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3207
3207
|
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3208
3208
|
exports.__esModule = true;
|
|
3209
3209
|
exports["default"] = void 0;
|
|
3210
|
-
var _node = _interopRequireDefault
|
|
3211
|
-
var _types
|
|
3212
|
-
function _interopRequireDefault
|
|
3210
|
+
var _node = _interopRequireDefault(require_node$1());
|
|
3211
|
+
var _types = require_types();
|
|
3212
|
+
function _interopRequireDefault(obj) {
|
|
3213
3213
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3214
3214
|
}
|
|
3215
3215
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -3218,21 +3218,21 @@ var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3218
3218
|
_setPrototypeOf(subClass, superClass);
|
|
3219
3219
|
}
|
|
3220
3220
|
function _setPrototypeOf(o, p) {
|
|
3221
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf
|
|
3221
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o$1, p$1) {
|
|
3222
3222
|
o$1.__proto__ = p$1;
|
|
3223
3223
|
return o$1;
|
|
3224
3224
|
};
|
|
3225
3225
|
return _setPrototypeOf(o, p);
|
|
3226
3226
|
}
|
|
3227
3227
|
var Nesting = /* @__PURE__ */ function(_Node) {
|
|
3228
|
-
_inheritsLoose(Nesting
|
|
3229
|
-
function Nesting
|
|
3228
|
+
_inheritsLoose(Nesting, _Node);
|
|
3229
|
+
function Nesting(opts) {
|
|
3230
3230
|
var _this = _Node.call(this, opts) || this;
|
|
3231
|
-
_this.type = _types
|
|
3231
|
+
_this.type = _types.NESTING;
|
|
3232
3232
|
_this.value = "&";
|
|
3233
3233
|
return _this;
|
|
3234
3234
|
}
|
|
3235
|
-
return Nesting
|
|
3235
|
+
return Nesting;
|
|
3236
3236
|
}(_node["default"]);
|
|
3237
3237
|
exports["default"] = Nesting;
|
|
3238
3238
|
module.exports = exports.default;
|
|
@@ -3312,12 +3312,12 @@ var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3312
3312
|
exports.tab = tab;
|
|
3313
3313
|
var str = singleQuote;
|
|
3314
3314
|
exports.str = str;
|
|
3315
|
-
var comment
|
|
3316
|
-
exports.comment = comment
|
|
3315
|
+
var comment = -1;
|
|
3316
|
+
exports.comment = comment;
|
|
3317
3317
|
var word = -2;
|
|
3318
3318
|
exports.word = word;
|
|
3319
|
-
var combinator
|
|
3320
|
-
exports.combinator = combinator
|
|
3319
|
+
var combinator = -3;
|
|
3320
|
+
exports.combinator = combinator;
|
|
3321
3321
|
}));
|
|
3322
3322
|
|
|
3323
3323
|
//#endregion
|
|
@@ -3326,20 +3326,20 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3326
3326
|
exports.__esModule = true;
|
|
3327
3327
|
exports.FIELDS = void 0;
|
|
3328
3328
|
exports["default"] = tokenize;
|
|
3329
|
-
var t = _interopRequireWildcard
|
|
3329
|
+
var t = _interopRequireWildcard(require_tokenTypes());
|
|
3330
3330
|
var _unescapable, _wordDelimiters;
|
|
3331
|
-
function _getRequireWildcardCache
|
|
3331
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
3332
3332
|
if (typeof WeakMap !== "function") return null;
|
|
3333
3333
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
3334
3334
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
3335
|
-
return (_getRequireWildcardCache
|
|
3335
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop$1) {
|
|
3336
3336
|
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
3337
3337
|
})(nodeInterop);
|
|
3338
3338
|
}
|
|
3339
|
-
function _interopRequireWildcard
|
|
3339
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
3340
3340
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
3341
3341
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
3342
|
-
var cache = _getRequireWildcardCache
|
|
3342
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
3343
3343
|
if (cache && cache.has(obj)) return cache.get(obj);
|
|
3344
3344
|
var newObj = {};
|
|
3345
3345
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
@@ -3403,7 +3403,7 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3403
3403
|
};
|
|
3404
3404
|
exports.FIELDS = FIELDS;
|
|
3405
3405
|
function tokenize(input) {
|
|
3406
|
-
var tokens
|
|
3406
|
+
var tokens = [];
|
|
3407
3407
|
var css = input.css.valueOf();
|
|
3408
3408
|
var length = css.length;
|
|
3409
3409
|
var offset = -1;
|
|
@@ -3528,7 +3528,7 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3528
3528
|
end = next + 1;
|
|
3529
3529
|
break;
|
|
3530
3530
|
}
|
|
3531
|
-
tokens
|
|
3531
|
+
tokens.push([
|
|
3532
3532
|
tokenType,
|
|
3533
3533
|
line,
|
|
3534
3534
|
start - offset,
|
|
@@ -3543,7 +3543,7 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3543
3543
|
}
|
|
3544
3544
|
start = end;
|
|
3545
3545
|
}
|
|
3546
|
-
return tokens
|
|
3546
|
+
return tokens;
|
|
3547
3547
|
}
|
|
3548
3548
|
}));
|
|
3549
3549
|
|
|
@@ -3552,36 +3552,36 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3552
3552
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3553
3553
|
exports.__esModule = true;
|
|
3554
3554
|
exports["default"] = void 0;
|
|
3555
|
-
var _root
|
|
3556
|
-
var _selector
|
|
3557
|
-
var _className
|
|
3558
|
-
var _comment
|
|
3559
|
-
var _id
|
|
3560
|
-
var _tag
|
|
3561
|
-
var _string
|
|
3562
|
-
var _pseudo
|
|
3563
|
-
var _attribute
|
|
3564
|
-
var _universal
|
|
3565
|
-
var _combinator
|
|
3566
|
-
var _nesting
|
|
3567
|
-
var _sortAscending = _interopRequireDefault
|
|
3568
|
-
var _tokenize = _interopRequireWildcard
|
|
3569
|
-
var tokens = _interopRequireWildcard
|
|
3570
|
-
var types = _interopRequireWildcard
|
|
3555
|
+
var _root = _interopRequireDefault(require_root());
|
|
3556
|
+
var _selector = _interopRequireDefault(require_selector());
|
|
3557
|
+
var _className = _interopRequireDefault(require_className());
|
|
3558
|
+
var _comment = _interopRequireDefault(require_comment());
|
|
3559
|
+
var _id = _interopRequireDefault(require_id());
|
|
3560
|
+
var _tag = _interopRequireDefault(require_tag());
|
|
3561
|
+
var _string = _interopRequireDefault(require_string());
|
|
3562
|
+
var _pseudo = _interopRequireDefault(require_pseudo());
|
|
3563
|
+
var _attribute = _interopRequireWildcard(require_attribute());
|
|
3564
|
+
var _universal = _interopRequireDefault(require_universal());
|
|
3565
|
+
var _combinator = _interopRequireDefault(require_combinator());
|
|
3566
|
+
var _nesting = _interopRequireDefault(require_nesting());
|
|
3567
|
+
var _sortAscending = _interopRequireDefault(require_sortAscending());
|
|
3568
|
+
var _tokenize = _interopRequireWildcard(require_tokenize());
|
|
3569
|
+
var tokens = _interopRequireWildcard(require_tokenTypes());
|
|
3570
|
+
var types = _interopRequireWildcard(require_types());
|
|
3571
3571
|
var _util = require_util();
|
|
3572
3572
|
var _WHITESPACE_TOKENS, _Object$assign;
|
|
3573
|
-
function _getRequireWildcardCache
|
|
3573
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
3574
3574
|
if (typeof WeakMap !== "function") return null;
|
|
3575
3575
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
3576
3576
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
3577
|
-
return (_getRequireWildcardCache
|
|
3577
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop$1) {
|
|
3578
3578
|
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
3579
3579
|
})(nodeInterop);
|
|
3580
3580
|
}
|
|
3581
|
-
function _interopRequireWildcard
|
|
3581
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
3582
3582
|
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
3583
3583
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
3584
|
-
var cache = _getRequireWildcardCache
|
|
3584
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
3585
3585
|
if (cache && cache.has(obj)) return cache.get(obj);
|
|
3586
3586
|
var newObj = {};
|
|
3587
3587
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
@@ -3594,12 +3594,12 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3594
3594
|
if (cache) cache.set(obj, newObj);
|
|
3595
3595
|
return newObj;
|
|
3596
3596
|
}
|
|
3597
|
-
function _interopRequireDefault
|
|
3597
|
+
function _interopRequireDefault(obj) {
|
|
3598
3598
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
3599
3599
|
}
|
|
3600
3600
|
function _defineProperties(target, props) {
|
|
3601
|
-
for (var i
|
|
3602
|
-
var descriptor = props[i
|
|
3601
|
+
for (var i = 0; i < props.length; i++) {
|
|
3602
|
+
var descriptor = props[i];
|
|
3603
3603
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
3604
3604
|
descriptor.configurable = true;
|
|
3605
3605
|
if ("value" in descriptor) descriptor.writable = true;
|
|
@@ -3656,19 +3656,19 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3656
3656
|
return node;
|
|
3657
3657
|
}
|
|
3658
3658
|
function indexesOf(array, item) {
|
|
3659
|
-
var i
|
|
3659
|
+
var i = -1;
|
|
3660
3660
|
var indexes = [];
|
|
3661
|
-
while ((i
|
|
3661
|
+
while ((i = array.indexOf(item, i + 1)) !== -1) indexes.push(i);
|
|
3662
3662
|
return indexes;
|
|
3663
3663
|
}
|
|
3664
3664
|
function uniqs() {
|
|
3665
3665
|
var list = Array.prototype.concat.apply([], arguments);
|
|
3666
|
-
return list.filter(function(item, i
|
|
3667
|
-
return i
|
|
3666
|
+
return list.filter(function(item, i) {
|
|
3667
|
+
return i === list.indexOf(item);
|
|
3668
3668
|
});
|
|
3669
3669
|
}
|
|
3670
3670
|
var Parser = /* @__PURE__ */ function() {
|
|
3671
|
-
function Parser
|
|
3671
|
+
function Parser(rule, options) {
|
|
3672
3672
|
if (options === void 0) options = {};
|
|
3673
3673
|
this.rule = rule;
|
|
3674
3674
|
this.options = Object.assign({
|
|
@@ -3683,20 +3683,20 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3683
3683
|
safe: this.options.safe
|
|
3684
3684
|
});
|
|
3685
3685
|
var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
|
|
3686
|
-
this.root = new _root
|
|
3686
|
+
this.root = new _root["default"]({ source: rootSource });
|
|
3687
3687
|
this.root.errorGenerator = this._errorGenerator();
|
|
3688
|
-
var selector
|
|
3688
|
+
var selector = new _selector["default"]({
|
|
3689
3689
|
source: { start: {
|
|
3690
3690
|
line: 1,
|
|
3691
3691
|
column: 1
|
|
3692
3692
|
} },
|
|
3693
3693
|
sourceIndex: 0
|
|
3694
3694
|
});
|
|
3695
|
-
this.root.append(selector
|
|
3696
|
-
this.current = selector
|
|
3695
|
+
this.root.append(selector);
|
|
3696
|
+
this.current = selector;
|
|
3697
3697
|
this.loop();
|
|
3698
3698
|
}
|
|
3699
|
-
var _proto = Parser
|
|
3699
|
+
var _proto = Parser.prototype;
|
|
3700
3700
|
_proto._errorGenerator = function _errorGenerator() {
|
|
3701
3701
|
var _this = this;
|
|
3702
3702
|
return function(message, errorOptions) {
|
|
@@ -3704,7 +3704,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3704
3704
|
return _this.rule.error(message, errorOptions);
|
|
3705
3705
|
};
|
|
3706
3706
|
};
|
|
3707
|
-
_proto.attribute = function attribute
|
|
3707
|
+
_proto.attribute = function attribute() {
|
|
3708
3708
|
var attr = [];
|
|
3709
3709
|
var startingToken = this.currToken;
|
|
3710
3710
|
this.position++;
|
|
@@ -3850,7 +3850,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3850
3850
|
break;
|
|
3851
3851
|
case tokens.str:
|
|
3852
3852
|
if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
|
|
3853
|
-
var _unescapeValue = (0, _attribute
|
|
3853
|
+
var _unescapeValue = (0, _attribute.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
|
|
3854
3854
|
node.value = unescaped;
|
|
3855
3855
|
node.quoteMark = quoteMark;
|
|
3856
3856
|
lastAdded = "value";
|
|
@@ -3885,25 +3885,25 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
unescapeProp(node, "attribute");
|
|
3887
3887
|
unescapeProp(node, "namespace");
|
|
3888
|
-
this.newNode(new _attribute
|
|
3888
|
+
this.newNode(new _attribute["default"](node));
|
|
3889
3889
|
this.position++;
|
|
3890
3890
|
};
|
|
3891
3891
|
_proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
|
|
3892
3892
|
if (stopPosition < 0) stopPosition = this.tokens.length;
|
|
3893
3893
|
var startPosition = this.position;
|
|
3894
3894
|
var nodes = [];
|
|
3895
|
-
var space
|
|
3895
|
+
var space = "";
|
|
3896
3896
|
var lastComment = void 0;
|
|
3897
3897
|
do
|
|
3898
3898
|
if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
|
|
3899
|
-
if (!this.options.lossy) space
|
|
3899
|
+
if (!this.options.lossy) space += this.content();
|
|
3900
3900
|
} else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
|
|
3901
3901
|
var spaces = {};
|
|
3902
|
-
if (space
|
|
3903
|
-
spaces.before = space
|
|
3904
|
-
space
|
|
3902
|
+
if (space) {
|
|
3903
|
+
spaces.before = space;
|
|
3904
|
+
space = "";
|
|
3905
3905
|
}
|
|
3906
|
-
lastComment = new _comment
|
|
3906
|
+
lastComment = new _comment["default"]({
|
|
3907
3907
|
value: this.content(),
|
|
3908
3908
|
source: getTokenSource(this.currToken),
|
|
3909
3909
|
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
|
|
@@ -3912,17 +3912,17 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3912
3912
|
nodes.push(lastComment);
|
|
3913
3913
|
}
|
|
3914
3914
|
while (++this.position < stopPosition);
|
|
3915
|
-
if (space
|
|
3916
|
-
if (lastComment) lastComment.spaces.after = space
|
|
3915
|
+
if (space) {
|
|
3916
|
+
if (lastComment) lastComment.spaces.after = space;
|
|
3917
3917
|
else if (!this.options.lossy) {
|
|
3918
3918
|
var firstToken = this.tokens[startPosition];
|
|
3919
3919
|
var lastToken = this.tokens[this.position - 1];
|
|
3920
|
-
nodes.push(new _string
|
|
3920
|
+
nodes.push(new _string["default"]({
|
|
3921
3921
|
value: "",
|
|
3922
3922
|
source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
|
|
3923
3923
|
sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
|
|
3924
3924
|
spaces: {
|
|
3925
|
-
before: space
|
|
3925
|
+
before: space,
|
|
3926
3926
|
after: ""
|
|
3927
3927
|
}
|
|
3928
3928
|
}));
|
|
@@ -3933,17 +3933,17 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3933
3933
|
_proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
|
|
3934
3934
|
var _this2 = this;
|
|
3935
3935
|
if (requiredSpace === void 0) requiredSpace = false;
|
|
3936
|
-
var space
|
|
3936
|
+
var space = "";
|
|
3937
3937
|
var rawSpace = "";
|
|
3938
3938
|
nodes.forEach(function(n) {
|
|
3939
3939
|
var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
|
|
3940
3940
|
var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
|
|
3941
|
-
space
|
|
3941
|
+
space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
|
|
3942
3942
|
rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
|
|
3943
3943
|
});
|
|
3944
|
-
if (rawSpace === space
|
|
3944
|
+
if (rawSpace === space) rawSpace = void 0;
|
|
3945
3945
|
return {
|
|
3946
|
-
space
|
|
3946
|
+
space,
|
|
3947
3947
|
rawSpace
|
|
3948
3948
|
};
|
|
3949
3949
|
};
|
|
@@ -3957,7 +3957,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3957
3957
|
var name = (0, _util.unesc)(nameRaw).toLowerCase();
|
|
3958
3958
|
var raws = {};
|
|
3959
3959
|
if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
|
|
3960
|
-
var node = new _combinator
|
|
3960
|
+
var node = new _combinator["default"]({
|
|
3961
3961
|
value: "/" + name + "/",
|
|
3962
3962
|
source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
|
|
3963
3963
|
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
|
|
@@ -3967,7 +3967,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3967
3967
|
return node;
|
|
3968
3968
|
} else this.unexpected();
|
|
3969
3969
|
};
|
|
3970
|
-
_proto.combinator = function combinator
|
|
3970
|
+
_proto.combinator = function combinator() {
|
|
3971
3971
|
var _this3 = this;
|
|
3972
3972
|
if (this.content() === "|") return this.namespace();
|
|
3973
3973
|
var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
|
|
@@ -3976,9 +3976,9 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3976
3976
|
if (nodes.length > 0) {
|
|
3977
3977
|
var last = this.current.last;
|
|
3978
3978
|
if (last) {
|
|
3979
|
-
var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space
|
|
3979
|
+
var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
|
|
3980
3980
|
if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
|
|
3981
|
-
last.spaces.after += space
|
|
3981
|
+
last.spaces.after += space;
|
|
3982
3982
|
} else nodes.forEach(function(n) {
|
|
3983
3983
|
return _this3.newNode(n);
|
|
3984
3984
|
});
|
|
@@ -3991,7 +3991,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3991
3991
|
var node;
|
|
3992
3992
|
if (this.isNamedCombinator()) node = this.namedCombinator();
|
|
3993
3993
|
else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
|
|
3994
|
-
node = new _combinator
|
|
3994
|
+
node = new _combinator["default"]({
|
|
3995
3995
|
value: this.content(),
|
|
3996
3996
|
source: getTokenSource(this.currToken),
|
|
3997
3997
|
sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
|
|
@@ -4016,7 +4016,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4016
4016
|
spaces.after = _space2.slice(1);
|
|
4017
4017
|
raws.spaces.after = _rawSpace2.slice(1);
|
|
4018
4018
|
} else raws.value = _rawSpace2;
|
|
4019
|
-
node = new _combinator
|
|
4019
|
+
node = new _combinator["default"]({
|
|
4020
4020
|
value: " ",
|
|
4021
4021
|
source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
|
|
4022
4022
|
sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
|
|
@@ -4030,24 +4030,24 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4030
4030
|
}
|
|
4031
4031
|
return this.newNode(node);
|
|
4032
4032
|
};
|
|
4033
|
-
_proto.comma = function comma
|
|
4033
|
+
_proto.comma = function comma() {
|
|
4034
4034
|
if (this.position === this.tokens.length - 1) {
|
|
4035
4035
|
this.root.trailingComma = true;
|
|
4036
4036
|
this.position++;
|
|
4037
4037
|
return;
|
|
4038
4038
|
}
|
|
4039
4039
|
this.current._inferEndPosition();
|
|
4040
|
-
var selector
|
|
4040
|
+
var selector = new _selector["default"]({
|
|
4041
4041
|
source: { start: tokenStart(this.tokens[this.position + 1]) },
|
|
4042
4042
|
sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
|
|
4043
4043
|
});
|
|
4044
|
-
this.current.parent.append(selector
|
|
4045
|
-
this.current = selector
|
|
4044
|
+
this.current.parent.append(selector);
|
|
4045
|
+
this.current = selector;
|
|
4046
4046
|
this.position++;
|
|
4047
4047
|
};
|
|
4048
|
-
_proto.comment = function comment
|
|
4048
|
+
_proto.comment = function comment() {
|
|
4049
4049
|
var current = this.currToken;
|
|
4050
|
-
this.newNode(new _comment
|
|
4050
|
+
this.newNode(new _comment["default"]({
|
|
4051
4051
|
value: this.content(),
|
|
4052
4052
|
source: getTokenSource(current),
|
|
4053
4053
|
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
@@ -4083,7 +4083,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4083
4083
|
}
|
|
4084
4084
|
this.unexpectedPipe();
|
|
4085
4085
|
};
|
|
4086
|
-
_proto.nesting = function nesting
|
|
4086
|
+
_proto.nesting = function nesting() {
|
|
4087
4087
|
if (this.nextToken) {
|
|
4088
4088
|
if (this.content(this.nextToken) === "|") {
|
|
4089
4089
|
this.position++;
|
|
@@ -4091,7 +4091,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
4093
|
var current = this.currToken;
|
|
4094
|
-
this.newNode(new _nesting
|
|
4094
|
+
this.newNode(new _nesting["default"]({
|
|
4095
4095
|
value: this.content(),
|
|
4096
4096
|
source: getTokenSource(current),
|
|
4097
4097
|
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
@@ -4103,13 +4103,13 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4103
4103
|
var unbalanced = 1;
|
|
4104
4104
|
this.position++;
|
|
4105
4105
|
if (last && last.type === types.PSEUDO) {
|
|
4106
|
-
var selector
|
|
4106
|
+
var selector = new _selector["default"]({
|
|
4107
4107
|
source: { start: tokenStart(this.tokens[this.position]) },
|
|
4108
4108
|
sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
|
|
4109
4109
|
});
|
|
4110
4110
|
var cache = this.current;
|
|
4111
|
-
last.append(selector
|
|
4112
|
-
this.current = selector
|
|
4111
|
+
last.append(selector);
|
|
4112
|
+
this.current = selector;
|
|
4113
4113
|
while (this.position < this.tokens.length && unbalanced) {
|
|
4114
4114
|
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
|
|
4115
4115
|
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
@@ -4133,7 +4133,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4133
4133
|
this.position++;
|
|
4134
4134
|
}
|
|
4135
4135
|
if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
|
|
4136
|
-
else this.newNode(new _string
|
|
4136
|
+
else this.newNode(new _string["default"]({
|
|
4137
4137
|
value: parenValue,
|
|
4138
4138
|
source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
|
|
4139
4139
|
sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
|
|
@@ -4141,7 +4141,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4141
4141
|
}
|
|
4142
4142
|
if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
|
|
4143
4143
|
};
|
|
4144
|
-
_proto.pseudo = function pseudo
|
|
4144
|
+
_proto.pseudo = function pseudo() {
|
|
4145
4145
|
var _this4 = this;
|
|
4146
4146
|
var pseudoStr = "";
|
|
4147
4147
|
var startingToken = this.currToken;
|
|
@@ -4152,7 +4152,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4152
4152
|
if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
|
|
4153
4153
|
if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
|
|
4154
4154
|
pseudoStr += first;
|
|
4155
|
-
_this4.newNode(new _pseudo
|
|
4155
|
+
_this4.newNode(new _pseudo["default"]({
|
|
4156
4156
|
value: pseudoStr,
|
|
4157
4157
|
source: getTokenSourceSpan(startingToken, _this4.currToken),
|
|
4158
4158
|
sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
|
|
@@ -4161,7 +4161,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4161
4161
|
});
|
|
4162
4162
|
else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
|
|
4163
4163
|
};
|
|
4164
|
-
_proto.space = function space
|
|
4164
|
+
_proto.space = function space() {
|
|
4165
4165
|
var content = this.content();
|
|
4166
4166
|
if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
|
|
4167
4167
|
return node.type === "comment";
|
|
@@ -4173,23 +4173,23 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4173
4173
|
this.position++;
|
|
4174
4174
|
} else this.combinator();
|
|
4175
4175
|
};
|
|
4176
|
-
_proto.string = function string
|
|
4176
|
+
_proto.string = function string() {
|
|
4177
4177
|
var current = this.currToken;
|
|
4178
|
-
this.newNode(new _string
|
|
4178
|
+
this.newNode(new _string["default"]({
|
|
4179
4179
|
value: this.content(),
|
|
4180
4180
|
source: getTokenSource(current),
|
|
4181
4181
|
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
4182
4182
|
}));
|
|
4183
4183
|
this.position++;
|
|
4184
4184
|
};
|
|
4185
|
-
_proto.universal = function universal
|
|
4185
|
+
_proto.universal = function universal(namespace) {
|
|
4186
4186
|
var nextToken = this.nextToken;
|
|
4187
4187
|
if (nextToken && this.content(nextToken) === "|") {
|
|
4188
4188
|
this.position++;
|
|
4189
4189
|
return this.namespace();
|
|
4190
4190
|
}
|
|
4191
4191
|
var current = this.currToken;
|
|
4192
|
-
this.newNode(new _universal
|
|
4192
|
+
this.newNode(new _universal["default"]({
|
|
4193
4193
|
value: this.content(),
|
|
4194
4194
|
source: getTokenSource(current),
|
|
4195
4195
|
sourceIndex: current[_tokenize.FIELDS.START_POS]
|
|
@@ -4199,7 +4199,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4199
4199
|
_proto.splitWord = function splitWord(namespace, firstCallback) {
|
|
4200
4200
|
var _this5 = this;
|
|
4201
4201
|
var nextToken = this.nextToken;
|
|
4202
|
-
var word
|
|
4202
|
+
var word = this.content();
|
|
4203
4203
|
while (nextToken && ~[
|
|
4204
4204
|
tokens.dollar,
|
|
4205
4205
|
tokens.caret,
|
|
@@ -4208,36 +4208,36 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4208
4208
|
].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
|
|
4209
4209
|
this.position++;
|
|
4210
4210
|
var current = this.content();
|
|
4211
|
-
word
|
|
4211
|
+
word += current;
|
|
4212
4212
|
if (current.lastIndexOf("\\") === current.length - 1) {
|
|
4213
4213
|
var next = this.nextToken;
|
|
4214
4214
|
if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
|
|
4215
|
-
word
|
|
4215
|
+
word += this.requiredSpace(this.content(next));
|
|
4216
4216
|
this.position++;
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
4219
4219
|
nextToken = this.nextToken;
|
|
4220
4220
|
}
|
|
4221
|
-
var hasClass = indexesOf(word
|
|
4222
|
-
var escapedDot = word
|
|
4223
|
-
var isKeyframesPercent = /^\d+\.\d+%$/.test(word
|
|
4221
|
+
var hasClass = indexesOf(word, ".").filter(function(i) {
|
|
4222
|
+
var escapedDot = word[i - 1] === "\\";
|
|
4223
|
+
var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
|
|
4224
4224
|
return !escapedDot && !isKeyframesPercent;
|
|
4225
4225
|
});
|
|
4226
|
-
var hasId = indexesOf(word
|
|
4227
|
-
return word
|
|
4226
|
+
var hasId = indexesOf(word, "#").filter(function(i) {
|
|
4227
|
+
return word[i - 1] !== "\\";
|
|
4228
4228
|
});
|
|
4229
|
-
var interpolations = indexesOf(word
|
|
4229
|
+
var interpolations = indexesOf(word, "#{");
|
|
4230
4230
|
if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
|
|
4231
4231
|
return !~interpolations.indexOf(hashIndex);
|
|
4232
4232
|
});
|
|
4233
4233
|
var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
|
|
4234
|
-
indices.forEach(function(ind, i
|
|
4235
|
-
var index = indices[i
|
|
4236
|
-
var value = word
|
|
4237
|
-
if (i
|
|
4234
|
+
indices.forEach(function(ind, i) {
|
|
4235
|
+
var index = indices[i + 1] || word.length;
|
|
4236
|
+
var value = word.slice(ind, index);
|
|
4237
|
+
if (i === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
|
|
4238
4238
|
var node;
|
|
4239
4239
|
var current$1 = _this5.currToken;
|
|
4240
|
-
var sourceIndex = current$1[_tokenize.FIELDS.START_POS] + indices[i
|
|
4240
|
+
var sourceIndex = current$1[_tokenize.FIELDS.START_POS] + indices[i];
|
|
4241
4241
|
var source = getSource(current$1[1], current$1[2] + ind, current$1[3], current$1[2] + (index - 1));
|
|
4242
4242
|
if (~hasClass.indexOf(ind)) {
|
|
4243
4243
|
var classNameOpts = {
|
|
@@ -4245,14 +4245,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4245
4245
|
source,
|
|
4246
4246
|
sourceIndex
|
|
4247
4247
|
};
|
|
4248
|
-
node = new _className
|
|
4248
|
+
node = new _className["default"](unescapeProp(classNameOpts, "value"));
|
|
4249
4249
|
} else if (~hasId.indexOf(ind)) {
|
|
4250
4250
|
var idOpts = {
|
|
4251
4251
|
value: value.slice(1),
|
|
4252
4252
|
source,
|
|
4253
4253
|
sourceIndex
|
|
4254
4254
|
};
|
|
4255
|
-
node = new _id
|
|
4255
|
+
node = new _id["default"](unescapeProp(idOpts, "value"));
|
|
4256
4256
|
} else {
|
|
4257
4257
|
var tagOpts = {
|
|
4258
4258
|
value,
|
|
@@ -4260,14 +4260,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4260
4260
|
sourceIndex
|
|
4261
4261
|
};
|
|
4262
4262
|
unescapeProp(tagOpts, "value");
|
|
4263
|
-
node = new _tag
|
|
4263
|
+
node = new _tag["default"](tagOpts);
|
|
4264
4264
|
}
|
|
4265
4265
|
_this5.newNode(node, namespace);
|
|
4266
4266
|
namespace = null;
|
|
4267
4267
|
});
|
|
4268
4268
|
this.position++;
|
|
4269
4269
|
};
|
|
4270
|
-
_proto.word = function word
|
|
4270
|
+
_proto.word = function word(namespace) {
|
|
4271
4271
|
var nextToken = this.nextToken;
|
|
4272
4272
|
if (nextToken && this.content(nextToken) === "|") {
|
|
4273
4273
|
this.position++;
|
|
@@ -4336,15 +4336,15 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4336
4336
|
if (!found) return this.error("Expected " + an + " " + description + ".", { index });
|
|
4337
4337
|
return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
|
|
4338
4338
|
};
|
|
4339
|
-
_proto.requiredSpace = function requiredSpace(space
|
|
4340
|
-
return this.options.lossy ? " " : space
|
|
4339
|
+
_proto.requiredSpace = function requiredSpace(space) {
|
|
4340
|
+
return this.options.lossy ? " " : space;
|
|
4341
4341
|
};
|
|
4342
|
-
_proto.optionalSpace = function optionalSpace(space
|
|
4343
|
-
return this.options.lossy ? "" : space
|
|
4342
|
+
_proto.optionalSpace = function optionalSpace(space) {
|
|
4343
|
+
return this.options.lossy ? "" : space;
|
|
4344
4344
|
};
|
|
4345
|
-
_proto.lossySpace = function lossySpace(space
|
|
4345
|
+
_proto.lossySpace = function lossySpace(space, required) {
|
|
4346
4346
|
if (this.options.lossy) return required ? " " : "";
|
|
4347
|
-
else return space
|
|
4347
|
+
else return space;
|
|
4348
4348
|
};
|
|
4349
4349
|
_proto.parseParenthesisToken = function parseParenthesisToken(token) {
|
|
4350
4350
|
var content = this.content(token);
|
|
@@ -4383,7 +4383,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4383
4383
|
} else return searchPosition;
|
|
4384
4384
|
return -1;
|
|
4385
4385
|
};
|
|
4386
|
-
_createClass(Parser
|
|
4386
|
+
_createClass(Parser, [
|
|
4387
4387
|
{
|
|
4388
4388
|
key: "currToken",
|
|
4389
4389
|
get: function get() {
|
|
@@ -4403,7 +4403,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4403
4403
|
}
|
|
4404
4404
|
}
|
|
4405
4405
|
]);
|
|
4406
|
-
return Parser
|
|
4406
|
+
return Parser;
|
|
4407
4407
|
}();
|
|
4408
4408
|
exports["default"] = Parser;
|
|
4409
4409
|
module.exports = exports.default;
|
|
@@ -4414,17 +4414,17 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4414
4414
|
var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4415
4415
|
exports.__esModule = true;
|
|
4416
4416
|
exports["default"] = void 0;
|
|
4417
|
-
var _parser = _interopRequireDefault
|
|
4418
|
-
function _interopRequireDefault
|
|
4417
|
+
var _parser = _interopRequireDefault(require_parser());
|
|
4418
|
+
function _interopRequireDefault(obj) {
|
|
4419
4419
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
4420
4420
|
}
|
|
4421
4421
|
var Processor = /* @__PURE__ */ function() {
|
|
4422
|
-
function Processor
|
|
4422
|
+
function Processor(func, options) {
|
|
4423
4423
|
this.func = func || function noop() {};
|
|
4424
4424
|
this.funcRes = null;
|
|
4425
4425
|
this.options = options;
|
|
4426
4426
|
}
|
|
4427
|
-
var _proto = Processor
|
|
4427
|
+
var _proto = Processor.prototype;
|
|
4428
4428
|
_proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
|
|
4429
4429
|
if (options === void 0) options = {};
|
|
4430
4430
|
if (Object.assign({}, this.options, options).updateSelector === false) return false;
|
|
@@ -4435,7 +4435,7 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4435
4435
|
if (Object.assign({}, this.options, options).lossless === false) return true;
|
|
4436
4436
|
else return false;
|
|
4437
4437
|
};
|
|
4438
|
-
_proto._root = function _root
|
|
4438
|
+
_proto._root = function _root(rule, options) {
|
|
4439
4439
|
if (options === void 0) options = {};
|
|
4440
4440
|
return new _parser["default"](rule, this._parseOptions(options)).root;
|
|
4441
4441
|
};
|
|
@@ -4447,17 +4447,17 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4447
4447
|
if (options === void 0) options = {};
|
|
4448
4448
|
return new Promise(function(resolve, reject) {
|
|
4449
4449
|
try {
|
|
4450
|
-
var root
|
|
4451
|
-
Promise.resolve(_this.func(root
|
|
4452
|
-
var string
|
|
4450
|
+
var root = _this._root(rule, options);
|
|
4451
|
+
Promise.resolve(_this.func(root)).then(function(transform) {
|
|
4452
|
+
var string = void 0;
|
|
4453
4453
|
if (_this._shouldUpdateSelector(rule, options)) {
|
|
4454
|
-
string
|
|
4455
|
-
rule.selector = string
|
|
4454
|
+
string = root.toString();
|
|
4455
|
+
rule.selector = string;
|
|
4456
4456
|
}
|
|
4457
4457
|
return {
|
|
4458
4458
|
transform,
|
|
4459
|
-
root
|
|
4460
|
-
string
|
|
4459
|
+
root,
|
|
4460
|
+
string
|
|
4461
4461
|
};
|
|
4462
4462
|
}).then(resolve, reject);
|
|
4463
4463
|
} catch (e) {
|
|
@@ -4468,18 +4468,18 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4468
4468
|
};
|
|
4469
4469
|
_proto._runSync = function _runSync(rule, options) {
|
|
4470
4470
|
if (options === void 0) options = {};
|
|
4471
|
-
var root
|
|
4472
|
-
var transform = this.func(root
|
|
4471
|
+
var root = this._root(rule, options);
|
|
4472
|
+
var transform = this.func(root);
|
|
4473
4473
|
if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
|
|
4474
|
-
var string
|
|
4474
|
+
var string = void 0;
|
|
4475
4475
|
if (options.updateSelector && typeof rule !== "string") {
|
|
4476
|
-
string
|
|
4477
|
-
rule.selector = string
|
|
4476
|
+
string = root.toString();
|
|
4477
|
+
rule.selector = string;
|
|
4478
4478
|
}
|
|
4479
4479
|
return {
|
|
4480
4480
|
transform,
|
|
4481
|
-
root
|
|
4482
|
-
string
|
|
4481
|
+
root,
|
|
4482
|
+
string
|
|
4483
4483
|
};
|
|
4484
4484
|
};
|
|
4485
4485
|
_proto.ast = function ast(rule, options) {
|
|
@@ -4507,7 +4507,7 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4507
4507
|
var result = this._runSync(rule, options);
|
|
4508
4508
|
return result.string || result.root.toString();
|
|
4509
4509
|
};
|
|
4510
|
-
return Processor
|
|
4510
|
+
return Processor;
|
|
4511
4511
|
}();
|
|
4512
4512
|
exports["default"] = Processor;
|
|
4513
4513
|
module.exports = exports.default;
|
|
@@ -4518,66 +4518,66 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4518
4518
|
var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4519
4519
|
exports.__esModule = true;
|
|
4520
4520
|
exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
|
|
4521
|
-
var _attribute = _interopRequireDefault
|
|
4522
|
-
var _className = _interopRequireDefault
|
|
4523
|
-
var _combinator = _interopRequireDefault
|
|
4524
|
-
var _comment = _interopRequireDefault
|
|
4525
|
-
var _id = _interopRequireDefault
|
|
4526
|
-
var _nesting = _interopRequireDefault
|
|
4527
|
-
var _pseudo = _interopRequireDefault
|
|
4528
|
-
var _root = _interopRequireDefault
|
|
4529
|
-
var _selector = _interopRequireDefault
|
|
4530
|
-
var _string = _interopRequireDefault
|
|
4531
|
-
var _tag = _interopRequireDefault
|
|
4532
|
-
var _universal = _interopRequireDefault
|
|
4533
|
-
function _interopRequireDefault
|
|
4521
|
+
var _attribute = _interopRequireDefault(require_attribute());
|
|
4522
|
+
var _className = _interopRequireDefault(require_className());
|
|
4523
|
+
var _combinator = _interopRequireDefault(require_combinator());
|
|
4524
|
+
var _comment = _interopRequireDefault(require_comment());
|
|
4525
|
+
var _id = _interopRequireDefault(require_id());
|
|
4526
|
+
var _nesting = _interopRequireDefault(require_nesting());
|
|
4527
|
+
var _pseudo = _interopRequireDefault(require_pseudo());
|
|
4528
|
+
var _root = _interopRequireDefault(require_root());
|
|
4529
|
+
var _selector = _interopRequireDefault(require_selector());
|
|
4530
|
+
var _string = _interopRequireDefault(require_string());
|
|
4531
|
+
var _tag = _interopRequireDefault(require_tag());
|
|
4532
|
+
var _universal = _interopRequireDefault(require_universal());
|
|
4533
|
+
function _interopRequireDefault(obj) {
|
|
4534
4534
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
4535
4535
|
}
|
|
4536
|
-
var attribute = function attribute
|
|
4536
|
+
var attribute = function attribute(opts) {
|
|
4537
4537
|
return new _attribute["default"](opts);
|
|
4538
4538
|
};
|
|
4539
4539
|
exports.attribute = attribute;
|
|
4540
|
-
var className = function className
|
|
4540
|
+
var className = function className(opts) {
|
|
4541
4541
|
return new _className["default"](opts);
|
|
4542
4542
|
};
|
|
4543
4543
|
exports.className = className;
|
|
4544
|
-
var combinator = function combinator
|
|
4544
|
+
var combinator = function combinator(opts) {
|
|
4545
4545
|
return new _combinator["default"](opts);
|
|
4546
4546
|
};
|
|
4547
4547
|
exports.combinator = combinator;
|
|
4548
|
-
var comment = function comment
|
|
4548
|
+
var comment = function comment(opts) {
|
|
4549
4549
|
return new _comment["default"](opts);
|
|
4550
4550
|
};
|
|
4551
4551
|
exports.comment = comment;
|
|
4552
|
-
var id = function id
|
|
4552
|
+
var id = function id(opts) {
|
|
4553
4553
|
return new _id["default"](opts);
|
|
4554
4554
|
};
|
|
4555
4555
|
exports.id = id;
|
|
4556
|
-
var nesting = function nesting
|
|
4556
|
+
var nesting = function nesting(opts) {
|
|
4557
4557
|
return new _nesting["default"](opts);
|
|
4558
4558
|
};
|
|
4559
4559
|
exports.nesting = nesting;
|
|
4560
|
-
var pseudo = function pseudo
|
|
4560
|
+
var pseudo = function pseudo(opts) {
|
|
4561
4561
|
return new _pseudo["default"](opts);
|
|
4562
4562
|
};
|
|
4563
4563
|
exports.pseudo = pseudo;
|
|
4564
|
-
var root = function root
|
|
4564
|
+
var root = function root(opts) {
|
|
4565
4565
|
return new _root["default"](opts);
|
|
4566
4566
|
};
|
|
4567
4567
|
exports.root = root;
|
|
4568
|
-
var selector = function selector
|
|
4568
|
+
var selector = function selector(opts) {
|
|
4569
4569
|
return new _selector["default"](opts);
|
|
4570
4570
|
};
|
|
4571
4571
|
exports.selector = selector;
|
|
4572
|
-
var string = function string
|
|
4572
|
+
var string = function string(opts) {
|
|
4573
4573
|
return new _string["default"](opts);
|
|
4574
4574
|
};
|
|
4575
4575
|
exports.string = string;
|
|
4576
|
-
var tag = function tag
|
|
4576
|
+
var tag = function tag(opts) {
|
|
4577
4577
|
return new _tag["default"](opts);
|
|
4578
4578
|
};
|
|
4579
4579
|
exports.tag = tag;
|
|
4580
|
-
var universal = function universal
|
|
4580
|
+
var universal = function universal(opts) {
|
|
4581
4581
|
return new _universal["default"](opts);
|
|
4582
4582
|
};
|
|
4583
4583
|
exports.universal = universal;
|
|
@@ -4597,38 +4597,38 @@ var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4597
4597
|
exports.isPseudoClass = isPseudoClass;
|
|
4598
4598
|
exports.isPseudoElement = isPseudoElement;
|
|
4599
4599
|
exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
|
|
4600
|
-
var _types
|
|
4600
|
+
var _types = require_types();
|
|
4601
4601
|
var _IS_TYPE;
|
|
4602
|
-
var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types
|
|
4602
|
+
var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
|
|
4603
4603
|
function isNode(node) {
|
|
4604
4604
|
return typeof node === "object" && IS_TYPE[node.type];
|
|
4605
4605
|
}
|
|
4606
4606
|
function isNodeType(type, node) {
|
|
4607
4607
|
return isNode(node) && node.type === type;
|
|
4608
4608
|
}
|
|
4609
|
-
var isAttribute = isNodeType.bind(null, _types
|
|
4609
|
+
var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
|
|
4610
4610
|
exports.isAttribute = isAttribute;
|
|
4611
|
-
var isClassName = isNodeType.bind(null, _types
|
|
4611
|
+
var isClassName = isNodeType.bind(null, _types.CLASS);
|
|
4612
4612
|
exports.isClassName = isClassName;
|
|
4613
|
-
var isCombinator = isNodeType.bind(null, _types
|
|
4613
|
+
var isCombinator = isNodeType.bind(null, _types.COMBINATOR);
|
|
4614
4614
|
exports.isCombinator = isCombinator;
|
|
4615
|
-
var isComment = isNodeType.bind(null, _types
|
|
4615
|
+
var isComment = isNodeType.bind(null, _types.COMMENT);
|
|
4616
4616
|
exports.isComment = isComment;
|
|
4617
|
-
var isIdentifier = isNodeType.bind(null, _types
|
|
4617
|
+
var isIdentifier = isNodeType.bind(null, _types.ID);
|
|
4618
4618
|
exports.isIdentifier = isIdentifier;
|
|
4619
|
-
var isNesting = isNodeType.bind(null, _types
|
|
4619
|
+
var isNesting = isNodeType.bind(null, _types.NESTING);
|
|
4620
4620
|
exports.isNesting = isNesting;
|
|
4621
|
-
var isPseudo = isNodeType.bind(null, _types
|
|
4621
|
+
var isPseudo = isNodeType.bind(null, _types.PSEUDO);
|
|
4622
4622
|
exports.isPseudo = isPseudo;
|
|
4623
|
-
var isRoot = isNodeType.bind(null, _types
|
|
4623
|
+
var isRoot = isNodeType.bind(null, _types.ROOT);
|
|
4624
4624
|
exports.isRoot = isRoot;
|
|
4625
|
-
var isSelector = isNodeType.bind(null, _types
|
|
4625
|
+
var isSelector = isNodeType.bind(null, _types.SELECTOR);
|
|
4626
4626
|
exports.isSelector = isSelector;
|
|
4627
|
-
var isString = isNodeType.bind(null, _types
|
|
4627
|
+
var isString = isNodeType.bind(null, _types.STRING);
|
|
4628
4628
|
exports.isString = isString;
|
|
4629
|
-
var isTag = isNodeType.bind(null, _types
|
|
4629
|
+
var isTag = isNodeType.bind(null, _types.TAG);
|
|
4630
4630
|
exports.isTag = isTag;
|
|
4631
|
-
var isUniversal = isNodeType.bind(null, _types
|
|
4631
|
+
var isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
|
|
4632
4632
|
exports.isUniversal = isUniversal;
|
|
4633
4633
|
function isPseudoElement(node) {
|
|
4634
4634
|
return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
|
|
@@ -4673,13 +4673,13 @@ var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4673
4673
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4674
4674
|
exports.__esModule = true;
|
|
4675
4675
|
exports["default"] = void 0;
|
|
4676
|
-
var _processor = _interopRequireDefault
|
|
4676
|
+
var _processor = _interopRequireDefault(require_processor());
|
|
4677
4677
|
var selectors = _interopRequireWildcard(require_selectors());
|
|
4678
4678
|
function _getRequireWildcardCache(nodeInterop) {
|
|
4679
4679
|
if (typeof WeakMap !== "function") return null;
|
|
4680
4680
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
4681
4681
|
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
4682
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache
|
|
4682
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop$1) {
|
|
4683
4683
|
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
4684
4684
|
})(nodeInterop);
|
|
4685
4685
|
}
|
|
@@ -4699,10 +4699,10 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4699
4699
|
if (cache) cache.set(obj, newObj);
|
|
4700
4700
|
return newObj;
|
|
4701
4701
|
}
|
|
4702
|
-
function _interopRequireDefault
|
|
4702
|
+
function _interopRequireDefault(obj) {
|
|
4703
4703
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
4704
4704
|
}
|
|
4705
|
-
var parser = function parser
|
|
4705
|
+
var parser = function parser(processor) {
|
|
4706
4706
|
return new _processor["default"](processor);
|
|
4707
4707
|
};
|
|
4708
4708
|
Object.assign(parser, selectors);
|
|
@@ -4714,14 +4714,14 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4714
4714
|
//#endregion
|
|
4715
4715
|
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js
|
|
4716
4716
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4717
|
-
const selectorParser
|
|
4717
|
+
const selectorParser = require_dist();
|
|
4718
4718
|
const valueParser = require_lib();
|
|
4719
4719
|
const { extractICSS } = require_src$4();
|
|
4720
4720
|
const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
|
|
4721
4721
|
const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore";
|
|
4722
4722
|
const isSpacing = (node) => node.type === "combinator" && node.value === " ";
|
|
4723
|
-
const isPureCheckDisabled = (root
|
|
4724
|
-
for (const node of root
|
|
4723
|
+
const isPureCheckDisabled = (root) => {
|
|
4724
|
+
for (const node of root.nodes) {
|
|
4725
4725
|
if (node.type !== "comment") return false;
|
|
4726
4726
|
if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true;
|
|
4727
4727
|
}
|
|
@@ -4730,8 +4730,8 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4730
4730
|
function getIgnoreComment(node) {
|
|
4731
4731
|
if (!node.parent) return;
|
|
4732
4732
|
const indexInParent = node.parent.index(node);
|
|
4733
|
-
for (let i
|
|
4734
|
-
const prevNode = node.parent.nodes[i
|
|
4733
|
+
for (let i = indexInParent - 1; i >= 0; i--) {
|
|
4734
|
+
const prevNode = node.parent.nodes[i];
|
|
4735
4735
|
if (prevNode.type === "comment") {
|
|
4736
4736
|
if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode;
|
|
4737
4737
|
} else break;
|
|
@@ -4853,7 +4853,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4853
4853
|
context.enforceNoSpacing = context.lastWasSpacing ? false : node.value;
|
|
4854
4854
|
context.global = node.value === ":global";
|
|
4855
4855
|
context.explicit = true;
|
|
4856
|
-
return addBackSpacing ? selectorParser
|
|
4856
|
+
return addBackSpacing ? selectorParser.combinator({ value: " " }) : null;
|
|
4857
4857
|
}
|
|
4858
4858
|
break;
|
|
4859
4859
|
}
|
|
@@ -4868,7 +4868,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4868
4868
|
before: "",
|
|
4869
4869
|
after: ""
|
|
4870
4870
|
};
|
|
4871
|
-
node = selectorParser
|
|
4871
|
+
node = selectorParser.pseudo({
|
|
4872
4872
|
value: ":local",
|
|
4873
4873
|
nodes: [innerNode],
|
|
4874
4874
|
spaces: node.spaces
|
|
@@ -4888,8 +4888,8 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4888
4888
|
global: mode === "global",
|
|
4889
4889
|
hasPureGlobals: false
|
|
4890
4890
|
};
|
|
4891
|
-
rootContext.selector = selectorParser
|
|
4892
|
-
transform(root
|
|
4891
|
+
rootContext.selector = selectorParser((root) => {
|
|
4892
|
+
transform(root, rootContext);
|
|
4893
4893
|
}).processSync(rule, {
|
|
4894
4894
|
updateSelector: false,
|
|
4895
4895
|
lossless: true
|
|
@@ -5030,15 +5030,15 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5030
5030
|
postcssPlugin: "postcss-modules-local-by-default",
|
|
5031
5031
|
prepare() {
|
|
5032
5032
|
const localAliasMap = /* @__PURE__ */ new Map();
|
|
5033
|
-
return { Once(root
|
|
5034
|
-
const { icssImports } = extractICSS(root
|
|
5035
|
-
const enforcePureMode = pureMode && !isPureCheckDisabled(root
|
|
5033
|
+
return { Once(root) {
|
|
5034
|
+
const { icssImports } = extractICSS(root, false);
|
|
5035
|
+
const enforcePureMode = pureMode && !isPureCheckDisabled(root);
|
|
5036
5036
|
Object.keys(icssImports).forEach((key) => {
|
|
5037
5037
|
Object.keys(icssImports[key]).forEach((prop) => {
|
|
5038
5038
|
localAliasMap.set(prop, icssImports[key][prop]);
|
|
5039
5039
|
});
|
|
5040
5040
|
});
|
|
5041
|
-
root
|
|
5041
|
+
root.walkAtRules((atRule) => {
|
|
5042
5042
|
if (/keyframes$/i.test(atRule.name)) {
|
|
5043
5043
|
const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params);
|
|
5044
5044
|
const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params);
|
|
@@ -5067,11 +5067,11 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5067
5067
|
const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0;
|
|
5068
5068
|
if (ignoreComment) ignoreComment.remove();
|
|
5069
5069
|
atRule.params = atRule.params.split("to").map((item) => {
|
|
5070
|
-
const selector
|
|
5071
|
-
const context = localizeNode(selector
|
|
5070
|
+
const selector = item.trim().slice(1, -1).trim();
|
|
5071
|
+
const context = localizeNode(selector, options.mode, localAliasMap);
|
|
5072
5072
|
context.options = options;
|
|
5073
5073
|
context.localAliasMap = localAliasMap;
|
|
5074
|
-
if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector
|
|
5074
|
+
if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector + "\" is not pure (pure selectors must contain at least one local class or id)");
|
|
5075
5075
|
return `(${context.selector})`;
|
|
5076
5076
|
}).join(" to ");
|
|
5077
5077
|
}
|
|
@@ -5090,7 +5090,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5090
5090
|
});
|
|
5091
5091
|
});
|
|
5092
5092
|
});
|
|
5093
|
-
root
|
|
5093
|
+
root.walkRules((rule) => {
|
|
5094
5094
|
if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return;
|
|
5095
5095
|
const context = localizeNode(rule, options.mode, localAliasMap);
|
|
5096
5096
|
context.options = options;
|
|
@@ -5120,22 +5120,22 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5120
5120
|
if (rule.parent.type === "rule") return true;
|
|
5121
5121
|
return isNestedRule(rule.parent);
|
|
5122
5122
|
}
|
|
5123
|
-
function getSingleLocalNamesForComposes(root
|
|
5123
|
+
function getSingleLocalNamesForComposes(root, rule) {
|
|
5124
5124
|
if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
|
|
5125
|
-
return root
|
|
5126
|
-
if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root
|
|
5125
|
+
return root.nodes.map((node) => {
|
|
5126
|
+
if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root}"`);
|
|
5127
5127
|
node = node.nodes[0];
|
|
5128
|
-
if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root
|
|
5128
|
+
if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
|
|
5129
5129
|
node = node.first;
|
|
5130
|
-
if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root
|
|
5130
|
+
if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
|
|
5131
5131
|
node = node.first;
|
|
5132
|
-
if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root
|
|
5132
|
+
if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
|
|
5133
5133
|
return node.value;
|
|
5134
5134
|
});
|
|
5135
5135
|
}
|
|
5136
5136
|
const unescapeRegExp = new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig");
|
|
5137
|
-
function unescape(str
|
|
5138
|
-
return str
|
|
5137
|
+
function unescape(str) {
|
|
5138
|
+
return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
|
|
5139
5139
|
const high = "0x" + escaped - 65536;
|
|
5140
5140
|
return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
|
|
5141
5141
|
});
|
|
@@ -5146,19 +5146,19 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5146
5146
|
const exportGlobals = options && options.exportGlobals;
|
|
5147
5147
|
return {
|
|
5148
5148
|
postcssPlugin: "postcss-modules-scope",
|
|
5149
|
-
Once(root
|
|
5149
|
+
Once(root, { rule }) {
|
|
5150
5150
|
const exports$1 = Object.create(null);
|
|
5151
5151
|
function exportScopedName(name, rawName, node) {
|
|
5152
|
-
const scopedName = generateScopedName(rawName ? rawName : name, root
|
|
5153
|
-
const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root
|
|
5152
|
+
const scopedName = generateScopedName(rawName ? rawName : name, root.source.input.from, root.source.input.css, node);
|
|
5153
|
+
const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root.source.input.from, root.source.input.css, node);
|
|
5154
5154
|
exports$1[key] = exports$1[key] || [];
|
|
5155
5155
|
if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value);
|
|
5156
5156
|
return scopedName;
|
|
5157
5157
|
}
|
|
5158
|
-
function localizeNode
|
|
5158
|
+
function localizeNode(node) {
|
|
5159
5159
|
switch (node.type) {
|
|
5160
5160
|
case "selector":
|
|
5161
|
-
node.nodes = node.map((item) => localizeNode
|
|
5161
|
+
node.nodes = node.map((item) => localizeNode(item));
|
|
5162
5162
|
return node;
|
|
5163
5163
|
case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
|
|
5164
5164
|
case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
|
|
@@ -5175,11 +5175,11 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5175
5175
|
switch (node.type) {
|
|
5176
5176
|
case "pseudo": if (node.value === ":local") {
|
|
5177
5177
|
if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block");
|
|
5178
|
-
const selector
|
|
5179
|
-
selector
|
|
5178
|
+
const selector = localizeNode(node.first);
|
|
5179
|
+
selector.first.spaces = node.spaces;
|
|
5180
5180
|
const nextNode = node.next();
|
|
5181
|
-
if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector
|
|
5182
|
-
node.replaceWith(selector
|
|
5181
|
+
if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector.last.value)) selector.last.spaces.after = " ";
|
|
5182
|
+
node.replaceWith(selector);
|
|
5183
5183
|
return;
|
|
5184
5184
|
}
|
|
5185
5185
|
case "root":
|
|
@@ -5194,40 +5194,40 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5194
5194
|
return node;
|
|
5195
5195
|
}
|
|
5196
5196
|
const importedNames = {};
|
|
5197
|
-
root
|
|
5197
|
+
root.walkRules(/^:import\(.+\)$/, (rule$1) => {
|
|
5198
5198
|
rule$1.walkDecls((decl) => {
|
|
5199
5199
|
importedNames[decl.prop] = true;
|
|
5200
5200
|
});
|
|
5201
5201
|
});
|
|
5202
|
-
root
|
|
5202
|
+
root.walkRules((rule$1) => {
|
|
5203
5203
|
let parsedSelector = selectorParser().astSync(rule$1);
|
|
5204
5204
|
rule$1.selector = traverseNode(parsedSelector.clone()).toString();
|
|
5205
5205
|
rule$1.walkDecls(/^(composes|compose-with)$/i, (decl) => {
|
|
5206
5206
|
const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent);
|
|
5207
5207
|
decl.value.split(",").forEach((value) => {
|
|
5208
|
-
value.trim().split(/\s+/).forEach((className
|
|
5209
|
-
const global$1 = /^global\(([^)]+)\)$/.exec(className
|
|
5208
|
+
value.trim().split(/\s+/).forEach((className) => {
|
|
5209
|
+
const global$1 = /^global\(([^)]+)\)$/.exec(className);
|
|
5210
5210
|
if (global$1) localNames.forEach((exportedName) => {
|
|
5211
5211
|
exports$1[exportedName].push(global$1[1]);
|
|
5212
5212
|
});
|
|
5213
|
-
else if (hasOwnProperty.call(importedNames, className
|
|
5214
|
-
exports$1[exportedName].push(className
|
|
5213
|
+
else if (hasOwnProperty.call(importedNames, className)) localNames.forEach((exportedName) => {
|
|
5214
|
+
exports$1[exportedName].push(className);
|
|
5215
5215
|
});
|
|
5216
|
-
else if (hasOwnProperty.call(exports$1, className
|
|
5217
|
-
exports$1[className
|
|
5216
|
+
else if (hasOwnProperty.call(exports$1, className)) localNames.forEach((exportedName) => {
|
|
5217
|
+
exports$1[className].forEach((item) => {
|
|
5218
5218
|
exports$1[exportedName].push(item);
|
|
5219
5219
|
});
|
|
5220
5220
|
});
|
|
5221
|
-
else throw decl.error(`referenced class name "${className
|
|
5221
|
+
else throw decl.error(`referenced class name "${className}" in ${decl.prop} not found`);
|
|
5222
5222
|
});
|
|
5223
5223
|
});
|
|
5224
5224
|
decl.remove();
|
|
5225
5225
|
});
|
|
5226
5226
|
rule$1.walkDecls((decl) => {
|
|
5227
5227
|
if (!/:local\s*\((.+?)\)/.test(decl.value)) return;
|
|
5228
|
-
let tokens
|
|
5229
|
-
tokens
|
|
5230
|
-
if (idx === 0 || tokens
|
|
5228
|
+
let tokens = decl.value.split(/(,|'[^']*'|"[^"]*")/);
|
|
5229
|
+
tokens = tokens.map((token, idx) => {
|
|
5230
|
+
if (idx === 0 || tokens[idx - 1] === ",") {
|
|
5231
5231
|
let result = token;
|
|
5232
5232
|
const localMatch = /:local\s*\((.+?)\)/.exec(token);
|
|
5233
5233
|
if (localMatch) {
|
|
@@ -5240,19 +5240,19 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5240
5240
|
return result;
|
|
5241
5241
|
} else return token;
|
|
5242
5242
|
});
|
|
5243
|
-
decl.value = tokens
|
|
5243
|
+
decl.value = tokens.join("");
|
|
5244
5244
|
});
|
|
5245
5245
|
});
|
|
5246
|
-
root
|
|
5246
|
+
root.walkAtRules(/keyframes$/i, (atRule) => {
|
|
5247
5247
|
const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
|
|
5248
5248
|
if (!localMatch) return;
|
|
5249
5249
|
atRule.params = exportScopedName(localMatch[1]);
|
|
5250
5250
|
});
|
|
5251
|
-
root
|
|
5251
|
+
root.walkAtRules(/scope$/i, (atRule) => {
|
|
5252
5252
|
if (atRule.params) atRule.params = atRule.params.split("to").map((item) => {
|
|
5253
|
-
const selector
|
|
5254
|
-
if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector
|
|
5255
|
-
return `(${traverseNode(selectorParser().astSync(selector
|
|
5253
|
+
const selector = item.trim().slice(1, -1).trim();
|
|
5254
|
+
if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector)) return `(${selector})`;
|
|
5255
|
+
return `(${traverseNode(selectorParser().astSync(selector)).toString()})`;
|
|
5256
5256
|
}).join(" to ");
|
|
5257
5257
|
});
|
|
5258
5258
|
const exportedNames = Object.keys(exports$1);
|
|
@@ -5263,7 +5263,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5263
5263
|
value: exports$1[exportedName].join(" "),
|
|
5264
5264
|
raws: { before: "\n " }
|
|
5265
5265
|
}));
|
|
5266
|
-
root
|
|
5266
|
+
root.append(exportRule);
|
|
5267
5267
|
}
|
|
5268
5268
|
}
|
|
5269
5269
|
};
|
|
@@ -5284,10 +5284,10 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5284
5284
|
//#endregion
|
|
5285
5285
|
//#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js
|
|
5286
5286
|
var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5287
|
-
function hash(str
|
|
5288
|
-
var hash
|
|
5289
|
-
while (i
|
|
5290
|
-
return hash
|
|
5287
|
+
function hash(str) {
|
|
5288
|
+
var hash = 5381, i = str.length;
|
|
5289
|
+
while (i) hash = hash * 33 ^ str.charCodeAt(--i);
|
|
5290
|
+
return hash >>> 0;
|
|
5291
5291
|
}
|
|
5292
5292
|
module.exports = hash;
|
|
5293
5293
|
}));
|
|
@@ -5307,16 +5307,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5307
5307
|
prepare(result) {
|
|
5308
5308
|
const importAliases = [];
|
|
5309
5309
|
const definitions = {};
|
|
5310
|
-
return { Once(root
|
|
5311
|
-
root
|
|
5310
|
+
return { Once(root, postcss) {
|
|
5311
|
+
root.walkAtRules(/value/i, (atRule) => {
|
|
5312
5312
|
const matches = atRule.params.match(matchImports);
|
|
5313
5313
|
if (matches) {
|
|
5314
5314
|
let [, aliases, path$2] = matches;
|
|
5315
5315
|
if (definitions[path$2]) path$2 = definitions[path$2];
|
|
5316
5316
|
const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => {
|
|
5317
|
-
const tokens
|
|
5318
|
-
if (tokens
|
|
5319
|
-
const [, theirName, myName = theirName] = tokens
|
|
5317
|
+
const tokens = matchImport.exec(alias);
|
|
5318
|
+
if (tokens) {
|
|
5319
|
+
const [, theirName, myName = theirName] = tokens;
|
|
5320
5320
|
const importedName = createImportedName(myName);
|
|
5321
5321
|
definitions[myName] = importedName;
|
|
5322
5322
|
return {
|
|
@@ -5345,7 +5345,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5345
5345
|
atRule.remove();
|
|
5346
5346
|
});
|
|
5347
5347
|
if (!Object.keys(definitions).length) return;
|
|
5348
|
-
ICSSUtils.replaceSymbols(root
|
|
5348
|
+
ICSSUtils.replaceSymbols(root, definitions);
|
|
5349
5349
|
const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({
|
|
5350
5350
|
value: definitions[key],
|
|
5351
5351
|
prop: key,
|
|
@@ -5357,7 +5357,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5357
5357
|
raws: { after: "\n" }
|
|
5358
5358
|
});
|
|
5359
5359
|
exportRule.append(exportDeclarations);
|
|
5360
|
-
root
|
|
5360
|
+
root.prepend(exportRule);
|
|
5361
5361
|
}
|
|
5362
5362
|
importAliases.reverse().forEach(({ path: path$2, imports }) => {
|
|
5363
5363
|
const importRule = postcss.rule({
|
|
@@ -5371,7 +5371,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5371
5371
|
raws: { before: "\n " }
|
|
5372
5372
|
});
|
|
5373
5373
|
});
|
|
5374
|
-
root
|
|
5374
|
+
root.prepend(importRule);
|
|
5375
5375
|
});
|
|
5376
5376
|
} };
|
|
5377
5377
|
}
|
|
@@ -5388,13 +5388,13 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5388
5388
|
exports.getDefaultPlugins = getDefaultPlugins;
|
|
5389
5389
|
exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour;
|
|
5390
5390
|
exports.getScopedNameGenerator = getScopedNameGenerator;
|
|
5391
|
-
var _postcssModulesExtractImports = _interopRequireDefault
|
|
5392
|
-
var _genericNames = _interopRequireDefault
|
|
5393
|
-
var _postcssModulesLocalByDefault = _interopRequireDefault
|
|
5394
|
-
var _postcssModulesScope = _interopRequireDefault
|
|
5395
|
-
var _stringHash = _interopRequireDefault
|
|
5396
|
-
var _postcssModulesValues = _interopRequireDefault
|
|
5397
|
-
function _interopRequireDefault
|
|
5391
|
+
var _postcssModulesExtractImports = _interopRequireDefault(require_src$3());
|
|
5392
|
+
var _genericNames = _interopRequireDefault(require_generic_names());
|
|
5393
|
+
var _postcssModulesLocalByDefault = _interopRequireDefault(require_src$2());
|
|
5394
|
+
var _postcssModulesScope = _interopRequireDefault(require_src$1());
|
|
5395
|
+
var _stringHash = _interopRequireDefault(require_string_hash());
|
|
5396
|
+
var _postcssModulesValues = _interopRequireDefault(require_src());
|
|
5397
|
+
function _interopRequireDefault(obj) {
|
|
5398
5398
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
5399
5399
|
}
|
|
5400
5400
|
const behaviours = {
|
|
@@ -5429,8 +5429,8 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5429
5429
|
return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
|
|
5430
5430
|
}
|
|
5431
5431
|
function generateScopedNameDefault(name, filename, css) {
|
|
5432
|
-
const i
|
|
5433
|
-
const lineNumber = css.substr(0, i
|
|
5432
|
+
const i = css.indexOf(`.${name}`);
|
|
5433
|
+
const lineNumber = css.substr(0, i).split(/[\r\n]/).length;
|
|
5434
5434
|
return `_${name}_${(0, _stringHash.default)(css).toString(36).substr(0, 5)}_${lineNumber}`;
|
|
5435
5435
|
}
|
|
5436
5436
|
function getScopedNameGenerator(generateScopedName, hashPrefix) {
|
|
@@ -5479,11 +5479,11 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5479
5479
|
});
|
|
5480
5480
|
}
|
|
5481
5481
|
function getLoader(opts, plugins) {
|
|
5482
|
-
const root
|
|
5483
|
-
return typeof opts.Loader === "function" ? new opts.Loader(root
|
|
5482
|
+
const root = typeof opts.root === "undefined" ? "/" : opts.root;
|
|
5483
|
+
return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve);
|
|
5484
5484
|
}
|
|
5485
|
-
function isOurPlugin(plugin
|
|
5486
|
-
return plugin
|
|
5485
|
+
function isOurPlugin(plugin) {
|
|
5486
|
+
return plugin.postcssPlugin === PLUGIN_NAME;
|
|
5487
5487
|
}
|
|
5488
5488
|
function makePlugin(opts) {
|
|
5489
5489
|
return {
|
|
@@ -5492,27 +5492,27 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5492
5492
|
const getJSON = opts.getJSON || _saveJSON.default;
|
|
5493
5493
|
const inputFile = css.source.input.file;
|
|
5494
5494
|
const pluginList = getDefaultPluginsList(opts, inputFile);
|
|
5495
|
-
const resultPluginIndex = result.processor.plugins.findIndex((plugin
|
|
5495
|
+
const resultPluginIndex = result.processor.plugins.findIndex((plugin) => isOurPlugin(plugin));
|
|
5496
5496
|
if (resultPluginIndex === -1) throw new Error("Plugin missing from options.");
|
|
5497
5497
|
const loader = getLoader(opts, [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList]);
|
|
5498
5498
|
const fetcher = async (file, relativeTo, depTrace) => {
|
|
5499
5499
|
const unquoteFile = (0, _unquote.default)(file);
|
|
5500
5500
|
return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
|
|
5501
5501
|
};
|
|
5502
|
-
const parser
|
|
5503
|
-
await (0, _postcss.default)([...pluginList, parser
|
|
5502
|
+
const parser = new _Parser.default(fetcher);
|
|
5503
|
+
await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { from: inputFile });
|
|
5504
5504
|
const out = loader.finalSource;
|
|
5505
5505
|
if (out) css.prepend(out);
|
|
5506
5506
|
if (opts.localsConvention) {
|
|
5507
5507
|
const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile);
|
|
5508
|
-
parser
|
|
5508
|
+
parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {});
|
|
5509
5509
|
}
|
|
5510
5510
|
result.messages.push({
|
|
5511
5511
|
type: "export",
|
|
5512
5512
|
plugin: "postcss-modules",
|
|
5513
|
-
exportTokens: parser
|
|
5513
|
+
exportTokens: parser.exportTokens
|
|
5514
5514
|
});
|
|
5515
|
-
return getJSON(css.source.input.file, parser
|
|
5515
|
+
return getJSON(css.source.input.file, parser.exportTokens, result.opts.to);
|
|
5516
5516
|
}
|
|
5517
5517
|
};
|
|
5518
5518
|
}
|