ipx 4.0.0-beta.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +222 -209
- package/dist/THIRD-PARTY-LICENSES.md.gz +0 -0
- package/dist/_chunks/libs/@fastify/accept-negotiator.mjs +22 -23
- package/dist/_chunks/libs/css-select.mjs +1077 -937
- package/dist/_chunks/libs/css-tree.mjs +107 -191
- package/dist/_chunks/libs/csso.mjs +50 -82
- package/dist/_chunks/libs/h3.mjs +107 -106
- package/dist/_chunks/libs/image-meta.d.mts +2 -2
- package/dist/_chunks/libs/image-meta.mjs +464 -305
- package/dist/_chunks/libs/sax.mjs +61 -60
- package/dist/_chunks/libs/svgo.mjs +933 -1008
- package/dist/_chunks/node-fs.mjs +125 -49
- package/dist/_chunks/rolldown-runtime.mjs +2 -11
- package/dist/cli.mjs +4 -3
- package/dist/index.d.mts +64 -11
- package/package.json +30 -29
- package/dist/THIRD-PARTY-LICENSES.md +0 -593
|
@@ -97,11 +97,8 @@ var t = e(((e) => {
|
|
|
97
97
|
for (; n < e.length; n++) {
|
|
98
98
|
let i = e.charCodeAt(n);
|
|
99
99
|
if (!t.isName(i)) {
|
|
100
|
-
if (t.isValidEscape(i, r(e, n + 1)))
|
|
101
|
-
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
100
|
+
if (t.isValidEscape(i, r(e, n + 1))) n = u(e, n) - 1;
|
|
101
|
+
else break;
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
return n;
|
|
@@ -259,7 +256,8 @@ var t = e(((e) => {
|
|
|
259
256
|
if (d[t] === 1) {
|
|
260
257
|
let n = this.balance[e], r = this.getTokenType(n);
|
|
261
258
|
return u[t] === r ? n : -1;
|
|
262
|
-
}
|
|
259
|
+
}
|
|
260
|
+
if (d[t] === 2) {
|
|
263
261
|
let n = this.balance[e], r = this.getTokenType(n);
|
|
264
262
|
return u[r] === t ? n : -1;
|
|
265
263
|
}
|
|
@@ -321,15 +319,7 @@ var t = e(((e) => {
|
|
|
321
319
|
return t < u ? e.charCodeAt(t) : 0;
|
|
322
320
|
}
|
|
323
321
|
function r() {
|
|
324
|
-
|
|
325
|
-
p = a.Dimension, f = l.consumeName(e, f);
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
if (n(f) === 37) {
|
|
329
|
-
p = a.Percentage, f++;
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
p = a.Number;
|
|
322
|
+
f = l.consumeNumber(e, f), c.isIdentifierStart(n(f), n(f + 1), n(f + 2)) ? (p = a.Dimension, f = l.consumeName(e, f)) : n(f) === 37 ? (p = a.Percentage, f++) : p = a.Number;
|
|
333
323
|
}
|
|
334
324
|
function i() {
|
|
335
325
|
let t = f;
|
|
@@ -339,13 +329,7 @@ var t = e(((e) => {
|
|
|
339
329
|
return;
|
|
340
330
|
}
|
|
341
331
|
s();
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
if (n(f) === 40) {
|
|
345
|
-
p = a.Function, f++;
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
p = a.Ident;
|
|
332
|
+
} else n(f) === 40 ? (p = a.Function, f++) : p = a.Ident;
|
|
349
333
|
}
|
|
350
334
|
function o(t) {
|
|
351
335
|
for (t ||= n(f++), p = a.String; f < e.length; f++) {
|
|
@@ -617,11 +601,12 @@ var t = e(((e) => {
|
|
|
617
601
|
return this.insert(e.createItem(t));
|
|
618
602
|
}
|
|
619
603
|
insert(e, t = null) {
|
|
620
|
-
if (t !== null)
|
|
621
|
-
if (this.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
604
|
+
if (t !== null) {
|
|
605
|
+
if (this.updateCursors(t.prev, e, t, e), t.prev === null) {
|
|
606
|
+
if (this.head !== t) throw Error(`before doesn't belong to list`);
|
|
607
|
+
this.head = e, t.prev = e, e.next = t, this.updateCursors(null, e);
|
|
608
|
+
} else t.prev.next = e, e.prev = t.prev, t.prev = e, e.next = t;
|
|
609
|
+
} else this.updateCursors(this.tail, e, null, e), this.tail === null ? this.head = e : (this.tail.next = e, e.prev = this.tail), this.tail = e;
|
|
625
610
|
return this;
|
|
626
611
|
}
|
|
627
612
|
insertData(t, n) {
|
|
@@ -659,7 +644,7 @@ var t = e(((e) => {
|
|
|
659
644
|
return this.insertList(e);
|
|
660
645
|
}
|
|
661
646
|
insertList(e, t) {
|
|
662
|
-
return e.head === null
|
|
647
|
+
return e.head === null || (t == null ? (this.updateCursors(this.tail, e.tail, null, e.head), this.tail === null ? this.head = e.head : (this.tail.next = e.head, e.head.prev = this.tail), this.tail = e.tail) : (this.updateCursors(t.prev, e.tail, t, e.head), t.prev === null ? this.head = e.head : (t.prev.next = e.head, e.head.prev = t.prev), t.prev = e.tail, e.tail.next = t), e.head = null, e.tail = null), this;
|
|
663
648
|
}
|
|
664
649
|
replace(e, t) {
|
|
665
650
|
`head` in t ? this.insertList(t, e) : this.insert(t, e), this.remove(e);
|
|
@@ -796,9 +781,7 @@ var t = e(((e) => {
|
|
|
796
781
|
case `function`:
|
|
797
782
|
t.context[n] = r;
|
|
798
783
|
break;
|
|
799
|
-
case `string`:
|
|
800
|
-
t.context[n] = S(r);
|
|
801
|
-
break;
|
|
784
|
+
case `string`: t.context[n] = S(r);
|
|
802
785
|
}
|
|
803
786
|
return {
|
|
804
787
|
config: t,
|
|
@@ -1030,10 +1013,13 @@ var t = e(((e) => {
|
|
|
1030
1013
|
if (!r.path) return t;
|
|
1031
1014
|
n = r.path;
|
|
1032
1015
|
}
|
|
1033
|
-
for (var o = e.isAbsolute(n), s = [], c = 0, l = 0;;)
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1016
|
+
for (var o = e.isAbsolute(n), s = [], c = 0, l = 0;;) {
|
|
1017
|
+
if (c = l, l = n.indexOf(`/`, c), l === -1) {
|
|
1018
|
+
s.push(n.slice(c));
|
|
1019
|
+
break;
|
|
1020
|
+
}
|
|
1021
|
+
for (s.push(n.slice(c, l)); l < n.length && n[l] === `/`;) l++;
|
|
1022
|
+
}
|
|
1037
1023
|
for (var u, d = 0, l = s.length - 1; l >= 0; l--) u = s[l], u === `.` ? s.splice(l, 1) : u === `..` ? d++ : d > 0 && (u === `` ? (s.splice(l + 1, d), d = 0) : (s.splice(l, 2), d--));
|
|
1038
1024
|
return n = s.join(`/`), n === `` && (n = o ? `/` : `.`), r ? (r.path = n, a(r)) : n;
|
|
1039
1025
|
});
|
|
@@ -1204,7 +1190,7 @@ var t = e(((e) => {
|
|
|
1204
1190
|
}), i;
|
|
1205
1191
|
}, a.prototype.addMapping = function(e) {
|
|
1206
1192
|
var t = n.getArg(e, `generated`), r = n.getArg(e, `original`, null), i = n.getArg(e, `source`, null), a = n.getArg(e, `name`, null);
|
|
1207
|
-
|
|
1193
|
+
(this._skipValidation || this._validateMapping(t, r, i, a) !== !1) && (i != null && (i = String(i), this._sources.has(i) || this._sources.add(i)), a != null && (a = String(a), this._names.has(a) || this._names.add(a)), this._mappings.add({
|
|
1208
1194
|
generatedLine: t.line,
|
|
1209
1195
|
generatedColumn: t.column,
|
|
1210
1196
|
originalLine: r != null && r.line,
|
|
@@ -1440,9 +1426,7 @@ var t = e(((e) => {
|
|
|
1440
1426
|
e.children.forEach((e) => {
|
|
1441
1427
|
n !== null && t.call(this, n), this.node(e), n = e;
|
|
1442
1428
|
});
|
|
1443
|
-
|
|
1444
|
-
}
|
|
1445
|
-
e.children.forEach(this.node, this);
|
|
1429
|
+
} else e.children.forEach(this.node, this);
|
|
1446
1430
|
}
|
|
1447
1431
|
function s(e) {
|
|
1448
1432
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -1808,9 +1792,11 @@ var t = e(((e) => {
|
|
|
1808
1792
|
function d(e, t, n) {
|
|
1809
1793
|
let r = !1, i = l(e, t, n);
|
|
1810
1794
|
if (e = n(i), e === null) return t;
|
|
1811
|
-
if (e.type !== o.Number)
|
|
1812
|
-
if (
|
|
1813
|
-
|
|
1795
|
+
if (e.type !== o.Number) {
|
|
1796
|
+
if (c(e, 43) || c(e, 45)) {
|
|
1797
|
+
if (r = !0, i = l(n(++i), i, n), e = n(i), e === null || e.type !== o.Number) return 0;
|
|
1798
|
+
} else return t;
|
|
1799
|
+
}
|
|
1814
1800
|
if (!r) {
|
|
1815
1801
|
let t = e.value.charCodeAt(0);
|
|
1816
1802
|
if (t !== 43 && t !== 45) return 0;
|
|
@@ -2846,10 +2832,13 @@ var t = e(((e) => {
|
|
|
2846
2832
|
C = a;
|
|
2847
2833
|
break;
|
|
2848
2834
|
}
|
|
2849
|
-
if (t = y.nextState, t === n.DISALLOW_EMPTY)
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2835
|
+
if (t = y.nextState, t === n.DISALLOW_EMPTY) {
|
|
2836
|
+
if (y.matchStack === D) {
|
|
2837
|
+
t = n.MISMATCH;
|
|
2838
|
+
break;
|
|
2839
|
+
}
|
|
2840
|
+
t = n.MATCH;
|
|
2841
|
+
}
|
|
2853
2842
|
for (; y.syntaxStack !== v;) _();
|
|
2854
2843
|
y = y.prev;
|
|
2855
2844
|
break;
|
|
@@ -3125,10 +3114,12 @@ var t = e(((e) => {
|
|
|
3125
3114
|
if (s === `type`) a.type !== e && o(a, "Wrong node type `" + a.type + "`, expected `" + e + "`");
|
|
3126
3115
|
else if (s === `loc`) {
|
|
3127
3116
|
if (a.loc === null) continue;
|
|
3128
|
-
if (a.loc && a.loc.constructor === Object)
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3117
|
+
if (a.loc && a.loc.constructor === Object) {
|
|
3118
|
+
if (typeof a.loc.source != `string`) s += `.source`;
|
|
3119
|
+
else if (!i(a.loc.start)) s += `.start`;
|
|
3120
|
+
else if (!i(a.loc.end)) s += `.end`;
|
|
3121
|
+
else continue;
|
|
3122
|
+
}
|
|
3132
3123
|
c = !1;
|
|
3133
3124
|
} else if (r.hasOwnProperty(s)) {
|
|
3134
3125
|
c = !1;
|
|
@@ -3500,15 +3491,13 @@ var t = e(((e) => {
|
|
|
3500
3491
|
case `pseudo`:
|
|
3501
3492
|
r[a] = i(e[a], o, [`parse`]);
|
|
3502
3493
|
break;
|
|
3503
|
-
case `node`:
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
]);
|
|
3511
|
-
break;
|
|
3494
|
+
case `node`: r[a] = i(e[a], o, [
|
|
3495
|
+
`name`,
|
|
3496
|
+
`structure`,
|
|
3497
|
+
`parse`,
|
|
3498
|
+
`generate`,
|
|
3499
|
+
`walkContext`
|
|
3500
|
+
]);
|
|
3512
3501
|
}
|
|
3513
3502
|
return r;
|
|
3514
3503
|
}
|
|
@@ -15267,13 +15256,15 @@ var t = e(((e) => {
|
|
|
15267
15256
|
function c() {
|
|
15268
15257
|
let e = 0, t = 0, n = this.tokenType;
|
|
15269
15258
|
for (; n === r.WhiteSpace || n === r.Comment;) n = this.lookupType(++e);
|
|
15270
|
-
if (n !== r.Number)
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15259
|
+
if (n !== r.Number) {
|
|
15260
|
+
if (this.isDelim(43, e) || this.isDelim(45, e)) {
|
|
15261
|
+
t = this.isDelim(43, e) ? 43 : 45;
|
|
15262
|
+
do
|
|
15263
|
+
n = this.lookupType(++e);
|
|
15264
|
+
while (n === r.WhiteSpace || n === r.Comment);
|
|
15265
|
+
n !== r.Number && (this.skip(e), o.call(this, !0));
|
|
15266
|
+
} else return null;
|
|
15267
|
+
}
|
|
15277
15268
|
return e > 0 && this.skip(e), t === 0 && (n = this.charCodeAt(this.tokenStart), n !== 43 && n !== 45 && this.error(`Number sign is expected`)), o.call(this, t !== 0), t === 45 ? `-` + this.consume(r.Number) : this.consume(r.Number);
|
|
15278
15269
|
}
|
|
15279
15270
|
let l = {
|
|
@@ -15682,9 +15673,7 @@ var t = e(((e) => {
|
|
|
15682
15673
|
case 38:
|
|
15683
15674
|
this.next();
|
|
15684
15675
|
break;
|
|
15685
|
-
case 47:
|
|
15686
|
-
this.next(), this.isDelim(47) && this.next();
|
|
15687
|
-
break;
|
|
15676
|
+
case 47: this.next(), this.isDelim(47) && this.next();
|
|
15688
15677
|
}
|
|
15689
15678
|
return this.tokenType === r.Hash ? this.eat(r.Hash) : this.eat(r.Ident), this.substrToCursor(e);
|
|
15690
15679
|
}
|
|
@@ -16313,13 +16302,7 @@ var t = e(((e) => {
|
|
|
16313
16302
|
let n = t(), r = { children: [[`Selector`, `Raw`]] };
|
|
16314
16303
|
function i() {
|
|
16315
16304
|
let e = this.createList();
|
|
16316
|
-
for (; !this.eof;)
|
|
16317
|
-
if (e.push(this.Selector()), this.tokenType === n.Comma) {
|
|
16318
|
-
this.next();
|
|
16319
|
-
continue;
|
|
16320
|
-
}
|
|
16321
|
-
break;
|
|
16322
|
-
}
|
|
16305
|
+
for (; !this.eof && (e.push(this.Selector()), this.tokenType === n.Comma);) this.next();
|
|
16323
16306
|
return {
|
|
16324
16307
|
type: `SelectorList`,
|
|
16325
16308
|
loc: this.getLocationFromList(e),
|
|
@@ -16353,15 +16336,7 @@ var t = e(((e) => {
|
|
|
16353
16336
|
let r = n ? `'` : `"`, i = n ? 39 : 34, a = ``, o = !1;
|
|
16354
16337
|
for (let n = 0; n < e.length; n++) {
|
|
16355
16338
|
let r = e.charCodeAt(n);
|
|
16356
|
-
|
|
16357
|
-
a += `�`;
|
|
16358
|
-
continue;
|
|
16359
|
-
}
|
|
16360
|
-
if (r <= 31 || r === 127) {
|
|
16361
|
-
a += `\\` + r.toString(16), o = !0;
|
|
16362
|
-
continue;
|
|
16363
|
-
}
|
|
16364
|
-
r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
16339
|
+
r === 0 ? a += `�` : r <= 31 || r === 127 ? (a += `\\` + r.toString(16), o = !0) : r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
16365
16340
|
}
|
|
16366
16341
|
return r + a + r;
|
|
16367
16342
|
}
|
|
@@ -16547,15 +16522,7 @@ var t = e(((e) => {
|
|
|
16547
16522
|
let n = ``, r = !1;
|
|
16548
16523
|
for (let i = 0; i < e.length; i++) {
|
|
16549
16524
|
let a = e.charCodeAt(i);
|
|
16550
|
-
|
|
16551
|
-
n += `�`;
|
|
16552
|
-
continue;
|
|
16553
|
-
}
|
|
16554
|
-
if (a <= 31 || a === 127) {
|
|
16555
|
-
n += `\\` + a.toString(16), r = !0;
|
|
16556
|
-
continue;
|
|
16557
|
-
}
|
|
16558
|
-
a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
16525
|
+
a === 0 ? n += `�` : a <= 31 || a === 127 ? (n += `\\` + a.toString(16), r = !0) : a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
16559
16526
|
}
|
|
16560
16527
|
return `url(` + n + `)`;
|
|
16561
16528
|
}
|
|
@@ -17132,15 +17099,7 @@ var t = e(((e) => {
|
|
|
17132
17099
|
if (e.length === 1 && e.charCodeAt(0) === 45) return `\\-`;
|
|
17133
17100
|
for (let r = 0; r < e.length; r++) {
|
|
17134
17101
|
let i = e.charCodeAt(r);
|
|
17135
|
-
|
|
17136
|
-
n += `�`;
|
|
17137
|
-
continue;
|
|
17138
|
-
}
|
|
17139
|
-
if (i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45)) {
|
|
17140
|
-
n += `\\` + i.toString(16) + ` `;
|
|
17141
|
-
continue;
|
|
17142
|
-
}
|
|
17143
|
-
t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
17102
|
+
i === 0 ? n += `�` : i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45) ? n += `\\` + i.toString(16) + ` ` : t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
17144
17103
|
}
|
|
17145
17104
|
return n;
|
|
17146
17105
|
}
|
|
@@ -17246,11 +17205,8 @@ var t = e(((e) => {
|
|
|
17246
17205
|
for (; r < e.length; r++) {
|
|
17247
17206
|
let i = e.charCodeAt(r);
|
|
17248
17207
|
if (!t.isName(i)) {
|
|
17249
|
-
if (t.isValidEscape(i, n(e, r + 1)))
|
|
17250
|
-
|
|
17251
|
-
continue;
|
|
17252
|
-
}
|
|
17253
|
-
break;
|
|
17208
|
+
if (t.isValidEscape(i, n(e, r + 1))) r = l(e, r) - 1;
|
|
17209
|
+
else break;
|
|
17254
17210
|
}
|
|
17255
17211
|
}
|
|
17256
17212
|
return r;
|
|
@@ -17464,15 +17420,7 @@ var t = e(((e) => {
|
|
|
17464
17420
|
return t < u ? e.charCodeAt(t) : 0;
|
|
17465
17421
|
}
|
|
17466
17422
|
function o() {
|
|
17467
|
-
|
|
17468
|
-
p = t.Dimension, f = r.consumeName(e, f);
|
|
17469
|
-
return;
|
|
17470
|
-
}
|
|
17471
|
-
if (a(f) === 37) {
|
|
17472
|
-
p = t.Percentage, f++;
|
|
17473
|
-
return;
|
|
17474
|
-
}
|
|
17475
|
-
p = t.Number;
|
|
17423
|
+
f = r.consumeNumber(e, f), n.isIdentifierStart(a(f), a(f + 1), a(f + 2)) ? (p = t.Dimension, f = r.consumeName(e, f)) : a(f) === 37 ? (p = t.Percentage, f++) : p = t.Number;
|
|
17476
17424
|
}
|
|
17477
17425
|
function s() {
|
|
17478
17426
|
let n = f;
|
|
@@ -17482,13 +17430,7 @@ var t = e(((e) => {
|
|
|
17482
17430
|
return;
|
|
17483
17431
|
}
|
|
17484
17432
|
l();
|
|
17485
|
-
|
|
17486
|
-
}
|
|
17487
|
-
if (a(f) === 40) {
|
|
17488
|
-
p = t.Function, f++;
|
|
17489
|
-
return;
|
|
17490
|
-
}
|
|
17491
|
-
p = t.Ident;
|
|
17433
|
+
} else a(f) === 40 ? (p = t.Function, f++) : p = t.Ident;
|
|
17492
17434
|
}
|
|
17493
17435
|
function c(i) {
|
|
17494
17436
|
for (i ||= a(f++), p = t.String; f < e.length; f++) {
|
|
@@ -17760,11 +17702,12 @@ var t = e(((e) => {
|
|
|
17760
17702
|
return this.insert(e.createItem(t));
|
|
17761
17703
|
}
|
|
17762
17704
|
insert(e, t = null) {
|
|
17763
|
-
if (t !== null)
|
|
17764
|
-
if (this.
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
|
|
17705
|
+
if (t !== null) {
|
|
17706
|
+
if (this.updateCursors(t.prev, e, t, e), t.prev === null) {
|
|
17707
|
+
if (this.head !== t) throw Error(`before doesn't belong to list`);
|
|
17708
|
+
this.head = e, t.prev = e, e.next = t, this.updateCursors(null, e);
|
|
17709
|
+
} else t.prev.next = e, e.prev = t.prev, t.prev = e, e.next = t;
|
|
17710
|
+
} else this.updateCursors(this.tail, e, null, e), this.tail === null ? this.head = e : (this.tail.next = e, e.prev = this.tail), this.tail = e;
|
|
17768
17711
|
return this;
|
|
17769
17712
|
}
|
|
17770
17713
|
insertData(t, n) {
|
|
@@ -17802,7 +17745,7 @@ var t = e(((e) => {
|
|
|
17802
17745
|
return this.insertList(e);
|
|
17803
17746
|
}
|
|
17804
17747
|
insertList(e, t) {
|
|
17805
|
-
return e.head === null
|
|
17748
|
+
return e.head === null || (t == null ? (this.updateCursors(this.tail, e.tail, null, e.head), this.tail === null ? this.head = e.head : (this.tail.next = e.head, e.head.prev = this.tail), this.tail = e.tail) : (this.updateCursors(t.prev, e.tail, t, e.head), t.prev === null ? this.head = e.head : (t.prev.next = e.head, e.head.prev = t.prev), t.prev = e.tail, e.tail.next = t), e.head = null, e.tail = null), this;
|
|
17806
17749
|
}
|
|
17807
17750
|
replace(e, t) {
|
|
17808
17751
|
`head` in t ? this.insertList(t, e) : this.insert(t, e), this.remove(e);
|
|
@@ -17907,9 +17850,7 @@ var t = e(((e) => {
|
|
|
17907
17850
|
case `function`:
|
|
17908
17851
|
t.context[n] = e.parseContext[n];
|
|
17909
17852
|
break;
|
|
17910
|
-
case `string`:
|
|
17911
|
-
t.context[n] = d(e.parseContext[n]);
|
|
17912
|
-
break;
|
|
17853
|
+
case `string`: t.context[n] = d(e.parseContext[n]);
|
|
17913
17854
|
}
|
|
17914
17855
|
return {
|
|
17915
17856
|
config: t,
|
|
@@ -18210,9 +18151,7 @@ var t = e(((e) => {
|
|
|
18210
18151
|
e.children.forEach((e) => {
|
|
18211
18152
|
n !== null && t.call(this, n), this.node(e), n = e;
|
|
18212
18153
|
});
|
|
18213
|
-
|
|
18214
|
-
}
|
|
18215
|
-
e.children.forEach(this.node, this);
|
|
18154
|
+
} else e.children.forEach(this.node, this);
|
|
18216
18155
|
}
|
|
18217
18156
|
function o(e) {
|
|
18218
18157
|
t.tokenize(e, (t, n, r) => {
|
|
@@ -18581,9 +18520,11 @@ var t = e(((e) => {
|
|
|
18581
18520
|
function c(e, t, n) {
|
|
18582
18521
|
let i = !1, c = o(e, t, n);
|
|
18583
18522
|
if (e = n(c), e === null) return t;
|
|
18584
|
-
if (e.type !== r.Number)
|
|
18585
|
-
if (
|
|
18586
|
-
|
|
18523
|
+
if (e.type !== r.Number) {
|
|
18524
|
+
if (a(e, 43) || a(e, 45)) {
|
|
18525
|
+
if (i = !0, c = o(n(++c), c, n), e = n(c), e === null || e.type !== r.Number) return 0;
|
|
18526
|
+
} else return t;
|
|
18527
|
+
}
|
|
18587
18528
|
if (!i) {
|
|
18588
18529
|
let t = e.value.charCodeAt(0);
|
|
18589
18530
|
if (t !== 43 && t !== 45) return 0;
|
|
@@ -19424,10 +19365,13 @@ var t = e(((e) => {
|
|
|
19424
19365
|
C = i;
|
|
19425
19366
|
break;
|
|
19426
19367
|
}
|
|
19427
|
-
if (a = y.nextState, a === t.DISALLOW_EMPTY)
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19368
|
+
if (a = y.nextState, a === t.DISALLOW_EMPTY) {
|
|
19369
|
+
if (y.matchStack === D) {
|
|
19370
|
+
a = t.MISMATCH;
|
|
19371
|
+
break;
|
|
19372
|
+
}
|
|
19373
|
+
a = t.MATCH;
|
|
19374
|
+
}
|
|
19431
19375
|
for (; y.syntaxStack !== v;) _();
|
|
19432
19376
|
y = y.prev;
|
|
19433
19377
|
break;
|
|
@@ -19703,10 +19647,12 @@ var t = e(((e) => {
|
|
|
19703
19647
|
if (s === `type`) a.type !== e && o(a, "Wrong node type `" + a.type + "`, expected `" + e + "`");
|
|
19704
19648
|
else if (s === `loc`) {
|
|
19705
19649
|
if (a.loc === null) continue;
|
|
19706
|
-
if (a.loc && a.loc.constructor === Object)
|
|
19707
|
-
|
|
19708
|
-
|
|
19709
|
-
|
|
19650
|
+
if (a.loc && a.loc.constructor === Object) {
|
|
19651
|
+
if (typeof a.loc.source != `string`) s += `.source`;
|
|
19652
|
+
else if (!i(a.loc.start)) s += `.start`;
|
|
19653
|
+
else if (!i(a.loc.end)) s += `.end`;
|
|
19654
|
+
else continue;
|
|
19655
|
+
}
|
|
19710
19656
|
c = !1;
|
|
19711
19657
|
} else if (r.hasOwnProperty(s)) {
|
|
19712
19658
|
c = !1;
|
|
@@ -29616,13 +29562,15 @@ var t = e(((e) => {
|
|
|
29616
29562
|
function o() {
|
|
29617
29563
|
let e = 0, n = 0, r = this.tokenType;
|
|
29618
29564
|
for (; r === t.WhiteSpace || r === t.Comment;) r = this.lookupType(++e);
|
|
29619
|
-
if (r !== t.Number)
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29625
|
-
|
|
29565
|
+
if (r !== t.Number) {
|
|
29566
|
+
if (this.isDelim(43, e) || this.isDelim(45, e)) {
|
|
29567
|
+
n = this.isDelim(43, e) ? 43 : 45;
|
|
29568
|
+
do
|
|
29569
|
+
r = this.lookupType(++e);
|
|
29570
|
+
while (r === t.WhiteSpace || r === t.Comment);
|
|
29571
|
+
r !== t.Number && (this.skip(e), i.call(this, !0));
|
|
29572
|
+
} else return null;
|
|
29573
|
+
}
|
|
29626
29574
|
return e > 0 && this.skip(e), n === 0 && (r = this.charCodeAt(this.tokenStart), r !== 43 && r !== 45 && this.error(`Number sign is expected`)), i.call(this, n !== 0), n === 45 ? `-` + this.consume(t.Number) : this.consume(t.Number);
|
|
29627
29575
|
}
|
|
29628
29576
|
let s = {
|
|
@@ -29967,9 +29915,7 @@ var t = e(((e) => {
|
|
|
29967
29915
|
case 38:
|
|
29968
29916
|
this.next();
|
|
29969
29917
|
break;
|
|
29970
|
-
case 47:
|
|
29971
|
-
this.next(), this.isDelim(47) && this.next();
|
|
29972
|
-
break;
|
|
29918
|
+
case 47: this.next(), this.isDelim(47) && this.next();
|
|
29973
29919
|
}
|
|
29974
29920
|
return this.tokenType === n.Hash ? this.eat(n.Hash) : this.eat(n.Ident), this.substrToCursor(e);
|
|
29975
29921
|
}
|
|
@@ -30381,13 +30327,7 @@ var t = e(((e) => {
|
|
|
30381
30327
|
let t = J(), n = { children: [[`Selector`, `Raw`]] };
|
|
30382
30328
|
function r() {
|
|
30383
30329
|
let e = this.createList();
|
|
30384
|
-
for (; !this.eof;)
|
|
30385
|
-
if (e.push(this.Selector()), this.tokenType === t.Comma) {
|
|
30386
|
-
this.next();
|
|
30387
|
-
continue;
|
|
30388
|
-
}
|
|
30389
|
-
break;
|
|
30390
|
-
}
|
|
30330
|
+
for (; !this.eof && (e.push(this.Selector()), this.tokenType === t.Comma);) this.next();
|
|
30391
30331
|
return {
|
|
30392
30332
|
type: `SelectorList`,
|
|
30393
30333
|
loc: this.getLocationFromList(e),
|
|
@@ -30421,15 +30361,7 @@ var t = e(((e) => {
|
|
|
30421
30361
|
let r = n ? `'` : `"`, i = n ? 39 : 34, a = ``, o = !1;
|
|
30422
30362
|
for (let n = 0; n < e.length; n++) {
|
|
30423
30363
|
let r = e.charCodeAt(n);
|
|
30424
|
-
|
|
30425
|
-
a += `�`;
|
|
30426
|
-
continue;
|
|
30427
|
-
}
|
|
30428
|
-
if (r <= 31 || r === 127) {
|
|
30429
|
-
a += `\\` + r.toString(16), o = !0;
|
|
30430
|
-
continue;
|
|
30431
|
-
}
|
|
30432
|
-
r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
30364
|
+
r === 0 ? a += `�` : r <= 31 || r === 127 ? (a += `\\` + r.toString(16), o = !0) : r === i || r === 92 ? (a += `\\` + e.charAt(n), o = !1) : (o && (t.isHexDigit(r) || t.isWhiteSpace(r)) && (a += ` `), a += e.charAt(n), o = !1);
|
|
30433
30365
|
}
|
|
30434
30366
|
return r + a + r;
|
|
30435
30367
|
}
|
|
@@ -30599,15 +30531,7 @@ var t = e(((e) => {
|
|
|
30599
30531
|
let n = ``, r = !1;
|
|
30600
30532
|
for (let i = 0; i < e.length; i++) {
|
|
30601
30533
|
let a = e.charCodeAt(i);
|
|
30602
|
-
|
|
30603
|
-
n += `�`;
|
|
30604
|
-
continue;
|
|
30605
|
-
}
|
|
30606
|
-
if (a <= 31 || a === 127) {
|
|
30607
|
-
n += `\\` + a.toString(16), r = !0;
|
|
30608
|
-
continue;
|
|
30609
|
-
}
|
|
30610
|
-
a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
30534
|
+
a === 0 ? n += `�` : a <= 31 || a === 127 ? (n += `\\` + a.toString(16), r = !0) : a === 32 || a === 92 || a === 34 || a === 39 || a === 40 || a === 41 ? (n += `\\` + e.charAt(i), r = !1) : (r && t.isHexDigit(a) && (n += ` `), n += e.charAt(i), r = !1);
|
|
30611
30535
|
}
|
|
30612
30536
|
return `url(` + n + `)`;
|
|
30613
30537
|
}
|
|
@@ -31100,15 +31024,7 @@ var t = e(((e) => {
|
|
|
31100
31024
|
if (e.length === 1 && e.charCodeAt(0) === 45) return `\\-`;
|
|
31101
31025
|
for (let r = 0; r < e.length; r++) {
|
|
31102
31026
|
let i = e.charCodeAt(r);
|
|
31103
|
-
|
|
31104
|
-
n += `�`;
|
|
31105
|
-
continue;
|
|
31106
|
-
}
|
|
31107
|
-
if (i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45)) {
|
|
31108
|
-
n += `\\` + i.toString(16) + ` `;
|
|
31109
|
-
continue;
|
|
31110
|
-
}
|
|
31111
|
-
t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
31027
|
+
i === 0 ? n += `�` : i <= 31 || i === 127 || i >= 48 && i <= 57 && (r === 0 || r === 1 && e.charCodeAt(0) === 45) ? n += `\\` + i.toString(16) + ` ` : t.isName(i) ? n += e.charAt(r) : n += `\\` + e.charAt(r);
|
|
31112
31028
|
}
|
|
31113
31029
|
return n;
|
|
31114
31030
|
}
|