vite-plugin-react-native-web 3.0.0-rc.2 → 3.0.1

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.
@@ -1,3217 +0,0 @@
1
- import { r as __toESM, t as __commonJSMin } from "./chunk-CRPLlQ3x.js";
2
- //#region node_modules/picocolors/picocolors.browser.js
3
- var require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- var x = String;
5
- var create = function() {
6
- return {
7
- isColorSupported: false,
8
- reset: x,
9
- bold: x,
10
- dim: x,
11
- italic: x,
12
- underline: x,
13
- inverse: x,
14
- hidden: x,
15
- strikethrough: x,
16
- black: x,
17
- red: x,
18
- green: x,
19
- yellow: x,
20
- blue: x,
21
- magenta: x,
22
- cyan: x,
23
- white: x,
24
- gray: x,
25
- bgBlack: x,
26
- bgRed: x,
27
- bgGreen: x,
28
- bgYellow: x,
29
- bgBlue: x,
30
- bgMagenta: x,
31
- bgCyan: x,
32
- bgWhite: x,
33
- blackBright: x,
34
- redBright: x,
35
- greenBright: x,
36
- yellowBright: x,
37
- blueBright: x,
38
- magentaBright: x,
39
- cyanBright: x,
40
- whiteBright: x,
41
- bgBlackBright: x,
42
- bgRedBright: x,
43
- bgGreenBright: x,
44
- bgYellowBright: x,
45
- bgBlueBright: x,
46
- bgMagentaBright: x,
47
- bgCyanBright: x,
48
- bgWhiteBright: x
49
- };
50
- };
51
- module.exports = create();
52
- module.exports.createColors = create;
53
- }));
54
- //#endregion
55
- //#region (ignored) node_modules/postcss/lib/terminal-highlight
56
- var require_terminal_highlight = /* @__PURE__ */ __commonJSMin((() => {}));
57
- //#endregion
58
- //#region node_modules/postcss/lib/css-syntax-error.js
59
- var require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
60
- let pico = require_picocolors_browser();
61
- let terminalHighlight = require_terminal_highlight();
62
- var CssSyntaxError = class CssSyntaxError extends Error {
63
- constructor(message, line, column, source, file, plugin) {
64
- super(message);
65
- this.name = "CssSyntaxError";
66
- this.reason = message;
67
- if (file) this.file = file;
68
- if (source) this.source = source;
69
- if (plugin) this.plugin = plugin;
70
- if (typeof line !== "undefined" && typeof column !== "undefined") if (typeof line === "number") {
71
- this.line = line;
72
- this.column = column;
73
- } else {
74
- this.line = line.line;
75
- this.column = line.column;
76
- this.endLine = column.line;
77
- this.endColumn = column.column;
78
- }
79
- this.setMessage();
80
- if (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError);
81
- }
82
- setMessage() {
83
- this.message = this.plugin ? this.plugin + ": " : "";
84
- this.message += this.file ? this.file : "<css input>";
85
- if (typeof this.line !== "undefined") this.message += ":" + this.line + ":" + this.column;
86
- this.message += ": " + this.reason;
87
- }
88
- showSourceCode(color) {
89
- if (!this.source) return "";
90
- let css = this.source;
91
- if (color == null) color = pico.isColorSupported;
92
- let aside = (text) => text;
93
- let mark = (text) => text;
94
- let highlight = (text) => text;
95
- if (color) {
96
- let { bold, gray, red } = pico.createColors(true);
97
- mark = (text) => bold(red(text));
98
- aside = (text) => gray(text);
99
- if (terminalHighlight) highlight = (text) => terminalHighlight(text);
100
- }
101
- let lines = css.split(/\r?\n/);
102
- let start = Math.max(this.line - 3, 0);
103
- let end = Math.min(this.line + 2, lines.length);
104
- let maxWidth = String(end).length;
105
- return lines.slice(start, end).map((line, index) => {
106
- let number = start + 1 + index;
107
- let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
108
- if (number === this.line) {
109
- if (line.length > 160) {
110
- let padding = 20;
111
- let subLineStart = Math.max(0, this.column - padding);
112
- let subLineEnd = Math.max(this.column + padding, this.endColumn + padding);
113
- let subLine = line.slice(subLineStart, subLineEnd);
114
- let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, " ");
115
- return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing + mark("^");
116
- }
117
- let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
118
- return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
119
- }
120
- return " " + aside(gutter) + highlight(line);
121
- }).join("\n");
122
- }
123
- toString() {
124
- let code = this.showSourceCode();
125
- if (code) code = "\n\n" + code + "\n";
126
- return this.name + ": " + this.message + code;
127
- }
128
- };
129
- module.exports = CssSyntaxError;
130
- CssSyntaxError.default = CssSyntaxError;
131
- }));
132
- //#endregion
133
- //#region node_modules/postcss/lib/stringifier.js
134
- var require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {
135
- const DEFAULT_RAW = {
136
- after: "\n",
137
- beforeClose: "\n",
138
- beforeComment: "\n",
139
- beforeDecl: "\n",
140
- beforeOpen: " ",
141
- beforeRule: "\n",
142
- colon: ": ",
143
- commentLeft: " ",
144
- commentRight: " ",
145
- emptyBody: "",
146
- indent: " ",
147
- semicolon: false
148
- };
149
- function capitalize(str) {
150
- return str[0].toUpperCase() + str.slice(1);
151
- }
152
- var Stringifier = class {
153
- constructor(builder) {
154
- this.builder = builder;
155
- }
156
- atrule(node, semicolon) {
157
- let name = "@" + node.name;
158
- let params = node.params ? this.rawValue(node, "params") : "";
159
- if (typeof node.raws.afterName !== "undefined") name += node.raws.afterName;
160
- else if (params) name += " ";
161
- if (node.nodes) this.block(node, name + params);
162
- else {
163
- let end = (node.raws.between || "") + (semicolon ? ";" : "");
164
- this.builder(name + params + end, node);
165
- }
166
- }
167
- beforeAfter(node, detect) {
168
- let value;
169
- if (node.type === "decl") value = this.raw(node, null, "beforeDecl");
170
- else if (node.type === "comment") value = this.raw(node, null, "beforeComment");
171
- else if (detect === "before") value = this.raw(node, null, "beforeRule");
172
- else value = this.raw(node, null, "beforeClose");
173
- let buf = node.parent;
174
- let depth = 0;
175
- while (buf && buf.type !== "root") {
176
- depth += 1;
177
- buf = buf.parent;
178
- }
179
- if (value.includes("\n")) {
180
- let indent = this.raw(node, null, "indent");
181
- if (indent.length) for (let step = 0; step < depth; step++) value += indent;
182
- }
183
- return value;
184
- }
185
- block(node, start) {
186
- let between = this.raw(node, "between", "beforeOpen");
187
- this.builder(start + between + "{", node, "start");
188
- let after;
189
- if (node.nodes && node.nodes.length) {
190
- this.body(node);
191
- after = this.raw(node, "after");
192
- } else after = this.raw(node, "after", "emptyBody");
193
- if (after) this.builder(after);
194
- this.builder("}", node, "end");
195
- }
196
- body(node) {
197
- let last = node.nodes.length - 1;
198
- while (last > 0) {
199
- if (node.nodes[last].type !== "comment") break;
200
- last -= 1;
201
- }
202
- let semicolon = this.raw(node, "semicolon");
203
- for (let i = 0; i < node.nodes.length; i++) {
204
- let child = node.nodes[i];
205
- let before = this.raw(child, "before");
206
- if (before) this.builder(before);
207
- this.stringify(child, last !== i || semicolon);
208
- }
209
- }
210
- comment(node) {
211
- let left = this.raw(node, "left", "commentLeft");
212
- let right = this.raw(node, "right", "commentRight");
213
- this.builder("/*" + left + node.text + right + "*/", node);
214
- }
215
- decl(node, semicolon) {
216
- let between = this.raw(node, "between", "colon");
217
- let string = node.prop + between + this.rawValue(node, "value");
218
- if (node.important) string += node.raws.important || " !important";
219
- if (semicolon) string += ";";
220
- this.builder(string, node);
221
- }
222
- document(node) {
223
- this.body(node);
224
- }
225
- raw(node, own, detect) {
226
- let value;
227
- if (!detect) detect = own;
228
- if (own) {
229
- value = node.raws[own];
230
- if (typeof value !== "undefined") return value;
231
- }
232
- let parent = node.parent;
233
- if (detect === "before") {
234
- if (!parent || parent.type === "root" && parent.first === node) return "";
235
- if (parent && parent.type === "document") return "";
236
- }
237
- if (!parent) return DEFAULT_RAW[detect];
238
- let root = node.root();
239
- if (!root.rawCache) root.rawCache = {};
240
- if (typeof root.rawCache[detect] !== "undefined") return root.rawCache[detect];
241
- if (detect === "before" || detect === "after") return this.beforeAfter(node, detect);
242
- else {
243
- let method = "raw" + capitalize(detect);
244
- if (this[method]) value = this[method](root, node);
245
- else root.walk((i) => {
246
- value = i.raws[own];
247
- if (typeof value !== "undefined") return false;
248
- });
249
- }
250
- if (typeof value === "undefined") value = DEFAULT_RAW[detect];
251
- root.rawCache[detect] = value;
252
- return value;
253
- }
254
- rawBeforeClose(root) {
255
- let value;
256
- root.walk((i) => {
257
- if (i.nodes && i.nodes.length > 0) {
258
- if (typeof i.raws.after !== "undefined") {
259
- value = i.raws.after;
260
- if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
261
- return false;
262
- }
263
- }
264
- });
265
- if (value) value = value.replace(/\S/g, "");
266
- return value;
267
- }
268
- rawBeforeComment(root, node) {
269
- let value;
270
- root.walkComments((i) => {
271
- if (typeof i.raws.before !== "undefined") {
272
- value = i.raws.before;
273
- if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
274
- return false;
275
- }
276
- });
277
- if (typeof value === "undefined") value = this.raw(node, null, "beforeDecl");
278
- else if (value) value = value.replace(/\S/g, "");
279
- return value;
280
- }
281
- rawBeforeDecl(root, node) {
282
- let value;
283
- root.walkDecls((i) => {
284
- if (typeof i.raws.before !== "undefined") {
285
- value = i.raws.before;
286
- if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
287
- return false;
288
- }
289
- });
290
- if (typeof value === "undefined") value = this.raw(node, null, "beforeRule");
291
- else if (value) value = value.replace(/\S/g, "");
292
- return value;
293
- }
294
- rawBeforeOpen(root) {
295
- let value;
296
- root.walk((i) => {
297
- if (i.type !== "decl") {
298
- value = i.raws.between;
299
- if (typeof value !== "undefined") return false;
300
- }
301
- });
302
- return value;
303
- }
304
- rawBeforeRule(root) {
305
- let value;
306
- root.walk((i) => {
307
- if (i.nodes && (i.parent !== root || root.first !== i)) {
308
- if (typeof i.raws.before !== "undefined") {
309
- value = i.raws.before;
310
- if (value.includes("\n")) value = value.replace(/[^\n]+$/, "");
311
- return false;
312
- }
313
- }
314
- });
315
- if (value) value = value.replace(/\S/g, "");
316
- return value;
317
- }
318
- rawColon(root) {
319
- let value;
320
- root.walkDecls((i) => {
321
- if (typeof i.raws.between !== "undefined") {
322
- value = i.raws.between.replace(/[^\s:]/g, "");
323
- return false;
324
- }
325
- });
326
- return value;
327
- }
328
- rawEmptyBody(root) {
329
- let value;
330
- root.walk((i) => {
331
- if (i.nodes && i.nodes.length === 0) {
332
- value = i.raws.after;
333
- if (typeof value !== "undefined") return false;
334
- }
335
- });
336
- return value;
337
- }
338
- rawIndent(root) {
339
- if (root.raws.indent) return root.raws.indent;
340
- let value;
341
- root.walk((i) => {
342
- let p = i.parent;
343
- if (p && p !== root && p.parent && p.parent === root) {
344
- if (typeof i.raws.before !== "undefined") {
345
- let parts = i.raws.before.split("\n");
346
- value = parts[parts.length - 1];
347
- value = value.replace(/\S/g, "");
348
- return false;
349
- }
350
- }
351
- });
352
- return value;
353
- }
354
- rawSemicolon(root) {
355
- let value;
356
- root.walk((i) => {
357
- if (i.nodes && i.nodes.length && i.last.type === "decl") {
358
- value = i.raws.semicolon;
359
- if (typeof value !== "undefined") return false;
360
- }
361
- });
362
- return value;
363
- }
364
- rawValue(node, prop) {
365
- let value = node[prop];
366
- let raw = node.raws[prop];
367
- if (raw && raw.value === value) return raw.raw;
368
- return value;
369
- }
370
- root(node) {
371
- this.body(node);
372
- if (node.raws.after) this.builder(node.raws.after);
373
- }
374
- rule(node) {
375
- this.block(node, this.rawValue(node, "selector"));
376
- if (node.raws.ownSemicolon) this.builder(node.raws.ownSemicolon, node, "end");
377
- }
378
- stringify(node, semicolon) {
379
- /* c8 ignore start */
380
- if (!this[node.type]) throw new Error("Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier.");
381
- /* c8 ignore stop */
382
- this[node.type](node, semicolon);
383
- }
384
- };
385
- module.exports = Stringifier;
386
- Stringifier.default = Stringifier;
387
- }));
388
- //#endregion
389
- //#region node_modules/postcss/lib/stringify.js
390
- var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
391
- let Stringifier = require_stringifier();
392
- function stringify(node, builder) {
393
- new Stringifier(builder).stringify(node);
394
- }
395
- module.exports = stringify;
396
- stringify.default = stringify;
397
- }));
398
- //#endregion
399
- //#region node_modules/postcss/lib/symbols.js
400
- var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
401
- module.exports.isClean = Symbol("isClean");
402
- module.exports.my = Symbol("my");
403
- }));
404
- //#endregion
405
- //#region node_modules/postcss/lib/node.js
406
- var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
407
- let CssSyntaxError = require_css_syntax_error();
408
- let Stringifier = require_stringifier();
409
- let stringify = require_stringify();
410
- let { isClean, my } = require_symbols();
411
- function cloneNode(obj, parent) {
412
- let cloned = new obj.constructor();
413
- for (let i in obj) {
414
- if (!Object.prototype.hasOwnProperty.call(obj, i))
415
- /* c8 ignore next 2 */
416
- continue;
417
- if (i === "proxyCache") continue;
418
- let value = obj[i];
419
- let type = typeof value;
420
- if (i === "parent" && type === "object") {
421
- if (parent) cloned[i] = parent;
422
- } else if (i === "source") cloned[i] = value;
423
- else if (Array.isArray(value)) cloned[i] = value.map((j) => cloneNode(j, cloned));
424
- else {
425
- if (type === "object" && value !== null) value = cloneNode(value);
426
- cloned[i] = value;
427
- }
428
- }
429
- return cloned;
430
- }
431
- function sourceOffset(inputCSS, position) {
432
- if (position && typeof position.offset !== "undefined") return position.offset;
433
- let column = 1;
434
- let line = 1;
435
- let offset = 0;
436
- for (let i = 0; i < inputCSS.length; i++) {
437
- if (line === position.line && column === position.column) {
438
- offset = i;
439
- break;
440
- }
441
- if (inputCSS[i] === "\n") {
442
- column = 1;
443
- line += 1;
444
- } else column += 1;
445
- }
446
- return offset;
447
- }
448
- var Node = class {
449
- get proxyOf() {
450
- return this;
451
- }
452
- constructor(defaults = {}) {
453
- this.raws = {};
454
- this[isClean] = false;
455
- this[my] = true;
456
- for (let name in defaults) if (name === "nodes") {
457
- this.nodes = [];
458
- for (let node of defaults[name]) if (typeof node.clone === "function") this.append(node.clone());
459
- else this.append(node);
460
- } else this[name] = defaults[name];
461
- }
462
- addToError(error) {
463
- error.postcssNode = this;
464
- if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
465
- let s = this.source;
466
- error.stack = error.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);
467
- }
468
- return error;
469
- }
470
- after(add) {
471
- this.parent.insertAfter(this, add);
472
- return this;
473
- }
474
- assign(overrides = {}) {
475
- for (let name in overrides) this[name] = overrides[name];
476
- return this;
477
- }
478
- before(add) {
479
- this.parent.insertBefore(this, add);
480
- return this;
481
- }
482
- cleanRaws(keepBetween) {
483
- delete this.raws.before;
484
- delete this.raws.after;
485
- if (!keepBetween) delete this.raws.between;
486
- }
487
- clone(overrides = {}) {
488
- let cloned = cloneNode(this);
489
- for (let name in overrides) cloned[name] = overrides[name];
490
- return cloned;
491
- }
492
- cloneAfter(overrides = {}) {
493
- let cloned = this.clone(overrides);
494
- this.parent.insertAfter(this, cloned);
495
- return cloned;
496
- }
497
- cloneBefore(overrides = {}) {
498
- let cloned = this.clone(overrides);
499
- this.parent.insertBefore(this, cloned);
500
- return cloned;
501
- }
502
- error(message, opts = {}) {
503
- if (this.source) {
504
- let { end, start } = this.rangeBy(opts);
505
- return this.source.input.error(message, {
506
- column: start.column,
507
- line: start.line
508
- }, {
509
- column: end.column,
510
- line: end.line
511
- }, opts);
512
- }
513
- return new CssSyntaxError(message);
514
- }
515
- getProxyProcessor() {
516
- return {
517
- get(node, prop) {
518
- if (prop === "proxyOf") return node;
519
- else if (prop === "root") return () => node.root().toProxy();
520
- else return node[prop];
521
- },
522
- set(node, prop, value) {
523
- if (node[prop] === value) return true;
524
- node[prop] = value;
525
- if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || prop === "text") node.markDirty();
526
- return true;
527
- }
528
- };
529
- }
530
- /* c8 ignore next 3 */
531
- markClean() {
532
- this[isClean] = true;
533
- }
534
- markDirty() {
535
- if (this[isClean]) {
536
- this[isClean] = false;
537
- let next = this;
538
- while (next = next.parent) next[isClean] = false;
539
- }
540
- }
541
- next() {
542
- if (!this.parent) return void 0;
543
- let index = this.parent.index(this);
544
- return this.parent.nodes[index + 1];
545
- }
546
- positionBy(opts = {}) {
547
- let pos = this.source.start;
548
- if (opts.index) pos = this.positionInside(opts.index);
549
- else if (opts.word) {
550
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
551
- let index = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)).indexOf(opts.word);
552
- if (index !== -1) pos = this.positionInside(index);
553
- }
554
- return pos;
555
- }
556
- positionInside(index) {
557
- let column = this.source.start.column;
558
- let line = this.source.start.line;
559
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
560
- let offset = sourceOffset(inputString, this.source.start);
561
- let end = offset + index;
562
- for (let i = offset; i < end; i++) if (inputString[i] === "\n") {
563
- column = 1;
564
- line += 1;
565
- } else column += 1;
566
- return {
567
- column,
568
- line,
569
- offset: end
570
- };
571
- }
572
- prev() {
573
- if (!this.parent) return void 0;
574
- let index = this.parent.index(this);
575
- return this.parent.nodes[index - 1];
576
- }
577
- rangeBy(opts = {}) {
578
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
579
- let start = {
580
- column: this.source.start.column,
581
- line: this.source.start.line,
582
- offset: sourceOffset(inputString, this.source.start)
583
- };
584
- let end = this.source.end ? {
585
- column: this.source.end.column + 1,
586
- line: this.source.end.line,
587
- offset: typeof this.source.end.offset === "number" ? this.source.end.offset : sourceOffset(inputString, this.source.end) + 1
588
- } : {
589
- column: start.column + 1,
590
- line: start.line,
591
- offset: start.offset + 1
592
- };
593
- if (opts.word) {
594
- let index = inputString.slice(sourceOffset(inputString, this.source.start), sourceOffset(inputString, this.source.end)).indexOf(opts.word);
595
- if (index !== -1) {
596
- start = this.positionInside(index);
597
- end = this.positionInside(index + opts.word.length);
598
- }
599
- } else {
600
- if (opts.start) start = {
601
- column: opts.start.column,
602
- line: opts.start.line,
603
- offset: sourceOffset(inputString, opts.start)
604
- };
605
- else if (opts.index) start = this.positionInside(opts.index);
606
- if (opts.end) end = {
607
- column: opts.end.column,
608
- line: opts.end.line,
609
- offset: sourceOffset(inputString, opts.end)
610
- };
611
- else if (typeof opts.endIndex === "number") end = this.positionInside(opts.endIndex);
612
- else if (opts.index) end = this.positionInside(opts.index + 1);
613
- }
614
- if (end.line < start.line || end.line === start.line && end.column <= start.column) end = {
615
- column: start.column + 1,
616
- line: start.line,
617
- offset: start.offset + 1
618
- };
619
- return {
620
- end,
621
- start
622
- };
623
- }
624
- raw(prop, defaultType) {
625
- return new Stringifier().raw(this, prop, defaultType);
626
- }
627
- remove() {
628
- if (this.parent) this.parent.removeChild(this);
629
- this.parent = void 0;
630
- return this;
631
- }
632
- replaceWith(...nodes) {
633
- if (this.parent) {
634
- let bookmark = this;
635
- let foundSelf = false;
636
- for (let node of nodes) if (node === this) foundSelf = true;
637
- else if (foundSelf) {
638
- this.parent.insertAfter(bookmark, node);
639
- bookmark = node;
640
- } else this.parent.insertBefore(bookmark, node);
641
- if (!foundSelf) this.remove();
642
- }
643
- return this;
644
- }
645
- root() {
646
- let result = this;
647
- while (result.parent && result.parent.type !== "document") result = result.parent;
648
- return result;
649
- }
650
- toJSON(_, inputs) {
651
- let fixed = {};
652
- let emitInputs = inputs == null;
653
- inputs = inputs || /* @__PURE__ */ new Map();
654
- let inputsNextIndex = 0;
655
- for (let name in this) {
656
- if (!Object.prototype.hasOwnProperty.call(this, name))
657
- /* c8 ignore next 2 */
658
- continue;
659
- if (name === "parent" || name === "proxyCache") continue;
660
- let value = this[name];
661
- if (Array.isArray(value)) fixed[name] = value.map((i) => {
662
- if (typeof i === "object" && i.toJSON) return i.toJSON(null, inputs);
663
- else return i;
664
- });
665
- else if (typeof value === "object" && value.toJSON) fixed[name] = value.toJSON(null, inputs);
666
- else if (name === "source") {
667
- if (value == null) continue;
668
- let inputId = inputs.get(value.input);
669
- if (inputId == null) {
670
- inputId = inputsNextIndex;
671
- inputs.set(value.input, inputsNextIndex);
672
- inputsNextIndex++;
673
- }
674
- fixed[name] = {
675
- end: value.end,
676
- inputId,
677
- start: value.start
678
- };
679
- } else fixed[name] = value;
680
- }
681
- if (emitInputs) fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());
682
- return fixed;
683
- }
684
- toProxy() {
685
- if (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor());
686
- return this.proxyCache;
687
- }
688
- toString(stringifier = stringify) {
689
- if (stringifier.stringify) stringifier = stringifier.stringify;
690
- let result = "";
691
- stringifier(this, (i) => {
692
- result += i;
693
- });
694
- return result;
695
- }
696
- warn(result, text, opts = {}) {
697
- let data = { node: this };
698
- for (let i in opts) data[i] = opts[i];
699
- return result.warn(text, data);
700
- }
701
- };
702
- module.exports = Node;
703
- Node.default = Node;
704
- }));
705
- //#endregion
706
- //#region node_modules/postcss/lib/comment.js
707
- var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
708
- let Node = require_node();
709
- var Comment = class extends Node {
710
- constructor(defaults) {
711
- super(defaults);
712
- this.type = "comment";
713
- }
714
- };
715
- module.exports = Comment;
716
- Comment.default = Comment;
717
- }));
718
- //#endregion
719
- //#region node_modules/postcss/lib/declaration.js
720
- var require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
721
- let Node = require_node();
722
- var Declaration = class extends Node {
723
- get variable() {
724
- return this.prop.startsWith("--") || this.prop[0] === "$";
725
- }
726
- constructor(defaults) {
727
- if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") defaults = {
728
- ...defaults,
729
- value: String(defaults.value)
730
- };
731
- super(defaults);
732
- this.type = "decl";
733
- }
734
- };
735
- module.exports = Declaration;
736
- Declaration.default = Declaration;
737
- }));
738
- //#endregion
739
- //#region node_modules/postcss/lib/container.js
740
- var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
741
- let Comment = require_comment();
742
- let Declaration = require_declaration();
743
- let Node = require_node();
744
- let { isClean, my } = require_symbols();
745
- let AtRule, parse, Root, Rule;
746
- function cleanSource(nodes) {
747
- return nodes.map((i) => {
748
- if (i.nodes) i.nodes = cleanSource(i.nodes);
749
- delete i.source;
750
- return i;
751
- });
752
- }
753
- function markTreeDirty(node) {
754
- node[isClean] = false;
755
- if (node.proxyOf.nodes) for (let i of node.proxyOf.nodes) markTreeDirty(i);
756
- }
757
- var Container = class Container extends Node {
758
- get first() {
759
- if (!this.proxyOf.nodes) return void 0;
760
- return this.proxyOf.nodes[0];
761
- }
762
- get last() {
763
- if (!this.proxyOf.nodes) return void 0;
764
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
765
- }
766
- append(...children) {
767
- for (let child of children) {
768
- let nodes = this.normalize(child, this.last);
769
- for (let node of nodes) this.proxyOf.nodes.push(node);
770
- }
771
- this.markDirty();
772
- return this;
773
- }
774
- cleanRaws(keepBetween) {
775
- super.cleanRaws(keepBetween);
776
- if (this.nodes) for (let node of this.nodes) node.cleanRaws(keepBetween);
777
- }
778
- each(callback) {
779
- if (!this.proxyOf.nodes) return void 0;
780
- let iterator = this.getIterator();
781
- let index, result;
782
- while (this.indexes[iterator] < this.proxyOf.nodes.length) {
783
- index = this.indexes[iterator];
784
- result = callback(this.proxyOf.nodes[index], index);
785
- if (result === false) break;
786
- this.indexes[iterator] += 1;
787
- }
788
- delete this.indexes[iterator];
789
- return result;
790
- }
791
- every(condition) {
792
- return this.nodes.every(condition);
793
- }
794
- getIterator() {
795
- if (!this.lastEach) this.lastEach = 0;
796
- if (!this.indexes) this.indexes = {};
797
- this.lastEach += 1;
798
- let iterator = this.lastEach;
799
- this.indexes[iterator] = 0;
800
- return iterator;
801
- }
802
- getProxyProcessor() {
803
- return {
804
- get(node, prop) {
805
- if (prop === "proxyOf") return node;
806
- else if (!node[prop]) return node[prop];
807
- else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) return (...args) => {
808
- return node[prop](...args.map((i) => {
809
- if (typeof i === "function") return (child, index) => i(child.toProxy(), index);
810
- else return i;
811
- }));
812
- };
813
- else if (prop === "every" || prop === "some") return (cb) => {
814
- return node[prop]((child, ...other) => cb(child.toProxy(), ...other));
815
- };
816
- else if (prop === "root") return () => node.root().toProxy();
817
- else if (prop === "nodes") return node.nodes.map((i) => i.toProxy());
818
- else if (prop === "first" || prop === "last") return node[prop].toProxy();
819
- else return node[prop];
820
- },
821
- set(node, prop, value) {
822
- if (node[prop] === value) return true;
823
- node[prop] = value;
824
- if (prop === "name" || prop === "params" || prop === "selector") node.markDirty();
825
- return true;
826
- }
827
- };
828
- }
829
- index(child) {
830
- if (typeof child === "number") return child;
831
- if (child.proxyOf) child = child.proxyOf;
832
- return this.proxyOf.nodes.indexOf(child);
833
- }
834
- insertAfter(exist, add) {
835
- let existIndex = this.index(exist);
836
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
837
- existIndex = this.index(exist);
838
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);
839
- let index;
840
- for (let id in this.indexes) {
841
- index = this.indexes[id];
842
- if (existIndex < index) this.indexes[id] = index + nodes.length;
843
- }
844
- this.markDirty();
845
- return this;
846
- }
847
- insertBefore(exist, add) {
848
- let existIndex = this.index(exist);
849
- let type = existIndex === 0 ? "prepend" : false;
850
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
851
- existIndex = this.index(exist);
852
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);
853
- let index;
854
- for (let id in this.indexes) {
855
- index = this.indexes[id];
856
- if (existIndex <= index) this.indexes[id] = index + nodes.length;
857
- }
858
- this.markDirty();
859
- return this;
860
- }
861
- normalize(nodes, sample) {
862
- if (typeof nodes === "string") nodes = cleanSource(parse(nodes).nodes);
863
- else if (typeof nodes === "undefined") nodes = [];
864
- else if (Array.isArray(nodes)) {
865
- nodes = nodes.slice(0);
866
- for (let i of nodes) if (i.parent) i.parent.removeChild(i, "ignore");
867
- } else if (nodes.type === "root" && this.type !== "document") {
868
- nodes = nodes.nodes.slice(0);
869
- for (let i of nodes) if (i.parent) i.parent.removeChild(i, "ignore");
870
- } else if (nodes.type) nodes = [nodes];
871
- else if (nodes.prop) {
872
- if (typeof nodes.value === "undefined") throw new Error("Value field is missed in node creation");
873
- else if (typeof nodes.value !== "string") nodes.value = String(nodes.value);
874
- nodes = [new Declaration(nodes)];
875
- } else if (nodes.selector || nodes.selectors) nodes = [new Rule(nodes)];
876
- else if (nodes.name) nodes = [new AtRule(nodes)];
877
- else if (nodes.text) nodes = [new Comment(nodes)];
878
- else throw new Error("Unknown node type in node creation");
879
- return nodes.map((i) => {
880
- /* c8 ignore next */
881
- if (!i[my]) Container.rebuild(i);
882
- i = i.proxyOf;
883
- if (i.parent) i.parent.removeChild(i);
884
- if (i[isClean]) markTreeDirty(i);
885
- if (!i.raws) i.raws = {};
886
- if (typeof i.raws.before === "undefined") {
887
- if (sample && typeof sample.raws.before !== "undefined") i.raws.before = sample.raws.before.replace(/\S/g, "");
888
- }
889
- i.parent = this.proxyOf;
890
- return i;
891
- });
892
- }
893
- prepend(...children) {
894
- children = children.reverse();
895
- for (let child of children) {
896
- let nodes = this.normalize(child, this.first, "prepend").reverse();
897
- for (let node of nodes) this.proxyOf.nodes.unshift(node);
898
- for (let id in this.indexes) this.indexes[id] = this.indexes[id] + nodes.length;
899
- }
900
- this.markDirty();
901
- return this;
902
- }
903
- push(child) {
904
- child.parent = this;
905
- this.proxyOf.nodes.push(child);
906
- return this;
907
- }
908
- removeAll() {
909
- for (let node of this.proxyOf.nodes) node.parent = void 0;
910
- this.proxyOf.nodes = [];
911
- this.markDirty();
912
- return this;
913
- }
914
- removeChild(child) {
915
- child = this.index(child);
916
- this.proxyOf.nodes[child].parent = void 0;
917
- this.proxyOf.nodes.splice(child, 1);
918
- let index;
919
- for (let id in this.indexes) {
920
- index = this.indexes[id];
921
- if (index >= child) this.indexes[id] = index - 1;
922
- }
923
- this.markDirty();
924
- return this;
925
- }
926
- replaceValues(pattern, opts, callback) {
927
- if (!callback) {
928
- callback = opts;
929
- opts = {};
930
- }
931
- this.walkDecls((decl) => {
932
- if (opts.props && !opts.props.includes(decl.prop)) return;
933
- if (opts.fast && !decl.value.includes(opts.fast)) return;
934
- decl.value = decl.value.replace(pattern, callback);
935
- });
936
- this.markDirty();
937
- return this;
938
- }
939
- some(condition) {
940
- return this.nodes.some(condition);
941
- }
942
- walk(callback) {
943
- return this.each((child, i) => {
944
- let result;
945
- try {
946
- result = callback(child, i);
947
- } catch (e) {
948
- throw child.addToError(e);
949
- }
950
- if (result !== false && child.walk) result = child.walk(callback);
951
- return result;
952
- });
953
- }
954
- walkAtRules(name, callback) {
955
- if (!callback) {
956
- callback = name;
957
- return this.walk((child, i) => {
958
- if (child.type === "atrule") return callback(child, i);
959
- });
960
- }
961
- if (name instanceof RegExp) return this.walk((child, i) => {
962
- if (child.type === "atrule" && name.test(child.name)) return callback(child, i);
963
- });
964
- return this.walk((child, i) => {
965
- if (child.type === "atrule" && child.name === name) return callback(child, i);
966
- });
967
- }
968
- walkComments(callback) {
969
- return this.walk((child, i) => {
970
- if (child.type === "comment") return callback(child, i);
971
- });
972
- }
973
- walkDecls(prop, callback) {
974
- if (!callback) {
975
- callback = prop;
976
- return this.walk((child, i) => {
977
- if (child.type === "decl") return callback(child, i);
978
- });
979
- }
980
- if (prop instanceof RegExp) return this.walk((child, i) => {
981
- if (child.type === "decl" && prop.test(child.prop)) return callback(child, i);
982
- });
983
- return this.walk((child, i) => {
984
- if (child.type === "decl" && child.prop === prop) return callback(child, i);
985
- });
986
- }
987
- walkRules(selector, callback) {
988
- if (!callback) {
989
- callback = selector;
990
- return this.walk((child, i) => {
991
- if (child.type === "rule") return callback(child, i);
992
- });
993
- }
994
- if (selector instanceof RegExp) return this.walk((child, i) => {
995
- if (child.type === "rule" && selector.test(child.selector)) return callback(child, i);
996
- });
997
- return this.walk((child, i) => {
998
- if (child.type === "rule" && child.selector === selector) return callback(child, i);
999
- });
1000
- }
1001
- };
1002
- Container.registerParse = (dependant) => {
1003
- parse = dependant;
1004
- };
1005
- Container.registerRule = (dependant) => {
1006
- Rule = dependant;
1007
- };
1008
- Container.registerAtRule = (dependant) => {
1009
- AtRule = dependant;
1010
- };
1011
- Container.registerRoot = (dependant) => {
1012
- Root = dependant;
1013
- };
1014
- module.exports = Container;
1015
- Container.default = Container;
1016
- /* c8 ignore start */
1017
- Container.rebuild = (node) => {
1018
- if (node.type === "atrule") Object.setPrototypeOf(node, AtRule.prototype);
1019
- else if (node.type === "rule") Object.setPrototypeOf(node, Rule.prototype);
1020
- else if (node.type === "decl") Object.setPrototypeOf(node, Declaration.prototype);
1021
- else if (node.type === "comment") Object.setPrototypeOf(node, Comment.prototype);
1022
- else if (node.type === "root") Object.setPrototypeOf(node, Root.prototype);
1023
- node[my] = true;
1024
- if (node.nodes) node.nodes.forEach((child) => {
1025
- Container.rebuild(child);
1026
- });
1027
- };
1028
- }));
1029
- /* c8 ignore stop */
1030
- //#endregion
1031
- //#region node_modules/postcss/lib/at-rule.js
1032
- var require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1033
- let Container = require_container();
1034
- var AtRule = class extends Container {
1035
- constructor(defaults) {
1036
- super(defaults);
1037
- this.type = "atrule";
1038
- }
1039
- append(...children) {
1040
- if (!this.proxyOf.nodes) this.nodes = [];
1041
- return super.append(...children);
1042
- }
1043
- prepend(...children) {
1044
- if (!this.proxyOf.nodes) this.nodes = [];
1045
- return super.prepend(...children);
1046
- }
1047
- };
1048
- module.exports = AtRule;
1049
- AtRule.default = AtRule;
1050
- Container.registerAtRule(AtRule);
1051
- }));
1052
- //#endregion
1053
- //#region node_modules/postcss/lib/document.js
1054
- var require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1055
- let Container = require_container();
1056
- let LazyResult, Processor;
1057
- var Document = class extends Container {
1058
- constructor(defaults) {
1059
- super({
1060
- type: "document",
1061
- ...defaults
1062
- });
1063
- if (!this.nodes) this.nodes = [];
1064
- }
1065
- toResult(opts = {}) {
1066
- return new LazyResult(new Processor(), this, opts).stringify();
1067
- }
1068
- };
1069
- Document.registerLazyResult = (dependant) => {
1070
- LazyResult = dependant;
1071
- };
1072
- Document.registerProcessor = (dependant) => {
1073
- Processor = dependant;
1074
- };
1075
- module.exports = Document;
1076
- Document.default = Document;
1077
- }));
1078
- //#endregion
1079
- //#region node_modules/nanoid/non-secure/index.cjs
1080
- var require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1081
- let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1082
- let customAlphabet = (alphabet, defaultSize = 21) => {
1083
- return (size = defaultSize) => {
1084
- let id = "";
1085
- let i = size | 0;
1086
- while (i--) id += alphabet[Math.random() * alphabet.length | 0];
1087
- return id;
1088
- };
1089
- };
1090
- let nanoid = (size = 21) => {
1091
- let id = "";
1092
- let i = size | 0;
1093
- while (i--) id += urlAlphabet[Math.random() * 64 | 0];
1094
- return id;
1095
- };
1096
- module.exports = {
1097
- nanoid,
1098
- customAlphabet
1099
- };
1100
- }));
1101
- //#endregion
1102
- //#region (ignored) node_modules/postcss/lib
1103
- var require_lib = /* @__PURE__ */ __commonJSMin((() => {}));
1104
- //#endregion
1105
- //#region node_modules/postcss/lib/previous-map.js
1106
- var require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1107
- let { existsSync, readFileSync } = require_lib();
1108
- let { dirname, join } = require_lib();
1109
- let { SourceMapConsumer, SourceMapGenerator } = require_lib();
1110
- function fromBase64(str) {
1111
- if (Buffer) return Buffer.from(str, "base64").toString();
1112
- else
1113
- /* c8 ignore next 2 */
1114
- return window.atob(str);
1115
- }
1116
- var PreviousMap = class {
1117
- constructor(css, opts) {
1118
- if (opts.map === false) return;
1119
- this.loadAnnotation(css);
1120
- this.inline = this.startWith(this.annotation, "data:");
1121
- let prev = opts.map ? opts.map.prev : void 0;
1122
- let text = this.loadMap(opts.from, prev);
1123
- if (!this.mapFile && opts.from) this.mapFile = opts.from;
1124
- if (this.mapFile) this.root = dirname(this.mapFile);
1125
- if (text) this.text = text;
1126
- }
1127
- consumer() {
1128
- if (!this.consumerCache) this.consumerCache = new SourceMapConsumer(this.text);
1129
- return this.consumerCache;
1130
- }
1131
- decodeInline(text) {
1132
- let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
1133
- let baseUri = /^data:application\/json;base64,/;
1134
- let uriMatch = text.match(/^data:application\/json;charset=utf-?8,/) || text.match(/^data:application\/json,/);
1135
- if (uriMatch) return decodeURIComponent(text.substr(uriMatch[0].length));
1136
- let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
1137
- if (baseUriMatch) return fromBase64(text.substr(baseUriMatch[0].length));
1138
- let encoding = text.match(/data:application\/json;([^,]+),/)[1];
1139
- throw new Error("Unsupported source map encoding " + encoding);
1140
- }
1141
- getAnnotationURL(sourceMapString) {
1142
- return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
1143
- }
1144
- isMap(map) {
1145
- if (typeof map !== "object") return false;
1146
- return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
1147
- }
1148
- loadAnnotation(css) {
1149
- let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
1150
- if (!comments) return;
1151
- let start = css.lastIndexOf(comments.pop());
1152
- let end = css.indexOf("*/", start);
1153
- if (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end));
1154
- }
1155
- loadFile(path) {
1156
- this.root = dirname(path);
1157
- if (existsSync(path)) {
1158
- this.mapFile = path;
1159
- return readFileSync(path, "utf-8").toString().trim();
1160
- }
1161
- }
1162
- loadMap(file, prev) {
1163
- if (prev === false) return false;
1164
- if (prev) if (typeof prev === "string") return prev;
1165
- else if (typeof prev === "function") {
1166
- let prevPath = prev(file);
1167
- if (prevPath) {
1168
- let map = this.loadFile(prevPath);
1169
- if (!map) throw new Error("Unable to load previous source map: " + prevPath.toString());
1170
- return map;
1171
- }
1172
- } else if (prev instanceof SourceMapConsumer) return SourceMapGenerator.fromSourceMap(prev).toString();
1173
- else if (prev instanceof SourceMapGenerator) return prev.toString();
1174
- else if (this.isMap(prev)) return JSON.stringify(prev);
1175
- else throw new Error("Unsupported previous source map format: " + prev.toString());
1176
- else if (this.inline) return this.decodeInline(this.annotation);
1177
- else if (this.annotation) {
1178
- let map = this.annotation;
1179
- if (file) map = join(dirname(file), map);
1180
- return this.loadFile(map);
1181
- }
1182
- }
1183
- startWith(string, start) {
1184
- if (!string) return false;
1185
- return string.substr(0, start.length) === start;
1186
- }
1187
- withContent() {
1188
- return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
1189
- }
1190
- };
1191
- module.exports = PreviousMap;
1192
- PreviousMap.default = PreviousMap;
1193
- }));
1194
- //#endregion
1195
- //#region node_modules/postcss/lib/input.js
1196
- var require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1197
- let { nanoid } = require_non_secure();
1198
- let { isAbsolute, resolve } = require_lib();
1199
- let { SourceMapConsumer, SourceMapGenerator } = require_lib();
1200
- let { fileURLToPath, pathToFileURL } = require_lib();
1201
- let CssSyntaxError = require_css_syntax_error();
1202
- let PreviousMap = require_previous_map();
1203
- let terminalHighlight = require_terminal_highlight();
1204
- let lineToIndexCache = Symbol("lineToIndexCache");
1205
- let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
1206
- let pathAvailable = Boolean(resolve && isAbsolute);
1207
- function getLineToIndex(input) {
1208
- if (input[lineToIndexCache]) return input[lineToIndexCache];
1209
- let lines = input.css.split("\n");
1210
- let lineToIndex = new Array(lines.length);
1211
- let prevIndex = 0;
1212
- for (let i = 0, l = lines.length; i < l; i++) {
1213
- lineToIndex[i] = prevIndex;
1214
- prevIndex += lines[i].length + 1;
1215
- }
1216
- input[lineToIndexCache] = lineToIndex;
1217
- return lineToIndex;
1218
- }
1219
- var Input = class {
1220
- get from() {
1221
- return this.file || this.id;
1222
- }
1223
- constructor(css, opts = {}) {
1224
- if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) throw new Error(`PostCSS received ${css} instead of CSS string`);
1225
- this.css = css.toString();
1226
- if (this.css[0] === "" || this.css[0] === "￾") {
1227
- this.hasBOM = true;
1228
- this.css = this.css.slice(1);
1229
- } else this.hasBOM = false;
1230
- this.document = this.css;
1231
- if (opts.document) this.document = opts.document.toString();
1232
- if (opts.from) if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) this.file = opts.from;
1233
- else this.file = resolve(opts.from);
1234
- if (pathAvailable && sourceMapAvailable) {
1235
- let map = new PreviousMap(this.css, opts);
1236
- if (map.text) {
1237
- this.map = map;
1238
- let file = map.consumer().file;
1239
- if (!this.file && file) this.file = this.mapResolve(file);
1240
- }
1241
- }
1242
- if (!this.file) this.id = "<input css " + nanoid(6) + ">";
1243
- if (this.map) this.map.file = this.from;
1244
- }
1245
- error(message, line, column, opts = {}) {
1246
- let endColumn, endLine, endOffset, offset, result;
1247
- if (line && typeof line === "object") {
1248
- let start = line;
1249
- let end = column;
1250
- if (typeof start.offset === "number") {
1251
- offset = start.offset;
1252
- let pos = this.fromOffset(offset);
1253
- line = pos.line;
1254
- column = pos.col;
1255
- } else {
1256
- line = start.line;
1257
- column = start.column;
1258
- offset = this.fromLineAndColumn(line, column);
1259
- }
1260
- if (typeof end.offset === "number") {
1261
- endOffset = end.offset;
1262
- let pos = this.fromOffset(endOffset);
1263
- endLine = pos.line;
1264
- endColumn = pos.col;
1265
- } else {
1266
- endLine = end.line;
1267
- endColumn = end.column;
1268
- endOffset = this.fromLineAndColumn(end.line, end.column);
1269
- }
1270
- } else if (!column) {
1271
- offset = line;
1272
- let pos = this.fromOffset(offset);
1273
- line = pos.line;
1274
- column = pos.col;
1275
- } else offset = this.fromLineAndColumn(line, column);
1276
- let origin = this.origin(line, column, endLine, endColumn);
1277
- if (origin) result = new CssSyntaxError(message, origin.endLine === void 0 ? origin.line : {
1278
- column: origin.column,
1279
- line: origin.line
1280
- }, origin.endLine === void 0 ? origin.column : {
1281
- column: origin.endColumn,
1282
- line: origin.endLine
1283
- }, origin.source, origin.file, opts.plugin);
1284
- else result = new CssSyntaxError(message, endLine === void 0 ? line : {
1285
- column,
1286
- line
1287
- }, endLine === void 0 ? column : {
1288
- column: endColumn,
1289
- line: endLine
1290
- }, this.css, this.file, opts.plugin);
1291
- result.input = {
1292
- column,
1293
- endColumn,
1294
- endLine,
1295
- endOffset,
1296
- line,
1297
- offset,
1298
- source: this.css
1299
- };
1300
- if (this.file) {
1301
- if (pathToFileURL) result.input.url = pathToFileURL(this.file).toString();
1302
- result.input.file = this.file;
1303
- }
1304
- return result;
1305
- }
1306
- fromLineAndColumn(line, column) {
1307
- return getLineToIndex(this)[line - 1] + column - 1;
1308
- }
1309
- fromOffset(offset) {
1310
- let lineToIndex = getLineToIndex(this);
1311
- let lastLine = lineToIndex[lineToIndex.length - 1];
1312
- let min = 0;
1313
- if (offset >= lastLine) min = lineToIndex.length - 1;
1314
- else {
1315
- let max = lineToIndex.length - 2;
1316
- let mid;
1317
- while (min < max) {
1318
- mid = min + (max - min >> 1);
1319
- if (offset < lineToIndex[mid]) max = mid - 1;
1320
- else if (offset >= lineToIndex[mid + 1]) min = mid + 1;
1321
- else {
1322
- min = mid;
1323
- break;
1324
- }
1325
- }
1326
- }
1327
- return {
1328
- col: offset - lineToIndex[min] + 1,
1329
- line: min + 1
1330
- };
1331
- }
1332
- mapResolve(file) {
1333
- if (/^\w+:\/\//.test(file)) return file;
1334
- return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
1335
- }
1336
- origin(line, column, endLine, endColumn) {
1337
- if (!this.map) return false;
1338
- let consumer = this.map.consumer();
1339
- let from = consumer.originalPositionFor({
1340
- column,
1341
- line
1342
- });
1343
- if (!from.source) return false;
1344
- let to;
1345
- if (typeof endLine === "number") to = consumer.originalPositionFor({
1346
- column: endColumn,
1347
- line: endLine
1348
- });
1349
- let fromUrl;
1350
- if (isAbsolute(from.source)) fromUrl = pathToFileURL(from.source);
1351
- else fromUrl = new URL(from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile));
1352
- let result = {
1353
- column: from.column,
1354
- endColumn: to && to.column,
1355
- endLine: to && to.line,
1356
- line: from.line,
1357
- url: fromUrl.toString()
1358
- };
1359
- if (fromUrl.protocol === "file:") if (fileURLToPath) result.file = fileURLToPath(fromUrl);
1360
- else
1361
- /* c8 ignore next 2 */
1362
- throw new Error(`file: protocol is not available in this PostCSS build`);
1363
- let source = consumer.sourceContentFor(from.source);
1364
- if (source) result.source = source;
1365
- return result;
1366
- }
1367
- toJSON() {
1368
- let json = {};
1369
- for (let name of [
1370
- "hasBOM",
1371
- "css",
1372
- "file",
1373
- "id"
1374
- ]) if (this[name] != null) json[name] = this[name];
1375
- if (this.map) {
1376
- json.map = { ...this.map };
1377
- if (json.map.consumerCache) json.map.consumerCache = void 0;
1378
- }
1379
- return json;
1380
- }
1381
- };
1382
- module.exports = Input;
1383
- Input.default = Input;
1384
- if (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);
1385
- }));
1386
- //#endregion
1387
- //#region node_modules/postcss/lib/root.js
1388
- var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1389
- let Container = require_container();
1390
- let LazyResult, Processor;
1391
- var Root = class extends Container {
1392
- constructor(defaults) {
1393
- super(defaults);
1394
- this.type = "root";
1395
- if (!this.nodes) this.nodes = [];
1396
- }
1397
- normalize(child, sample, type) {
1398
- let nodes = super.normalize(child);
1399
- if (sample) {
1400
- if (type === "prepend") if (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before;
1401
- else delete sample.raws.before;
1402
- else if (this.first !== sample) for (let node of nodes) node.raws.before = sample.raws.before;
1403
- }
1404
- return nodes;
1405
- }
1406
- removeChild(child, ignore) {
1407
- let index = this.index(child);
1408
- if (!ignore && index === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index].raws.before;
1409
- return super.removeChild(child);
1410
- }
1411
- toResult(opts = {}) {
1412
- return new LazyResult(new Processor(), this, opts).stringify();
1413
- }
1414
- };
1415
- Root.registerLazyResult = (dependant) => {
1416
- LazyResult = dependant;
1417
- };
1418
- Root.registerProcessor = (dependant) => {
1419
- Processor = dependant;
1420
- };
1421
- module.exports = Root;
1422
- Root.default = Root;
1423
- Container.registerRoot(Root);
1424
- }));
1425
- //#endregion
1426
- //#region node_modules/postcss/lib/list.js
1427
- var require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1428
- let list = {
1429
- comma(string) {
1430
- return list.split(string, [","], true);
1431
- },
1432
- space(string) {
1433
- return list.split(string, [
1434
- " ",
1435
- "\n",
1436
- " "
1437
- ]);
1438
- },
1439
- split(string, separators, last) {
1440
- let array = [];
1441
- let current = "";
1442
- let split = false;
1443
- let func = 0;
1444
- let inQuote = false;
1445
- let prevQuote = "";
1446
- let escape = false;
1447
- for (let letter of string) {
1448
- if (escape) escape = false;
1449
- else if (letter === "\\") escape = true;
1450
- else if (inQuote) {
1451
- if (letter === prevQuote) inQuote = false;
1452
- } else if (letter === "\"" || letter === "'") {
1453
- inQuote = true;
1454
- prevQuote = letter;
1455
- } else if (letter === "(") func += 1;
1456
- else if (letter === ")") {
1457
- if (func > 0) func -= 1;
1458
- } else if (func === 0) {
1459
- if (separators.includes(letter)) split = true;
1460
- }
1461
- if (split) {
1462
- if (current !== "") array.push(current.trim());
1463
- current = "";
1464
- split = false;
1465
- } else current += letter;
1466
- }
1467
- if (last || current !== "") array.push(current.trim());
1468
- return array;
1469
- }
1470
- };
1471
- module.exports = list;
1472
- list.default = list;
1473
- }));
1474
- //#endregion
1475
- //#region node_modules/postcss/lib/rule.js
1476
- var require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1477
- let Container = require_container();
1478
- let list = require_list();
1479
- var Rule = class extends Container {
1480
- get selectors() {
1481
- return list.comma(this.selector);
1482
- }
1483
- set selectors(values) {
1484
- let match = this.selector ? this.selector.match(/,\s*/) : null;
1485
- let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
1486
- this.selector = values.join(sep);
1487
- }
1488
- constructor(defaults) {
1489
- super(defaults);
1490
- this.type = "rule";
1491
- if (!this.nodes) this.nodes = [];
1492
- }
1493
- };
1494
- module.exports = Rule;
1495
- Rule.default = Rule;
1496
- Container.registerRule(Rule);
1497
- }));
1498
- //#endregion
1499
- //#region node_modules/postcss/lib/fromJSON.js
1500
- var require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1501
- let AtRule = require_at_rule();
1502
- let Comment = require_comment();
1503
- let Declaration = require_declaration();
1504
- let Input = require_input();
1505
- let PreviousMap = require_previous_map();
1506
- let Root = require_root();
1507
- let Rule = require_rule();
1508
- function fromJSON(json, inputs) {
1509
- if (Array.isArray(json)) return json.map((n) => fromJSON(n));
1510
- let { inputs: ownInputs, ...defaults } = json;
1511
- if (ownInputs) {
1512
- inputs = [];
1513
- for (let input of ownInputs) {
1514
- let inputHydrated = {
1515
- ...input,
1516
- __proto__: Input.prototype
1517
- };
1518
- if (inputHydrated.map) inputHydrated.map = {
1519
- ...inputHydrated.map,
1520
- __proto__: PreviousMap.prototype
1521
- };
1522
- inputs.push(inputHydrated);
1523
- }
1524
- }
1525
- if (defaults.nodes) defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
1526
- if (defaults.source) {
1527
- let { inputId, ...source } = defaults.source;
1528
- defaults.source = source;
1529
- if (inputId != null) defaults.source.input = inputs[inputId];
1530
- }
1531
- if (defaults.type === "root") return new Root(defaults);
1532
- else if (defaults.type === "decl") return new Declaration(defaults);
1533
- else if (defaults.type === "rule") return new Rule(defaults);
1534
- else if (defaults.type === "comment") return new Comment(defaults);
1535
- else if (defaults.type === "atrule") return new AtRule(defaults);
1536
- else throw new Error("Unknown node type: " + json.type);
1537
- }
1538
- module.exports = fromJSON;
1539
- fromJSON.default = fromJSON;
1540
- }));
1541
- //#endregion
1542
- //#region node_modules/postcss/lib/map-generator.js
1543
- var require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1544
- let { dirname, relative, resolve, sep } = require_lib();
1545
- let { SourceMapConsumer, SourceMapGenerator } = require_lib();
1546
- let { pathToFileURL } = require_lib();
1547
- let Input = require_input();
1548
- let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
1549
- let pathAvailable = Boolean(dirname && resolve && relative && sep);
1550
- var MapGenerator = class {
1551
- constructor(stringify, root, opts, cssString) {
1552
- this.stringify = stringify;
1553
- this.mapOpts = opts.map || {};
1554
- this.root = root;
1555
- this.opts = opts;
1556
- this.css = cssString;
1557
- this.originalCSS = cssString;
1558
- this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
1559
- this.memoizedFileURLs = /* @__PURE__ */ new Map();
1560
- this.memoizedPaths = /* @__PURE__ */ new Map();
1561
- this.memoizedURLs = /* @__PURE__ */ new Map();
1562
- }
1563
- addAnnotation() {
1564
- let content;
1565
- if (this.isInline()) content = "data:application/json;base64," + this.toBase64(this.map.toString());
1566
- else if (typeof this.mapOpts.annotation === "string") content = this.mapOpts.annotation;
1567
- else if (typeof this.mapOpts.annotation === "function") content = this.mapOpts.annotation(this.opts.to, this.root);
1568
- else content = this.outputFile() + ".map";
1569
- let eol = "\n";
1570
- if (this.css.includes("\r\n")) eol = "\r\n";
1571
- this.css += eol + "/*# sourceMappingURL=" + content + " */";
1572
- }
1573
- applyPrevMaps() {
1574
- for (let prev of this.previous()) {
1575
- let from = this.toUrl(this.path(prev.file));
1576
- let root = prev.root || dirname(prev.file);
1577
- let map;
1578
- if (this.mapOpts.sourcesContent === false) {
1579
- map = new SourceMapConsumer(prev.text);
1580
- if (map.sourcesContent) map.sourcesContent = null;
1581
- } else map = prev.consumer();
1582
- this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
1583
- }
1584
- }
1585
- clearAnnotation() {
1586
- if (this.mapOpts.annotation === false) return;
1587
- if (this.root) {
1588
- let node;
1589
- for (let i = this.root.nodes.length - 1; i >= 0; i--) {
1590
- node = this.root.nodes[i];
1591
- if (node.type !== "comment") continue;
1592
- if (node.text.startsWith("# sourceMappingURL=")) this.root.removeChild(i);
1593
- }
1594
- } else if (this.css) {
1595
- let startIndex;
1596
- while ((startIndex = this.css.lastIndexOf("/*#")) !== -1) {
1597
- let endIndex = this.css.indexOf("*/", startIndex + 3);
1598
- if (endIndex === -1) break;
1599
- while (startIndex > 0 && this.css[startIndex - 1] === "\n") startIndex--;
1600
- this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2);
1601
- }
1602
- }
1603
- }
1604
- generate() {
1605
- this.clearAnnotation();
1606
- if (pathAvailable && sourceMapAvailable && this.isMap()) return this.generateMap();
1607
- else {
1608
- let result = "";
1609
- this.stringify(this.root, (i) => {
1610
- result += i;
1611
- });
1612
- return [result];
1613
- }
1614
- }
1615
- generateMap() {
1616
- if (this.root) this.generateString();
1617
- else if (this.previous().length === 1) {
1618
- let prev = this.previous()[0].consumer();
1619
- prev.file = this.outputFile();
1620
- this.map = SourceMapGenerator.fromSourceMap(prev, { ignoreInvalidMapping: true });
1621
- } else {
1622
- this.map = new SourceMapGenerator({
1623
- file: this.outputFile(),
1624
- ignoreInvalidMapping: true
1625
- });
1626
- this.map.addMapping({
1627
- generated: {
1628
- column: 0,
1629
- line: 1
1630
- },
1631
- original: {
1632
- column: 0,
1633
- line: 1
1634
- },
1635
- source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
1636
- });
1637
- }
1638
- if (this.isSourcesContent()) this.setSourcesContent();
1639
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
1640
- if (this.isAnnotation()) this.addAnnotation();
1641
- if (this.isInline()) return [this.css];
1642
- else return [this.css, this.map];
1643
- }
1644
- generateString() {
1645
- this.css = "";
1646
- this.map = new SourceMapGenerator({
1647
- file: this.outputFile(),
1648
- ignoreInvalidMapping: true
1649
- });
1650
- let line = 1;
1651
- let column = 1;
1652
- let noSource = "<no source>";
1653
- let mapping = {
1654
- generated: {
1655
- column: 0,
1656
- line: 0
1657
- },
1658
- original: {
1659
- column: 0,
1660
- line: 0
1661
- },
1662
- source: ""
1663
- };
1664
- let last, lines;
1665
- this.stringify(this.root, (str, node, type) => {
1666
- this.css += str;
1667
- if (node && type !== "end") {
1668
- mapping.generated.line = line;
1669
- mapping.generated.column = column - 1;
1670
- if (node.source && node.source.start) {
1671
- mapping.source = this.sourcePath(node);
1672
- mapping.original.line = node.source.start.line;
1673
- mapping.original.column = node.source.start.column - 1;
1674
- this.map.addMapping(mapping);
1675
- } else {
1676
- mapping.source = noSource;
1677
- mapping.original.line = 1;
1678
- mapping.original.column = 0;
1679
- this.map.addMapping(mapping);
1680
- }
1681
- }
1682
- lines = str.match(/\n/g);
1683
- if (lines) {
1684
- line += lines.length;
1685
- last = str.lastIndexOf("\n");
1686
- column = str.length - last;
1687
- } else column += str.length;
1688
- if (node && type !== "start") {
1689
- let p = node.parent || { raws: {} };
1690
- if (!(node.type === "decl" || node.type === "atrule" && !node.nodes) || node !== p.last || p.raws.semicolon) if (node.source && node.source.end) {
1691
- mapping.source = this.sourcePath(node);
1692
- mapping.original.line = node.source.end.line;
1693
- mapping.original.column = node.source.end.column - 1;
1694
- mapping.generated.line = line;
1695
- mapping.generated.column = column - 2;
1696
- this.map.addMapping(mapping);
1697
- } else {
1698
- mapping.source = noSource;
1699
- mapping.original.line = 1;
1700
- mapping.original.column = 0;
1701
- mapping.generated.line = line;
1702
- mapping.generated.column = column - 1;
1703
- this.map.addMapping(mapping);
1704
- }
1705
- }
1706
- });
1707
- }
1708
- isAnnotation() {
1709
- if (this.isInline()) return true;
1710
- if (typeof this.mapOpts.annotation !== "undefined") return this.mapOpts.annotation;
1711
- if (this.previous().length) return this.previous().some((i) => i.annotation);
1712
- return true;
1713
- }
1714
- isInline() {
1715
- if (typeof this.mapOpts.inline !== "undefined") return this.mapOpts.inline;
1716
- let annotation = this.mapOpts.annotation;
1717
- if (typeof annotation !== "undefined" && annotation !== true) return false;
1718
- if (this.previous().length) return this.previous().some((i) => i.inline);
1719
- return true;
1720
- }
1721
- isMap() {
1722
- if (typeof this.opts.map !== "undefined") return !!this.opts.map;
1723
- return this.previous().length > 0;
1724
- }
1725
- isSourcesContent() {
1726
- if (typeof this.mapOpts.sourcesContent !== "undefined") return this.mapOpts.sourcesContent;
1727
- if (this.previous().length) return this.previous().some((i) => i.withContent());
1728
- return true;
1729
- }
1730
- outputFile() {
1731
- if (this.opts.to) return this.path(this.opts.to);
1732
- else if (this.opts.from) return this.path(this.opts.from);
1733
- else return "to.css";
1734
- }
1735
- path(file) {
1736
- if (this.mapOpts.absolute) return file;
1737
- if (file.charCodeAt(0) === 60) return file;
1738
- if (/^\w+:\/\//.test(file)) return file;
1739
- let cached = this.memoizedPaths.get(file);
1740
- if (cached) return cached;
1741
- let from = this.opts.to ? dirname(this.opts.to) : ".";
1742
- if (typeof this.mapOpts.annotation === "string") from = dirname(resolve(from, this.mapOpts.annotation));
1743
- let path = relative(from, file);
1744
- this.memoizedPaths.set(file, path);
1745
- return path;
1746
- }
1747
- previous() {
1748
- if (!this.previousMaps) {
1749
- this.previousMaps = [];
1750
- if (this.root) this.root.walk((node) => {
1751
- if (node.source && node.source.input.map) {
1752
- let map = node.source.input.map;
1753
- if (!this.previousMaps.includes(map)) this.previousMaps.push(map);
1754
- }
1755
- });
1756
- else {
1757
- let input = new Input(this.originalCSS, this.opts);
1758
- if (input.map) this.previousMaps.push(input.map);
1759
- }
1760
- }
1761
- return this.previousMaps;
1762
- }
1763
- setSourcesContent() {
1764
- let already = {};
1765
- if (this.root) this.root.walk((node) => {
1766
- if (node.source) {
1767
- let from = node.source.input.from;
1768
- if (from && !already[from]) {
1769
- already[from] = true;
1770
- let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
1771
- this.map.setSourceContent(fromUrl, node.source.input.css);
1772
- }
1773
- }
1774
- });
1775
- else if (this.css) {
1776
- let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
1777
- this.map.setSourceContent(from, this.css);
1778
- }
1779
- }
1780
- sourcePath(node) {
1781
- if (this.mapOpts.from) return this.toUrl(this.mapOpts.from);
1782
- else if (this.usesFileUrls) return this.toFileUrl(node.source.input.from);
1783
- else return this.toUrl(this.path(node.source.input.from));
1784
- }
1785
- toBase64(str) {
1786
- if (Buffer) return Buffer.from(str).toString("base64");
1787
- else return window.btoa(unescape(encodeURIComponent(str)));
1788
- }
1789
- toFileUrl(path) {
1790
- let cached = this.memoizedFileURLs.get(path);
1791
- if (cached) return cached;
1792
- if (pathToFileURL) {
1793
- let fileURL = pathToFileURL(path).toString();
1794
- this.memoizedFileURLs.set(path, fileURL);
1795
- return fileURL;
1796
- } else throw new Error("`map.absolute` option is not available in this PostCSS build");
1797
- }
1798
- toUrl(path) {
1799
- let cached = this.memoizedURLs.get(path);
1800
- if (cached) return cached;
1801
- if (sep === "\\") path = path.replace(/\\/g, "/");
1802
- let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
1803
- this.memoizedURLs.set(path, url);
1804
- return url;
1805
- }
1806
- };
1807
- module.exports = MapGenerator;
1808
- }));
1809
- //#endregion
1810
- //#region node_modules/postcss/lib/tokenize.js
1811
- var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1812
- const SINGLE_QUOTE = "'".charCodeAt(0);
1813
- const DOUBLE_QUOTE = "\"".charCodeAt(0);
1814
- const BACKSLASH = "\\".charCodeAt(0);
1815
- const SLASH = "/".charCodeAt(0);
1816
- const NEWLINE = "\n".charCodeAt(0);
1817
- const SPACE = " ".charCodeAt(0);
1818
- const FEED = "\f".charCodeAt(0);
1819
- const TAB = " ".charCodeAt(0);
1820
- const CR = "\r".charCodeAt(0);
1821
- const OPEN_SQUARE = "[".charCodeAt(0);
1822
- const CLOSE_SQUARE = "]".charCodeAt(0);
1823
- const OPEN_PARENTHESES = "(".charCodeAt(0);
1824
- const CLOSE_PARENTHESES = ")".charCodeAt(0);
1825
- const OPEN_CURLY = "{".charCodeAt(0);
1826
- const CLOSE_CURLY = "}".charCodeAt(0);
1827
- const SEMICOLON = ";".charCodeAt(0);
1828
- const ASTERISK = "*".charCodeAt(0);
1829
- const COLON = ":".charCodeAt(0);
1830
- const AT = "@".charCodeAt(0);
1831
- const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g;
1832
- const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;
1833
- const RE_BAD_BRACKET = /.[\r\n"'(/\\]/;
1834
- const RE_HEX_ESCAPE = /[\da-f]/i;
1835
- module.exports = function tokenizer(input, options = {}) {
1836
- let css = input.css.valueOf();
1837
- let ignore = options.ignoreErrors;
1838
- let code, content, escape, next, quote;
1839
- let currentToken, escaped, escapePos, n, prev;
1840
- let length = css.length;
1841
- let pos = 0;
1842
- let buffer = [];
1843
- let returned = [];
1844
- function position() {
1845
- return pos;
1846
- }
1847
- function unclosed(what) {
1848
- throw input.error("Unclosed " + what, pos);
1849
- }
1850
- function endOfFile() {
1851
- return returned.length === 0 && pos >= length;
1852
- }
1853
- function nextToken(opts) {
1854
- if (returned.length) return returned.pop();
1855
- if (pos >= length) return;
1856
- let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
1857
- code = css.charCodeAt(pos);
1858
- switch (code) {
1859
- case NEWLINE:
1860
- case SPACE:
1861
- case TAB:
1862
- case CR:
1863
- case FEED:
1864
- next = pos;
1865
- do {
1866
- next += 1;
1867
- code = css.charCodeAt(next);
1868
- } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);
1869
- currentToken = ["space", css.slice(pos, next)];
1870
- pos = next - 1;
1871
- break;
1872
- case OPEN_SQUARE:
1873
- case CLOSE_SQUARE:
1874
- case OPEN_CURLY:
1875
- case CLOSE_CURLY:
1876
- case COLON:
1877
- case SEMICOLON:
1878
- case CLOSE_PARENTHESES: {
1879
- let controlChar = String.fromCharCode(code);
1880
- currentToken = [
1881
- controlChar,
1882
- controlChar,
1883
- pos
1884
- ];
1885
- break;
1886
- }
1887
- case OPEN_PARENTHESES:
1888
- prev = buffer.length ? buffer.pop()[1] : "";
1889
- n = css.charCodeAt(pos + 1);
1890
- if (prev === "url" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {
1891
- next = pos;
1892
- do {
1893
- escaped = false;
1894
- next = css.indexOf(")", next + 1);
1895
- if (next === -1) if (ignore || ignoreUnclosed) {
1896
- next = pos;
1897
- break;
1898
- } else unclosed("bracket");
1899
- escapePos = next;
1900
- while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
1901
- escapePos -= 1;
1902
- escaped = !escaped;
1903
- }
1904
- } while (escaped);
1905
- currentToken = [
1906
- "brackets",
1907
- css.slice(pos, next + 1),
1908
- pos,
1909
- next
1910
- ];
1911
- pos = next;
1912
- } else {
1913
- next = css.indexOf(")", pos + 1);
1914
- content = css.slice(pos, next + 1);
1915
- if (next === -1 || RE_BAD_BRACKET.test(content)) currentToken = [
1916
- "(",
1917
- "(",
1918
- pos
1919
- ];
1920
- else {
1921
- currentToken = [
1922
- "brackets",
1923
- content,
1924
- pos,
1925
- next
1926
- ];
1927
- pos = next;
1928
- }
1929
- }
1930
- break;
1931
- case SINGLE_QUOTE:
1932
- case DOUBLE_QUOTE:
1933
- quote = code === SINGLE_QUOTE ? "'" : "\"";
1934
- next = pos;
1935
- do {
1936
- escaped = false;
1937
- next = css.indexOf(quote, next + 1);
1938
- if (next === -1) if (ignore || ignoreUnclosed) {
1939
- next = pos + 1;
1940
- break;
1941
- } else unclosed("string");
1942
- escapePos = next;
1943
- while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
1944
- escapePos -= 1;
1945
- escaped = !escaped;
1946
- }
1947
- } while (escaped);
1948
- currentToken = [
1949
- "string",
1950
- css.slice(pos, next + 1),
1951
- pos,
1952
- next
1953
- ];
1954
- pos = next;
1955
- break;
1956
- case AT:
1957
- RE_AT_END.lastIndex = pos + 1;
1958
- RE_AT_END.test(css);
1959
- if (RE_AT_END.lastIndex === 0) next = css.length - 1;
1960
- else next = RE_AT_END.lastIndex - 2;
1961
- currentToken = [
1962
- "at-word",
1963
- css.slice(pos, next + 1),
1964
- pos,
1965
- next
1966
- ];
1967
- pos = next;
1968
- break;
1969
- case BACKSLASH:
1970
- next = pos;
1971
- escape = true;
1972
- while (css.charCodeAt(next + 1) === BACKSLASH) {
1973
- next += 1;
1974
- escape = !escape;
1975
- }
1976
- code = css.charCodeAt(next + 1);
1977
- if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {
1978
- next += 1;
1979
- if (RE_HEX_ESCAPE.test(css.charAt(next))) {
1980
- while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) next += 1;
1981
- if (css.charCodeAt(next + 1) === SPACE) next += 1;
1982
- }
1983
- }
1984
- currentToken = [
1985
- "word",
1986
- css.slice(pos, next + 1),
1987
- pos,
1988
- next
1989
- ];
1990
- pos = next;
1991
- break;
1992
- default:
1993
- if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
1994
- next = css.indexOf("*/", pos + 2) + 1;
1995
- if (next === 0) if (ignore || ignoreUnclosed) next = css.length;
1996
- else unclosed("comment");
1997
- currentToken = [
1998
- "comment",
1999
- css.slice(pos, next + 1),
2000
- pos,
2001
- next
2002
- ];
2003
- pos = next;
2004
- } else {
2005
- RE_WORD_END.lastIndex = pos + 1;
2006
- RE_WORD_END.test(css);
2007
- if (RE_WORD_END.lastIndex === 0) next = css.length - 1;
2008
- else next = RE_WORD_END.lastIndex - 2;
2009
- currentToken = [
2010
- "word",
2011
- css.slice(pos, next + 1),
2012
- pos,
2013
- next
2014
- ];
2015
- buffer.push(currentToken);
2016
- pos = next;
2017
- }
2018
- break;
2019
- }
2020
- pos++;
2021
- return currentToken;
2022
- }
2023
- function back(token) {
2024
- returned.push(token);
2025
- }
2026
- return {
2027
- back,
2028
- endOfFile,
2029
- nextToken,
2030
- position
2031
- };
2032
- };
2033
- }));
2034
- //#endregion
2035
- //#region node_modules/postcss/lib/parser.js
2036
- var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2037
- let AtRule = require_at_rule();
2038
- let Comment = require_comment();
2039
- let Declaration = require_declaration();
2040
- let Root = require_root();
2041
- let Rule = require_rule();
2042
- let tokenizer = require_tokenize();
2043
- const SAFE_COMMENT_NEIGHBOR = {
2044
- empty: true,
2045
- space: true
2046
- };
2047
- function findLastWithPosition(tokens) {
2048
- for (let i = tokens.length - 1; i >= 0; i--) {
2049
- let token = tokens[i];
2050
- let pos = token[3] || token[2];
2051
- if (pos) return pos;
2052
- }
2053
- }
2054
- var Parser = class {
2055
- constructor(input) {
2056
- this.input = input;
2057
- this.root = new Root();
2058
- this.current = this.root;
2059
- this.spaces = "";
2060
- this.semicolon = false;
2061
- this.createTokenizer();
2062
- this.root.source = {
2063
- input,
2064
- start: {
2065
- column: 1,
2066
- line: 1,
2067
- offset: 0
2068
- }
2069
- };
2070
- }
2071
- atrule(token) {
2072
- let node = new AtRule();
2073
- node.name = token[1].slice(1);
2074
- if (node.name === "") this.unnamedAtrule(node, token);
2075
- this.init(node, token[2]);
2076
- let type;
2077
- let prev;
2078
- let shift;
2079
- let last = false;
2080
- let open = false;
2081
- let params = [];
2082
- let brackets = [];
2083
- while (!this.tokenizer.endOfFile()) {
2084
- token = this.tokenizer.nextToken();
2085
- type = token[0];
2086
- if (type === "(" || type === "[") brackets.push(type === "(" ? ")" : "]");
2087
- else if (type === "{" && brackets.length > 0) brackets.push("}");
2088
- else if (type === brackets[brackets.length - 1]) brackets.pop();
2089
- if (brackets.length === 0) if (type === ";") {
2090
- node.source.end = this.getPosition(token[2]);
2091
- node.source.end.offset++;
2092
- this.semicolon = true;
2093
- break;
2094
- } else if (type === "{") {
2095
- open = true;
2096
- break;
2097
- } else if (type === "}") {
2098
- if (params.length > 0) {
2099
- shift = params.length - 1;
2100
- prev = params[shift];
2101
- while (prev && prev[0] === "space") prev = params[--shift];
2102
- if (prev) {
2103
- node.source.end = this.getPosition(prev[3] || prev[2]);
2104
- node.source.end.offset++;
2105
- }
2106
- }
2107
- this.end(token);
2108
- break;
2109
- } else params.push(token);
2110
- else params.push(token);
2111
- if (this.tokenizer.endOfFile()) {
2112
- last = true;
2113
- break;
2114
- }
2115
- }
2116
- node.raws.between = this.spacesAndCommentsFromEnd(params);
2117
- if (params.length) {
2118
- node.raws.afterName = this.spacesAndCommentsFromStart(params);
2119
- this.raw(node, "params", params);
2120
- if (last) {
2121
- token = params[params.length - 1];
2122
- node.source.end = this.getPosition(token[3] || token[2]);
2123
- node.source.end.offset++;
2124
- this.spaces = node.raws.between;
2125
- node.raws.between = "";
2126
- }
2127
- } else {
2128
- node.raws.afterName = "";
2129
- node.params = "";
2130
- }
2131
- if (open) {
2132
- node.nodes = [];
2133
- this.current = node;
2134
- }
2135
- }
2136
- checkMissedSemicolon(tokens) {
2137
- let colon = this.colon(tokens);
2138
- if (colon === false) return;
2139
- let founded = 0;
2140
- let token;
2141
- for (let j = colon - 1; j >= 0; j--) {
2142
- token = tokens[j];
2143
- if (token[0] !== "space") {
2144
- founded += 1;
2145
- if (founded === 2) break;
2146
- }
2147
- }
2148
- throw this.input.error("Missed semicolon", token[0] === "word" ? token[3] + 1 : token[2]);
2149
- }
2150
- colon(tokens) {
2151
- let brackets = 0;
2152
- let prev, token, type;
2153
- for (let [i, element] of tokens.entries()) {
2154
- token = element;
2155
- type = token[0];
2156
- if (type === "(") brackets += 1;
2157
- if (type === ")") brackets -= 1;
2158
- if (brackets === 0 && type === ":") if (!prev) this.doubleColon(token);
2159
- else if (prev[0] === "word" && prev[1] === "progid") continue;
2160
- else return i;
2161
- prev = token;
2162
- }
2163
- return false;
2164
- }
2165
- comment(token) {
2166
- let node = new Comment();
2167
- this.init(node, token[2]);
2168
- node.source.end = this.getPosition(token[3] || token[2]);
2169
- node.source.end.offset++;
2170
- let text = token[1].slice(2, -2);
2171
- if (!text.trim()) {
2172
- node.text = "";
2173
- node.raws.left = text;
2174
- node.raws.right = "";
2175
- } else {
2176
- let match = text.match(/^(\s*)([^]*\S)(\s*)$/);
2177
- node.text = match[2];
2178
- node.raws.left = match[1];
2179
- node.raws.right = match[3];
2180
- }
2181
- }
2182
- createTokenizer() {
2183
- this.tokenizer = tokenizer(this.input);
2184
- }
2185
- decl(tokens, customProperty) {
2186
- let node = new Declaration();
2187
- this.init(node, tokens[0][2]);
2188
- let last = tokens[tokens.length - 1];
2189
- if (last[0] === ";") {
2190
- this.semicolon = true;
2191
- tokens.pop();
2192
- }
2193
- node.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens));
2194
- node.source.end.offset++;
2195
- while (tokens[0][0] !== "word") {
2196
- if (tokens.length === 1) this.unknownWord(tokens);
2197
- node.raws.before += tokens.shift()[1];
2198
- }
2199
- node.source.start = this.getPosition(tokens[0][2]);
2200
- node.prop = "";
2201
- while (tokens.length) {
2202
- let type = tokens[0][0];
2203
- if (type === ":" || type === "space" || type === "comment") break;
2204
- node.prop += tokens.shift()[1];
2205
- }
2206
- node.raws.between = "";
2207
- let token;
2208
- while (tokens.length) {
2209
- token = tokens.shift();
2210
- if (token[0] === ":") {
2211
- node.raws.between += token[1];
2212
- break;
2213
- } else {
2214
- if (token[0] === "word" && /\w/.test(token[1])) this.unknownWord([token]);
2215
- node.raws.between += token[1];
2216
- }
2217
- }
2218
- if (node.prop[0] === "_" || node.prop[0] === "*") {
2219
- node.raws.before += node.prop[0];
2220
- node.prop = node.prop.slice(1);
2221
- }
2222
- let firstSpaces = [];
2223
- let next;
2224
- while (tokens.length) {
2225
- next = tokens[0][0];
2226
- if (next !== "space" && next !== "comment") break;
2227
- firstSpaces.push(tokens.shift());
2228
- }
2229
- this.precheckMissedSemicolon(tokens);
2230
- for (let i = tokens.length - 1; i >= 0; i--) {
2231
- token = tokens[i];
2232
- if (token[1].toLowerCase() === "!important") {
2233
- node.important = true;
2234
- let string = this.stringFrom(tokens, i);
2235
- string = this.spacesFromEnd(tokens) + string;
2236
- if (string !== " !important") node.raws.important = string;
2237
- break;
2238
- } else if (token[1].toLowerCase() === "important") {
2239
- let cache = tokens.slice(0);
2240
- let str = "";
2241
- for (let j = i; j > 0; j--) {
2242
- let type = cache[j][0];
2243
- if (str.trim().startsWith("!") && type !== "space") break;
2244
- str = cache.pop()[1] + str;
2245
- }
2246
- if (str.trim().startsWith("!")) {
2247
- node.important = true;
2248
- node.raws.important = str;
2249
- tokens = cache;
2250
- }
2251
- }
2252
- if (token[0] !== "space" && token[0] !== "comment") break;
2253
- }
2254
- if (tokens.some((i) => i[0] !== "space" && i[0] !== "comment")) {
2255
- node.raws.between += firstSpaces.map((i) => i[1]).join("");
2256
- firstSpaces = [];
2257
- }
2258
- this.raw(node, "value", firstSpaces.concat(tokens), customProperty);
2259
- if (node.value.includes(":") && !customProperty) this.checkMissedSemicolon(tokens);
2260
- }
2261
- doubleColon(token) {
2262
- throw this.input.error("Double colon", { offset: token[2] }, { offset: token[2] + token[1].length });
2263
- }
2264
- emptyRule(token) {
2265
- let node = new Rule();
2266
- this.init(node, token[2]);
2267
- node.selector = "";
2268
- node.raws.between = "";
2269
- this.current = node;
2270
- }
2271
- end(token) {
2272
- if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;
2273
- this.semicolon = false;
2274
- this.current.raws.after = (this.current.raws.after || "") + this.spaces;
2275
- this.spaces = "";
2276
- if (this.current.parent) {
2277
- this.current.source.end = this.getPosition(token[2]);
2278
- this.current.source.end.offset++;
2279
- this.current = this.current.parent;
2280
- } else this.unexpectedClose(token);
2281
- }
2282
- endFile() {
2283
- if (this.current.parent) this.unclosedBlock();
2284
- if (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;
2285
- this.current.raws.after = (this.current.raws.after || "") + this.spaces;
2286
- this.root.source.end = this.getPosition(this.tokenizer.position());
2287
- }
2288
- freeSemicolon(token) {
2289
- this.spaces += token[1];
2290
- if (this.current.nodes) {
2291
- let prev = this.current.nodes[this.current.nodes.length - 1];
2292
- if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
2293
- prev.raws.ownSemicolon = this.spaces;
2294
- this.spaces = "";
2295
- prev.source.end = this.getPosition(token[2]);
2296
- prev.source.end.offset += prev.raws.ownSemicolon.length;
2297
- }
2298
- }
2299
- }
2300
- getPosition(offset) {
2301
- let pos = this.input.fromOffset(offset);
2302
- return {
2303
- column: pos.col,
2304
- line: pos.line,
2305
- offset
2306
- };
2307
- }
2308
- init(node, offset) {
2309
- this.current.push(node);
2310
- node.source = {
2311
- input: this.input,
2312
- start: this.getPosition(offset)
2313
- };
2314
- node.raws.before = this.spaces;
2315
- this.spaces = "";
2316
- if (node.type !== "comment") this.semicolon = false;
2317
- }
2318
- other(start) {
2319
- let end = false;
2320
- let type = null;
2321
- let colon = false;
2322
- let bracket = null;
2323
- let brackets = [];
2324
- let customProperty = start[1].startsWith("--");
2325
- let tokens = [];
2326
- let token = start;
2327
- while (token) {
2328
- type = token[0];
2329
- tokens.push(token);
2330
- if (type === "(" || type === "[") {
2331
- if (!bracket) bracket = token;
2332
- brackets.push(type === "(" ? ")" : "]");
2333
- } else if (customProperty && colon && type === "{") {
2334
- if (!bracket) bracket = token;
2335
- brackets.push("}");
2336
- } else if (brackets.length === 0) {
2337
- if (type === ";") if (colon) {
2338
- this.decl(tokens, customProperty);
2339
- return;
2340
- } else break;
2341
- else if (type === "{") {
2342
- this.rule(tokens);
2343
- return;
2344
- } else if (type === "}") {
2345
- this.tokenizer.back(tokens.pop());
2346
- end = true;
2347
- break;
2348
- } else if (type === ":") colon = true;
2349
- } else if (type === brackets[brackets.length - 1]) {
2350
- brackets.pop();
2351
- if (brackets.length === 0) bracket = null;
2352
- }
2353
- token = this.tokenizer.nextToken();
2354
- }
2355
- if (this.tokenizer.endOfFile()) end = true;
2356
- if (brackets.length > 0) this.unclosedBracket(bracket);
2357
- if (end && colon) {
2358
- if (!customProperty) while (tokens.length) {
2359
- token = tokens[tokens.length - 1][0];
2360
- if (token !== "space" && token !== "comment") break;
2361
- this.tokenizer.back(tokens.pop());
2362
- }
2363
- this.decl(tokens, customProperty);
2364
- } else this.unknownWord(tokens);
2365
- }
2366
- parse() {
2367
- let token;
2368
- while (!this.tokenizer.endOfFile()) {
2369
- token = this.tokenizer.nextToken();
2370
- switch (token[0]) {
2371
- case "space":
2372
- this.spaces += token[1];
2373
- break;
2374
- case ";":
2375
- this.freeSemicolon(token);
2376
- break;
2377
- case "}":
2378
- this.end(token);
2379
- break;
2380
- case "comment":
2381
- this.comment(token);
2382
- break;
2383
- case "at-word":
2384
- this.atrule(token);
2385
- break;
2386
- case "{":
2387
- this.emptyRule(token);
2388
- break;
2389
- default:
2390
- this.other(token);
2391
- break;
2392
- }
2393
- }
2394
- this.endFile();
2395
- }
2396
- precheckMissedSemicolon() {}
2397
- raw(node, prop, tokens, customProperty) {
2398
- let token, type;
2399
- let length = tokens.length;
2400
- let value = "";
2401
- let clean = true;
2402
- let next, prev;
2403
- for (let i = 0; i < length; i += 1) {
2404
- token = tokens[i];
2405
- type = token[0];
2406
- if (type === "space" && i === length - 1 && !customProperty) clean = false;
2407
- else if (type === "comment") {
2408
- prev = tokens[i - 1] ? tokens[i - 1][0] : "empty";
2409
- next = tokens[i + 1] ? tokens[i + 1][0] : "empty";
2410
- if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) if (value.slice(-1) === ",") clean = false;
2411
- else value += token[1];
2412
- else clean = false;
2413
- } else value += token[1];
2414
- }
2415
- if (!clean) {
2416
- let raw = tokens.reduce((all, i) => all + i[1], "");
2417
- node.raws[prop] = {
2418
- raw,
2419
- value
2420
- };
2421
- }
2422
- node[prop] = value;
2423
- }
2424
- rule(tokens) {
2425
- tokens.pop();
2426
- let node = new Rule();
2427
- this.init(node, tokens[0][2]);
2428
- node.raws.between = this.spacesAndCommentsFromEnd(tokens);
2429
- this.raw(node, "selector", tokens);
2430
- this.current = node;
2431
- }
2432
- spacesAndCommentsFromEnd(tokens) {
2433
- let lastTokenType;
2434
- let spaces = "";
2435
- while (tokens.length) {
2436
- lastTokenType = tokens[tokens.length - 1][0];
2437
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
2438
- spaces = tokens.pop()[1] + spaces;
2439
- }
2440
- return spaces;
2441
- }
2442
- spacesAndCommentsFromStart(tokens) {
2443
- let next;
2444
- let spaces = "";
2445
- while (tokens.length) {
2446
- next = tokens[0][0];
2447
- if (next !== "space" && next !== "comment") break;
2448
- spaces += tokens.shift()[1];
2449
- }
2450
- return spaces;
2451
- }
2452
- spacesFromEnd(tokens) {
2453
- let lastTokenType;
2454
- let spaces = "";
2455
- while (tokens.length) {
2456
- lastTokenType = tokens[tokens.length - 1][0];
2457
- if (lastTokenType !== "space") break;
2458
- spaces = tokens.pop()[1] + spaces;
2459
- }
2460
- return spaces;
2461
- }
2462
- stringFrom(tokens, from) {
2463
- let result = "";
2464
- for (let i = from; i < tokens.length; i++) result += tokens[i][1];
2465
- tokens.splice(from, tokens.length - from);
2466
- return result;
2467
- }
2468
- unclosedBlock() {
2469
- let pos = this.current.source.start;
2470
- throw this.input.error("Unclosed block", pos.line, pos.column);
2471
- }
2472
- unclosedBracket(bracket) {
2473
- throw this.input.error("Unclosed bracket", { offset: bracket[2] }, { offset: bracket[2] + 1 });
2474
- }
2475
- unexpectedClose(token) {
2476
- throw this.input.error("Unexpected }", { offset: token[2] }, { offset: token[2] + 1 });
2477
- }
2478
- unknownWord(tokens) {
2479
- throw this.input.error("Unknown word " + tokens[0][1], { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length });
2480
- }
2481
- unnamedAtrule(node, token) {
2482
- throw this.input.error("At-rule without name", { offset: token[2] }, { offset: token[2] + token[1].length });
2483
- }
2484
- };
2485
- module.exports = Parser;
2486
- }));
2487
- //#endregion
2488
- //#region node_modules/postcss/lib/parse.js
2489
- var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2490
- let Container = require_container();
2491
- let Input = require_input();
2492
- let Parser = require_parser();
2493
- function parse(css, opts) {
2494
- let parser = new Parser(new Input(css, opts));
2495
- try {
2496
- parser.parse();
2497
- } catch (e) {
2498
- throw e;
2499
- }
2500
- return parser.root;
2501
- }
2502
- module.exports = parse;
2503
- parse.default = parse;
2504
- Container.registerParse(parse);
2505
- }));
2506
- //#endregion
2507
- //#region node_modules/postcss/lib/warning.js
2508
- var require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2509
- var Warning = class {
2510
- constructor(text, opts = {}) {
2511
- this.type = "warning";
2512
- this.text = text;
2513
- if (opts.node && opts.node.source) {
2514
- let range = opts.node.rangeBy(opts);
2515
- this.line = range.start.line;
2516
- this.column = range.start.column;
2517
- this.endLine = range.end.line;
2518
- this.endColumn = range.end.column;
2519
- }
2520
- for (let opt in opts) this[opt] = opts[opt];
2521
- }
2522
- toString() {
2523
- if (this.node) return this.node.error(this.text, {
2524
- index: this.index,
2525
- plugin: this.plugin,
2526
- word: this.word
2527
- }).message;
2528
- if (this.plugin) return this.plugin + ": " + this.text;
2529
- return this.text;
2530
- }
2531
- };
2532
- module.exports = Warning;
2533
- Warning.default = Warning;
2534
- }));
2535
- //#endregion
2536
- //#region node_modules/postcss/lib/result.js
2537
- var require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2538
- let Warning = require_warning();
2539
- var Result = class {
2540
- get content() {
2541
- return this.css;
2542
- }
2543
- constructor(processor, root, opts) {
2544
- this.processor = processor;
2545
- this.messages = [];
2546
- this.root = root;
2547
- this.opts = opts;
2548
- this.css = "";
2549
- this.map = void 0;
2550
- }
2551
- toString() {
2552
- return this.css;
2553
- }
2554
- warn(text, opts = {}) {
2555
- if (!opts.plugin) {
2556
- if (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin;
2557
- }
2558
- let warning = new Warning(text, opts);
2559
- this.messages.push(warning);
2560
- return warning;
2561
- }
2562
- warnings() {
2563
- return this.messages.filter((i) => i.type === "warning");
2564
- }
2565
- };
2566
- module.exports = Result;
2567
- Result.default = Result;
2568
- }));
2569
- //#endregion
2570
- //#region node_modules/postcss/lib/warn-once.js
2571
- var require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2572
- let printed = {};
2573
- module.exports = function warnOnce(message) {
2574
- if (printed[message]) return;
2575
- printed[message] = true;
2576
- if (typeof console !== "undefined" && console.warn) console.warn(message);
2577
- };
2578
- }));
2579
- //#endregion
2580
- //#region node_modules/postcss/lib/lazy-result.js
2581
- var require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2582
- let Container = require_container();
2583
- let Document = require_document();
2584
- let MapGenerator = require_map_generator();
2585
- let parse = require_parse();
2586
- let Result = require_result();
2587
- let Root = require_root();
2588
- let stringify = require_stringify();
2589
- let { isClean, my } = require_symbols();
2590
- require_warn_once();
2591
- const TYPE_TO_CLASS_NAME = {
2592
- atrule: "AtRule",
2593
- comment: "Comment",
2594
- decl: "Declaration",
2595
- document: "Document",
2596
- root: "Root",
2597
- rule: "Rule"
2598
- };
2599
- const PLUGIN_PROPS = {
2600
- AtRule: true,
2601
- AtRuleExit: true,
2602
- Comment: true,
2603
- CommentExit: true,
2604
- Declaration: true,
2605
- DeclarationExit: true,
2606
- Document: true,
2607
- DocumentExit: true,
2608
- Once: true,
2609
- OnceExit: true,
2610
- postcssPlugin: true,
2611
- prepare: true,
2612
- Root: true,
2613
- RootExit: true,
2614
- Rule: true,
2615
- RuleExit: true
2616
- };
2617
- const NOT_VISITORS = {
2618
- Once: true,
2619
- postcssPlugin: true,
2620
- prepare: true
2621
- };
2622
- const CHILDREN = 0;
2623
- function isPromise(obj) {
2624
- return typeof obj === "object" && typeof obj.then === "function";
2625
- }
2626
- function getEvents(node) {
2627
- let key = false;
2628
- let type = TYPE_TO_CLASS_NAME[node.type];
2629
- if (node.type === "decl") key = node.prop.toLowerCase();
2630
- else if (node.type === "atrule") key = node.name.toLowerCase();
2631
- if (key && node.append) return [
2632
- type,
2633
- type + "-" + key,
2634
- CHILDREN,
2635
- type + "Exit",
2636
- type + "Exit-" + key
2637
- ];
2638
- else if (key) return [
2639
- type,
2640
- type + "-" + key,
2641
- type + "Exit",
2642
- type + "Exit-" + key
2643
- ];
2644
- else if (node.append) return [
2645
- type,
2646
- CHILDREN,
2647
- type + "Exit"
2648
- ];
2649
- else return [type, type + "Exit"];
2650
- }
2651
- function toStack(node) {
2652
- let events;
2653
- if (node.type === "document") events = [
2654
- "Document",
2655
- CHILDREN,
2656
- "DocumentExit"
2657
- ];
2658
- else if (node.type === "root") events = [
2659
- "Root",
2660
- CHILDREN,
2661
- "RootExit"
2662
- ];
2663
- else events = getEvents(node);
2664
- return {
2665
- eventIndex: 0,
2666
- events,
2667
- iterator: 0,
2668
- node,
2669
- visitorIndex: 0,
2670
- visitors: []
2671
- };
2672
- }
2673
- function cleanMarks(node) {
2674
- node[isClean] = false;
2675
- if (node.nodes) node.nodes.forEach((i) => cleanMarks(i));
2676
- return node;
2677
- }
2678
- let postcss = {};
2679
- var LazyResult = class LazyResult {
2680
- get content() {
2681
- return this.stringify().content;
2682
- }
2683
- get css() {
2684
- return this.stringify().css;
2685
- }
2686
- get map() {
2687
- return this.stringify().map;
2688
- }
2689
- get messages() {
2690
- return this.sync().messages;
2691
- }
2692
- get opts() {
2693
- return this.result.opts;
2694
- }
2695
- get processor() {
2696
- return this.result.processor;
2697
- }
2698
- get root() {
2699
- return this.sync().root;
2700
- }
2701
- get [Symbol.toStringTag]() {
2702
- return "LazyResult";
2703
- }
2704
- constructor(processor, css, opts) {
2705
- this.stringified = false;
2706
- this.processed = false;
2707
- let root;
2708
- if (typeof css === "object" && css !== null && (css.type === "root" || css.type === "document")) root = cleanMarks(css);
2709
- else if (css instanceof LazyResult || css instanceof Result) {
2710
- root = cleanMarks(css.root);
2711
- if (css.map) {
2712
- if (typeof opts.map === "undefined") opts.map = {};
2713
- if (!opts.map.inline) opts.map.inline = false;
2714
- opts.map.prev = css.map;
2715
- }
2716
- } else {
2717
- let parser = parse;
2718
- if (opts.syntax) parser = opts.syntax.parse;
2719
- if (opts.parser) parser = opts.parser;
2720
- if (parser.parse) parser = parser.parse;
2721
- try {
2722
- root = parser(css, opts);
2723
- } catch (error) {
2724
- this.processed = true;
2725
- this.error = error;
2726
- }
2727
- if (root && !root[my])
2728
- /* c8 ignore next 2 */
2729
- Container.rebuild(root);
2730
- }
2731
- this.result = new Result(processor, root, opts);
2732
- this.helpers = {
2733
- ...postcss,
2734
- postcss,
2735
- result: this.result
2736
- };
2737
- this.plugins = this.processor.plugins.map((plugin) => {
2738
- if (typeof plugin === "object" && plugin.prepare) return {
2739
- ...plugin,
2740
- ...plugin.prepare(this.result)
2741
- };
2742
- else return plugin;
2743
- });
2744
- }
2745
- async() {
2746
- if (this.error) return Promise.reject(this.error);
2747
- if (this.processed) return Promise.resolve(this.result);
2748
- if (!this.processing) this.processing = this.runAsync();
2749
- return this.processing;
2750
- }
2751
- catch(onRejected) {
2752
- return this.async().catch(onRejected);
2753
- }
2754
- finally(onFinally) {
2755
- return this.async().then(onFinally, onFinally);
2756
- }
2757
- getAsyncError() {
2758
- throw new Error("Use process(css).then(cb) to work with async plugins");
2759
- }
2760
- handleError(error, node) {
2761
- let plugin = this.result.lastPlugin;
2762
- try {
2763
- if (node) node.addToError(error);
2764
- this.error = error;
2765
- if (error.name === "CssSyntaxError" && !error.plugin) {
2766
- error.plugin = plugin.postcssPlugin;
2767
- error.setMessage();
2768
- } else if (plugin.postcssVersion) {}
2769
- } catch (err) {
2770
- /* c8 ignore next 3 */
2771
- if (console && console.error) console.error(err);
2772
- }
2773
- return error;
2774
- }
2775
- prepareVisitors() {
2776
- this.listeners = {};
2777
- let add = (plugin, type, cb) => {
2778
- if (!this.listeners[type]) this.listeners[type] = [];
2779
- this.listeners[type].push([plugin, cb]);
2780
- };
2781
- for (let plugin of this.plugins) if (typeof plugin === "object") for (let event in plugin) {
2782
- if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
2783
- if (!NOT_VISITORS[event]) {
2784
- if (typeof plugin[event] === "object") for (let filter in plugin[event]) if (filter === "*") add(plugin, event, plugin[event][filter]);
2785
- else add(plugin, event + "-" + filter.toLowerCase(), plugin[event][filter]);
2786
- else if (typeof plugin[event] === "function") add(plugin, event, plugin[event]);
2787
- }
2788
- }
2789
- this.hasListener = Object.keys(this.listeners).length > 0;
2790
- }
2791
- async runAsync() {
2792
- this.plugin = 0;
2793
- for (let i = 0; i < this.plugins.length; i++) {
2794
- let plugin = this.plugins[i];
2795
- let promise = this.runOnRoot(plugin);
2796
- if (isPromise(promise)) try {
2797
- await promise;
2798
- } catch (error) {
2799
- throw this.handleError(error);
2800
- }
2801
- }
2802
- this.prepareVisitors();
2803
- if (this.hasListener) {
2804
- let root = this.result.root;
2805
- while (!root[isClean]) {
2806
- root[isClean] = true;
2807
- let stack = [toStack(root)];
2808
- while (stack.length > 0) {
2809
- let promise = this.visitTick(stack);
2810
- if (isPromise(promise)) try {
2811
- await promise;
2812
- } catch (e) {
2813
- let node = stack[stack.length - 1].node;
2814
- throw this.handleError(e, node);
2815
- }
2816
- }
2817
- }
2818
- if (this.listeners.OnceExit) for (let [plugin, visitor] of this.listeners.OnceExit) {
2819
- this.result.lastPlugin = plugin;
2820
- try {
2821
- if (root.type === "document") {
2822
- let roots = root.nodes.map((subRoot) => visitor(subRoot, this.helpers));
2823
- await Promise.all(roots);
2824
- } else await visitor(root, this.helpers);
2825
- } catch (e) {
2826
- throw this.handleError(e);
2827
- }
2828
- }
2829
- }
2830
- this.processed = true;
2831
- return this.stringify();
2832
- }
2833
- runOnRoot(plugin) {
2834
- this.result.lastPlugin = plugin;
2835
- try {
2836
- if (typeof plugin === "object" && plugin.Once) {
2837
- if (this.result.root.type === "document") {
2838
- let roots = this.result.root.nodes.map((root) => plugin.Once(root, this.helpers));
2839
- if (isPromise(roots[0])) return Promise.all(roots);
2840
- return roots;
2841
- }
2842
- return plugin.Once(this.result.root, this.helpers);
2843
- } else if (typeof plugin === "function") return plugin(this.result.root, this.result);
2844
- } catch (error) {
2845
- throw this.handleError(error);
2846
- }
2847
- }
2848
- stringify() {
2849
- if (this.error) throw this.error;
2850
- if (this.stringified) return this.result;
2851
- this.stringified = true;
2852
- this.sync();
2853
- let opts = this.result.opts;
2854
- let str = stringify;
2855
- if (opts.syntax) str = opts.syntax.stringify;
2856
- if (opts.stringifier) str = opts.stringifier;
2857
- if (str.stringify) str = str.stringify;
2858
- let data = new MapGenerator(str, this.result.root, this.result.opts).generate();
2859
- this.result.css = data[0];
2860
- this.result.map = data[1];
2861
- return this.result;
2862
- }
2863
- sync() {
2864
- if (this.error) throw this.error;
2865
- if (this.processed) return this.result;
2866
- this.processed = true;
2867
- if (this.processing) throw this.getAsyncError();
2868
- for (let plugin of this.plugins) if (isPromise(this.runOnRoot(plugin))) throw this.getAsyncError();
2869
- this.prepareVisitors();
2870
- if (this.hasListener) {
2871
- let root = this.result.root;
2872
- while (!root[isClean]) {
2873
- root[isClean] = true;
2874
- this.walkSync(root);
2875
- }
2876
- if (this.listeners.OnceExit) if (root.type === "document") for (let subRoot of root.nodes) this.visitSync(this.listeners.OnceExit, subRoot);
2877
- else this.visitSync(this.listeners.OnceExit, root);
2878
- }
2879
- return this.result;
2880
- }
2881
- then(onFulfilled, onRejected) {
2882
- return this.async().then(onFulfilled, onRejected);
2883
- }
2884
- toString() {
2885
- return this.css;
2886
- }
2887
- visitSync(visitors, node) {
2888
- for (let [plugin, visitor] of visitors) {
2889
- this.result.lastPlugin = plugin;
2890
- let promise;
2891
- try {
2892
- promise = visitor(node, this.helpers);
2893
- } catch (e) {
2894
- throw this.handleError(e, node.proxyOf);
2895
- }
2896
- if (node.type !== "root" && node.type !== "document" && !node.parent) return true;
2897
- if (isPromise(promise)) throw this.getAsyncError();
2898
- }
2899
- }
2900
- visitTick(stack) {
2901
- let visit = stack[stack.length - 1];
2902
- let { node, visitors } = visit;
2903
- if (node.type !== "root" && node.type !== "document" && !node.parent) {
2904
- stack.pop();
2905
- return;
2906
- }
2907
- if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
2908
- let [plugin, visitor] = visitors[visit.visitorIndex];
2909
- visit.visitorIndex += 1;
2910
- if (visit.visitorIndex === visitors.length) {
2911
- visit.visitors = [];
2912
- visit.visitorIndex = 0;
2913
- }
2914
- this.result.lastPlugin = plugin;
2915
- try {
2916
- return visitor(node.toProxy(), this.helpers);
2917
- } catch (e) {
2918
- throw this.handleError(e, node);
2919
- }
2920
- }
2921
- if (visit.iterator !== 0) {
2922
- let iterator = visit.iterator;
2923
- let child;
2924
- while (child = node.nodes[node.indexes[iterator]]) {
2925
- node.indexes[iterator] += 1;
2926
- if (!child[isClean]) {
2927
- child[isClean] = true;
2928
- stack.push(toStack(child));
2929
- return;
2930
- }
2931
- }
2932
- visit.iterator = 0;
2933
- delete node.indexes[iterator];
2934
- }
2935
- let events = visit.events;
2936
- while (visit.eventIndex < events.length) {
2937
- let event = events[visit.eventIndex];
2938
- visit.eventIndex += 1;
2939
- if (event === CHILDREN) {
2940
- if (node.nodes && node.nodes.length) {
2941
- node[isClean] = true;
2942
- visit.iterator = node.getIterator();
2943
- }
2944
- return;
2945
- } else if (this.listeners[event]) {
2946
- visit.visitors = this.listeners[event];
2947
- return;
2948
- }
2949
- }
2950
- stack.pop();
2951
- }
2952
- walkSync(node) {
2953
- node[isClean] = true;
2954
- let events = getEvents(node);
2955
- for (let event of events) if (event === CHILDREN) {
2956
- if (node.nodes) node.each((child) => {
2957
- if (!child[isClean]) this.walkSync(child);
2958
- });
2959
- } else {
2960
- let visitors = this.listeners[event];
2961
- if (visitors) {
2962
- if (this.visitSync(visitors, node.toProxy())) return;
2963
- }
2964
- }
2965
- }
2966
- warnings() {
2967
- return this.sync().warnings();
2968
- }
2969
- };
2970
- LazyResult.registerPostcss = (dependant) => {
2971
- postcss = dependant;
2972
- };
2973
- module.exports = LazyResult;
2974
- LazyResult.default = LazyResult;
2975
- Root.registerLazyResult(LazyResult);
2976
- Document.registerLazyResult(LazyResult);
2977
- }));
2978
- //#endregion
2979
- //#region node_modules/postcss/lib/no-work-result.js
2980
- var require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2981
- let MapGenerator = require_map_generator();
2982
- let parse = require_parse();
2983
- const Result = require_result();
2984
- let stringify = require_stringify();
2985
- require_warn_once();
2986
- var NoWorkResult = class {
2987
- get content() {
2988
- return this.result.css;
2989
- }
2990
- get css() {
2991
- return this.result.css;
2992
- }
2993
- get map() {
2994
- return this.result.map;
2995
- }
2996
- get messages() {
2997
- return [];
2998
- }
2999
- get opts() {
3000
- return this.result.opts;
3001
- }
3002
- get processor() {
3003
- return this.result.processor;
3004
- }
3005
- get root() {
3006
- if (this._root) return this._root;
3007
- let root;
3008
- let parser = parse;
3009
- try {
3010
- root = parser(this._css, this._opts);
3011
- } catch (error) {
3012
- this.error = error;
3013
- }
3014
- if (this.error) throw this.error;
3015
- else {
3016
- this._root = root;
3017
- return root;
3018
- }
3019
- }
3020
- get [Symbol.toStringTag]() {
3021
- return "NoWorkResult";
3022
- }
3023
- constructor(processor, css, opts) {
3024
- css = css.toString();
3025
- this.stringified = false;
3026
- this._processor = processor;
3027
- this._css = css;
3028
- this._opts = opts;
3029
- this._map = void 0;
3030
- let str = stringify;
3031
- this.result = new Result(this._processor, void 0, this._opts);
3032
- this.result.css = css;
3033
- let self = this;
3034
- Object.defineProperty(this.result, "root", { get() {
3035
- return self.root;
3036
- } });
3037
- let map = new MapGenerator(str, void 0, this._opts, css);
3038
- if (map.isMap()) {
3039
- let [generatedCSS, generatedMap] = map.generate();
3040
- if (generatedCSS) this.result.css = generatedCSS;
3041
- if (generatedMap) this.result.map = generatedMap;
3042
- } else {
3043
- map.clearAnnotation();
3044
- this.result.css = map.css;
3045
- }
3046
- }
3047
- async() {
3048
- if (this.error) return Promise.reject(this.error);
3049
- return Promise.resolve(this.result);
3050
- }
3051
- catch(onRejected) {
3052
- return this.async().catch(onRejected);
3053
- }
3054
- finally(onFinally) {
3055
- return this.async().then(onFinally, onFinally);
3056
- }
3057
- sync() {
3058
- if (this.error) throw this.error;
3059
- return this.result;
3060
- }
3061
- then(onFulfilled, onRejected) {
3062
- return this.async().then(onFulfilled, onRejected);
3063
- }
3064
- toString() {
3065
- return this._css;
3066
- }
3067
- warnings() {
3068
- return [];
3069
- }
3070
- };
3071
- module.exports = NoWorkResult;
3072
- NoWorkResult.default = NoWorkResult;
3073
- }));
3074
- //#endregion
3075
- //#region node_modules/postcss/lib/processor.js
3076
- var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3077
- let Document = require_document();
3078
- let LazyResult = require_lazy_result();
3079
- let NoWorkResult = require_no_work_result();
3080
- let Root = require_root();
3081
- var Processor = class {
3082
- constructor(plugins = []) {
3083
- this.version = "8.5.8";
3084
- this.plugins = this.normalize(plugins);
3085
- }
3086
- normalize(plugins) {
3087
- let normalized = [];
3088
- for (let i of plugins) {
3089
- if (i.postcss === true) i = i();
3090
- else if (i.postcss) i = i.postcss;
3091
- if (typeof i === "object" && Array.isArray(i.plugins)) normalized = normalized.concat(i.plugins);
3092
- else if (typeof i === "object" && i.postcssPlugin) normalized.push(i);
3093
- else if (typeof i === "function") normalized.push(i);
3094
- else if (typeof i === "object" && (i.parse || i.stringify)) {} else throw new Error(i + " is not a PostCSS plugin");
3095
- }
3096
- return normalized;
3097
- }
3098
- process(css, opts = {}) {
3099
- if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new NoWorkResult(this, css, opts);
3100
- else return new LazyResult(this, css, opts);
3101
- }
3102
- use(plugin) {
3103
- this.plugins = this.plugins.concat(this.normalize([plugin]));
3104
- return this;
3105
- }
3106
- };
3107
- module.exports = Processor;
3108
- Processor.default = Processor;
3109
- Root.registerProcessor(Processor);
3110
- Document.registerProcessor(Processor);
3111
- }));
3112
- //#endregion
3113
- //#region node_modules/postcss/lib/postcss.mjs
3114
- var import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
3115
- let AtRule = require_at_rule();
3116
- let Comment = require_comment();
3117
- let Container = require_container();
3118
- let CssSyntaxError = require_css_syntax_error();
3119
- let Declaration = require_declaration();
3120
- let Document = require_document();
3121
- let fromJSON = require_fromJSON();
3122
- let Input = require_input();
3123
- let LazyResult = require_lazy_result();
3124
- let list = require_list();
3125
- let Node = require_node();
3126
- let parse = require_parse();
3127
- let Processor = require_processor();
3128
- let Result = require_result();
3129
- let Root = require_root();
3130
- let Rule = require_rule();
3131
- let stringify = require_stringify();
3132
- let Warning = require_warning();
3133
- function postcss(...plugins) {
3134
- if (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0];
3135
- return new Processor(plugins);
3136
- }
3137
- postcss.plugin = function plugin(name, initializer) {
3138
- let warningPrinted = false;
3139
- function creator(...args) {
3140
- if (console && console.warn && !warningPrinted) {
3141
- warningPrinted = true;
3142
- console.warn(name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration");
3143
- if (process.env.LANG && process.env.LANG.startsWith("cn"))
3144
- /* c8 ignore next 7 */
3145
- console.warn(name + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");
3146
- }
3147
- let transformer = initializer(...args);
3148
- transformer.postcssPlugin = name;
3149
- transformer.postcssVersion = new Processor().version;
3150
- return transformer;
3151
- }
3152
- let cache;
3153
- Object.defineProperty(creator, "postcss", { get() {
3154
- if (!cache) cache = creator();
3155
- return cache;
3156
- } });
3157
- creator.process = function(css, processOpts, pluginOpts) {
3158
- return postcss([creator(pluginOpts)]).process(css, processOpts);
3159
- };
3160
- return creator;
3161
- };
3162
- postcss.stringify = stringify;
3163
- postcss.parse = parse;
3164
- postcss.fromJSON = fromJSON;
3165
- postcss.list = list;
3166
- postcss.comment = (defaults) => new Comment(defaults);
3167
- postcss.atRule = (defaults) => new AtRule(defaults);
3168
- postcss.decl = (defaults) => new Declaration(defaults);
3169
- postcss.rule = (defaults) => new Rule(defaults);
3170
- postcss.root = (defaults) => new Root(defaults);
3171
- postcss.document = (defaults) => new Document(defaults);
3172
- postcss.CssSyntaxError = CssSyntaxError;
3173
- postcss.Declaration = Declaration;
3174
- postcss.Container = Container;
3175
- postcss.Processor = Processor;
3176
- postcss.Document = Document;
3177
- postcss.Comment = Comment;
3178
- postcss.Warning = Warning;
3179
- postcss.AtRule = AtRule;
3180
- postcss.Result = Result;
3181
- postcss.Input = Input;
3182
- postcss.Rule = Rule;
3183
- postcss.Root = Root;
3184
- postcss.Node = Node;
3185
- LazyResult.registerPostcss(postcss);
3186
- module.exports = postcss;
3187
- postcss.default = postcss;
3188
- })))(), 1);
3189
- var postcss_default = import_postcss.default;
3190
- const stringify = import_postcss.default.stringify;
3191
- const fromJSON = import_postcss.default.fromJSON;
3192
- const plugin = import_postcss.default.plugin;
3193
- const parse = import_postcss.default.parse;
3194
- const list = import_postcss.default.list;
3195
- const document = import_postcss.default.document;
3196
- const comment = import_postcss.default.comment;
3197
- const atRule = import_postcss.default.atRule;
3198
- const rule = import_postcss.default.rule;
3199
- const decl = import_postcss.default.decl;
3200
- const root = import_postcss.default.root;
3201
- const CssSyntaxError = import_postcss.default.CssSyntaxError;
3202
- const Declaration = import_postcss.default.Declaration;
3203
- const Container = import_postcss.default.Container;
3204
- const Processor = import_postcss.default.Processor;
3205
- const Document = import_postcss.default.Document;
3206
- const Comment = import_postcss.default.Comment;
3207
- const Warning = import_postcss.default.Warning;
3208
- const AtRule = import_postcss.default.AtRule;
3209
- const Result = import_postcss.default.Result;
3210
- const Input = import_postcss.default.Input;
3211
- const Rule = import_postcss.default.Rule;
3212
- const Root = import_postcss.default.Root;
3213
- const Node = import_postcss.default.Node;
3214
- //#endregion
3215
- export { AtRule, Comment, Container, CssSyntaxError, Declaration, Document, Input, Node, Processor, Result, Root, Rule, Warning, atRule, comment, decl, postcss_default as default, document, fromJSON, list, parse, plugin, root, rule, stringify };
3216
-
3217
- //# sourceMappingURL=postcss-gI9snXny.js.map