@angular/ssr 19.0.0-next.2 → 19.0.0-next.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/fesm2022/node.mjs +114 -3
- package/fesm2022/node.mjs.map +1 -1
- package/fesm2022/ssr.mjs +363 -353
- package/fesm2022/ssr.mjs.map +1 -1
- package/index.d.ts +115 -0
- package/node/index.d.ts +21 -0
- package/package.json +8 -9
- package/third_party/critters/THIRD_PARTY_LICENSES.txt +25 -1
- package/third_party/critters/index.js +1441 -1428
- package/third_party/critters/index.js.map +4 -4
|
@@ -6317,22 +6317,22 @@ var require_picocolors_browser = __commonJS({
|
|
|
6317
6317
|
"external/npm/node_modules/picocolors/picocolors.browser.js"(exports, module) {
|
|
6318
6318
|
var x = String;
|
|
6319
6319
|
var create = function() {
|
|
6320
|
-
return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x };
|
|
6320
|
+
return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
|
|
6321
6321
|
};
|
|
6322
6322
|
module.exports = create();
|
|
6323
6323
|
module.exports.createColors = create;
|
|
6324
6324
|
}
|
|
6325
6325
|
});
|
|
6326
6326
|
|
|
6327
|
-
// (disabled):external/npm/node_modules/postcss/lib/terminal-highlight
|
|
6327
|
+
// (disabled):external/npm/node_modules/critters/node_modules/postcss/lib/terminal-highlight
|
|
6328
6328
|
var require_terminal_highlight = __commonJS({
|
|
6329
|
-
"(disabled):external/npm/node_modules/postcss/lib/terminal-highlight"() {
|
|
6329
|
+
"(disabled):external/npm/node_modules/critters/node_modules/postcss/lib/terminal-highlight"() {
|
|
6330
6330
|
}
|
|
6331
6331
|
});
|
|
6332
6332
|
|
|
6333
|
-
// external/npm/node_modules/postcss/lib/css-syntax-error.js
|
|
6333
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/css-syntax-error.js
|
|
6334
6334
|
var require_css_syntax_error = __commonJS({
|
|
6335
|
-
"external/npm/node_modules/postcss/lib/css-syntax-error.js"(exports, module) {
|
|
6335
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/css-syntax-error.js"(exports, module) {
|
|
6336
6336
|
"use strict";
|
|
6337
6337
|
var pico = require_picocolors_browser();
|
|
6338
6338
|
var terminalHighlight = require_terminal_highlight();
|
|
@@ -6380,30 +6380,40 @@ var require_css_syntax_error = __commonJS({
|
|
|
6380
6380
|
let css = this.source;
|
|
6381
6381
|
if (color == null)
|
|
6382
6382
|
color = pico.isColorSupported;
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
}
|
|
6387
|
-
let lines = css.split(/\r?\n/);
|
|
6388
|
-
let start = Math.max(this.line - 3, 0);
|
|
6389
|
-
let end = Math.min(this.line + 2, lines.length);
|
|
6390
|
-
let maxWidth = String(end).length;
|
|
6391
|
-
let mark, aside;
|
|
6383
|
+
let aside = (text) => text;
|
|
6384
|
+
let mark = (text) => text;
|
|
6385
|
+
let highlight = (text) => text;
|
|
6392
6386
|
if (color) {
|
|
6393
6387
|
let { bold, gray, red } = pico.createColors(true);
|
|
6394
6388
|
mark = (text) => bold(red(text));
|
|
6395
6389
|
aside = (text) => gray(text);
|
|
6396
|
-
|
|
6397
|
-
|
|
6390
|
+
if (terminalHighlight) {
|
|
6391
|
+
highlight = (text) => terminalHighlight(text);
|
|
6392
|
+
}
|
|
6398
6393
|
}
|
|
6394
|
+
let lines = css.split(/\r?\n/);
|
|
6395
|
+
let start = Math.max(this.line - 3, 0);
|
|
6396
|
+
let end = Math.min(this.line + 2, lines.length);
|
|
6397
|
+
let maxWidth = String(end).length;
|
|
6399
6398
|
return lines.slice(start, end).map((line, index) => {
|
|
6400
6399
|
let number = start + 1 + index;
|
|
6401
6400
|
let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
|
|
6402
6401
|
if (number === this.line) {
|
|
6402
|
+
if (line.length > 160) {
|
|
6403
|
+
let padding = 20;
|
|
6404
|
+
let subLineStart = Math.max(0, this.column - padding);
|
|
6405
|
+
let subLineEnd = Math.max(
|
|
6406
|
+
this.column + padding,
|
|
6407
|
+
this.endColumn + padding
|
|
6408
|
+
);
|
|
6409
|
+
let subLine = line.slice(subLineStart, subLineEnd);
|
|
6410
|
+
let spacing2 = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, " ");
|
|
6411
|
+
return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing2 + mark("^");
|
|
6412
|
+
}
|
|
6403
6413
|
let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
|
|
6404
|
-
return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^");
|
|
6414
|
+
return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
|
|
6405
6415
|
}
|
|
6406
|
-
return " " + aside(gutter) + line;
|
|
6416
|
+
return " " + aside(gutter) + highlight(line);
|
|
6407
6417
|
}).join("\n");
|
|
6408
6418
|
}
|
|
6409
6419
|
toString() {
|
|
@@ -6419,18 +6429,9 @@ var require_css_syntax_error = __commonJS({
|
|
|
6419
6429
|
}
|
|
6420
6430
|
});
|
|
6421
6431
|
|
|
6422
|
-
// external/npm/node_modules/postcss/lib/
|
|
6423
|
-
var require_symbols = __commonJS({
|
|
6424
|
-
"external/npm/node_modules/postcss/lib/symbols.js"(exports, module) {
|
|
6425
|
-
"use strict";
|
|
6426
|
-
module.exports.isClean = Symbol("isClean");
|
|
6427
|
-
module.exports.my = Symbol("my");
|
|
6428
|
-
}
|
|
6429
|
-
});
|
|
6430
|
-
|
|
6431
|
-
// external/npm/node_modules/postcss/lib/stringifier.js
|
|
6432
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/stringifier.js
|
|
6432
6433
|
var require_stringifier = __commonJS({
|
|
6433
|
-
"external/npm/node_modules/postcss/lib/stringifier.js"(exports, module) {
|
|
6434
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/stringifier.js"(exports, module) {
|
|
6434
6435
|
"use strict";
|
|
6435
6436
|
var DEFAULT_RAW = {
|
|
6436
6437
|
after: "\n",
|
|
@@ -6750,9 +6751,9 @@ var require_stringifier = __commonJS({
|
|
|
6750
6751
|
}
|
|
6751
6752
|
});
|
|
6752
6753
|
|
|
6753
|
-
// external/npm/node_modules/postcss/lib/stringify.js
|
|
6754
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/stringify.js
|
|
6754
6755
|
var require_stringify3 = __commonJS({
|
|
6755
|
-
"external/npm/node_modules/postcss/lib/stringify.js"(exports, module) {
|
|
6756
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/stringify.js"(exports, module) {
|
|
6756
6757
|
"use strict";
|
|
6757
6758
|
var Stringifier = require_stringifier();
|
|
6758
6759
|
function stringify(node, builder) {
|
|
@@ -6764,14 +6765,23 @@ var require_stringify3 = __commonJS({
|
|
|
6764
6765
|
}
|
|
6765
6766
|
});
|
|
6766
6767
|
|
|
6767
|
-
// external/npm/node_modules/postcss/lib/
|
|
6768
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/symbols.js
|
|
6769
|
+
var require_symbols = __commonJS({
|
|
6770
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/symbols.js"(exports, module) {
|
|
6771
|
+
"use strict";
|
|
6772
|
+
module.exports.isClean = Symbol("isClean");
|
|
6773
|
+
module.exports.my = Symbol("my");
|
|
6774
|
+
}
|
|
6775
|
+
});
|
|
6776
|
+
|
|
6777
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/node.js
|
|
6768
6778
|
var require_node2 = __commonJS({
|
|
6769
|
-
"external/npm/node_modules/postcss/lib/node.js"(exports, module) {
|
|
6779
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/node.js"(exports, module) {
|
|
6770
6780
|
"use strict";
|
|
6771
|
-
var { isClean, my } = require_symbols();
|
|
6772
6781
|
var CssSyntaxError = require_css_syntax_error();
|
|
6773
6782
|
var Stringifier = require_stringifier();
|
|
6774
6783
|
var stringify = require_stringify3();
|
|
6784
|
+
var { isClean, my } = require_symbols();
|
|
6775
6785
|
function cloneNode(obj, parent) {
|
|
6776
6786
|
let cloned = new obj.constructor();
|
|
6777
6787
|
for (let i in obj) {
|
|
@@ -6899,6 +6909,9 @@ var require_node2 = __commonJS({
|
|
|
6899
6909
|
}
|
|
6900
6910
|
};
|
|
6901
6911
|
}
|
|
6912
|
+
markClean() {
|
|
6913
|
+
this[isClean] = true;
|
|
6914
|
+
}
|
|
6902
6915
|
markDirty() {
|
|
6903
6916
|
if (this[isClean]) {
|
|
6904
6917
|
this[isClean] = false;
|
|
@@ -7101,9 +7114,25 @@ var require_node2 = __commonJS({
|
|
|
7101
7114
|
}
|
|
7102
7115
|
});
|
|
7103
7116
|
|
|
7104
|
-
// external/npm/node_modules/postcss/lib/
|
|
7117
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/comment.js
|
|
7118
|
+
var require_comment = __commonJS({
|
|
7119
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/comment.js"(exports, module) {
|
|
7120
|
+
"use strict";
|
|
7121
|
+
var Node = require_node2();
|
|
7122
|
+
var Comment = class extends Node {
|
|
7123
|
+
constructor(defaults) {
|
|
7124
|
+
super(defaults);
|
|
7125
|
+
this.type = "comment";
|
|
7126
|
+
}
|
|
7127
|
+
};
|
|
7128
|
+
module.exports = Comment;
|
|
7129
|
+
Comment.default = Comment;
|
|
7130
|
+
}
|
|
7131
|
+
});
|
|
7132
|
+
|
|
7133
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/declaration.js
|
|
7105
7134
|
var require_declaration = __commonJS({
|
|
7106
|
-
"external/npm/node_modules/postcss/lib/declaration.js"(exports, module) {
|
|
7135
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/declaration.js"(exports, module) {
|
|
7107
7136
|
"use strict";
|
|
7108
7137
|
var Node = require_node2();
|
|
7109
7138
|
var Declaration = class extends Node {
|
|
@@ -7123,1263 +7152,1381 @@ var require_declaration = __commonJS({
|
|
|
7123
7152
|
}
|
|
7124
7153
|
});
|
|
7125
7154
|
|
|
7126
|
-
//
|
|
7127
|
-
var
|
|
7128
|
-
"
|
|
7129
|
-
}
|
|
7130
|
-
});
|
|
7131
|
-
|
|
7132
|
-
// (disabled):url
|
|
7133
|
-
var require_url = __commonJS({
|
|
7134
|
-
"(disabled):url"() {
|
|
7135
|
-
}
|
|
7136
|
-
});
|
|
7137
|
-
|
|
7138
|
-
// external/npm/node_modules/nanoid/non-secure/index.cjs
|
|
7139
|
-
var require_non_secure = __commonJS({
|
|
7140
|
-
"external/npm/node_modules/nanoid/non-secure/index.cjs"(exports, module) {
|
|
7141
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
7142
|
-
var customAlphabet = (alphabet, defaultSize = 21) => {
|
|
7143
|
-
return (size = defaultSize) => {
|
|
7144
|
-
let id = "";
|
|
7145
|
-
let i = size;
|
|
7146
|
-
while (i--) {
|
|
7147
|
-
id += alphabet[Math.random() * alphabet.length | 0];
|
|
7148
|
-
}
|
|
7149
|
-
return id;
|
|
7150
|
-
};
|
|
7151
|
-
};
|
|
7152
|
-
var nanoid = (size = 21) => {
|
|
7153
|
-
let id = "";
|
|
7154
|
-
let i = size;
|
|
7155
|
-
while (i--) {
|
|
7156
|
-
id += urlAlphabet[Math.random() * 64 | 0];
|
|
7157
|
-
}
|
|
7158
|
-
return id;
|
|
7159
|
-
};
|
|
7160
|
-
module.exports = { nanoid, customAlphabet };
|
|
7161
|
-
}
|
|
7162
|
-
});
|
|
7163
|
-
|
|
7164
|
-
// external/npm/node_modules/postcss/lib/previous-map.js
|
|
7165
|
-
var require_previous_map = __commonJS({
|
|
7166
|
-
"external/npm/node_modules/postcss/lib/previous-map.js"(exports, module) {
|
|
7155
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/container.js
|
|
7156
|
+
var require_container = __commonJS({
|
|
7157
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/container.js"(exports, module) {
|
|
7167
7158
|
"use strict";
|
|
7168
|
-
var
|
|
7169
|
-
var
|
|
7170
|
-
var
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7159
|
+
var Comment = require_comment();
|
|
7160
|
+
var Declaration = require_declaration();
|
|
7161
|
+
var Node = require_node2();
|
|
7162
|
+
var { isClean, my } = require_symbols();
|
|
7163
|
+
var AtRule;
|
|
7164
|
+
var parse;
|
|
7165
|
+
var Root;
|
|
7166
|
+
var Rule;
|
|
7167
|
+
function cleanSource(nodes) {
|
|
7168
|
+
return nodes.map((i) => {
|
|
7169
|
+
if (i.nodes)
|
|
7170
|
+
i.nodes = cleanSource(i.nodes);
|
|
7171
|
+
delete i.source;
|
|
7172
|
+
return i;
|
|
7173
|
+
});
|
|
7177
7174
|
}
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
this.inline = this.startWith(this.annotation, "data:");
|
|
7184
|
-
let prev = opts.map ? opts.map.prev : void 0;
|
|
7185
|
-
let text = this.loadMap(opts.from, prev);
|
|
7186
|
-
if (!this.mapFile && opts.from) {
|
|
7187
|
-
this.mapFile = opts.from;
|
|
7175
|
+
function markTreeDirty(node) {
|
|
7176
|
+
node[isClean] = false;
|
|
7177
|
+
if (node.proxyOf.nodes) {
|
|
7178
|
+
for (let i of node.proxyOf.nodes) {
|
|
7179
|
+
markTreeDirty(i);
|
|
7188
7180
|
}
|
|
7189
|
-
if (this.mapFile)
|
|
7190
|
-
this.root = dirname(this.mapFile);
|
|
7191
|
-
if (text)
|
|
7192
|
-
this.text = text;
|
|
7193
7181
|
}
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7182
|
+
}
|
|
7183
|
+
var Container = class extends Node {
|
|
7184
|
+
append(...children) {
|
|
7185
|
+
for (let child of children) {
|
|
7186
|
+
let nodes = this.normalize(child, this.last);
|
|
7187
|
+
for (let node of nodes)
|
|
7188
|
+
this.proxyOf.nodes.push(node);
|
|
7197
7189
|
}
|
|
7198
|
-
|
|
7190
|
+
this.markDirty();
|
|
7191
|
+
return this;
|
|
7199
7192
|
}
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
let uriMatch = text.match(charsetUri) || text.match(uri);
|
|
7206
|
-
if (uriMatch) {
|
|
7207
|
-
return decodeURIComponent(text.substr(uriMatch[0].length));
|
|
7208
|
-
}
|
|
7209
|
-
let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
|
|
7210
|
-
if (baseUriMatch) {
|
|
7211
|
-
return fromBase64(text.substr(baseUriMatch[0].length));
|
|
7193
|
+
cleanRaws(keepBetween) {
|
|
7194
|
+
super.cleanRaws(keepBetween);
|
|
7195
|
+
if (this.nodes) {
|
|
7196
|
+
for (let node of this.nodes)
|
|
7197
|
+
node.cleanRaws(keepBetween);
|
|
7212
7198
|
}
|
|
7213
|
-
let encoding = text.match(/data:application\/json;([^,]+),/)[1];
|
|
7214
|
-
throw new Error("Unsupported source map encoding " + encoding);
|
|
7215
|
-
}
|
|
7216
|
-
getAnnotationURL(sourceMapString) {
|
|
7217
|
-
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
|
|
7218
|
-
}
|
|
7219
|
-
isMap(map) {
|
|
7220
|
-
if (typeof map !== "object")
|
|
7221
|
-
return false;
|
|
7222
|
-
return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
|
|
7223
7199
|
}
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
let
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7200
|
+
each(callback) {
|
|
7201
|
+
if (!this.proxyOf.nodes)
|
|
7202
|
+
return void 0;
|
|
7203
|
+
let iterator = this.getIterator();
|
|
7204
|
+
let index, result;
|
|
7205
|
+
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
|
|
7206
|
+
index = this.indexes[iterator];
|
|
7207
|
+
result = callback(this.proxyOf.nodes[index], index);
|
|
7208
|
+
if (result === false)
|
|
7209
|
+
break;
|
|
7210
|
+
this.indexes[iterator] += 1;
|
|
7232
7211
|
}
|
|
7212
|
+
delete this.indexes[iterator];
|
|
7213
|
+
return result;
|
|
7233
7214
|
}
|
|
7234
|
-
|
|
7235
|
-
this.
|
|
7236
|
-
if (existsSync(path)) {
|
|
7237
|
-
this.mapFile = path;
|
|
7238
|
-
return readFileSync(path, "utf-8").toString().trim();
|
|
7239
|
-
}
|
|
7215
|
+
every(condition) {
|
|
7216
|
+
return this.nodes.every(condition);
|
|
7240
7217
|
}
|
|
7241
|
-
|
|
7242
|
-
if (
|
|
7243
|
-
|
|
7244
|
-
if (
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7218
|
+
getIterator() {
|
|
7219
|
+
if (!this.lastEach)
|
|
7220
|
+
this.lastEach = 0;
|
|
7221
|
+
if (!this.indexes)
|
|
7222
|
+
this.indexes = {};
|
|
7223
|
+
this.lastEach += 1;
|
|
7224
|
+
let iterator = this.lastEach;
|
|
7225
|
+
this.indexes[iterator] = 0;
|
|
7226
|
+
return iterator;
|
|
7227
|
+
}
|
|
7228
|
+
getProxyProcessor() {
|
|
7229
|
+
return {
|
|
7230
|
+
get(node, prop) {
|
|
7231
|
+
if (prop === "proxyOf") {
|
|
7232
|
+
return node;
|
|
7233
|
+
} else if (!node[prop]) {
|
|
7234
|
+
return node[prop];
|
|
7235
|
+
} else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
|
|
7236
|
+
return (...args) => {
|
|
7237
|
+
return node[prop](
|
|
7238
|
+
...args.map((i) => {
|
|
7239
|
+
if (typeof i === "function") {
|
|
7240
|
+
return (child, index) => i(child.toProxy(), index);
|
|
7241
|
+
} else {
|
|
7242
|
+
return i;
|
|
7243
|
+
}
|
|
7244
|
+
})
|
|
7254
7245
|
);
|
|
7255
|
-
}
|
|
7256
|
-
|
|
7246
|
+
};
|
|
7247
|
+
} else if (prop === "every" || prop === "some") {
|
|
7248
|
+
return (cb) => {
|
|
7249
|
+
return node[prop](
|
|
7250
|
+
(child, ...other) => cb(child.toProxy(), ...other)
|
|
7251
|
+
);
|
|
7252
|
+
};
|
|
7253
|
+
} else if (prop === "root") {
|
|
7254
|
+
return () => node.root().toProxy();
|
|
7255
|
+
} else if (prop === "nodes") {
|
|
7256
|
+
return node.nodes.map((i) => i.toProxy());
|
|
7257
|
+
} else if (prop === "first" || prop === "last") {
|
|
7258
|
+
return node[prop].toProxy();
|
|
7259
|
+
} else {
|
|
7260
|
+
return node[prop];
|
|
7257
7261
|
}
|
|
7258
|
-
}
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
);
|
|
7262
|
+
},
|
|
7263
|
+
set(node, prop, value) {
|
|
7264
|
+
if (node[prop] === value)
|
|
7265
|
+
return true;
|
|
7266
|
+
node[prop] = value;
|
|
7267
|
+
if (prop === "name" || prop === "params" || prop === "selector") {
|
|
7268
|
+
node.markDirty();
|
|
7269
|
+
}
|
|
7270
|
+
return true;
|
|
7268
7271
|
}
|
|
7269
|
-
}
|
|
7270
|
-
return this.decodeInline(this.annotation);
|
|
7271
|
-
} else if (this.annotation) {
|
|
7272
|
-
let map = this.annotation;
|
|
7273
|
-
if (file)
|
|
7274
|
-
map = join(dirname(file), map);
|
|
7275
|
-
return this.loadFile(map);
|
|
7276
|
-
}
|
|
7277
|
-
}
|
|
7278
|
-
startWith(string, start) {
|
|
7279
|
-
if (!string)
|
|
7280
|
-
return false;
|
|
7281
|
-
return string.substr(0, start.length) === start;
|
|
7272
|
+
};
|
|
7282
7273
|
}
|
|
7283
|
-
|
|
7284
|
-
|
|
7274
|
+
index(child) {
|
|
7275
|
+
if (typeof child === "number")
|
|
7276
|
+
return child;
|
|
7277
|
+
if (child.proxyOf)
|
|
7278
|
+
child = child.proxyOf;
|
|
7279
|
+
return this.proxyOf.nodes.indexOf(child);
|
|
7285
7280
|
}
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
var { fileURLToPath, pathToFileURL } = require_url();
|
|
7298
|
-
var { isAbsolute, resolve } = require_path();
|
|
7299
|
-
var { nanoid } = require_non_secure();
|
|
7300
|
-
var terminalHighlight = require_terminal_highlight();
|
|
7301
|
-
var CssSyntaxError = require_css_syntax_error();
|
|
7302
|
-
var PreviousMap = require_previous_map();
|
|
7303
|
-
var fromOffsetCache = Symbol("fromOffsetCache");
|
|
7304
|
-
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
7305
|
-
var pathAvailable = Boolean(resolve && isAbsolute);
|
|
7306
|
-
var Input = class {
|
|
7307
|
-
constructor(css, opts = {}) {
|
|
7308
|
-
if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
|
|
7309
|
-
throw new Error(`PostCSS received ${css} instead of CSS string`);
|
|
7310
|
-
}
|
|
7311
|
-
this.css = css.toString();
|
|
7312
|
-
if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") {
|
|
7313
|
-
this.hasBOM = true;
|
|
7314
|
-
this.css = this.css.slice(1);
|
|
7315
|
-
} else {
|
|
7316
|
-
this.hasBOM = false;
|
|
7317
|
-
}
|
|
7318
|
-
if (opts.from) {
|
|
7319
|
-
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
|
|
7320
|
-
this.file = opts.from;
|
|
7321
|
-
} else {
|
|
7322
|
-
this.file = resolve(opts.from);
|
|
7281
|
+
insertAfter(exist, add) {
|
|
7282
|
+
let existIndex = this.index(exist);
|
|
7283
|
+
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
|
|
7284
|
+
existIndex = this.index(exist);
|
|
7285
|
+
for (let node of nodes)
|
|
7286
|
+
this.proxyOf.nodes.splice(existIndex + 1, 0, node);
|
|
7287
|
+
let index;
|
|
7288
|
+
for (let id in this.indexes) {
|
|
7289
|
+
index = this.indexes[id];
|
|
7290
|
+
if (existIndex < index) {
|
|
7291
|
+
this.indexes[id] = index + nodes.length;
|
|
7323
7292
|
}
|
|
7324
7293
|
}
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7294
|
+
this.markDirty();
|
|
7295
|
+
return this;
|
|
7296
|
+
}
|
|
7297
|
+
insertBefore(exist, add) {
|
|
7298
|
+
let existIndex = this.index(exist);
|
|
7299
|
+
let type = existIndex === 0 ? "prepend" : false;
|
|
7300
|
+
let nodes = this.normalize(
|
|
7301
|
+
add,
|
|
7302
|
+
this.proxyOf.nodes[existIndex],
|
|
7303
|
+
type
|
|
7304
|
+
).reverse();
|
|
7305
|
+
existIndex = this.index(exist);
|
|
7306
|
+
for (let node of nodes)
|
|
7307
|
+
this.proxyOf.nodes.splice(existIndex, 0, node);
|
|
7308
|
+
let index;
|
|
7309
|
+
for (let id in this.indexes) {
|
|
7310
|
+
index = this.indexes[id];
|
|
7311
|
+
if (existIndex <= index) {
|
|
7312
|
+
this.indexes[id] = index + nodes.length;
|
|
7332
7313
|
}
|
|
7333
7314
|
}
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
}
|
|
7337
|
-
if (this.map)
|
|
7338
|
-
this.map.file = this.from;
|
|
7315
|
+
this.markDirty();
|
|
7316
|
+
return this;
|
|
7339
7317
|
}
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
line = start.line;
|
|
7351
|
-
column = start.column;
|
|
7352
|
-
}
|
|
7353
|
-
if (typeof end.offset === "number") {
|
|
7354
|
-
let pos = this.fromOffset(end.offset);
|
|
7355
|
-
endLine = pos.line;
|
|
7356
|
-
endColumn = pos.col;
|
|
7357
|
-
} else {
|
|
7358
|
-
endLine = end.line;
|
|
7359
|
-
endColumn = end.column;
|
|
7318
|
+
normalize(nodes, sample) {
|
|
7319
|
+
if (typeof nodes === "string") {
|
|
7320
|
+
nodes = cleanSource(parse(nodes).nodes);
|
|
7321
|
+
} else if (typeof nodes === "undefined") {
|
|
7322
|
+
nodes = [];
|
|
7323
|
+
} else if (Array.isArray(nodes)) {
|
|
7324
|
+
nodes = nodes.slice(0);
|
|
7325
|
+
for (let i of nodes) {
|
|
7326
|
+
if (i.parent)
|
|
7327
|
+
i.parent.removeChild(i, "ignore");
|
|
7360
7328
|
}
|
|
7361
|
-
} else if (
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
let origin = this.origin(line, column, endLine, endColumn);
|
|
7367
|
-
if (origin) {
|
|
7368
|
-
result = new CssSyntaxError(
|
|
7369
|
-
message,
|
|
7370
|
-
origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
|
|
7371
|
-
origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
|
|
7372
|
-
origin.source,
|
|
7373
|
-
origin.file,
|
|
7374
|
-
opts.plugin
|
|
7375
|
-
);
|
|
7376
|
-
} else {
|
|
7377
|
-
result = new CssSyntaxError(
|
|
7378
|
-
message,
|
|
7379
|
-
endLine === void 0 ? line : { column, line },
|
|
7380
|
-
endLine === void 0 ? column : { column: endColumn, line: endLine },
|
|
7381
|
-
this.css,
|
|
7382
|
-
this.file,
|
|
7383
|
-
opts.plugin
|
|
7384
|
-
);
|
|
7385
|
-
}
|
|
7386
|
-
result.input = { column, endColumn, endLine, line, source: this.css };
|
|
7387
|
-
if (this.file) {
|
|
7388
|
-
if (pathToFileURL) {
|
|
7389
|
-
result.input.url = pathToFileURL(this.file).toString();
|
|
7329
|
+
} else if (nodes.type === "root" && this.type !== "document") {
|
|
7330
|
+
nodes = nodes.nodes.slice(0);
|
|
7331
|
+
for (let i of nodes) {
|
|
7332
|
+
if (i.parent)
|
|
7333
|
+
i.parent.removeChild(i, "ignore");
|
|
7390
7334
|
}
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
let lines = this.css.split("\n");
|
|
7399
|
-
lineToIndex = new Array(lines.length);
|
|
7400
|
-
let prevIndex = 0;
|
|
7401
|
-
for (let i = 0, l = lines.length; i < l; i++) {
|
|
7402
|
-
lineToIndex[i] = prevIndex;
|
|
7403
|
-
prevIndex += lines[i].length + 1;
|
|
7335
|
+
} else if (nodes.type) {
|
|
7336
|
+
nodes = [nodes];
|
|
7337
|
+
} else if (nodes.prop) {
|
|
7338
|
+
if (typeof nodes.value === "undefined") {
|
|
7339
|
+
throw new Error("Value field is missed in node creation");
|
|
7340
|
+
} else if (typeof nodes.value !== "string") {
|
|
7341
|
+
nodes.value = String(nodes.value);
|
|
7404
7342
|
}
|
|
7405
|
-
|
|
7343
|
+
nodes = [new Declaration(nodes)];
|
|
7344
|
+
} else if (nodes.selector || nodes.selectors) {
|
|
7345
|
+
nodes = [new Rule(nodes)];
|
|
7346
|
+
} else if (nodes.name) {
|
|
7347
|
+
nodes = [new AtRule(nodes)];
|
|
7348
|
+
} else if (nodes.text) {
|
|
7349
|
+
nodes = [new Comment(nodes)];
|
|
7406
7350
|
} else {
|
|
7407
|
-
|
|
7351
|
+
throw new Error("Unknown node type in node creation");
|
|
7408
7352
|
}
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
if (
|
|
7419
|
-
|
|
7420
|
-
} else if (offset >= lineToIndex[mid + 1]) {
|
|
7421
|
-
min = mid + 1;
|
|
7422
|
-
} else {
|
|
7423
|
-
min = mid;
|
|
7424
|
-
break;
|
|
7353
|
+
let processed = nodes.map((i) => {
|
|
7354
|
+
if (!i[my] || !i.markClean)
|
|
7355
|
+
Container.rebuild(i);
|
|
7356
|
+
i = i.proxyOf;
|
|
7357
|
+
if (i.parent)
|
|
7358
|
+
i.parent.removeChild(i);
|
|
7359
|
+
if (i[isClean])
|
|
7360
|
+
markTreeDirty(i);
|
|
7361
|
+
if (typeof i.raws.before === "undefined") {
|
|
7362
|
+
if (sample && typeof sample.raws.before !== "undefined") {
|
|
7363
|
+
i.raws.before = sample.raws.before.replace(/\S/g, "");
|
|
7425
7364
|
}
|
|
7426
7365
|
}
|
|
7366
|
+
i.parent = this.proxyOf;
|
|
7367
|
+
return i;
|
|
7368
|
+
});
|
|
7369
|
+
return processed;
|
|
7370
|
+
}
|
|
7371
|
+
prepend(...children) {
|
|
7372
|
+
children = children.reverse();
|
|
7373
|
+
for (let child of children) {
|
|
7374
|
+
let nodes = this.normalize(child, this.first, "prepend").reverse();
|
|
7375
|
+
for (let node of nodes)
|
|
7376
|
+
this.proxyOf.nodes.unshift(node);
|
|
7377
|
+
for (let id in this.indexes) {
|
|
7378
|
+
this.indexes[id] = this.indexes[id] + nodes.length;
|
|
7379
|
+
}
|
|
7427
7380
|
}
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
line: min + 1
|
|
7431
|
-
};
|
|
7381
|
+
this.markDirty();
|
|
7382
|
+
return this;
|
|
7432
7383
|
}
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
|
|
7384
|
+
push(child) {
|
|
7385
|
+
child.parent = this;
|
|
7386
|
+
this.proxyOf.nodes.push(child);
|
|
7387
|
+
return this;
|
|
7438
7388
|
}
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
return false;
|
|
7446
|
-
let to;
|
|
7447
|
-
if (typeof endLine === "number") {
|
|
7448
|
-
to = consumer.originalPositionFor({ column: endColumn, line: endLine });
|
|
7449
|
-
}
|
|
7450
|
-
let fromUrl;
|
|
7451
|
-
if (isAbsolute(from.source)) {
|
|
7452
|
-
fromUrl = pathToFileURL(from.source);
|
|
7453
|
-
} else {
|
|
7454
|
-
fromUrl = new URL(
|
|
7455
|
-
from.source,
|
|
7456
|
-
this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
|
|
7457
|
-
);
|
|
7458
|
-
}
|
|
7459
|
-
let result = {
|
|
7460
|
-
column: from.column,
|
|
7461
|
-
endColumn: to && to.column,
|
|
7462
|
-
endLine: to && to.line,
|
|
7463
|
-
line: from.line,
|
|
7464
|
-
url: fromUrl.toString()
|
|
7465
|
-
};
|
|
7466
|
-
if (fromUrl.protocol === "file:") {
|
|
7467
|
-
if (fileURLToPath) {
|
|
7468
|
-
result.file = fileURLToPath(fromUrl);
|
|
7469
|
-
} else {
|
|
7470
|
-
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
7471
|
-
}
|
|
7472
|
-
}
|
|
7473
|
-
let source = consumer.sourceContentFor(from.source);
|
|
7474
|
-
if (source)
|
|
7475
|
-
result.source = source;
|
|
7476
|
-
return result;
|
|
7389
|
+
removeAll() {
|
|
7390
|
+
for (let node of this.proxyOf.nodes)
|
|
7391
|
+
node.parent = void 0;
|
|
7392
|
+
this.proxyOf.nodes = [];
|
|
7393
|
+
this.markDirty();
|
|
7394
|
+
return this;
|
|
7477
7395
|
}
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7396
|
+
removeChild(child) {
|
|
7397
|
+
child = this.index(child);
|
|
7398
|
+
this.proxyOf.nodes[child].parent = void 0;
|
|
7399
|
+
this.proxyOf.nodes.splice(child, 1);
|
|
7400
|
+
let index;
|
|
7401
|
+
for (let id in this.indexes) {
|
|
7402
|
+
index = this.indexes[id];
|
|
7403
|
+
if (index >= child) {
|
|
7404
|
+
this.indexes[id] = index - 1;
|
|
7483
7405
|
}
|
|
7484
7406
|
}
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7407
|
+
this.markDirty();
|
|
7408
|
+
return this;
|
|
7409
|
+
}
|
|
7410
|
+
replaceValues(pattern, opts, callback) {
|
|
7411
|
+
if (!callback) {
|
|
7412
|
+
callback = opts;
|
|
7413
|
+
opts = {};
|
|
7490
7414
|
}
|
|
7491
|
-
|
|
7415
|
+
this.walkDecls((decl) => {
|
|
7416
|
+
if (opts.props && !opts.props.includes(decl.prop))
|
|
7417
|
+
return;
|
|
7418
|
+
if (opts.fast && !decl.value.includes(opts.fast))
|
|
7419
|
+
return;
|
|
7420
|
+
decl.value = decl.value.replace(pattern, callback);
|
|
7421
|
+
});
|
|
7422
|
+
this.markDirty();
|
|
7423
|
+
return this;
|
|
7492
7424
|
}
|
|
7493
|
-
|
|
7494
|
-
return this.
|
|
7425
|
+
some(condition) {
|
|
7426
|
+
return this.nodes.some(condition);
|
|
7495
7427
|
}
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
}
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
7510
|
-
var { dirname, relative, resolve, sep } = require_path();
|
|
7511
|
-
var { pathToFileURL } = require_url();
|
|
7512
|
-
var Input = require_input();
|
|
7513
|
-
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
7514
|
-
var pathAvailable = Boolean(dirname && resolve && relative && sep);
|
|
7515
|
-
var MapGenerator = class {
|
|
7516
|
-
constructor(stringify, root, opts, cssString) {
|
|
7517
|
-
this.stringify = stringify;
|
|
7518
|
-
this.mapOpts = opts.map || {};
|
|
7519
|
-
this.root = root;
|
|
7520
|
-
this.opts = opts;
|
|
7521
|
-
this.css = cssString;
|
|
7522
|
-
this.originalCSS = cssString;
|
|
7523
|
-
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
|
|
7524
|
-
this.memoizedFileURLs = /* @__PURE__ */ new Map();
|
|
7525
|
-
this.memoizedPaths = /* @__PURE__ */ new Map();
|
|
7526
|
-
this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
7428
|
+
walk(callback) {
|
|
7429
|
+
return this.each((child, i) => {
|
|
7430
|
+
let result;
|
|
7431
|
+
try {
|
|
7432
|
+
result = callback(child, i);
|
|
7433
|
+
} catch (e) {
|
|
7434
|
+
throw child.addToError(e);
|
|
7435
|
+
}
|
|
7436
|
+
if (result !== false && child.walk) {
|
|
7437
|
+
result = child.walk(callback);
|
|
7438
|
+
}
|
|
7439
|
+
return result;
|
|
7440
|
+
});
|
|
7527
7441
|
}
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
} else {
|
|
7537
|
-
content = this.outputFile() + ".map";
|
|
7442
|
+
walkAtRules(name, callback) {
|
|
7443
|
+
if (!callback) {
|
|
7444
|
+
callback = name;
|
|
7445
|
+
return this.walk((child, i) => {
|
|
7446
|
+
if (child.type === "atrule") {
|
|
7447
|
+
return callback(child, i);
|
|
7448
|
+
}
|
|
7449
|
+
});
|
|
7538
7450
|
}
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
}
|
|
7544
|
-
applyPrevMaps() {
|
|
7545
|
-
for (let prev of this.previous()) {
|
|
7546
|
-
let from = this.toUrl(this.path(prev.file));
|
|
7547
|
-
let root = prev.root || dirname(prev.file);
|
|
7548
|
-
let map;
|
|
7549
|
-
if (this.mapOpts.sourcesContent === false) {
|
|
7550
|
-
map = new SourceMapConsumer(prev.text);
|
|
7551
|
-
if (map.sourcesContent) {
|
|
7552
|
-
map.sourcesContent = null;
|
|
7451
|
+
if (name instanceof RegExp) {
|
|
7452
|
+
return this.walk((child, i) => {
|
|
7453
|
+
if (child.type === "atrule" && name.test(child.name)) {
|
|
7454
|
+
return callback(child, i);
|
|
7553
7455
|
}
|
|
7554
|
-
}
|
|
7555
|
-
map = prev.consumer();
|
|
7556
|
-
}
|
|
7557
|
-
this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
|
|
7456
|
+
});
|
|
7558
7457
|
}
|
|
7458
|
+
return this.walk((child, i) => {
|
|
7459
|
+
if (child.type === "atrule" && child.name === name) {
|
|
7460
|
+
return callback(child, i);
|
|
7461
|
+
}
|
|
7462
|
+
});
|
|
7559
7463
|
}
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
let node;
|
|
7565
|
-
for (let i = this.root.nodes.length - 1; i >= 0; i--) {
|
|
7566
|
-
node = this.root.nodes[i];
|
|
7567
|
-
if (node.type !== "comment")
|
|
7568
|
-
continue;
|
|
7569
|
-
if (node.text.indexOf("# sourceMappingURL=") === 0) {
|
|
7570
|
-
this.root.removeChild(i);
|
|
7571
|
-
}
|
|
7464
|
+
walkComments(callback) {
|
|
7465
|
+
return this.walk((child, i) => {
|
|
7466
|
+
if (child.type === "comment") {
|
|
7467
|
+
return callback(child, i);
|
|
7572
7468
|
}
|
|
7573
|
-
}
|
|
7574
|
-
this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, "");
|
|
7575
|
-
}
|
|
7469
|
+
});
|
|
7576
7470
|
}
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
return this.
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
result += i;
|
|
7471
|
+
walkDecls(prop, callback) {
|
|
7472
|
+
if (!callback) {
|
|
7473
|
+
callback = prop;
|
|
7474
|
+
return this.walk((child, i) => {
|
|
7475
|
+
if (child.type === "decl") {
|
|
7476
|
+
return callback(child, i);
|
|
7477
|
+
}
|
|
7585
7478
|
});
|
|
7586
|
-
return [result];
|
|
7587
7479
|
}
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
let prev = this.previous()[0].consumer();
|
|
7594
|
-
prev.file = this.outputFile();
|
|
7595
|
-
this.map = SourceMapGenerator.fromSourceMap(prev, {
|
|
7596
|
-
ignoreInvalidMapping: true
|
|
7597
|
-
});
|
|
7598
|
-
} else {
|
|
7599
|
-
this.map = new SourceMapGenerator({
|
|
7600
|
-
file: this.outputFile(),
|
|
7601
|
-
ignoreInvalidMapping: true
|
|
7602
|
-
});
|
|
7603
|
-
this.map.addMapping({
|
|
7604
|
-
generated: { column: 0, line: 1 },
|
|
7605
|
-
original: { column: 0, line: 1 },
|
|
7606
|
-
source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
|
|
7480
|
+
if (prop instanceof RegExp) {
|
|
7481
|
+
return this.walk((child, i) => {
|
|
7482
|
+
if (child.type === "decl" && prop.test(child.prop)) {
|
|
7483
|
+
return callback(child, i);
|
|
7484
|
+
}
|
|
7607
7485
|
});
|
|
7608
7486
|
}
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
this.addAnnotation();
|
|
7615
|
-
if (this.isInline()) {
|
|
7616
|
-
return [this.css];
|
|
7617
|
-
} else {
|
|
7618
|
-
return [this.css, this.map];
|
|
7619
|
-
}
|
|
7487
|
+
return this.walk((child, i) => {
|
|
7488
|
+
if (child.type === "decl" && child.prop === prop) {
|
|
7489
|
+
return callback(child, i);
|
|
7490
|
+
}
|
|
7491
|
+
});
|
|
7620
7492
|
}
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
let line = 1;
|
|
7628
|
-
let column = 1;
|
|
7629
|
-
let noSource = "<no source>";
|
|
7630
|
-
let mapping = {
|
|
7631
|
-
generated: { column: 0, line: 0 },
|
|
7632
|
-
original: { column: 0, line: 0 },
|
|
7633
|
-
source: ""
|
|
7634
|
-
};
|
|
7635
|
-
let lines, last;
|
|
7636
|
-
this.stringify(this.root, (str, node, type) => {
|
|
7637
|
-
this.css += str;
|
|
7638
|
-
if (node && type !== "end") {
|
|
7639
|
-
mapping.generated.line = line;
|
|
7640
|
-
mapping.generated.column = column - 1;
|
|
7641
|
-
if (node.source && node.source.start) {
|
|
7642
|
-
mapping.source = this.sourcePath(node);
|
|
7643
|
-
mapping.original.line = node.source.start.line;
|
|
7644
|
-
mapping.original.column = node.source.start.column - 1;
|
|
7645
|
-
this.map.addMapping(mapping);
|
|
7646
|
-
} else {
|
|
7647
|
-
mapping.source = noSource;
|
|
7648
|
-
mapping.original.line = 1;
|
|
7649
|
-
mapping.original.column = 0;
|
|
7650
|
-
this.map.addMapping(mapping);
|
|
7493
|
+
walkRules(selector, callback) {
|
|
7494
|
+
if (!callback) {
|
|
7495
|
+
callback = selector;
|
|
7496
|
+
return this.walk((child, i) => {
|
|
7497
|
+
if (child.type === "rule") {
|
|
7498
|
+
return callback(child, i);
|
|
7651
7499
|
}
|
|
7652
|
-
}
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
} else {
|
|
7659
|
-
column += str.length;
|
|
7660
|
-
}
|
|
7661
|
-
if (node && type !== "start") {
|
|
7662
|
-
let p = node.parent || { raws: {} };
|
|
7663
|
-
let childless = node.type === "decl" || node.type === "atrule" && !node.nodes;
|
|
7664
|
-
if (!childless || node !== p.last || p.raws.semicolon) {
|
|
7665
|
-
if (node.source && node.source.end) {
|
|
7666
|
-
mapping.source = this.sourcePath(node);
|
|
7667
|
-
mapping.original.line = node.source.end.line;
|
|
7668
|
-
mapping.original.column = node.source.end.column - 1;
|
|
7669
|
-
mapping.generated.line = line;
|
|
7670
|
-
mapping.generated.column = column - 2;
|
|
7671
|
-
this.map.addMapping(mapping);
|
|
7672
|
-
} else {
|
|
7673
|
-
mapping.source = noSource;
|
|
7674
|
-
mapping.original.line = 1;
|
|
7675
|
-
mapping.original.column = 0;
|
|
7676
|
-
mapping.generated.line = line;
|
|
7677
|
-
mapping.generated.column = column - 1;
|
|
7678
|
-
this.map.addMapping(mapping);
|
|
7679
|
-
}
|
|
7500
|
+
});
|
|
7501
|
+
}
|
|
7502
|
+
if (selector instanceof RegExp) {
|
|
7503
|
+
return this.walk((child, i) => {
|
|
7504
|
+
if (child.type === "rule" && selector.test(child.selector)) {
|
|
7505
|
+
return callback(child, i);
|
|
7680
7506
|
}
|
|
7507
|
+
});
|
|
7508
|
+
}
|
|
7509
|
+
return this.walk((child, i) => {
|
|
7510
|
+
if (child.type === "rule" && child.selector === selector) {
|
|
7511
|
+
return callback(child, i);
|
|
7681
7512
|
}
|
|
7682
7513
|
});
|
|
7683
7514
|
}
|
|
7684
|
-
|
|
7685
|
-
if (this.
|
|
7686
|
-
return
|
|
7687
|
-
|
|
7688
|
-
if (typeof this.mapOpts.annotation !== "undefined") {
|
|
7689
|
-
return this.mapOpts.annotation;
|
|
7690
|
-
}
|
|
7691
|
-
if (this.previous().length) {
|
|
7692
|
-
return this.previous().some((i) => i.annotation);
|
|
7693
|
-
}
|
|
7694
|
-
return true;
|
|
7515
|
+
get first() {
|
|
7516
|
+
if (!this.proxyOf.nodes)
|
|
7517
|
+
return void 0;
|
|
7518
|
+
return this.proxyOf.nodes[0];
|
|
7695
7519
|
}
|
|
7696
|
-
|
|
7697
|
-
if (
|
|
7698
|
-
return
|
|
7699
|
-
|
|
7700
|
-
let annotation = this.mapOpts.annotation;
|
|
7701
|
-
if (typeof annotation !== "undefined" && annotation !== true) {
|
|
7702
|
-
return false;
|
|
7703
|
-
}
|
|
7704
|
-
if (this.previous().length) {
|
|
7705
|
-
return this.previous().some((i) => i.inline);
|
|
7706
|
-
}
|
|
7707
|
-
return true;
|
|
7520
|
+
get last() {
|
|
7521
|
+
if (!this.proxyOf.nodes)
|
|
7522
|
+
return void 0;
|
|
7523
|
+
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
7708
7524
|
}
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7525
|
+
};
|
|
7526
|
+
Container.registerParse = (dependant) => {
|
|
7527
|
+
parse = dependant;
|
|
7528
|
+
};
|
|
7529
|
+
Container.registerRule = (dependant) => {
|
|
7530
|
+
Rule = dependant;
|
|
7531
|
+
};
|
|
7532
|
+
Container.registerAtRule = (dependant) => {
|
|
7533
|
+
AtRule = dependant;
|
|
7534
|
+
};
|
|
7535
|
+
Container.registerRoot = (dependant) => {
|
|
7536
|
+
Root = dependant;
|
|
7537
|
+
};
|
|
7538
|
+
module.exports = Container;
|
|
7539
|
+
Container.default = Container;
|
|
7540
|
+
Container.rebuild = (node) => {
|
|
7541
|
+
if (node.type === "atrule") {
|
|
7542
|
+
Object.setPrototypeOf(node, AtRule.prototype);
|
|
7543
|
+
} else if (node.type === "rule") {
|
|
7544
|
+
Object.setPrototypeOf(node, Rule.prototype);
|
|
7545
|
+
} else if (node.type === "decl") {
|
|
7546
|
+
Object.setPrototypeOf(node, Declaration.prototype);
|
|
7547
|
+
} else if (node.type === "comment") {
|
|
7548
|
+
Object.setPrototypeOf(node, Comment.prototype);
|
|
7549
|
+
} else if (node.type === "root") {
|
|
7550
|
+
Object.setPrototypeOf(node, Root.prototype);
|
|
7714
7551
|
}
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7552
|
+
node[my] = true;
|
|
7553
|
+
if (node.nodes) {
|
|
7554
|
+
node.nodes.forEach((child) => {
|
|
7555
|
+
Container.rebuild(child);
|
|
7556
|
+
});
|
|
7557
|
+
}
|
|
7558
|
+
};
|
|
7559
|
+
}
|
|
7560
|
+
});
|
|
7561
|
+
|
|
7562
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/at-rule.js
|
|
7563
|
+
var require_at_rule = __commonJS({
|
|
7564
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/at-rule.js"(exports, module) {
|
|
7565
|
+
"use strict";
|
|
7566
|
+
var Container = require_container();
|
|
7567
|
+
var AtRule = class extends Container {
|
|
7568
|
+
constructor(defaults) {
|
|
7569
|
+
super(defaults);
|
|
7570
|
+
this.type = "atrule";
|
|
7571
|
+
}
|
|
7572
|
+
append(...children) {
|
|
7573
|
+
if (!this.proxyOf.nodes)
|
|
7574
|
+
this.nodes = [];
|
|
7575
|
+
return super.append(...children);
|
|
7576
|
+
}
|
|
7577
|
+
prepend(...children) {
|
|
7578
|
+
if (!this.proxyOf.nodes)
|
|
7579
|
+
this.nodes = [];
|
|
7580
|
+
return super.prepend(...children);
|
|
7581
|
+
}
|
|
7582
|
+
};
|
|
7583
|
+
module.exports = AtRule;
|
|
7584
|
+
AtRule.default = AtRule;
|
|
7585
|
+
Container.registerAtRule(AtRule);
|
|
7586
|
+
}
|
|
7587
|
+
});
|
|
7588
|
+
|
|
7589
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/document.js
|
|
7590
|
+
var require_document = __commonJS({
|
|
7591
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/document.js"(exports, module) {
|
|
7592
|
+
"use strict";
|
|
7593
|
+
var Container = require_container();
|
|
7594
|
+
var LazyResult;
|
|
7595
|
+
var Processor;
|
|
7596
|
+
var Document = class extends Container {
|
|
7597
|
+
constructor(defaults) {
|
|
7598
|
+
super(__spreadValues({ type: "document" }, defaults));
|
|
7599
|
+
if (!this.nodes) {
|
|
7600
|
+
this.nodes = [];
|
|
7721
7601
|
}
|
|
7722
|
-
return true;
|
|
7723
7602
|
}
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7603
|
+
toResult(opts = {}) {
|
|
7604
|
+
let lazy = new LazyResult(new Processor(), this, opts);
|
|
7605
|
+
return lazy.stringify();
|
|
7606
|
+
}
|
|
7607
|
+
};
|
|
7608
|
+
Document.registerLazyResult = (dependant) => {
|
|
7609
|
+
LazyResult = dependant;
|
|
7610
|
+
};
|
|
7611
|
+
Document.registerProcessor = (dependant) => {
|
|
7612
|
+
Processor = dependant;
|
|
7613
|
+
};
|
|
7614
|
+
module.exports = Document;
|
|
7615
|
+
Document.default = Document;
|
|
7616
|
+
}
|
|
7617
|
+
});
|
|
7618
|
+
|
|
7619
|
+
// external/npm/node_modules/nanoid/non-secure/index.cjs
|
|
7620
|
+
var require_non_secure = __commonJS({
|
|
7621
|
+
"external/npm/node_modules/nanoid/non-secure/index.cjs"(exports, module) {
|
|
7622
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
7623
|
+
var customAlphabet = (alphabet, defaultSize = 21) => {
|
|
7624
|
+
return (size = defaultSize) => {
|
|
7625
|
+
let id = "";
|
|
7626
|
+
let i = size;
|
|
7627
|
+
while (i--) {
|
|
7628
|
+
id += alphabet[Math.random() * alphabet.length | 0];
|
|
7731
7629
|
}
|
|
7630
|
+
return id;
|
|
7631
|
+
};
|
|
7632
|
+
};
|
|
7633
|
+
var nanoid = (size = 21) => {
|
|
7634
|
+
let id = "";
|
|
7635
|
+
let i = size;
|
|
7636
|
+
while (i--) {
|
|
7637
|
+
id += urlAlphabet[Math.random() * 64 | 0];
|
|
7732
7638
|
}
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7639
|
+
return id;
|
|
7640
|
+
};
|
|
7641
|
+
module.exports = { nanoid, customAlphabet };
|
|
7642
|
+
}
|
|
7643
|
+
});
|
|
7644
|
+
|
|
7645
|
+
// (disabled):external/npm/node_modules/source-map-js/source-map.js
|
|
7646
|
+
var require_source_map = __commonJS({
|
|
7647
|
+
"(disabled):external/npm/node_modules/source-map-js/source-map.js"() {
|
|
7648
|
+
}
|
|
7649
|
+
});
|
|
7650
|
+
|
|
7651
|
+
// (disabled):url
|
|
7652
|
+
var require_url = __commonJS({
|
|
7653
|
+
"(disabled):url"() {
|
|
7654
|
+
}
|
|
7655
|
+
});
|
|
7656
|
+
|
|
7657
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/previous-map.js
|
|
7658
|
+
var require_previous_map = __commonJS({
|
|
7659
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/previous-map.js"(exports, module) {
|
|
7660
|
+
"use strict";
|
|
7661
|
+
var { existsSync, readFileSync } = require_fs2();
|
|
7662
|
+
var { dirname, join } = require_path();
|
|
7663
|
+
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
7664
|
+
function fromBase64(str) {
|
|
7665
|
+
if (Buffer) {
|
|
7666
|
+
return Buffer.from(str, "base64").toString();
|
|
7667
|
+
} else {
|
|
7668
|
+
return window.atob(str);
|
|
7669
|
+
}
|
|
7670
|
+
}
|
|
7671
|
+
var PreviousMap = class {
|
|
7672
|
+
constructor(css, opts) {
|
|
7673
|
+
if (opts.map === false)
|
|
7674
|
+
return;
|
|
7675
|
+
this.loadAnnotation(css);
|
|
7676
|
+
this.inline = this.startWith(this.annotation, "data:");
|
|
7677
|
+
let prev = opts.map ? opts.map.prev : void 0;
|
|
7678
|
+
let text = this.loadMap(opts.from, prev);
|
|
7679
|
+
if (!this.mapFile && opts.from) {
|
|
7680
|
+
this.mapFile = opts.from;
|
|
7746
7681
|
}
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7682
|
+
if (this.mapFile)
|
|
7683
|
+
this.root = dirname(this.mapFile);
|
|
7684
|
+
if (text)
|
|
7685
|
+
this.text = text;
|
|
7750
7686
|
}
|
|
7751
|
-
|
|
7752
|
-
if (!this.
|
|
7753
|
-
this.
|
|
7754
|
-
if (this.root) {
|
|
7755
|
-
this.root.walk((node) => {
|
|
7756
|
-
if (node.source && node.source.input.map) {
|
|
7757
|
-
let map = node.source.input.map;
|
|
7758
|
-
if (!this.previousMaps.includes(map)) {
|
|
7759
|
-
this.previousMaps.push(map);
|
|
7760
|
-
}
|
|
7761
|
-
}
|
|
7762
|
-
});
|
|
7763
|
-
} else {
|
|
7764
|
-
let input = new Input(this.originalCSS, this.opts);
|
|
7765
|
-
if (input.map)
|
|
7766
|
-
this.previousMaps.push(input.map);
|
|
7767
|
-
}
|
|
7687
|
+
consumer() {
|
|
7688
|
+
if (!this.consumerCache) {
|
|
7689
|
+
this.consumerCache = new SourceMapConsumer(this.text);
|
|
7768
7690
|
}
|
|
7769
|
-
return this.
|
|
7691
|
+
return this.consumerCache;
|
|
7770
7692
|
}
|
|
7771
|
-
|
|
7772
|
-
let
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
|
|
7780
|
-
this.map.setSourceContent(fromUrl, node.source.input.css);
|
|
7781
|
-
}
|
|
7782
|
-
}
|
|
7783
|
-
});
|
|
7784
|
-
} else if (this.css) {
|
|
7785
|
-
let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
|
|
7786
|
-
this.map.setSourceContent(from, this.css);
|
|
7693
|
+
decodeInline(text) {
|
|
7694
|
+
let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
|
|
7695
|
+
let baseUri = /^data:application\/json;base64,/;
|
|
7696
|
+
let charsetUri = /^data:application\/json;charset=utf-?8,/;
|
|
7697
|
+
let uri = /^data:application\/json,/;
|
|
7698
|
+
let uriMatch = text.match(charsetUri) || text.match(uri);
|
|
7699
|
+
if (uriMatch) {
|
|
7700
|
+
return decodeURIComponent(text.substr(uriMatch[0].length));
|
|
7787
7701
|
}
|
|
7702
|
+
let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
|
|
7703
|
+
if (baseUriMatch) {
|
|
7704
|
+
return fromBase64(text.substr(baseUriMatch[0].length));
|
|
7705
|
+
}
|
|
7706
|
+
let encoding = text.match(/data:application\/json;([^,]+),/)[1];
|
|
7707
|
+
throw new Error("Unsupported source map encoding " + encoding);
|
|
7788
7708
|
}
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7709
|
+
getAnnotationURL(sourceMapString) {
|
|
7710
|
+
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
|
|
7711
|
+
}
|
|
7712
|
+
isMap(map) {
|
|
7713
|
+
if (typeof map !== "object")
|
|
7714
|
+
return false;
|
|
7715
|
+
return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
|
|
7716
|
+
}
|
|
7717
|
+
loadAnnotation(css) {
|
|
7718
|
+
let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
|
|
7719
|
+
if (!comments)
|
|
7720
|
+
return;
|
|
7721
|
+
let start = css.lastIndexOf(comments.pop());
|
|
7722
|
+
let end = css.indexOf("*/", start);
|
|
7723
|
+
if (start > -1 && end > -1) {
|
|
7724
|
+
this.annotation = this.getAnnotationURL(css.substring(start, end));
|
|
7796
7725
|
}
|
|
7797
7726
|
}
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
return
|
|
7727
|
+
loadFile(path) {
|
|
7728
|
+
this.root = dirname(path);
|
|
7729
|
+
if (existsSync(path)) {
|
|
7730
|
+
this.mapFile = path;
|
|
7731
|
+
return readFileSync(path, "utf-8").toString().trim();
|
|
7803
7732
|
}
|
|
7804
7733
|
}
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7734
|
+
loadMap(file, prev) {
|
|
7735
|
+
if (prev === false)
|
|
7736
|
+
return false;
|
|
7737
|
+
if (prev) {
|
|
7738
|
+
if (typeof prev === "string") {
|
|
7739
|
+
return prev;
|
|
7740
|
+
} else if (typeof prev === "function") {
|
|
7741
|
+
let prevPath = prev(file);
|
|
7742
|
+
if (prevPath) {
|
|
7743
|
+
let map = this.loadFile(prevPath);
|
|
7744
|
+
if (!map) {
|
|
7745
|
+
throw new Error(
|
|
7746
|
+
"Unable to load previous source map: " + prevPath.toString()
|
|
7747
|
+
);
|
|
7748
|
+
}
|
|
7749
|
+
return map;
|
|
7750
|
+
}
|
|
7751
|
+
} else if (prev instanceof SourceMapConsumer) {
|
|
7752
|
+
return SourceMapGenerator.fromSourceMap(prev).toString();
|
|
7753
|
+
} else if (prev instanceof SourceMapGenerator) {
|
|
7754
|
+
return prev.toString();
|
|
7755
|
+
} else if (this.isMap(prev)) {
|
|
7756
|
+
return JSON.stringify(prev);
|
|
7757
|
+
} else {
|
|
7758
|
+
throw new Error(
|
|
7759
|
+
"Unsupported previous source map format: " + prev.toString()
|
|
7760
|
+
);
|
|
7761
|
+
}
|
|
7762
|
+
} else if (this.inline) {
|
|
7763
|
+
return this.decodeInline(this.annotation);
|
|
7764
|
+
} else if (this.annotation) {
|
|
7765
|
+
let map = this.annotation;
|
|
7766
|
+
if (file)
|
|
7767
|
+
map = join(dirname(file), map);
|
|
7768
|
+
return this.loadFile(map);
|
|
7817
7769
|
}
|
|
7818
7770
|
}
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
if (sep === "\\") {
|
|
7824
|
-
path = path.replace(/\\/g, "/");
|
|
7825
|
-
}
|
|
7826
|
-
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
|
|
7827
|
-
this.memoizedURLs.set(path, url);
|
|
7828
|
-
return url;
|
|
7771
|
+
startWith(string, start) {
|
|
7772
|
+
if (!string)
|
|
7773
|
+
return false;
|
|
7774
|
+
return string.substr(0, start.length) === start;
|
|
7829
7775
|
}
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
}
|
|
7833
|
-
});
|
|
7834
|
-
|
|
7835
|
-
// external/npm/node_modules/postcss/lib/comment.js
|
|
7836
|
-
var require_comment = __commonJS({
|
|
7837
|
-
"external/npm/node_modules/postcss/lib/comment.js"(exports, module) {
|
|
7838
|
-
"use strict";
|
|
7839
|
-
var Node = require_node2();
|
|
7840
|
-
var Comment = class extends Node {
|
|
7841
|
-
constructor(defaults) {
|
|
7842
|
-
super(defaults);
|
|
7843
|
-
this.type = "comment";
|
|
7776
|
+
withContent() {
|
|
7777
|
+
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
7844
7778
|
}
|
|
7845
7779
|
};
|
|
7846
|
-
module.exports =
|
|
7847
|
-
|
|
7780
|
+
module.exports = PreviousMap;
|
|
7781
|
+
PreviousMap.default = PreviousMap;
|
|
7848
7782
|
}
|
|
7849
7783
|
});
|
|
7850
7784
|
|
|
7851
|
-
// external/npm/node_modules/postcss/lib/
|
|
7852
|
-
var
|
|
7853
|
-
"external/npm/node_modules/postcss/lib/
|
|
7785
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/input.js
|
|
7786
|
+
var require_input = __commonJS({
|
|
7787
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/input.js"(exports, module) {
|
|
7854
7788
|
"use strict";
|
|
7855
|
-
var {
|
|
7856
|
-
var
|
|
7857
|
-
var
|
|
7858
|
-
var
|
|
7859
|
-
var
|
|
7860
|
-
var
|
|
7861
|
-
var
|
|
7862
|
-
var
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
});
|
|
7870
|
-
}
|
|
7871
|
-
function markTreeDirty(node) {
|
|
7872
|
-
node[isClean] = false;
|
|
7873
|
-
if (node.proxyOf.nodes) {
|
|
7874
|
-
for (let i of node.proxyOf.nodes) {
|
|
7875
|
-
markTreeDirty(i);
|
|
7789
|
+
var { nanoid } = require_non_secure();
|
|
7790
|
+
var { isAbsolute, resolve } = require_path();
|
|
7791
|
+
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
7792
|
+
var { fileURLToPath, pathToFileURL } = require_url();
|
|
7793
|
+
var CssSyntaxError = require_css_syntax_error();
|
|
7794
|
+
var PreviousMap = require_previous_map();
|
|
7795
|
+
var terminalHighlight = require_terminal_highlight();
|
|
7796
|
+
var fromOffsetCache = Symbol("fromOffsetCache");
|
|
7797
|
+
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
7798
|
+
var pathAvailable = Boolean(resolve && isAbsolute);
|
|
7799
|
+
var Input = class {
|
|
7800
|
+
constructor(css, opts = {}) {
|
|
7801
|
+
if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
|
|
7802
|
+
throw new Error(`PostCSS received ${css} instead of CSS string`);
|
|
7876
7803
|
}
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
for (let node of nodes)
|
|
7884
|
-
this.proxyOf.nodes.push(node);
|
|
7804
|
+
this.css = css.toString();
|
|
7805
|
+
if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") {
|
|
7806
|
+
this.hasBOM = true;
|
|
7807
|
+
this.css = this.css.slice(1);
|
|
7808
|
+
} else {
|
|
7809
|
+
this.hasBOM = false;
|
|
7885
7810
|
}
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
for (let node of this.nodes)
|
|
7893
|
-
node.cleanRaws(keepBetween);
|
|
7811
|
+
if (opts.from) {
|
|
7812
|
+
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
|
|
7813
|
+
this.file = opts.from;
|
|
7814
|
+
} else {
|
|
7815
|
+
this.file = resolve(opts.from);
|
|
7816
|
+
}
|
|
7894
7817
|
}
|
|
7818
|
+
if (pathAvailable && sourceMapAvailable) {
|
|
7819
|
+
let map = new PreviousMap(this.css, opts);
|
|
7820
|
+
if (map.text) {
|
|
7821
|
+
this.map = map;
|
|
7822
|
+
let file = map.consumer().file;
|
|
7823
|
+
if (!this.file && file)
|
|
7824
|
+
this.file = this.mapResolve(file);
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
if (!this.file) {
|
|
7828
|
+
this.id = "<input css " + nanoid(6) + ">";
|
|
7829
|
+
}
|
|
7830
|
+
if (this.map)
|
|
7831
|
+
this.map.file = this.from;
|
|
7895
7832
|
}
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7833
|
+
error(message, line, column, opts = {}) {
|
|
7834
|
+
let endColumn, endLine, result;
|
|
7835
|
+
if (line && typeof line === "object") {
|
|
7836
|
+
let start = line;
|
|
7837
|
+
let end = column;
|
|
7838
|
+
if (typeof start.offset === "number") {
|
|
7839
|
+
let pos = this.fromOffset(start.offset);
|
|
7840
|
+
line = pos.line;
|
|
7841
|
+
column = pos.col;
|
|
7842
|
+
} else {
|
|
7843
|
+
line = start.line;
|
|
7844
|
+
column = start.column;
|
|
7845
|
+
}
|
|
7846
|
+
if (typeof end.offset === "number") {
|
|
7847
|
+
let pos = this.fromOffset(end.offset);
|
|
7848
|
+
endLine = pos.line;
|
|
7849
|
+
endColumn = pos.col;
|
|
7850
|
+
} else {
|
|
7851
|
+
endLine = end.line;
|
|
7852
|
+
endColumn = end.column;
|
|
7853
|
+
}
|
|
7854
|
+
} else if (!column) {
|
|
7855
|
+
let pos = this.fromOffset(line);
|
|
7856
|
+
line = pos.line;
|
|
7857
|
+
column = pos.col;
|
|
7858
|
+
}
|
|
7859
|
+
let origin = this.origin(line, column, endLine, endColumn);
|
|
7860
|
+
if (origin) {
|
|
7861
|
+
result = new CssSyntaxError(
|
|
7862
|
+
message,
|
|
7863
|
+
origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
|
|
7864
|
+
origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
|
|
7865
|
+
origin.source,
|
|
7866
|
+
origin.file,
|
|
7867
|
+
opts.plugin
|
|
7868
|
+
);
|
|
7869
|
+
} else {
|
|
7870
|
+
result = new CssSyntaxError(
|
|
7871
|
+
message,
|
|
7872
|
+
endLine === void 0 ? line : { column, line },
|
|
7873
|
+
endLine === void 0 ? column : { column: endColumn, line: endLine },
|
|
7874
|
+
this.css,
|
|
7875
|
+
this.file,
|
|
7876
|
+
opts.plugin
|
|
7877
|
+
);
|
|
7878
|
+
}
|
|
7879
|
+
result.input = { column, endColumn, endLine, line, source: this.css };
|
|
7880
|
+
if (this.file) {
|
|
7881
|
+
if (pathToFileURL) {
|
|
7882
|
+
result.input.url = pathToFileURL(this.file).toString();
|
|
7883
|
+
}
|
|
7884
|
+
result.input.file = this.file;
|
|
7907
7885
|
}
|
|
7908
|
-
delete this.indexes[iterator];
|
|
7909
7886
|
return result;
|
|
7910
7887
|
}
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
return i;
|
|
7939
|
-
}
|
|
7940
|
-
})
|
|
7941
|
-
);
|
|
7942
|
-
};
|
|
7943
|
-
} else if (prop === "every" || prop === "some") {
|
|
7944
|
-
return (cb) => {
|
|
7945
|
-
return node[prop](
|
|
7946
|
-
(child, ...other) => cb(child.toProxy(), ...other)
|
|
7947
|
-
);
|
|
7948
|
-
};
|
|
7949
|
-
} else if (prop === "root") {
|
|
7950
|
-
return () => node.root().toProxy();
|
|
7951
|
-
} else if (prop === "nodes") {
|
|
7952
|
-
return node.nodes.map((i) => i.toProxy());
|
|
7953
|
-
} else if (prop === "first" || prop === "last") {
|
|
7954
|
-
return node[prop].toProxy();
|
|
7888
|
+
fromOffset(offset) {
|
|
7889
|
+
let lastLine, lineToIndex;
|
|
7890
|
+
if (!this[fromOffsetCache]) {
|
|
7891
|
+
let lines = this.css.split("\n");
|
|
7892
|
+
lineToIndex = new Array(lines.length);
|
|
7893
|
+
let prevIndex = 0;
|
|
7894
|
+
for (let i = 0, l = lines.length; i < l; i++) {
|
|
7895
|
+
lineToIndex[i] = prevIndex;
|
|
7896
|
+
prevIndex += lines[i].length + 1;
|
|
7897
|
+
}
|
|
7898
|
+
this[fromOffsetCache] = lineToIndex;
|
|
7899
|
+
} else {
|
|
7900
|
+
lineToIndex = this[fromOffsetCache];
|
|
7901
|
+
}
|
|
7902
|
+
lastLine = lineToIndex[lineToIndex.length - 1];
|
|
7903
|
+
let min = 0;
|
|
7904
|
+
if (offset >= lastLine) {
|
|
7905
|
+
min = lineToIndex.length - 1;
|
|
7906
|
+
} else {
|
|
7907
|
+
let max = lineToIndex.length - 2;
|
|
7908
|
+
let mid;
|
|
7909
|
+
while (min < max) {
|
|
7910
|
+
mid = min + (max - min >> 1);
|
|
7911
|
+
if (offset < lineToIndex[mid]) {
|
|
7912
|
+
max = mid - 1;
|
|
7913
|
+
} else if (offset >= lineToIndex[mid + 1]) {
|
|
7914
|
+
min = mid + 1;
|
|
7955
7915
|
} else {
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
},
|
|
7959
|
-
set(node, prop, value) {
|
|
7960
|
-
if (node[prop] === value)
|
|
7961
|
-
return true;
|
|
7962
|
-
node[prop] = value;
|
|
7963
|
-
if (prop === "name" || prop === "params" || prop === "selector") {
|
|
7964
|
-
node.markDirty();
|
|
7916
|
+
min = mid;
|
|
7917
|
+
break;
|
|
7965
7918
|
}
|
|
7966
|
-
return true;
|
|
7967
7919
|
}
|
|
7920
|
+
}
|
|
7921
|
+
return {
|
|
7922
|
+
col: offset - lineToIndex[min] + 1,
|
|
7923
|
+
line: min + 1
|
|
7968
7924
|
};
|
|
7969
7925
|
}
|
|
7970
|
-
|
|
7971
|
-
if (
|
|
7972
|
-
return
|
|
7973
|
-
if (child.proxyOf)
|
|
7974
|
-
child = child.proxyOf;
|
|
7975
|
-
return this.proxyOf.nodes.indexOf(child);
|
|
7976
|
-
}
|
|
7977
|
-
insertAfter(exist, add) {
|
|
7978
|
-
let existIndex = this.index(exist);
|
|
7979
|
-
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
|
|
7980
|
-
existIndex = this.index(exist);
|
|
7981
|
-
for (let node of nodes)
|
|
7982
|
-
this.proxyOf.nodes.splice(existIndex + 1, 0, node);
|
|
7983
|
-
let index;
|
|
7984
|
-
for (let id in this.indexes) {
|
|
7985
|
-
index = this.indexes[id];
|
|
7986
|
-
if (existIndex < index) {
|
|
7987
|
-
this.indexes[id] = index + nodes.length;
|
|
7988
|
-
}
|
|
7926
|
+
mapResolve(file) {
|
|
7927
|
+
if (/^\w+:\/\//.test(file)) {
|
|
7928
|
+
return file;
|
|
7989
7929
|
}
|
|
7990
|
-
this.
|
|
7991
|
-
return this;
|
|
7930
|
+
return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
|
|
7992
7931
|
}
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
let
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
let
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
7932
|
+
origin(line, column, endLine, endColumn) {
|
|
7933
|
+
if (!this.map)
|
|
7934
|
+
return false;
|
|
7935
|
+
let consumer = this.map.consumer();
|
|
7936
|
+
let from = consumer.originalPositionFor({ column, line });
|
|
7937
|
+
if (!from.source)
|
|
7938
|
+
return false;
|
|
7939
|
+
let to;
|
|
7940
|
+
if (typeof endLine === "number") {
|
|
7941
|
+
to = consumer.originalPositionFor({ column: endColumn, line: endLine });
|
|
7942
|
+
}
|
|
7943
|
+
let fromUrl;
|
|
7944
|
+
if (isAbsolute(from.source)) {
|
|
7945
|
+
fromUrl = pathToFileURL(from.source);
|
|
7946
|
+
} else {
|
|
7947
|
+
fromUrl = new URL(
|
|
7948
|
+
from.source,
|
|
7949
|
+
this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
|
|
7950
|
+
);
|
|
7951
|
+
}
|
|
7952
|
+
let result = {
|
|
7953
|
+
column: from.column,
|
|
7954
|
+
endColumn: to && to.column,
|
|
7955
|
+
endLine: to && to.line,
|
|
7956
|
+
line: from.line,
|
|
7957
|
+
url: fromUrl.toString()
|
|
7958
|
+
};
|
|
7959
|
+
if (fromUrl.protocol === "file:") {
|
|
7960
|
+
if (fileURLToPath) {
|
|
7961
|
+
result.file = fileURLToPath(fromUrl);
|
|
7962
|
+
} else {
|
|
7963
|
+
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
8009
7964
|
}
|
|
8010
7965
|
}
|
|
8011
|
-
|
|
8012
|
-
|
|
7966
|
+
let source = consumer.sourceContentFor(from.source);
|
|
7967
|
+
if (source)
|
|
7968
|
+
result.source = source;
|
|
7969
|
+
return result;
|
|
8013
7970
|
}
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
} else if (Array.isArray(nodes)) {
|
|
8020
|
-
nodes = nodes.slice(0);
|
|
8021
|
-
for (let i of nodes) {
|
|
8022
|
-
if (i.parent)
|
|
8023
|
-
i.parent.removeChild(i, "ignore");
|
|
8024
|
-
}
|
|
8025
|
-
} else if (nodes.type === "root" && this.type !== "document") {
|
|
8026
|
-
nodes = nodes.nodes.slice(0);
|
|
8027
|
-
for (let i of nodes) {
|
|
8028
|
-
if (i.parent)
|
|
8029
|
-
i.parent.removeChild(i, "ignore");
|
|
7971
|
+
toJSON() {
|
|
7972
|
+
let json = {};
|
|
7973
|
+
for (let name of ["hasBOM", "css", "file", "id"]) {
|
|
7974
|
+
if (this[name] != null) {
|
|
7975
|
+
json[name] = this[name];
|
|
8030
7976
|
}
|
|
8031
|
-
}
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
if (
|
|
8035
|
-
|
|
8036
|
-
} else if (typeof nodes.value !== "string") {
|
|
8037
|
-
nodes.value = String(nodes.value);
|
|
7977
|
+
}
|
|
7978
|
+
if (this.map) {
|
|
7979
|
+
json.map = __spreadValues({}, this.map);
|
|
7980
|
+
if (json.map.consumerCache) {
|
|
7981
|
+
json.map.consumerCache = void 0;
|
|
8038
7982
|
}
|
|
8039
|
-
nodes = [new Declaration(nodes)];
|
|
8040
|
-
} else if (nodes.selector || nodes.selectors) {
|
|
8041
|
-
nodes = [new Rule(nodes)];
|
|
8042
|
-
} else if (nodes.name) {
|
|
8043
|
-
nodes = [new AtRule(nodes)];
|
|
8044
|
-
} else if (nodes.text) {
|
|
8045
|
-
nodes = [new Comment(nodes)];
|
|
8046
|
-
} else {
|
|
8047
|
-
throw new Error("Unknown node type in node creation");
|
|
8048
7983
|
}
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
7984
|
+
return json;
|
|
7985
|
+
}
|
|
7986
|
+
get from() {
|
|
7987
|
+
return this.file || this.id;
|
|
7988
|
+
}
|
|
7989
|
+
};
|
|
7990
|
+
module.exports = Input;
|
|
7991
|
+
Input.default = Input;
|
|
7992
|
+
if (terminalHighlight && terminalHighlight.registerInput) {
|
|
7993
|
+
terminalHighlight.registerInput(Input);
|
|
7994
|
+
}
|
|
7995
|
+
}
|
|
7996
|
+
});
|
|
7997
|
+
|
|
7998
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/root.js
|
|
7999
|
+
var require_root = __commonJS({
|
|
8000
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/root.js"(exports, module) {
|
|
8001
|
+
"use strict";
|
|
8002
|
+
var Container = require_container();
|
|
8003
|
+
var LazyResult;
|
|
8004
|
+
var Processor;
|
|
8005
|
+
var Root = class extends Container {
|
|
8006
|
+
constructor(defaults) {
|
|
8007
|
+
super(defaults);
|
|
8008
|
+
this.type = "root";
|
|
8009
|
+
if (!this.nodes)
|
|
8010
|
+
this.nodes = [];
|
|
8011
|
+
}
|
|
8012
|
+
normalize(child, sample, type) {
|
|
8013
|
+
let nodes = super.normalize(child);
|
|
8014
|
+
if (sample) {
|
|
8015
|
+
if (type === "prepend") {
|
|
8016
|
+
if (this.nodes.length > 1) {
|
|
8017
|
+
sample.raws.before = this.nodes[1].raws.before;
|
|
8018
|
+
} else {
|
|
8019
|
+
delete sample.raws.before;
|
|
8020
|
+
}
|
|
8021
|
+
} else if (this.first !== sample) {
|
|
8022
|
+
for (let node of nodes) {
|
|
8023
|
+
node.raws.before = sample.raws.before;
|
|
8060
8024
|
}
|
|
8061
8025
|
}
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
});
|
|
8065
|
-
return processed;
|
|
8026
|
+
}
|
|
8027
|
+
return nodes;
|
|
8066
8028
|
}
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8029
|
+
removeChild(child, ignore) {
|
|
8030
|
+
let index = this.index(child);
|
|
8031
|
+
if (!ignore && index === 0 && this.nodes.length > 1) {
|
|
8032
|
+
this.nodes[1].raws.before = this.nodes[index].raws.before;
|
|
8033
|
+
}
|
|
8034
|
+
return super.removeChild(child);
|
|
8035
|
+
}
|
|
8036
|
+
toResult(opts = {}) {
|
|
8037
|
+
let lazy = new LazyResult(new Processor(), this, opts);
|
|
8038
|
+
return lazy.stringify();
|
|
8039
|
+
}
|
|
8040
|
+
};
|
|
8041
|
+
Root.registerLazyResult = (dependant) => {
|
|
8042
|
+
LazyResult = dependant;
|
|
8043
|
+
};
|
|
8044
|
+
Root.registerProcessor = (dependant) => {
|
|
8045
|
+
Processor = dependant;
|
|
8046
|
+
};
|
|
8047
|
+
module.exports = Root;
|
|
8048
|
+
Root.default = Root;
|
|
8049
|
+
Container.registerRoot(Root);
|
|
8050
|
+
}
|
|
8051
|
+
});
|
|
8052
|
+
|
|
8053
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/list.js
|
|
8054
|
+
var require_list = __commonJS({
|
|
8055
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/list.js"(exports, module) {
|
|
8056
|
+
"use strict";
|
|
8057
|
+
var list = {
|
|
8058
|
+
comma(string) {
|
|
8059
|
+
return list.split(string, [","], true);
|
|
8060
|
+
},
|
|
8061
|
+
space(string) {
|
|
8062
|
+
let spaces = [" ", "\n", " "];
|
|
8063
|
+
return list.split(string, spaces);
|
|
8064
|
+
},
|
|
8065
|
+
split(string, separators, last) {
|
|
8066
|
+
let array = [];
|
|
8067
|
+
let current = "";
|
|
8068
|
+
let split = false;
|
|
8069
|
+
let func = 0;
|
|
8070
|
+
let inQuote = false;
|
|
8071
|
+
let prevQuote = "";
|
|
8072
|
+
let escape = false;
|
|
8073
|
+
for (let letter of string) {
|
|
8074
|
+
if (escape) {
|
|
8075
|
+
escape = false;
|
|
8076
|
+
} else if (letter === "\\") {
|
|
8077
|
+
escape = true;
|
|
8078
|
+
} else if (inQuote) {
|
|
8079
|
+
if (letter === prevQuote) {
|
|
8080
|
+
inQuote = false;
|
|
8081
|
+
}
|
|
8082
|
+
} else if (letter === '"' || letter === "'") {
|
|
8083
|
+
inQuote = true;
|
|
8084
|
+
prevQuote = letter;
|
|
8085
|
+
} else if (letter === "(") {
|
|
8086
|
+
func += 1;
|
|
8087
|
+
} else if (letter === ")") {
|
|
8088
|
+
if (func > 0)
|
|
8089
|
+
func -= 1;
|
|
8090
|
+
} else if (func === 0) {
|
|
8091
|
+
if (separators.includes(letter))
|
|
8092
|
+
split = true;
|
|
8093
|
+
}
|
|
8094
|
+
if (split) {
|
|
8095
|
+
if (current !== "")
|
|
8096
|
+
array.push(current.trim());
|
|
8097
|
+
current = "";
|
|
8098
|
+
split = false;
|
|
8099
|
+
} else {
|
|
8100
|
+
current += letter;
|
|
8075
8101
|
}
|
|
8076
8102
|
}
|
|
8077
|
-
|
|
8078
|
-
|
|
8103
|
+
if (last || current !== "")
|
|
8104
|
+
array.push(current.trim());
|
|
8105
|
+
return array;
|
|
8079
8106
|
}
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8107
|
+
};
|
|
8108
|
+
module.exports = list;
|
|
8109
|
+
list.default = list;
|
|
8110
|
+
}
|
|
8111
|
+
});
|
|
8112
|
+
|
|
8113
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/rule.js
|
|
8114
|
+
var require_rule = __commonJS({
|
|
8115
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/rule.js"(exports, module) {
|
|
8116
|
+
"use strict";
|
|
8117
|
+
var Container = require_container();
|
|
8118
|
+
var list = require_list();
|
|
8119
|
+
var Rule = class extends Container {
|
|
8120
|
+
constructor(defaults) {
|
|
8121
|
+
super(defaults);
|
|
8122
|
+
this.type = "rule";
|
|
8123
|
+
if (!this.nodes)
|
|
8124
|
+
this.nodes = [];
|
|
8084
8125
|
}
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
node.parent = void 0;
|
|
8088
|
-
this.proxyOf.nodes = [];
|
|
8089
|
-
this.markDirty();
|
|
8090
|
-
return this;
|
|
8126
|
+
get selectors() {
|
|
8127
|
+
return list.comma(this.selector);
|
|
8091
8128
|
}
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
this.
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8129
|
+
set selectors(values) {
|
|
8130
|
+
let match = this.selector ? this.selector.match(/,\s*/) : null;
|
|
8131
|
+
let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
|
|
8132
|
+
this.selector = values.join(sep);
|
|
8133
|
+
}
|
|
8134
|
+
};
|
|
8135
|
+
module.exports = Rule;
|
|
8136
|
+
Rule.default = Rule;
|
|
8137
|
+
Container.registerRule(Rule);
|
|
8138
|
+
}
|
|
8139
|
+
});
|
|
8140
|
+
|
|
8141
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/fromJSON.js
|
|
8142
|
+
var require_fromJSON = __commonJS({
|
|
8143
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/fromJSON.js"(exports, module) {
|
|
8144
|
+
"use strict";
|
|
8145
|
+
var AtRule = require_at_rule();
|
|
8146
|
+
var Comment = require_comment();
|
|
8147
|
+
var Declaration = require_declaration();
|
|
8148
|
+
var Input = require_input();
|
|
8149
|
+
var PreviousMap = require_previous_map();
|
|
8150
|
+
var Root = require_root();
|
|
8151
|
+
var Rule = require_rule();
|
|
8152
|
+
function fromJSON(json, inputs) {
|
|
8153
|
+
if (Array.isArray(json))
|
|
8154
|
+
return json.map((n) => fromJSON(n));
|
|
8155
|
+
let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
|
|
8156
|
+
if (ownInputs) {
|
|
8157
|
+
inputs = [];
|
|
8158
|
+
for (let input of ownInputs) {
|
|
8159
|
+
let inputHydrated = __spreadProps(__spreadValues({}, input), { __proto__: Input.prototype });
|
|
8160
|
+
if (inputHydrated.map) {
|
|
8161
|
+
inputHydrated.map = __spreadProps(__spreadValues({}, inputHydrated.map), {
|
|
8162
|
+
__proto__: PreviousMap.prototype
|
|
8163
|
+
});
|
|
8101
8164
|
}
|
|
8165
|
+
inputs.push(inputHydrated);
|
|
8102
8166
|
}
|
|
8103
|
-
this.markDirty();
|
|
8104
|
-
return this;
|
|
8105
8167
|
}
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8168
|
+
if (defaults.nodes) {
|
|
8169
|
+
defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
|
|
8170
|
+
}
|
|
8171
|
+
if (defaults.source) {
|
|
8172
|
+
let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
|
|
8173
|
+
defaults.source = source;
|
|
8174
|
+
if (inputId != null) {
|
|
8175
|
+
defaults.source.input = inputs[inputId];
|
|
8110
8176
|
}
|
|
8111
|
-
this.walkDecls((decl) => {
|
|
8112
|
-
if (opts.props && !opts.props.includes(decl.prop))
|
|
8113
|
-
return;
|
|
8114
|
-
if (opts.fast && !decl.value.includes(opts.fast))
|
|
8115
|
-
return;
|
|
8116
|
-
decl.value = decl.value.replace(pattern, callback);
|
|
8117
|
-
});
|
|
8118
|
-
this.markDirty();
|
|
8119
|
-
return this;
|
|
8120
8177
|
}
|
|
8121
|
-
|
|
8122
|
-
return
|
|
8178
|
+
if (defaults.type === "root") {
|
|
8179
|
+
return new Root(defaults);
|
|
8180
|
+
} else if (defaults.type === "decl") {
|
|
8181
|
+
return new Declaration(defaults);
|
|
8182
|
+
} else if (defaults.type === "rule") {
|
|
8183
|
+
return new Rule(defaults);
|
|
8184
|
+
} else if (defaults.type === "comment") {
|
|
8185
|
+
return new Comment(defaults);
|
|
8186
|
+
} else if (defaults.type === "atrule") {
|
|
8187
|
+
return new AtRule(defaults);
|
|
8188
|
+
} else {
|
|
8189
|
+
throw new Error("Unknown node type: " + json.type);
|
|
8123
8190
|
}
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8191
|
+
}
|
|
8192
|
+
module.exports = fromJSON;
|
|
8193
|
+
fromJSON.default = fromJSON;
|
|
8194
|
+
}
|
|
8195
|
+
});
|
|
8196
|
+
|
|
8197
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/map-generator.js
|
|
8198
|
+
var require_map_generator = __commonJS({
|
|
8199
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/map-generator.js"(exports, module) {
|
|
8200
|
+
"use strict";
|
|
8201
|
+
var { dirname, relative, resolve, sep } = require_path();
|
|
8202
|
+
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
8203
|
+
var { pathToFileURL } = require_url();
|
|
8204
|
+
var Input = require_input();
|
|
8205
|
+
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
8206
|
+
var pathAvailable = Boolean(dirname && resolve && relative && sep);
|
|
8207
|
+
var MapGenerator = class {
|
|
8208
|
+
constructor(stringify, root, opts, cssString) {
|
|
8209
|
+
this.stringify = stringify;
|
|
8210
|
+
this.mapOpts = opts.map || {};
|
|
8211
|
+
this.root = root;
|
|
8212
|
+
this.opts = opts;
|
|
8213
|
+
this.css = cssString;
|
|
8214
|
+
this.originalCSS = cssString;
|
|
8215
|
+
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
|
|
8216
|
+
this.memoizedFileURLs = /* @__PURE__ */ new Map();
|
|
8217
|
+
this.memoizedPaths = /* @__PURE__ */ new Map();
|
|
8218
|
+
this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
8219
|
+
}
|
|
8220
|
+
addAnnotation() {
|
|
8221
|
+
let content;
|
|
8222
|
+
if (this.isInline()) {
|
|
8223
|
+
content = "data:application/json;base64," + this.toBase64(this.map.toString());
|
|
8224
|
+
} else if (typeof this.mapOpts.annotation === "string") {
|
|
8225
|
+
content = this.mapOpts.annotation;
|
|
8226
|
+
} else if (typeof this.mapOpts.annotation === "function") {
|
|
8227
|
+
content = this.mapOpts.annotation(this.opts.to, this.root);
|
|
8228
|
+
} else {
|
|
8229
|
+
content = this.outputFile() + ".map";
|
|
8230
|
+
}
|
|
8231
|
+
let eol = "\n";
|
|
8232
|
+
if (this.css.includes("\r\n"))
|
|
8233
|
+
eol = "\r\n";
|
|
8234
|
+
this.css += eol + "/*# sourceMappingURL=" + content + " */";
|
|
8235
|
+
}
|
|
8236
|
+
applyPrevMaps() {
|
|
8237
|
+
for (let prev of this.previous()) {
|
|
8238
|
+
let from = this.toUrl(this.path(prev.file));
|
|
8239
|
+
let root = prev.root || dirname(prev.file);
|
|
8240
|
+
let map;
|
|
8241
|
+
if (this.mapOpts.sourcesContent === false) {
|
|
8242
|
+
map = new SourceMapConsumer(prev.text);
|
|
8243
|
+
if (map.sourcesContent) {
|
|
8244
|
+
map.sourcesContent = null;
|
|
8245
|
+
}
|
|
8246
|
+
} else {
|
|
8247
|
+
map = prev.consumer();
|
|
8134
8248
|
}
|
|
8135
|
-
|
|
8136
|
-
}
|
|
8249
|
+
this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
|
|
8250
|
+
}
|
|
8137
8251
|
}
|
|
8138
|
-
|
|
8139
|
-
if (
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8252
|
+
clearAnnotation() {
|
|
8253
|
+
if (this.mapOpts.annotation === false)
|
|
8254
|
+
return;
|
|
8255
|
+
if (this.root) {
|
|
8256
|
+
let node;
|
|
8257
|
+
for (let i = this.root.nodes.length - 1; i >= 0; i--) {
|
|
8258
|
+
node = this.root.nodes[i];
|
|
8259
|
+
if (node.type !== "comment")
|
|
8260
|
+
continue;
|
|
8261
|
+
if (node.text.startsWith("# sourceMappingURL=")) {
|
|
8262
|
+
this.root.removeChild(i);
|
|
8144
8263
|
}
|
|
8264
|
+
}
|
|
8265
|
+
} else if (this.css) {
|
|
8266
|
+
this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, "");
|
|
8267
|
+
}
|
|
8268
|
+
}
|
|
8269
|
+
generate() {
|
|
8270
|
+
this.clearAnnotation();
|
|
8271
|
+
if (pathAvailable && sourceMapAvailable && this.isMap()) {
|
|
8272
|
+
return this.generateMap();
|
|
8273
|
+
} else {
|
|
8274
|
+
let result = "";
|
|
8275
|
+
this.stringify(this.root, (i) => {
|
|
8276
|
+
result += i;
|
|
8145
8277
|
});
|
|
8278
|
+
return [result];
|
|
8146
8279
|
}
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8280
|
+
}
|
|
8281
|
+
generateMap() {
|
|
8282
|
+
if (this.root) {
|
|
8283
|
+
this.generateString();
|
|
8284
|
+
} else if (this.previous().length === 1) {
|
|
8285
|
+
let prev = this.previous()[0].consumer();
|
|
8286
|
+
prev.file = this.outputFile();
|
|
8287
|
+
this.map = SourceMapGenerator.fromSourceMap(prev, {
|
|
8288
|
+
ignoreInvalidMapping: true
|
|
8289
|
+
});
|
|
8290
|
+
} else {
|
|
8291
|
+
this.map = new SourceMapGenerator({
|
|
8292
|
+
file: this.outputFile(),
|
|
8293
|
+
ignoreInvalidMapping: true
|
|
8152
8294
|
});
|
|
8295
|
+
this.map.addMapping({
|
|
8296
|
+
generated: { column: 0, line: 1 },
|
|
8297
|
+
original: { column: 0, line: 1 },
|
|
8298
|
+
source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
|
|
8299
|
+
});
|
|
8300
|
+
}
|
|
8301
|
+
if (this.isSourcesContent())
|
|
8302
|
+
this.setSourcesContent();
|
|
8303
|
+
if (this.root && this.previous().length > 0)
|
|
8304
|
+
this.applyPrevMaps();
|
|
8305
|
+
if (this.isAnnotation())
|
|
8306
|
+
this.addAnnotation();
|
|
8307
|
+
if (this.isInline()) {
|
|
8308
|
+
return [this.css];
|
|
8309
|
+
} else {
|
|
8310
|
+
return [this.css, this.map];
|
|
8153
8311
|
}
|
|
8154
|
-
return this.walk((child, i) => {
|
|
8155
|
-
if (child.type === "atrule" && child.name === name) {
|
|
8156
|
-
return callback(child, i);
|
|
8157
|
-
}
|
|
8158
|
-
});
|
|
8159
8312
|
}
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8313
|
+
generateString() {
|
|
8314
|
+
this.css = "";
|
|
8315
|
+
this.map = new SourceMapGenerator({
|
|
8316
|
+
file: this.outputFile(),
|
|
8317
|
+
ignoreInvalidMapping: true
|
|
8165
8318
|
});
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8319
|
+
let line = 1;
|
|
8320
|
+
let column = 1;
|
|
8321
|
+
let noSource = "<no source>";
|
|
8322
|
+
let mapping = {
|
|
8323
|
+
generated: { column: 0, line: 0 },
|
|
8324
|
+
original: { column: 0, line: 0 },
|
|
8325
|
+
source: ""
|
|
8326
|
+
};
|
|
8327
|
+
let last, lines;
|
|
8328
|
+
this.stringify(this.root, (str, node, type) => {
|
|
8329
|
+
this.css += str;
|
|
8330
|
+
if (node && type !== "end") {
|
|
8331
|
+
mapping.generated.line = line;
|
|
8332
|
+
mapping.generated.column = column - 1;
|
|
8333
|
+
if (node.source && node.source.start) {
|
|
8334
|
+
mapping.source = this.sourcePath(node);
|
|
8335
|
+
mapping.original.line = node.source.start.line;
|
|
8336
|
+
mapping.original.column = node.source.start.column - 1;
|
|
8337
|
+
this.map.addMapping(mapping);
|
|
8338
|
+
} else {
|
|
8339
|
+
mapping.source = noSource;
|
|
8340
|
+
mapping.original.line = 1;
|
|
8341
|
+
mapping.original.column = 0;
|
|
8342
|
+
this.map.addMapping(mapping);
|
|
8173
8343
|
}
|
|
8174
|
-
}
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8344
|
+
}
|
|
8345
|
+
lines = str.match(/\n/g);
|
|
8346
|
+
if (lines) {
|
|
8347
|
+
line += lines.length;
|
|
8348
|
+
last = str.lastIndexOf("\n");
|
|
8349
|
+
column = str.length - last;
|
|
8350
|
+
} else {
|
|
8351
|
+
column += str.length;
|
|
8352
|
+
}
|
|
8353
|
+
if (node && type !== "start") {
|
|
8354
|
+
let p = node.parent || { raws: {} };
|
|
8355
|
+
let childless = node.type === "decl" || node.type === "atrule" && !node.nodes;
|
|
8356
|
+
if (!childless || node !== p.last || p.raws.semicolon) {
|
|
8357
|
+
if (node.source && node.source.end) {
|
|
8358
|
+
mapping.source = this.sourcePath(node);
|
|
8359
|
+
mapping.original.line = node.source.end.line;
|
|
8360
|
+
mapping.original.column = node.source.end.column - 1;
|
|
8361
|
+
mapping.generated.line = line;
|
|
8362
|
+
mapping.generated.column = column - 2;
|
|
8363
|
+
this.map.addMapping(mapping);
|
|
8364
|
+
} else {
|
|
8365
|
+
mapping.source = noSource;
|
|
8366
|
+
mapping.original.line = 1;
|
|
8367
|
+
mapping.original.column = 0;
|
|
8368
|
+
mapping.generated.line = line;
|
|
8369
|
+
mapping.generated.column = column - 1;
|
|
8370
|
+
this.map.addMapping(mapping);
|
|
8371
|
+
}
|
|
8180
8372
|
}
|
|
8181
|
-
});
|
|
8182
|
-
}
|
|
8183
|
-
return this.walk((child, i) => {
|
|
8184
|
-
if (child.type === "decl" && child.prop === prop) {
|
|
8185
|
-
return callback(child, i);
|
|
8186
8373
|
}
|
|
8187
8374
|
});
|
|
8188
8375
|
}
|
|
8189
|
-
|
|
8190
|
-
if (
|
|
8191
|
-
|
|
8192
|
-
return this.walk((child, i) => {
|
|
8193
|
-
if (child.type === "rule") {
|
|
8194
|
-
return callback(child, i);
|
|
8195
|
-
}
|
|
8196
|
-
});
|
|
8376
|
+
isAnnotation() {
|
|
8377
|
+
if (this.isInline()) {
|
|
8378
|
+
return true;
|
|
8197
8379
|
}
|
|
8198
|
-
if (
|
|
8199
|
-
return this.
|
|
8200
|
-
if (child.type === "rule" && selector.test(child.selector)) {
|
|
8201
|
-
return callback(child, i);
|
|
8202
|
-
}
|
|
8203
|
-
});
|
|
8380
|
+
if (typeof this.mapOpts.annotation !== "undefined") {
|
|
8381
|
+
return this.mapOpts.annotation;
|
|
8204
8382
|
}
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
});
|
|
8210
|
-
}
|
|
8211
|
-
get first() {
|
|
8212
|
-
if (!this.proxyOf.nodes)
|
|
8213
|
-
return void 0;
|
|
8214
|
-
return this.proxyOf.nodes[0];
|
|
8215
|
-
}
|
|
8216
|
-
get last() {
|
|
8217
|
-
if (!this.proxyOf.nodes)
|
|
8218
|
-
return void 0;
|
|
8219
|
-
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
8220
|
-
}
|
|
8221
|
-
};
|
|
8222
|
-
Container.registerParse = (dependant) => {
|
|
8223
|
-
parse = dependant;
|
|
8224
|
-
};
|
|
8225
|
-
Container.registerRule = (dependant) => {
|
|
8226
|
-
Rule = dependant;
|
|
8227
|
-
};
|
|
8228
|
-
Container.registerAtRule = (dependant) => {
|
|
8229
|
-
AtRule = dependant;
|
|
8230
|
-
};
|
|
8231
|
-
Container.registerRoot = (dependant) => {
|
|
8232
|
-
Root = dependant;
|
|
8233
|
-
};
|
|
8234
|
-
module.exports = Container;
|
|
8235
|
-
Container.default = Container;
|
|
8236
|
-
Container.rebuild = (node) => {
|
|
8237
|
-
if (node.type === "atrule") {
|
|
8238
|
-
Object.setPrototypeOf(node, AtRule.prototype);
|
|
8239
|
-
} else if (node.type === "rule") {
|
|
8240
|
-
Object.setPrototypeOf(node, Rule.prototype);
|
|
8241
|
-
} else if (node.type === "decl") {
|
|
8242
|
-
Object.setPrototypeOf(node, Declaration.prototype);
|
|
8243
|
-
} else if (node.type === "comment") {
|
|
8244
|
-
Object.setPrototypeOf(node, Comment.prototype);
|
|
8245
|
-
} else if (node.type === "root") {
|
|
8246
|
-
Object.setPrototypeOf(node, Root.prototype);
|
|
8383
|
+
if (this.previous().length) {
|
|
8384
|
+
return this.previous().some((i) => i.annotation);
|
|
8385
|
+
}
|
|
8386
|
+
return true;
|
|
8247
8387
|
}
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8388
|
+
isInline() {
|
|
8389
|
+
if (typeof this.mapOpts.inline !== "undefined") {
|
|
8390
|
+
return this.mapOpts.inline;
|
|
8391
|
+
}
|
|
8392
|
+
let annotation = this.mapOpts.annotation;
|
|
8393
|
+
if (typeof annotation !== "undefined" && annotation !== true) {
|
|
8394
|
+
return false;
|
|
8395
|
+
}
|
|
8396
|
+
if (this.previous().length) {
|
|
8397
|
+
return this.previous().some((i) => i.inline);
|
|
8398
|
+
}
|
|
8399
|
+
return true;
|
|
8253
8400
|
}
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
// external/npm/node_modules/postcss/lib/document.js
|
|
8259
|
-
var require_document = __commonJS({
|
|
8260
|
-
"external/npm/node_modules/postcss/lib/document.js"(exports, module) {
|
|
8261
|
-
"use strict";
|
|
8262
|
-
var Container = require_container();
|
|
8263
|
-
var LazyResult;
|
|
8264
|
-
var Processor;
|
|
8265
|
-
var Document = class extends Container {
|
|
8266
|
-
constructor(defaults) {
|
|
8267
|
-
super(__spreadValues({ type: "document" }, defaults));
|
|
8268
|
-
if (!this.nodes) {
|
|
8269
|
-
this.nodes = [];
|
|
8401
|
+
isMap() {
|
|
8402
|
+
if (typeof this.opts.map !== "undefined") {
|
|
8403
|
+
return !!this.opts.map;
|
|
8270
8404
|
}
|
|
8405
|
+
return this.previous().length > 0;
|
|
8271
8406
|
}
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8407
|
+
isSourcesContent() {
|
|
8408
|
+
if (typeof this.mapOpts.sourcesContent !== "undefined") {
|
|
8409
|
+
return this.mapOpts.sourcesContent;
|
|
8410
|
+
}
|
|
8411
|
+
if (this.previous().length) {
|
|
8412
|
+
return this.previous().some((i) => i.withContent());
|
|
8413
|
+
}
|
|
8414
|
+
return true;
|
|
8275
8415
|
}
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
Document.default = Document;
|
|
8285
|
-
}
|
|
8286
|
-
});
|
|
8287
|
-
|
|
8288
|
-
// external/npm/node_modules/postcss/lib/warn-once.js
|
|
8289
|
-
var require_warn_once = __commonJS({
|
|
8290
|
-
"external/npm/node_modules/postcss/lib/warn-once.js"(exports, module) {
|
|
8291
|
-
"use strict";
|
|
8292
|
-
var printed = {};
|
|
8293
|
-
module.exports = function warnOnce(message) {
|
|
8294
|
-
if (printed[message])
|
|
8295
|
-
return;
|
|
8296
|
-
printed[message] = true;
|
|
8297
|
-
if (typeof console !== "undefined" && console.warn) {
|
|
8298
|
-
console.warn(message);
|
|
8416
|
+
outputFile() {
|
|
8417
|
+
if (this.opts.to) {
|
|
8418
|
+
return this.path(this.opts.to);
|
|
8419
|
+
} else if (this.opts.from) {
|
|
8420
|
+
return this.path(this.opts.from);
|
|
8421
|
+
} else {
|
|
8422
|
+
return "to.css";
|
|
8423
|
+
}
|
|
8299
8424
|
}
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
this.
|
|
8311
|
-
this.
|
|
8312
|
-
|
|
8313
|
-
let range = opts.node.rangeBy(opts);
|
|
8314
|
-
this.line = range.start.line;
|
|
8315
|
-
this.column = range.start.column;
|
|
8316
|
-
this.endLine = range.end.line;
|
|
8317
|
-
this.endColumn = range.end.column;
|
|
8425
|
+
path(file) {
|
|
8426
|
+
if (this.mapOpts.absolute)
|
|
8427
|
+
return file;
|
|
8428
|
+
if (file.charCodeAt(0) === 60)
|
|
8429
|
+
return file;
|
|
8430
|
+
if (/^\w+:\/\//.test(file))
|
|
8431
|
+
return file;
|
|
8432
|
+
let cached = this.memoizedPaths.get(file);
|
|
8433
|
+
if (cached)
|
|
8434
|
+
return cached;
|
|
8435
|
+
let from = this.opts.to ? dirname(this.opts.to) : ".";
|
|
8436
|
+
if (typeof this.mapOpts.annotation === "string") {
|
|
8437
|
+
from = dirname(resolve(from, this.mapOpts.annotation));
|
|
8318
8438
|
}
|
|
8319
|
-
|
|
8320
|
-
|
|
8439
|
+
let path = relative(from, file);
|
|
8440
|
+
this.memoizedPaths.set(file, path);
|
|
8441
|
+
return path;
|
|
8321
8442
|
}
|
|
8322
|
-
|
|
8323
|
-
if (this.
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8443
|
+
previous() {
|
|
8444
|
+
if (!this.previousMaps) {
|
|
8445
|
+
this.previousMaps = [];
|
|
8446
|
+
if (this.root) {
|
|
8447
|
+
this.root.walk((node) => {
|
|
8448
|
+
if (node.source && node.source.input.map) {
|
|
8449
|
+
let map = node.source.input.map;
|
|
8450
|
+
if (!this.previousMaps.includes(map)) {
|
|
8451
|
+
this.previousMaps.push(map);
|
|
8452
|
+
}
|
|
8453
|
+
}
|
|
8454
|
+
});
|
|
8455
|
+
} else {
|
|
8456
|
+
let input = new Input(this.originalCSS, this.opts);
|
|
8457
|
+
if (input.map)
|
|
8458
|
+
this.previousMaps.push(input.map);
|
|
8459
|
+
}
|
|
8332
8460
|
}
|
|
8333
|
-
return this.
|
|
8461
|
+
return this.previousMaps;
|
|
8334
8462
|
}
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
this.
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
this.css = void 0;
|
|
8353
|
-
this.map = void 0;
|
|
8463
|
+
setSourcesContent() {
|
|
8464
|
+
let already = {};
|
|
8465
|
+
if (this.root) {
|
|
8466
|
+
this.root.walk((node) => {
|
|
8467
|
+
if (node.source) {
|
|
8468
|
+
let from = node.source.input.from;
|
|
8469
|
+
if (from && !already[from]) {
|
|
8470
|
+
already[from] = true;
|
|
8471
|
+
let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
|
|
8472
|
+
this.map.setSourceContent(fromUrl, node.source.input.css);
|
|
8473
|
+
}
|
|
8474
|
+
}
|
|
8475
|
+
});
|
|
8476
|
+
} else if (this.css) {
|
|
8477
|
+
let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
|
|
8478
|
+
this.map.setSourceContent(from, this.css);
|
|
8479
|
+
}
|
|
8354
8480
|
}
|
|
8355
|
-
|
|
8356
|
-
|
|
8481
|
+
sourcePath(node) {
|
|
8482
|
+
if (this.mapOpts.from) {
|
|
8483
|
+
return this.toUrl(this.mapOpts.from);
|
|
8484
|
+
} else if (this.usesFileUrls) {
|
|
8485
|
+
return this.toFileUrl(node.source.input.from);
|
|
8486
|
+
} else {
|
|
8487
|
+
return this.toUrl(this.path(node.source.input.from));
|
|
8488
|
+
}
|
|
8357
8489
|
}
|
|
8358
|
-
|
|
8359
|
-
if (
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8490
|
+
toBase64(str) {
|
|
8491
|
+
if (Buffer) {
|
|
8492
|
+
return Buffer.from(str).toString("base64");
|
|
8493
|
+
} else {
|
|
8494
|
+
return window.btoa(unescape(encodeURIComponent(str)));
|
|
8363
8495
|
}
|
|
8364
|
-
let warning = new Warning(text, opts);
|
|
8365
|
-
this.messages.push(warning);
|
|
8366
|
-
return warning;
|
|
8367
8496
|
}
|
|
8368
|
-
|
|
8369
|
-
|
|
8497
|
+
toFileUrl(path) {
|
|
8498
|
+
let cached = this.memoizedFileURLs.get(path);
|
|
8499
|
+
if (cached)
|
|
8500
|
+
return cached;
|
|
8501
|
+
if (pathToFileURL) {
|
|
8502
|
+
let fileURL = pathToFileURL(path).toString();
|
|
8503
|
+
this.memoizedFileURLs.set(path, fileURL);
|
|
8504
|
+
return fileURL;
|
|
8505
|
+
} else {
|
|
8506
|
+
throw new Error(
|
|
8507
|
+
"`map.absolute` option is not available in this PostCSS build"
|
|
8508
|
+
);
|
|
8509
|
+
}
|
|
8370
8510
|
}
|
|
8371
|
-
|
|
8372
|
-
|
|
8511
|
+
toUrl(path) {
|
|
8512
|
+
let cached = this.memoizedURLs.get(path);
|
|
8513
|
+
if (cached)
|
|
8514
|
+
return cached;
|
|
8515
|
+
if (sep === "\\") {
|
|
8516
|
+
path = path.replace(/\\/g, "/");
|
|
8517
|
+
}
|
|
8518
|
+
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
|
|
8519
|
+
this.memoizedURLs.set(path, url);
|
|
8520
|
+
return url;
|
|
8373
8521
|
}
|
|
8374
8522
|
};
|
|
8375
|
-
module.exports =
|
|
8376
|
-
Result.default = Result;
|
|
8523
|
+
module.exports = MapGenerator;
|
|
8377
8524
|
}
|
|
8378
8525
|
});
|
|
8379
8526
|
|
|
8380
|
-
// external/npm/node_modules/postcss/lib/tokenize.js
|
|
8527
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/tokenize.js
|
|
8381
8528
|
var require_tokenize = __commonJS({
|
|
8382
|
-
"external/npm/node_modules/postcss/lib/tokenize.js"(exports, module) {
|
|
8529
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/tokenize.js"(exports, module) {
|
|
8383
8530
|
"use strict";
|
|
8384
8531
|
var SINGLE_QUOTE = "'".charCodeAt(0);
|
|
8385
8532
|
var DOUBLE_QUOTE = '"'.charCodeAt(0);
|
|
@@ -8407,8 +8554,8 @@ var require_tokenize = __commonJS({
|
|
|
8407
8554
|
module.exports = function tokenizer(input, options = {}) {
|
|
8408
8555
|
let css = input.css.valueOf();
|
|
8409
8556
|
let ignore = options.ignoreErrors;
|
|
8410
|
-
let code,
|
|
8411
|
-
let escaped, escapePos,
|
|
8557
|
+
let code, content, escape, next, quote;
|
|
8558
|
+
let currentToken, escaped, escapePos, n, prev;
|
|
8412
8559
|
let length = css.length;
|
|
8413
8560
|
let pos = 0;
|
|
8414
8561
|
let buffer = [];
|
|
@@ -8568,212 +8715,42 @@ var require_tokenize = __commonJS({
|
|
|
8568
8715
|
RE_WORD_END.test(css);
|
|
8569
8716
|
if (RE_WORD_END.lastIndex === 0) {
|
|
8570
8717
|
next = css.length - 1;
|
|
8571
|
-
} else {
|
|
8572
|
-
next = RE_WORD_END.lastIndex - 2;
|
|
8573
|
-
}
|
|
8574
|
-
currentToken = ["word", css.slice(pos, next + 1), pos, next];
|
|
8575
|
-
buffer.push(currentToken);
|
|
8576
|
-
pos = next;
|
|
8577
|
-
}
|
|
8578
|
-
break;
|
|
8579
|
-
}
|
|
8580
|
-
}
|
|
8581
|
-
pos++;
|
|
8582
|
-
return currentToken;
|
|
8583
|
-
}
|
|
8584
|
-
function back(token) {
|
|
8585
|
-
returned.push(token);
|
|
8586
|
-
}
|
|
8587
|
-
return {
|
|
8588
|
-
back,
|
|
8589
|
-
endOfFile,
|
|
8590
|
-
nextToken,
|
|
8591
|
-
position
|
|
8592
|
-
};
|
|
8593
|
-
};
|
|
8594
|
-
}
|
|
8595
|
-
});
|
|
8596
|
-
|
|
8597
|
-
// external/npm/node_modules/postcss/lib/at-rule.js
|
|
8598
|
-
var require_at_rule = __commonJS({
|
|
8599
|
-
"external/npm/node_modules/postcss/lib/at-rule.js"(exports, module) {
|
|
8600
|
-
"use strict";
|
|
8601
|
-
var Container = require_container();
|
|
8602
|
-
var AtRule = class extends Container {
|
|
8603
|
-
constructor(defaults) {
|
|
8604
|
-
super(defaults);
|
|
8605
|
-
this.type = "atrule";
|
|
8606
|
-
}
|
|
8607
|
-
append(...children) {
|
|
8608
|
-
if (!this.proxyOf.nodes)
|
|
8609
|
-
this.nodes = [];
|
|
8610
|
-
return super.append(...children);
|
|
8611
|
-
}
|
|
8612
|
-
prepend(...children) {
|
|
8613
|
-
if (!this.proxyOf.nodes)
|
|
8614
|
-
this.nodes = [];
|
|
8615
|
-
return super.prepend(...children);
|
|
8616
|
-
}
|
|
8617
|
-
};
|
|
8618
|
-
module.exports = AtRule;
|
|
8619
|
-
AtRule.default = AtRule;
|
|
8620
|
-
Container.registerAtRule(AtRule);
|
|
8621
|
-
}
|
|
8622
|
-
});
|
|
8623
|
-
|
|
8624
|
-
// external/npm/node_modules/postcss/lib/root.js
|
|
8625
|
-
var require_root = __commonJS({
|
|
8626
|
-
"external/npm/node_modules/postcss/lib/root.js"(exports, module) {
|
|
8627
|
-
"use strict";
|
|
8628
|
-
var Container = require_container();
|
|
8629
|
-
var LazyResult;
|
|
8630
|
-
var Processor;
|
|
8631
|
-
var Root = class extends Container {
|
|
8632
|
-
constructor(defaults) {
|
|
8633
|
-
super(defaults);
|
|
8634
|
-
this.type = "root";
|
|
8635
|
-
if (!this.nodes)
|
|
8636
|
-
this.nodes = [];
|
|
8637
|
-
}
|
|
8638
|
-
normalize(child, sample, type) {
|
|
8639
|
-
let nodes = super.normalize(child);
|
|
8640
|
-
if (sample) {
|
|
8641
|
-
if (type === "prepend") {
|
|
8642
|
-
if (this.nodes.length > 1) {
|
|
8643
|
-
sample.raws.before = this.nodes[1].raws.before;
|
|
8644
|
-
} else {
|
|
8645
|
-
delete sample.raws.before;
|
|
8646
|
-
}
|
|
8647
|
-
} else if (this.first !== sample) {
|
|
8648
|
-
for (let node of nodes) {
|
|
8649
|
-
node.raws.before = sample.raws.before;
|
|
8650
|
-
}
|
|
8651
|
-
}
|
|
8652
|
-
}
|
|
8653
|
-
return nodes;
|
|
8654
|
-
}
|
|
8655
|
-
removeChild(child, ignore) {
|
|
8656
|
-
let index = this.index(child);
|
|
8657
|
-
if (!ignore && index === 0 && this.nodes.length > 1) {
|
|
8658
|
-
this.nodes[1].raws.before = this.nodes[index].raws.before;
|
|
8659
|
-
}
|
|
8660
|
-
return super.removeChild(child);
|
|
8661
|
-
}
|
|
8662
|
-
toResult(opts = {}) {
|
|
8663
|
-
let lazy = new LazyResult(new Processor(), this, opts);
|
|
8664
|
-
return lazy.stringify();
|
|
8665
|
-
}
|
|
8666
|
-
};
|
|
8667
|
-
Root.registerLazyResult = (dependant) => {
|
|
8668
|
-
LazyResult = dependant;
|
|
8669
|
-
};
|
|
8670
|
-
Root.registerProcessor = (dependant) => {
|
|
8671
|
-
Processor = dependant;
|
|
8672
|
-
};
|
|
8673
|
-
module.exports = Root;
|
|
8674
|
-
Root.default = Root;
|
|
8675
|
-
Container.registerRoot(Root);
|
|
8676
|
-
}
|
|
8677
|
-
});
|
|
8678
|
-
|
|
8679
|
-
// external/npm/node_modules/postcss/lib/list.js
|
|
8680
|
-
var require_list = __commonJS({
|
|
8681
|
-
"external/npm/node_modules/postcss/lib/list.js"(exports, module) {
|
|
8682
|
-
"use strict";
|
|
8683
|
-
var list = {
|
|
8684
|
-
comma(string) {
|
|
8685
|
-
return list.split(string, [","], true);
|
|
8686
|
-
},
|
|
8687
|
-
space(string) {
|
|
8688
|
-
let spaces = [" ", "\n", " "];
|
|
8689
|
-
return list.split(string, spaces);
|
|
8690
|
-
},
|
|
8691
|
-
split(string, separators, last) {
|
|
8692
|
-
let array = [];
|
|
8693
|
-
let current = "";
|
|
8694
|
-
let split = false;
|
|
8695
|
-
let func = 0;
|
|
8696
|
-
let inQuote = false;
|
|
8697
|
-
let prevQuote = "";
|
|
8698
|
-
let escape = false;
|
|
8699
|
-
for (let letter of string) {
|
|
8700
|
-
if (escape) {
|
|
8701
|
-
escape = false;
|
|
8702
|
-
} else if (letter === "\\") {
|
|
8703
|
-
escape = true;
|
|
8704
|
-
} else if (inQuote) {
|
|
8705
|
-
if (letter === prevQuote) {
|
|
8706
|
-
inQuote = false;
|
|
8718
|
+
} else {
|
|
8719
|
+
next = RE_WORD_END.lastIndex - 2;
|
|
8720
|
+
}
|
|
8721
|
+
currentToken = ["word", css.slice(pos, next + 1), pos, next];
|
|
8722
|
+
buffer.push(currentToken);
|
|
8723
|
+
pos = next;
|
|
8707
8724
|
}
|
|
8708
|
-
|
|
8709
|
-
inQuote = true;
|
|
8710
|
-
prevQuote = letter;
|
|
8711
|
-
} else if (letter === "(") {
|
|
8712
|
-
func += 1;
|
|
8713
|
-
} else if (letter === ")") {
|
|
8714
|
-
if (func > 0)
|
|
8715
|
-
func -= 1;
|
|
8716
|
-
} else if (func === 0) {
|
|
8717
|
-
if (separators.includes(letter))
|
|
8718
|
-
split = true;
|
|
8719
|
-
}
|
|
8720
|
-
if (split) {
|
|
8721
|
-
if (current !== "")
|
|
8722
|
-
array.push(current.trim());
|
|
8723
|
-
current = "";
|
|
8724
|
-
split = false;
|
|
8725
|
-
} else {
|
|
8726
|
-
current += letter;
|
|
8725
|
+
break;
|
|
8727
8726
|
}
|
|
8728
8727
|
}
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
return array;
|
|
8732
|
-
}
|
|
8733
|
-
};
|
|
8734
|
-
module.exports = list;
|
|
8735
|
-
list.default = list;
|
|
8736
|
-
}
|
|
8737
|
-
});
|
|
8738
|
-
|
|
8739
|
-
// external/npm/node_modules/postcss/lib/rule.js
|
|
8740
|
-
var require_rule = __commonJS({
|
|
8741
|
-
"external/npm/node_modules/postcss/lib/rule.js"(exports, module) {
|
|
8742
|
-
"use strict";
|
|
8743
|
-
var Container = require_container();
|
|
8744
|
-
var list = require_list();
|
|
8745
|
-
var Rule = class extends Container {
|
|
8746
|
-
constructor(defaults) {
|
|
8747
|
-
super(defaults);
|
|
8748
|
-
this.type = "rule";
|
|
8749
|
-
if (!this.nodes)
|
|
8750
|
-
this.nodes = [];
|
|
8751
|
-
}
|
|
8752
|
-
get selectors() {
|
|
8753
|
-
return list.comma(this.selector);
|
|
8728
|
+
pos++;
|
|
8729
|
+
return currentToken;
|
|
8754
8730
|
}
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
|
|
8758
|
-
this.selector = values.join(sep);
|
|
8731
|
+
function back(token) {
|
|
8732
|
+
returned.push(token);
|
|
8759
8733
|
}
|
|
8734
|
+
return {
|
|
8735
|
+
back,
|
|
8736
|
+
endOfFile,
|
|
8737
|
+
nextToken,
|
|
8738
|
+
position
|
|
8739
|
+
};
|
|
8760
8740
|
};
|
|
8761
|
-
module.exports = Rule;
|
|
8762
|
-
Rule.default = Rule;
|
|
8763
|
-
Container.registerRule(Rule);
|
|
8764
8741
|
}
|
|
8765
8742
|
});
|
|
8766
8743
|
|
|
8767
|
-
// external/npm/node_modules/postcss/lib/parser.js
|
|
8744
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/parser.js
|
|
8768
8745
|
var require_parser = __commonJS({
|
|
8769
|
-
"external/npm/node_modules/postcss/lib/parser.js"(exports, module) {
|
|
8746
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/parser.js"(exports, module) {
|
|
8770
8747
|
"use strict";
|
|
8771
|
-
var Declaration = require_declaration();
|
|
8772
|
-
var tokenizer = require_tokenize();
|
|
8773
|
-
var Comment = require_comment();
|
|
8774
8748
|
var AtRule = require_at_rule();
|
|
8749
|
+
var Comment = require_comment();
|
|
8750
|
+
var Declaration = require_declaration();
|
|
8775
8751
|
var Root = require_root();
|
|
8776
8752
|
var Rule = require_rule();
|
|
8753
|
+
var tokenizer = require_tokenize();
|
|
8777
8754
|
var SAFE_COMMENT_NEIGHBOR = {
|
|
8778
8755
|
empty: true,
|
|
8779
8756
|
space: true
|
|
@@ -8895,7 +8872,7 @@ var require_parser = __commonJS({
|
|
|
8895
8872
|
}
|
|
8896
8873
|
colon(tokens) {
|
|
8897
8874
|
let brackets = 0;
|
|
8898
|
-
let token, type
|
|
8875
|
+
let prev, token, type;
|
|
8899
8876
|
for (let [i, element] of tokens.entries()) {
|
|
8900
8877
|
token = element;
|
|
8901
8878
|
type = token[0];
|
|
@@ -9005,12 +8982,12 @@ var require_parser = __commonJS({
|
|
|
9005
8982
|
let str = "";
|
|
9006
8983
|
for (let j = i; j > 0; j--) {
|
|
9007
8984
|
let type = cache[j][0];
|
|
9008
|
-
if (str.trim().
|
|
8985
|
+
if (str.trim().startsWith("!") && type !== "space") {
|
|
9009
8986
|
break;
|
|
9010
8987
|
}
|
|
9011
8988
|
str = cache.pop()[1] + str;
|
|
9012
8989
|
}
|
|
9013
|
-
if (str.trim().
|
|
8990
|
+
if (str.trim().startsWith("!")) {
|
|
9014
8991
|
node.important = true;
|
|
9015
8992
|
node.raws.important = str;
|
|
9016
8993
|
tokens = cache;
|
|
@@ -9311,13 +9288,13 @@ var require_parser = __commonJS({
|
|
|
9311
9288
|
}
|
|
9312
9289
|
});
|
|
9313
9290
|
|
|
9314
|
-
// external/npm/node_modules/postcss/lib/parse.js
|
|
9291
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/parse.js
|
|
9315
9292
|
var require_parse3 = __commonJS({
|
|
9316
|
-
"external/npm/node_modules/postcss/lib/parse.js"(exports, module) {
|
|
9293
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/parse.js"(exports, module) {
|
|
9317
9294
|
"use strict";
|
|
9318
9295
|
var Container = require_container();
|
|
9319
|
-
var Parser = require_parser();
|
|
9320
9296
|
var Input = require_input();
|
|
9297
|
+
var Parser = require_parser();
|
|
9321
9298
|
function parse(css, opts) {
|
|
9322
9299
|
let input = new Input(css, opts);
|
|
9323
9300
|
let parser = new Parser(input);
|
|
@@ -9345,19 +9322,111 @@ var require_parse3 = __commonJS({
|
|
|
9345
9322
|
}
|
|
9346
9323
|
});
|
|
9347
9324
|
|
|
9348
|
-
// external/npm/node_modules/postcss/lib/
|
|
9325
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/warning.js
|
|
9326
|
+
var require_warning = __commonJS({
|
|
9327
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/warning.js"(exports, module) {
|
|
9328
|
+
"use strict";
|
|
9329
|
+
var Warning = class {
|
|
9330
|
+
constructor(text, opts = {}) {
|
|
9331
|
+
this.type = "warning";
|
|
9332
|
+
this.text = text;
|
|
9333
|
+
if (opts.node && opts.node.source) {
|
|
9334
|
+
let range = opts.node.rangeBy(opts);
|
|
9335
|
+
this.line = range.start.line;
|
|
9336
|
+
this.column = range.start.column;
|
|
9337
|
+
this.endLine = range.end.line;
|
|
9338
|
+
this.endColumn = range.end.column;
|
|
9339
|
+
}
|
|
9340
|
+
for (let opt in opts)
|
|
9341
|
+
this[opt] = opts[opt];
|
|
9342
|
+
}
|
|
9343
|
+
toString() {
|
|
9344
|
+
if (this.node) {
|
|
9345
|
+
return this.node.error(this.text, {
|
|
9346
|
+
index: this.index,
|
|
9347
|
+
plugin: this.plugin,
|
|
9348
|
+
word: this.word
|
|
9349
|
+
}).message;
|
|
9350
|
+
}
|
|
9351
|
+
if (this.plugin) {
|
|
9352
|
+
return this.plugin + ": " + this.text;
|
|
9353
|
+
}
|
|
9354
|
+
return this.text;
|
|
9355
|
+
}
|
|
9356
|
+
};
|
|
9357
|
+
module.exports = Warning;
|
|
9358
|
+
Warning.default = Warning;
|
|
9359
|
+
}
|
|
9360
|
+
});
|
|
9361
|
+
|
|
9362
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/result.js
|
|
9363
|
+
var require_result = __commonJS({
|
|
9364
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/result.js"(exports, module) {
|
|
9365
|
+
"use strict";
|
|
9366
|
+
var Warning = require_warning();
|
|
9367
|
+
var Result = class {
|
|
9368
|
+
constructor(processor, root, opts) {
|
|
9369
|
+
this.processor = processor;
|
|
9370
|
+
this.messages = [];
|
|
9371
|
+
this.root = root;
|
|
9372
|
+
this.opts = opts;
|
|
9373
|
+
this.css = void 0;
|
|
9374
|
+
this.map = void 0;
|
|
9375
|
+
}
|
|
9376
|
+
toString() {
|
|
9377
|
+
return this.css;
|
|
9378
|
+
}
|
|
9379
|
+
warn(text, opts = {}) {
|
|
9380
|
+
if (!opts.plugin) {
|
|
9381
|
+
if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
|
|
9382
|
+
opts.plugin = this.lastPlugin.postcssPlugin;
|
|
9383
|
+
}
|
|
9384
|
+
}
|
|
9385
|
+
let warning = new Warning(text, opts);
|
|
9386
|
+
this.messages.push(warning);
|
|
9387
|
+
return warning;
|
|
9388
|
+
}
|
|
9389
|
+
warnings() {
|
|
9390
|
+
return this.messages.filter((i) => i.type === "warning");
|
|
9391
|
+
}
|
|
9392
|
+
get content() {
|
|
9393
|
+
return this.css;
|
|
9394
|
+
}
|
|
9395
|
+
};
|
|
9396
|
+
module.exports = Result;
|
|
9397
|
+
Result.default = Result;
|
|
9398
|
+
}
|
|
9399
|
+
});
|
|
9400
|
+
|
|
9401
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/warn-once.js
|
|
9402
|
+
var require_warn_once = __commonJS({
|
|
9403
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/warn-once.js"(exports, module) {
|
|
9404
|
+
"use strict";
|
|
9405
|
+
var printed = {};
|
|
9406
|
+
module.exports = function warnOnce(message) {
|
|
9407
|
+
if (printed[message])
|
|
9408
|
+
return;
|
|
9409
|
+
printed[message] = true;
|
|
9410
|
+
if (typeof console !== "undefined" && console.warn) {
|
|
9411
|
+
console.warn(message);
|
|
9412
|
+
}
|
|
9413
|
+
};
|
|
9414
|
+
}
|
|
9415
|
+
});
|
|
9416
|
+
|
|
9417
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/lazy-result.js
|
|
9349
9418
|
var require_lazy_result = __commonJS({
|
|
9350
|
-
"external/npm/node_modules/postcss/lib/lazy-result.js"(exports, module) {
|
|
9419
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/lazy-result.js"(exports, module) {
|
|
9351
9420
|
"use strict";
|
|
9352
|
-
var { isClean, my } = require_symbols();
|
|
9353
|
-
var MapGenerator = require_map_generator();
|
|
9354
|
-
var stringify = require_stringify3();
|
|
9355
9421
|
var Container = require_container();
|
|
9356
9422
|
var Document = require_document();
|
|
9357
|
-
var
|
|
9358
|
-
var Result = require_result();
|
|
9423
|
+
var MapGenerator = require_map_generator();
|
|
9359
9424
|
var parse = require_parse3();
|
|
9425
|
+
var Result = require_result();
|
|
9360
9426
|
var Root = require_root();
|
|
9427
|
+
var stringify = require_stringify3();
|
|
9428
|
+
var { isClean, my } = require_symbols();
|
|
9429
|
+
var warnOnce = require_warn_once();
|
|
9361
9430
|
var TYPE_TO_CLASS_NAME = {
|
|
9362
9431
|
atrule: "AtRule",
|
|
9363
9432
|
comment: "Comment",
|
|
@@ -9841,15 +9910,15 @@ var require_lazy_result = __commonJS({
|
|
|
9841
9910
|
}
|
|
9842
9911
|
});
|
|
9843
9912
|
|
|
9844
|
-
// external/npm/node_modules/postcss/lib/no-work-result.js
|
|
9913
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/no-work-result.js
|
|
9845
9914
|
var require_no_work_result = __commonJS({
|
|
9846
|
-
"external/npm/node_modules/postcss/lib/no-work-result.js"(exports, module) {
|
|
9915
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/no-work-result.js"(exports, module) {
|
|
9847
9916
|
"use strict";
|
|
9848
9917
|
var MapGenerator = require_map_generator();
|
|
9849
|
-
var stringify = require_stringify3();
|
|
9850
|
-
var warnOnce = require_warn_once();
|
|
9851
9918
|
var parse = require_parse3();
|
|
9852
9919
|
var Result = require_result();
|
|
9920
|
+
var stringify = require_stringify3();
|
|
9921
|
+
var warnOnce = require_warn_once();
|
|
9853
9922
|
var NoWorkResult = class {
|
|
9854
9923
|
constructor(processor, css, opts) {
|
|
9855
9924
|
css = css.toString();
|
|
@@ -9959,17 +10028,17 @@ var require_no_work_result = __commonJS({
|
|
|
9959
10028
|
}
|
|
9960
10029
|
});
|
|
9961
10030
|
|
|
9962
|
-
// external/npm/node_modules/postcss/lib/processor.js
|
|
10031
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/processor.js
|
|
9963
10032
|
var require_processor = __commonJS({
|
|
9964
|
-
"external/npm/node_modules/postcss/lib/processor.js"(exports, module) {
|
|
10033
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/processor.js"(exports, module) {
|
|
9965
10034
|
"use strict";
|
|
9966
|
-
var NoWorkResult = require_no_work_result();
|
|
9967
|
-
var LazyResult = require_lazy_result();
|
|
9968
10035
|
var Document = require_document();
|
|
10036
|
+
var LazyResult = require_lazy_result();
|
|
10037
|
+
var NoWorkResult = require_no_work_result();
|
|
9969
10038
|
var Root = require_root();
|
|
9970
10039
|
var Processor = class {
|
|
9971
10040
|
constructor(plugins = []) {
|
|
9972
|
-
this.version = "8.4.
|
|
10041
|
+
this.version = "8.4.44";
|
|
9973
10042
|
this.plugins = this.normalize(plugins);
|
|
9974
10043
|
}
|
|
9975
10044
|
normalize(plugins) {
|
|
@@ -10017,84 +10086,28 @@ var require_processor = __commonJS({
|
|
|
10017
10086
|
}
|
|
10018
10087
|
});
|
|
10019
10088
|
|
|
10020
|
-
// external/npm/node_modules/postcss/lib/
|
|
10021
|
-
var require_fromJSON = __commonJS({
|
|
10022
|
-
"external/npm/node_modules/postcss/lib/fromJSON.js"(exports, module) {
|
|
10023
|
-
"use strict";
|
|
10024
|
-
var Declaration = require_declaration();
|
|
10025
|
-
var PreviousMap = require_previous_map();
|
|
10026
|
-
var Comment = require_comment();
|
|
10027
|
-
var AtRule = require_at_rule();
|
|
10028
|
-
var Input = require_input();
|
|
10029
|
-
var Root = require_root();
|
|
10030
|
-
var Rule = require_rule();
|
|
10031
|
-
function fromJSON(json, inputs) {
|
|
10032
|
-
if (Array.isArray(json))
|
|
10033
|
-
return json.map((n) => fromJSON(n));
|
|
10034
|
-
let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
|
|
10035
|
-
if (ownInputs) {
|
|
10036
|
-
inputs = [];
|
|
10037
|
-
for (let input of ownInputs) {
|
|
10038
|
-
let inputHydrated = __spreadProps(__spreadValues({}, input), { __proto__: Input.prototype });
|
|
10039
|
-
if (inputHydrated.map) {
|
|
10040
|
-
inputHydrated.map = __spreadProps(__spreadValues({}, inputHydrated.map), {
|
|
10041
|
-
__proto__: PreviousMap.prototype
|
|
10042
|
-
});
|
|
10043
|
-
}
|
|
10044
|
-
inputs.push(inputHydrated);
|
|
10045
|
-
}
|
|
10046
|
-
}
|
|
10047
|
-
if (defaults.nodes) {
|
|
10048
|
-
defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
|
|
10049
|
-
}
|
|
10050
|
-
if (defaults.source) {
|
|
10051
|
-
let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
|
|
10052
|
-
defaults.source = source;
|
|
10053
|
-
if (inputId != null) {
|
|
10054
|
-
defaults.source.input = inputs[inputId];
|
|
10055
|
-
}
|
|
10056
|
-
}
|
|
10057
|
-
if (defaults.type === "root") {
|
|
10058
|
-
return new Root(defaults);
|
|
10059
|
-
} else if (defaults.type === "decl") {
|
|
10060
|
-
return new Declaration(defaults);
|
|
10061
|
-
} else if (defaults.type === "rule") {
|
|
10062
|
-
return new Rule(defaults);
|
|
10063
|
-
} else if (defaults.type === "comment") {
|
|
10064
|
-
return new Comment(defaults);
|
|
10065
|
-
} else if (defaults.type === "atrule") {
|
|
10066
|
-
return new AtRule(defaults);
|
|
10067
|
-
} else {
|
|
10068
|
-
throw new Error("Unknown node type: " + json.type);
|
|
10069
|
-
}
|
|
10070
|
-
}
|
|
10071
|
-
module.exports = fromJSON;
|
|
10072
|
-
fromJSON.default = fromJSON;
|
|
10073
|
-
}
|
|
10074
|
-
});
|
|
10075
|
-
|
|
10076
|
-
// external/npm/node_modules/postcss/lib/postcss.js
|
|
10089
|
+
// external/npm/node_modules/critters/node_modules/postcss/lib/postcss.js
|
|
10077
10090
|
var require_postcss = __commonJS({
|
|
10078
|
-
"external/npm/node_modules/postcss/lib/postcss.js"(exports, module) {
|
|
10091
|
+
"external/npm/node_modules/critters/node_modules/postcss/lib/postcss.js"(exports, module) {
|
|
10079
10092
|
"use strict";
|
|
10093
|
+
var AtRule = require_at_rule();
|
|
10094
|
+
var Comment = require_comment();
|
|
10095
|
+
var Container = require_container();
|
|
10080
10096
|
var CssSyntaxError = require_css_syntax_error();
|
|
10081
10097
|
var Declaration = require_declaration();
|
|
10082
|
-
var LazyResult = require_lazy_result();
|
|
10083
|
-
var Container = require_container();
|
|
10084
|
-
var Processor = require_processor();
|
|
10085
|
-
var stringify = require_stringify3();
|
|
10086
|
-
var fromJSON = require_fromJSON();
|
|
10087
10098
|
var Document = require_document();
|
|
10088
|
-
var
|
|
10089
|
-
var Comment = require_comment();
|
|
10090
|
-
var AtRule = require_at_rule();
|
|
10091
|
-
var Result = require_result();
|
|
10099
|
+
var fromJSON = require_fromJSON();
|
|
10092
10100
|
var Input = require_input();
|
|
10093
|
-
var
|
|
10101
|
+
var LazyResult = require_lazy_result();
|
|
10094
10102
|
var list = require_list();
|
|
10095
|
-
var Rule = require_rule();
|
|
10096
|
-
var Root = require_root();
|
|
10097
10103
|
var Node = require_node2();
|
|
10104
|
+
var parse = require_parse3();
|
|
10105
|
+
var Processor = require_processor();
|
|
10106
|
+
var Result = require_result();
|
|
10107
|
+
var Root = require_root();
|
|
10108
|
+
var Rule = require_rule();
|
|
10109
|
+
var stringify = require_stringify3();
|
|
10110
|
+
var Warning = require_warning();
|
|
10098
10111
|
function postcss(...plugins) {
|
|
10099
10112
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
10100
10113
|
plugins = plugins[0];
|