@projectwallace/css-analyzer 9.1.0 → 9.2.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/dist/css-analyzer.js +633 -629
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/css-analyzer.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Rr = Object.defineProperty;
|
|
2
|
+
var yi = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var m = (r, e, t) =>
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var vr = (r, e, t) => e in r ? Rr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var m = (r, e, t) => vr(r, typeof e != "symbol" ? e + "" : e, t), Ci = (r, e, t) => e.has(r) || yi("Cannot " + t);
|
|
7
|
+
var A = (r, e, t) => (Ci(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? yi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), q = (r, e, t, s) => (Ci(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
|
|
8
|
+
var Zt = (r, e, t, s) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
q(r, e, i, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return A(r, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { walk as z, SUPPORTS_QUERY as
|
|
17
|
-
function
|
|
16
|
+
import { walk as z, SUPPORTS_QUERY as Bi, BREAK as Q, MEDIA_TYPE as Tr, MEDIA_FEATURE as Gi, str_equals as ge, DIMENSION as kt, NUMBER as xs, IDENTIFIER as _e, SELECTOR as me, NTH_SELECTOR as Sr, PSEUDO_ELEMENT_SELECTOR as Qe, TYPE_SELECTOR as ms, PSEUDO_CLASS_SELECTOR as Le, ATTRIBUTE_SELECTOR as wt, SKIP as P, str_starts_with as Wi, COMBINATOR as ls, SELECTOR_LIST as ks, NTH_OF_SELECTOR as Or, CLASS_SELECTOR as Nr, ID_SELECTOR as Lr, FUNCTION as ws, OPERATOR as Re, is_custom as As, is_vendor_prefixed as Es, parse as Ur, AT_RULE as Ir, BLOCK as Hr, DECLARATION as Jt, LAYER_NAME as Pr, CONTAINER_QUERY as Dr, STYLE_RULE as Fr, HASH as Mr, URL as zr } from "@projectwallace/css-parser";
|
|
17
|
+
function qr(r, e) {
|
|
18
18
|
z(r, function(t) {
|
|
19
|
-
if (t.type ===
|
|
19
|
+
if (t.type === Bi) {
|
|
20
20
|
const i = (t.prelude || t.value || "").toString().toLowerCase().replaceAll(/\s+/g, "");
|
|
21
21
|
if (i.includes("-webkit-appearance:none"))
|
|
22
22
|
return e("-webkit-appearance: none"), Q;
|
|
@@ -25,16 +25,16 @@ function Mr(r, e) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Kr(r, e) {
|
|
29
29
|
z(r, function(t) {
|
|
30
|
-
if (t.type ===
|
|
30
|
+
if (t.type === Tr) {
|
|
31
31
|
const s = t.text || "";
|
|
32
32
|
if (s.startsWith("\\0"))
|
|
33
33
|
return e("\\0"), Q;
|
|
34
34
|
if (s.includes("\\9"))
|
|
35
35
|
return e("\\9"), Q;
|
|
36
36
|
}
|
|
37
|
-
if (t.type ===
|
|
37
|
+
if (t.type === Gi) {
|
|
38
38
|
const s = t.name || "";
|
|
39
39
|
if (ge("-moz-images-in-menus", s))
|
|
40
40
|
return e("-moz-images-in-menus"), Q;
|
|
@@ -44,12 +44,12 @@ function zr(r, e) {
|
|
|
44
44
|
return e("-ms-high-contrast"), Q;
|
|
45
45
|
if (ge("min-resolution", s) && t.has_children) {
|
|
46
46
|
for (const i of t)
|
|
47
|
-
if (i.type ===
|
|
47
|
+
if (i.type === kt && i.value === 1e-3 && ge("dpcm", i.unit || ""))
|
|
48
48
|
return e("min-resolution: .001dpcm"), Q;
|
|
49
49
|
}
|
|
50
50
|
if (ge("-webkit-min-device-pixel-ratio", s) && t.has_children) {
|
|
51
51
|
for (const i of t)
|
|
52
|
-
if (i.type ===
|
|
52
|
+
if (i.type === xs && (i.value === 0 || i.value === 1e4))
|
|
53
53
|
return e("-webkit-min-device-pixel-ratio"), Q;
|
|
54
54
|
}
|
|
55
55
|
if (t.has_children) {
|
|
@@ -69,77 +69,77 @@ class W {
|
|
|
69
69
|
return this.set.has(e.toLowerCase());
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Yi(r) {
|
|
73
73
|
return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function $r(r, e) {
|
|
76
76
|
return e >= 65 && e <= 90 && (e = e | 32), r === e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function os(r, e) {
|
|
79
79
|
if (r === e) return !0;
|
|
80
80
|
let t = e.length, s = t - r.length;
|
|
81
81
|
if (s < 0)
|
|
82
82
|
return !1;
|
|
83
83
|
for (let i = t - 1; i >= s; i--)
|
|
84
|
-
if (
|
|
84
|
+
if ($r(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
|
|
85
85
|
return !1;
|
|
86
86
|
return !0;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
function
|
|
88
|
+
const Br = new W(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
|
|
89
|
+
function Gr(r, e) {
|
|
90
90
|
z(r, function(t) {
|
|
91
|
-
if ((t.type === Qe || t.type === Le || t.type ===
|
|
91
|
+
if ((t.type === Qe || t.type === Le || t.type === ms) && t.is_vendor_prefixed) {
|
|
92
92
|
let s = "";
|
|
93
93
|
t.type === Le ? s = ":" : t.type === Qe && (s = "::"), e(s + (t.name || t.text));
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Wr(r, e) {
|
|
98
98
|
function t(s) {
|
|
99
99
|
var n, l;
|
|
100
100
|
let i = s.clone();
|
|
101
|
-
return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' +
|
|
101
|
+
return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' + Yi(i.value.toString()) + '"]' : "[" + ((l = i.name) == null ? void 0 : l.toLowerCase()) + "]";
|
|
102
102
|
}
|
|
103
103
|
z(r, function(s) {
|
|
104
|
-
if (s.type ===
|
|
104
|
+
if (s.type === wt) {
|
|
105
105
|
const i = s.name || "";
|
|
106
|
-
(ge("role", i) ||
|
|
106
|
+
(ge("role", i) || Wi(i, "aria-")) && e(t(s));
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Yr(r, e) {
|
|
111
111
|
z(r, function(t) {
|
|
112
112
|
t.type === Le && t.name && e(t.name);
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Qr(r, e) {
|
|
116
116
|
z(r, function(t) {
|
|
117
117
|
t.type === Qe && t.name && e(t.name);
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function as(r) {
|
|
121
121
|
let e = 0;
|
|
122
122
|
function t(s, i) {
|
|
123
123
|
z(s, function(n) {
|
|
124
|
-
n.type === me && i.push(
|
|
124
|
+
n.type === me && i.push(as(n));
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
return z(r, function(s) {
|
|
128
128
|
const i = s.type;
|
|
129
129
|
if (i !== me) {
|
|
130
|
-
if (i ===
|
|
130
|
+
if (i === Sr) {
|
|
131
131
|
s.text && s.text.trim() && e++;
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
if (e++, (i === Qe || i ===
|
|
134
|
+
if (e++, (i === Qe || i === ms || i === Le) && s.is_vendor_prefixed && e++, i === wt)
|
|
135
135
|
return s.value && e++, P;
|
|
136
136
|
if (i === Le) {
|
|
137
137
|
const n = s.name || "";
|
|
138
|
-
if (
|
|
138
|
+
if (Br.has(n.toLowerCase())) {
|
|
139
139
|
const l = [];
|
|
140
140
|
if (s.has_children)
|
|
141
141
|
for (const a of s)
|
|
142
|
-
a.type === me ? l.push(
|
|
142
|
+
a.type === me ? l.push(as(a)) : t(a, l);
|
|
143
143
|
if (l.length > 0) {
|
|
144
144
|
for (const a of l)
|
|
145
145
|
e += a;
|
|
@@ -150,10 +150,10 @@ function os(r) {
|
|
|
150
150
|
}
|
|
151
151
|
}), e;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Vr(r, e) {
|
|
154
154
|
z(r, function(t) {
|
|
155
155
|
var s;
|
|
156
|
-
t.type ===
|
|
156
|
+
t.type === ls && e({
|
|
157
157
|
name: ((s = t.name) == null ? void 0 : s.trim()) === "" ? " " : t.name,
|
|
158
158
|
loc: {
|
|
159
159
|
offset: t.start,
|
|
@@ -164,47 +164,47 @@ function Yr(r, e) {
|
|
|
164
164
|
});
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
let
|
|
167
|
+
let ys = 1, $ = 2, At = 4, ve = 8, ke = 16, y = new Uint8Array(128);
|
|
168
168
|
for (let r = 48; r <= 57; r++)
|
|
169
169
|
y[r] = $;
|
|
170
170
|
for (let r = 48; r <= 57; r++)
|
|
171
|
-
y[r] |=
|
|
171
|
+
y[r] |= At;
|
|
172
172
|
for (let r = 65; r <= 70; r++)
|
|
173
|
-
y[r] =
|
|
173
|
+
y[r] = At;
|
|
174
174
|
for (let r = 97; r <= 102; r++)
|
|
175
|
-
y[r] =
|
|
175
|
+
y[r] = At;
|
|
176
176
|
for (let r = 65; r <= 90; r++)
|
|
177
|
-
y[r] |=
|
|
177
|
+
y[r] |= ys;
|
|
178
178
|
for (let r = 97; r <= 122; r++)
|
|
179
|
-
y[r] |=
|
|
179
|
+
y[r] |= ys;
|
|
180
180
|
y[32] = ve;
|
|
181
181
|
y[9] = ve;
|
|
182
182
|
y[10] = ke;
|
|
183
183
|
y[13] = ke;
|
|
184
184
|
y[12] = ke;
|
|
185
|
-
function
|
|
185
|
+
function jr(r) {
|
|
186
186
|
return r < 128 && (y[r] & $) !== 0;
|
|
187
187
|
}
|
|
188
188
|
function pe(r) {
|
|
189
|
-
return r < 128 && (y[r] &
|
|
189
|
+
return r < 128 && (y[r] & At) !== 0;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
return r < 128 && (y[r] &
|
|
191
|
+
function Xr(r) {
|
|
192
|
+
return r < 128 && (y[r] & ys) !== 0;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function bi(r) {
|
|
195
195
|
return r < 128 && (y[r] & ve) !== 0;
|
|
196
196
|
}
|
|
197
197
|
function ne(r) {
|
|
198
198
|
return r < 128 && (y[r] & ke) !== 0;
|
|
199
199
|
}
|
|
200
200
|
function Ke(r) {
|
|
201
|
-
return r >= 128 || r === 95 ? !0 :
|
|
201
|
+
return r >= 128 || r === 95 ? !0 : Xr(r);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return r === 45 ? !0 : Ke(r) ||
|
|
203
|
+
function at(r) {
|
|
204
|
+
return r === 45 ? !0 : Ke(r) || jr(r);
|
|
205
205
|
}
|
|
206
|
-
const ae = 1,
|
|
207
|
-
class
|
|
206
|
+
const ae = 1, ct = 2, Zr = 3, Qi = 4, Vi = 5, Ri = 6, xe = 9, _t = 10, ji = 11, Xi = 12, hs = 13, Jr = 14, en = 15, Zi = 16, tn = 17, $e = 18, cs = 19, Ji = 20, er = 21, tr = 22, sn = 23, rn = 24, _s = 26, vi = 27, nn = 123, ln = 125, on = 58, an = 59, hn = 44, cn = 91, _n = 93, Ti = 40, un = 41, Si = 47, Oi = 42, fn = 34, pn = 39, es = 46, dn = 60, gn = 33, K = 45, xn = 62, mn = 64, kn = 35, ts = 92, Me = 43, wn = 37, An = 101, En = 69, yn = 117, Cn = 85, bn = 63, Ni = 13, Li = 10;
|
|
207
|
+
class sr {
|
|
208
208
|
constructor(e, t) {
|
|
209
209
|
m(this, "source");
|
|
210
210
|
m(this, "pos");
|
|
@@ -217,7 +217,7 @@ class er {
|
|
|
217
217
|
m(this, "token_end");
|
|
218
218
|
m(this, "token_line");
|
|
219
219
|
m(this, "token_column");
|
|
220
|
-
this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type =
|
|
220
|
+
this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type = _s, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
|
|
221
221
|
}
|
|
222
222
|
// Fast token advancing without object allocation (for internal parser use)
|
|
223
223
|
next_token_fast(e = !1) {
|
|
@@ -228,34 +228,34 @@ class er {
|
|
|
228
228
|
this.advance();
|
|
229
229
|
}
|
|
230
230
|
if (this.pos >= this.source.length)
|
|
231
|
-
return this.make_token(
|
|
231
|
+
return this.make_token(_s, this.pos, this.pos);
|
|
232
232
|
let t = this.source.charCodeAt(this.pos), s = this.pos, i = this.line, n = this.column;
|
|
233
233
|
switch (t) {
|
|
234
|
-
case sn:
|
|
235
|
-
return this.advance(), this.make_token(en, s, this.pos, i, n);
|
|
236
|
-
case rn:
|
|
237
|
-
return this.advance(), this.make_token(tn, s, this.pos, i, n);
|
|
238
234
|
case nn:
|
|
239
|
-
return this.advance(), this.make_token(
|
|
235
|
+
return this.advance(), this.make_token(sn, s, this.pos, i, n);
|
|
240
236
|
case ln:
|
|
241
|
-
return this.advance(), this.make_token(
|
|
237
|
+
return this.advance(), this.make_token(rn, s, this.pos, i, n);
|
|
242
238
|
case on:
|
|
243
|
-
return this.advance(), this.make_token(
|
|
239
|
+
return this.advance(), this.make_token(Zi, s, this.pos, i, n);
|
|
244
240
|
case an:
|
|
245
|
-
return this.advance(), this.make_token(
|
|
241
|
+
return this.advance(), this.make_token(tn, s, this.pos, i, n);
|
|
246
242
|
case hn:
|
|
247
|
-
return this.advance(), this.make_token(
|
|
248
|
-
case Ri:
|
|
249
|
-
return this.advance(), this.make_token(Zi, s, this.pos, i, n);
|
|
243
|
+
return this.advance(), this.make_token($e, s, this.pos, i, n);
|
|
250
244
|
case cn:
|
|
245
|
+
return this.advance(), this.make_token(cs, s, this.pos, i, n);
|
|
246
|
+
case _n:
|
|
251
247
|
return this.advance(), this.make_token(Ji, s, this.pos, i, n);
|
|
248
|
+
case Ti:
|
|
249
|
+
return this.advance(), this.make_token(er, s, this.pos, i, n);
|
|
250
|
+
case un:
|
|
251
|
+
return this.advance(), this.make_token(tr, s, this.pos, i, n);
|
|
252
252
|
}
|
|
253
253
|
if (t < 128 && (y[t] & (ve | ke)) !== 0)
|
|
254
254
|
return this.consume_whitespace(i, n);
|
|
255
|
-
if (t ===
|
|
255
|
+
if (t === Si && this.peek() === Oi) {
|
|
256
256
|
let l = s, a = i, h = n;
|
|
257
257
|
for (this.advance(2); this.pos < this.source.length - 1; ) {
|
|
258
|
-
if (this.source.charCodeAt(this.pos) ===
|
|
258
|
+
if (this.source.charCodeAt(this.pos) === Oi && this.peek() === Si) {
|
|
259
259
|
this.advance(2);
|
|
260
260
|
break;
|
|
261
261
|
}
|
|
@@ -270,22 +270,22 @@ class er {
|
|
|
270
270
|
column: h
|
|
271
271
|
}), this.next_token_fast(e);
|
|
272
272
|
}
|
|
273
|
-
if (t ===
|
|
273
|
+
if (t === fn || t === pn)
|
|
274
274
|
return this.consume_string(t, i, n);
|
|
275
275
|
if (t < 128 && (y[t] & $) !== 0)
|
|
276
276
|
return this.consume_number(i, n);
|
|
277
|
-
if (t ===
|
|
277
|
+
if (t === es) {
|
|
278
278
|
let l = this.peek();
|
|
279
279
|
if (l < 128 && (y[l] & $) !== 0)
|
|
280
280
|
return this.consume_number(i, n);
|
|
281
281
|
}
|
|
282
|
-
if (t ===
|
|
283
|
-
return this.advance(4), this.make_token(
|
|
284
|
-
if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) ===
|
|
285
|
-
return this.advance(3), this.make_token(
|
|
286
|
-
if (t ===
|
|
282
|
+
if (t === dn && this.pos + 3 < this.source.length && this.peek() === gn && this.peek(2) === K && this.peek(3) === K)
|
|
283
|
+
return this.advance(4), this.make_token(Jr, s, this.pos, i, n);
|
|
284
|
+
if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) === xn)
|
|
285
|
+
return this.advance(3), this.make_token(en, s, this.pos, i, n);
|
|
286
|
+
if (t === mn)
|
|
287
287
|
return this.consume_at_keyword(i, n);
|
|
288
|
-
if (t ===
|
|
288
|
+
if (t === kn)
|
|
289
289
|
return this.consume_hash(i, n);
|
|
290
290
|
if (Ke(t))
|
|
291
291
|
return this.consume_ident_or_function(i, n);
|
|
@@ -294,7 +294,7 @@ class er {
|
|
|
294
294
|
if (Ke(l) || l === K)
|
|
295
295
|
return this.consume_ident_or_function(i, n);
|
|
296
296
|
}
|
|
297
|
-
if (t ===
|
|
297
|
+
if (t === ts) {
|
|
298
298
|
let l = this.peek();
|
|
299
299
|
if (l !== 0 && !ne(l))
|
|
300
300
|
return this.consume_ident_or_function(i, n);
|
|
@@ -303,7 +303,7 @@ class er {
|
|
|
303
303
|
let l = this.peek();
|
|
304
304
|
if (l < 128 && (y[l] & $) !== 0)
|
|
305
305
|
return this.consume_number(i, n);
|
|
306
|
-
if (l ===
|
|
306
|
+
if (l === es) {
|
|
307
307
|
let h = this.peek(2);
|
|
308
308
|
if (h < 128 && (y[h] & $) !== 0)
|
|
309
309
|
return this.consume_number(i, n);
|
|
@@ -318,17 +318,17 @@ class er {
|
|
|
318
318
|
if (i >= 128 || (y[i] & (ve | ke)) === 0) break;
|
|
319
319
|
this.advance();
|
|
320
320
|
}
|
|
321
|
-
return this.make_token(
|
|
321
|
+
return this.make_token(hs, s, this.pos, e, t);
|
|
322
322
|
}
|
|
323
323
|
consume_string(e, t, s) {
|
|
324
324
|
let i = this.pos;
|
|
325
325
|
for (this.advance(); this.pos < this.source.length; ) {
|
|
326
326
|
let n = this.source.charCodeAt(this.pos);
|
|
327
327
|
if (n === e)
|
|
328
|
-
return this.advance(), this.make_token(
|
|
328
|
+
return this.advance(), this.make_token(Vi, i, this.pos, t, s);
|
|
329
329
|
if (ne(n))
|
|
330
|
-
return this.make_token(
|
|
331
|
-
if (n ===
|
|
330
|
+
return this.make_token(Ri, i, this.pos, t, s);
|
|
331
|
+
if (n === ts) {
|
|
332
332
|
if (this.advance(), this.pos < this.source.length) {
|
|
333
333
|
let l = this.source.charCodeAt(this.pos);
|
|
334
334
|
pe(l) ? this.consume_hex_escape() : ne(l) ? this.advance() : this.advance();
|
|
@@ -337,7 +337,7 @@ class er {
|
|
|
337
337
|
}
|
|
338
338
|
this.advance();
|
|
339
339
|
}
|
|
340
|
-
return this.make_token(
|
|
340
|
+
return this.make_token(Ri, i, this.pos, t, s);
|
|
341
341
|
}
|
|
342
342
|
consume_hex_escape() {
|
|
343
343
|
let e = 0;
|
|
@@ -348,7 +348,7 @@ class er {
|
|
|
348
348
|
}
|
|
349
349
|
if (this.pos < this.source.length) {
|
|
350
350
|
let t = this.source.charCodeAt(this.pos);
|
|
351
|
-
(
|
|
351
|
+
(bi(t) || ne(t)) && this.advance();
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
consume_number(e, t) {
|
|
@@ -358,7 +358,7 @@ class er {
|
|
|
358
358
|
if (n >= 128 || (y[n] & $) === 0) break;
|
|
359
359
|
this.advance();
|
|
360
360
|
}
|
|
361
|
-
if (this.pos < this.source.length && this.source.charCodeAt(this.pos) ===
|
|
361
|
+
if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === es && this.pos + 1 < this.source.length) {
|
|
362
362
|
let n = this.peek();
|
|
363
363
|
if (n < 128 && (y[n] & $) !== 0)
|
|
364
364
|
for (this.advance(); this.pos < this.source.length; ) {
|
|
@@ -369,16 +369,16 @@ class er {
|
|
|
369
369
|
}
|
|
370
370
|
if (this.pos < this.source.length) {
|
|
371
371
|
let n = this.source.charCodeAt(this.pos);
|
|
372
|
-
if (n ===
|
|
372
|
+
if (n === An || n === En) {
|
|
373
373
|
let l = this.peek(), a = l < 128 && (y[l] & $) !== 0, h = this.peek(2), o = h < 128 && (y[h] & $) !== 0;
|
|
374
374
|
if (a || (l === Me || l === K) && o) {
|
|
375
375
|
if (this.advance(), this.pos < this.source.length) {
|
|
376
|
-
let
|
|
377
|
-
(
|
|
376
|
+
let u = this.source.charCodeAt(this.pos);
|
|
377
|
+
(u === Me || u === K) && this.advance();
|
|
378
378
|
}
|
|
379
379
|
for (; this.pos < this.source.length; ) {
|
|
380
|
-
let
|
|
381
|
-
if (
|
|
380
|
+
let u = this.source.charCodeAt(this.pos);
|
|
381
|
+
if (u >= 128 || (y[u] & $) === 0) break;
|
|
382
382
|
this.advance();
|
|
383
383
|
}
|
|
384
384
|
}
|
|
@@ -386,21 +386,21 @@ class er {
|
|
|
386
386
|
}
|
|
387
387
|
if (this.pos < this.source.length) {
|
|
388
388
|
let n = this.source.charCodeAt(this.pos);
|
|
389
|
-
if (n ===
|
|
390
|
-
return this.advance(), this.make_token(
|
|
389
|
+
if (n === wn)
|
|
390
|
+
return this.advance(), this.make_token(ji, s, this.pos, e, t);
|
|
391
391
|
if (Ke(n) || n === K && Ke(this.peek())) {
|
|
392
|
-
for (; this.pos < this.source.length &&
|
|
392
|
+
for (; this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
|
|
393
393
|
this.advance();
|
|
394
|
-
return this.make_token(
|
|
394
|
+
return this.make_token(Xi, s, this.pos, e, t);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
return this.make_token(
|
|
397
|
+
return this.make_token(_t, s, this.pos, e, t);
|
|
398
398
|
}
|
|
399
399
|
consume_ident_or_function(e, t) {
|
|
400
400
|
let s = this.pos;
|
|
401
401
|
for (; this.pos < this.source.length; ) {
|
|
402
402
|
let i = this.source.charCodeAt(this.pos);
|
|
403
|
-
if (i ===
|
|
403
|
+
if (i === ts) {
|
|
404
404
|
if (this.pos + 1 >= this.source.length) break;
|
|
405
405
|
let n = this.peek();
|
|
406
406
|
if (ne(n)) break;
|
|
@@ -410,21 +410,21 @@ class er {
|
|
|
410
410
|
this.advance();
|
|
411
411
|
if (this.pos < this.source.length) {
|
|
412
412
|
let l = this.source.charCodeAt(this.pos);
|
|
413
|
-
(
|
|
413
|
+
(bi(l) || ne(l)) && this.advance();
|
|
414
414
|
}
|
|
415
415
|
} else
|
|
416
416
|
this.advance();
|
|
417
|
-
} else if (
|
|
417
|
+
} else if (at(i))
|
|
418
418
|
this.advance();
|
|
419
419
|
else
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
422
|
if (this.pos - s === 1) {
|
|
423
423
|
let i = this.source.charCodeAt(s);
|
|
424
|
-
if ((i ===
|
|
424
|
+
if ((i === yn || i === Cn) && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Me)
|
|
425
425
|
return this.consume_unicode_range(s, e, t);
|
|
426
426
|
}
|
|
427
|
-
return this.pos < this.source.length && this.source.charCodeAt(this.pos) ===
|
|
427
|
+
return this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ti ? (this.advance(), this.make_token(ct, s, this.pos, e, t)) : this.make_token(ae, s, this.pos, e, t);
|
|
428
428
|
}
|
|
429
429
|
consume_unicode_range(e, t, s) {
|
|
430
430
|
this.advance();
|
|
@@ -435,13 +435,13 @@ class er {
|
|
|
435
435
|
if (n)
|
|
436
436
|
break;
|
|
437
437
|
this.advance(), i++;
|
|
438
|
-
} else if (l ===
|
|
438
|
+
} else if (l === bn)
|
|
439
439
|
this.advance(), i++, n = !0;
|
|
440
440
|
else
|
|
441
441
|
break;
|
|
442
442
|
}
|
|
443
443
|
if (n)
|
|
444
|
-
return this.make_token(
|
|
444
|
+
return this.make_token(vi, e, this.pos, t, s);
|
|
445
445
|
if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === K && this.pos + 1 < this.source.length && pe(this.source.charCodeAt(this.pos + 1))) {
|
|
446
446
|
this.advance();
|
|
447
447
|
let l = 0;
|
|
@@ -453,30 +453,30 @@ class er {
|
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
return this.make_token(
|
|
456
|
+
return this.make_token(vi, e, this.pos, t, s);
|
|
457
457
|
}
|
|
458
458
|
consume_at_keyword(e, t) {
|
|
459
459
|
let s = this.pos;
|
|
460
|
-
for (this.advance(); this.pos < this.source.length &&
|
|
460
|
+
for (this.advance(); this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
|
|
461
461
|
this.advance();
|
|
462
|
-
return this.make_token(
|
|
462
|
+
return this.make_token(Zr, s, this.pos, e, t);
|
|
463
463
|
}
|
|
464
464
|
consume_hash(e, t) {
|
|
465
465
|
let s = this.pos;
|
|
466
|
-
for (this.advance(); this.pos < this.source.length &&
|
|
466
|
+
for (this.advance(); this.pos < this.source.length && at(this.source.charCodeAt(this.pos)); )
|
|
467
467
|
this.advance();
|
|
468
|
-
return this.make_token(
|
|
468
|
+
return this.make_token(Qi, s, this.pos, e, t);
|
|
469
469
|
}
|
|
470
470
|
advance(e = 1) {
|
|
471
471
|
if (e === 1) {
|
|
472
472
|
if (this.pos >= this.source.length) return;
|
|
473
473
|
let t = this.source.charCodeAt(this.pos);
|
|
474
|
-
this.pos++, ne(t) ? (t ===
|
|
474
|
+
this.pos++, ne(t) ? (t === Ni && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Li && this.pos++, this.line++, this.column = 1) : this.column++;
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
477
|
for (let t = 0; t < e && !(this.pos >= this.source.length); t++) {
|
|
478
478
|
let s = this.source.charCodeAt(this.pos);
|
|
479
|
-
this.pos++, ne(s) ? (s ===
|
|
479
|
+
this.pos++, ne(s) ? (s === Ni && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Li && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
peek(e = 1) {
|
|
@@ -520,8 +520,8 @@ class er {
|
|
|
520
520
|
this.pos = e.pos, this.line = e.line, this.column = e.column, this.token_type = e.token_type, this.token_start = e.token_start, this.token_end = e.token_end, this.token_line = e.token_line, this.token_column = e.token_column;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
let
|
|
524
|
-
const
|
|
523
|
+
let ht = 36;
|
|
524
|
+
const Rn = 1, ut = 2, Be = 3, J = 4, Cs = 5, ir = 6, ft = 7, rr = 10, us = 11, Ge = 12, nr = 13, vn = 14, lr = 15, fs = 16, Tn = 17, or = 18, Sn = 19, Et = 20, ps = 21, ar = 22, hr = 23, We = 24, Te = 25, Ve = 26, pt = 27, ds = 28, cr = 29, Ye = 30, le = 31, _r = 56, On = 32, ur = 33, Nn = 34, Ln = 35, Un = 36, In = 37, Hn = 38, Pn = 39, fr = 40, Dn = 50, Fn = 1, Mn = 2, Ui = 4, zn = 8, qn = 32, pr = 64, Kn = 128, gs = 0, dr = 1, gr = 2, xr = 3, mr = 4, kr = 5, wr = 6, Ce = 0, Ar = 1, Er = 2, oe = class oe {
|
|
525
525
|
constructor(e = 1024) {
|
|
526
526
|
m(this, "buffer");
|
|
527
527
|
m(this, "view");
|
|
@@ -532,7 +532,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
532
532
|
m(this, "growth_count");
|
|
533
533
|
// Number of times the arena has grown
|
|
534
534
|
m(this, "overflow_lengths");
|
|
535
|
-
this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e *
|
|
535
|
+
this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * ht), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
|
|
536
536
|
}
|
|
537
537
|
// Calculate recommended initial capacity based on CSS source size
|
|
538
538
|
static capacity_for_source(e) {
|
|
@@ -553,7 +553,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
553
553
|
}
|
|
554
554
|
// Calculate byte offset for a node
|
|
555
555
|
node_offset(e) {
|
|
556
|
-
return e *
|
|
556
|
+
return e * ht;
|
|
557
557
|
}
|
|
558
558
|
// Read node type
|
|
559
559
|
get_type(e) {
|
|
@@ -569,7 +569,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
569
569
|
}
|
|
570
570
|
// Read length in source
|
|
571
571
|
get_length(e) {
|
|
572
|
-
if (this.has_flag(e,
|
|
572
|
+
if (this.has_flag(e, Ui)) {
|
|
573
573
|
const t = this.overflow_lengths.get(e);
|
|
574
574
|
if (t !== void 0)
|
|
575
575
|
return t;
|
|
@@ -629,7 +629,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
629
629
|
}
|
|
630
630
|
// Write length in source
|
|
631
631
|
set_length(e, t) {
|
|
632
|
-
t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e,
|
|
632
|
+
t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Ui), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
|
|
633
633
|
}
|
|
634
634
|
// Write content start delta (offset from startOffset)
|
|
635
635
|
set_content_start_delta(e, t) {
|
|
@@ -667,7 +667,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
667
667
|
// Grow the arena by 1.3x when capacity is exceeded
|
|
668
668
|
grow() {
|
|
669
669
|
this.growth_count++;
|
|
670
|
-
let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e *
|
|
670
|
+
let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e * ht);
|
|
671
671
|
new Uint8Array(t).set(new Uint8Array(this.buffer)), this.buffer = t, this.view = new DataView(t), this.capacity = e;
|
|
672
672
|
}
|
|
673
673
|
// Allocate and initialize a new node with core properties
|
|
@@ -676,7 +676,7 @@ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, G
|
|
|
676
676
|
this.count >= this.capacity && this.grow();
|
|
677
677
|
const l = this.count;
|
|
678
678
|
this.count++;
|
|
679
|
-
const a = l *
|
|
679
|
+
const a = l * ht;
|
|
680
680
|
return this.view.setUint8(a, e), this.view.setUint32(a + 12, t, !0), this.view.setUint32(a + 24, i, !0), this.view.setUint32(a + 28, n, !0), this.set_length(l, s), l;
|
|
681
681
|
}
|
|
682
682
|
// --- Tree Building Helpers ---
|
|
@@ -720,15 +720,15 @@ m(oe, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-wor
|
|
|
720
720
|
// (~20% of nodes are declarations, +1 VALUE node per declaration = +20% nodes)
|
|
721
721
|
m(oe, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
|
|
722
722
|
m(oe, "CAPACITY_BUFFER", 1.2);
|
|
723
|
-
let
|
|
724
|
-
const
|
|
723
|
+
let gt = oe;
|
|
724
|
+
const $n = 32, Bn = 9, Gn = 10, Wn = 13, Yn = 12, Ue = 47, j = 42, M = 45, Qn = 39, Vn = 34, ie = 43, yr = 46, dt = 126, Cr = 62, jn = 38, de = 61, ze = 124, Ii = 36, Hi = 94, Xn = 58;
|
|
725
725
|
function re(r) {
|
|
726
|
-
return r ===
|
|
726
|
+
return r === $n || r === Bn || r === Gn || r === Wn || r === Yn;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return r ===
|
|
728
|
+
function Zn(r) {
|
|
729
|
+
return r === Cr || r === ie || r === dt;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function ss(r) {
|
|
732
732
|
return r >= 48 && r <= 57;
|
|
733
733
|
}
|
|
734
734
|
function V(r, e) {
|
|
@@ -741,7 +741,7 @@ function V(r, e) {
|
|
|
741
741
|
}
|
|
742
742
|
return !0;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function Jn(r, e) {
|
|
745
745
|
if (r.length < e.length)
|
|
746
746
|
return !1;
|
|
747
747
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -751,7 +751,7 @@ function Xn(r, e) {
|
|
|
751
751
|
}
|
|
752
752
|
return !0;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function el(r, e) {
|
|
755
755
|
if (e.length === 0)
|
|
756
756
|
return -1;
|
|
757
757
|
if (e.length === 1) {
|
|
@@ -785,7 +785,7 @@ function qe(r, e, t) {
|
|
|
785
785
|
return !0;
|
|
786
786
|
return !1;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function tl(r, e, t) {
|
|
789
789
|
for (; e < t && re(r.charCodeAt(e)); )
|
|
790
790
|
e++;
|
|
791
791
|
return e;
|
|
@@ -811,7 +811,7 @@ function be(r, e, t) {
|
|
|
811
811
|
}
|
|
812
812
|
return e;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function sl(r, e, t) {
|
|
815
815
|
for (; e > t; ) {
|
|
816
816
|
let s = r.charCodeAt(e - 1);
|
|
817
817
|
if (re(s)) {
|
|
@@ -832,20 +832,20 @@ function el(r, e, t) {
|
|
|
832
832
|
}
|
|
833
833
|
return e;
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function is(r) {
|
|
836
836
|
let e = 0;
|
|
837
837
|
for (let n = 0; n < r.length; n++) {
|
|
838
838
|
let l = r.charCodeAt(n);
|
|
839
839
|
if (l === 101 || l === 69) {
|
|
840
840
|
if (n + 1 < r.length) {
|
|
841
841
|
let a = r.charCodeAt(n + 1);
|
|
842
|
-
if (
|
|
842
|
+
if (ss(a)) {
|
|
843
843
|
e = n + 1;
|
|
844
844
|
continue;
|
|
845
845
|
}
|
|
846
846
|
if ((a === 43 || a === 45) && n + 2 < r.length) {
|
|
847
847
|
let h = r.charCodeAt(n + 2);
|
|
848
|
-
if (
|
|
848
|
+
if (ss(h)) {
|
|
849
849
|
e = n + 1;
|
|
850
850
|
continue;
|
|
851
851
|
}
|
|
@@ -853,7 +853,7 @@ function ss(r) {
|
|
|
853
853
|
}
|
|
854
854
|
break;
|
|
855
855
|
}
|
|
856
|
-
if (
|
|
856
|
+
if (ss(l) || l === yr || l === M || l === ie)
|
|
857
857
|
e = n + 1;
|
|
858
858
|
else
|
|
859
859
|
break;
|
|
@@ -861,59 +861,59 @@ function ss(r) {
|
|
|
861
861
|
let t = r.substring(0, e), s = r.substring(e);
|
|
862
862
|
return { value: t ? parseFloat(t) : 0, unit: s };
|
|
863
863
|
}
|
|
864
|
-
const
|
|
865
|
-
[
|
|
866
|
-
[
|
|
864
|
+
const il = {
|
|
865
|
+
[Rn]: "StyleSheet",
|
|
866
|
+
[ut]: "Rule",
|
|
867
867
|
[Be]: "Atrule",
|
|
868
868
|
[J]: "Declaration",
|
|
869
|
-
[
|
|
870
|
-
[
|
|
871
|
-
[
|
|
872
|
-
[
|
|
873
|
-
[
|
|
869
|
+
[Cs]: "Selector",
|
|
870
|
+
[ir]: "Comment",
|
|
871
|
+
[ft]: "Block",
|
|
872
|
+
[rr]: "Identifier",
|
|
873
|
+
[us]: "Number",
|
|
874
874
|
[Ge]: "Dimension",
|
|
875
|
-
[
|
|
876
|
-
[
|
|
877
|
-
[
|
|
878
|
-
[
|
|
879
|
-
[
|
|
880
|
-
[
|
|
881
|
-
[
|
|
882
|
-
[
|
|
883
|
-
[
|
|
884
|
-
[
|
|
885
|
-
[
|
|
886
|
-
[
|
|
875
|
+
[nr]: "String",
|
|
876
|
+
[vn]: "Hash",
|
|
877
|
+
[lr]: "Function",
|
|
878
|
+
[fs]: "Operator",
|
|
879
|
+
[Tn]: "Parentheses",
|
|
880
|
+
[or]: "Url",
|
|
881
|
+
[Sn]: "UnicodeRange",
|
|
882
|
+
[Dn]: "Value",
|
|
883
|
+
[Et]: "SelectorList",
|
|
884
|
+
[ps]: "TypeSelector",
|
|
885
|
+
[ar]: "ClassSelector",
|
|
886
|
+
[hr]: "IdSelector",
|
|
887
887
|
[We]: "AttributeSelector",
|
|
888
888
|
[Te]: "PseudoClassSelector",
|
|
889
889
|
[Ve]: "PseudoElementSelector",
|
|
890
|
-
[
|
|
891
|
-
[
|
|
892
|
-
[
|
|
890
|
+
[pt]: "Combinator",
|
|
891
|
+
[ds]: "UniversalSelector",
|
|
892
|
+
[cr]: "NestingSelector",
|
|
893
893
|
[Ye]: "Nth",
|
|
894
894
|
[le]: "NthOf",
|
|
895
|
-
[
|
|
896
|
-
[
|
|
897
|
-
[
|
|
898
|
-
[
|
|
899
|
-
[
|
|
900
|
-
[
|
|
901
|
-
[
|
|
902
|
-
[
|
|
903
|
-
[
|
|
904
|
-
[
|
|
905
|
-
},
|
|
906
|
-
[
|
|
907
|
-
[
|
|
908
|
-
[
|
|
909
|
-
[
|
|
910
|
-
[
|
|
911
|
-
[
|
|
912
|
-
[
|
|
913
|
-
},
|
|
895
|
+
[_r]: "Lang",
|
|
896
|
+
[On]: "MediaQuery",
|
|
897
|
+
[ur]: "Feature",
|
|
898
|
+
[Nn]: "MediaType",
|
|
899
|
+
[Ln]: "ContainerQuery",
|
|
900
|
+
[Un]: "SupportsQuery",
|
|
901
|
+
[In]: "Layer",
|
|
902
|
+
[Hn]: "Operator",
|
|
903
|
+
[Pn]: "MediaFeatureRange",
|
|
904
|
+
[fr]: "AtrulePrelude"
|
|
905
|
+
}, rl = {
|
|
906
|
+
[gs]: null,
|
|
907
|
+
[dr]: "=",
|
|
908
|
+
[gr]: "~=",
|
|
909
|
+
[xr]: "|=",
|
|
910
|
+
[mr]: "^=",
|
|
911
|
+
[kr]: "$=",
|
|
912
|
+
[wr]: "*="
|
|
913
|
+
}, nl = {
|
|
914
914
|
[Ce]: null,
|
|
915
|
-
[
|
|
916
|
-
[
|
|
915
|
+
[Ar]: "i",
|
|
916
|
+
[Er]: "s"
|
|
917
917
|
};
|
|
918
918
|
class je {
|
|
919
919
|
constructor(e, t, s) {
|
|
@@ -939,7 +939,7 @@ class je {
|
|
|
939
939
|
}
|
|
940
940
|
/** Get node type as human-readable string */
|
|
941
941
|
get type_name() {
|
|
942
|
-
return
|
|
942
|
+
return il[this.type] || "unknown";
|
|
943
943
|
}
|
|
944
944
|
/** Get the full text of this node from source */
|
|
945
945
|
get text() {
|
|
@@ -949,7 +949,7 @@ class je {
|
|
|
949
949
|
/** Get the "content" text (at-rule name for at-rules, layer name for import layers) */
|
|
950
950
|
get name() {
|
|
951
951
|
let { type: e } = this;
|
|
952
|
-
if (!(e === J || e ===
|
|
952
|
+
if (!(e === J || e === fs || e === Cs))
|
|
953
953
|
return this.get_content();
|
|
954
954
|
}
|
|
955
955
|
/**
|
|
@@ -958,7 +958,7 @@ class je {
|
|
|
958
958
|
*/
|
|
959
959
|
get property() {
|
|
960
960
|
let { type: e } = this;
|
|
961
|
-
if (!(e !== J && e !==
|
|
961
|
+
if (!(e !== J && e !== ur))
|
|
962
962
|
return this.get_content();
|
|
963
963
|
}
|
|
964
964
|
/**
|
|
@@ -973,20 +973,20 @@ class je {
|
|
|
973
973
|
if (e === J && s)
|
|
974
974
|
return s;
|
|
975
975
|
if (e === Ge)
|
|
976
|
-
return
|
|
977
|
-
if (e ===
|
|
976
|
+
return is(t).value;
|
|
977
|
+
if (e === us)
|
|
978
978
|
return Number.parseFloat(t);
|
|
979
|
-
if (e ===
|
|
980
|
-
if ((s == null ? void 0 : s.type) ===
|
|
979
|
+
if (e === or) {
|
|
980
|
+
if ((s == null ? void 0 : s.type) === nr)
|
|
981
981
|
return s.text;
|
|
982
|
-
if (
|
|
982
|
+
if (Jn(t, "url(")) {
|
|
983
983
|
let l = t.indexOf("("), a = t.lastIndexOf(")");
|
|
984
984
|
if (l !== -1 && a !== -1 && a > l)
|
|
985
985
|
return t.substring(l + 1, a).trim();
|
|
986
986
|
} else if (t.startsWith('"') || t.startsWith("'"))
|
|
987
987
|
return t;
|
|
988
988
|
}
|
|
989
|
-
if (e ===
|
|
989
|
+
if (e === fs)
|
|
990
990
|
return this.get_content();
|
|
991
991
|
let i = this.arena.get_value_start(this.index), n = this.arena.get_value_length(this.index);
|
|
992
992
|
return n === 0 ? null : this.source.substring(i, i + n);
|
|
@@ -994,7 +994,7 @@ class je {
|
|
|
994
994
|
/** Get the numeric value for NUMBER and DIMENSION nodes, or null for other node types */
|
|
995
995
|
get value_as_number() {
|
|
996
996
|
let { text: e, type: t } = this;
|
|
997
|
-
return t ===
|
|
997
|
+
return t === us ? Number.parseFloat(e) : t === Ge ? is(e).value : null;
|
|
998
998
|
}
|
|
999
999
|
/**
|
|
1000
1000
|
* Get the prelude node:
|
|
@@ -1005,9 +1005,9 @@ class je {
|
|
|
1005
1005
|
get prelude() {
|
|
1006
1006
|
if (this.type === Be) {
|
|
1007
1007
|
let e = this.first_child;
|
|
1008
|
-
return e && e.type ===
|
|
1008
|
+
return e && e.type === fr ? e : null;
|
|
1009
1009
|
}
|
|
1010
|
-
if (this.type ===
|
|
1010
|
+
if (this.type === ut)
|
|
1011
1011
|
return this.first_child;
|
|
1012
1012
|
}
|
|
1013
1013
|
/**
|
|
@@ -1029,17 +1029,17 @@ class je {
|
|
|
1029
1029
|
/** Get the unit for dimension nodes (e.g., "px" from "100px", "%" from "50%") */
|
|
1030
1030
|
get unit() {
|
|
1031
1031
|
if (this.type === Ge)
|
|
1032
|
-
return
|
|
1032
|
+
return is(this.text).unit;
|
|
1033
1033
|
}
|
|
1034
1034
|
/** Check if this declaration has !important */
|
|
1035
1035
|
get is_important() {
|
|
1036
1036
|
if (this.type === J)
|
|
1037
|
-
return this.arena.has_flag(this.index,
|
|
1037
|
+
return this.arena.has_flag(this.index, Fn);
|
|
1038
1038
|
}
|
|
1039
1039
|
/** Check if this declaration has a browser hack prefix */
|
|
1040
1040
|
get is_browserhack() {
|
|
1041
1041
|
if (this.type === J)
|
|
1042
|
-
return this.arena.has_flag(this.index,
|
|
1042
|
+
return this.arena.has_flag(this.index, Kn);
|
|
1043
1043
|
}
|
|
1044
1044
|
/** Check if this has a vendor prefix (computed on-demand) */
|
|
1045
1045
|
get is_vendor_prefixed() {
|
|
@@ -1051,9 +1051,9 @@ class je {
|
|
|
1051
1051
|
return qe(this.get_content());
|
|
1052
1052
|
case Be:
|
|
1053
1053
|
return qe(this.get_content());
|
|
1054
|
-
case
|
|
1054
|
+
case lr:
|
|
1055
1055
|
return qe(this.get_content());
|
|
1056
|
-
case
|
|
1056
|
+
case rr:
|
|
1057
1057
|
return qe(this.text);
|
|
1058
1058
|
default:
|
|
1059
1059
|
return !1;
|
|
@@ -1061,34 +1061,34 @@ class je {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
/** Check if this node has an error */
|
|
1063
1063
|
get has_error() {
|
|
1064
|
-
return this.arena.has_flag(this.index,
|
|
1064
|
+
return this.arena.has_flag(this.index, Mn);
|
|
1065
1065
|
}
|
|
1066
1066
|
/** Check if this node has a prelude (at-rules and style rules) */
|
|
1067
1067
|
get has_prelude() {
|
|
1068
1068
|
let { type: e } = this;
|
|
1069
|
-
return e === Be ? this.arena.get_value_length(this.index) > 0 : e ===
|
|
1069
|
+
return e === Be ? this.arena.get_value_length(this.index) > 0 : e === ut ? this.first_child !== null : !1;
|
|
1070
1070
|
}
|
|
1071
1071
|
/** Check if this rule has a block { } */
|
|
1072
1072
|
get has_block() {
|
|
1073
|
-
return this.arena.has_flag(this.index,
|
|
1073
|
+
return this.arena.has_flag(this.index, zn);
|
|
1074
1074
|
}
|
|
1075
1075
|
/** Check if this style rule has declarations */
|
|
1076
1076
|
get has_declarations() {
|
|
1077
|
-
return this.arena.has_flag(this.index,
|
|
1077
|
+
return this.arena.has_flag(this.index, qn);
|
|
1078
1078
|
}
|
|
1079
1079
|
/** Get the block node (for style rules and at-rules with blocks) */
|
|
1080
1080
|
get block() {
|
|
1081
1081
|
let { type: e } = this;
|
|
1082
|
-
if (e ===
|
|
1082
|
+
if (e === ut) {
|
|
1083
1083
|
let t = this.first_child;
|
|
1084
1084
|
if (!t) return null;
|
|
1085
1085
|
let s = t.next_sibling;
|
|
1086
|
-
return (s == null ? void 0 : s.type) ===
|
|
1086
|
+
return (s == null ? void 0 : s.type) === ft ? s : null;
|
|
1087
1087
|
}
|
|
1088
1088
|
if (e === Be) {
|
|
1089
1089
|
let t = this.first_child;
|
|
1090
1090
|
for (; t; ) {
|
|
1091
|
-
if (t.type ===
|
|
1091
|
+
if (t.type === ft && !t.next_sibling)
|
|
1092
1092
|
return t;
|
|
1093
1093
|
t = t.next_sibling;
|
|
1094
1094
|
}
|
|
@@ -1098,10 +1098,10 @@ class je {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
/** Check if this block is empty (no declarations or rules, only comments allowed) */
|
|
1100
1100
|
get is_empty() {
|
|
1101
|
-
if (this.type !==
|
|
1101
|
+
if (this.type !== ft) return;
|
|
1102
1102
|
let e = this.first_child;
|
|
1103
1103
|
for (; e; ) {
|
|
1104
|
-
if (e.type !==
|
|
1104
|
+
if (e.type !== ir)
|
|
1105
1105
|
return !1;
|
|
1106
1106
|
e = e.next_sibling;
|
|
1107
1107
|
}
|
|
@@ -1152,7 +1152,7 @@ class je {
|
|
|
1152
1152
|
*/
|
|
1153
1153
|
get has_children() {
|
|
1154
1154
|
let { type: e } = this;
|
|
1155
|
-
return (e === Te || e === Ve) && this.arena.has_flag(this.index,
|
|
1155
|
+
return (e === Te || e === Ve) && this.arena.has_flag(this.index, pr) ? !0 : this.arena.has_children(this.index);
|
|
1156
1156
|
}
|
|
1157
1157
|
/** Get all children as an array */
|
|
1158
1158
|
get children() {
|
|
@@ -1216,7 +1216,7 @@ class je {
|
|
|
1216
1216
|
if (this.type !== Te) return;
|
|
1217
1217
|
let e = this.first_child;
|
|
1218
1218
|
if (e) {
|
|
1219
|
-
if (e.type ===
|
|
1219
|
+
if (e.type === Et)
|
|
1220
1220
|
return e;
|
|
1221
1221
|
if (e.type === le)
|
|
1222
1222
|
return e.selector;
|
|
@@ -1242,8 +1242,8 @@ class je {
|
|
|
1242
1242
|
let { is_important: d, is_browserhack: f } = this;
|
|
1243
1243
|
d && (o.is_important = !0), f && (o.is_browserhack = !0);
|
|
1244
1244
|
}
|
|
1245
|
-
let { is_vendor_prefixed:
|
|
1246
|
-
if (
|
|
1245
|
+
let { is_vendor_prefixed: u, has_error: p } = this;
|
|
1246
|
+
if (u && (o.is_vendor_prefixed = !0), p && (o.has_error = !0), i === We && (o.attr_operator = rl[this.attr_operator], o.attr_flags = nl[this.attr_flags]), (i === Ye || i === le) && (o.nth_a = this.nth_a, o.nth_b = this.nth_b), s && (o.line = this.line, o.column = this.column, o.start = this.start, o.length = this.length, o.end = this.end), t && i !== J) {
|
|
1247
1247
|
o.children = [];
|
|
1248
1248
|
for (let d of this.children)
|
|
1249
1249
|
o.children.push(d.clone({ deep: !0, locations: s }));
|
|
@@ -1251,13 +1251,13 @@ class je {
|
|
|
1251
1251
|
return o;
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
|
-
class
|
|
1254
|
+
class Pi {
|
|
1255
1255
|
constructor(e, t) {
|
|
1256
1256
|
m(this, "lexer");
|
|
1257
1257
|
m(this, "arena");
|
|
1258
1258
|
m(this, "source");
|
|
1259
1259
|
m(this, "expr_end");
|
|
1260
|
-
this.arena = e, this.source = t, this.lexer = new
|
|
1260
|
+
this.arena = e, this.source = t, this.lexer = new sr(t), this.expr_end = 0;
|
|
1261
1261
|
}
|
|
1262
1262
|
/**
|
|
1263
1263
|
* Parse An+B expression
|
|
@@ -1270,30 +1270,30 @@ class Ii {
|
|
|
1270
1270
|
if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
|
|
1271
1271
|
return null;
|
|
1272
1272
|
if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae) {
|
|
1273
|
-
const
|
|
1274
|
-
if (V("odd",
|
|
1273
|
+
const u = this.source.substring(this.lexer.token_start, this.lexer.token_end);
|
|
1274
|
+
if (V("odd", u) || V("even", u))
|
|
1275
1275
|
return n = this.lexer.token_start, l = this.lexer.token_end, this.create_anplusb_node(o, n, l, 0, 0);
|
|
1276
1276
|
const p = this.source.charCodeAt(this.lexer.token_start), d = this.lexer.token_end > this.lexer.token_start + 1 ? this.source.charCodeAt(this.lexer.token_start + 1) : 0;
|
|
1277
1277
|
return p === M && d === 110 ? this.lexer.token_end > this.lexer.token_start + 2 && this.source.charCodeAt(this.lexer.token_start + 2) === M ? (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.source.substring(this.lexer.token_start + 2, this.lexer.token_end), a = this.lexer.token_start + 2, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : p === 110 ? this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === M ? (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0)) : null;
|
|
1278
1278
|
}
|
|
1279
1279
|
if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === ie) {
|
|
1280
|
-
const
|
|
1280
|
+
const u = this.lexer.save_position();
|
|
1281
1281
|
if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae && this.source.substring(this.lexer.token_start, this.lexer.token_end).charCodeAt(0) === 110)
|
|
1282
|
-
return n =
|
|
1283
|
-
this.lexer.restore_position(
|
|
1282
|
+
return n = u.pos - 1, l = this.lexer.token_start + 1, this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === M ? (i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), a = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h)) : (i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, i !== null ? a : 0, i !== null ? h : 0));
|
|
1283
|
+
this.lexer.restore_position(u);
|
|
1284
1284
|
}
|
|
1285
|
-
if (this.lexer.token_type ===
|
|
1286
|
-
const
|
|
1285
|
+
if (this.lexer.token_type === Xi) {
|
|
1286
|
+
const u = this.source.substring(this.lexer.token_start, this.lexer.token_end), p = el(u, "n");
|
|
1287
1287
|
if (p !== -1) {
|
|
1288
|
-
if (n = this.lexer.token_start, l = this.lexer.token_start + p + 1, p + 1 <
|
|
1289
|
-
const d =
|
|
1288
|
+
if (n = this.lexer.token_start, l = this.lexer.token_start + p + 1, p + 1 < u.length) {
|
|
1289
|
+
const d = u.substring(p + 1);
|
|
1290
1290
|
if (d.charCodeAt(0) === M)
|
|
1291
1291
|
return i = d, a = this.lexer.token_start + p + 1, h = this.lexer.token_end, this.create_anplusb_node(o, n, l, a, h);
|
|
1292
1292
|
}
|
|
1293
1293
|
return i = this.parse_b_part(), i !== null && (a = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(o, n, l, a, h);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
return this.lexer.token_type ===
|
|
1296
|
+
return this.lexer.token_type === _t ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), a = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(o, 0, 0, a, h)) : null;
|
|
1297
1297
|
}
|
|
1298
1298
|
/**
|
|
1299
1299
|
* Parse the b part after 'n'
|
|
@@ -1306,13 +1306,13 @@ class Ii {
|
|
|
1306
1306
|
const e = this.source.charCodeAt(this.lexer.token_start);
|
|
1307
1307
|
if (e === ie || e === M) {
|
|
1308
1308
|
const t = e === M ? "-" : "";
|
|
1309
|
-
if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type ===
|
|
1309
|
+
if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === _t) {
|
|
1310
1310
|
let s = this.source.substring(this.lexer.token_start, this.lexer.token_end);
|
|
1311
1311
|
return s.charCodeAt(0) === ie && (s = s.substring(1)), t === "-" ? t + s : s;
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
|
-
if (this.lexer.token_type ===
|
|
1315
|
+
if (this.lexer.token_type === _t) {
|
|
1316
1316
|
let e = this.source.substring(this.lexer.token_start, this.lexer.token_end);
|
|
1317
1317
|
const t = e.charCodeAt(0);
|
|
1318
1318
|
if (t === ie || t === M)
|
|
@@ -1328,13 +1328,13 @@ class Ii {
|
|
|
1328
1328
|
return s > t && (this.arena.set_content_start_delta(l, t - e), this.arena.set_content_length(l, s - t)), n > i && (this.arena.set_value_start_delta(l, i - e), this.arena.set_value_length(l, n - i)), l;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
|
-
class
|
|
1331
|
+
class ll {
|
|
1332
1332
|
constructor(e, t) {
|
|
1333
1333
|
m(this, "lexer");
|
|
1334
1334
|
m(this, "arena");
|
|
1335
1335
|
m(this, "source");
|
|
1336
1336
|
m(this, "selector_end");
|
|
1337
|
-
this.arena = e, this.source = t, this.lexer = new
|
|
1337
|
+
this.arena = e, this.source = t, this.lexer = new sr(t), this.selector_end = 0;
|
|
1338
1338
|
}
|
|
1339
1339
|
// Parse a selector range into selector nodes (standalone use)
|
|
1340
1340
|
// Always returns a NODE_SELECTOR_LIST with selector components as children
|
|
@@ -1348,7 +1348,7 @@ class rl {
|
|
|
1348
1348
|
let l = this.lexer.pos, a = this.lexer.line, h = this.lexer.column, o = this.parse_complex_selector(e);
|
|
1349
1349
|
if (o !== null) {
|
|
1350
1350
|
let p = this.arena.create_node(
|
|
1351
|
-
|
|
1351
|
+
Cs,
|
|
1352
1352
|
l,
|
|
1353
1353
|
this.lexer.pos - l,
|
|
1354
1354
|
a,
|
|
@@ -1368,7 +1368,7 @@ class rl {
|
|
|
1368
1368
|
break;
|
|
1369
1369
|
}
|
|
1370
1370
|
if (t.length >= 1) {
|
|
1371
|
-
let l = this.arena.create_node(
|
|
1371
|
+
let l = this.arena.create_node(Et, s, this.lexer.pos - s, i, n);
|
|
1372
1372
|
return this.arena.append_children(l, t), l;
|
|
1373
1373
|
}
|
|
1374
1374
|
return null;
|
|
@@ -1382,9 +1382,9 @@ class rl {
|
|
|
1382
1382
|
const s = this.lexer.save_position();
|
|
1383
1383
|
if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
|
|
1384
1384
|
let n = this.source.charCodeAt(this.lexer.token_start);
|
|
1385
|
-
if (n ===
|
|
1385
|
+
if (n === Cr || n === ie || n === dt) {
|
|
1386
1386
|
let l = this.create_node_at(
|
|
1387
|
-
|
|
1387
|
+
pt,
|
|
1388
1388
|
this.lexer.token_start,
|
|
1389
1389
|
this.lexer.token_end,
|
|
1390
1390
|
this.lexer.token_line,
|
|
@@ -1434,7 +1434,7 @@ class rl {
|
|
|
1434
1434
|
let e = [];
|
|
1435
1435
|
for (; this.lexer.pos < this.selector_end; ) {
|
|
1436
1436
|
const t = this.lexer.save_position();
|
|
1437
|
-
if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type ===
|
|
1437
|
+
if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === _s) break;
|
|
1438
1438
|
let i = this.parse_simple_selector();
|
|
1439
1439
|
if (i !== null)
|
|
1440
1440
|
e.push(i);
|
|
@@ -1454,20 +1454,20 @@ class rl {
|
|
|
1454
1454
|
switch (e) {
|
|
1455
1455
|
case ae:
|
|
1456
1456
|
return this.parse_type_or_namespace_selector(t, s);
|
|
1457
|
-
case
|
|
1458
|
-
return this.create_node(
|
|
1457
|
+
case Qi:
|
|
1458
|
+
return this.create_node(hr, t, s);
|
|
1459
1459
|
case xe:
|
|
1460
1460
|
let i = this.source.charCodeAt(t);
|
|
1461
|
-
return i ===
|
|
1462
|
-
case
|
|
1461
|
+
return i === yr ? this.parse_class_selector(t) : i === j ? this.parse_universal_or_namespace_selector(t, s) : i === jn ? this.create_node(cr, t, s) : i === ze ? this.parse_empty_namespace_selector(t) : null;
|
|
1462
|
+
case cs:
|
|
1463
1463
|
return this.parse_attribute_selector(t);
|
|
1464
|
-
case
|
|
1464
|
+
case Zi:
|
|
1465
1465
|
return this.parse_pseudo(t);
|
|
1466
|
-
case
|
|
1466
|
+
case ct:
|
|
1467
1467
|
return this.parse_pseudo_function(t, s);
|
|
1468
|
-
case
|
|
1468
|
+
case ji:
|
|
1469
1469
|
return this.create_node(Ge, t, s);
|
|
1470
|
-
case
|
|
1470
|
+
case hs:
|
|
1471
1471
|
case $e:
|
|
1472
1472
|
return null;
|
|
1473
1473
|
default:
|
|
@@ -1481,9 +1481,9 @@ class rl {
|
|
|
1481
1481
|
this.lexer.next_token_fast(!1);
|
|
1482
1482
|
let n;
|
|
1483
1483
|
if (this.lexer.token_type === ae)
|
|
1484
|
-
n = fs;
|
|
1485
|
-
else if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === j)
|
|
1486
1484
|
n = ps;
|
|
1485
|
+
else if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === j)
|
|
1486
|
+
n = ds;
|
|
1487
1487
|
else
|
|
1488
1488
|
return this.lexer.restore_position(i), null;
|
|
1489
1489
|
let l = this.create_node(n, e, this.lexer.token_end);
|
|
@@ -1500,7 +1500,7 @@ class rl {
|
|
|
1500
1500
|
this.lexer.pos = t;
|
|
1501
1501
|
} else
|
|
1502
1502
|
this.lexer.restore_position(s);
|
|
1503
|
-
return this.create_node(
|
|
1503
|
+
return this.create_node(ps, e, t);
|
|
1504
1504
|
}
|
|
1505
1505
|
// Parse universal selector or namespace selector (*|E or *|*)
|
|
1506
1506
|
// Called when we've seen a * DELIM token
|
|
@@ -1513,7 +1513,7 @@ class rl {
|
|
|
1513
1513
|
this.lexer.pos = t;
|
|
1514
1514
|
} else
|
|
1515
1515
|
this.lexer.restore_position(s);
|
|
1516
|
-
return this.create_node(
|
|
1516
|
+
return this.create_node(ds, e, t);
|
|
1517
1517
|
}
|
|
1518
1518
|
// Parse empty namespace selector (|E or |*)
|
|
1519
1519
|
// Called when we've seen a | DELIM token at the start
|
|
@@ -1527,15 +1527,15 @@ class rl {
|
|
|
1527
1527
|
return this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null;
|
|
1528
1528
|
if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
|
|
1529
1529
|
let n = this.source.charCodeAt(this.lexer.token_start);
|
|
1530
|
-
if (
|
|
1531
|
-
return this.create_node_at(
|
|
1530
|
+
if (Zn(n))
|
|
1531
|
+
return this.create_node_at(pt, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
|
|
1532
1532
|
}
|
|
1533
|
-
return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(
|
|
1533
|
+
return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(pt, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
|
|
1534
1534
|
}
|
|
1535
1535
|
// Parse class selector (.classname)
|
|
1536
1536
|
parse_class_selector(e) {
|
|
1537
1537
|
const t = this.lexer.save_position();
|
|
1538
|
-
return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(
|
|
1538
|
+
return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(ar, e, this.lexer.token_end);
|
|
1539
1539
|
}
|
|
1540
1540
|
// Parse attribute selector ([attr], [attr=value], etc.)
|
|
1541
1541
|
parse_attribute_selector(e) {
|
|
@@ -1543,9 +1543,9 @@ class rl {
|
|
|
1543
1543
|
for (; this.lexer.pos < this.selector_end && t > 0; ) {
|
|
1544
1544
|
this.lexer.next_token_fast(!1);
|
|
1545
1545
|
let a = this.lexer.token_type;
|
|
1546
|
-
if (a ===
|
|
1546
|
+
if (a === cs)
|
|
1547
1547
|
t++;
|
|
1548
|
-
else if (a ===
|
|
1548
|
+
else if (a === Ji && (t--, t === 0)) {
|
|
1549
1549
|
n = this.lexer.token_start, s = this.lexer.token_end;
|
|
1550
1550
|
break;
|
|
1551
1551
|
}
|
|
@@ -1555,35 +1555,35 @@ class rl {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
// Parse attribute content to extract name, operator, and value
|
|
1557
1557
|
parse_attribute_content(e, t, s) {
|
|
1558
|
-
if (t = be(this.source, t, s), s =
|
|
1558
|
+
if (t = be(this.source, t, s), s = sl(this.source, s, t), t >= s) return;
|
|
1559
1559
|
let i = t, n = t, l = -1, a = -1, h = -1;
|
|
1560
1560
|
for (; n < s; ) {
|
|
1561
1561
|
let f = this.source.charCodeAt(n);
|
|
1562
|
-
if (re(f) || f === de || f ===
|
|
1562
|
+
if (re(f) || f === de || f === dt || f === ze || f === Hi || f === Ii || f === j)
|
|
1563
1563
|
break;
|
|
1564
1564
|
n++;
|
|
1565
1565
|
}
|
|
1566
1566
|
n > i && (this.arena.set_content_start_delta(e, i - this.arena.get_start_offset(e)), this.arena.set_content_length(e, n - i));
|
|
1567
1567
|
let o = be(this.source, n, s);
|
|
1568
1568
|
if (o >= s) {
|
|
1569
|
-
this.arena.set_attr_operator(e,
|
|
1569
|
+
this.arena.set_attr_operator(e, gs), this.arena.set_attr_flags(e, Ce);
|
|
1570
1570
|
return;
|
|
1571
1571
|
}
|
|
1572
|
-
let
|
|
1573
|
-
if (
|
|
1574
|
-
l = o + 1, this.arena.set_attr_operator(e,
|
|
1575
|
-
else if (
|
|
1576
|
-
l = o + 2, this.arena.set_attr_operator(e, pr);
|
|
1577
|
-
else if (_ === ze && p === de)
|
|
1578
|
-
l = o + 2, this.arena.set_attr_operator(e, dr);
|
|
1579
|
-
else if (_ === Ui && p === de)
|
|
1572
|
+
let u = this.source.charCodeAt(o), p = o + 1 < s ? this.source.charCodeAt(o + 1) : 0;
|
|
1573
|
+
if (u === de)
|
|
1574
|
+
l = o + 1, this.arena.set_attr_operator(e, dr);
|
|
1575
|
+
else if (u === dt && p === de)
|
|
1580
1576
|
l = o + 2, this.arena.set_attr_operator(e, gr);
|
|
1581
|
-
else if (
|
|
1577
|
+
else if (u === ze && p === de)
|
|
1582
1578
|
l = o + 2, this.arena.set_attr_operator(e, xr);
|
|
1583
|
-
else if (
|
|
1579
|
+
else if (u === Hi && p === de)
|
|
1584
1580
|
l = o + 2, this.arena.set_attr_operator(e, mr);
|
|
1581
|
+
else if (u === Ii && p === de)
|
|
1582
|
+
l = o + 2, this.arena.set_attr_operator(e, kr);
|
|
1583
|
+
else if (u === j && p === de)
|
|
1584
|
+
l = o + 2, this.arena.set_attr_operator(e, wr);
|
|
1585
1585
|
else {
|
|
1586
|
-
this.arena.set_attr_operator(e,
|
|
1586
|
+
this.arena.set_attr_operator(e, gs), this.arena.set_attr_flags(e, Ce);
|
|
1587
1587
|
return;
|
|
1588
1588
|
}
|
|
1589
1589
|
if (o = be(this.source, l, s), o >= s) {
|
|
@@ -1592,15 +1592,15 @@ class rl {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
a = o;
|
|
1594
1594
|
let d = this.source.charCodeAt(o);
|
|
1595
|
-
if (d ===
|
|
1595
|
+
if (d === Qn || d === Vn) {
|
|
1596
1596
|
let f = d;
|
|
1597
1597
|
for (a = o, o++; o < s; ) {
|
|
1598
|
-
let
|
|
1599
|
-
if (
|
|
1598
|
+
let L = this.source.charCodeAt(o);
|
|
1599
|
+
if (L === f) {
|
|
1600
1600
|
o++;
|
|
1601
1601
|
break;
|
|
1602
1602
|
}
|
|
1603
|
-
|
|
1603
|
+
L === 92 ? o += 2 : o++;
|
|
1604
1604
|
}
|
|
1605
1605
|
h = o;
|
|
1606
1606
|
} else {
|
|
@@ -1614,7 +1614,7 @@ class rl {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
if (h > a && (this.arena.set_value_start_delta(e, a - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - a)), o = be(this.source, h, s), o < s) {
|
|
1616
1616
|
let f = this.source.charCodeAt(o);
|
|
1617
|
-
f === 105 || f === 73 ? this.arena.set_attr_flags(e,
|
|
1617
|
+
f === 105 || f === 73 ? this.arena.set_attr_flags(e, Ar) : f === 115 || f === 83 ? this.arena.set_attr_flags(e, Er) : this.arena.set_attr_flags(e, Ce);
|
|
1618
1618
|
} else
|
|
1619
1619
|
this.arena.set_attr_flags(e, Ce);
|
|
1620
1620
|
}
|
|
@@ -1623,12 +1623,12 @@ class rl {
|
|
|
1623
1623
|
const t = this.lexer.save_position(), s = this.lexer.save_position();
|
|
1624
1624
|
this.skip_whitespace();
|
|
1625
1625
|
let i = !1;
|
|
1626
|
-
this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) ===
|
|
1626
|
+
this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Xn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
|
|
1627
1627
|
let n = this.lexer.token_type;
|
|
1628
1628
|
if (n === ae) {
|
|
1629
1629
|
let l = this.create_node(i ? Ve : Te, e, this.lexer.token_end);
|
|
1630
1630
|
return this.arena.set_content_start_delta(l, this.lexer.token_start - e), this.arena.set_content_length(l, this.lexer.token_end - this.lexer.token_start), l;
|
|
1631
|
-
} else if (n ===
|
|
1631
|
+
} else if (n === ct)
|
|
1632
1632
|
return this.parse_pseudo_function_after_colon(e, i);
|
|
1633
1633
|
return this.lexer.restore_position(t), null;
|
|
1634
1634
|
}
|
|
@@ -1641,27 +1641,27 @@ class rl {
|
|
|
1641
1641
|
let s = this.lexer.token_start, i = this.lexer.token_end - 1, n = this.lexer.pos, l = n, a = 1, h = this.lexer.token_end;
|
|
1642
1642
|
for (; this.lexer.pos < this.selector_end && a > 0; ) {
|
|
1643
1643
|
this.lexer.next_token_fast(!1);
|
|
1644
|
-
let
|
|
1645
|
-
if (
|
|
1644
|
+
let u = this.lexer.token_type;
|
|
1645
|
+
if (u === er || u === ct)
|
|
1646
1646
|
a++;
|
|
1647
|
-
else if (
|
|
1647
|
+
else if (u === tr && (a--, a === 0)) {
|
|
1648
1648
|
l = this.lexer.token_start, h = this.lexer.token_end;
|
|
1649
1649
|
break;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
let o = this.create_node(t ? Ve : Te, e, h);
|
|
1653
|
-
if (this.arena.set_content_start_delta(o, s - e), this.arena.set_content_length(o, i - s), this.arena.set_flag(o,
|
|
1654
|
-
let
|
|
1655
|
-
if (this.is_nth_pseudo(
|
|
1653
|
+
if (this.arena.set_content_start_delta(o, s - e), this.arena.set_content_length(o, i - s), this.arena.set_flag(o, pr), l > n) {
|
|
1654
|
+
let u = this.source.substring(s, i);
|
|
1655
|
+
if (this.is_nth_pseudo(u)) {
|
|
1656
1656
|
let p = this.parse_nth_expression(n, l);
|
|
1657
1657
|
p !== null && this.arena.set_first_child(o, p);
|
|
1658
|
-
} else if (V("lang",
|
|
1658
|
+
} else if (V("lang", u))
|
|
1659
1659
|
this.parse_lang_identifiers(n, l, o);
|
|
1660
1660
|
else {
|
|
1661
1661
|
let p = this.selector_end;
|
|
1662
1662
|
const d = this.lexer.save_position();
|
|
1663
|
-
let f = V("has",
|
|
1664
|
-
this.selector_end = p, this.lexer.restore_position(d),
|
|
1663
|
+
let f = V("has", u), L = this.parse_selector(n, l, this.lexer.line, this.lexer.column, f);
|
|
1664
|
+
this.selector_end = p, this.lexer.restore_position(d), L !== null && this.arena.set_first_child(o, L);
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
1667
|
return o;
|
|
@@ -1679,10 +1679,10 @@ class rl {
|
|
|
1679
1679
|
let l = null, a = null;
|
|
1680
1680
|
for (; this.lexer.pos < t; ) {
|
|
1681
1681
|
this.lexer.next_token_fast(!1);
|
|
1682
|
-
let h = this.lexer.token_type, o = this.lexer.token_start,
|
|
1683
|
-
if (h !==
|
|
1684
|
-
if (h ===
|
|
1685
|
-
let p = this.create_node(
|
|
1682
|
+
let h = this.lexer.token_type, o = this.lexer.token_start, u = this.lexer.token_end;
|
|
1683
|
+
if (h !== hs && h !== $e) {
|
|
1684
|
+
if (h === Vi || h === ae) {
|
|
1685
|
+
let p = this.create_node(_r, o, u);
|
|
1686
1686
|
l === null && (l = p), a !== null && this.arena.set_next_sibling(a, p), a = p;
|
|
1687
1687
|
}
|
|
1688
1688
|
if (this.lexer.pos >= t)
|
|
@@ -1696,17 +1696,17 @@ class rl {
|
|
|
1696
1696
|
parse_nth_expression(e, t) {
|
|
1697
1697
|
let s = this.find_of_keyword(e, t);
|
|
1698
1698
|
if (s !== -1) {
|
|
1699
|
-
let n = new
|
|
1700
|
-
l =
|
|
1699
|
+
let n = new Pi(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
|
|
1700
|
+
l = tl(this.source, l, t);
|
|
1701
1701
|
let a = this.selector_end;
|
|
1702
1702
|
const h = this.lexer.save_position();
|
|
1703
1703
|
this.selector_end = t, this.lexer.pos = l;
|
|
1704
1704
|
let o = this.parse_selector_list();
|
|
1705
1705
|
this.selector_end = a, this.lexer.restore_position(h);
|
|
1706
|
-
let
|
|
1707
|
-
return n !== null && o !== null ? (this.arena.set_first_child(
|
|
1706
|
+
let u = this.arena.create_node(le, e, t - e, this.lexer.line, 1);
|
|
1707
|
+
return n !== null && o !== null ? (this.arena.set_first_child(u, n), this.arena.set_next_sibling(n, o)) : n !== null && this.arena.set_first_child(u, n), u;
|
|
1708
1708
|
} else
|
|
1709
|
-
return new
|
|
1709
|
+
return new Pi(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
|
|
1710
1710
|
}
|
|
1711
1711
|
// Find the position of standalone "of" keyword (case-insensitive)
|
|
1712
1712
|
find_of_keyword(e, t) {
|
|
@@ -1752,30 +1752,30 @@ class rl {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1756
|
-
const e = new
|
|
1755
|
+
function ol(r) {
|
|
1756
|
+
const e = new gt(gt.capacity_for_source(r.length)), s = new ll(e, r).parse_selector(0, r.length);
|
|
1757
1757
|
if (s === null) {
|
|
1758
|
-
const i = e.create_node(
|
|
1758
|
+
const i = e.create_node(Et, 0, 0, 1, 1);
|
|
1759
1759
|
return new je(e, r, i);
|
|
1760
1760
|
}
|
|
1761
1761
|
return new je(e, r, s);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function al(r, e) {
|
|
1764
1764
|
return r[0] === e[0] ? r[1] === e[1] ? r[2] - e[2] : r[1] - e[1] : r[0] - e[0];
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return r.sort(
|
|
1766
|
+
function Di(r) {
|
|
1767
|
+
return r.sort(al).at(-1);
|
|
1768
1768
|
}
|
|
1769
|
-
const
|
|
1769
|
+
const xt = (r) => {
|
|
1770
1770
|
var n, l, a, h, o;
|
|
1771
1771
|
let e = 0, t = 0, s = 0, i = r.first_child;
|
|
1772
1772
|
for (; i; ) {
|
|
1773
1773
|
switch (i.type) {
|
|
1774
|
-
case
|
|
1774
|
+
case Lr:
|
|
1775
1775
|
e += 1;
|
|
1776
1776
|
break;
|
|
1777
|
-
case
|
|
1778
|
-
case
|
|
1777
|
+
case wt:
|
|
1778
|
+
case Nr:
|
|
1779
1779
|
t += 1;
|
|
1780
1780
|
break;
|
|
1781
1781
|
case Le:
|
|
@@ -1795,9 +1795,9 @@ const gt = (r) => {
|
|
|
1795
1795
|
case "has":
|
|
1796
1796
|
if (i.has_children) {
|
|
1797
1797
|
const f = i.first_child;
|
|
1798
|
-
if ((f == null ? void 0 : f.type) ===
|
|
1799
|
-
const
|
|
1800
|
-
e +=
|
|
1798
|
+
if ((f == null ? void 0 : f.type) === ks) {
|
|
1799
|
+
const L = Di(Fi(f));
|
|
1800
|
+
e += L[0], t += L[1], s += L[2];
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
1803
|
break;
|
|
@@ -1806,8 +1806,8 @@ const gt = (r) => {
|
|
|
1806
1806
|
case "nth-last-child":
|
|
1807
1807
|
t += 1;
|
|
1808
1808
|
const p = i.first_child;
|
|
1809
|
-
if ((p == null ? void 0 : p.type) ===
|
|
1810
|
-
const f =
|
|
1809
|
+
if ((p == null ? void 0 : p.type) === Or && p.selector) {
|
|
1810
|
+
const f = Di(Fi(p.selector));
|
|
1811
1811
|
e += f[0], t += f[1], s += f[2];
|
|
1812
1812
|
}
|
|
1813
1813
|
break;
|
|
@@ -1819,11 +1819,11 @@ const gt = (r) => {
|
|
|
1819
1819
|
const d = (l = i.first_child) == null ? void 0 : l.first_child;
|
|
1820
1820
|
if ((d == null ? void 0 : d.type) === me) {
|
|
1821
1821
|
let f = d.first_child;
|
|
1822
|
-
for (; f && f.type !==
|
|
1823
|
-
const
|
|
1822
|
+
for (; f && f.type !== ls; ) {
|
|
1823
|
+
const L = xt({
|
|
1824
1824
|
first_child: f
|
|
1825
1825
|
});
|
|
1826
|
-
e +=
|
|
1826
|
+
e += L[0] ?? 0, t += L[1] ?? 0, s += L[2] ?? 0, f = f.next_sibling;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
1829
|
break;
|
|
@@ -1848,8 +1848,8 @@ const gt = (r) => {
|
|
|
1848
1848
|
const p = (h = i.first_child) == null ? void 0 : h.first_child;
|
|
1849
1849
|
if ((p == null ? void 0 : p.type) === me) {
|
|
1850
1850
|
let d = p.first_child;
|
|
1851
|
-
for (; d && d.type !==
|
|
1852
|
-
const f =
|
|
1851
|
+
for (; d && d.type !== ls; ) {
|
|
1852
|
+
const f = xt({
|
|
1853
1853
|
first_child: d
|
|
1854
1854
|
});
|
|
1855
1855
|
e += f[0] ?? 0, t += f[1] ?? 0, s += f[2] ?? 0, d = d.next_sibling;
|
|
@@ -1869,37 +1869,37 @@ const gt = (r) => {
|
|
|
1869
1869
|
break;
|
|
1870
1870
|
}
|
|
1871
1871
|
break;
|
|
1872
|
-
case
|
|
1873
|
-
let
|
|
1874
|
-
|
|
1872
|
+
case ms:
|
|
1873
|
+
let u = i.name ?? "";
|
|
1874
|
+
u.includes("|") && (u = u.split("|")[1] ?? ""), u !== "*" && (s += 1);
|
|
1875
1875
|
break;
|
|
1876
1876
|
}
|
|
1877
1877
|
i = i.next_sibling;
|
|
1878
1878
|
}
|
|
1879
1879
|
return [e, t, s];
|
|
1880
|
-
},
|
|
1880
|
+
}, hl = (r) => {
|
|
1881
1881
|
if (typeof r == "string")
|
|
1882
1882
|
try {
|
|
1883
|
-
return
|
|
1883
|
+
return ol(r);
|
|
1884
1884
|
} catch (e) {
|
|
1885
1885
|
const t = e instanceof Error ? e.message : String(e);
|
|
1886
1886
|
throw new TypeError(`Could not convert passed in source '${r}' to SelectorList: ${t}`);
|
|
1887
1887
|
}
|
|
1888
1888
|
if (r instanceof Object) {
|
|
1889
|
-
if (r.type ===
|
|
1889
|
+
if (r.type === ks)
|
|
1890
1890
|
return r;
|
|
1891
1891
|
throw new TypeError("Passed in source is an Object but no AST / AST of the type SelectorList");
|
|
1892
1892
|
}
|
|
1893
1893
|
throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.");
|
|
1894
|
-
},
|
|
1894
|
+
}, Fi = (r) => {
|
|
1895
1895
|
if (!r)
|
|
1896
1896
|
return [];
|
|
1897
|
-
const e =
|
|
1897
|
+
const e = hl(r), t = [];
|
|
1898
1898
|
let s = e.first_child;
|
|
1899
1899
|
for (; s; )
|
|
1900
|
-
t.push(
|
|
1900
|
+
t.push(xt(s)), s = s.next_sibling;
|
|
1901
1901
|
return t;
|
|
1902
|
-
},
|
|
1902
|
+
}, cl = new W([
|
|
1903
1903
|
// CSS Named Colors
|
|
1904
1904
|
// Spec: https://drafts.csswg.org/css-color/#named-colors
|
|
1905
1905
|
// Heuristic: popular names first for quick finding in set.has()
|
|
@@ -2052,7 +2052,7 @@ const gt = (r) => {
|
|
|
2052
2052
|
"mediumorchid",
|
|
2053
2053
|
"darksalmon",
|
|
2054
2054
|
"mediumspringgreen"
|
|
2055
|
-
]),
|
|
2055
|
+
]), _l = new W([
|
|
2056
2056
|
// CSS System Colors
|
|
2057
2057
|
// Spec: https://drafts.csswg.org/css-color/#css-system-colors
|
|
2058
2058
|
"accentcolor",
|
|
@@ -2074,7 +2074,7 @@ const gt = (r) => {
|
|
|
2074
2074
|
"selecteditem",
|
|
2075
2075
|
"selecteditemtext",
|
|
2076
2076
|
"visitedtext"
|
|
2077
|
-
]),
|
|
2077
|
+
]), ul = new W(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), fl = new W(["transparent", "currentcolor"]), mt = new W([
|
|
2078
2078
|
"auto",
|
|
2079
2079
|
"none",
|
|
2080
2080
|
// for `text-shadow`, `box-shadow` and `background`
|
|
@@ -2084,13 +2084,13 @@ const gt = (r) => {
|
|
|
2084
2084
|
"revert",
|
|
2085
2085
|
"revert-layer"
|
|
2086
2086
|
]);
|
|
2087
|
-
function
|
|
2087
|
+
function pl(r) {
|
|
2088
2088
|
for (let e of r.children)
|
|
2089
|
-
if (!(e.type ===
|
|
2089
|
+
if (!(e.type === xs && e.value === 0) && !(e.type === kt && e.value === 0))
|
|
2090
2090
|
return !1;
|
|
2091
2091
|
return !0;
|
|
2092
2092
|
}
|
|
2093
|
-
const
|
|
2093
|
+
const rs = new W(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), dl = new W([
|
|
2094
2094
|
/* <absolute-size> values */
|
|
2095
2095
|
"xx-small",
|
|
2096
2096
|
"x-small",
|
|
@@ -2103,27 +2103,27 @@ const is = new W(["caption", "icon", "menu", "message-box", "small-caption", "st
|
|
|
2103
2103
|
/* <relative-size> values */
|
|
2104
2104
|
"smaller",
|
|
2105
2105
|
"larger"
|
|
2106
|
-
]),
|
|
2107
|
-
function
|
|
2106
|
+
]), gl = 44, Mi = 47;
|
|
2107
|
+
function xl(r, e) {
|
|
2108
2108
|
var a;
|
|
2109
2109
|
let t = [void 0, void 0], s, i;
|
|
2110
|
-
if (r.first_child.type ===
|
|
2110
|
+
if (r.first_child.type === ws && ((a = r.first_child.name) == null ? void 0 : a.toLowerCase()) === "var")
|
|
2111
2111
|
return null;
|
|
2112
2112
|
let n;
|
|
2113
2113
|
for (let h of r.children) {
|
|
2114
2114
|
let o = h.next_sibling;
|
|
2115
|
-
if (h.type === _e &&
|
|
2115
|
+
if (h.type === _e && mt.has(h.name) && e({
|
|
2116
2116
|
type: "keyword",
|
|
2117
2117
|
value: h.name
|
|
2118
|
-
}), o && o.type === Re && o.text.charCodeAt(0) ===
|
|
2118
|
+
}), o && o.type === Re && o.text.charCodeAt(0) === Mi) {
|
|
2119
2119
|
s = h.text, n = h;
|
|
2120
2120
|
continue;
|
|
2121
2121
|
}
|
|
2122
|
-
if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) ===
|
|
2122
|
+
if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) === Mi) {
|
|
2123
2123
|
i = h.text, n = h;
|
|
2124
2124
|
continue;
|
|
2125
2125
|
}
|
|
2126
|
-
if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) ===
|
|
2126
|
+
if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) === gl && !t[0]) {
|
|
2127
2127
|
t[0] = h, !s && n && (s = n.text), n = h;
|
|
2128
2128
|
continue;
|
|
2129
2129
|
}
|
|
@@ -2131,14 +2131,14 @@ function dl(r, e) {
|
|
|
2131
2131
|
t[1] = h, !s && !t[0] && n && (s = n.text), n = h;
|
|
2132
2132
|
continue;
|
|
2133
2133
|
}
|
|
2134
|
-
if (h.type ===
|
|
2134
|
+
if (h.type === xs) {
|
|
2135
2135
|
n = h;
|
|
2136
2136
|
continue;
|
|
2137
2137
|
}
|
|
2138
2138
|
if (h.type === _e) {
|
|
2139
|
-
let
|
|
2140
|
-
if (
|
|
2141
|
-
s =
|
|
2139
|
+
let u = h.name;
|
|
2140
|
+
if (u && dl.has(u)) {
|
|
2141
|
+
s = u, n = h;
|
|
2142
2142
|
continue;
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
@@ -2156,33 +2156,33 @@ function dl(r, e) {
|
|
|
2156
2156
|
font_family: l
|
|
2157
2157
|
};
|
|
2158
2158
|
}
|
|
2159
|
-
const
|
|
2160
|
-
function
|
|
2159
|
+
const ml = new W(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), kl = new W(["cubic-bezier", "steps"]);
|
|
2160
|
+
function wl(r, e) {
|
|
2161
2161
|
let t = !1;
|
|
2162
2162
|
for (let s of r) {
|
|
2163
2163
|
let i = s.type, n = s.name;
|
|
2164
|
-
i === Re ? t = !1 : i ===
|
|
2164
|
+
i === Re ? t = !1 : i === kt && t === !1 ? (t = !0, e({
|
|
2165
2165
|
type: "duration",
|
|
2166
2166
|
value: s
|
|
2167
|
-
})) : i === _e && n ?
|
|
2167
|
+
})) : i === _e && n ? ml.has(n) ? e({
|
|
2168
2168
|
type: "fn",
|
|
2169
2169
|
value: s
|
|
2170
|
-
}) :
|
|
2170
|
+
}) : mt.has(n) && e({
|
|
2171
2171
|
type: "keyword",
|
|
2172
2172
|
value: s
|
|
2173
|
-
}) : i ===
|
|
2173
|
+
}) : i === ws && n && kl.has(n) && e({
|
|
2174
2174
|
type: "fn",
|
|
2175
2175
|
value: s
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2179
|
+
function Al(r, e) {
|
|
2180
2180
|
z(r, function(t) {
|
|
2181
2181
|
t.is_vendor_prefixed && e(t.name || t.text);
|
|
2182
2182
|
});
|
|
2183
2183
|
}
|
|
2184
2184
|
var he, ee, te, Se;
|
|
2185
|
-
class
|
|
2185
|
+
class _ {
|
|
2186
2186
|
constructor(e = !1) {
|
|
2187
2187
|
Y(this, he);
|
|
2188
2188
|
Y(this, ee);
|
|
@@ -2191,25 +2191,25 @@ class u {
|
|
|
2191
2191
|
q(this, he, /* @__PURE__ */ new Map()), q(this, ee, 0), e && q(this, te, []), q(this, Se, e);
|
|
2192
2192
|
}
|
|
2193
2193
|
p(e, t) {
|
|
2194
|
-
let s =
|
|
2195
|
-
if (
|
|
2194
|
+
let s = A(this, ee);
|
|
2195
|
+
if (A(this, Se)) {
|
|
2196
2196
|
let i = s * 4;
|
|
2197
|
-
|
|
2197
|
+
A(this, te)[i] = t.line, A(this, te)[i + 1] = t.column, A(this, te)[i + 2] = t.offset, A(this, te)[i + 3] = t.length;
|
|
2198
2198
|
}
|
|
2199
|
-
if (
|
|
2200
|
-
|
|
2199
|
+
if (A(this, he).has(e)) {
|
|
2200
|
+
A(this, he).get(e).push(s), Zt(this, ee)._++;
|
|
2201
2201
|
return;
|
|
2202
2202
|
}
|
|
2203
|
-
|
|
2203
|
+
A(this, he).set(e, [s]), Zt(this, ee)._++;
|
|
2204
2204
|
}
|
|
2205
2205
|
size() {
|
|
2206
|
-
return
|
|
2206
|
+
return A(this, ee);
|
|
2207
2207
|
}
|
|
2208
2208
|
c() {
|
|
2209
|
-
let e = /* @__PURE__ */ new Map(), t = {}, s =
|
|
2209
|
+
let e = /* @__PURE__ */ new Map(), t = {}, s = A(this, Se), i = A(this, he), n = A(this, te), l = i.size;
|
|
2210
2210
|
i.forEach((h, o) => {
|
|
2211
2211
|
if (s) {
|
|
2212
|
-
let
|
|
2212
|
+
let u = h.map(function(p) {
|
|
2213
2213
|
let d = p * 4;
|
|
2214
2214
|
return {
|
|
2215
2215
|
line: n[d],
|
|
@@ -2218,11 +2218,11 @@ class u {
|
|
|
2218
2218
|
length: n[d + 3]
|
|
2219
2219
|
};
|
|
2220
2220
|
});
|
|
2221
|
-
e.set(o,
|
|
2221
|
+
e.set(o, u);
|
|
2222
2222
|
} else
|
|
2223
2223
|
t[o] = h.length;
|
|
2224
2224
|
});
|
|
2225
|
-
let a =
|
|
2225
|
+
let a = A(this, ee);
|
|
2226
2226
|
return s ? {
|
|
2227
2227
|
total: a,
|
|
2228
2228
|
totalUnique: l,
|
|
@@ -2240,12 +2240,12 @@ class u {
|
|
|
2240
2240
|
}
|
|
2241
2241
|
he = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), Se = new WeakMap();
|
|
2242
2242
|
var Oe, ce, Xe;
|
|
2243
|
-
class
|
|
2243
|
+
class ns {
|
|
2244
2244
|
constructor(e) {
|
|
2245
2245
|
Y(this, Oe);
|
|
2246
2246
|
Y(this, ce);
|
|
2247
2247
|
Y(this, Xe);
|
|
2248
|
-
q(this, Oe, new
|
|
2248
|
+
q(this, Oe, new _(e)), q(this, ce, /* @__PURE__ */ new Map()), q(this, Xe, e);
|
|
2249
2249
|
}
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Add an item to this #list's context
|
|
@@ -2254,19 +2254,19 @@ class rs {
|
|
|
2254
2254
|
* @param node_location
|
|
2255
2255
|
*/
|
|
2256
2256
|
push(e, t, s) {
|
|
2257
|
-
|
|
2257
|
+
A(this, Oe).p(e, s), A(this, ce).has(t) || A(this, ce).set(t, new _(A(this, Xe))), A(this, ce).get(t).p(e, s);
|
|
2258
2258
|
}
|
|
2259
2259
|
count() {
|
|
2260
2260
|
let e = /* @__PURE__ */ new Map();
|
|
2261
|
-
for (let [t, s] of
|
|
2261
|
+
for (let [t, s] of A(this, ce).entries())
|
|
2262
2262
|
e.set(t, s.c());
|
|
2263
|
-
return Object.assign(
|
|
2263
|
+
return Object.assign(A(this, Oe).c(), {
|
|
2264
2264
|
itemsPerContext: Object.fromEntries(e)
|
|
2265
2265
|
});
|
|
2266
2266
|
}
|
|
2267
2267
|
}
|
|
2268
2268
|
Oe = new WeakMap(), ce = new WeakMap(), Xe = new WeakMap();
|
|
2269
|
-
function
|
|
2269
|
+
function El(r) {
|
|
2270
2270
|
let e = /* @__PURE__ */ new Map(), t = -1, s = 0, i = 0, n = r.length;
|
|
2271
2271
|
for (let l = 0; l < n; l++) {
|
|
2272
2272
|
let a = r[l], h = (e.get(a) || 0) + 1;
|
|
@@ -2286,13 +2286,13 @@ class I {
|
|
|
2286
2286
|
* @param item - The item to add
|
|
2287
2287
|
*/
|
|
2288
2288
|
push(e) {
|
|
2289
|
-
|
|
2289
|
+
A(this, se).push(e), q(this, Ne, A(this, Ne) + e);
|
|
2290
2290
|
}
|
|
2291
2291
|
size() {
|
|
2292
|
-
return
|
|
2292
|
+
return A(this, se).length;
|
|
2293
2293
|
}
|
|
2294
2294
|
aggregate() {
|
|
2295
|
-
let e =
|
|
2295
|
+
let e = A(this, se).length;
|
|
2296
2296
|
if (e === 0)
|
|
2297
2297
|
return {
|
|
2298
2298
|
min: 0,
|
|
@@ -2302,7 +2302,7 @@ class I {
|
|
|
2302
2302
|
range: 0,
|
|
2303
2303
|
sum: 0
|
|
2304
2304
|
};
|
|
2305
|
-
let t =
|
|
2305
|
+
let t = A(this, se).slice().sort((a, h) => a - h), s = t[0], i = t[e - 1], n = El(t), l = A(this, Ne);
|
|
2306
2306
|
return {
|
|
2307
2307
|
min: s,
|
|
2308
2308
|
max: i,
|
|
@@ -2313,23 +2313,23 @@ class I {
|
|
|
2313
2313
|
};
|
|
2314
2314
|
}
|
|
2315
2315
|
toArray() {
|
|
2316
|
-
return
|
|
2316
|
+
return A(this, se);
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
2319
|
se = new WeakMap(), Ne = new WeakMap();
|
|
2320
|
-
function
|
|
2320
|
+
function yl(r) {
|
|
2321
2321
|
let e = 5, t = r.indexOf(";"), s = r.indexOf(",");
|
|
2322
2322
|
return t === -1 || s !== -1 && s < t ? r.substring(e, s) : r.substring(e, t);
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function zi(r) {
|
|
2325
2325
|
let e = r.children;
|
|
2326
2326
|
if (e) {
|
|
2327
2327
|
let t = e.at(-1);
|
|
2328
|
-
return !!(t && t.type === _e &&
|
|
2328
|
+
return !!(t && t.type === _e && os("\\9", t.text));
|
|
2329
2329
|
}
|
|
2330
2330
|
return !1;
|
|
2331
2331
|
}
|
|
2332
|
-
const
|
|
2332
|
+
const Cl = /* @__PURE__ */ new Set([
|
|
2333
2333
|
"margin",
|
|
2334
2334
|
"margin-block",
|
|
2335
2335
|
"margin-inline",
|
|
@@ -2352,7 +2352,7 @@ const El = /* @__PURE__ */ new Set([
|
|
|
2352
2352
|
"padding-block-end",
|
|
2353
2353
|
"padding-inline-start",
|
|
2354
2354
|
"padding-inline-end"
|
|
2355
|
-
]),
|
|
2355
|
+
]), bl = new W([
|
|
2356
2356
|
"border-radius",
|
|
2357
2357
|
"border-top-left-radius",
|
|
2358
2358
|
"border-top-right-radius",
|
|
@@ -2363,8 +2363,8 @@ const El = /* @__PURE__ */ new Set([
|
|
|
2363
2363
|
"border-end-end-radius",
|
|
2364
2364
|
"border-end-start-radius"
|
|
2365
2365
|
]);
|
|
2366
|
-
function
|
|
2367
|
-
if (
|
|
2366
|
+
function Rl(r) {
|
|
2367
|
+
if (As(r) || Es(r)) return !1;
|
|
2368
2368
|
let e = r.charCodeAt(0);
|
|
2369
2369
|
return e === 47 || // /
|
|
2370
2370
|
e === 42 || // *
|
|
@@ -2374,28 +2374,28 @@ function Cl(r) {
|
|
|
2374
2374
|
e === 36 || // $
|
|
2375
2375
|
e === 35;
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2378
|
-
return
|
|
2377
|
+
function qi(r) {
|
|
2378
|
+
return As(r) ? r : Es(r) ? r.slice(r.indexOf("-", 2) + 1).toLowerCase() : Rl(r) ? r.slice(1).toLowerCase() : r.toLowerCase();
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2381
|
-
return
|
|
2380
|
+
function Sl(r) {
|
|
2381
|
+
return Es(r);
|
|
2382
2382
|
}
|
|
2383
2383
|
function H(r, e) {
|
|
2384
2384
|
return e === 0 ? 0 : r / e;
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2387
|
-
return e.useLocations === !0 ?
|
|
2386
|
+
function Ol(r, e = {}) {
|
|
2387
|
+
return e.useLocations === !0 ? Ki(r, e, !0) : Ki(r, e, !1);
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function Ki(r, e, t) {
|
|
2390
2390
|
let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, a = 0, h = {
|
|
2391
2391
|
total: 0,
|
|
2392
2392
|
unique: /* @__PURE__ */ new Map()
|
|
2393
|
-
}, o = Date.now(),
|
|
2393
|
+
}, o = Date.now(), u = Ur(r, {
|
|
2394
2394
|
on_comment({ length: c }) {
|
|
2395
2395
|
n++, l += c;
|
|
2396
2396
|
}
|
|
2397
|
-
}), p = Date.now(), d = new
|
|
2398
|
-
function
|
|
2397
|
+
}), p = Date.now(), d = new _(t), f = new I(), L = [], bs = new _(t), Ze = new _(t), Rs = new _(t), vs = new _(t), Ts = new _(t), Ss = new _(t), Os = new _(t), yt = new _(t), Ns = new _(t), Ct = new _(t), bt = new _(t), Ls = new _(t), Je = new _(t), Us = new _(t), Is = new _(t), Rt = new I(), Hs = new _(t), vt = 0, Tt = 0, St = new I(), Ot = new I(), Nt = new I(), Ps = new _(t), Ds = new _(t), Fs = new _(t), Lt = new I(), Ms = new _(t), Ut = new _(t), zs = /* @__PURE__ */ new Set(), It = new _(t), ue, fe, qs = new I(), Ks = new I(), $s = new I(), Bs = new _(t), et = new I(), Gs = new _(t), Ws = [], Ht = new _(t), Pt = new _(t), Ys = new _(t), Qs = new _(t), Vs = new _(t), js = new _(t), Dt = new I(), Xs = new _(t), Zs = /* @__PURE__ */ new Set(), Ie = 0, Js = new I(), tt = 0, Ft = 0, Mt = new _(t), zt = new I(), ei = new _(t), He = new _(t), qt = new _(t), Kt = new _(t), st = new _(t), Pe = new I(), $t = new I(), ti = new _(t), Bt = new _(t), it = new _(t), si = new _(t), ii = new _(t), ri = new _(t), Gt = new _(t), rt = new _(t), nt = new _(t), Wt = new _(t), lt = new _(t), we = new ns(t), Ae = new _(t), ni = new ns(t), li = new _(t), De = new _(t), oi = new ns(t), ai = new _(t);
|
|
2398
|
+
function k(c) {
|
|
2399
2399
|
return {
|
|
2400
2400
|
line: c.line,
|
|
2401
2401
|
column: c.column,
|
|
@@ -2404,211 +2404,213 @@ function zi(r, e, t) {
|
|
|
2404
2404
|
};
|
|
2405
2405
|
}
|
|
2406
2406
|
let Ee = -1;
|
|
2407
|
-
z(
|
|
2408
|
-
var
|
|
2407
|
+
z(u, (c, F) => {
|
|
2408
|
+
var mi, ki, wi, Ai, Ei;
|
|
2409
2409
|
Ee >= 0 && F <= Ee && (Ee = -1);
|
|
2410
|
-
let
|
|
2411
|
-
if (c.type ===
|
|
2412
|
-
let
|
|
2413
|
-
|
|
2414
|
-
let C =
|
|
2415
|
-
if (d.p(C,
|
|
2416
|
-
let
|
|
2417
|
-
t &&
|
|
2418
|
-
let g = c.children.find((E) => E.type ===
|
|
2410
|
+
let Xt = Ee >= 0 && F > Ee;
|
|
2411
|
+
if (c.type === Ir) {
|
|
2412
|
+
let v = k(c);
|
|
2413
|
+
Rt.push(F), Hs.p(F, v);
|
|
2414
|
+
let C = qi(c.name ?? "");
|
|
2415
|
+
if (d.p(C, v), C === "font-face") {
|
|
2416
|
+
let w = /* @__PURE__ */ Object.create(null);
|
|
2417
|
+
t && bs.p(c.start, k(c));
|
|
2418
|
+
let g = c.children.find((E) => E.type === Hr);
|
|
2419
2419
|
for (let E of (g == null ? void 0 : g.children) || [])
|
|
2420
|
-
E.type ===
|
|
2421
|
-
f.push(1),
|
|
2420
|
+
E.type === Jt && E.value && (w[E.property] = E.value.text);
|
|
2421
|
+
f.push(1), L.push(w);
|
|
2422
2422
|
}
|
|
2423
2423
|
if (c.prelude === null || c.prelude === void 0)
|
|
2424
|
-
C === "layer" && (Ze.p("<anonymous>",
|
|
2424
|
+
C === "layer" && (Ze.p("<anonymous>", k(c)), f.push(2));
|
|
2425
2425
|
else {
|
|
2426
|
-
let
|
|
2426
|
+
let w = 1;
|
|
2427
2427
|
if (C === "media")
|
|
2428
|
-
|
|
2429
|
-
|
|
2428
|
+
vs.p(c.prelude.text, k(c)), Kr(c.prelude, (g) => {
|
|
2429
|
+
Ts.p(g, k(c)), w++;
|
|
2430
2430
|
});
|
|
2431
2431
|
else if (C === "supports")
|
|
2432
|
-
|
|
2433
|
-
|
|
2432
|
+
yt.p(c.prelude.text, k(c)), qr(c.prelude, (g) => {
|
|
2433
|
+
Ns.p(g, k(c)), w++;
|
|
2434
2434
|
});
|
|
2435
2435
|
else if (C.endsWith("keyframes")) {
|
|
2436
2436
|
let g = c.prelude.text;
|
|
2437
|
-
|
|
2437
|
+
Ct.p(g, k(c)), c.is_vendor_prefixed && (bt.p(`@${(mi = c.name) == null ? void 0 : mi.toLowerCase()} ${c.prelude.text}`, k(c)), w++), Ee = F;
|
|
2438
2438
|
} else if (C === "layer")
|
|
2439
2439
|
for (let g of c.prelude.text.split(",").map((E) => E.trim()))
|
|
2440
|
-
Ze.p(g,
|
|
2440
|
+
Ze.p(g, k(c));
|
|
2441
2441
|
else if (C === "import") {
|
|
2442
|
-
if (
|
|
2442
|
+
if (Rs.p(c.prelude.text, k(c)), c.prelude.has_children)
|
|
2443
2443
|
for (let g of c.prelude)
|
|
2444
|
-
g.type ===
|
|
2445
|
-
} else C === "container" ? (
|
|
2446
|
-
f.push(
|
|
2444
|
+
g.type === Bi && typeof g.value == "string" ? yt.p(g.value, k(g)) : g.type === Pr && typeof g.value == "string" && Ze.p(g.value, k(g));
|
|
2445
|
+
} else C === "container" ? (Ls.p(c.prelude.text, k(c)), ((ki = c.prelude.first_child) == null ? void 0 : ki.type) === Dr && ((wi = c.prelude.first_child.first_child) == null ? void 0 : wi.type) === _e && Je.p(c.prelude.first_child.first_child.text, k(c))) : C === "property" ? Us.p(c.prelude.text, k(c)) : C === "charset" ? Os.p(c.prelude.text.toLowerCase(), k(c)) : C === "scope" && Is.p(c.prelude.text, k(c));
|
|
2446
|
+
f.push(w);
|
|
2447
2447
|
}
|
|
2448
|
-
} else if (c.type ===
|
|
2449
|
-
if (
|
|
2450
|
-
if (c.prelude.type ===
|
|
2451
|
-
for (let
|
|
2452
|
-
|
|
2448
|
+
} else if (c.type === Fr)
|
|
2449
|
+
if (Xt && c.prelude) {
|
|
2450
|
+
if (c.prelude.type === ks && c.prelude.children.length > 0)
|
|
2451
|
+
for (let v of c.prelude.children)
|
|
2452
|
+
Ut.p(v.text, k(v));
|
|
2453
2453
|
} else {
|
|
2454
|
-
|
|
2455
|
-
let
|
|
2454
|
+
vt++, (Ai = c.block) != null && Ai.is_empty && Tt++;
|
|
2455
|
+
let v = 0, C = 0, w = k(c);
|
|
2456
2456
|
if (c.prelude)
|
|
2457
2457
|
for (const g of c.prelude.children)
|
|
2458
|
-
g.type === me &&
|
|
2458
|
+
g.type === me && v++;
|
|
2459
2459
|
if (c.block)
|
|
2460
2460
|
for (const g of c.block.children)
|
|
2461
|
-
g.type ===
|
|
2462
|
-
|
|
2461
|
+
g.type === Jt && C++;
|
|
2462
|
+
St.push(v + C), Ps.p(v + C, w), Ot.push(v), Ds.p(v, w), Nt.push(C), Fs.p(C, w), Lt.push(F), Ms.p(F, w);
|
|
2463
2463
|
}
|
|
2464
2464
|
else if (c.type === me) {
|
|
2465
|
-
if (
|
|
2465
|
+
if (Xt)
|
|
2466
2466
|
return P;
|
|
2467
|
-
let
|
|
2468
|
-
|
|
2469
|
-
let C =
|
|
2470
|
-
et.push(C),
|
|
2471
|
-
|
|
2472
|
-
}), Br(c, (U) => {
|
|
2473
|
-
Ht.p(U, R);
|
|
2474
|
-
}), Gr(c, (U) => {
|
|
2475
|
-
Gs.p(U.toLowerCase(), R);
|
|
2467
|
+
let v = k(c);
|
|
2468
|
+
Dt.push(F > 0 ? F - 1 : 0), Xs.p(F > 0 ? F - 1 : 0, v), zs.add(c.text);
|
|
2469
|
+
let C = as(c);
|
|
2470
|
+
et.push(C), Gs.p(C, v), Gr(c, (U) => {
|
|
2471
|
+
It.p(U.toLowerCase(), v);
|
|
2476
2472
|
}), Wr(c, (U) => {
|
|
2477
|
-
|
|
2473
|
+
Pt.p(U, v);
|
|
2474
|
+
}), Yr(c, (U) => {
|
|
2475
|
+
Ys.p(U.toLowerCase(), v);
|
|
2476
|
+
}), Qr(c, (U) => {
|
|
2477
|
+
Qs.p(U.toLowerCase(), v);
|
|
2478
2478
|
}), z(c, (U) => {
|
|
2479
2479
|
var G;
|
|
2480
|
-
U.type ===
|
|
2481
|
-
}),
|
|
2480
|
+
U.type === wt && Vs.p(((G = U.name) == null ? void 0 : G.toLowerCase()) ?? "", v);
|
|
2481
|
+
}), Vr(c, (U) => {
|
|
2482
2482
|
let G = U.name.trim() === "" ? " " : U.name;
|
|
2483
|
-
|
|
2483
|
+
js.p(G, U.loc);
|
|
2484
2484
|
});
|
|
2485
|
-
let
|
|
2486
|
-
return
|
|
2487
|
-
} else if (c.type ===
|
|
2488
|
-
Ie++,
|
|
2489
|
-
let
|
|
2490
|
-
|
|
2491
|
-
let
|
|
2492
|
-
c.is_important && (
|
|
2485
|
+
let w = xt(c), [g, E, B] = w;
|
|
2486
|
+
return Bs.p(w.toString(), v), qs.push(g), Ks.push(E), $s.push(B), ue === void 0 && (ue = w), fe === void 0 && (fe = w), fe !== void 0 && $i(fe, w) < 0 && (fe = w), ue !== void 0 && $i(ue, w) > 0 && (ue = w), Ws.push(w), g > 0 && Ht.p(c.text, v), P;
|
|
2487
|
+
} else if (c.type === Jt) {
|
|
2488
|
+
Ie++, Zs.add(c.text);
|
|
2489
|
+
let v = k(c), C = F > 0 ? F - 1 : 0;
|
|
2490
|
+
zt.push(C), ei.p(C, v);
|
|
2491
|
+
let w = 1;
|
|
2492
|
+
c.is_important && (w++, c.text.toLowerCase().includes("!important") || Bt.p("!ie", k(c.value)), Xt && (Ft++, w++)), Js.push(w);
|
|
2493
2493
|
let { is_important: g, property: E, is_browserhack: B, is_vendor_prefixed: U } = c;
|
|
2494
2494
|
if (!E) return;
|
|
2495
|
-
let G =
|
|
2495
|
+
let G = k(c);
|
|
2496
2496
|
G.length = E.length;
|
|
2497
|
-
let
|
|
2498
|
-
He.p(
|
|
2497
|
+
let T = qi(E);
|
|
2498
|
+
He.p(T, G), g && tt++, U ? (Pe.push(2), Kt.p(E, G)) : As(E) ? (st.p(E, G), Pe.push(g ? 3 : 2), g && Mt.p(E, G)) : B ? (qt.p(E.charAt(0), G), Pe.push(2)) : Pe.push(1);
|
|
2499
2499
|
{
|
|
2500
|
-
let D = c.value, { text:
|
|
2501
|
-
if (
|
|
2502
|
-
De.p(
|
|
2500
|
+
let D = c.value, { text: N } = D, b = k(D), ot = 1;
|
|
2501
|
+
if (mt.has(N)) {
|
|
2502
|
+
De.p(N.toLowerCase(), b), $t.push(ot), T === "display" && it.p(N.toLowerCase(), b);
|
|
2503
2503
|
return;
|
|
2504
2504
|
}
|
|
2505
|
-
if (
|
|
2506
|
-
|
|
2507
|
-
}),
|
|
2508
|
-
|
|
2505
|
+
if (Al(D, (x) => {
|
|
2506
|
+
ti.p(x.toLowerCase(), b), ot++;
|
|
2507
|
+
}), zi(D) && (Bt.p("\\9", b), N = N.slice(0, -2), ot++), $t.push(ot), Cl.has(T))
|
|
2508
|
+
pl(D) && ai.p(T, b);
|
|
2509
|
+
else if (T === "display")
|
|
2510
|
+
/var\(/i.test(N) ? it.p(N, b) : it.p(N.toLowerCase(), b);
|
|
2509
2511
|
else {
|
|
2510
|
-
if (
|
|
2511
|
-
return
|
|
2512
|
-
if (
|
|
2513
|
-
if (!
|
|
2514
|
-
let x =
|
|
2515
|
-
Z.type === "keyword" && De.p(Z.value.toLowerCase(),
|
|
2512
|
+
if (T === "z-index")
|
|
2513
|
+
return si.p(N, b), P;
|
|
2514
|
+
if (T === "font") {
|
|
2515
|
+
if (!rs.has(N)) {
|
|
2516
|
+
let x = xl(D, function(Z) {
|
|
2517
|
+
Z.type === "keyword" && De.p(Z.value.toLowerCase(), b);
|
|
2516
2518
|
});
|
|
2517
2519
|
if (!x)
|
|
2518
2520
|
return P;
|
|
2519
|
-
let { font_size: X, line_height:
|
|
2520
|
-
|
|
2521
|
+
let { font_size: X, line_height: O, font_family: S } = x;
|
|
2522
|
+
S && Gt.p(S, b), X && rt.p(X.toLowerCase(), b), O && nt.p(O.toLowerCase(), b);
|
|
2521
2523
|
}
|
|
2522
|
-
} else if (
|
|
2523
|
-
if (!
|
|
2524
|
-
let x =
|
|
2525
|
-
x.includes("var(") ?
|
|
2524
|
+
} else if (T === "font-size") {
|
|
2525
|
+
if (!rs.has(N)) {
|
|
2526
|
+
let x = N.toLowerCase();
|
|
2527
|
+
x.includes("var(") ? rt.p(N, b) : rt.p(x, b);
|
|
2526
2528
|
}
|
|
2527
2529
|
} else {
|
|
2528
|
-
if (
|
|
2529
|
-
return
|
|
2530
|
-
if (
|
|
2531
|
-
let x =
|
|
2532
|
-
x.includes("var(") ?
|
|
2530
|
+
if (T === "font-family")
|
|
2531
|
+
return rs.has(N) || Gt.p(N, b), P;
|
|
2532
|
+
if (T === "line-height") {
|
|
2533
|
+
let x = N.toLowerCase();
|
|
2534
|
+
x.includes("var(") ? nt.p(N, b) : nt.p(x, b);
|
|
2533
2535
|
} else {
|
|
2534
|
-
if (
|
|
2535
|
-
return
|
|
2536
|
-
x.type === "fn" ?
|
|
2536
|
+
if (T === "transition" || T === "animation")
|
|
2537
|
+
return wl(D.children, function(x) {
|
|
2538
|
+
x.type === "fn" ? Wt.p(x.value.text.toLowerCase(), b) : x.type === "duration" ? lt.p(x.value.text.toLowerCase(), b) : x.type === "keyword" && De.p(x.value.text.toLowerCase(), b);
|
|
2537
2539
|
}), P;
|
|
2538
|
-
if (
|
|
2540
|
+
if (T === "animation-duration" || T === "transition-duration") {
|
|
2539
2541
|
for (let x of D.children)
|
|
2540
2542
|
if (x.type !== Re) {
|
|
2541
2543
|
let X = x.text;
|
|
2542
|
-
/var\(/i.test(X) ?
|
|
2544
|
+
/var\(/i.test(X) ? lt.p(X, b) : lt.p(X.toLowerCase(), b);
|
|
2543
2545
|
}
|
|
2544
|
-
} else if (
|
|
2546
|
+
} else if (T === "transition-timing-function" || T === "animation-timing-function")
|
|
2545
2547
|
for (let x of D.children)
|
|
2546
|
-
x.type !== Re &&
|
|
2547
|
-
else
|
|
2548
|
+
x.type !== Re && Wt.p(x.text, b);
|
|
2549
|
+
else T === "container-name" ? Je.p(N, b) : T === "container" ? ((Ei = D.first_child) == null ? void 0 : Ei.type) === _e && Je.p(D.first_child.text, b) : bl.has(T) ? oi.push(N, E, b) : T === "text-shadow" ? ii.p(N, b) : T === "box-shadow" && ri.p(N, b);
|
|
2548
2550
|
}
|
|
2549
2551
|
}
|
|
2550
2552
|
}
|
|
2551
|
-
let
|
|
2553
|
+
let br = zi(D);
|
|
2552
2554
|
z(D, (x) => {
|
|
2553
2555
|
var X;
|
|
2554
2556
|
switch (x.type) {
|
|
2555
|
-
case
|
|
2556
|
-
let
|
|
2557
|
-
return
|
|
2557
|
+
case kt: {
|
|
2558
|
+
let O = ((X = x.unit) == null ? void 0 : X.toLowerCase()) ?? "", S = k(x);
|
|
2559
|
+
return ni.push(O, E, S), P;
|
|
2558
2560
|
}
|
|
2559
|
-
case
|
|
2560
|
-
let
|
|
2561
|
-
if (!
|
|
2561
|
+
case Mr: {
|
|
2562
|
+
let O = x.text;
|
|
2563
|
+
if (!O || !O.startsWith("#"))
|
|
2562
2564
|
return P;
|
|
2563
|
-
let
|
|
2564
|
-
|
|
2565
|
-
let Z =
|
|
2566
|
-
|
|
2567
|
-
let Fe =
|
|
2568
|
-
return we.push(
|
|
2565
|
+
let S = O.toLowerCase();
|
|
2566
|
+
br && !S.endsWith("\\9") && (S = S + "\\9");
|
|
2567
|
+
let Z = S.length - 1;
|
|
2568
|
+
os("\\9", S) && (Z = Z - 2);
|
|
2569
|
+
let Fe = k(x);
|
|
2570
|
+
return we.push(S, E, Fe), Ae.p("hex" + Z, Fe), P;
|
|
2569
2571
|
}
|
|
2570
2572
|
case _e: {
|
|
2571
|
-
let
|
|
2572
|
-
if (
|
|
2573
|
+
let O = x.text, S = k(x);
|
|
2574
|
+
if (T === "font" || T === "font-family")
|
|
2573
2575
|
return P;
|
|
2574
|
-
|
|
2575
|
-
let Z =
|
|
2576
|
+
mt.has(O) && De.p(O.toLowerCase(), S);
|
|
2577
|
+
let Z = O.length;
|
|
2576
2578
|
if (Z > 20 || Z < 3)
|
|
2577
2579
|
return P;
|
|
2578
|
-
if (
|
|
2579
|
-
let Fe =
|
|
2580
|
-
we.push(Fe, E,
|
|
2580
|
+
if (fl.has(O)) {
|
|
2581
|
+
let Fe = O.toLowerCase();
|
|
2582
|
+
we.push(Fe, E, S), Ae.p(Fe, S);
|
|
2581
2583
|
return;
|
|
2582
2584
|
}
|
|
2583
|
-
if (
|
|
2584
|
-
we.push(
|
|
2585
|
+
if (cl.has(O)) {
|
|
2586
|
+
we.push(O.toLowerCase(), E, S), Ae.p("named", S);
|
|
2585
2587
|
return;
|
|
2586
2588
|
}
|
|
2587
|
-
if (
|
|
2588
|
-
we.push(
|
|
2589
|
+
if (_l.has(O)) {
|
|
2590
|
+
we.push(O.toLowerCase(), E, S), Ae.p("system", S);
|
|
2589
2591
|
return;
|
|
2590
2592
|
}
|
|
2591
2593
|
return P;
|
|
2592
2594
|
}
|
|
2593
|
-
case
|
|
2594
|
-
let
|
|
2595
|
-
if (
|
|
2596
|
-
we.push(x.text, E,
|
|
2595
|
+
case ws: {
|
|
2596
|
+
let O = x.name, S = k(x);
|
|
2597
|
+
if (ul.has(O)) {
|
|
2598
|
+
we.push(x.text, E, S), Ae.p(O.toLowerCase(), S);
|
|
2597
2599
|
return;
|
|
2598
2600
|
}
|
|
2599
|
-
if (
|
|
2600
|
-
|
|
2601
|
+
if (os("gradient", O)) {
|
|
2602
|
+
li.p(x.text, S);
|
|
2601
2603
|
return;
|
|
2602
2604
|
}
|
|
2603
2605
|
}
|
|
2604
2606
|
}
|
|
2605
2607
|
});
|
|
2606
2608
|
}
|
|
2607
|
-
} else if (c.type ===
|
|
2608
|
-
let { value:
|
|
2609
|
-
if (
|
|
2610
|
-
let
|
|
2611
|
-
h.total++, a +=
|
|
2609
|
+
} else if (c.type === zr) {
|
|
2610
|
+
let { value: v } = c, C = Yi(v || "");
|
|
2611
|
+
if (Wi(C, "data:")) {
|
|
2612
|
+
let w = C.length, g = yl(C);
|
|
2613
|
+
h.total++, a += w;
|
|
2612
2614
|
let E = {
|
|
2613
2615
|
line: c.line,
|
|
2614
2616
|
column: c.column,
|
|
@@ -2617,26 +2619,26 @@ function zi(r, e, t) {
|
|
|
2617
2619
|
};
|
|
2618
2620
|
if (h.unique.has(g)) {
|
|
2619
2621
|
let B = h.unique.get(g);
|
|
2620
|
-
B.count++, B.size +=
|
|
2622
|
+
B.count++, B.size += w, h.unique.set(g, B), t && B.uniqueWithLocations && B.uniqueWithLocations.push(E);
|
|
2621
2623
|
} else {
|
|
2622
2624
|
let B = {
|
|
2623
2625
|
count: 1,
|
|
2624
|
-
size:
|
|
2626
|
+
size: w,
|
|
2625
2627
|
uniqueWithLocations: t ? [E] : void 0
|
|
2626
2628
|
};
|
|
2627
2629
|
h.unique.set(g, B);
|
|
2628
2630
|
}
|
|
2629
2631
|
}
|
|
2630
|
-
} else if (c.type ===
|
|
2631
|
-
return c.name &&
|
|
2632
|
+
} else if (c.type === Gi)
|
|
2633
|
+
return c.name && Ss.p(c.name.toLowerCase(), k(c)), P;
|
|
2632
2634
|
});
|
|
2633
|
-
let
|
|
2635
|
+
let hi = Zs.size, ye = et.size(), Yt = qs.aggregate(), Qt = Ks.aggregate(), Vt = $s.aggregate(), ci = zs.size, R = Object.assign, _i = r.length, jt = L.length, ui = f.aggregate(), fi = et.aggregate(), pi = Js.aggregate(), di = Pe.aggregate(), gi = $t.aggregate(), xi = d.c();
|
|
2634
2636
|
return {
|
|
2635
2637
|
stylesheet: {
|
|
2636
|
-
sourceLinesOfCode:
|
|
2638
|
+
sourceLinesOfCode: xi.total + ye + Ie + Ut.size(),
|
|
2637
2639
|
linesOfCode: i,
|
|
2638
|
-
size:
|
|
2639
|
-
complexity:
|
|
2640
|
+
size: _i,
|
|
2641
|
+
complexity: ui.sum + fi.sum + pi.sum + di.sum + gi.sum,
|
|
2640
2642
|
comments: {
|
|
2641
2643
|
total: n,
|
|
2642
2644
|
size: l
|
|
@@ -2644,7 +2646,7 @@ function zi(r, e, t) {
|
|
|
2644
2646
|
embeddedContent: {
|
|
2645
2647
|
size: {
|
|
2646
2648
|
total: a,
|
|
2647
|
-
ratio: H(a,
|
|
2649
|
+
ratio: H(a, _i)
|
|
2648
2650
|
},
|
|
2649
2651
|
types: {
|
|
2650
2652
|
total: h.total,
|
|
@@ -2654,185 +2656,187 @@ function zi(r, e, t) {
|
|
|
2654
2656
|
}
|
|
2655
2657
|
}
|
|
2656
2658
|
},
|
|
2657
|
-
atrules:
|
|
2658
|
-
fontface:
|
|
2659
|
+
atrules: R(xi, {
|
|
2660
|
+
fontface: R(
|
|
2659
2661
|
{
|
|
2660
|
-
total:
|
|
2661
|
-
totalUnique:
|
|
2662
|
-
unique:
|
|
2663
|
-
uniquenessRatio:
|
|
2662
|
+
total: jt,
|
|
2663
|
+
totalUnique: jt,
|
|
2664
|
+
unique: L,
|
|
2665
|
+
uniquenessRatio: jt === 0 ? 0 : 1
|
|
2664
2666
|
},
|
|
2665
2667
|
t ? {
|
|
2666
|
-
uniqueWithLocations:
|
|
2668
|
+
uniqueWithLocations: bs.c().uniqueWithLocations
|
|
2667
2669
|
} : {}
|
|
2668
2670
|
),
|
|
2669
|
-
import:
|
|
2670
|
-
media:
|
|
2671
|
-
browserhacks:
|
|
2672
|
-
features:
|
|
2671
|
+
import: Rs.c(),
|
|
2672
|
+
media: R(vs.c(), {
|
|
2673
|
+
browserhacks: Ts.c(),
|
|
2674
|
+
features: Ss.c()
|
|
2673
2675
|
}),
|
|
2674
|
-
charset:
|
|
2675
|
-
supports:
|
|
2676
|
-
browserhacks:
|
|
2676
|
+
charset: Os.c(),
|
|
2677
|
+
supports: R(yt.c(), {
|
|
2678
|
+
browserhacks: Ns.c()
|
|
2677
2679
|
}),
|
|
2678
|
-
keyframes:
|
|
2679
|
-
prefixed:
|
|
2680
|
-
ratio: H(
|
|
2680
|
+
keyframes: R(Ct.c(), {
|
|
2681
|
+
prefixed: R(bt.c(), {
|
|
2682
|
+
ratio: H(bt.size(), Ct.size())
|
|
2681
2683
|
})
|
|
2682
2684
|
}),
|
|
2683
|
-
container:
|
|
2685
|
+
container: R(Ls.c(), {
|
|
2684
2686
|
names: Je.c()
|
|
2685
2687
|
}),
|
|
2686
2688
|
layer: Ze.c(),
|
|
2687
|
-
property:
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2689
|
+
property: Us.c(),
|
|
2690
|
+
scope: Is.c(),
|
|
2691
|
+
complexity: ui,
|
|
2692
|
+
nesting: R(
|
|
2693
|
+
Rt.aggregate(),
|
|
2691
2694
|
{
|
|
2692
|
-
items:
|
|
2695
|
+
items: Rt.toArray()
|
|
2693
2696
|
},
|
|
2694
|
-
|
|
2697
|
+
Hs.c()
|
|
2695
2698
|
)
|
|
2696
2699
|
}),
|
|
2697
2700
|
rules: {
|
|
2698
|
-
total:
|
|
2701
|
+
total: vt,
|
|
2699
2702
|
empty: {
|
|
2700
|
-
total:
|
|
2701
|
-
ratio: H(
|
|
2703
|
+
total: Tt,
|
|
2704
|
+
ratio: H(Tt, vt)
|
|
2702
2705
|
},
|
|
2703
|
-
sizes:
|
|
2704
|
-
|
|
2706
|
+
sizes: R(
|
|
2707
|
+
St.aggregate(),
|
|
2705
2708
|
{
|
|
2706
|
-
items:
|
|
2709
|
+
items: St.toArray()
|
|
2707
2710
|
},
|
|
2708
|
-
|
|
2711
|
+
Ps.c()
|
|
2709
2712
|
),
|
|
2710
|
-
nesting:
|
|
2711
|
-
|
|
2713
|
+
nesting: R(
|
|
2714
|
+
Lt.aggregate(),
|
|
2712
2715
|
{
|
|
2713
|
-
items:
|
|
2716
|
+
items: Lt.toArray()
|
|
2714
2717
|
},
|
|
2715
|
-
|
|
2718
|
+
Ms.c()
|
|
2716
2719
|
),
|
|
2717
|
-
selectors:
|
|
2718
|
-
|
|
2720
|
+
selectors: R(
|
|
2721
|
+
Ot.aggregate(),
|
|
2719
2722
|
{
|
|
2720
|
-
items:
|
|
2723
|
+
items: Ot.toArray()
|
|
2721
2724
|
},
|
|
2722
|
-
|
|
2725
|
+
Ds.c()
|
|
2723
2726
|
),
|
|
2724
|
-
declarations:
|
|
2725
|
-
|
|
2727
|
+
declarations: R(
|
|
2728
|
+
Nt.aggregate(),
|
|
2726
2729
|
{
|
|
2727
|
-
items:
|
|
2730
|
+
items: Nt.toArray()
|
|
2728
2731
|
},
|
|
2729
|
-
|
|
2732
|
+
Fs.c()
|
|
2730
2733
|
)
|
|
2731
2734
|
},
|
|
2732
2735
|
selectors: {
|
|
2733
2736
|
total: ye,
|
|
2734
|
-
totalUnique:
|
|
2735
|
-
uniquenessRatio: H(
|
|
2736
|
-
specificity:
|
|
2737
|
+
totalUnique: ci,
|
|
2738
|
+
uniquenessRatio: H(ci, ye),
|
|
2739
|
+
specificity: R(
|
|
2737
2740
|
{
|
|
2738
2741
|
/** @type Specificity */
|
|
2739
2742
|
min: fe === void 0 ? [0, 0, 0] : fe,
|
|
2740
2743
|
/** @type Specificity */
|
|
2741
2744
|
max: ue === void 0 ? [0, 0, 0] : ue,
|
|
2742
2745
|
/** @type Specificity */
|
|
2743
|
-
sum: [
|
|
2746
|
+
sum: [Yt.sum, Qt.sum, Vt.sum],
|
|
2744
2747
|
/** @type Specificity */
|
|
2745
|
-
mean: [
|
|
2748
|
+
mean: [Yt.mean, Qt.mean, Vt.mean],
|
|
2746
2749
|
/** @type Specificity */
|
|
2747
|
-
mode: [
|
|
2750
|
+
mode: [Yt.mode, Qt.mode, Vt.mode],
|
|
2748
2751
|
/** @type Specificity */
|
|
2749
|
-
items:
|
|
2752
|
+
items: Ws
|
|
2750
2753
|
},
|
|
2751
|
-
|
|
2754
|
+
Bs.c()
|
|
2752
2755
|
),
|
|
2753
|
-
complexity:
|
|
2756
|
+
complexity: R(fi, Gs.c(), {
|
|
2754
2757
|
items: et.toArray()
|
|
2755
2758
|
}),
|
|
2756
|
-
nesting:
|
|
2757
|
-
|
|
2759
|
+
nesting: R(
|
|
2760
|
+
Dt.aggregate(),
|
|
2758
2761
|
{
|
|
2759
|
-
items:
|
|
2762
|
+
items: Dt.toArray()
|
|
2760
2763
|
},
|
|
2761
|
-
|
|
2764
|
+
Xs.c()
|
|
2762
2765
|
),
|
|
2763
|
-
id:
|
|
2764
|
-
ratio: H(It.size(), ye)
|
|
2765
|
-
}),
|
|
2766
|
-
pseudoClasses: Gs.c(),
|
|
2767
|
-
pseudoElements: Ws.c(),
|
|
2768
|
-
accessibility: b(Ht.c(), {
|
|
2766
|
+
id: R(Ht.c(), {
|
|
2769
2767
|
ratio: H(Ht.size(), ye)
|
|
2770
2768
|
}),
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
ratio: H(
|
|
2769
|
+
pseudoClasses: Ys.c(),
|
|
2770
|
+
pseudoElements: Qs.c(),
|
|
2771
|
+
accessibility: R(Pt.c(), {
|
|
2772
|
+
ratio: H(Pt.size(), ye)
|
|
2773
|
+
}),
|
|
2774
|
+
attributes: Vs.c(),
|
|
2775
|
+
keyframes: Ut.c(),
|
|
2776
|
+
prefixed: R(It.c(), {
|
|
2777
|
+
ratio: H(It.size(), ye)
|
|
2775
2778
|
}),
|
|
2776
|
-
combinators:
|
|
2779
|
+
combinators: js.c()
|
|
2777
2780
|
},
|
|
2778
2781
|
declarations: {
|
|
2779
2782
|
total: Ie,
|
|
2780
|
-
totalUnique:
|
|
2781
|
-
uniquenessRatio: H(
|
|
2783
|
+
totalUnique: hi,
|
|
2784
|
+
uniquenessRatio: H(hi, Ie),
|
|
2782
2785
|
importants: {
|
|
2783
2786
|
total: tt,
|
|
2784
2787
|
ratio: H(tt, Ie),
|
|
2785
2788
|
inKeyframes: {
|
|
2786
|
-
total:
|
|
2787
|
-
ratio: H(
|
|
2789
|
+
total: Ft,
|
|
2790
|
+
ratio: H(Ft, tt)
|
|
2788
2791
|
}
|
|
2789
2792
|
},
|
|
2790
|
-
complexity:
|
|
2791
|
-
nesting:
|
|
2792
|
-
|
|
2793
|
+
complexity: pi,
|
|
2794
|
+
nesting: R(
|
|
2795
|
+
zt.aggregate(),
|
|
2793
2796
|
{
|
|
2794
|
-
items:
|
|
2797
|
+
items: zt.toArray()
|
|
2795
2798
|
},
|
|
2796
|
-
|
|
2799
|
+
ei.c()
|
|
2797
2800
|
)
|
|
2798
2801
|
},
|
|
2799
|
-
properties:
|
|
2800
|
-
prefixed:
|
|
2801
|
-
ratio: H(
|
|
2802
|
+
properties: R(He.c(), {
|
|
2803
|
+
prefixed: R(Kt.c(), {
|
|
2804
|
+
ratio: H(Kt.size(), He.size())
|
|
2802
2805
|
}),
|
|
2803
|
-
custom:
|
|
2806
|
+
custom: R(st.c(), {
|
|
2804
2807
|
ratio: H(st.size(), He.size()),
|
|
2805
|
-
importants:
|
|
2806
|
-
ratio: H(
|
|
2808
|
+
importants: R(Mt.c(), {
|
|
2809
|
+
ratio: H(Mt.size(), st.size())
|
|
2807
2810
|
})
|
|
2808
2811
|
}),
|
|
2809
|
-
browserhacks:
|
|
2810
|
-
ratio: H(
|
|
2812
|
+
browserhacks: R(qt.c(), {
|
|
2813
|
+
ratio: H(qt.size(), He.size())
|
|
2811
2814
|
}),
|
|
2812
|
-
complexity:
|
|
2815
|
+
complexity: di
|
|
2813
2816
|
}),
|
|
2814
2817
|
values: {
|
|
2815
|
-
colors:
|
|
2818
|
+
colors: R(we.count(), {
|
|
2816
2819
|
formats: Ae.c()
|
|
2817
2820
|
}),
|
|
2818
|
-
gradients:
|
|
2819
|
-
fontFamilies:
|
|
2820
|
-
fontSizes:
|
|
2821
|
-
lineHeights:
|
|
2822
|
-
zindexes:
|
|
2823
|
-
textShadows:
|
|
2824
|
-
boxShadows:
|
|
2825
|
-
borderRadiuses:
|
|
2821
|
+
gradients: li.c(),
|
|
2822
|
+
fontFamilies: Gt.c(),
|
|
2823
|
+
fontSizes: rt.c(),
|
|
2824
|
+
lineHeights: nt.c(),
|
|
2825
|
+
zindexes: si.c(),
|
|
2826
|
+
textShadows: ii.c(),
|
|
2827
|
+
boxShadows: ri.c(),
|
|
2828
|
+
borderRadiuses: oi.count(),
|
|
2826
2829
|
animations: {
|
|
2827
|
-
durations:
|
|
2828
|
-
timingFunctions:
|
|
2830
|
+
durations: lt.c(),
|
|
2831
|
+
timingFunctions: Wt.c()
|
|
2829
2832
|
},
|
|
2830
|
-
prefixes:
|
|
2831
|
-
browserhacks:
|
|
2832
|
-
units:
|
|
2833
|
-
complexity:
|
|
2833
|
+
prefixes: ti.c(),
|
|
2834
|
+
browserhacks: Bt.c(),
|
|
2835
|
+
units: ni.count(),
|
|
2836
|
+
complexity: gi,
|
|
2834
2837
|
keywords: De.c(),
|
|
2835
|
-
resets:
|
|
2838
|
+
resets: ai.c(),
|
|
2839
|
+
displays: it.c()
|
|
2836
2840
|
},
|
|
2837
2841
|
__meta__: {
|
|
2838
2842
|
parseTime: p - o,
|
|
@@ -2841,25 +2845,25 @@ function zi(r, e, t) {
|
|
|
2841
2845
|
}
|
|
2842
2846
|
};
|
|
2843
2847
|
}
|
|
2844
|
-
function
|
|
2848
|
+
function $i(r, e) {
|
|
2845
2849
|
return r[0] === e[0] ? r[1] === e[1] ? e[2] - r[2] : e[1] - r[1] : e[0] - r[0];
|
|
2846
2850
|
}
|
|
2847
2851
|
export {
|
|
2848
2852
|
W as KeywordSet,
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2853
|
+
Ol as analyze,
|
|
2854
|
+
Fi as calculateSpecificity,
|
|
2855
|
+
ul as colorFunctions,
|
|
2856
|
+
fl as colorKeywords,
|
|
2857
|
+
$i as compareSpecificity,
|
|
2858
|
+
mt as cssKeywords,
|
|
2859
|
+
Sl as hasVendorPrefix,
|
|
2860
|
+
Wr as isAccessibilitySelector,
|
|
2861
|
+
Kr as isMediaBrowserhack,
|
|
2862
|
+
Rl as isPropertyHack,
|
|
2863
|
+
Gr as isSelectorPrefixed,
|
|
2864
|
+
qr as isSupportsBrowserhack,
|
|
2865
|
+
Al as isValuePrefixed,
|
|
2866
|
+
cl as namedColors,
|
|
2867
|
+
as as selectorComplexity,
|
|
2868
|
+
_l as systemColors
|
|
2865
2869
|
};
|