@projectwallace/css-analyzer 7.5.1 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css-analyzer.js +655 -719
- package/dist/index.d.ts +595 -689
- package/package.json +10 -6
package/dist/css-analyzer.js
CHANGED
|
@@ -1,181 +1,188 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var pi = Object.defineProperty;
|
|
2
|
+
var Zt = (i) => {
|
|
3
|
+
throw TypeError(i);
|
|
4
|
+
};
|
|
5
|
+
var hi = (i, e, r) => e in i ? pi(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
|
|
6
|
+
var $t = (i, e, r) => hi(i, typeof e != "symbol" ? e + "" : e, r), Jt = (i, e, r) => e.has(i) || Zt("Cannot " + r);
|
|
7
|
+
var h = (i, e, r) => (Jt(i, e, "read from private field"), r ? r.call(i) : e.get(i)), F = (i, e, r) => e.has(i) ? Zt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, r), L = (i, e, r, t) => (Jt(i, e, "write to private field"), t ? t.call(i, r) : e.set(i, r), r);
|
|
8
|
+
var Ye = (i, e, r, t) => ({
|
|
9
|
+
set _(o) {
|
|
10
|
+
L(i, e, o, r);
|
|
11
|
+
},
|
|
12
|
+
get _() {
|
|
13
|
+
return h(i, e, t);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
import mi from "css-tree/parser";
|
|
17
|
+
import C from "css-tree/walker";
|
|
18
|
+
import { calculateForAST as gi } from "@bramus/specificity/core";
|
|
19
|
+
import { walk as li } from "css-tree";
|
|
20
|
+
function Je(i, e) {
|
|
21
|
+
return e >= 65 && e <= 90 && (e = e | 32), i === e;
|
|
6
22
|
}
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
let
|
|
10
|
-
if (
|
|
11
|
-
for (let
|
|
12
|
-
if (
|
|
23
|
+
function q(i, e) {
|
|
24
|
+
if (i === e) return !0;
|
|
25
|
+
let r = i.length;
|
|
26
|
+
if (r !== e.length) return !1;
|
|
27
|
+
for (let t = 0; t < r; t++)
|
|
28
|
+
if (Je(i.charCodeAt(t), e.charCodeAt(t)) === !1)
|
|
13
29
|
return !1;
|
|
14
30
|
return !0;
|
|
15
31
|
}
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
let
|
|
19
|
-
if (
|
|
32
|
+
function E(i, e) {
|
|
33
|
+
if (i === e) return !0;
|
|
34
|
+
let r = e.length, t = r - i.length;
|
|
35
|
+
if (t < 0)
|
|
20
36
|
return !1;
|
|
21
|
-
for (let
|
|
22
|
-
if (
|
|
37
|
+
for (let o = r - 1; o >= t; o--)
|
|
38
|
+
if (Je(i.charCodeAt(o - t), e.charCodeAt(o)) === !1)
|
|
23
39
|
return !1;
|
|
24
40
|
return !0;
|
|
25
41
|
}
|
|
26
|
-
function
|
|
27
|
-
if (
|
|
28
|
-
let
|
|
29
|
-
if (
|
|
30
|
-
for (let
|
|
31
|
-
if (
|
|
42
|
+
function Xe(i, e) {
|
|
43
|
+
if (i === e) return !0;
|
|
44
|
+
let r = i.length;
|
|
45
|
+
if (e.length < r) return !1;
|
|
46
|
+
for (let t = 0; t < r; t++)
|
|
47
|
+
if (Je(i.charCodeAt(t), e.charCodeAt(t)) === !1)
|
|
32
48
|
return !1;
|
|
33
49
|
return !0;
|
|
34
50
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return
|
|
51
|
+
const Ge = "Atrule", di = "MediaQuery", Qe = "Rule", yi = "Selector", wi = "Value", T = "Identifier", ki = "Nth", bi = "Combinator", si = "Number", et = "Dimension", Z = "Operator", xi = "Hash", Ci = "Url", tt = "Function";
|
|
52
|
+
function Xt(i, e, r) {
|
|
53
|
+
let t = i.value.children.first;
|
|
54
|
+
return q(e, i.property) && t.type === T && q(r, t.name);
|
|
39
55
|
}
|
|
40
|
-
function
|
|
41
|
-
let
|
|
42
|
-
return
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
56
|
+
function vi(i) {
|
|
57
|
+
let e = !1;
|
|
58
|
+
return li(i, function(r) {
|
|
59
|
+
if (r.type === "Declaration" && (Xt(r, "-webkit-appearance", "none") || Xt(r, "-moz-appearance", "meterbar")))
|
|
60
|
+
return e = !0, this.break;
|
|
61
|
+
}), e;
|
|
46
62
|
}
|
|
47
|
-
function
|
|
48
|
-
let
|
|
49
|
-
return
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
-
} else if (
|
|
63
|
+
function Si(i) {
|
|
64
|
+
let e = !1;
|
|
65
|
+
return li(i, function(r) {
|
|
66
|
+
let { mediaType: t, name: o, value: n, type: y, kind: k } = r;
|
|
67
|
+
if (y === di && t !== null) {
|
|
68
|
+
if (Xe("\\0", t) || E("\\9 ", t))
|
|
69
|
+
return e = !0, this.break;
|
|
70
|
+
} else if (y === "Feature" && k === "media") {
|
|
55
71
|
if (n && n.unit && n.unit === "\\0")
|
|
56
|
-
return
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
61
|
-
if (
|
|
62
|
-
return
|
|
72
|
+
return e = !0, this.break;
|
|
73
|
+
if (q("-moz-images-in-menus", o) || q("min--moz-device-pixel-ratio", o) || q("-ms-high-contrast", o))
|
|
74
|
+
return e = !0, this.break;
|
|
75
|
+
if (q("min-resolution", o) && n && q(".001", n.value) && q("dpcm", n.unit))
|
|
76
|
+
return e = !0, this.break;
|
|
77
|
+
if (q("-webkit-min-device-pixel-ratio", o) && n && n.value && (q("0", n.value) || q("10000", n.value)))
|
|
78
|
+
return e = !0, this.break;
|
|
63
79
|
}
|
|
64
|
-
}),
|
|
80
|
+
}), e;
|
|
65
81
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
return
|
|
82
|
+
const ei = 45;
|
|
83
|
+
function W(i) {
|
|
84
|
+
return i.charCodeAt(0) === ei && i.charCodeAt(1) !== ei && i.indexOf("-", 2) !== -1;
|
|
69
85
|
}
|
|
70
|
-
class
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
this.set = new Set(
|
|
86
|
+
class O {
|
|
87
|
+
constructor(e) {
|
|
88
|
+
$t(this, "set");
|
|
89
|
+
this.set = new Set(e);
|
|
74
90
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return this.set.has(t.toLowerCase());
|
|
91
|
+
has(e) {
|
|
92
|
+
return this.set.has(e.toLowerCase());
|
|
78
93
|
}
|
|
79
94
|
}
|
|
80
|
-
function
|
|
81
|
-
let
|
|
82
|
-
return
|
|
83
|
-
visit:
|
|
84
|
-
enter: function(
|
|
85
|
-
|
|
95
|
+
function ni(i, e) {
|
|
96
|
+
let r = [];
|
|
97
|
+
return C(i, {
|
|
98
|
+
visit: "Selector",
|
|
99
|
+
enter: function(t) {
|
|
100
|
+
r.push(e(t));
|
|
86
101
|
}
|
|
87
|
-
}),
|
|
102
|
+
}), r;
|
|
88
103
|
}
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return v(r, function(s) {
|
|
103
|
-
if (s.type === jt) {
|
|
104
|
-
let e = s.name.name;
|
|
105
|
-
if (S("role", e) || We("aria-", e))
|
|
106
|
-
return t = !0, this.break;
|
|
107
|
-
} else if (s.type === G && Qt.has(s.name)) {
|
|
108
|
-
let e = Gt(s, Zt);
|
|
109
|
-
for (let n of e)
|
|
110
|
-
if (n === !0) {
|
|
111
|
-
t = !0;
|
|
104
|
+
const ai = new O(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
|
|
105
|
+
function oi(i) {
|
|
106
|
+
let e = !1;
|
|
107
|
+
return C(i, function(r) {
|
|
108
|
+
if (r.type === "AttributeSelector") {
|
|
109
|
+
let t = r.name.name;
|
|
110
|
+
if (q("role", t) || Xe("aria-", t))
|
|
111
|
+
return e = !0, C.break;
|
|
112
|
+
} else if (r.type === "PseudoClassSelector" && ai.has(r.name)) {
|
|
113
|
+
let t = ni(r, oi);
|
|
114
|
+
for (let o of t)
|
|
115
|
+
if (o === !0) {
|
|
116
|
+
e = !0;
|
|
112
117
|
break;
|
|
113
118
|
}
|
|
114
|
-
return
|
|
119
|
+
return C.skip;
|
|
115
120
|
}
|
|
116
|
-
}),
|
|
121
|
+
}), e;
|
|
117
122
|
}
|
|
118
|
-
function
|
|
119
|
-
let
|
|
120
|
-
return
|
|
121
|
-
let
|
|
122
|
-
if ((
|
|
123
|
-
return
|
|
124
|
-
}),
|
|
123
|
+
function zi(i) {
|
|
124
|
+
let e = !1;
|
|
125
|
+
return C(i, function(r) {
|
|
126
|
+
let t = r.type;
|
|
127
|
+
if ((t === "PseudoElementSelector" || t === "TypeSelector" || t === "PseudoClassSelector") && W(r.name))
|
|
128
|
+
return e = !0, C.break;
|
|
129
|
+
}), e;
|
|
125
130
|
}
|
|
126
|
-
function
|
|
127
|
-
let
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
}),
|
|
131
|
+
function qi(i) {
|
|
132
|
+
let e = [];
|
|
133
|
+
return C(i, function(r) {
|
|
134
|
+
r.type === "PseudoClassSelector" && e.push(r.name);
|
|
135
|
+
}), e.length === 0 ? !1 : e;
|
|
131
136
|
}
|
|
132
|
-
function
|
|
133
|
-
let
|
|
134
|
-
return
|
|
135
|
-
let
|
|
136
|
-
if (!(
|
|
137
|
-
if (
|
|
138
|
-
return
|
|
139
|
-
if (
|
|
140
|
-
let
|
|
141
|
-
if (
|
|
142
|
-
for (let
|
|
143
|
-
|
|
144
|
-
return
|
|
137
|
+
function ui(i) {
|
|
138
|
+
let e = 0;
|
|
139
|
+
return C(i, function(r) {
|
|
140
|
+
let t = r.type;
|
|
141
|
+
if (!(t === "Selector" || t === ki)) {
|
|
142
|
+
if (e++, (t === "PseudoElementSelector" || t === "TypeSelector" || t === "PseudoClassSelector") && W(r.name) && e++, t === "AttributeSelector")
|
|
143
|
+
return r.value && e++, C.skip;
|
|
144
|
+
if (t === "PseudoClassSelector" && ai.has(r.name)) {
|
|
145
|
+
let o = ni(r, ui);
|
|
146
|
+
if (o.length === 0) return;
|
|
147
|
+
for (let n of o)
|
|
148
|
+
e += n;
|
|
149
|
+
return C.skip;
|
|
145
150
|
}
|
|
146
151
|
}
|
|
147
|
-
}),
|
|
152
|
+
}), e;
|
|
148
153
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
if (
|
|
152
|
-
let
|
|
153
|
-
if (
|
|
154
|
-
let y =
|
|
154
|
+
function Ai(i, e) {
|
|
155
|
+
C(i, function(r, t) {
|
|
156
|
+
if (r.type === bi) {
|
|
157
|
+
let o = r.loc, n = r.name;
|
|
158
|
+
if (o === null) {
|
|
159
|
+
let y = t.prev.data.loc.end, k = {
|
|
155
160
|
offset: y.offset,
|
|
156
161
|
line: y.line,
|
|
157
162
|
column: y.column
|
|
158
163
|
};
|
|
159
|
-
|
|
160
|
-
name:
|
|
164
|
+
e({
|
|
165
|
+
name: n,
|
|
166
|
+
// @ts-expect-error TODO: fix this
|
|
161
167
|
loc: {
|
|
162
|
-
start:
|
|
168
|
+
start: k,
|
|
163
169
|
end: {
|
|
164
|
-
offset:
|
|
165
|
-
line:
|
|
166
|
-
column:
|
|
170
|
+
offset: k.offset + 1,
|
|
171
|
+
line: k.line,
|
|
172
|
+
column: k.column + 1
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
});
|
|
170
176
|
} else
|
|
171
|
-
|
|
172
|
-
name:
|
|
173
|
-
|
|
177
|
+
e({
|
|
178
|
+
name: n,
|
|
179
|
+
// @ts-expect-error TODO: fix this
|
|
180
|
+
loc: o
|
|
174
181
|
});
|
|
175
182
|
}
|
|
176
183
|
});
|
|
177
184
|
}
|
|
178
|
-
const
|
|
185
|
+
const Pi = new O([
|
|
179
186
|
// CSS Named Colors
|
|
180
187
|
// Spec: https://drafts.csswg.org/css-color/#named-colors
|
|
181
188
|
// Heuristic: popular names first for quick finding in set.has()
|
|
@@ -328,7 +335,7 @@ const hi = new A([
|
|
|
328
335
|
"mediumorchid",
|
|
329
336
|
"darksalmon",
|
|
330
337
|
"mediumspringgreen"
|
|
331
|
-
]),
|
|
338
|
+
]), Li = new O([
|
|
332
339
|
// CSS System Colors
|
|
333
340
|
// Spec: https://drafts.csswg.org/css-color/#css-system-colors
|
|
334
341
|
"accentcolor",
|
|
@@ -350,21 +357,7 @@ const hi = new A([
|
|
|
350
357
|
"selecteditem",
|
|
351
358
|
"selecteditemtext",
|
|
352
359
|
"visitedtext"
|
|
353
|
-
]),
|
|
354
|
-
"rgba",
|
|
355
|
-
"rgb",
|
|
356
|
-
"hsla",
|
|
357
|
-
"hsl",
|
|
358
|
-
"oklch",
|
|
359
|
-
"color",
|
|
360
|
-
"hwb",
|
|
361
|
-
"lch",
|
|
362
|
-
"lab",
|
|
363
|
-
"oklab"
|
|
364
|
-
]), di = new A([
|
|
365
|
-
"transparent",
|
|
366
|
-
"currentcolor"
|
|
367
|
-
]), ie = new A([
|
|
360
|
+
]), Oi = new O(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), Ri = new O(["transparent", "currentcolor"]), he = new O([
|
|
368
361
|
"auto",
|
|
369
362
|
"none",
|
|
370
363
|
// for `text-shadow`, `box-shadow` and `background`
|
|
@@ -374,29 +367,22 @@ const hi = new A([
|
|
|
374
367
|
"revert",
|
|
375
368
|
"revert-layer"
|
|
376
369
|
]);
|
|
377
|
-
function
|
|
378
|
-
let
|
|
379
|
-
if (!
|
|
380
|
-
let
|
|
381
|
-
return
|
|
370
|
+
function pe(i) {
|
|
371
|
+
let e = i.children, r = e.size;
|
|
372
|
+
if (!e || r > 1 || r === 0) return !1;
|
|
373
|
+
let t = e.first;
|
|
374
|
+
return t.type === T && he.has(t.name);
|
|
382
375
|
}
|
|
383
|
-
function
|
|
384
|
-
return parseFloat(
|
|
376
|
+
function ti(i) {
|
|
377
|
+
return parseFloat(i) === 0;
|
|
385
378
|
}
|
|
386
|
-
function
|
|
387
|
-
for (let
|
|
388
|
-
if (!(
|
|
379
|
+
function Di(i) {
|
|
380
|
+
for (let e of i.children.toArray())
|
|
381
|
+
if (!(e.type === si && ti(e.value)) && !(e.type === et && ti(e.value)))
|
|
389
382
|
return !1;
|
|
390
383
|
return !0;
|
|
391
384
|
}
|
|
392
|
-
const
|
|
393
|
-
"caption",
|
|
394
|
-
"icon",
|
|
395
|
-
"menu",
|
|
396
|
-
"message-box",
|
|
397
|
-
"small-caption",
|
|
398
|
-
"status-bar"
|
|
399
|
-
]), ki = new A([
|
|
385
|
+
const Fi = new O(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), Ei = new O([
|
|
400
386
|
/* <absolute-size> values */
|
|
401
387
|
"xx-small",
|
|
402
388
|
"x-small",
|
|
@@ -409,223 +395,206 @@ const wi = new A([
|
|
|
409
395
|
/* <relative-size> values */
|
|
410
396
|
"smaller",
|
|
411
397
|
"larger"
|
|
412
|
-
]),
|
|
413
|
-
function
|
|
414
|
-
let
|
|
415
|
-
return
|
|
398
|
+
]), _i = 44, ii = 47;
|
|
399
|
+
function Ze(i) {
|
|
400
|
+
let e = i.children.first;
|
|
401
|
+
return e === null ? !1 : e.type === T && Fi.has(e.name);
|
|
416
402
|
}
|
|
417
|
-
function
|
|
418
|
-
var
|
|
419
|
-
let
|
|
420
|
-
if (
|
|
403
|
+
function Mi(i, e, r) {
|
|
404
|
+
var k;
|
|
405
|
+
let t = [void 0, void 0], o, n;
|
|
406
|
+
if (i.children.first.type === "Function" && i.children.first.name.toLowerCase() === "var")
|
|
421
407
|
return null;
|
|
422
|
-
|
|
423
|
-
let
|
|
424
|
-
if (
|
|
408
|
+
i.children.forEach(function(b, A) {
|
|
409
|
+
let x = A.prev ? A.prev.data : void 0, R = A.next ? A.next.data : void 0;
|
|
410
|
+
if (b.type === T && he.has(b.name) && r({
|
|
425
411
|
type: "keyword",
|
|
426
|
-
value:
|
|
427
|
-
}),
|
|
428
|
-
|
|
412
|
+
value: b.name
|
|
413
|
+
}), R && R.type === Z && R.value.charCodeAt(0) === ii) {
|
|
414
|
+
o = e(b);
|
|
429
415
|
return;
|
|
430
416
|
}
|
|
431
|
-
if (
|
|
432
|
-
|
|
417
|
+
if (x && x.type === Z && x.value.charCodeAt(0) === ii) {
|
|
418
|
+
n = e(b);
|
|
433
419
|
return;
|
|
434
420
|
}
|
|
435
|
-
if (
|
|
436
|
-
|
|
421
|
+
if (R && R.type === Z && R.value.charCodeAt(0) === _i && !t[0]) {
|
|
422
|
+
t[0] = b, !o && x && (o = e(x));
|
|
437
423
|
return;
|
|
438
424
|
}
|
|
439
|
-
if (
|
|
440
|
-
if (
|
|
441
|
-
|
|
425
|
+
if (b.type !== si) {
|
|
426
|
+
if (A.next === null) {
|
|
427
|
+
t[1] = b, !o && !t[0] && x && (o = e(x));
|
|
442
428
|
return;
|
|
443
429
|
}
|
|
444
|
-
if (
|
|
445
|
-
let
|
|
446
|
-
if (
|
|
447
|
-
|
|
430
|
+
if (b.type === T) {
|
|
431
|
+
let U = b.name;
|
|
432
|
+
if (Ei.has(U)) {
|
|
433
|
+
o = U;
|
|
448
434
|
return;
|
|
449
435
|
}
|
|
450
436
|
}
|
|
451
437
|
}
|
|
452
438
|
});
|
|
453
|
-
let y =
|
|
439
|
+
let y = t[0] || t[1] ? e({
|
|
454
440
|
loc: {
|
|
441
|
+
// @ts-expect-error TODO: fix this
|
|
455
442
|
start: {
|
|
456
|
-
|
|
443
|
+
// @ts-expect-error TODO: fix this
|
|
444
|
+
offset: (t[0] || t[1]).loc.start.offset
|
|
457
445
|
},
|
|
446
|
+
// @ts-expect-error TODO: fix this
|
|
458
447
|
end: {
|
|
459
448
|
// Either the node we detected as the last node, or the end of the whole value
|
|
460
449
|
// It's never 0 because the first node is always a font-size or font-style
|
|
461
|
-
offset: ((
|
|
450
|
+
offset: ((k = t[1]) == null ? void 0 : k.loc.end.offset) || i.loc.end.offset
|
|
462
451
|
}
|
|
463
452
|
}
|
|
464
453
|
}) : null;
|
|
465
454
|
return {
|
|
466
|
-
font_size:
|
|
467
|
-
line_height:
|
|
455
|
+
font_size: o,
|
|
456
|
+
line_height: n,
|
|
468
457
|
font_family: y
|
|
469
458
|
};
|
|
470
459
|
}
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
"step-start",
|
|
478
|
-
"step-end"
|
|
479
|
-
]), zi = new A([
|
|
480
|
-
"cubic-bezier",
|
|
481
|
-
"steps"
|
|
482
|
-
]);
|
|
483
|
-
function Si(r, t) {
|
|
484
|
-
let s = !1;
|
|
485
|
-
for (let e of r) {
|
|
486
|
-
let n = e.type, a = e.name;
|
|
487
|
-
n === W ? s = !1 : n === Ne && s === !1 ? (s = !0, t({
|
|
460
|
+
const Ii = new O(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), Ti = new O(["cubic-bezier", "steps"]);
|
|
461
|
+
function Ui(i, e) {
|
|
462
|
+
let r = !1;
|
|
463
|
+
for (let t of i) {
|
|
464
|
+
let o = t.type, n = t.name;
|
|
465
|
+
o === Z ? r = !1 : o === et && r === !1 ? (r = !0, e({
|
|
488
466
|
type: "duration",
|
|
489
|
-
value:
|
|
490
|
-
})) :
|
|
467
|
+
value: t
|
|
468
|
+
})) : o === T ? Ii.has(n) ? e({
|
|
491
469
|
type: "fn",
|
|
492
|
-
value:
|
|
493
|
-
}) :
|
|
470
|
+
value: t
|
|
471
|
+
}) : he.has(n) && e({
|
|
494
472
|
type: "keyword",
|
|
495
|
-
value:
|
|
496
|
-
}) :
|
|
473
|
+
value: t
|
|
474
|
+
}) : o === tt && Ti.has(n) && e({
|
|
497
475
|
type: "fn",
|
|
498
|
-
value:
|
|
476
|
+
value: t
|
|
499
477
|
});
|
|
500
478
|
}
|
|
501
479
|
}
|
|
502
|
-
function
|
|
503
|
-
let
|
|
504
|
-
if (!
|
|
480
|
+
function ci(i) {
|
|
481
|
+
let e = i.children;
|
|
482
|
+
if (!e)
|
|
505
483
|
return !1;
|
|
506
|
-
for (let
|
|
507
|
-
let { type:
|
|
508
|
-
if (
|
|
484
|
+
for (let r of e) {
|
|
485
|
+
let { type: t, name: o } = r;
|
|
486
|
+
if (t === T && W(o) || t === tt && (W(o) || ci(r)))
|
|
509
487
|
return !0;
|
|
510
488
|
}
|
|
511
489
|
return !1;
|
|
512
490
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
constructor(
|
|
516
|
-
|
|
491
|
+
var H, _, M, $;
|
|
492
|
+
class u {
|
|
493
|
+
constructor(e = !1) {
|
|
494
|
+
F(this, H);
|
|
495
|
+
F(this, _);
|
|
496
|
+
F(this, M, []);
|
|
497
|
+
F(this, $);
|
|
498
|
+
L(this, H, /* @__PURE__ */ new Map()), L(this, _, 0), e && L(this, M, []), L(this, $, e);
|
|
517
499
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
let e = this._total;
|
|
524
|
-
if (this._useLocations) {
|
|
525
|
-
let n = s.start, a = n.offset, y = e * 4;
|
|
526
|
-
this._nodes[y] = n.line, this._nodes[y + 1] = n.column, this._nodes[y + 2] = a, this._nodes[y + 3] = s.end.offset - a;
|
|
500
|
+
p(e, r) {
|
|
501
|
+
let t = h(this, _);
|
|
502
|
+
if (h(this, $)) {
|
|
503
|
+
let o = r.start, n = o.offset, y = t * 4;
|
|
504
|
+
h(this, M)[y] = o.line, h(this, M)[y + 1] = o.column, h(this, M)[y + 2] = n, h(this, M)[y + 3] = r.end.offset - n;
|
|
527
505
|
}
|
|
528
|
-
if (this.
|
|
529
|
-
this.
|
|
506
|
+
if (h(this, H).has(e)) {
|
|
507
|
+
h(this, H).get(e).push(t), Ye(this, _)._++;
|
|
530
508
|
return;
|
|
531
509
|
}
|
|
532
|
-
this.
|
|
510
|
+
h(this, H).set(e, [t]), Ye(this, _)._++;
|
|
533
511
|
}
|
|
534
512
|
size() {
|
|
535
|
-
return this
|
|
513
|
+
return h(this, _);
|
|
536
514
|
}
|
|
537
|
-
/**
|
|
538
|
-
* @typedef CssLocation
|
|
539
|
-
* @property {number} line
|
|
540
|
-
* @property {number} column
|
|
541
|
-
* @property {number} offset
|
|
542
|
-
* @property {number} length
|
|
543
|
-
*
|
|
544
|
-
* @returns {{
|
|
545
|
-
* total: number;
|
|
546
|
-
* totalUnique: number;
|
|
547
|
-
* uniquenessRatio: number;
|
|
548
|
-
* unique: Record<string, number>;
|
|
549
|
-
* } & ({
|
|
550
|
-
* uniqueWithLocations: Record<string, CssLocation[]>
|
|
551
|
-
* } | {
|
|
552
|
-
* uniqueWithLocations?: undefined
|
|
553
|
-
* })}
|
|
554
|
-
*/
|
|
555
515
|
c() {
|
|
556
|
-
let
|
|
557
|
-
|
|
558
|
-
if (
|
|
559
|
-
let
|
|
560
|
-
let
|
|
516
|
+
let e = /* @__PURE__ */ new Map(), r = {}, t = h(this, $), o = h(this, H), n = h(this, M), y = o.size;
|
|
517
|
+
o.forEach((A, x) => {
|
|
518
|
+
if (t) {
|
|
519
|
+
let R = A.map(function(U) {
|
|
520
|
+
let N = U * 4;
|
|
561
521
|
return {
|
|
562
|
-
line:
|
|
563
|
-
column:
|
|
564
|
-
offset:
|
|
565
|
-
length:
|
|
522
|
+
line: n[N],
|
|
523
|
+
column: n[N + 1],
|
|
524
|
+
offset: n[N + 2],
|
|
525
|
+
length: n[N + 3]
|
|
566
526
|
};
|
|
567
527
|
});
|
|
568
|
-
|
|
528
|
+
e.set(x, R);
|
|
569
529
|
} else
|
|
570
|
-
|
|
530
|
+
r[x] = A.length;
|
|
571
531
|
});
|
|
572
|
-
let
|
|
573
|
-
|
|
532
|
+
let k = h(this, _);
|
|
533
|
+
return {
|
|
534
|
+
total: k,
|
|
574
535
|
totalUnique: y,
|
|
575
|
-
unique:
|
|
576
|
-
uniquenessRatio:
|
|
536
|
+
unique: r,
|
|
537
|
+
uniquenessRatio: k === 0 ? 0 : y / k,
|
|
538
|
+
uniqueWithLocations: t ? Object.fromEntries(e) : void 0
|
|
577
539
|
};
|
|
578
|
-
return e && (w.uniqueWithLocations = Object.fromEntries(t)), w;
|
|
579
540
|
}
|
|
580
541
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
542
|
+
H = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), $ = new WeakMap();
|
|
543
|
+
var J, K, se;
|
|
544
|
+
class $e {
|
|
545
|
+
constructor(e) {
|
|
546
|
+
F(this, J);
|
|
547
|
+
F(this, K);
|
|
548
|
+
F(this, se);
|
|
549
|
+
L(this, J, new u(e)), L(this, K, /* @__PURE__ */ new Map()), L(this, se, e);
|
|
585
550
|
}
|
|
586
551
|
/**
|
|
587
|
-
* Add an item to this
|
|
588
|
-
* @param
|
|
589
|
-
* @param
|
|
590
|
-
* @param
|
|
552
|
+
* Add an item to this #list's context
|
|
553
|
+
* @param item Item to push
|
|
554
|
+
* @param context Context to push Item to
|
|
555
|
+
* @param node_location
|
|
591
556
|
*/
|
|
592
|
-
push(
|
|
593
|
-
this.
|
|
557
|
+
push(e, r, t) {
|
|
558
|
+
h(this, J).p(e, t), h(this, K).has(r) || h(this, K).set(r, new u(h(this, se))), h(this, K).get(r).p(e, t);
|
|
594
559
|
}
|
|
595
560
|
count() {
|
|
596
|
-
let
|
|
597
|
-
for (let [
|
|
598
|
-
|
|
599
|
-
return Object.assign(this.
|
|
600
|
-
itemsPerContext: Object.fromEntries(
|
|
561
|
+
let e = /* @__PURE__ */ new Map();
|
|
562
|
+
for (let [r, t] of h(this, K).entries())
|
|
563
|
+
e.set(r, t.c());
|
|
564
|
+
return Object.assign(h(this, J).c(), {
|
|
565
|
+
itemsPerContext: Object.fromEntries(e)
|
|
601
566
|
});
|
|
602
567
|
}
|
|
603
568
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
569
|
+
J = new WeakMap(), K = new WeakMap(), se = new WeakMap();
|
|
570
|
+
function Vi(i) {
|
|
571
|
+
let e = /* @__PURE__ */ new Map(), r = -1, t = 0, o = 0, n = i.length;
|
|
572
|
+
for (let y = 0; y < n; y++) {
|
|
573
|
+
let k = i[y], b = (e.get(k) || 0) + 1;
|
|
574
|
+
e.set(k, b), b > r && (r = b, t = 0, o = 0), b >= r && (t++, o += k);
|
|
609
575
|
}
|
|
610
|
-
return
|
|
576
|
+
return o / t;
|
|
611
577
|
}
|
|
612
|
-
|
|
578
|
+
var I, X;
|
|
579
|
+
class S {
|
|
613
580
|
constructor() {
|
|
614
|
-
this
|
|
581
|
+
F(this, I);
|
|
582
|
+
F(this, X);
|
|
583
|
+
L(this, I, []), L(this, X, 0);
|
|
615
584
|
}
|
|
616
585
|
/**
|
|
617
586
|
* Add a new Integer at the end of this AggregateCollection
|
|
618
|
-
* @param
|
|
587
|
+
* @param item - The item to add
|
|
619
588
|
*/
|
|
620
|
-
push(
|
|
621
|
-
this.
|
|
589
|
+
push(e) {
|
|
590
|
+
h(this, I).push(e), L(this, X, h(this, X) + e);
|
|
622
591
|
}
|
|
623
592
|
size() {
|
|
624
|
-
return this.
|
|
593
|
+
return h(this, I).length;
|
|
625
594
|
}
|
|
626
595
|
aggregate() {
|
|
627
|
-
let
|
|
628
|
-
if (
|
|
596
|
+
let e = h(this, I).length;
|
|
597
|
+
if (e === 0)
|
|
629
598
|
return {
|
|
630
599
|
min: 0,
|
|
631
600
|
max: 0,
|
|
@@ -634,50 +603,54 @@ class C {
|
|
|
634
603
|
range: 0,
|
|
635
604
|
sum: 0
|
|
636
605
|
};
|
|
637
|
-
let
|
|
606
|
+
let r = h(this, I).slice().sort((k, b) => k - b), t = r[0], o = r[e - 1], n = Vi(r), y = h(this, X);
|
|
638
607
|
return {
|
|
639
|
-
min:
|
|
640
|
-
max:
|
|
641
|
-
mean: y /
|
|
642
|
-
mode:
|
|
643
|
-
range:
|
|
608
|
+
min: t,
|
|
609
|
+
max: o,
|
|
610
|
+
mean: y / e,
|
|
611
|
+
mode: n,
|
|
612
|
+
range: o - t,
|
|
644
613
|
sum: y
|
|
645
614
|
};
|
|
646
615
|
}
|
|
647
|
-
/**
|
|
648
|
-
* @returns {number[]} All _items in this collection
|
|
649
|
-
*/
|
|
650
616
|
toArray() {
|
|
651
|
-
return this
|
|
617
|
+
return h(this, I);
|
|
652
618
|
}
|
|
653
619
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
620
|
+
I = new WeakMap(), X = new WeakMap();
|
|
621
|
+
function Hi(i) {
|
|
622
|
+
if (it(i) || W(i)) return !1;
|
|
623
|
+
let e = i.charCodeAt(0);
|
|
624
|
+
return e === 47 || // /
|
|
625
|
+
e === 42 || // *
|
|
626
|
+
e === 95 || // _
|
|
627
|
+
e === 43 || // +
|
|
628
|
+
e === 38 || // &
|
|
629
|
+
e === 36 || // $
|
|
630
|
+
e === 35;
|
|
658
631
|
}
|
|
659
|
-
function
|
|
660
|
-
return
|
|
632
|
+
function it(i) {
|
|
633
|
+
return i.length < 3 ? !1 : i.charCodeAt(0) === 45 && i.charCodeAt(1) === 45;
|
|
661
634
|
}
|
|
662
|
-
function m(
|
|
663
|
-
return
|
|
635
|
+
function m(i, e) {
|
|
636
|
+
return it(e) ? !1 : E(i, e);
|
|
664
637
|
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
638
|
+
function Ki(i) {
|
|
639
|
+
return W(i) ? i.slice(i.indexOf("-", 2) + 1) : i;
|
|
667
640
|
}
|
|
668
|
-
function
|
|
669
|
-
let
|
|
670
|
-
return
|
|
641
|
+
function Wi(i) {
|
|
642
|
+
let e = 5, r = i.indexOf(";"), t = i.indexOf(",");
|
|
643
|
+
return r === -1 || t !== -1 && t < r ? i.substring(e, t) : i.substring(e, r);
|
|
671
644
|
}
|
|
672
|
-
function
|
|
673
|
-
let
|
|
674
|
-
if (
|
|
675
|
-
let
|
|
676
|
-
return
|
|
645
|
+
function Ni(i) {
|
|
646
|
+
let e = i.children;
|
|
647
|
+
if (e) {
|
|
648
|
+
let r = e.last;
|
|
649
|
+
return !!(r && r.type === T && E("\\9", r.name));
|
|
677
650
|
}
|
|
678
651
|
return !1;
|
|
679
652
|
}
|
|
680
|
-
let
|
|
653
|
+
let ji = new O([
|
|
681
654
|
"border-radius",
|
|
682
655
|
"border-top-left-radius",
|
|
683
656
|
"border-top-right-radius",
|
|
@@ -688,234 +661,233 @@ let Li = new A([
|
|
|
688
661
|
"border-end-end-radius",
|
|
689
662
|
"border-end-start-radius"
|
|
690
663
|
]);
|
|
691
|
-
function z(
|
|
692
|
-
return
|
|
664
|
+
function z(i, e) {
|
|
665
|
+
return e === 0 ? 0 : i / e;
|
|
693
666
|
}
|
|
694
|
-
let
|
|
667
|
+
let Bi = {
|
|
695
668
|
useLocations: !1
|
|
696
669
|
};
|
|
697
|
-
function
|
|
698
|
-
let
|
|
699
|
-
function
|
|
700
|
-
return y(
|
|
670
|
+
function Ji(i, e = {}) {
|
|
671
|
+
let t = Object.assign({}, Bi, e).useLocations === !0, o = Date.now();
|
|
672
|
+
function n(l) {
|
|
673
|
+
return y(l).trim();
|
|
701
674
|
}
|
|
702
|
-
function y(
|
|
703
|
-
let
|
|
704
|
-
return
|
|
675
|
+
function y(l) {
|
|
676
|
+
let le = l.loc;
|
|
677
|
+
return i.substring(le.start.offset, le.end.offset);
|
|
705
678
|
}
|
|
706
|
-
let
|
|
679
|
+
let k = 0, b = 0, A = 0, x = {
|
|
707
680
|
total: 0,
|
|
708
681
|
/** @type {Map<string, { size: number, count: number } & ({ uniqueWithLocations?: undefined } | ({ uniqueWithLocations: { offset: number, line: number, column: number, length: number }[] })) }>} */
|
|
709
682
|
unique: /* @__PURE__ */ new Map()
|
|
710
|
-
},
|
|
683
|
+
}, R = Date.now(), U = mi(i, {
|
|
711
684
|
parseCustomProperty: !0,
|
|
712
685
|
// To find font-families, colors, etc.
|
|
713
686
|
positions: !0,
|
|
714
687
|
// So we can use stringifyNode()
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
b++, w += i.length;
|
|
688
|
+
onComment: function(l) {
|
|
689
|
+
k++, b += l.length;
|
|
718
690
|
}
|
|
719
|
-
}),
|
|
720
|
-
|
|
721
|
-
enter(
|
|
722
|
-
var
|
|
723
|
-
switch (
|
|
724
|
-
case
|
|
725
|
-
|
|
726
|
-
let
|
|
727
|
-
if (
|
|
728
|
-
let
|
|
729
|
-
|
|
730
|
-
c.type ===
|
|
731
|
-
}),
|
|
691
|
+
}), N = Date.now(), fi = U.loc.end.line - U.loc.start.line + 1, rt = new u(t), me = new S(), ge = [], lt = new u(t), de = new u(t), st = new u(t), nt = new u(t), at = new u(t), ot = new u(t), ut = new u(t), ye = new u(t), ct = new u(t), we = new u(t), ke = new u(t), ft = new u(t), ne = new u(t), pt = new u(t), be = new S(), ht = new u(t), xe = 0, Ce = 0, ve = new S(), Se = new S(), ze = new S(), mt = new u(t), gt = new u(t), dt = new u(t), qe = new S(), yt = new u(t), Ae = new u(t), wt = /* @__PURE__ */ new Set(), Pe = new u(t), j, B, kt = new S(), bt = new S(), xt = new S(), Ct = new u(t), ae = new S(), vt = new u(t), St = [], Le = new u(t), Oe = new u(t), zt = new u(t), qt = new u(t), Re = new S(), At = new u(t), Pt = /* @__PURE__ */ new Set(), ee = 0, Lt = new S(), oe = 0, De = 0, Fe = new u(t), Ee = new S(), Ot = new u(t), te = new u(t), _e = new u(t), Me = new u(t), ue = new u(t), ie = new S(), Ie = new S(), Rt = new u(t), Te = new u(t), Dt = new u(t), Ft = new u(t), Et = new u(t), Ue = new u(t), Ve = new u(t), He = new u(t), ce = new u(t), fe = new u(t), Y = new $e(t), G = new u(t), Ke = new $e(t), _t = new u(t), re = new u(t), Mt = new $e(t), It = new u(t), D = 0;
|
|
692
|
+
C(U, {
|
|
693
|
+
enter(l) {
|
|
694
|
+
var le, Yt, Gt;
|
|
695
|
+
switch (l.type) {
|
|
696
|
+
case Ge: {
|
|
697
|
+
rt.p(l.name, l.loc), be.push(D), ht.p(D, l.loc);
|
|
698
|
+
let s = l.name;
|
|
699
|
+
if (s === "font-face") {
|
|
700
|
+
let a = /* @__PURE__ */ Object.create(null);
|
|
701
|
+
t && lt.p(l.loc.start.offset, l.loc), (le = l.block) == null || le.children.forEach((c) => {
|
|
702
|
+
c.type === "Declaration" && (a[c.property] = n(c.value));
|
|
703
|
+
}), ge.push(a), me.push(1);
|
|
732
704
|
break;
|
|
733
705
|
}
|
|
734
|
-
let
|
|
735
|
-
if (
|
|
736
|
-
let
|
|
737
|
-
if (
|
|
738
|
-
|
|
739
|
-
else if (
|
|
740
|
-
|
|
741
|
-
else if (
|
|
742
|
-
let
|
|
743
|
-
|
|
744
|
-
} else if (
|
|
745
|
-
|
|
746
|
-
if (
|
|
747
|
-
let
|
|
748
|
-
return
|
|
706
|
+
let g = 1;
|
|
707
|
+
if (l.prelude !== null) {
|
|
708
|
+
let a = l.prelude, c = a && n(l.prelude), p = a.loc;
|
|
709
|
+
if (s === "media")
|
|
710
|
+
nt.p(c, p), Si(a) && (at.p(c, p), g++);
|
|
711
|
+
else if (s === "supports")
|
|
712
|
+
ye.p(c, p), vi(a) && (ct.p(c, p), g++);
|
|
713
|
+
else if (E("keyframes", s)) {
|
|
714
|
+
let d = "@" + s + " " + c;
|
|
715
|
+
W(s) && (ke.p(d, p), g++), we.p(d, p);
|
|
716
|
+
} else if (s === "import")
|
|
717
|
+
C(l, (d) => {
|
|
718
|
+
if (d.type === "Condition" && d.kind === "supports") {
|
|
719
|
+
let f = n(d);
|
|
720
|
+
return ye.p(f, d.loc), C.break;
|
|
749
721
|
}
|
|
750
|
-
}),
|
|
751
|
-
else if (
|
|
752
|
-
|
|
753
|
-
else if (
|
|
754
|
-
if (
|
|
755
|
-
let
|
|
756
|
-
|
|
722
|
+
}), st.p(c, p);
|
|
723
|
+
else if (s === "charset")
|
|
724
|
+
ut.p(c, p);
|
|
725
|
+
else if (s === "container") {
|
|
726
|
+
if (ft.p(c, p), a.type === "AtrulePrelude" && ((Yt = a.children.first) == null ? void 0 : Yt.type) === "Identifier") {
|
|
727
|
+
let d = a.children.first.name;
|
|
728
|
+
ne.p(d, p);
|
|
757
729
|
}
|
|
758
|
-
} else
|
|
730
|
+
} else s === "property" && pt.p(c, p);
|
|
759
731
|
} else
|
|
760
|
-
|
|
761
|
-
|
|
732
|
+
s === "layer" && (de.p("<anonymous>", l.loc), g++);
|
|
733
|
+
me.push(g);
|
|
762
734
|
break;
|
|
763
735
|
}
|
|
736
|
+
// @ts-expect-error Oudated css-tree types
|
|
764
737
|
case "Layer": {
|
|
765
|
-
|
|
738
|
+
l.name !== null && de.p(l.name, l.loc);
|
|
766
739
|
break;
|
|
767
740
|
}
|
|
741
|
+
// @ts-expect-error Oudated css-tree types
|
|
768
742
|
case "Feature": {
|
|
769
|
-
|
|
743
|
+
ot.p(l.name, l.loc);
|
|
770
744
|
break;
|
|
771
745
|
}
|
|
772
|
-
case
|
|
773
|
-
let
|
|
774
|
-
|
|
746
|
+
case Qe: {
|
|
747
|
+
let s = l.prelude, g = l.block, a = s.children, c = g.children, p = a ? a.size : 0, d = c ? c.size : 0;
|
|
748
|
+
ve.push(p + d), mt.p(p + d, l.loc), Se.push(p), gt.p(p, s.loc), ze.push(d), dt.p(d, g.loc), qe.push(D), yt.p(D, l.loc), xe++, d === 0 && Ce++;
|
|
775
749
|
break;
|
|
776
750
|
}
|
|
777
|
-
case
|
|
778
|
-
let
|
|
779
|
-
if (this.atrule &&
|
|
780
|
-
return
|
|
781
|
-
|
|
782
|
-
let
|
|
783
|
-
if (
|
|
784
|
-
for (let
|
|
785
|
-
|
|
786
|
-
let
|
|
787
|
-
|
|
788
|
-
let c =
|
|
789
|
-
return
|
|
790
|
-
|
|
751
|
+
case yi: {
|
|
752
|
+
let s = n(l);
|
|
753
|
+
if (this.atrule && E("keyframes", this.atrule.name))
|
|
754
|
+
return Ae.p(s, l.loc), this.skip;
|
|
755
|
+
oi(l) && Oe.p(s, l.loc);
|
|
756
|
+
let g = qi(l);
|
|
757
|
+
if (g !== !1)
|
|
758
|
+
for (let v of g)
|
|
759
|
+
zt.p(v, l.loc);
|
|
760
|
+
let a = ui(l);
|
|
761
|
+
zi(l) && Pe.p(s, l.loc), wt.add(s), ae.push(a), vt.p(a, l.loc), Re.push(D - 1), At.p(D - 1, l.loc);
|
|
762
|
+
let c = gi(l).toArray(), [p, d, f] = c;
|
|
763
|
+
return Ct.p(c.toString(), l.loc), kt.push(p), bt.push(d), xt.push(f), j === void 0 && (j = c), B === void 0 && (B = c), B !== void 0 && ri(B, c) < 0 && (B = c), j !== void 0 && ri(j, c) > 0 && (j = c), St.push(c), p > 0 && Le.p(s, l.loc), Ai(l, function(P) {
|
|
764
|
+
qt.p(P.name, P.loc);
|
|
791
765
|
}), this.skip;
|
|
792
766
|
}
|
|
793
|
-
case
|
|
767
|
+
case et: {
|
|
794
768
|
if (!this.declaration)
|
|
795
769
|
break;
|
|
796
|
-
let
|
|
797
|
-
return
|
|
770
|
+
let s = l.unit;
|
|
771
|
+
return E("\\9", s) ? Ke.push(s.substring(0, s.length - 2), this.declaration.property, l.loc) : Ke.push(s, this.declaration.property, l.loc), this.skip;
|
|
798
772
|
}
|
|
799
|
-
case
|
|
800
|
-
if (
|
|
801
|
-
let
|
|
802
|
-
|
|
773
|
+
case Ci: {
|
|
774
|
+
if (Xe("data:", l.value)) {
|
|
775
|
+
let s = l.value, g = s.length, a = Wi(s);
|
|
776
|
+
x.total++, A += g;
|
|
803
777
|
let c = {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
/** @type {number} */
|
|
809
|
-
offset: i.loc.start.offset,
|
|
810
|
-
/** @type {number} */
|
|
811
|
-
length: i.loc.end.offset - i.loc.start.offset
|
|
778
|
+
line: l.loc.start.line,
|
|
779
|
+
column: l.loc.start.column,
|
|
780
|
+
offset: l.loc.start.offset,
|
|
781
|
+
length: l.loc.end.offset - l.loc.start.offset
|
|
812
782
|
};
|
|
813
|
-
if (
|
|
814
|
-
let
|
|
815
|
-
|
|
783
|
+
if (x.unique.has(a)) {
|
|
784
|
+
let p = x.unique.get(a);
|
|
785
|
+
p.count++, p.size += g, x.unique.set(a, p), t && p.uniqueWithLocations.push(c);
|
|
816
786
|
} else {
|
|
817
|
-
let
|
|
787
|
+
let p = {
|
|
818
788
|
count: 1,
|
|
819
|
-
size:
|
|
789
|
+
size: g,
|
|
790
|
+
uniqueWithLocations: t ? [c] : void 0
|
|
820
791
|
};
|
|
821
|
-
|
|
792
|
+
x.unique.set(a, p);
|
|
822
793
|
}
|
|
823
794
|
}
|
|
824
795
|
break;
|
|
825
796
|
}
|
|
826
|
-
case
|
|
827
|
-
|
|
828
|
-
|
|
797
|
+
case wi: {
|
|
798
|
+
let s = l.loc;
|
|
799
|
+
if (pe(l)) {
|
|
800
|
+
Ie.push(1), re.p(n(l), s);
|
|
829
801
|
break;
|
|
830
802
|
}
|
|
831
|
-
let
|
|
832
|
-
|
|
833
|
-
let
|
|
834
|
-
if (
|
|
835
|
-
|
|
803
|
+
let g = this.declaration, { property: a, important: c } = g, p = 1;
|
|
804
|
+
ci(l) && (Rt.p(n(l), s), p++), typeof c == "string" && (Te.p(y(l) + "!" + c, s), p++), Ni(l) && (Te.p(n(l), s), p++);
|
|
805
|
+
let d = l.children;
|
|
806
|
+
if (Ie.push(p), m("margin", a) || m("margin-block", a) || m("margin-inline", a) || m("margin-top", a) || m("margin-right", a) || m("margin-bottom", a) || m("margin-left", a) || m("padding", a) || m("padding-block", a) || m("padding-inline", a) || m("padding-top", a) || m("padding-right", a) || m("padding-bottom", a) || m("padding-left", a))
|
|
807
|
+
Di(l) && It.p(a, g.loc);
|
|
836
808
|
else {
|
|
837
|
-
if (m("z-index",
|
|
838
|
-
return
|
|
839
|
-
if (m("font",
|
|
840
|
-
if (
|
|
841
|
-
let
|
|
842
|
-
|
|
809
|
+
if (m("z-index", a))
|
|
810
|
+
return Dt.p(n(l), s), this.skip;
|
|
811
|
+
if (m("font", a)) {
|
|
812
|
+
if (Ze(l)) return;
|
|
813
|
+
let f = Mi(l, n, function(Qt) {
|
|
814
|
+
Qt.type === "keyword" && re.p(Qt.value, s);
|
|
843
815
|
});
|
|
844
|
-
if (!
|
|
816
|
+
if (!f)
|
|
845
817
|
return this.skip;
|
|
846
|
-
let { font_size:
|
|
847
|
-
|
|
818
|
+
let { font_size: v, line_height: P, font_family: V } = f;
|
|
819
|
+
V && Ue.p(V, s), v && Ve.p(v, s), P && He.p(P, s);
|
|
848
820
|
break;
|
|
849
|
-
} else if (m("font-size",
|
|
850
|
-
|
|
821
|
+
} else if (m("font-size", a)) {
|
|
822
|
+
Ze(l) || Ve.p(n(l), s);
|
|
851
823
|
break;
|
|
852
|
-
} else if (m("font-family",
|
|
853
|
-
|
|
824
|
+
} else if (m("font-family", a)) {
|
|
825
|
+
Ze(l) || Ue.p(n(l), s);
|
|
854
826
|
break;
|
|
855
|
-
} else if (m("line-height",
|
|
856
|
-
|
|
857
|
-
else if (m("transition",
|
|
858
|
-
|
|
859
|
-
|
|
827
|
+
} else if (m("line-height", a))
|
|
828
|
+
He.p(n(l), s);
|
|
829
|
+
else if (m("transition", a) || m("animation", a)) {
|
|
830
|
+
Ui(d, function(f) {
|
|
831
|
+
f.type === "fn" ? ce.p(n(f.value), s) : f.type === "duration" ? fe.p(n(f.value), s) : f.type === "keyword" && re.p(n(f.value), s);
|
|
860
832
|
});
|
|
861
833
|
break;
|
|
862
|
-
} else if (m("animation-duration",
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}) :
|
|
834
|
+
} else if (m("animation-duration", a) || m("transition-duration", a)) {
|
|
835
|
+
d && d.size > 1 ? d.forEach((f) => {
|
|
836
|
+
f.type !== Z && fe.p(n(f), s);
|
|
837
|
+
}) : fe.p(n(l), s);
|
|
866
838
|
break;
|
|
867
|
-
} else if (m("transition-timing-function",
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
}) :
|
|
839
|
+
} else if (m("transition-timing-function", a) || m("animation-timing-function", a)) {
|
|
840
|
+
d && d.size > 1 ? d.forEach((f) => {
|
|
841
|
+
f.type !== Z && ce.p(n(f), s);
|
|
842
|
+
}) : ce.p(n(l), s);
|
|
871
843
|
break;
|
|
872
|
-
} else if (m("container-name",
|
|
873
|
-
|
|
874
|
-
else if (m("container",
|
|
875
|
-
((
|
|
876
|
-
else if (
|
|
877
|
-
|
|
844
|
+
} else if (m("container-name", a))
|
|
845
|
+
ne.p(n(l), s);
|
|
846
|
+
else if (m("container", a))
|
|
847
|
+
((Gt = d.first) == null ? void 0 : Gt.type) === "Identifier" && ne.p(d.first.name, s);
|
|
848
|
+
else if (ji.has(Ki(a))) {
|
|
849
|
+
pe(l) || Mt.push(n(l), a, s);
|
|
878
850
|
break;
|
|
879
|
-
} else m("text-shadow",
|
|
851
|
+
} else m("text-shadow", a) ? pe(l) || Ft.p(n(l), s) : m("box-shadow", a) && (pe(l) || Et.p(n(l), s));
|
|
880
852
|
}
|
|
881
|
-
|
|
882
|
-
let
|
|
883
|
-
switch (
|
|
884
|
-
case
|
|
885
|
-
let
|
|
886
|
-
return
|
|
853
|
+
C(l, function(f) {
|
|
854
|
+
let v = f.name;
|
|
855
|
+
switch (f.type) {
|
|
856
|
+
case xi: {
|
|
857
|
+
let P = f.value.length;
|
|
858
|
+
return E("\\9", f.value) && (P = P - 2), Y.push("#" + f.value, a, s), G.p("hex" + P, s), C.skip;
|
|
887
859
|
}
|
|
888
|
-
case
|
|
889
|
-
|
|
890
|
-
let
|
|
891
|
-
if (
|
|
892
|
-
return
|
|
893
|
-
if (
|
|
894
|
-
let
|
|
895
|
-
|
|
860
|
+
case T: {
|
|
861
|
+
he.has(v) && re.p(v, s);
|
|
862
|
+
let P = v.length;
|
|
863
|
+
if (P > 20 || P < 3)
|
|
864
|
+
return C.skip;
|
|
865
|
+
if (Ri.has(v)) {
|
|
866
|
+
let V = n(f);
|
|
867
|
+
Y.push(V, a, s), G.p(v.toLowerCase(), s);
|
|
896
868
|
return;
|
|
897
869
|
}
|
|
898
|
-
if (
|
|
899
|
-
let
|
|
900
|
-
|
|
870
|
+
if (Pi.has(v)) {
|
|
871
|
+
let V = n(f);
|
|
872
|
+
Y.push(V, a, s), G.p("named", s);
|
|
901
873
|
return;
|
|
902
874
|
}
|
|
903
|
-
if (
|
|
904
|
-
let
|
|
905
|
-
|
|
875
|
+
if (Li.has(v)) {
|
|
876
|
+
let V = n(f);
|
|
877
|
+
Y.push(V, a, s), G.p("system", s);
|
|
906
878
|
return;
|
|
907
879
|
}
|
|
908
|
-
return
|
|
880
|
+
return C.skip;
|
|
909
881
|
}
|
|
910
|
-
case
|
|
911
|
-
if (
|
|
912
|
-
return
|
|
913
|
-
if (
|
|
914
|
-
|
|
882
|
+
case tt: {
|
|
883
|
+
if (q("var", v))
|
|
884
|
+
return C.skip;
|
|
885
|
+
if (Oi.has(v)) {
|
|
886
|
+
Y.push(n(f), a, f.loc), G.p(v.toLowerCase(), f.loc);
|
|
915
887
|
return;
|
|
916
888
|
}
|
|
917
|
-
if (
|
|
918
|
-
_t.p(
|
|
889
|
+
if (E("gradient", v)) {
|
|
890
|
+
_t.p(n(f), f.loc);
|
|
919
891
|
return;
|
|
920
892
|
}
|
|
921
893
|
}
|
|
@@ -923,299 +895,263 @@ function Ei(r, t = {}) {
|
|
|
923
895
|
});
|
|
924
896
|
break;
|
|
925
897
|
}
|
|
926
|
-
case
|
|
898
|
+
case "Declaration": {
|
|
927
899
|
if (this.atrulePrelude !== null)
|
|
928
900
|
return this.skip;
|
|
929
|
-
|
|
930
|
-
let
|
|
931
|
-
|
|
932
|
-
let {
|
|
901
|
+
ee++;
|
|
902
|
+
let s = 1;
|
|
903
|
+
Pt.add(n(l)), Ee.push(D - 1), Ot.p(D - 1, l.loc), l.important === !0 && (oe++, s++, this.atrule && E("keyframes", this.atrule.name) && (De++, s++)), Lt.push(s);
|
|
904
|
+
let {
|
|
905
|
+
property: g,
|
|
906
|
+
// @ts-expect-error TODO: fix this
|
|
907
|
+
loc: { start: a }
|
|
908
|
+
} = l, c = {
|
|
933
909
|
start: {
|
|
934
|
-
line:
|
|
935
|
-
column:
|
|
936
|
-
offset:
|
|
910
|
+
line: a.line,
|
|
911
|
+
column: a.column,
|
|
912
|
+
offset: a.offset
|
|
937
913
|
},
|
|
938
914
|
end: {
|
|
939
|
-
offset:
|
|
915
|
+
offset: a.offset + g.length
|
|
940
916
|
}
|
|
941
917
|
};
|
|
942
|
-
|
|
918
|
+
te.p(g, c), W(g) ? (Me.p(g, c), ie.push(2)) : Hi(g) ? (_e.p(g, c), ie.push(2)) : it(g) ? (ue.p(g, c), ie.push(l.important ? 3 : 2), l.important === !0 && Fe.p(g, c)) : ie.push(1);
|
|
943
919
|
break;
|
|
944
920
|
}
|
|
945
921
|
}
|
|
946
|
-
(
|
|
922
|
+
(l.type === Qe || l.type === Ge) && D++;
|
|
947
923
|
},
|
|
948
|
-
leave(
|
|
949
|
-
(
|
|
924
|
+
leave(l) {
|
|
925
|
+
(l.type === Qe || l.type === Ge) && D--;
|
|
950
926
|
}
|
|
951
927
|
});
|
|
952
|
-
let
|
|
928
|
+
let Tt = Pt.size, Q = ae.size(), We = kt.aggregate(), Ne = bt.aggregate(), je = xt.aggregate(), Ut = wt.size, w = Object.assign, Vt = i.length, Be = ge.length, Ht = me.aggregate(), Kt = ae.aggregate(), Wt = Lt.aggregate(), Nt = ie.aggregate(), jt = Ie.aggregate(), Bt = rt.c();
|
|
953
929
|
return {
|
|
954
930
|
stylesheet: {
|
|
955
|
-
sourceLinesOfCode:
|
|
956
|
-
linesOfCode:
|
|
957
|
-
size:
|
|
958
|
-
complexity:
|
|
931
|
+
sourceLinesOfCode: Bt.total + Q + ee + Ae.size(),
|
|
932
|
+
linesOfCode: fi,
|
|
933
|
+
size: Vt,
|
|
934
|
+
complexity: Ht.sum + Kt.sum + Wt.sum + Nt.sum + jt.sum,
|
|
959
935
|
comments: {
|
|
960
|
-
total:
|
|
961
|
-
size:
|
|
936
|
+
total: k,
|
|
937
|
+
size: b
|
|
962
938
|
},
|
|
963
939
|
embeddedContent: {
|
|
964
940
|
size: {
|
|
965
|
-
total:
|
|
966
|
-
ratio: z(
|
|
941
|
+
total: A,
|
|
942
|
+
ratio: z(A, Vt)
|
|
967
943
|
},
|
|
968
944
|
types: {
|
|
969
|
-
total:
|
|
970
|
-
totalUnique:
|
|
971
|
-
uniquenessRatio: z(
|
|
972
|
-
unique: Object.fromEntries(
|
|
945
|
+
total: x.total,
|
|
946
|
+
totalUnique: x.unique.size,
|
|
947
|
+
uniquenessRatio: z(x.unique.size, x.total),
|
|
948
|
+
unique: Object.fromEntries(x.unique)
|
|
973
949
|
}
|
|
974
950
|
}
|
|
975
951
|
},
|
|
976
|
-
atrules:
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
uniqueWithLocations:
|
|
986
|
-
} : {}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
names: Q.c()
|
|
1017
|
-
}
|
|
1018
|
-
),
|
|
1019
|
-
layer: le.c(),
|
|
1020
|
-
property: it.c(),
|
|
1021
|
-
complexity: Ot,
|
|
1022
|
-
nesting: d(
|
|
1023
|
-
ue.aggregate(),
|
|
1024
|
-
{
|
|
1025
|
-
items: ue.toArray()
|
|
1026
|
-
},
|
|
1027
|
-
rt.c()
|
|
1028
|
-
)
|
|
1029
|
-
}
|
|
1030
|
-
),
|
|
952
|
+
atrules: w(Bt, {
|
|
953
|
+
fontface: w(
|
|
954
|
+
{
|
|
955
|
+
total: Be,
|
|
956
|
+
totalUnique: Be,
|
|
957
|
+
unique: ge,
|
|
958
|
+
uniquenessRatio: Be === 0 ? 0 : 1
|
|
959
|
+
},
|
|
960
|
+
t ? {
|
|
961
|
+
uniqueWithLocations: lt.c().uniqueWithLocations
|
|
962
|
+
} : {}
|
|
963
|
+
),
|
|
964
|
+
import: st.c(),
|
|
965
|
+
media: w(nt.c(), {
|
|
966
|
+
browserhacks: at.c(),
|
|
967
|
+
features: ot.c()
|
|
968
|
+
}),
|
|
969
|
+
charset: ut.c(),
|
|
970
|
+
supports: w(ye.c(), {
|
|
971
|
+
browserhacks: ct.c()
|
|
972
|
+
}),
|
|
973
|
+
keyframes: w(we.c(), {
|
|
974
|
+
prefixed: w(ke.c(), {
|
|
975
|
+
ratio: z(ke.size(), we.size())
|
|
976
|
+
})
|
|
977
|
+
}),
|
|
978
|
+
container: w(ft.c(), {
|
|
979
|
+
names: ne.c()
|
|
980
|
+
}),
|
|
981
|
+
layer: de.c(),
|
|
982
|
+
property: pt.c(),
|
|
983
|
+
complexity: Ht,
|
|
984
|
+
nesting: w(
|
|
985
|
+
be.aggregate(),
|
|
986
|
+
{
|
|
987
|
+
items: be.toArray()
|
|
988
|
+
},
|
|
989
|
+
ht.c()
|
|
990
|
+
)
|
|
991
|
+
}),
|
|
1031
992
|
rules: {
|
|
1032
|
-
total:
|
|
993
|
+
total: xe,
|
|
1033
994
|
empty: {
|
|
1034
|
-
total:
|
|
1035
|
-
ratio: z(
|
|
995
|
+
total: Ce,
|
|
996
|
+
ratio: z(Ce, xe)
|
|
1036
997
|
},
|
|
1037
|
-
sizes:
|
|
1038
|
-
|
|
998
|
+
sizes: w(
|
|
999
|
+
ve.aggregate(),
|
|
1039
1000
|
{
|
|
1040
|
-
items:
|
|
1001
|
+
items: ve.toArray()
|
|
1041
1002
|
},
|
|
1042
|
-
|
|
1003
|
+
mt.c()
|
|
1043
1004
|
),
|
|
1044
|
-
nesting:
|
|
1045
|
-
|
|
1005
|
+
nesting: w(
|
|
1006
|
+
qe.aggregate(),
|
|
1046
1007
|
{
|
|
1047
|
-
items:
|
|
1008
|
+
items: qe.toArray()
|
|
1048
1009
|
},
|
|
1049
|
-
|
|
1010
|
+
yt.c()
|
|
1050
1011
|
),
|
|
1051
|
-
selectors:
|
|
1052
|
-
|
|
1012
|
+
selectors: w(
|
|
1013
|
+
Se.aggregate(),
|
|
1053
1014
|
{
|
|
1054
|
-
items:
|
|
1015
|
+
items: Se.toArray()
|
|
1055
1016
|
},
|
|
1056
|
-
|
|
1017
|
+
gt.c()
|
|
1057
1018
|
),
|
|
1058
|
-
declarations:
|
|
1059
|
-
|
|
1019
|
+
declarations: w(
|
|
1020
|
+
ze.aggregate(),
|
|
1060
1021
|
{
|
|
1061
|
-
items:
|
|
1022
|
+
items: ze.toArray()
|
|
1062
1023
|
},
|
|
1063
|
-
|
|
1024
|
+
dt.c()
|
|
1064
1025
|
)
|
|
1065
1026
|
},
|
|
1066
1027
|
selectors: {
|
|
1067
|
-
total:
|
|
1068
|
-
totalUnique:
|
|
1069
|
-
uniquenessRatio: z(
|
|
1070
|
-
specificity:
|
|
1028
|
+
total: Q,
|
|
1029
|
+
totalUnique: Ut,
|
|
1030
|
+
uniquenessRatio: z(Ut, Q),
|
|
1031
|
+
specificity: w(
|
|
1071
1032
|
{
|
|
1072
1033
|
/** @type Specificity */
|
|
1073
|
-
min:
|
|
1034
|
+
min: B === void 0 ? [0, 0, 0] : B,
|
|
1074
1035
|
/** @type Specificity */
|
|
1075
|
-
max:
|
|
1036
|
+
max: j === void 0 ? [0, 0, 0] : j,
|
|
1076
1037
|
/** @type Specificity */
|
|
1077
|
-
sum: [
|
|
1038
|
+
sum: [We.sum, Ne.sum, je.sum],
|
|
1078
1039
|
/** @type Specificity */
|
|
1079
|
-
mean: [
|
|
1040
|
+
mean: [We.mean, Ne.mean, je.mean],
|
|
1080
1041
|
/** @type Specificity */
|
|
1081
|
-
mode: [
|
|
1042
|
+
mode: [We.mode, Ne.mode, je.mode],
|
|
1082
1043
|
/** @type Specificity */
|
|
1083
|
-
items:
|
|
1044
|
+
items: St
|
|
1084
1045
|
},
|
|
1085
|
-
|
|
1046
|
+
Ct.c()
|
|
1086
1047
|
),
|
|
1087
|
-
complexity:
|
|
1088
|
-
|
|
1089
|
-
|
|
1048
|
+
complexity: w(Kt, vt.c(), {
|
|
1049
|
+
items: ae.toArray()
|
|
1050
|
+
}),
|
|
1051
|
+
nesting: w(
|
|
1052
|
+
Re.aggregate(),
|
|
1090
1053
|
{
|
|
1091
|
-
items:
|
|
1092
|
-
}
|
|
1093
|
-
),
|
|
1094
|
-
nesting: d(
|
|
1095
|
-
be.aggregate(),
|
|
1096
|
-
{
|
|
1097
|
-
items: be.toArray()
|
|
1054
|
+
items: Re.toArray()
|
|
1098
1055
|
},
|
|
1099
|
-
|
|
1100
|
-
),
|
|
1101
|
-
id: d(
|
|
1102
|
-
we.c(),
|
|
1103
|
-
{
|
|
1104
|
-
ratio: z(we.size(), H)
|
|
1105
|
-
}
|
|
1106
|
-
),
|
|
1107
|
-
pseudoClasses: gt.c(),
|
|
1108
|
-
accessibility: d(
|
|
1109
|
-
ke.c(),
|
|
1110
|
-
{
|
|
1111
|
-
ratio: z(ke.size(), H)
|
|
1112
|
-
}
|
|
1056
|
+
At.c()
|
|
1113
1057
|
),
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
),
|
|
1121
|
-
|
|
1058
|
+
id: w(Le.c(), {
|
|
1059
|
+
ratio: z(Le.size(), Q)
|
|
1060
|
+
}),
|
|
1061
|
+
pseudoClasses: zt.c(),
|
|
1062
|
+
accessibility: w(Oe.c(), {
|
|
1063
|
+
ratio: z(Oe.size(), Q)
|
|
1064
|
+
}),
|
|
1065
|
+
keyframes: Ae.c(),
|
|
1066
|
+
prefixed: w(Pe.c(), {
|
|
1067
|
+
ratio: z(Pe.size(), Q)
|
|
1068
|
+
}),
|
|
1069
|
+
combinators: qt.c()
|
|
1122
1070
|
},
|
|
1123
1071
|
declarations: {
|
|
1124
|
-
total:
|
|
1125
|
-
totalUnique:
|
|
1126
|
-
uniquenessRatio: z(
|
|
1072
|
+
total: ee,
|
|
1073
|
+
totalUnique: Tt,
|
|
1074
|
+
uniquenessRatio: z(Tt, ee),
|
|
1127
1075
|
importants: {
|
|
1128
|
-
total:
|
|
1129
|
-
ratio: z(
|
|
1076
|
+
total: oe,
|
|
1077
|
+
ratio: z(oe, ee),
|
|
1130
1078
|
inKeyframes: {
|
|
1131
|
-
total:
|
|
1132
|
-
ratio: z(
|
|
1079
|
+
total: De,
|
|
1080
|
+
ratio: z(De, oe)
|
|
1133
1081
|
}
|
|
1134
1082
|
},
|
|
1135
|
-
complexity:
|
|
1136
|
-
nesting:
|
|
1137
|
-
|
|
1083
|
+
complexity: Wt,
|
|
1084
|
+
nesting: w(
|
|
1085
|
+
Ee.aggregate(),
|
|
1138
1086
|
{
|
|
1139
|
-
items:
|
|
1087
|
+
items: Ee.toArray()
|
|
1140
1088
|
},
|
|
1141
|
-
|
|
1089
|
+
Ot.c()
|
|
1142
1090
|
)
|
|
1143
1091
|
},
|
|
1144
|
-
properties:
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
)
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
{
|
|
1160
|
-
ratio: z(Ce.size(), X.size())
|
|
1161
|
-
}
|
|
1162
|
-
)
|
|
1163
|
-
}
|
|
1164
|
-
),
|
|
1165
|
-
browserhacks: d(
|
|
1166
|
-
Se.c(),
|
|
1167
|
-
{
|
|
1168
|
-
ratio: z(Se.size(), N.size())
|
|
1169
|
-
}
|
|
1170
|
-
),
|
|
1171
|
-
complexity: Ft
|
|
1172
|
-
}
|
|
1173
|
-
),
|
|
1092
|
+
properties: w(te.c(), {
|
|
1093
|
+
prefixed: w(Me.c(), {
|
|
1094
|
+
ratio: z(Me.size(), te.size())
|
|
1095
|
+
}),
|
|
1096
|
+
custom: w(ue.c(), {
|
|
1097
|
+
ratio: z(ue.size(), te.size()),
|
|
1098
|
+
importants: w(Fe.c(), {
|
|
1099
|
+
ratio: z(Fe.size(), ue.size())
|
|
1100
|
+
})
|
|
1101
|
+
}),
|
|
1102
|
+
browserhacks: w(_e.c(), {
|
|
1103
|
+
ratio: z(_e.size(), te.size())
|
|
1104
|
+
}),
|
|
1105
|
+
complexity: Nt
|
|
1106
|
+
}),
|
|
1174
1107
|
values: {
|
|
1175
|
-
colors:
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
formats: V.c()
|
|
1179
|
-
}
|
|
1180
|
-
),
|
|
1108
|
+
colors: w(Y.count(), {
|
|
1109
|
+
formats: G.c()
|
|
1110
|
+
}),
|
|
1181
1111
|
gradients: _t.c(),
|
|
1182
|
-
fontFamilies:
|
|
1183
|
-
fontSizes:
|
|
1184
|
-
lineHeights:
|
|
1185
|
-
zindexes:
|
|
1186
|
-
textShadows:
|
|
1187
|
-
boxShadows:
|
|
1188
|
-
borderRadiuses:
|
|
1112
|
+
fontFamilies: Ue.c(),
|
|
1113
|
+
fontSizes: Ve.c(),
|
|
1114
|
+
lineHeights: He.c(),
|
|
1115
|
+
zindexes: Dt.c(),
|
|
1116
|
+
textShadows: Ft.c(),
|
|
1117
|
+
boxShadows: Et.c(),
|
|
1118
|
+
borderRadiuses: Mt.count(),
|
|
1189
1119
|
animations: {
|
|
1190
|
-
durations:
|
|
1191
|
-
timingFunctions:
|
|
1120
|
+
durations: fe.c(),
|
|
1121
|
+
timingFunctions: ce.c()
|
|
1192
1122
|
},
|
|
1193
|
-
prefixes:
|
|
1194
|
-
browserhacks:
|
|
1195
|
-
units:
|
|
1196
|
-
complexity:
|
|
1197
|
-
keywords:
|
|
1198
|
-
resets:
|
|
1123
|
+
prefixes: Rt.c(),
|
|
1124
|
+
browserhacks: Te.c(),
|
|
1125
|
+
units: Ke.count(),
|
|
1126
|
+
complexity: jt,
|
|
1127
|
+
keywords: re.c(),
|
|
1128
|
+
resets: It.c()
|
|
1199
1129
|
},
|
|
1200
1130
|
__meta__: {
|
|
1201
|
-
parseTime:
|
|
1202
|
-
analyzeTime: Date.now() -
|
|
1203
|
-
total: Date.now() -
|
|
1131
|
+
parseTime: N - R,
|
|
1132
|
+
analyzeTime: Date.now() - N,
|
|
1133
|
+
total: Date.now() - o
|
|
1204
1134
|
}
|
|
1205
1135
|
};
|
|
1206
1136
|
}
|
|
1207
|
-
function
|
|
1208
|
-
return
|
|
1137
|
+
function ri(i, e) {
|
|
1138
|
+
return i[0] === e[0] ? i[1] === e[1] ? e[2] - i[2] : e[1] - i[1] : e[0] - i[0];
|
|
1209
1139
|
}
|
|
1210
1140
|
export {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
oi as
|
|
1219
|
-
|
|
1220
|
-
|
|
1141
|
+
O as KeywordSet,
|
|
1142
|
+
Ji as analyze,
|
|
1143
|
+
Oi as colorFunctions,
|
|
1144
|
+
Ri as colorKeywords,
|
|
1145
|
+
ri as compareSpecificity,
|
|
1146
|
+
he as cssKeywords,
|
|
1147
|
+
W as hasVendorPrefix,
|
|
1148
|
+
oi as isAccessibilitySelector,
|
|
1149
|
+
Si as isMediaBrowserhack,
|
|
1150
|
+
Hi as isPropertyHack,
|
|
1151
|
+
zi as isSelectorPrefixed,
|
|
1152
|
+
vi as isSupportsBrowserhack,
|
|
1153
|
+
ci as isValuePrefixed,
|
|
1154
|
+
Pi as namedColors,
|
|
1155
|
+
ui as selectorComplexity,
|
|
1156
|
+
Li as systemColors
|
|
1221
1157
|
};
|