@projectwallace/css-analyzer 8.0.2 → 9.1.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.
@@ -1,133 +1,160 @@
1
- var ar = Object.defineProperty;
2
- var pi = (r) => {
1
+ var Cr = Object.defineProperty;
2
+ var Ai = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var hr = (r, e, t) => e in r ? ar(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var g = (r, e, t) => hr(r, typeof e != "symbol" ? e + "" : e, t), di = (r, e, t) => e.has(r) || pi("Cannot " + t);
7
- var w = (r, e, t) => (di(r, e, "read from private field"), t ? t.call(r) : e.get(r)), G = (r, e, t) => e.has(r) ? pi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), M = (r, e, t, s) => (di(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
- var Vt = (r, e, t, s) => ({
5
+ var br = (r, e, t) => e in r ? Cr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var m = (r, e, t) => br(r, typeof e != "symbol" ? e + "" : e, t), Ei = (r, e, t) => e.has(r) || Ai("Cannot " + t);
7
+ var w = (r, e, t) => (Ei(r, e, "read from private field"), t ? t.call(r) : e.get(r)), Y = (r, e, t) => e.has(r) ? Ai("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), q = (r, e, t, s) => (Ei(r, e, "write to private field"), s ? s.call(r, t) : e.set(r, t), t);
8
+ var Xt = (r, e, t, s) => ({
9
9
  set _(i) {
10
- M(r, e, i, t);
10
+ q(r, e, i, t);
11
11
  },
12
12
  get _() {
13
13
  return w(r, e, s);
14
14
  }
15
15
  });
16
- import { walk as B, SUPPORTS_QUERY as Hi, BREAK as Q, MEDIA_TYPE as cr, MEDIA_FEATURE as Ii, str_equals as P, DIMENSION as ft, NUMBER as _s, IDENTIFIER as he, SELECTOR as ce, NTH_SELECTOR as _r, PSEUDO_ELEMENT_SELECTOR as us, TYPE_SELECTOR as fs, PSEUDO_CLASS_SELECTOR as Oe, ATTRIBUTE_SELECTOR as ps, SKIP as I, COMBINATOR as is, SELECTOR_LIST as ds, NTH_OF_SELECTOR as ur, CLASS_SELECTOR as fr, ID_SELECTOR as pr, FUNCTION as gs, OPERATOR as Ee, is_custom as xs, is_vendor_prefixed as ms, parse as dr, AT_RULE as gr, BLOCK as xr, DECLARATION as jt, LAYER_NAME as mr, CONTAINER_QUERY as kr, STYLE_RULE as wr, HASH as yr, URL as Ar, str_starts_with as Er } from "@projectwallace/css-parser";
17
- function Cr(r) {
18
- let e = !1;
19
- return B(r, function(t) {
20
- if (t.type === Hi) {
16
+ import { walk as z, SUPPORTS_QUERY as Ki, BREAK as Q, MEDIA_TYPE as Rr, MEDIA_FEATURE as $i, str_equals as ge, DIMENSION as mt, NUMBER as gs, IDENTIFIER as _e, SELECTOR as me, NTH_SELECTOR as vr, PSEUDO_ELEMENT_SELECTOR as Qe, TYPE_SELECTOR as xs, PSEUDO_CLASS_SELECTOR as Le, ATTRIBUTE_SELECTOR as kt, SKIP as P, str_starts_with as Bi, COMBINATOR as ns, SELECTOR_LIST as ms, NTH_OF_SELECTOR as Tr, CLASS_SELECTOR as Sr, ID_SELECTOR as Or, FUNCTION as ks, OPERATOR as Re, is_custom as ws, is_vendor_prefixed as As, parse as Nr, AT_RULE as Lr, BLOCK as Ur, DECLARATION as Zt, LAYER_NAME as Ir, CONTAINER_QUERY as Hr, STYLE_RULE as Pr, HASH as Dr, URL as Fr } from "@projectwallace/css-parser";
17
+ function Mr(r, e) {
18
+ z(r, function(t) {
19
+ if (t.type === Ki) {
21
20
  const i = (t.prelude || t.value || "").toString().toLowerCase().replaceAll(/\s+/g, "");
22
- if (i.includes("-webkit-appearance:none") || i.includes("-moz-appearance:meterbar"))
23
- return e = !0, Q;
21
+ if (i.includes("-webkit-appearance:none"))
22
+ return e("-webkit-appearance: none"), Q;
23
+ if (i.includes("-moz-appearance:meterbar"))
24
+ return e("-moz-appearance: meterbar"), Q;
24
25
  }
25
- }), e;
26
+ });
26
27
  }
27
- function br(r) {
28
- let e = !1;
29
- return B(r, function(t) {
30
- if (t.type === cr) {
28
+ function zr(r, e) {
29
+ z(r, function(t) {
30
+ if (t.type === Rr) {
31
31
  const s = t.text || "";
32
- if (s.startsWith("\\0") || s.includes("\\9"))
33
- return e = !0, Q;
32
+ if (s.startsWith("\\0"))
33
+ return e("\\0"), Q;
34
+ if (s.includes("\\9"))
35
+ return e("\\9"), Q;
34
36
  }
35
- if (t.type === Ii) {
37
+ if (t.type === $i) {
36
38
  const s = t.name || "";
37
- if (P("-moz-images-in-menus", s) || P("min--moz-device-pixel-ratio", s) || P("-ms-high-contrast", s))
38
- return e = !0, Q;
39
- if (P("min-resolution", s) && t.has_children) {
39
+ if (ge("-moz-images-in-menus", s))
40
+ return e("-moz-images-in-menus"), Q;
41
+ if (ge("min--moz-device-pixel-ratio", s))
42
+ return e("min--moz-device-pixel-ratio"), Q;
43
+ if (ge("-ms-high-contrast", s))
44
+ return e("-ms-high-contrast"), Q;
45
+ if (ge("min-resolution", s) && t.has_children) {
40
46
  for (const i of t)
41
- if (i.type === ft && i.value === 1e-3 && P("dpcm", i.unit || ""))
42
- return e = !0, Q;
47
+ if (i.type === mt && i.value === 1e-3 && ge("dpcm", i.unit || ""))
48
+ return e("min-resolution: .001dpcm"), Q;
43
49
  }
44
- if (P("-webkit-min-device-pixel-ratio", s) && t.has_children) {
50
+ if (ge("-webkit-min-device-pixel-ratio", s) && t.has_children) {
45
51
  for (const i of t)
46
- if (i.type === _s && (i.value === 0 || i.value === 1e4))
47
- return e = !0, Q;
52
+ if (i.type === gs && (i.value === 0 || i.value === 1e4))
53
+ return e("-webkit-min-device-pixel-ratio"), Q;
48
54
  }
49
55
  if (t.has_children) {
50
56
  for (const i of t)
51
- if (i.type === he && i.text === "\\0")
52
- return e = !0, Q;
57
+ if (i.type === _e && i.text === "\\0")
58
+ return e("\\0"), Q;
53
59
  }
54
60
  }
55
- }), e;
61
+ });
56
62
  }
57
- class $ {
63
+ class W {
58
64
  constructor(e) {
59
- g(this, "set");
65
+ m(this, "set");
60
66
  this.set = new Set(e);
61
67
  }
62
68
  has(e) {
63
69
  return this.set.has(e.toLowerCase());
64
70
  }
65
71
  }
66
- const Pi = new $(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
67
- function Rr(r) {
68
- let e = !1;
69
- return B(r, function(t) {
70
- if ((t.type === us || t.type === Oe || t.type === fs) && t.is_vendor_prefixed)
71
- return e = !0, Q;
72
- }), e;
72
+ function Gi(r) {
73
+ return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
73
74
  }
74
- function Di(r) {
75
- let e = !1;
76
- return B(r, function(t) {
77
- if (t.type === ps) {
78
- const s = t.name || "";
79
- if (s === "role" || s.startsWith("aria-"))
80
- return e = !0, Q;
81
- } else if (t.type === Oe && Pi.has(t.name || "") && t.has_children) {
82
- for (const s of t)
83
- if (s.type === ce && Di(s))
84
- return e = !0, Q;
75
+ function qr(r, e) {
76
+ return e >= 65 && e <= 90 && (e = e | 32), r === e;
77
+ }
78
+ function ls(r, e) {
79
+ if (r === e) return !0;
80
+ let t = e.length, s = t - r.length;
81
+ if (s < 0)
82
+ return !1;
83
+ for (let i = t - 1; i >= s; i--)
84
+ if (qr(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
85
+ return !1;
86
+ return !0;
87
+ }
88
+ const Kr = new W(["nth-child", "where", "not", "is", "has", "nth-last-child", "matches", "-webkit-any", "-moz-any"]);
89
+ function $r(r, e) {
90
+ z(r, function(t) {
91
+ if ((t.type === Qe || t.type === Le || t.type === xs) && t.is_vendor_prefixed) {
92
+ let s = "";
93
+ t.type === Le ? s = ":" : t.type === Qe && (s = "::"), e(s + (t.name || t.text));
85
94
  }
86
- }), e;
95
+ });
87
96
  }
88
- function vr(r) {
89
- let e = [];
90
- return B(r, function(t) {
91
- t.type === Oe && e.push(t.name);
92
- }), e.length === 0 ? !1 : e;
97
+ function Br(r, e) {
98
+ function t(s) {
99
+ var n, l;
100
+ let i = s.clone();
101
+ return i.value ? "[" + ((n = i.name) == null ? void 0 : n.toLowerCase()) + i.attr_operator + '"' + Gi(i.value.toString()) + '"]' : "[" + ((l = i.name) == null ? void 0 : l.toLowerCase()) + "]";
102
+ }
103
+ z(r, function(s) {
104
+ if (s.type === kt) {
105
+ const i = s.name || "";
106
+ (ge("role", i) || Bi(i, "aria-")) && e(t(s));
107
+ }
108
+ });
109
+ }
110
+ function Gr(r, e) {
111
+ z(r, function(t) {
112
+ t.type === Le && t.name && e(t.name);
113
+ });
114
+ }
115
+ function Wr(r, e) {
116
+ z(r, function(t) {
117
+ t.type === Qe && t.name && e(t.name);
118
+ });
93
119
  }
94
- function rs(r) {
120
+ function os(r) {
95
121
  let e = 0;
96
122
  function t(s, i) {
97
- B(s, function(n) {
98
- n.type === ce && i.push(rs(n));
123
+ z(s, function(n) {
124
+ n.type === me && i.push(os(n));
99
125
  });
100
126
  }
101
- return B(r, function(s) {
127
+ return z(r, function(s) {
102
128
  const i = s.type;
103
- if (i !== ce) {
104
- if (i === _r) {
129
+ if (i !== me) {
130
+ if (i === vr) {
105
131
  s.text && s.text.trim() && e++;
106
132
  return;
107
133
  }
108
- if (e++, (i === us || i === fs || i === Oe) && s.is_vendor_prefixed && e++, i === ps)
109
- return s.value && e++, I;
110
- if (i === Oe) {
134
+ if (e++, (i === Qe || i === xs || i === Le) && s.is_vendor_prefixed && e++, i === kt)
135
+ return s.value && e++, P;
136
+ if (i === Le) {
111
137
  const n = s.name || "";
112
- if (Pi.has(n.toLowerCase())) {
138
+ if (Kr.has(n.toLowerCase())) {
113
139
  const l = [];
114
140
  if (s.has_children)
115
- for (const o of s)
116
- o.type === ce ? l.push(rs(o)) : t(o, l);
141
+ for (const a of s)
142
+ a.type === me ? l.push(os(a)) : t(a, l);
117
143
  if (l.length > 0) {
118
- for (const o of l)
119
- e += o;
120
- return I;
144
+ for (const a of l)
145
+ e += a;
146
+ return P;
121
147
  }
122
148
  }
123
149
  }
124
150
  }
125
151
  }), e;
126
152
  }
127
- function Tr(r, e) {
128
- B(r, function(t) {
129
- t.type === is && e({
130
- name: t.name.trim() === "" ? " " : t.name,
153
+ function Yr(r, e) {
154
+ z(r, function(t) {
155
+ var s;
156
+ t.type === ns && e({
157
+ name: ((s = t.name) == null ? void 0 : s.trim()) === "" ? " " : t.name,
131
158
  loc: {
132
159
  offset: t.start,
133
160
  line: t.line,
@@ -137,221 +164,221 @@ function Tr(r, e) {
137
164
  });
138
165
  });
139
166
  }
140
- let ks = 1, q = 2, pt = 4, Ce = 8, ge = 16, A = new Uint8Array(128);
167
+ let Es = 1, $ = 2, wt = 4, ve = 8, ke = 16, y = new Uint8Array(128);
141
168
  for (let r = 48; r <= 57; r++)
142
- A[r] = q;
169
+ y[r] = $;
143
170
  for (let r = 48; r <= 57; r++)
144
- A[r] |= pt;
171
+ y[r] |= wt;
145
172
  for (let r = 65; r <= 70; r++)
146
- A[r] = pt;
173
+ y[r] = wt;
147
174
  for (let r = 97; r <= 102; r++)
148
- A[r] = pt;
175
+ y[r] = wt;
149
176
  for (let r = 65; r <= 90; r++)
150
- A[r] |= ks;
177
+ y[r] |= Es;
151
178
  for (let r = 97; r <= 122; r++)
152
- A[r] |= ks;
153
- A[32] = Ce;
154
- A[9] = Ce;
155
- A[10] = ge;
156
- A[13] = ge;
157
- A[12] = ge;
158
- function Or(r) {
159
- return r < 128 && (A[r] & q) !== 0;
179
+ y[r] |= Es;
180
+ y[32] = ve;
181
+ y[9] = ve;
182
+ y[10] = ke;
183
+ y[13] = ke;
184
+ y[12] = ke;
185
+ function Qr(r) {
186
+ return r < 128 && (y[r] & $) !== 0;
160
187
  }
161
- function et(r) {
162
- return r < 128 && (A[r] & pt) !== 0;
188
+ function pe(r) {
189
+ return r < 128 && (y[r] & wt) !== 0;
163
190
  }
164
- function Sr(r) {
165
- return r < 128 && (A[r] & ks) !== 0;
191
+ function Vr(r) {
192
+ return r < 128 && (y[r] & Es) !== 0;
166
193
  }
167
- function gi(r) {
168
- return r < 128 && (A[r] & Ce) !== 0;
194
+ function yi(r) {
195
+ return r < 128 && (y[r] & ve) !== 0;
169
196
  }
170
- function ie(r) {
171
- return r < 128 && (A[r] & ge) !== 0;
197
+ function ne(r) {
198
+ return r < 128 && (y[r] & ke) !== 0;
172
199
  }
173
- function Me(r) {
174
- return r >= 128 || r === 95 ? !0 : Sr(r);
200
+ function Ke(r) {
201
+ return r >= 128 || r === 95 ? !0 : Vr(r);
175
202
  }
176
- function tt(r) {
177
- return r === 45 ? !0 : Me(r) || Or(r);
203
+ function ot(r) {
204
+ return r === 45 ? !0 : Ke(r) || Qr(r);
178
205
  }
179
- const le = 1, rt = 2, Nr = 3, Fi = 4, Mi = 5, xi = 6, de = 9, nt = 10, qi = 11, zi = 12, ns = 13, Ur = 14, Lr = 15, Ki = 16, Hr = 17, qe = 18, ls = 19, Bi = 20, $i = 21, Gi = 22, Ir = 23, Pr = 24, os = 26, Dr = 123, Fr = 125, Mr = 58, qr = 59, zr = 44, Kr = 91, Br = 93, mi = 40, $r = 41, ki = 47, wi = 42, Gr = 34, Yr = 39, Xt = 46, Wr = 60, Qr = 33, K = 45, Vr = 62, jr = 64, Xr = 35, Zt = 92, st = 43, Zr = 37, Jr = 101, en = 69, yi = 13, Ai = 10;
180
- class Yi {
206
+ const ae = 1, ht = 2, jr = 3, Wi = 4, Yi = 5, Ci = 6, xe = 9, ct = 10, Qi = 11, Vi = 12, as = 13, Xr = 14, Zr = 15, ji = 16, Jr = 17, $e = 18, hs = 19, Xi = 20, Zi = 21, Ji = 22, en = 23, tn = 24, cs = 26, bi = 27, sn = 123, rn = 125, nn = 58, ln = 59, on = 44, an = 91, hn = 93, Ri = 40, cn = 41, vi = 47, Ti = 42, _n = 34, un = 39, Jt = 46, fn = 60, pn = 33, K = 45, dn = 62, gn = 64, xn = 35, es = 92, Me = 43, mn = 37, kn = 101, wn = 69, An = 117, En = 85, yn = 63, Si = 13, Oi = 10;
207
+ class er {
181
208
  constructor(e, t) {
182
- g(this, "source");
183
- g(this, "pos");
184
- g(this, "line");
185
- g(this, "column");
186
- g(this, "on_comment");
209
+ m(this, "source");
210
+ m(this, "pos");
211
+ m(this, "line");
212
+ m(this, "column");
213
+ m(this, "on_comment");
187
214
  // Current token properties (avoiding object allocation)
188
- g(this, "token_type");
189
- g(this, "token_start");
190
- g(this, "token_end");
191
- g(this, "token_line");
192
- g(this, "token_column");
193
- this.source = e, this.pos = 0, this.line = 1, this.column = 1, this.on_comment = t, this.token_type = os, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
215
+ m(this, "token_type");
216
+ m(this, "token_start");
217
+ m(this, "token_end");
218
+ m(this, "token_line");
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 = cs, this.token_start = 0, this.token_end = 0, this.token_line = 1, this.token_column = 1;
194
221
  }
195
222
  // Fast token advancing without object allocation (for internal parser use)
196
223
  next_token_fast(e = !1) {
197
224
  if (e)
198
225
  for (; this.pos < this.source.length; ) {
199
226
  let l = this.source.charCodeAt(this.pos);
200
- if (l >= 128 || (A[l] & (Ce | ge)) === 0) break;
227
+ if (l >= 128 || (y[l] & (ve | ke)) === 0) break;
201
228
  this.advance();
202
229
  }
203
230
  if (this.pos >= this.source.length)
204
- return this.make_token(os, this.pos, this.pos);
231
+ return this.make_token(cs, this.pos, this.pos);
205
232
  let t = this.source.charCodeAt(this.pos), s = this.pos, i = this.line, n = this.column;
206
233
  switch (t) {
207
- case Dr:
208
- return this.advance(), this.make_token(Ir, s, this.pos, i, n);
209
- case Fr:
210
- return this.advance(), this.make_token(Pr, s, this.pos, i, n);
211
- case Mr:
212
- return this.advance(), this.make_token(Ki, s, this.pos, i, n);
213
- case qr:
214
- return this.advance(), this.make_token(Hr, s, this.pos, i, n);
215
- case zr:
216
- return this.advance(), this.make_token(qe, s, this.pos, i, n);
217
- case Kr:
218
- return this.advance(), this.make_token(ls, s, this.pos, i, n);
219
- case Br:
220
- return this.advance(), this.make_token(Bi, s, this.pos, i, n);
221
- case mi:
222
- return this.advance(), this.make_token($i, s, this.pos, i, n);
223
- case $r:
224
- return this.advance(), this.make_token(Gi, s, this.pos, i, n);
225
- }
226
- if (t < 128 && (A[t] & (Ce | ge)) !== 0)
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
+ case nn:
239
+ return this.advance(), this.make_token(ji, s, this.pos, i, n);
240
+ case ln:
241
+ return this.advance(), this.make_token(Jr, s, this.pos, i, n);
242
+ case on:
243
+ return this.advance(), this.make_token($e, s, this.pos, i, n);
244
+ case an:
245
+ return this.advance(), this.make_token(hs, s, this.pos, i, n);
246
+ case hn:
247
+ return this.advance(), this.make_token(Xi, s, this.pos, i, n);
248
+ case Ri:
249
+ return this.advance(), this.make_token(Zi, s, this.pos, i, n);
250
+ case cn:
251
+ return this.advance(), this.make_token(Ji, s, this.pos, i, n);
252
+ }
253
+ if (t < 128 && (y[t] & (ve | ke)) !== 0)
227
254
  return this.consume_whitespace(i, n);
228
- if (t === ki && this.peek() === wi) {
229
- let l = s, o = i, h = n;
255
+ if (t === vi && this.peek() === Ti) {
256
+ let l = s, a = i, h = n;
230
257
  for (this.advance(2); this.pos < this.source.length - 1; ) {
231
- if (this.source.charCodeAt(this.pos) === wi && this.peek() === ki) {
258
+ if (this.source.charCodeAt(this.pos) === Ti && this.peek() === vi) {
232
259
  this.advance(2);
233
260
  break;
234
261
  }
235
262
  this.advance();
236
263
  }
237
- let c = this.pos;
264
+ let o = this.pos;
238
265
  return this.on_comment && this.on_comment({
239
266
  start: l,
240
- end: c,
241
- length: c - l,
242
- line: o,
267
+ end: o,
268
+ length: o - l,
269
+ line: a,
243
270
  column: h
244
271
  }), this.next_token_fast(e);
245
272
  }
246
- if (t === Gr || t === Yr)
273
+ if (t === _n || t === un)
247
274
  return this.consume_string(t, i, n);
248
- if (t < 128 && (A[t] & q) !== 0)
275
+ if (t < 128 && (y[t] & $) !== 0)
249
276
  return this.consume_number(i, n);
250
- if (t === Xt) {
277
+ if (t === Jt) {
251
278
  let l = this.peek();
252
- if (l < 128 && (A[l] & q) !== 0)
279
+ if (l < 128 && (y[l] & $) !== 0)
253
280
  return this.consume_number(i, n);
254
281
  }
255
- if (t === Wr && this.pos + 3 < this.source.length && this.peek() === Qr && this.peek(2) === K && this.peek(3) === K)
256
- return this.advance(4), this.make_token(Ur, s, this.pos, i, n);
257
- if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) === Vr)
258
- return this.advance(3), this.make_token(Lr, s, this.pos, i, n);
259
- if (t === jr)
282
+ if (t === fn && this.pos + 3 < this.source.length && this.peek() === pn && this.peek(2) === K && this.peek(3) === K)
283
+ return this.advance(4), this.make_token(Xr, s, this.pos, i, n);
284
+ if (t === K && this.pos + 2 < this.source.length && this.peek() === K && this.peek(2) === dn)
285
+ return this.advance(3), this.make_token(Zr, s, this.pos, i, n);
286
+ if (t === gn)
260
287
  return this.consume_at_keyword(i, n);
261
- if (t === Xr)
288
+ if (t === xn)
262
289
  return this.consume_hash(i, n);
263
- if (Me(t))
290
+ if (Ke(t))
264
291
  return this.consume_ident_or_function(i, n);
265
292
  if (t === K) {
266
293
  let l = this.peek();
267
- if (Me(l) || l === K)
294
+ if (Ke(l) || l === K)
268
295
  return this.consume_ident_or_function(i, n);
269
296
  }
270
- if (t === Zt) {
297
+ if (t === es) {
271
298
  let l = this.peek();
272
- if (l !== 0 && !ie(l))
299
+ if (l !== 0 && !ne(l))
273
300
  return this.consume_ident_or_function(i, n);
274
301
  }
275
- if (t === K || t === st) {
302
+ if (t === K || t === Me) {
276
303
  let l = this.peek();
277
- if (l < 128 && (A[l] & q) !== 0)
304
+ if (l < 128 && (y[l] & $) !== 0)
278
305
  return this.consume_number(i, n);
279
- if (l === Xt) {
306
+ if (l === Jt) {
280
307
  let h = this.peek(2);
281
- if (h < 128 && (A[h] & q) !== 0)
308
+ if (h < 128 && (y[h] & $) !== 0)
282
309
  return this.consume_number(i, n);
283
310
  }
284
311
  }
285
- return this.advance(), this.make_token(de, s, this.pos, i, n);
312
+ return this.advance(), this.make_token(xe, s, this.pos, i, n);
286
313
  }
287
314
  consume_whitespace(e, t) {
288
315
  let s = this.pos;
289
316
  for (; this.pos < this.source.length; ) {
290
317
  let i = this.source.charCodeAt(this.pos);
291
- if (i >= 128 || (A[i] & (Ce | ge)) === 0) break;
318
+ if (i >= 128 || (y[i] & (ve | ke)) === 0) break;
292
319
  this.advance();
293
320
  }
294
- return this.make_token(ns, s, this.pos, e, t);
321
+ return this.make_token(as, s, this.pos, e, t);
295
322
  }
296
323
  consume_string(e, t, s) {
297
324
  let i = this.pos;
298
325
  for (this.advance(); this.pos < this.source.length; ) {
299
326
  let n = this.source.charCodeAt(this.pos);
300
327
  if (n === e)
301
- return this.advance(), this.make_token(Mi, i, this.pos, t, s);
302
- if (ie(n))
303
- return this.make_token(xi, i, this.pos, t, s);
304
- if (n === Zt) {
328
+ return this.advance(), this.make_token(Yi, i, this.pos, t, s);
329
+ if (ne(n))
330
+ return this.make_token(Ci, i, this.pos, t, s);
331
+ if (n === es) {
305
332
  if (this.advance(), this.pos < this.source.length) {
306
333
  let l = this.source.charCodeAt(this.pos);
307
- et(l) ? this.consume_hex_escape() : ie(l) ? this.advance() : this.advance();
334
+ pe(l) ? this.consume_hex_escape() : ne(l) ? this.advance() : this.advance();
308
335
  }
309
336
  continue;
310
337
  }
311
338
  this.advance();
312
339
  }
313
- return this.make_token(xi, i, this.pos, t, s);
340
+ return this.make_token(Ci, i, this.pos, t, s);
314
341
  }
315
342
  consume_hex_escape() {
316
343
  let e = 0;
317
344
  for (; e < 6 && this.pos < this.source.length; ) {
318
345
  let t = this.source.charCodeAt(this.pos);
319
- if (!et(t)) break;
346
+ if (!pe(t)) break;
320
347
  this.advance(), e++;
321
348
  }
322
349
  if (this.pos < this.source.length) {
323
350
  let t = this.source.charCodeAt(this.pos);
324
- (gi(t) || ie(t)) && this.advance();
351
+ (yi(t) || ne(t)) && this.advance();
325
352
  }
326
353
  }
327
354
  consume_number(e, t) {
328
355
  let s = this.pos, i = this.source.charCodeAt(this.pos);
329
- for ((i === st || i === K) && this.advance(); this.pos < this.source.length; ) {
356
+ for ((i === Me || i === K) && this.advance(); this.pos < this.source.length; ) {
330
357
  let n = this.source.charCodeAt(this.pos);
331
- if (n >= 128 || (A[n] & q) === 0) break;
358
+ if (n >= 128 || (y[n] & $) === 0) break;
332
359
  this.advance();
333
360
  }
334
- if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === Xt && this.pos + 1 < this.source.length) {
361
+ if (this.pos < this.source.length && this.source.charCodeAt(this.pos) === Jt && this.pos + 1 < this.source.length) {
335
362
  let n = this.peek();
336
- if (n < 128 && (A[n] & q) !== 0)
363
+ if (n < 128 && (y[n] & $) !== 0)
337
364
  for (this.advance(); this.pos < this.source.length; ) {
338
365
  let l = this.source.charCodeAt(this.pos);
339
- if (l >= 128 || (A[l] & q) === 0) break;
366
+ if (l >= 128 || (y[l] & $) === 0) break;
340
367
  this.advance();
341
368
  }
342
369
  }
343
370
  if (this.pos < this.source.length) {
344
371
  let n = this.source.charCodeAt(this.pos);
345
- if (n === Jr || n === en) {
346
- let l = this.peek(), o = l < 128 && (A[l] & q) !== 0, h = this.peek(2), c = h < 128 && (A[h] & q) !== 0;
347
- if (o || (l === st || l === K) && c) {
372
+ if (n === kn || n === wn) {
373
+ let l = this.peek(), a = l < 128 && (y[l] & $) !== 0, h = this.peek(2), o = h < 128 && (y[h] & $) !== 0;
374
+ if (a || (l === Me || l === K) && o) {
348
375
  if (this.advance(), this.pos < this.source.length) {
349
- let u = this.source.charCodeAt(this.pos);
350
- (u === st || u === K) && this.advance();
376
+ let _ = this.source.charCodeAt(this.pos);
377
+ (_ === Me || _ === K) && this.advance();
351
378
  }
352
379
  for (; this.pos < this.source.length; ) {
353
- let u = this.source.charCodeAt(this.pos);
354
- if (u >= 128 || (A[u] & q) === 0) break;
380
+ let _ = this.source.charCodeAt(this.pos);
381
+ if (_ >= 128 || (y[_] & $) === 0) break;
355
382
  this.advance();
356
383
  }
357
384
  }
@@ -359,63 +386,97 @@ class Yi {
359
386
  }
360
387
  if (this.pos < this.source.length) {
361
388
  let n = this.source.charCodeAt(this.pos);
362
- if (n === Zr)
363
- return this.advance(), this.make_token(qi, s, this.pos, e, t);
364
- if (Me(n) || n === K && Me(this.peek())) {
365
- for (; this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
389
+ if (n === mn)
390
+ return this.advance(), this.make_token(Qi, s, this.pos, e, t);
391
+ if (Ke(n) || n === K && Ke(this.peek())) {
392
+ for (; this.pos < this.source.length && ot(this.source.charCodeAt(this.pos)); )
366
393
  this.advance();
367
- return this.make_token(zi, s, this.pos, e, t);
394
+ return this.make_token(Vi, s, this.pos, e, t);
368
395
  }
369
396
  }
370
- return this.make_token(nt, s, this.pos, e, t);
397
+ return this.make_token(ct, s, this.pos, e, t);
371
398
  }
372
399
  consume_ident_or_function(e, t) {
373
400
  let s = this.pos;
374
401
  for (; this.pos < this.source.length; ) {
375
402
  let i = this.source.charCodeAt(this.pos);
376
- if (i === Zt) {
403
+ if (i === es) {
377
404
  if (this.pos + 1 >= this.source.length) break;
378
405
  let n = this.peek();
379
- if (ie(n)) break;
380
- if (this.advance(), et(n)) {
406
+ if (ne(n)) break;
407
+ if (this.advance(), pe(n)) {
381
408
  this.advance();
382
- for (let l = 0; l < 5 && this.pos < this.source.length && et(this.source.charCodeAt(this.pos)); l++)
409
+ for (let l = 0; l < 5 && this.pos < this.source.length && pe(this.source.charCodeAt(this.pos)); l++)
383
410
  this.advance();
384
411
  if (this.pos < this.source.length) {
385
412
  let l = this.source.charCodeAt(this.pos);
386
- (gi(l) || ie(l)) && this.advance();
413
+ (yi(l) || ne(l)) && this.advance();
387
414
  }
388
415
  } else
389
416
  this.advance();
390
- } else if (tt(i))
417
+ } else if (ot(i))
391
418
  this.advance();
392
419
  else
393
420
  break;
394
421
  }
395
- return this.pos < this.source.length && this.source.charCodeAt(this.pos) === mi ? (this.advance(), this.make_token(rt, s, this.pos, e, t)) : this.make_token(le, s, this.pos, e, t);
422
+ if (this.pos - s === 1) {
423
+ let i = this.source.charCodeAt(s);
424
+ if ((i === An || i === En) && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Me)
425
+ return this.consume_unicode_range(s, e, t);
426
+ }
427
+ return this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ri ? (this.advance(), this.make_token(ht, s, this.pos, e, t)) : this.make_token(ae, s, this.pos, e, t);
428
+ }
429
+ consume_unicode_range(e, t, s) {
430
+ this.advance();
431
+ let i = 0, n = !1;
432
+ for (; this.pos < this.source.length && i < 6; ) {
433
+ let l = this.source.charCodeAt(this.pos);
434
+ if (pe(l)) {
435
+ if (n)
436
+ break;
437
+ this.advance(), i++;
438
+ } else if (l === yn)
439
+ this.advance(), i++, n = !0;
440
+ else
441
+ break;
442
+ }
443
+ if (n)
444
+ return this.make_token(bi, e, this.pos, t, s);
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
+ this.advance();
447
+ let l = 0;
448
+ for (; this.pos < this.source.length && l < 6; ) {
449
+ let a = this.source.charCodeAt(this.pos);
450
+ if (pe(a))
451
+ this.advance(), l++;
452
+ else
453
+ break;
454
+ }
455
+ }
456
+ return this.make_token(bi, e, this.pos, t, s);
396
457
  }
397
458
  consume_at_keyword(e, t) {
398
459
  let s = this.pos;
399
- for (this.advance(); this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
460
+ for (this.advance(); this.pos < this.source.length && ot(this.source.charCodeAt(this.pos)); )
400
461
  this.advance();
401
- return this.make_token(Nr, s, this.pos, e, t);
462
+ return this.make_token(jr, s, this.pos, e, t);
402
463
  }
403
464
  consume_hash(e, t) {
404
465
  let s = this.pos;
405
- for (this.advance(); this.pos < this.source.length && tt(this.source.charCodeAt(this.pos)); )
466
+ for (this.advance(); this.pos < this.source.length && ot(this.source.charCodeAt(this.pos)); )
406
467
  this.advance();
407
- return this.make_token(Fi, s, this.pos, e, t);
468
+ return this.make_token(Wi, s, this.pos, e, t);
408
469
  }
409
470
  advance(e = 1) {
410
471
  if (e === 1) {
411
472
  if (this.pos >= this.source.length) return;
412
473
  let t = this.source.charCodeAt(this.pos);
413
- this.pos++, ie(t) ? (t === yi && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ai && this.pos++, this.line++, this.column = 1) : this.column++;
474
+ this.pos++, ne(t) ? (t === Si && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Oi && this.pos++, this.line++, this.column = 1) : this.column++;
414
475
  return;
415
476
  }
416
477
  for (let t = 0; t < e && !(this.pos >= this.source.length); t++) {
417
478
  let s = this.source.charCodeAt(this.pos);
418
- this.pos++, ie(s) ? (s === yi && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Ai && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
479
+ this.pos++, ne(s) ? (s === Si && this.pos < this.source.length && this.source.charCodeAt(this.pos) === Oi && (this.pos++, t++), this.line++, this.column = 1) : this.column++;
419
480
  }
420
481
  }
421
482
  peek(e = 1) {
@@ -459,23 +520,23 @@ class Yi {
459
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;
460
521
  }
461
522
  }
462
- let it = 36;
463
- const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11, Ke = 12, ji = 13, sn = 14, Xi = 15, rn = 16, nn = 17, Zi = 18, ln = 19, dt = 20, hs = 21, Ji = 22, er = 23, Be = 24, be = 25, Ye = 26, at = 27, cs = 28, tr = 29, $e = 30, re = 31, sr = 56, on = 32, an = 33, hn = 34, cn = 35, _n = 36, un = 37, fn = 38, pn = 39, ir = 40, dn = 1, gn = 2, Ei = 4, xn = 8, mn = 32, rr = 64, kn = 128, Ci = 0, wn = 1, yn = 2, An = 3, En = 4, Cn = 5, bn = 6, Pe = 0, Rn = 1, vn = 2, ne = class ne {
523
+ let at = 36;
524
+ const Cn = 1, _t = 2, Be = 3, J = 4, ys = 5, tr = 6, ut = 7, sr = 10, _s = 11, Ge = 12, ir = 13, bn = 14, rr = 15, us = 16, Rn = 17, nr = 18, vn = 19, At = 20, fs = 21, lr = 22, or = 23, We = 24, Te = 25, Ve = 26, ft = 27, ps = 28, ar = 29, Ye = 30, le = 31, hr = 56, Tn = 32, cr = 33, Sn = 34, On = 35, Nn = 36, Ln = 37, Un = 38, In = 39, _r = 40, Hn = 50, Pn = 1, Dn = 2, Ni = 4, Fn = 8, Mn = 32, ur = 64, zn = 128, ds = 0, fr = 1, pr = 2, dr = 3, gr = 4, xr = 5, mr = 6, Ce = 0, kr = 1, wr = 2, oe = class oe {
464
525
  constructor(e = 1024) {
465
- g(this, "buffer");
466
- g(this, "view");
467
- g(this, "capacity");
526
+ m(this, "buffer");
527
+ m(this, "view");
528
+ m(this, "capacity");
468
529
  // Number of nodes that can fit
469
- g(this, "count");
530
+ m(this, "count");
470
531
  // Number of nodes currently allocated
471
- g(this, "growth_count");
532
+ m(this, "growth_count");
472
533
  // Number of times the arena has grown
473
- g(this, "overflow_lengths");
474
- this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * it), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
534
+ m(this, "overflow_lengths");
535
+ this.capacity = e, this.count = 1, this.growth_count = 0, this.buffer = new ArrayBuffer(e * at), this.view = new DataView(this.buffer), this.overflow_lengths = /* @__PURE__ */ new Map();
475
536
  }
476
537
  // Calculate recommended initial capacity based on CSS source size
477
538
  static capacity_for_source(e) {
478
- let t = e / 1024, s = Math.ceil(t * ne.NODES_PER_KB), i = Math.ceil(s * ne.CAPACITY_BUFFER);
539
+ let t = e / 1024, s = Math.ceil(t * oe.NODES_PER_KB), i = Math.ceil(s * oe.CAPACITY_BUFFER);
479
540
  return Math.max(16, i);
480
541
  }
481
542
  // Get the number of nodes currently in the arena
@@ -492,7 +553,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
492
553
  }
493
554
  // Calculate byte offset for a node
494
555
  node_offset(e) {
495
- return e * it;
556
+ return e * at;
496
557
  }
497
558
  // Read node type
498
559
  get_type(e) {
@@ -508,7 +569,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
508
569
  }
509
570
  // Read length in source
510
571
  get_length(e) {
511
- if (this.has_flag(e, Ei)) {
572
+ if (this.has_flag(e, Ni)) {
512
573
  const t = this.overflow_lengths.get(e);
513
574
  if (t !== void 0)
514
575
  return t;
@@ -568,7 +629,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
568
629
  }
569
630
  // Write length in source
570
631
  set_length(e, t) {
571
- t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Ei), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
632
+ t > 65535 ? (this.view.setUint16(this.node_offset(e) + 2, 65535, !0), this.set_flag(e, Ni), this.overflow_lengths.set(e, t)) : this.view.setUint16(this.node_offset(e) + 2, t, !0);
572
633
  }
573
634
  // Write content start delta (offset from startOffset)
574
635
  set_content_start_delta(e, t) {
@@ -606,7 +667,7 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
606
667
  // Grow the arena by 1.3x when capacity is exceeded
607
668
  grow() {
608
669
  this.growth_count++;
609
- let e = Math.ceil(this.capacity * ne.GROWTH_FACTOR), t = new ArrayBuffer(e * it);
670
+ let e = Math.ceil(this.capacity * oe.GROWTH_FACTOR), t = new ArrayBuffer(e * at);
610
671
  new Uint8Array(t).set(new Uint8Array(this.buffer)), this.buffer = t, this.view = new DataView(t), this.capacity = e;
611
672
  }
612
673
  // Allocate and initialize a new node with core properties
@@ -615,8 +676,8 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
615
676
  this.count >= this.capacity && this.grow();
616
677
  const l = this.count;
617
678
  this.count++;
618
- const o = l * it;
619
- return this.view.setUint8(o, e), this.view.setUint32(o + 12, t, !0), this.view.setUint32(o + 24, i, !0), this.view.setUint32(o + 28, n, !0), this.set_length(l, s), l;
679
+ const a = l * at;
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;
620
681
  }
621
682
  // --- Tree Building Helpers ---
622
683
  // Link multiple child nodes to a parent
@@ -654,23 +715,23 @@ const tn = 1, lt = 2, ze = 3, pe = 4, Wi = 5, Qi = 6, ot = 7, Vi = 10, as = 11,
654
715
  };
655
716
  // Stores actual lengths for nodes > 65535 chars
656
717
  // Growth multiplier when capacity is exceeded
657
- g(ne, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
718
+ m(oe, "GROWTH_FACTOR", 1.3), // Estimated nodes per KB of CSS (based on real-world data)
658
719
  // Increased from 270 to 325 to account for VALUE wrapper nodes
659
720
  // (~20% of nodes are declarations, +1 VALUE node per declaration = +20% nodes)
660
- g(ne, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
661
- g(ne, "CAPACITY_BUFFER", 1.2);
662
- let ct = ne;
663
- const Tn = 32, On = 9, Sn = 10, Nn = 13, Un = 12, Se = 47, W = 42, F = 45, Ln = 39, Hn = 34, te = 43, nr = 46, ht = 126, lr = 62, In = 38, fe = 61, De = 124, bi = 36, Ri = 94, Pn = 58;
664
- function se(r) {
665
- return r === Tn || r === On || r === Sn || r === Nn || r === Un;
721
+ m(oe, "NODES_PER_KB", 325), // Buffer to avoid frequent growth (15%)
722
+ m(oe, "CAPACITY_BUFFER", 1.2);
723
+ let dt = oe;
724
+ const qn = 32, Kn = 9, $n = 10, Bn = 13, Gn = 12, Ue = 47, j = 42, M = 45, Wn = 39, Yn = 34, ie = 43, Ar = 46, pt = 126, Er = 62, Qn = 38, de = 61, ze = 124, Li = 36, Ui = 94, Vn = 58;
725
+ function re(r) {
726
+ return r === qn || r === Kn || r === $n || r === Bn || r === Gn;
666
727
  }
667
- function Dn(r) {
668
- return r === lr || r === te || r === ht;
728
+ function jn(r) {
729
+ return r === Er || r === ie || r === pt;
669
730
  }
670
- function Jt(r) {
731
+ function ts(r) {
671
732
  return r >= 48 && r <= 57;
672
733
  }
673
- function Y(r, e) {
734
+ function V(r, e) {
674
735
  if (r.length !== e.length)
675
736
  return !1;
676
737
  for (let t = 0; t < r.length; t++) {
@@ -680,7 +741,7 @@ function Y(r, e) {
680
741
  }
681
742
  return !0;
682
743
  }
683
- function Fn(r, e) {
744
+ function Xn(r, e) {
684
745
  if (r.length < e.length)
685
746
  return !1;
686
747
  for (let t = 0; t < e.length; t++) {
@@ -690,7 +751,7 @@ function Fn(r, e) {
690
751
  }
691
752
  return !0;
692
753
  }
693
- function Mn(r, e) {
754
+ function Zn(r, e) {
694
755
  if (e.length === 0)
695
756
  return -1;
696
757
  if (e.length === 1) {
@@ -716,29 +777,29 @@ function Mn(r, e) {
716
777
  }
717
778
  return -1;
718
779
  }
719
- function Fe(r, e, t) {
720
- if ((e === void 0 || t === void 0) && (e = 0, t = r.length), r.charCodeAt(e) !== F || r.charCodeAt(e + 1) === F || t - e < 3)
780
+ function qe(r, e, t) {
781
+ if ((e === void 0 || t === void 0) && (e = 0, t = r.length), r.charCodeAt(e) !== M || r.charCodeAt(e + 1) === M || t - e < 3)
721
782
  return !1;
722
783
  for (let i = e + 2; i < t; i++)
723
- if (r.charCodeAt(i) === F)
784
+ if (r.charCodeAt(i) === M)
724
785
  return !0;
725
786
  return !1;
726
787
  }
727
- function qn(r, e, t) {
728
- for (; e < t && se(r.charCodeAt(e)); )
788
+ function Jn(r, e, t) {
789
+ for (; e < t && re(r.charCodeAt(e)); )
729
790
  e++;
730
791
  return e;
731
792
  }
732
- function Ae(r, e, t) {
793
+ function be(r, e, t) {
733
794
  for (; e < t; ) {
734
795
  let s = r.charCodeAt(e);
735
- if (se(s)) {
796
+ if (re(s)) {
736
797
  e++;
737
798
  continue;
738
799
  }
739
- if (s === Se && e + 1 < t && r.charCodeAt(e + 1) === W) {
800
+ if (s === Ue && e + 1 < t && r.charCodeAt(e + 1) === j) {
740
801
  for (e += 2; e < t; ) {
741
- if (r.charCodeAt(e) === W && e + 1 < t && r.charCodeAt(e + 1) === Se) {
802
+ if (r.charCodeAt(e) === j && e + 1 < t && r.charCodeAt(e + 1) === Ue) {
742
803
  e += 2;
743
804
  break;
744
805
  }
@@ -750,16 +811,16 @@ function Ae(r, e, t) {
750
811
  }
751
812
  return e;
752
813
  }
753
- function zn(r, e, t) {
814
+ function el(r, e, t) {
754
815
  for (; e > t; ) {
755
816
  let s = r.charCodeAt(e - 1);
756
- if (se(s)) {
817
+ if (re(s)) {
757
818
  e--;
758
819
  continue;
759
820
  }
760
- if (e >= 2 && s === Se && r.charCodeAt(e - 2) === W) {
821
+ if (e >= 2 && s === Ue && r.charCodeAt(e - 2) === j) {
761
822
  for (e -= 2; e > t; ) {
762
- if (e >= 2 && r.charCodeAt(e - 2) === Se && r.charCodeAt(e - 1) === W) {
823
+ if (e >= 2 && r.charCodeAt(e - 2) === Ue && r.charCodeAt(e - 1) === j) {
763
824
  e -= 2;
764
825
  break;
765
826
  }
@@ -771,20 +832,20 @@ function zn(r, e, t) {
771
832
  }
772
833
  return e;
773
834
  }
774
- function es(r) {
835
+ function ss(r) {
775
836
  let e = 0;
776
837
  for (let n = 0; n < r.length; n++) {
777
838
  let l = r.charCodeAt(n);
778
839
  if (l === 101 || l === 69) {
779
840
  if (n + 1 < r.length) {
780
- let o = r.charCodeAt(n + 1);
781
- if (Jt(o)) {
841
+ let a = r.charCodeAt(n + 1);
842
+ if (ts(a)) {
782
843
  e = n + 1;
783
844
  continue;
784
845
  }
785
- if ((o === 43 || o === 45) && n + 2 < r.length) {
846
+ if ((a === 43 || a === 45) && n + 2 < r.length) {
786
847
  let h = r.charCodeAt(n + 2);
787
- if (Jt(h)) {
848
+ if (ts(h)) {
788
849
  e = n + 1;
789
850
  continue;
790
851
  }
@@ -792,7 +853,7 @@ function es(r) {
792
853
  }
793
854
  break;
794
855
  }
795
- if (Jt(l) || l === nr || l === F || l === te)
856
+ if (ts(l) || l === Ar || l === M || l === ie)
796
857
  e = n + 1;
797
858
  else
798
859
  break;
@@ -800,52 +861,65 @@ function es(r) {
800
861
  let t = r.substring(0, e), s = r.substring(e);
801
862
  return { value: t ? parseFloat(t) : 0, unit: s };
802
863
  }
803
- const Kn = {
804
- [tn]: "StyleSheet",
805
- [lt]: "Rule",
806
- [ze]: "Atrule",
807
- [pe]: "Declaration",
808
- [Wi]: "Selector",
809
- [Qi]: "Comment",
810
- [ot]: "Block",
811
- [Vi]: "Identifier",
812
- [as]: "Number",
813
- [Ke]: "Dimension",
814
- [ji]: "String",
815
- [sn]: "Hash",
816
- [Xi]: "Function",
817
- [rn]: "Operator",
818
- [nn]: "Parentheses",
819
- [Zi]: "Url",
820
- [ln]: "Value",
821
- [dt]: "SelectorList",
822
- [hs]: "TypeSelector",
823
- [Ji]: "ClassSelector",
824
- [er]: "IdSelector",
825
- [Be]: "AttributeSelector",
826
- [be]: "PseudoClassSelector",
827
- [Ye]: "PseudoElementSelector",
828
- [at]: "Combinator",
829
- [cs]: "UniversalSelector",
830
- [tr]: "NestingSelector",
831
- [$e]: "Nth",
832
- [re]: "NthOf",
833
- [sr]: "Lang",
834
- [on]: "MediaQuery",
835
- [an]: "Feature",
836
- [hn]: "MediaType",
837
- [cn]: "ContainerQuery",
838
- [_n]: "SupportsQuery",
839
- [un]: "Layer",
840
- [fn]: "Operator",
841
- [pn]: "MediaFeatureRange",
842
- [ir]: "AtrulePrelude"
864
+ const tl = {
865
+ [Cn]: "StyleSheet",
866
+ [_t]: "Rule",
867
+ [Be]: "Atrule",
868
+ [J]: "Declaration",
869
+ [ys]: "Selector",
870
+ [tr]: "Comment",
871
+ [ut]: "Block",
872
+ [sr]: "Identifier",
873
+ [_s]: "Number",
874
+ [Ge]: "Dimension",
875
+ [ir]: "String",
876
+ [bn]: "Hash",
877
+ [rr]: "Function",
878
+ [us]: "Operator",
879
+ [Rn]: "Parentheses",
880
+ [nr]: "Url",
881
+ [vn]: "UnicodeRange",
882
+ [Hn]: "Value",
883
+ [At]: "SelectorList",
884
+ [fs]: "TypeSelector",
885
+ [lr]: "ClassSelector",
886
+ [or]: "IdSelector",
887
+ [We]: "AttributeSelector",
888
+ [Te]: "PseudoClassSelector",
889
+ [Ve]: "PseudoElementSelector",
890
+ [ft]: "Combinator",
891
+ [ps]: "UniversalSelector",
892
+ [ar]: "NestingSelector",
893
+ [Ye]: "Nth",
894
+ [le]: "NthOf",
895
+ [hr]: "Lang",
896
+ [Tn]: "MediaQuery",
897
+ [cr]: "Feature",
898
+ [Sn]: "MediaType",
899
+ [On]: "ContainerQuery",
900
+ [Nn]: "SupportsQuery",
901
+ [Ln]: "Layer",
902
+ [Un]: "Operator",
903
+ [In]: "MediaFeatureRange",
904
+ [_r]: "AtrulePrelude"
905
+ }, sl = {
906
+ [ds]: null,
907
+ [fr]: "=",
908
+ [pr]: "~=",
909
+ [dr]: "|=",
910
+ [gr]: "^=",
911
+ [xr]: "$=",
912
+ [mr]: "*="
913
+ }, il = {
914
+ [Ce]: null,
915
+ [kr]: "i",
916
+ [wr]: "s"
843
917
  };
844
- class We {
918
+ class je {
845
919
  constructor(e, t, s) {
846
- g(this, "arena");
847
- g(this, "source");
848
- g(this, "index");
920
+ m(this, "arena");
921
+ m(this, "source");
922
+ m(this, "index");
849
923
  this.arena = e, this.source = t, this.index = s;
850
924
  }
851
925
  /**
@@ -855,30 +929,37 @@ class We {
855
929
  __get_arena() {
856
930
  return this.arena;
857
931
  }
932
+ get_content() {
933
+ let e = this.arena.get_content_start(this.index), t = this.arena.get_content_length(this.index);
934
+ return t === 0 ? "" : this.source.substring(e, e + t);
935
+ }
858
936
  /** Get node type as number (for performance) */
859
937
  get type() {
860
938
  return this.arena.get_type(this.index);
861
939
  }
862
940
  /** Get node type as human-readable string */
863
941
  get type_name() {
864
- return Kn[this.type] || "unknown";
942
+ return tl[this.type] || "unknown";
865
943
  }
866
944
  /** Get the full text of this node from source */
867
945
  get text() {
868
946
  let e = this.arena.get_start_offset(this.index), t = this.arena.get_length(this.index);
869
947
  return this.source.substring(e, e + t);
870
948
  }
871
- /** Get the "content" text (property name for declarations, at-rule name for at-rules, layer name for import layers) */
949
+ /** Get the "content" text (at-rule name for at-rules, layer name for import layers) */
872
950
  get name() {
873
- let e = this.arena.get_content_start(this.index), t = this.arena.get_content_length(this.index);
874
- return t === 0 ? "" : this.source.substring(e, e + t);
951
+ let { type: e } = this;
952
+ if (!(e === J || e === us || e === ys))
953
+ return this.get_content();
875
954
  }
876
955
  /**
877
956
  * Alias for name (for declarations: "color" in "color: blue")
878
957
  * More semantic than `name` for declaration nodes
879
958
  */
880
959
  get property() {
881
- return this.name;
960
+ let { type: e } = this;
961
+ if (!(e !== J && e !== cr))
962
+ return this.get_content();
882
963
  }
883
964
  /**
884
965
  * Get the value text (for declarations: "blue" in "color: blue")
@@ -888,31 +969,32 @@ class We {
888
969
  * For URL nodes with unquoted URL: returns the URL content without quotes
889
970
  */
890
971
  get value() {
891
- let { type: e, text: t } = this;
892
- if (e === pe && this.first_child)
893
- return this.first_child;
894
- if (e === Ke)
895
- return es(t).value;
896
- if (e === as)
897
- return Number.parseFloat(this.text);
898
- if (e === Zi) {
899
- let n = this.first_child;
900
- if (n && n.type === ji)
901
- return n.text;
902
- if (Fn(t, "url(")) {
903
- let l = t.indexOf("("), o = t.lastIndexOf(")");
904
- if (l !== -1 && o !== -1 && o > l)
905
- return t.substring(l + 1, o).trim();
972
+ let { type: e, text: t, first_child: s } = this;
973
+ if (e === J && s)
974
+ return s;
975
+ if (e === Ge)
976
+ return ss(t).value;
977
+ if (e === _s)
978
+ return Number.parseFloat(t);
979
+ if (e === nr) {
980
+ if ((s == null ? void 0 : s.type) === ir)
981
+ return s.text;
982
+ if (Xn(t, "url(")) {
983
+ let l = t.indexOf("("), a = t.lastIndexOf(")");
984
+ if (l !== -1 && a !== -1 && a > l)
985
+ return t.substring(l + 1, a).trim();
906
986
  } else if (t.startsWith('"') || t.startsWith("'"))
907
987
  return t;
908
988
  }
909
- let s = this.arena.get_value_start(this.index), i = this.arena.get_value_length(this.index);
910
- return i === 0 ? null : this.source.substring(s, s + i);
989
+ if (e === us)
990
+ return this.get_content();
991
+ let i = this.arena.get_value_start(this.index), n = this.arena.get_value_length(this.index);
992
+ return n === 0 ? null : this.source.substring(i, i + n);
911
993
  }
912
994
  /** Get the numeric value for NUMBER and DIMENSION nodes, or null for other node types */
913
995
  get value_as_number() {
914
- let e = this.text;
915
- return this.type === as ? Number.parseFloat(e) : this.type === Ke ? es(e).value : null;
996
+ let { text: e, type: t } = this;
997
+ return t === _s ? Number.parseFloat(e) : t === Ge ? ss(e).value : null;
916
998
  }
917
999
  /**
918
1000
  * Get the prelude node:
@@ -921,11 +1003,11 @@ class We {
921
1003
  * Returns null if no prelude exists
922
1004
  */
923
1005
  get prelude() {
924
- if (this.type === ze) {
1006
+ if (this.type === Be) {
925
1007
  let e = this.first_child;
926
- return e && e.type === ir ? e : null;
1008
+ return e && e.type === _r ? e : null;
927
1009
  }
928
- if (this.type === lt)
1010
+ if (this.type === _t)
929
1011
  return this.first_child;
930
1012
  }
931
1013
  /**
@@ -933,7 +1015,7 @@ class We {
933
1015
  * Returns one of the ATTR_OPERATOR_* constants
934
1016
  */
935
1017
  get attr_operator() {
936
- if (this.type === Be)
1018
+ if (this.type === We)
937
1019
  return this.arena.get_attr_operator(this.index);
938
1020
  }
939
1021
  /**
@@ -941,72 +1023,74 @@ class We {
941
1023
  * Returns one of the ATTR_FLAG_* constants
942
1024
  */
943
1025
  get attr_flags() {
944
- if (this.type === Be)
1026
+ if (this.type === We)
945
1027
  return this.arena.get_attr_flags(this.index);
946
1028
  }
947
1029
  /** Get the unit for dimension nodes (e.g., "px" from "100px", "%" from "50%") */
948
1030
  get unit() {
949
- if (this.type === Ke)
950
- return es(this.text).unit;
1031
+ if (this.type === Ge)
1032
+ return ss(this.text).unit;
951
1033
  }
952
1034
  /** Check if this declaration has !important */
953
1035
  get is_important() {
954
- if (this.type === pe)
955
- return this.arena.has_flag(this.index, dn);
1036
+ if (this.type === J)
1037
+ return this.arena.has_flag(this.index, Pn);
956
1038
  }
957
1039
  /** Check if this declaration has a browser hack prefix */
958
1040
  get is_browserhack() {
959
- if (this.type === pe)
960
- return this.arena.has_flag(this.index, kn);
1041
+ if (this.type === J)
1042
+ return this.arena.has_flag(this.index, zn);
961
1043
  }
962
1044
  /** Check if this has a vendor prefix (computed on-demand) */
963
1045
  get is_vendor_prefixed() {
964
1046
  switch (this.type) {
965
- case pe:
966
- return Fe(this.name);
967
- case be:
968
- case Ye:
969
- return Fe(this.name);
970
- case ze:
971
- return Fe(this.name);
972
- case Xi:
973
- return Fe(this.name);
974
- case Vi:
975
- return Fe(this.text);
1047
+ case J:
1048
+ return qe(this.get_content());
1049
+ case Te:
1050
+ case Ve:
1051
+ return qe(this.get_content());
1052
+ case Be:
1053
+ return qe(this.get_content());
1054
+ case rr:
1055
+ return qe(this.get_content());
1056
+ case sr:
1057
+ return qe(this.text);
976
1058
  default:
977
1059
  return !1;
978
1060
  }
979
1061
  }
980
1062
  /** Check if this node has an error */
981
1063
  get has_error() {
982
- return this.arena.has_flag(this.index, gn);
1064
+ return this.arena.has_flag(this.index, Dn);
983
1065
  }
984
1066
  /** Check if this node has a prelude (at-rules and style rules) */
985
1067
  get has_prelude() {
986
- return this.type === ze ? this.arena.get_value_length(this.index) > 0 : this.type === lt ? this.first_child !== null : !1;
1068
+ let { type: e } = this;
1069
+ return e === Be ? this.arena.get_value_length(this.index) > 0 : e === _t ? this.first_child !== null : !1;
987
1070
  }
988
1071
  /** Check if this rule has a block { } */
989
1072
  get has_block() {
990
- return this.arena.has_flag(this.index, xn);
1073
+ return this.arena.has_flag(this.index, Fn);
991
1074
  }
992
1075
  /** Check if this style rule has declarations */
993
1076
  get has_declarations() {
994
- return this.arena.has_flag(this.index, mn);
1077
+ return this.arena.has_flag(this.index, Mn);
995
1078
  }
996
1079
  /** Get the block node (for style rules and at-rules with blocks) */
997
1080
  get block() {
998
- if (this.type === lt) {
999
- let e = this.first_child;
1000
- if (!e) return null;
1001
- let t = e.next_sibling;
1002
- return t && t.type === ot ? t : null;
1003
- }
1004
- if (this.type === ze) {
1005
- let e = this.first_child;
1006
- for (; e; ) {
1007
- if (e.type === ot && !e.next_sibling)
1008
- return e;
1009
- e = e.next_sibling;
1081
+ let { type: e } = this;
1082
+ if (e === _t) {
1083
+ let t = this.first_child;
1084
+ if (!t) return null;
1085
+ let s = t.next_sibling;
1086
+ return (s == null ? void 0 : s.type) === ut ? s : null;
1087
+ }
1088
+ if (e === Be) {
1089
+ let t = this.first_child;
1090
+ for (; t; ) {
1091
+ if (t.type === ut && !t.next_sibling)
1092
+ return t;
1093
+ t = t.next_sibling;
1010
1094
  }
1011
1095
  return null;
1012
1096
  }
@@ -1014,10 +1098,10 @@ class We {
1014
1098
  }
1015
1099
  /** Check if this block is empty (no declarations or rules, only comments allowed) */
1016
1100
  get is_empty() {
1017
- if (this.type !== ot) return;
1101
+ if (this.type !== ut) return;
1018
1102
  let e = this.first_child;
1019
1103
  for (; e; ) {
1020
- if (e.type !== Qi)
1104
+ if (e.type !== tr)
1021
1105
  return !1;
1022
1106
  e = e.next_sibling;
1023
1107
  }
@@ -1050,12 +1134,12 @@ class We {
1050
1134
  /** Get first child node */
1051
1135
  get first_child() {
1052
1136
  let e = this.arena.get_first_child(this.index);
1053
- return e === 0 ? null : new We(this.arena, this.source, e);
1137
+ return e === 0 ? null : new je(this.arena, this.source, e);
1054
1138
  }
1055
1139
  /** Get next sibling node */
1056
1140
  get next_sibling() {
1057
1141
  let e = this.arena.get_next_sibling(this.index);
1058
- return e === 0 ? null : new We(this.arena, this.source, e);
1142
+ return e === 0 ? null : new je(this.arena, this.source, e);
1059
1143
  }
1060
1144
  /** Check if this node has a next sibling */
1061
1145
  get has_next() {
@@ -1067,7 +1151,8 @@ class We {
1067
1151
  * This allows formatters to distinguish :lang() from :hover
1068
1152
  */
1069
1153
  get has_children() {
1070
- return (this.type === be || this.type === Ye) && this.arena.has_flag(this.index, rr) ? !0 : this.arena.has_children(this.index);
1154
+ let { type: e } = this;
1155
+ return (e === Te || e === Ve) && this.arena.has_flag(this.index, ur) ? !0 : this.arena.has_children(this.index);
1071
1156
  }
1072
1157
  /** Get all children as an array */
1073
1158
  get children() {
@@ -1085,38 +1170,40 @@ class We {
1085
1170
  // --- An+B Expression Helpers (for NODE_SELECTOR_NTH) ---
1086
1171
  /** Get the 'a' coefficient from An+B expression (e.g., "2n" from "2n+1", "odd" from "odd") */
1087
1172
  get nth_a() {
1088
- if (this.type !== $e && this.type !== re) return;
1089
- let e = this.arena.get_content_length(this.index);
1090
- if (e === 0) return;
1091
- let t = this.arena.get_content_start(this.index);
1092
- return this.source.substring(t, t + e);
1173
+ let { type: e, arena: t, index: s } = this;
1174
+ if (e !== Ye && e !== le) return;
1175
+ let i = t.get_content_length(s);
1176
+ if (i === 0) return;
1177
+ let n = t.get_content_start(s);
1178
+ return this.source.substring(n, n + i);
1093
1179
  }
1094
1180
  /** Get the 'b' coefficient from An+B expression (e.g., "+1" from "2n+1") */
1095
1181
  get nth_b() {
1096
- if (this.type !== $e && this.type !== re) return;
1097
- let e = this.arena.get_value_length(this.index);
1098
- if (e === 0) return;
1099
- let t = this.arena.get_value_start(this.index), s = this.source.substring(t, t + e), i = t - 1;
1100
- for (; i >= 0; ) {
1101
- let n = this.source.charCodeAt(i);
1102
- if (se(n)) {
1103
- i--;
1182
+ let { type: e, arena: t, index: s, source: i } = this;
1183
+ if (e !== Ye && e !== le) return;
1184
+ let n = t.get_value_length(s);
1185
+ if (n === 0) return;
1186
+ let l = t.get_value_start(s), a = i.substring(l, l + n), h = l - 1;
1187
+ for (; h >= 0; ) {
1188
+ let o = i.charCodeAt(h);
1189
+ if (re(o)) {
1190
+ h--;
1104
1191
  continue;
1105
1192
  }
1106
- n === F ? s = "-" + s : n === te && (s = "+" + s);
1193
+ o === M ? a = "-" + a : o === ie && (a = "+" + a);
1107
1194
  break;
1108
1195
  }
1109
- return s;
1196
+ return a;
1110
1197
  }
1111
1198
  // --- Pseudo-Class Nth-Of Helpers (for NODE_SELECTOR_NTH_OF) ---
1112
1199
  /** Get the An+B formula node from :nth-child(2n+1 of .foo) */
1113
1200
  get nth() {
1114
- if (this.type === re)
1201
+ if (this.type === le)
1115
1202
  return this.first_child ?? void 0;
1116
1203
  }
1117
1204
  /** Get the selector list from :nth-child(2n+1 of .foo) */
1118
1205
  get selector() {
1119
- if (this.type !== re) return;
1206
+ if (this.type !== le) return;
1120
1207
  let e = this.first_child;
1121
1208
  return (e == null ? void 0 : e.next_sibling) ?? void 0;
1122
1209
  }
@@ -1126,12 +1213,12 @@ class We {
1126
1213
  * Works for :is(.a), :not(.b), :has(.c), :where(.d), :nth-child(2n of .e)
1127
1214
  */
1128
1215
  get selector_list() {
1129
- if (this.type !== be) return;
1216
+ if (this.type !== Te) return;
1130
1217
  let e = this.first_child;
1131
1218
  if (e) {
1132
- if (e.type === dt)
1219
+ if (e.type === At)
1133
1220
  return e;
1134
- if (e.type === re)
1221
+ if (e.type === le)
1135
1222
  return e.selector;
1136
1223
  }
1137
1224
  }
@@ -1146,25 +1233,31 @@ class We {
1146
1233
  */
1147
1234
  clone(e = {}) {
1148
1235
  const { deep: t = !0, locations: s = !1 } = e;
1149
- let i = {
1150
- type: this.type,
1236
+ let { type: i, name: n, property: l, value: a, unit: h } = this, o = {
1237
+ type: i,
1151
1238
  type_name: this.type_name,
1152
- text: this.text,
1153
- children: []
1239
+ text: this.text
1154
1240
  };
1155
- if (this.name && (i.name = this.name), this.type === pe && (i.property = this.name), this.value !== void 0 && this.value !== null && (i.value = this.value, this.unit && (i.unit = this.unit)), this.type === pe && (i.is_important = this.is_important, i.is_browserhack = this.is_browserhack), i.is_vendor_prefixed = this.is_vendor_prefixed, i.has_error = this.has_error, this.type === Be && (i.attr_operator = this.attr_operator, i.attr_flags = this.attr_flags), (this.type === $e || this.type === re) && (i.nth_a = this.nth_a, i.nth_b = this.nth_b), s && (i.line = this.line, i.column = this.column, i.start = this.start, i.length = this.length, i.end = this.end), t)
1156
- for (let n of this.children)
1157
- i.children.push(n.clone({ deep: !0, locations: s }));
1158
- return i;
1241
+ if (n && (o.name = n), l && (o.property = l), a && (o.value = a, h && (o.unit = h)), i === J) {
1242
+ let { is_important: d, is_browserhack: f } = this;
1243
+ d && (o.is_important = !0), f && (o.is_browserhack = !0);
1244
+ }
1245
+ let { is_vendor_prefixed: _, has_error: p } = this;
1246
+ if (_ && (o.is_vendor_prefixed = !0), p && (o.has_error = !0), i === We && (o.attr_operator = sl[this.attr_operator], o.attr_flags = il[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
+ o.children = [];
1248
+ for (let d of this.children)
1249
+ o.children.push(d.clone({ deep: !0, locations: s }));
1250
+ }
1251
+ return o;
1159
1252
  }
1160
1253
  }
1161
- class vi {
1254
+ class Ii {
1162
1255
  constructor(e, t) {
1163
- g(this, "lexer");
1164
- g(this, "arena");
1165
- g(this, "source");
1166
- g(this, "expr_end");
1167
- this.arena = e, this.source = t, this.lexer = new Yi(t), this.expr_end = 0;
1256
+ m(this, "lexer");
1257
+ m(this, "arena");
1258
+ m(this, "source");
1259
+ m(this, "expr_end");
1260
+ this.arena = e, this.source = t, this.lexer = new er(t), this.expr_end = 0;
1168
1261
  }
1169
1262
  /**
1170
1263
  * Parse An+B expression
@@ -1172,35 +1265,35 @@ class vi {
1172
1265
  */
1173
1266
  parse_anplusb(e, t, s = 1) {
1174
1267
  this.expr_end = t, this.lexer.pos = e, this.lexer.line = s;
1175
- let i = null, n = e, l = e, o = e, h = e;
1176
- const c = e;
1268
+ let i = null, n = e, l = e, a = e, h = e;
1269
+ const o = e;
1177
1270
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
1178
1271
  return null;
1179
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === le) {
1180
- const u = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1181
- if (Y("odd", u) || Y("even", u))
1182
- return n = this.lexer.token_start, l = this.lexer.token_end, this.create_anplusb_node(c, n, l, 0, 0);
1183
- const f = this.source.charCodeAt(this.lexer.token_start), x = this.lexer.token_end > this.lexer.token_start + 1 ? this.source.charCodeAt(this.lexer.token_start + 1) : 0;
1184
- return f === F && x === 110 ? this.lexer.token_end > this.lexer.token_start + 2 && this.source.charCodeAt(this.lexer.token_start + 2) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.source.substring(this.lexer.token_start + 2, this.lexer.token_end), o = this.lexer.token_start + 2, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 2, i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0)) : f === 110 ? this.lexer.token_end > this.lexer.token_start + 1 && this.source.charCodeAt(this.lexer.token_start + 1) === F ? (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), o = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (n = this.lexer.token_start, l = this.lexer.token_start + 1, i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0)) : null;
1185
- }
1186
- if (this.lexer.token_type === de && this.source.charCodeAt(this.lexer.token_start) === te) {
1187
- const u = this.lexer.save_position();
1188
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === le && this.source.substring(this.lexer.token_start, this.lexer.token_end).charCodeAt(0) === 110)
1189
- 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) === F ? (i = this.source.substring(this.lexer.token_start + 1, this.lexer.token_end), o = this.lexer.token_start + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h)) : (i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, i !== null ? o : 0, i !== null ? h : 0));
1190
- this.lexer.restore_position(u);
1191
- }
1192
- if (this.lexer.token_type === zi) {
1193
- const u = this.source.substring(this.lexer.token_start, this.lexer.token_end), f = Mn(u, "n");
1194
- if (f !== -1) {
1195
- if (n = this.lexer.token_start, l = this.lexer.token_start + f + 1, f + 1 < u.length) {
1196
- const x = u.substring(f + 1);
1197
- if (x.charCodeAt(0) === F)
1198
- return i = x, o = this.lexer.token_start + f + 1, h = this.lexer.token_end, this.create_anplusb_node(c, n, l, o, h);
1272
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === ae) {
1273
+ const _ = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1274
+ if (V("odd", _) || V("even", _))
1275
+ return n = this.lexer.token_start, l = this.lexer.token_end, this.create_anplusb_node(o, n, l, 0, 0);
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
+ 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
+ }
1279
+ if (this.lexer.token_type === xe && this.source.charCodeAt(this.lexer.token_start) === ie) {
1280
+ const _ = this.lexer.save_position();
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 = _.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(_);
1284
+ }
1285
+ if (this.lexer.token_type === Vi) {
1286
+ const _ = this.source.substring(this.lexer.token_start, this.lexer.token_end), p = Zn(_, "n");
1287
+ if (p !== -1) {
1288
+ if (n = this.lexer.token_start, l = this.lexer.token_start + p + 1, p + 1 < _.length) {
1289
+ const d = _.substring(p + 1);
1290
+ if (d.charCodeAt(0) === M)
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);
1199
1292
  }
1200
- return i = this.parse_b_part(), i !== null && (o = this.lexer.token_start, h = this.lexer.token_end), this.create_anplusb_node(c, n, l, o, h);
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);
1201
1294
  }
1202
1295
  }
1203
- return this.lexer.token_type === nt ? (i = this.source.substring(this.lexer.token_start, this.lexer.token_end), o = this.lexer.token_start, h = this.lexer.token_end, this.create_anplusb_node(c, 0, 0, o, h)) : null;
1296
+ return this.lexer.token_type === ct ? (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;
1204
1297
  }
1205
1298
  /**
1206
1299
  * Parse the b part after 'n'
@@ -1209,39 +1302,39 @@ class vi {
1209
1302
  parse_b_part() {
1210
1303
  if (this.skip_whitespace(), this.lexer.pos >= this.expr_end)
1211
1304
  return null;
1212
- if (this.lexer.next_token_fast(!0), this.lexer.token_type === de) {
1305
+ if (this.lexer.next_token_fast(!0), this.lexer.token_type === xe) {
1213
1306
  const e = this.source.charCodeAt(this.lexer.token_start);
1214
- if (e === te || e === F) {
1215
- const t = e === F ? "-" : "";
1216
- if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === nt) {
1307
+ if (e === ie || e === M) {
1308
+ const t = e === M ? "-" : "";
1309
+ if (this.skip_whitespace(), this.lexer.next_token_fast(!0), this.lexer.token_type === ct) {
1217
1310
  let s = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1218
- return s.charCodeAt(0) === te && (s = s.substring(1)), t === "-" ? t + s : s;
1311
+ return s.charCodeAt(0) === ie && (s = s.substring(1)), t === "-" ? t + s : s;
1219
1312
  }
1220
1313
  }
1221
1314
  }
1222
- if (this.lexer.token_type === nt) {
1315
+ if (this.lexer.token_type === ct) {
1223
1316
  let e = this.source.substring(this.lexer.token_start, this.lexer.token_end);
1224
1317
  const t = e.charCodeAt(0);
1225
- if (t === te || t === F)
1226
- return t === te && (e = e.substring(1)), e;
1318
+ if (t === ie || t === M)
1319
+ return t === ie && (e = e.substring(1)), e;
1227
1320
  }
1228
1321
  return null;
1229
1322
  }
1230
1323
  skip_whitespace() {
1231
- this.lexer.pos = Ae(this.source, this.lexer.pos, this.expr_end);
1324
+ this.lexer.pos = be(this.source, this.lexer.pos, this.expr_end);
1232
1325
  }
1233
1326
  create_anplusb_node(e, t, s, i, n) {
1234
- const l = this.arena.create_node($e, e, this.lexer.pos - e, this.lexer.line, 1);
1327
+ const l = this.arena.create_node(Ye, e, this.lexer.pos - e, this.lexer.line, 1);
1235
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;
1236
1329
  }
1237
1330
  }
1238
- class Bn {
1331
+ class rl {
1239
1332
  constructor(e, t) {
1240
- g(this, "lexer");
1241
- g(this, "arena");
1242
- g(this, "source");
1243
- g(this, "selector_end");
1244
- this.arena = e, this.source = t, this.lexer = new Yi(t), this.selector_end = 0;
1333
+ m(this, "lexer");
1334
+ m(this, "arena");
1335
+ m(this, "source");
1336
+ m(this, "selector_end");
1337
+ this.arena = e, this.source = t, this.lexer = new er(t), this.selector_end = 0;
1245
1338
  }
1246
1339
  // Parse a selector range into selector nodes (standalone use)
1247
1340
  // Always returns a NODE_SELECTOR_LIST with selector components as children
@@ -1252,30 +1345,30 @@ class Bn {
1252
1345
  parse_selector_list(e = !0) {
1253
1346
  let t = [], s = this.lexer.pos, i = this.lexer.line, n = this.lexer.column;
1254
1347
  for (; this.lexer.pos < this.selector_end; ) {
1255
- let l = this.lexer.pos, o = this.lexer.line, h = this.lexer.column, c = this.parse_complex_selector(e);
1256
- if (c !== null) {
1257
- let f = this.arena.create_node(
1258
- Wi,
1348
+ let l = this.lexer.pos, a = this.lexer.line, h = this.lexer.column, o = this.parse_complex_selector(e);
1349
+ if (o !== null) {
1350
+ let p = this.arena.create_node(
1351
+ ys,
1259
1352
  l,
1260
1353
  this.lexer.pos - l,
1261
- o,
1354
+ a,
1262
1355
  h
1263
1356
  );
1264
- this.arena.set_content_start_delta(f, 0), this.arena.set_content_length(f, this.lexer.pos - l);
1265
- let x = c, k = this.arena.get_next_sibling(x);
1266
- for (; k !== 0; )
1267
- x = k, k = this.arena.get_next_sibling(x);
1268
- this.arena.set_first_child(f, c), t.push(f);
1357
+ this.arena.set_content_start_delta(p, 0), this.arena.set_content_length(p, this.lexer.pos - l);
1358
+ let d = o, f = this.arena.get_next_sibling(d);
1359
+ for (; f !== 0; )
1360
+ d = f, f = this.arena.get_next_sibling(d);
1361
+ this.arena.set_first_child(p, o), t.push(p);
1269
1362
  }
1270
1363
  if (this.skip_whitespace(), this.lexer.pos >= this.selector_end) break;
1271
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === qe) {
1364
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === $e) {
1272
1365
  this.skip_whitespace();
1273
1366
  continue;
1274
1367
  } else
1275
1368
  break;
1276
1369
  }
1277
1370
  if (t.length >= 1) {
1278
- let l = this.arena.create_node(dt, s, this.lexer.pos - s, i, n);
1371
+ let l = this.arena.create_node(At, s, this.lexer.pos - s, i, n);
1279
1372
  return this.arena.append_children(l, t), l;
1280
1373
  }
1281
1374
  return null;
@@ -1287,11 +1380,11 @@ class Bn {
1287
1380
  let t = [];
1288
1381
  if (this.skip_whitespace(), e && this.lexer.pos < this.selector_end) {
1289
1382
  const s = this.lexer.save_position();
1290
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === de) {
1383
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1291
1384
  let n = this.source.charCodeAt(this.lexer.token_start);
1292
- if (n === lr || n === te || n === ht) {
1385
+ if (n === Er || n === ie || n === pt) {
1293
1386
  let l = this.create_node_at(
1294
- at,
1387
+ ft,
1295
1388
  this.lexer.token_start,
1296
1389
  this.lexer.token_end,
1297
1390
  this.lexer.token_line,
@@ -1319,7 +1412,7 @@ class Bn {
1319
1412
  this.lexer.restore_position(n);
1320
1413
  break;
1321
1414
  }
1322
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === qe || this.lexer.pos >= this.selector_end) {
1415
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === $e || this.lexer.pos >= this.selector_end) {
1323
1416
  this.lexer.restore_position(n);
1324
1417
  break;
1325
1418
  }
@@ -1341,7 +1434,7 @@ class Bn {
1341
1434
  let e = [];
1342
1435
  for (; this.lexer.pos < this.selector_end; ) {
1343
1436
  const t = this.lexer.save_position();
1344
- if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === os) break;
1437
+ if (this.lexer.next_token_fast(!1), this.lexer.token_start >= this.selector_end || this.lexer.token_type === cs) break;
1345
1438
  let i = this.parse_simple_selector();
1346
1439
  if (i !== null)
1347
1440
  e.push(i);
@@ -1359,23 +1452,23 @@ class Bn {
1359
1452
  parse_simple_selector() {
1360
1453
  let e = this.lexer.token_type, t = this.lexer.token_start, s = this.lexer.token_end;
1361
1454
  switch (e) {
1362
- case le:
1455
+ case ae:
1363
1456
  return this.parse_type_or_namespace_selector(t, s);
1364
- case Fi:
1365
- return this.create_node(er, t, s);
1366
- case de:
1457
+ case Wi:
1458
+ return this.create_node(or, t, s);
1459
+ case xe:
1367
1460
  let i = this.source.charCodeAt(t);
1368
- return i === nr ? this.parse_class_selector(t) : i === W ? this.parse_universal_or_namespace_selector(t, s) : i === In ? this.create_node(tr, t, s) : i === De ? this.parse_empty_namespace_selector(t) : null;
1369
- case ls:
1461
+ return i === Ar ? this.parse_class_selector(t) : i === j ? this.parse_universal_or_namespace_selector(t, s) : i === Qn ? this.create_node(ar, t, s) : i === ze ? this.parse_empty_namespace_selector(t) : null;
1462
+ case hs:
1370
1463
  return this.parse_attribute_selector(t);
1371
- case Ki:
1464
+ case ji:
1372
1465
  return this.parse_pseudo(t);
1373
- case rt:
1466
+ case ht:
1374
1467
  return this.parse_pseudo_function(t, s);
1375
- case qi:
1376
- return this.create_node(Ke, t, s);
1377
- case ns:
1378
- case qe:
1468
+ case Qi:
1469
+ return this.create_node(Ge, t, s);
1470
+ case as:
1471
+ case $e:
1379
1472
  return null;
1380
1473
  default:
1381
1474
  return null;
@@ -1387,10 +1480,10 @@ class Bn {
1387
1480
  const i = this.lexer.save_position();
1388
1481
  this.lexer.next_token_fast(!1);
1389
1482
  let n;
1390
- if (this.lexer.token_type === le)
1391
- n = hs;
1392
- else if (this.lexer.token_type === de && this.source.charCodeAt(this.lexer.token_start) === W)
1393
- n = cs;
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
+ n = ps;
1394
1487
  else
1395
1488
  return this.lexer.restore_position(i), null;
1396
1489
  let l = this.create_node(n, e, this.lexer.token_end);
@@ -1400,27 +1493,27 @@ class Bn {
1400
1493
  // Called when we've seen an IDENT token
1401
1494
  parse_type_or_namespace_selector(e, t) {
1402
1495
  const s = this.lexer.save_position();
1403
- if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === De) {
1496
+ if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === ze) {
1404
1497
  this.lexer.pos++;
1405
1498
  let i = this.parse_namespace_local_part(e, e, t - e);
1406
1499
  if (i !== null) return i;
1407
1500
  this.lexer.pos = t;
1408
1501
  } else
1409
1502
  this.lexer.restore_position(s);
1410
- return this.create_node(hs, e, t);
1503
+ return this.create_node(fs, e, t);
1411
1504
  }
1412
1505
  // Parse universal selector or namespace selector (*|E or *|*)
1413
1506
  // Called when we've seen a * DELIM token
1414
1507
  parse_universal_or_namespace_selector(e, t) {
1415
1508
  const s = this.lexer.save_position();
1416
- if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === De) {
1509
+ if (this.skip_whitespace(), this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === ze) {
1417
1510
  this.lexer.pos++;
1418
1511
  let i = this.parse_namespace_local_part(e, e, t - e);
1419
1512
  if (i !== null) return i;
1420
1513
  this.lexer.pos = t;
1421
1514
  } else
1422
1515
  this.lexer.restore_position(s);
1423
- return this.create_node(cs, e, t);
1516
+ return this.create_node(ps, e, t);
1424
1517
  }
1425
1518
  // Parse empty namespace selector (|E or |*)
1426
1519
  // Called when we've seen a | DELIM token at the start
@@ -1432,110 +1525,110 @@ class Bn {
1432
1525
  let e = this.lexer.pos, t = this.lexer.line, s = this.lexer.column, i = this.lexer.pos < this.selector_end;
1433
1526
  if (this.skip_whitespace(), i = i && this.lexer.pos > e, this.lexer.pos >= this.selector_end)
1434
1527
  return this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null;
1435
- if (this.lexer.next_token_fast(!1), this.lexer.token_type === de) {
1528
+ if (this.lexer.next_token_fast(!1), this.lexer.token_type === xe) {
1436
1529
  let n = this.source.charCodeAt(this.lexer.token_start);
1437
- if (Dn(n))
1438
- return this.create_node_at(at, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1530
+ if (jn(n))
1531
+ return this.create_node_at(ft, this.lexer.token_start, this.lexer.token_end, this.lexer.token_line, this.lexer.token_column);
1439
1532
  }
1440
- return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(at, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
1533
+ return i ? (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, this.skip_whitespace(), this.create_node_at(ft, e, this.lexer.pos, t, s)) : (this.lexer.pos = e, this.lexer.line = t, this.lexer.column = s, null);
1441
1534
  }
1442
1535
  // Parse class selector (.classname)
1443
1536
  parse_class_selector(e) {
1444
1537
  const t = this.lexer.save_position();
1445
- return this.lexer.next_token_fast(!1), this.lexer.token_type !== le ? (this.lexer.restore_position(t), null) : this.create_node(Ji, e, this.lexer.token_end);
1538
+ return this.lexer.next_token_fast(!1), this.lexer.token_type !== ae ? (this.lexer.restore_position(t), null) : this.create_node(lr, e, this.lexer.token_end);
1446
1539
  }
1447
1540
  // Parse attribute selector ([attr], [attr=value], etc.)
1448
1541
  parse_attribute_selector(e) {
1449
1542
  let t = 1, s = this.lexer.token_end, i = e + 1, n = i;
1450
1543
  for (; this.lexer.pos < this.selector_end && t > 0; ) {
1451
1544
  this.lexer.next_token_fast(!1);
1452
- let o = this.lexer.token_type;
1453
- if (o === ls)
1545
+ let a = this.lexer.token_type;
1546
+ if (a === hs)
1454
1547
  t++;
1455
- else if (o === Bi && (t--, t === 0)) {
1548
+ else if (a === Xi && (t--, t === 0)) {
1456
1549
  n = this.lexer.token_start, s = this.lexer.token_end;
1457
1550
  break;
1458
1551
  }
1459
1552
  }
1460
- let l = this.create_node(Be, e, s);
1553
+ let l = this.create_node(We, e, s);
1461
1554
  return this.parse_attribute_content(l, i, n), l;
1462
1555
  }
1463
1556
  // Parse attribute content to extract name, operator, and value
1464
1557
  parse_attribute_content(e, t, s) {
1465
- if (t = Ae(this.source, t, s), s = zn(this.source, s, t), t >= s) return;
1466
- let i = t, n = t, l = -1, o = -1, h = -1;
1558
+ if (t = be(this.source, t, s), s = el(this.source, s, t), t >= s) return;
1559
+ let i = t, n = t, l = -1, a = -1, h = -1;
1467
1560
  for (; n < s; ) {
1468
- let k = this.source.charCodeAt(n);
1469
- if (se(k) || k === fe || k === ht || k === De || k === Ri || k === bi || k === W)
1561
+ let f = this.source.charCodeAt(n);
1562
+ if (re(f) || f === de || f === pt || f === ze || f === Ui || f === Li || f === j)
1470
1563
  break;
1471
1564
  n++;
1472
1565
  }
1473
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));
1474
- let c = Ae(this.source, n, s);
1475
- if (c >= s) {
1476
- this.arena.set_attr_operator(e, Ci), this.arena.set_attr_flags(e, Pe);
1567
+ let o = be(this.source, n, s);
1568
+ if (o >= s) {
1569
+ this.arena.set_attr_operator(e, ds), this.arena.set_attr_flags(e, Ce);
1477
1570
  return;
1478
1571
  }
1479
- let u = this.source.charCodeAt(c), f = c + 1 < s ? this.source.charCodeAt(c + 1) : 0;
1480
- if (u === fe)
1481
- l = c + 1, this.arena.set_attr_operator(e, wn);
1482
- else if (u === ht && f === fe)
1483
- l = c + 2, this.arena.set_attr_operator(e, yn);
1484
- else if (u === De && f === fe)
1485
- l = c + 2, this.arena.set_attr_operator(e, An);
1486
- else if (u === Ri && f === fe)
1487
- l = c + 2, this.arena.set_attr_operator(e, En);
1488
- else if (u === bi && f === fe)
1489
- l = c + 2, this.arena.set_attr_operator(e, Cn);
1490
- else if (u === W && f === fe)
1491
- l = c + 2, this.arena.set_attr_operator(e, bn);
1572
+ let _ = this.source.charCodeAt(o), p = o + 1 < s ? this.source.charCodeAt(o + 1) : 0;
1573
+ if (_ === de)
1574
+ l = o + 1, this.arena.set_attr_operator(e, fr);
1575
+ else if (_ === pt && p === de)
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)
1580
+ l = o + 2, this.arena.set_attr_operator(e, gr);
1581
+ else if (_ === Li && p === de)
1582
+ l = o + 2, this.arena.set_attr_operator(e, xr);
1583
+ else if (_ === j && p === de)
1584
+ l = o + 2, this.arena.set_attr_operator(e, mr);
1492
1585
  else {
1493
- this.arena.set_attr_operator(e, Ci), this.arena.set_attr_flags(e, Pe);
1586
+ this.arena.set_attr_operator(e, ds), this.arena.set_attr_flags(e, Ce);
1494
1587
  return;
1495
1588
  }
1496
- if (c = Ae(this.source, l, s), c >= s) {
1497
- this.arena.set_attr_flags(e, Pe);
1589
+ if (o = be(this.source, l, s), o >= s) {
1590
+ this.arena.set_attr_flags(e, Ce);
1498
1591
  return;
1499
1592
  }
1500
- o = c;
1501
- let x = this.source.charCodeAt(c);
1502
- if (x === Ln || x === Hn) {
1503
- let k = x;
1504
- for (o = c, c++; c < s; ) {
1505
- let V = this.source.charCodeAt(c);
1506
- if (V === k) {
1507
- c++;
1593
+ a = o;
1594
+ let d = this.source.charCodeAt(o);
1595
+ if (d === Wn || d === Yn) {
1596
+ let f = d;
1597
+ for (a = o, o++; o < s; ) {
1598
+ let N = this.source.charCodeAt(o);
1599
+ if (N === f) {
1600
+ o++;
1508
1601
  break;
1509
1602
  }
1510
- V === 92 ? c += 2 : c++;
1603
+ N === 92 ? o += 2 : o++;
1511
1604
  }
1512
- h = c;
1605
+ h = o;
1513
1606
  } else {
1514
- for (; c < s; ) {
1515
- let k = this.source.charCodeAt(c);
1516
- if (se(k))
1607
+ for (; o < s; ) {
1608
+ let f = this.source.charCodeAt(o);
1609
+ if (re(f))
1517
1610
  break;
1518
- c++;
1611
+ o++;
1519
1612
  }
1520
- h = c;
1613
+ h = o;
1521
1614
  }
1522
- if (h > o && (this.arena.set_value_start_delta(e, o - this.arena.get_start_offset(e)), this.arena.set_value_length(e, h - o)), c = Ae(this.source, h, s), c < s) {
1523
- let k = this.source.charCodeAt(c);
1524
- k === 105 || k === 73 ? this.arena.set_attr_flags(e, Rn) : k === 115 || k === 83 ? this.arena.set_attr_flags(e, vn) : this.arena.set_attr_flags(e, Pe);
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
+ let f = this.source.charCodeAt(o);
1617
+ f === 105 || f === 73 ? this.arena.set_attr_flags(e, kr) : f === 115 || f === 83 ? this.arena.set_attr_flags(e, wr) : this.arena.set_attr_flags(e, Ce);
1525
1618
  } else
1526
- this.arena.set_attr_flags(e, Pe);
1619
+ this.arena.set_attr_flags(e, Ce);
1527
1620
  }
1528
1621
  // Parse pseudo-class or pseudo-element (:hover, ::before)
1529
1622
  parse_pseudo(e) {
1530
1623
  const t = this.lexer.save_position(), s = this.lexer.save_position();
1531
1624
  this.skip_whitespace();
1532
1625
  let i = !1;
1533
- this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Pn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1626
+ this.lexer.pos < this.selector_end && this.source.charCodeAt(this.lexer.pos) === Vn ? (i = !0, this.lexer.pos++) : this.lexer.restore_position(s), this.lexer.next_token_fast(!1);
1534
1627
  let n = this.lexer.token_type;
1535
- if (n === le) {
1536
- let l = this.create_node(i ? Ye : be, e, this.lexer.token_end);
1628
+ if (n === ae) {
1629
+ let l = this.create_node(i ? Ve : Te, e, this.lexer.token_end);
1537
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;
1538
- } else if (n === rt)
1631
+ } else if (n === ht)
1539
1632
  return this.parse_pseudo_function_after_colon(e, i);
1540
1633
  return this.lexer.restore_position(t), null;
1541
1634
  }
@@ -1545,37 +1638,37 @@ class Bn {
1545
1638
  }
1546
1639
  // Parse pseudo-class function after we've seen the colon
1547
1640
  parse_pseudo_function_after_colon(e, t) {
1548
- let s = this.lexer.token_start, i = this.lexer.token_end - 1, n = this.lexer.pos, l = n, o = 1, h = this.lexer.token_end;
1549
- for (; this.lexer.pos < this.selector_end && o > 0; ) {
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
+ for (; this.lexer.pos < this.selector_end && a > 0; ) {
1550
1643
  this.lexer.next_token_fast(!1);
1551
- let u = this.lexer.token_type;
1552
- if (u === $i || u === rt)
1553
- o++;
1554
- else if (u === Gi && (o--, o === 0)) {
1644
+ let _ = this.lexer.token_type;
1645
+ if (_ === Zi || _ === ht)
1646
+ a++;
1647
+ else if (_ === Ji && (a--, a === 0)) {
1555
1648
  l = this.lexer.token_start, h = this.lexer.token_end;
1556
1649
  break;
1557
1650
  }
1558
1651
  }
1559
- let c = this.create_node(t ? Ye : be, e, h);
1560
- if (this.arena.set_content_start_delta(c, s - e), this.arena.set_content_length(c, i - s), this.arena.set_flag(c, rr), l > n) {
1561
- let u = this.source.substring(s, i);
1562
- if (this.is_nth_pseudo(u)) {
1563
- let f = this.parse_nth_expression(n, l);
1564
- f !== null && this.arena.set_first_child(c, f);
1565
- } else if (Y("lang", u))
1566
- this.parse_lang_identifiers(n, l, c);
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, ur), l > n) {
1654
+ let _ = this.source.substring(s, i);
1655
+ if (this.is_nth_pseudo(_)) {
1656
+ let p = this.parse_nth_expression(n, l);
1657
+ p !== null && this.arena.set_first_child(o, p);
1658
+ } else if (V("lang", _))
1659
+ this.parse_lang_identifiers(n, l, o);
1567
1660
  else {
1568
- let f = this.selector_end;
1569
- const x = this.lexer.save_position();
1570
- let k = Y("has", u), V = this.parse_selector(n, l, this.lexer.line, this.lexer.column, k);
1571
- this.selector_end = f, this.lexer.restore_position(x), V !== null && this.arena.set_first_child(c, V);
1661
+ let p = this.selector_end;
1662
+ const d = this.lexer.save_position();
1663
+ let f = V("has", _), N = this.parse_selector(n, l, this.lexer.line, this.lexer.column, f);
1664
+ this.selector_end = p, this.lexer.restore_position(d), N !== null && this.arena.set_first_child(o, N);
1572
1665
  }
1573
1666
  }
1574
- return c;
1667
+ return o;
1575
1668
  }
1576
1669
  // Check if pseudo-class name is an nth-* pseudo
1577
1670
  is_nth_pseudo(e) {
1578
- return Y("nth-child", e) || Y("nth-last-child", e) || Y("nth-of-type", e) || Y("nth-last-of-type", e) || Y("nth-col", e) || Y("nth-last-col", e);
1671
+ return V("nth-child", e) || V("nth-last-child", e) || V("nth-of-type", e) || V("nth-last-of-type", e) || V("nth-col", e) || V("nth-last-col", e);
1579
1672
  }
1580
1673
  // Parse :lang() content - comma-separated language identifiers
1581
1674
  // Accepts both quoted strings: :lang("en", "fr") and unquoted: :lang(en, fr)
@@ -1583,14 +1676,14 @@ class Bn {
1583
1676
  let i = this.selector_end;
1584
1677
  const n = this.lexer.save_position();
1585
1678
  this.lexer.pos = e, this.selector_end = t;
1586
- let l = null, o = null;
1679
+ let l = null, a = null;
1587
1680
  for (; this.lexer.pos < t; ) {
1588
1681
  this.lexer.next_token_fast(!1);
1589
- let h = this.lexer.token_type, c = this.lexer.token_start, u = this.lexer.token_end;
1590
- if (h !== ns && h !== qe) {
1591
- if (h === Mi || h === le) {
1592
- let f = this.create_node(sr, c, u);
1593
- l === null && (l = f), o !== null && this.arena.set_next_sibling(o, f), o = f;
1682
+ let h = this.lexer.token_type, o = this.lexer.token_start, _ = this.lexer.token_end;
1683
+ if (h !== as && h !== $e) {
1684
+ if (h === Yi || h === ae) {
1685
+ let p = this.create_node(hr, o, _);
1686
+ l === null && (l = p), a !== null && this.arena.set_next_sibling(a, p), a = p;
1594
1687
  }
1595
1688
  if (this.lexer.pos >= t)
1596
1689
  break;
@@ -1603,26 +1696,26 @@ class Bn {
1603
1696
  parse_nth_expression(e, t) {
1604
1697
  let s = this.find_of_keyword(e, t);
1605
1698
  if (s !== -1) {
1606
- let n = new vi(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1607
- l = qn(this.source, l, t);
1608
- let o = this.selector_end;
1699
+ let n = new Ii(this.arena, this.source).parse_anplusb(e, s, this.lexer.line), l = s + 2;
1700
+ l = Jn(this.source, l, t);
1701
+ let a = this.selector_end;
1609
1702
  const h = this.lexer.save_position();
1610
1703
  this.selector_end = t, this.lexer.pos = l;
1611
- let c = this.parse_selector_list();
1612
- this.selector_end = o, this.lexer.restore_position(h);
1613
- let u = this.arena.create_node(re, e, t - e, this.lexer.line, 1);
1614
- return n !== null && c !== null ? (this.arena.set_first_child(u, n), this.arena.set_next_sibling(n, c)) : n !== null && this.arena.set_first_child(u, n), u;
1704
+ let o = this.parse_selector_list();
1705
+ this.selector_end = a, this.lexer.restore_position(h);
1706
+ let _ = this.arena.create_node(le, e, t - e, this.lexer.line, 1);
1707
+ return n !== null && o !== null ? (this.arena.set_first_child(_, n), this.arena.set_next_sibling(n, o)) : n !== null && this.arena.set_first_child(_, n), _;
1615
1708
  } else
1616
- return new vi(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1709
+ return new Ii(this.arena, this.source).parse_anplusb(e, t, this.lexer.line);
1617
1710
  }
1618
1711
  // Find the position of standalone "of" keyword (case-insensitive)
1619
1712
  find_of_keyword(e, t) {
1620
1713
  let s = e;
1621
- for (; s < t - 1 && (s = Ae(this.source, s, t), !(s >= t - 1)); ) {
1714
+ for (; s < t - 1 && (s = be(this.source, s, t), !(s >= t - 1)); ) {
1622
1715
  let i = this.source.charCodeAt(s), n = this.source.charCodeAt(s + 1);
1623
1716
  if ((i === 111 || i === 79) && (n === 102 || n === 70)) {
1624
- let l = s === e || se(this.source.charCodeAt(s - 1)), o = s + 2 >= t || se(this.source.charCodeAt(s + 2));
1625
- if (l && o)
1717
+ let l = s === e || re(this.source.charCodeAt(s - 1)), a = s + 2 >= t || re(this.source.charCodeAt(s + 2));
1718
+ if (l && a)
1626
1719
  return s;
1627
1720
  }
1628
1721
  s++;
@@ -1641,13 +1734,13 @@ class Bn {
1641
1734
  skip_whitespace() {
1642
1735
  for (; this.lexer.pos < this.selector_end; ) {
1643
1736
  let e = this.source.charCodeAt(this.lexer.pos);
1644
- if (se(e)) {
1737
+ if (re(e)) {
1645
1738
  this.lexer.advance();
1646
1739
  continue;
1647
1740
  }
1648
- if (e === Se && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === W) {
1741
+ if (e === Ue && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === j) {
1649
1742
  for (this.lexer.advance(2); this.lexer.pos < this.selector_end; ) {
1650
- if (this.source.charCodeAt(this.lexer.pos) === W && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === Se) {
1743
+ if (this.source.charCodeAt(this.lexer.pos) === j && this.lexer.pos + 1 < this.selector_end && this.source.charCodeAt(this.lexer.pos + 1) === Ue) {
1651
1744
  this.lexer.advance(2);
1652
1745
  break;
1653
1746
  }
@@ -1659,34 +1752,34 @@ class Bn {
1659
1752
  }
1660
1753
  }
1661
1754
  }
1662
- function $n(r) {
1663
- const e = new ct(ct.capacity_for_source(r.length)), s = new Bn(e, r).parse_selector(0, r.length);
1755
+ function nl(r) {
1756
+ const e = new dt(dt.capacity_for_source(r.length)), s = new rl(e, r).parse_selector(0, r.length);
1664
1757
  if (s === null) {
1665
- const i = e.create_node(dt, 0, 0, 1, 1);
1666
- return new We(e, r, i);
1758
+ const i = e.create_node(At, 0, 0, 1, 1);
1759
+ return new je(e, r, i);
1667
1760
  }
1668
- return new We(e, r, s);
1761
+ return new je(e, r, s);
1669
1762
  }
1670
- function Gn(r, e) {
1763
+ function ll(r, e) {
1671
1764
  return r[0] === e[0] ? r[1] === e[1] ? r[2] - e[2] : r[1] - e[1] : r[0] - e[0];
1672
1765
  }
1673
- function Ti(r) {
1674
- return r.sort(Gn).at(-1);
1766
+ function Hi(r) {
1767
+ return r.sort(ll).at(-1);
1675
1768
  }
1676
- const _t = (r) => {
1677
- var n, l, o;
1769
+ const gt = (r) => {
1770
+ var n, l, a, h, o;
1678
1771
  let e = 0, t = 0, s = 0, i = r.first_child;
1679
1772
  for (; i; ) {
1680
1773
  switch (i.type) {
1681
- case pr:
1774
+ case Or:
1682
1775
  e += 1;
1683
1776
  break;
1684
- case ps:
1685
- case fr:
1777
+ case kt:
1778
+ case Sr:
1686
1779
  t += 1;
1687
1780
  break;
1688
- case Oe:
1689
- switch (i.name.toLowerCase()) {
1781
+ case Le:
1782
+ switch ((n = i.name) == null ? void 0 : n.toLowerCase()) {
1690
1783
  // "The specificity of a :where() pseudo-class is replaced by zero."
1691
1784
  case "where":
1692
1785
  break;
@@ -1702,9 +1795,9 @@ const _t = (r) => {
1702
1795
  case "has":
1703
1796
  if (i.has_children) {
1704
1797
  const f = i.first_child;
1705
- if ((f == null ? void 0 : f.type) === ds) {
1706
- const x = Ti(Oi(f));
1707
- e += x[0], t += x[1], s += x[2];
1798
+ if ((f == null ? void 0 : f.type) === ms) {
1799
+ const N = Hi(Pi(f));
1800
+ e += N[0], t += N[1], s += N[2];
1708
1801
  }
1709
1802
  }
1710
1803
  break;
@@ -1712,9 +1805,9 @@ const _t = (r) => {
1712
1805
  case "nth-child":
1713
1806
  case "nth-last-child":
1714
1807
  t += 1;
1715
- const c = i.first_child;
1716
- if ((c == null ? void 0 : c.type) === ur && c.selector) {
1717
- const f = Ti(Oi(c.selector));
1808
+ const p = i.first_child;
1809
+ if ((p == null ? void 0 : p.type) === Tr && p.selector) {
1810
+ const f = Hi(Pi(p.selector));
1718
1811
  e += f[0], t += f[1], s += f[2];
1719
1812
  }
1720
1813
  break;
@@ -1723,14 +1816,14 @@ const _t = (r) => {
1723
1816
  case "host-context":
1724
1817
  case "host":
1725
1818
  t += 1;
1726
- const u = (n = i.first_child) == null ? void 0 : n.first_child;
1727
- if ((u == null ? void 0 : u.type) === ce) {
1728
- let f = u.first_child;
1729
- for (; f && f.type !== is; ) {
1730
- const x = _t({
1819
+ const d = (l = i.first_child) == null ? void 0 : l.first_child;
1820
+ if ((d == null ? void 0 : d.type) === me) {
1821
+ let f = d.first_child;
1822
+ for (; f && f.type !== ns; ) {
1823
+ const N = gt({
1731
1824
  first_child: f
1732
1825
  });
1733
- e += x[0] ?? 0, t += x[1] ?? 0, s += x[2] ?? 0, f = f.next_sibling;
1826
+ e += N[0] ?? 0, t += N[1] ?? 0, s += N[2] ?? 0, f = f.next_sibling;
1734
1827
  }
1735
1828
  }
1736
1829
  break;
@@ -1747,19 +1840,19 @@ const _t = (r) => {
1747
1840
  break;
1748
1841
  }
1749
1842
  break;
1750
- case us:
1751
- switch (i.name.toLowerCase()) {
1843
+ case Qe:
1844
+ switch ((a = i.name) == null ? void 0 : a.toLowerCase()) {
1752
1845
  // "The specificity of ::slotted() is that of a pseudo-element, plus the specificity of its argument."
1753
1846
  case "slotted":
1754
1847
  s += 1;
1755
- const c = (l = i.first_child) == null ? void 0 : l.first_child;
1756
- if ((c == null ? void 0 : c.type) === ce) {
1757
- let u = c.first_child;
1758
- for (; u && u.type !== is; ) {
1759
- const f = _t({
1760
- first_child: u
1848
+ const p = (h = i.first_child) == null ? void 0 : h.first_child;
1849
+ if ((p == null ? void 0 : p.type) === me) {
1850
+ let d = p.first_child;
1851
+ for (; d && d.type !== ns; ) {
1852
+ const f = gt({
1853
+ first_child: d
1761
1854
  });
1762
- e += f[0] ?? 0, t += f[1] ?? 0, s += f[2] ?? 0, u = u.next_sibling;
1855
+ e += f[0] ?? 0, t += f[1] ?? 0, s += f[2] ?? 0, d = d.next_sibling;
1763
1856
  }
1764
1857
  }
1765
1858
  break;
@@ -1776,37 +1869,37 @@ const _t = (r) => {
1776
1869
  break;
1777
1870
  }
1778
1871
  break;
1779
- case fs:
1780
- let h = i.name ?? "";
1781
- h.includes("|") && (h = h.split("|")[1] ?? ""), h !== "*" && (s += 1);
1872
+ case xs:
1873
+ let _ = i.name ?? "";
1874
+ _.includes("|") && (_ = _.split("|")[1] ?? ""), _ !== "*" && (s += 1);
1782
1875
  break;
1783
1876
  }
1784
1877
  i = i.next_sibling;
1785
1878
  }
1786
1879
  return [e, t, s];
1787
- }, Yn = (r) => {
1880
+ }, ol = (r) => {
1788
1881
  if (typeof r == "string")
1789
1882
  try {
1790
- return $n(r);
1883
+ return nl(r);
1791
1884
  } catch (e) {
1792
1885
  const t = e instanceof Error ? e.message : String(e);
1793
1886
  throw new TypeError(`Could not convert passed in source '${r}' to SelectorList: ${t}`);
1794
1887
  }
1795
1888
  if (r instanceof Object) {
1796
- if (r.type === ds)
1889
+ if (r.type === ms)
1797
1890
  return r;
1798
1891
  throw new TypeError("Passed in source is an Object but no AST / AST of the type SelectorList");
1799
1892
  }
1800
1893
  throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.");
1801
- }, Oi = (r) => {
1894
+ }, Pi = (r) => {
1802
1895
  if (!r)
1803
1896
  return [];
1804
- const e = Yn(r), t = [];
1897
+ const e = ol(r), t = [];
1805
1898
  let s = e.first_child;
1806
1899
  for (; s; )
1807
- t.push(_t(s)), s = s.next_sibling;
1900
+ t.push(gt(s)), s = s.next_sibling;
1808
1901
  return t;
1809
- }, Wn = new $([
1902
+ }, al = new W([
1810
1903
  // CSS Named Colors
1811
1904
  // Spec: https://drafts.csswg.org/css-color/#named-colors
1812
1905
  // Heuristic: popular names first for quick finding in set.has()
@@ -1959,7 +2052,7 @@ const _t = (r) => {
1959
2052
  "mediumorchid",
1960
2053
  "darksalmon",
1961
2054
  "mediumspringgreen"
1962
- ]), Qn = new $([
2055
+ ]), hl = new W([
1963
2056
  // CSS System Colors
1964
2057
  // Spec: https://drafts.csswg.org/css-color/#css-system-colors
1965
2058
  "accentcolor",
@@ -1981,7 +2074,7 @@ const _t = (r) => {
1981
2074
  "selecteditem",
1982
2075
  "selecteditemtext",
1983
2076
  "visitedtext"
1984
- ]), Vn = new $(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), jn = new $(["transparent", "currentcolor"]), ut = new $([
2077
+ ]), cl = new W(["rgba", "rgb", "hsla", "hsl", "oklch", "color", "hwb", "lch", "lab", "oklab"]), _l = new W(["transparent", "currentcolor"]), xt = new W([
1985
2078
  "auto",
1986
2079
  "none",
1987
2080
  // for `text-shadow`, `box-shadow` and `background`
@@ -1991,13 +2084,13 @@ const _t = (r) => {
1991
2084
  "revert",
1992
2085
  "revert-layer"
1993
2086
  ]);
1994
- function Xn(r) {
2087
+ function ul(r) {
1995
2088
  for (let e of r.children)
1996
- if (!(e.type === _s && e.value === 0) && !(e.type === ft && e.value === 0))
2089
+ if (!(e.type === gs && e.value === 0) && !(e.type === mt && e.value === 0))
1997
2090
  return !1;
1998
2091
  return !0;
1999
2092
  }
2000
- const ts = new $(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), Zn = new $([
2093
+ const is = new W(["caption", "icon", "menu", "message-box", "small-caption", "status-bar"]), fl = new W([
2001
2094
  /* <absolute-size> values */
2002
2095
  "xx-small",
2003
2096
  "x-small",
@@ -2010,45 +2103,46 @@ const ts = new $(["caption", "icon", "menu", "message-box", "small-caption", "st
2010
2103
  /* <relative-size> values */
2011
2104
  "smaller",
2012
2105
  "larger"
2013
- ]), Jn = 44, Si = 47;
2014
- function el(r, e) {
2106
+ ]), pl = 44, Di = 47;
2107
+ function dl(r, e) {
2108
+ var a;
2015
2109
  let t = [void 0, void 0], s, i;
2016
- if (r.first_child.type === gs && r.first_child.name.toLowerCase() === "var")
2110
+ if (r.first_child.type === ks && ((a = r.first_child.name) == null ? void 0 : a.toLowerCase()) === "var")
2017
2111
  return null;
2018
2112
  let n;
2019
- for (let o of r.children) {
2020
- let h = o.next_sibling;
2021
- if (o.type === he && ut.has(o.name) && e({
2113
+ for (let h of r.children) {
2114
+ let o = h.next_sibling;
2115
+ if (h.type === _e && xt.has(h.name) && e({
2022
2116
  type: "keyword",
2023
- value: o.name
2024
- }), h && h.type === Ee && h.text.charCodeAt(0) === Si) {
2025
- s = o.text, n = o;
2117
+ value: h.name
2118
+ }), o && o.type === Re && o.text.charCodeAt(0) === Di) {
2119
+ s = h.text, n = h;
2026
2120
  continue;
2027
2121
  }
2028
- if ((n == null ? void 0 : n.type) === Ee && n.text.charCodeAt(0) === Si) {
2029
- i = o.text, n = o;
2122
+ if ((n == null ? void 0 : n.type) === Re && n.text.charCodeAt(0) === Di) {
2123
+ i = h.text, n = h;
2030
2124
  continue;
2031
2125
  }
2032
- if ((h == null ? void 0 : h.type) === Ee && h.text.charCodeAt(0) === Jn && !t[0]) {
2033
- t[0] = o, !s && n && (s = n.text), n = o;
2126
+ if ((o == null ? void 0 : o.type) === Re && o.text.charCodeAt(0) === pl && !t[0]) {
2127
+ t[0] = h, !s && n && (s = n.text), n = h;
2034
2128
  continue;
2035
2129
  }
2036
- if (o.next_sibling === null) {
2037
- t[1] = o, !s && !t[0] && n && (s = n.text), n = o;
2130
+ if (h.next_sibling === null) {
2131
+ t[1] = h, !s && !t[0] && n && (s = n.text), n = h;
2038
2132
  continue;
2039
2133
  }
2040
- if (o.type === _s) {
2041
- n = o;
2134
+ if (h.type === gs) {
2135
+ n = h;
2042
2136
  continue;
2043
2137
  }
2044
- if (o.type === he) {
2045
- let c = o.name;
2046
- if (Zn.has(c)) {
2047
- s = c, n = o;
2138
+ if (h.type === _e) {
2139
+ let _ = h.name;
2140
+ if (_ && fl.has(_)) {
2141
+ s = _, n = h;
2048
2142
  continue;
2049
2143
  }
2050
2144
  }
2051
- n = o;
2145
+ n = h;
2052
2146
  }
2053
2147
  let l = t[0] || t[1] ? r.text.substring(
2054
2148
  ((t == null ? void 0 : t[0]) || (t == null ? void 0 : t[1]) || { start: r.start }).start - r.start,
@@ -2062,98 +2156,96 @@ function el(r, e) {
2062
2156
  font_family: l
2063
2157
  };
2064
2158
  }
2065
- const tl = new $(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), sl = new $(["cubic-bezier", "steps"]);
2066
- function il(r, e) {
2159
+ const gl = new W(["linear", "ease", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end"]), xl = new W(["cubic-bezier", "steps"]);
2160
+ function ml(r, e) {
2067
2161
  let t = !1;
2068
2162
  for (let s of r) {
2069
2163
  let i = s.type, n = s.name;
2070
- i === Ee ? t = !1 : i === ft && t === !1 ? (t = !0, e({
2164
+ i === Re ? t = !1 : i === mt && t === !1 ? (t = !0, e({
2071
2165
  type: "duration",
2072
2166
  value: s
2073
- })) : i === he ? tl.has(n) ? e({
2167
+ })) : i === _e && n ? gl.has(n) ? e({
2074
2168
  type: "fn",
2075
2169
  value: s
2076
- }) : ut.has(n) && e({
2170
+ }) : xt.has(n) && e({
2077
2171
  type: "keyword",
2078
2172
  value: s
2079
- }) : i === gs && sl.has(n) && e({
2173
+ }) : i === ks && n && xl.has(n) && e({
2080
2174
  type: "fn",
2081
2175
  value: s
2082
2176
  });
2083
2177
  }
2084
2178
  }
2085
- function rl(r) {
2086
- let e = !1;
2087
- return B(r, function(t) {
2088
- if (t.is_vendor_prefixed)
2089
- return e = !0, Q;
2090
- }), e;
2179
+ function kl(r, e) {
2180
+ z(r, function(t) {
2181
+ t.is_vendor_prefixed && e(t.name || t.text);
2182
+ });
2091
2183
  }
2092
- var oe, Z, J, Re;
2093
- class p {
2184
+ var he, ee, te, Se;
2185
+ class u {
2094
2186
  constructor(e = !1) {
2095
- G(this, oe);
2096
- G(this, Z);
2097
- G(this, J, []);
2098
- G(this, Re);
2099
- M(this, oe, /* @__PURE__ */ new Map()), M(this, Z, 0), e && M(this, J, []), M(this, Re, e);
2187
+ Y(this, he);
2188
+ Y(this, ee);
2189
+ Y(this, te, []);
2190
+ Y(this, Se);
2191
+ q(this, he, /* @__PURE__ */ new Map()), q(this, ee, 0), e && q(this, te, []), q(this, Se, e);
2100
2192
  }
2101
2193
  p(e, t) {
2102
- let s = w(this, Z);
2103
- if (w(this, Re)) {
2194
+ let s = w(this, ee);
2195
+ if (w(this, Se)) {
2104
2196
  let i = s * 4;
2105
- w(this, J)[i] = t.line, w(this, J)[i + 1] = t.column, w(this, J)[i + 2] = t.offset, w(this, J)[i + 3] = t.length;
2197
+ w(this, te)[i] = t.line, w(this, te)[i + 1] = t.column, w(this, te)[i + 2] = t.offset, w(this, te)[i + 3] = t.length;
2106
2198
  }
2107
- if (w(this, oe).has(e)) {
2108
- w(this, oe).get(e).push(s), Vt(this, Z)._++;
2199
+ if (w(this, he).has(e)) {
2200
+ w(this, he).get(e).push(s), Xt(this, ee)._++;
2109
2201
  return;
2110
2202
  }
2111
- w(this, oe).set(e, [s]), Vt(this, Z)._++;
2203
+ w(this, he).set(e, [s]), Xt(this, ee)._++;
2112
2204
  }
2113
2205
  size() {
2114
- return w(this, Z);
2206
+ return w(this, ee);
2115
2207
  }
2116
2208
  c() {
2117
- let e = /* @__PURE__ */ new Map(), t = {}, s = w(this, Re), i = w(this, oe), n = w(this, J), l = i.size;
2118
- i.forEach((h, c) => {
2209
+ let e = /* @__PURE__ */ new Map(), t = {}, s = w(this, Se), i = w(this, he), n = w(this, te), l = i.size;
2210
+ i.forEach((h, o) => {
2119
2211
  if (s) {
2120
- let u = h.map(function(f) {
2121
- let x = f * 4;
2212
+ let _ = h.map(function(p) {
2213
+ let d = p * 4;
2122
2214
  return {
2123
- line: n[x],
2124
- column: n[x + 1],
2125
- offset: n[x + 2],
2126
- length: n[x + 3]
2215
+ line: n[d],
2216
+ column: n[d + 1],
2217
+ offset: n[d + 2],
2218
+ length: n[d + 3]
2127
2219
  };
2128
2220
  });
2129
- e.set(c, u);
2221
+ e.set(o, _);
2130
2222
  } else
2131
- t[c] = h.length;
2223
+ t[o] = h.length;
2132
2224
  });
2133
- let o = w(this, Z);
2225
+ let a = w(this, ee);
2134
2226
  return s ? {
2135
- total: o,
2227
+ total: a,
2136
2228
  totalUnique: l,
2137
2229
  unique: t,
2138
- uniquenessRatio: o === 0 ? 0 : l / o,
2230
+ uniquenessRatio: a === 0 ? 0 : l / a,
2139
2231
  uniqueWithLocations: Object.fromEntries(e)
2140
2232
  } : {
2141
- total: o,
2233
+ total: a,
2142
2234
  totalUnique: l,
2143
2235
  unique: t,
2144
- uniquenessRatio: o === 0 ? 0 : l / o,
2236
+ uniquenessRatio: a === 0 ? 0 : l / a,
2145
2237
  uniqueWithLocations: void 0
2146
2238
  };
2147
2239
  }
2148
2240
  }
2149
- oe = new WeakMap(), Z = new WeakMap(), J = new WeakMap(), Re = new WeakMap();
2150
- var ve, ae, Qe;
2151
- class ss {
2241
+ he = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), Se = new WeakMap();
2242
+ var Oe, ce, Xe;
2243
+ class rs {
2152
2244
  constructor(e) {
2153
- G(this, ve);
2154
- G(this, ae);
2155
- G(this, Qe);
2156
- M(this, ve, new p(e)), M(this, ae, /* @__PURE__ */ new Map()), M(this, Qe, e);
2245
+ Y(this, Oe);
2246
+ Y(this, ce);
2247
+ Y(this, Xe);
2248
+ q(this, Oe, new u(e)), q(this, ce, /* @__PURE__ */ new Map()), q(this, Xe, e);
2157
2249
  }
2158
2250
  /**
2159
2251
  * Add an item to this #list's context
@@ -2162,45 +2254,45 @@ class ss {
2162
2254
  * @param node_location
2163
2255
  */
2164
2256
  push(e, t, s) {
2165
- w(this, ve).p(e, s), w(this, ae).has(t) || w(this, ae).set(t, new p(w(this, Qe))), w(this, ae).get(t).p(e, s);
2257
+ w(this, Oe).p(e, s), w(this, ce).has(t) || w(this, ce).set(t, new u(w(this, Xe))), w(this, ce).get(t).p(e, s);
2166
2258
  }
2167
2259
  count() {
2168
2260
  let e = /* @__PURE__ */ new Map();
2169
- for (let [t, s] of w(this, ae).entries())
2261
+ for (let [t, s] of w(this, ce).entries())
2170
2262
  e.set(t, s.c());
2171
- return Object.assign(w(this, ve).c(), {
2263
+ return Object.assign(w(this, Oe).c(), {
2172
2264
  itemsPerContext: Object.fromEntries(e)
2173
2265
  });
2174
2266
  }
2175
2267
  }
2176
- ve = new WeakMap(), ae = new WeakMap(), Qe = new WeakMap();
2177
- function nl(r) {
2268
+ Oe = new WeakMap(), ce = new WeakMap(), Xe = new WeakMap();
2269
+ function wl(r) {
2178
2270
  let e = /* @__PURE__ */ new Map(), t = -1, s = 0, i = 0, n = r.length;
2179
2271
  for (let l = 0; l < n; l++) {
2180
- let o = r[l], h = (e.get(o) || 0) + 1;
2181
- e.set(o, h), h > t && (t = h, s = 0, i = 0), h >= t && (s++, i += o);
2272
+ let a = r[l], h = (e.get(a) || 0) + 1;
2273
+ e.set(a, h), h > t && (t = h, s = 0, i = 0), h >= t && (s++, i += a);
2182
2274
  }
2183
2275
  return i / s;
2184
2276
  }
2185
- var ee, Te;
2186
- class L {
2277
+ var se, Ne;
2278
+ class I {
2187
2279
  constructor() {
2188
- G(this, ee);
2189
- G(this, Te);
2190
- M(this, ee, []), M(this, Te, 0);
2280
+ Y(this, se);
2281
+ Y(this, Ne);
2282
+ q(this, se, []), q(this, Ne, 0);
2191
2283
  }
2192
2284
  /**
2193
2285
  * Add a new Integer at the end of this AggregateCollection
2194
2286
  * @param item - The item to add
2195
2287
  */
2196
2288
  push(e) {
2197
- w(this, ee).push(e), M(this, Te, w(this, Te) + e);
2289
+ w(this, se).push(e), q(this, Ne, w(this, Ne) + e);
2198
2290
  }
2199
2291
  size() {
2200
- return w(this, ee).length;
2292
+ return w(this, se).length;
2201
2293
  }
2202
2294
  aggregate() {
2203
- let e = w(this, ee).length;
2295
+ let e = w(this, se).length;
2204
2296
  if (e === 0)
2205
2297
  return {
2206
2298
  min: 0,
@@ -2210,7 +2302,7 @@ class L {
2210
2302
  range: 0,
2211
2303
  sum: 0
2212
2304
  };
2213
- let t = w(this, ee).slice().sort((o, h) => o - h), s = t[0], i = t[e - 1], n = nl(t), l = w(this, Te);
2305
+ let t = w(this, se).slice().sort((a, h) => a - h), s = t[0], i = t[e - 1], n = wl(t), l = w(this, Ne);
2214
2306
  return {
2215
2307
  min: s,
2216
2308
  max: i,
@@ -2221,59 +2313,46 @@ class L {
2221
2313
  };
2222
2314
  }
2223
2315
  toArray() {
2224
- return w(this, ee);
2316
+ return w(this, se);
2225
2317
  }
2226
2318
  }
2227
- ee = new WeakMap(), Te = new WeakMap();
2228
- function ll(r) {
2229
- return r.replaceAll(/(?:^['"])|(?:['"]$)/g, "");
2230
- }
2231
- function ol(r, e) {
2232
- return e >= 65 && e <= 90 && (e = e | 32), r === e;
2233
- }
2234
- function Ge(r, e) {
2235
- if (r === e) return !0;
2236
- let t = e.length, s = t - r.length;
2237
- if (s < 0)
2238
- return !1;
2239
- for (let i = t - 1; i >= s; i--)
2240
- if (ol(r.charCodeAt(i - s), e.charCodeAt(i)) === !1)
2241
- return !1;
2242
- return !0;
2243
- }
2244
- function fl(r) {
2245
- if (xs(r) || ms(r)) return !1;
2246
- let e = r.charCodeAt(0);
2247
- return e === 47 || // /
2248
- e === 42 || // *
2249
- e === 95 || // _
2250
- e === 43 || // +
2251
- e === 38 || // &
2252
- e === 36 || // $
2253
- e === 35;
2254
- }
2255
- function m(r, e) {
2256
- return xs(e) ? !1 : Ge(r, e);
2257
- }
2258
- function al(r) {
2259
- return ms(r) ? r.slice(r.indexOf("-", 2) + 1) : r;
2260
- }
2261
- function hl(r) {
2319
+ se = new WeakMap(), Ne = new WeakMap();
2320
+ function Al(r) {
2262
2321
  let e = 5, t = r.indexOf(";"), s = r.indexOf(",");
2263
2322
  return t === -1 || s !== -1 && s < t ? r.substring(e, s) : r.substring(e, t);
2264
2323
  }
2265
- function Ni(r) {
2324
+ function Fi(r) {
2266
2325
  let e = r.children;
2267
2326
  if (e) {
2268
2327
  let t = e.at(-1);
2269
- return !!(t && t.type === he && Ge("\\9", t.text));
2328
+ return !!(t && t.type === _e && ls("\\9", t.text));
2270
2329
  }
2271
2330
  return !1;
2272
2331
  }
2273
- function pl(r) {
2274
- return ms(r);
2275
- }
2276
- let cl = new $([
2332
+ const El = /* @__PURE__ */ new Set([
2333
+ "margin",
2334
+ "margin-block",
2335
+ "margin-inline",
2336
+ "margin-top",
2337
+ "margin-block-start",
2338
+ "margin-block-end",
2339
+ "margin-inline-end",
2340
+ "margin-inline-end",
2341
+ "margin-right",
2342
+ "margin-bottom",
2343
+ "margin-left",
2344
+ "padding",
2345
+ "padding-block",
2346
+ "padding-inline",
2347
+ "padding-top",
2348
+ "padding-right",
2349
+ "padding-bottom",
2350
+ "padding-left",
2351
+ "padding-block-start",
2352
+ "padding-block-end",
2353
+ "padding-inline-start",
2354
+ "padding-inline-end"
2355
+ ]), yl = new W([
2277
2356
  "border-radius",
2278
2357
  "border-top-left-radius",
2279
2358
  "border-top-right-radius",
@@ -2284,253 +2363,288 @@ let cl = new $([
2284
2363
  "border-end-end-radius",
2285
2364
  "border-end-start-radius"
2286
2365
  ]);
2366
+ function Cl(r) {
2367
+ if (ws(r) || As(r)) return !1;
2368
+ let e = r.charCodeAt(0);
2369
+ return e === 47 || // /
2370
+ e === 42 || // *
2371
+ e === 95 || // _
2372
+ e === 43 || // +
2373
+ e === 38 || // &
2374
+ e === 36 || // $
2375
+ e === 35;
2376
+ }
2377
+ function Mi(r) {
2378
+ return ws(r) ? r : As(r) ? r.slice(r.indexOf("-", 2) + 1).toLowerCase() : Cl(r) ? r.slice(1).toLowerCase() : r.toLowerCase();
2379
+ }
2380
+ function vl(r) {
2381
+ return As(r);
2382
+ }
2287
2383
  function H(r, e) {
2288
2384
  return e === 0 ? 0 : r / e;
2289
2385
  }
2290
- function dl(r, e = {}) {
2291
- return e.useLocations === !0 ? Ui(r, e, !0) : Ui(r, e, !1);
2386
+ function Tl(r, e = {}) {
2387
+ return e.useLocations === !0 ? zi(r, e, !0) : zi(r, e, !1);
2292
2388
  }
2293
- function Ui(r, e, t) {
2294
- let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, o = 0, h = {
2389
+ function zi(r, e, t) {
2390
+ let s = Date.now(), i = (r.match(/\n/g) || []).length + 1, n = 0, l = 0, a = 0, h = {
2295
2391
  total: 0,
2296
2392
  unique: /* @__PURE__ */ new Map()
2297
- }, c = Date.now(), u = dr(r, {
2298
- on_comment({ length: a }) {
2299
- n++, l += a;
2393
+ }, o = Date.now(), _ = Nr(r, {
2394
+ on_comment({ length: c }) {
2395
+ n++, l += c;
2300
2396
  }
2301
- }), f = Date.now(), x = new p(t), k = new L(), V = [], ws = new p(t), Ve = new p(t), ys = new p(t), As = new p(t), Es = new p(t), Cs = new p(t), bs = new p(t), gt = new p(t), Rs = new p(t), xt = new p(t), mt = new p(t), vs = new p(t), je = new p(t), Ts = new p(t), kt = new L(), Os = new p(t), wt = 0, yt = 0, At = new L(), Et = new L(), Ct = new L(), Ss = new p(t), Ns = new p(t), Us = new p(t), bt = new L(), Ls = new p(t), Rt = new p(t), Hs = /* @__PURE__ */ new Set(), vt = new p(t), _e, ue, Is = new L(), Ps = new L(), Ds = new L(), Fs = new p(t), Xe = new L(), Ms = new p(t), qs = [], Tt = new p(t), Ot = new p(t), zs = new p(t), Ks = new p(t), St = new L(), Bs = new p(t), $s = /* @__PURE__ */ new Set(), Ne = 0, Gs = new L(), Ze = 0, Nt = 0, Ut = new p(t), Lt = new L(), Ys = new p(t), Ue = new p(t), Ht = new p(t), It = new p(t), Je = new p(t), Le = new L(), Pt = new L(), Ws = new p(t), Dt = new p(t), Qs = new p(t), Vs = new p(t), js = new p(t), Ft = new p(t), Mt = new p(t), qt = new p(t), zt = new p(t), Kt = new p(t), xe = new ss(t), me = new p(t), Xs = new ss(t), Zs = new p(t), He = new p(t), Js = new ss(t), ei = new p(t);
2302
- function y(a) {
2397
+ }), p = Date.now(), d = new u(t), f = new I(), N = [], Cs = new u(t), Ze = new u(t), bs = new u(t), Rs = new u(t), vs = new u(t), Ts = new u(t), Ss = new u(t), Et = new u(t), Os = new u(t), yt = new u(t), Ct = new u(t), Ns = new u(t), Je = new u(t), Ls = new u(t), bt = new I(), Us = new u(t), Rt = 0, vt = 0, Tt = new I(), St = new I(), Ot = new I(), Is = new u(t), Hs = new u(t), Ps = new u(t), Nt = new I(), Ds = new u(t), Lt = new u(t), Fs = /* @__PURE__ */ new Set(), Ut = new u(t), ue, fe, Ms = new I(), zs = new I(), qs = new I(), Ks = new u(t), et = new I(), $s = new u(t), Bs = [], It = new u(t), Ht = new u(t), Gs = new u(t), Ws = new u(t), Ys = new u(t), Qs = new u(t), Pt = new I(), Vs = new u(t), js = /* @__PURE__ */ new Set(), Ie = 0, Xs = new I(), tt = 0, Dt = 0, Ft = new u(t), Mt = new I(), Zs = new u(t), He = new u(t), zt = new u(t), qt = new u(t), st = new u(t), Pe = new I(), Kt = new I(), Js = new u(t), $t = new u(t), ei = new u(t), ti = new u(t), si = new u(t), Bt = new u(t), it = new u(t), rt = new u(t), Gt = new u(t), nt = new u(t), we = new rs(t), Ae = new u(t), ii = new rs(t), ri = new u(t), De = new u(t), ni = new rs(t), li = new u(t);
2398
+ function A(c) {
2303
2399
  return {
2304
- line: a.line,
2305
- column: a.column,
2306
- offset: a.start,
2307
- length: a.length
2400
+ line: c.line,
2401
+ column: c.column,
2402
+ offset: c.start,
2403
+ length: c.length
2308
2404
  };
2309
2405
  }
2310
- let ke = -1;
2311
- B(u, (a, D) => {
2312
- var ci, _i, ui, fi;
2313
- ke >= 0 && D <= ke && (ke = -1);
2314
- let Wt = ke >= 0 && D > ke;
2315
- if (a.type === gr) {
2316
- let T = y(a);
2317
- if (kt.push(D), Os.p(D, T), x.p(a.name, T), P("font-face", a.name)) {
2318
- let E = /* @__PURE__ */ Object.create(null);
2319
- t && ws.p(a.start, y(a));
2320
- let R = a.children.find((d) => d.type === xr);
2321
- for (let d of (R == null ? void 0 : R.children) || [])
2322
- d.type === jt && d.value && (E[d.property] = d.value.text);
2323
- k.push(1), V.push(E);
2406
+ let Ee = -1;
2407
+ z(_, (c, F) => {
2408
+ var gi, xi, mi, ki, wi;
2409
+ Ee >= 0 && F <= Ee && (Ee = -1);
2410
+ let jt = Ee >= 0 && F > Ee;
2411
+ if (c.type === Lr) {
2412
+ let R = A(c);
2413
+ bt.push(F), Us.p(F, R);
2414
+ let C = Mi(c.name ?? "");
2415
+ if (d.p(C, R), C === "font-face") {
2416
+ let k = /* @__PURE__ */ Object.create(null);
2417
+ t && Cs.p(c.start, A(c));
2418
+ let g = c.children.find((E) => E.type === Ur);
2419
+ for (let E of (g == null ? void 0 : g.children) || [])
2420
+ E.type === Zt && E.value && (k[E.property] = E.value.text);
2421
+ f.push(1), N.push(k);
2324
2422
  }
2325
- if (a.prelude === null || a.prelude === void 0)
2326
- P("layer", a.name) && (Ve.p("<anonymous>", y(a)), k.push(2));
2423
+ if (c.prelude === null || c.prelude === void 0)
2424
+ C === "layer" && (Ze.p("<anonymous>", A(c)), f.push(2));
2327
2425
  else {
2328
- let { name: E } = a, R = 1;
2329
- if (P("media", E))
2330
- As.p(a.prelude.text, y(a)), br(a.prelude) && (Es.p(a.prelude.text, y(a)), R++);
2331
- else if (P("supports", E))
2332
- gt.p(a.prelude.text, y(a)), Cr(a.prelude) && (Rs.p(a.prelude.text, y(a)), R++);
2333
- else if (Ge("keyframes", E)) {
2334
- let d = `@${E} ${a.prelude.text}`;
2335
- xt.p(d, y(a)), a.is_vendor_prefixed && (mt.p(d, y(a)), R++), ke = D;
2336
- } else if (P("layer", E))
2337
- for (let d of a.prelude.text.split(",").map((_) => _.trim()))
2338
- Ve.p(d, y(a));
2339
- else if (P("import", E)) {
2340
- if (ys.p(a.prelude.text, y(a)), a.prelude.has_children)
2341
- for (let d of a.prelude)
2342
- d.type === Hi && typeof d.value == "string" ? gt.p(d.value, y(d)) : d.type === mr && typeof d.value == "string" && Ve.p(d.value, y(d));
2343
- } else P("container", E) ? (vs.p(a.prelude.text, y(a)), ((ci = a.prelude.first_child) == null ? void 0 : ci.type) === kr && ((_i = a.prelude.first_child.first_child) == null ? void 0 : _i.type) === he && je.p(a.prelude.first_child.first_child.text, y(a))) : P("property", E) ? Ts.p(a.prelude.text, y(a)) : P("charset", E) && bs.p(a.prelude.text, y(a));
2344
- k.push(R);
2426
+ let k = 1;
2427
+ if (C === "media")
2428
+ Rs.p(c.prelude.text, A(c)), zr(c.prelude, (g) => {
2429
+ vs.p(g, A(c)), k++;
2430
+ });
2431
+ else if (C === "supports")
2432
+ Et.p(c.prelude.text, A(c)), Mr(c.prelude, (g) => {
2433
+ Os.p(g, A(c)), k++;
2434
+ });
2435
+ else if (C.endsWith("keyframes")) {
2436
+ let g = c.prelude.text;
2437
+ yt.p(g, A(c)), c.is_vendor_prefixed && (Ct.p(`@${(gi = c.name) == null ? void 0 : gi.toLowerCase()} ${c.prelude.text}`, A(c)), k++), Ee = F;
2438
+ } else if (C === "layer")
2439
+ for (let g of c.prelude.text.split(",").map((E) => E.trim()))
2440
+ Ze.p(g, A(c));
2441
+ else if (C === "import") {
2442
+ if (bs.p(c.prelude.text, A(c)), c.prelude.has_children)
2443
+ for (let g of c.prelude)
2444
+ g.type === Ki && typeof g.value == "string" ? Et.p(g.value, A(g)) : g.type === Ir && typeof g.value == "string" && Ze.p(g.value, A(g));
2445
+ } else C === "container" ? (Ns.p(c.prelude.text, A(c)), ((xi = c.prelude.first_child) == null ? void 0 : xi.type) === Hr && ((mi = c.prelude.first_child.first_child) == null ? void 0 : mi.type) === _e && Je.p(c.prelude.first_child.first_child.text, A(c))) : C === "property" ? Ls.p(c.prelude.text, A(c)) : C === "charset" && Ss.p(c.prelude.text.toLowerCase(), A(c));
2446
+ f.push(k);
2345
2447
  }
2346
- } else if (a.type === wr)
2347
- if (Wt && a.prelude) {
2348
- if (a.prelude.type === ds && a.prelude.children.length > 0)
2349
- for (let T of a.prelude.children)
2350
- Rt.p(T.text, y(T));
2448
+ } else if (c.type === Pr)
2449
+ if (jt && c.prelude) {
2450
+ if (c.prelude.type === ms && c.prelude.children.length > 0)
2451
+ for (let R of c.prelude.children)
2452
+ Lt.p(R.text, A(R));
2351
2453
  } else {
2352
- wt++, (ui = a.block) != null && ui.is_empty && yt++;
2353
- let T = 0, E = 0, R = y(a);
2354
- if (a.prelude)
2355
- for (const d of a.prelude.children)
2356
- d.type === ce && T++;
2357
- if (a.block)
2358
- for (const d of a.block.children)
2359
- d.type === jt && E++;
2360
- At.push(T + E), Ss.p(T + E, R), Et.push(T), Ns.p(T, R), Ct.push(E), Us.p(E, R), bt.push(D), Ls.p(D, R);
2454
+ Rt++, (ki = c.block) != null && ki.is_empty && vt++;
2455
+ let R = 0, C = 0, k = A(c);
2456
+ if (c.prelude)
2457
+ for (const g of c.prelude.children)
2458
+ g.type === me && R++;
2459
+ if (c.block)
2460
+ for (const g of c.block.children)
2461
+ g.type === Zt && C++;
2462
+ Tt.push(R + C), Is.p(R + C, k), St.push(R), Hs.p(R, k), Ot.push(C), Ps.p(C, k), Nt.push(F), Ds.p(F, k);
2361
2463
  }
2362
- else if (a.type === ce) {
2363
- if (Wt)
2364
- return I;
2365
- let T = y(a);
2366
- St.push(D > 0 ? D - 1 : 0), Bs.p(D > 0 ? D - 1 : 0, T), Hs.add(a.text);
2367
- let E = rs(a);
2368
- Xe.push(E), Ms.p(E, T), Rr(a) && vt.p(a.text, T), Di(a) && Ot.p(a.text, T);
2369
- let R = vr(a);
2370
- if (R !== !1)
2371
- for (let j of R)
2372
- zs.p(j, T);
2373
- Tr(a, function(O) {
2374
- let U = O.name.trim() === "" ? " " : O.name;
2375
- Ks.p(U, O.loc);
2464
+ else if (c.type === me) {
2465
+ if (jt)
2466
+ return P;
2467
+ let R = A(c);
2468
+ Pt.push(F > 0 ? F - 1 : 0), Vs.p(F > 0 ? F - 1 : 0, R), Fs.add(c.text);
2469
+ let C = os(c);
2470
+ et.push(C), $s.p(C, R), $r(c, (U) => {
2471
+ Ut.p(U.toLowerCase(), R);
2472
+ }), Br(c, (U) => {
2473
+ Ht.p(U, R);
2474
+ }), Gr(c, (U) => {
2475
+ Gs.p(U.toLowerCase(), R);
2476
+ }), Wr(c, (U) => {
2477
+ Ws.p(U.toLowerCase(), R);
2478
+ }), z(c, (U) => {
2479
+ var G;
2480
+ U.type === kt && Ys.p(((G = U.name) == null ? void 0 : G.toLowerCase()) ?? "", R);
2481
+ }), Yr(c, (U) => {
2482
+ let G = U.name.trim() === "" ? " " : U.name;
2483
+ Qs.p(G, U.loc);
2376
2484
  });
2377
- let d = _t(a), [_, z, Qt] = d;
2378
- return Fs.p(d.toString(), T), Is.push(_), Ps.push(z), Ds.push(Qt), _e === void 0 && (_e = d), ue === void 0 && (ue = d), ue !== void 0 && Li(ue, d) < 0 && (ue = d), _e !== void 0 && Li(_e, d) > 0 && (_e = d), qs.push(d), _ > 0 && Tt.p(a.text, T), I;
2379
- } else if (a.type === jt) {
2380
- Ne++, $s.add(a.text);
2381
- let T = y(a), E = D > 0 ? D - 1 : 0;
2382
- Lt.push(E), Ys.p(E, T);
2383
- let R = 1;
2384
- if (a.is_important) {
2385
- R++;
2386
- let O = a.text;
2387
- if (!O.toLowerCase().includes("!important")) {
2388
- let U = a.value.text, v = O.indexOf(U), ye = O.slice(-1) === ";";
2389
- Dt.p(`${O.slice(v, ye ? -1 : void 0)}`, y(a.value));
2390
- }
2391
- Wt && (Nt++, R++);
2392
- }
2393
- Gs.push(R);
2394
- let { is_important: d, property: _, is_browserhack: z, is_vendor_prefixed: Qt } = a, j = y(a);
2395
- j.length = _.length, Ue.p(_, j), d && Ze++, Qt ? (Le.push(2), It.p(_, j)) : xs(_) ? (Je.p(_, j), Le.push(d ? 3 : 2), d && Ut.p(_, j)) : z ? (Ht.p(_, j), Le.push(2)) : Le.push(1);
2485
+ let k = gt(c), [g, E, B] = k;
2486
+ return Ks.p(k.toString(), R), Ms.push(g), zs.push(E), qs.push(B), ue === void 0 && (ue = k), fe === void 0 && (fe = k), fe !== void 0 && qi(fe, k) < 0 && (fe = k), ue !== void 0 && qi(ue, k) > 0 && (ue = k), Bs.push(k), g > 0 && It.p(c.text, R), P;
2487
+ } else if (c.type === Zt) {
2488
+ Ie++, js.add(c.text);
2489
+ let R = A(c), C = F > 0 ? F - 1 : 0;
2490
+ Mt.push(C), Zs.p(C, R);
2491
+ let k = 1;
2492
+ c.is_important && (k++, c.text.toLowerCase().includes("!important") || $t.p("!ie", A(c.value)), jt && (Dt++, k++)), Xs.push(k);
2493
+ let { is_important: g, property: E, is_browserhack: B, is_vendor_prefixed: U } = c;
2494
+ if (!E) return;
2495
+ let G = A(c);
2496
+ G.length = E.length;
2497
+ let O = Mi(E);
2498
+ He.p(O, G), g && tt++, U ? (Pe.push(2), qt.p(E, G)) : ws(E) ? (st.p(E, G), Pe.push(g ? 3 : 2), g && Ft.p(E, G)) : B ? (zt.p(E.charAt(0), G), Pe.push(2)) : Pe.push(1);
2396
2499
  {
2397
- let O = a.value, { text: U } = O, v = y(O), ye = 1;
2398
- if (ut.has(U)) {
2399
- He.p(U, v), Pt.push(ye);
2500
+ let D = c.value, { text: L } = D, v = A(D), lt = 1;
2501
+ if (xt.has(L)) {
2502
+ De.p(L.toLowerCase(), v), Kt.push(lt);
2400
2503
  return;
2401
2504
  }
2402
- if (rl(O) && (Ws.p(O.text, v), ye++), Ni(O) && (Dt.p(U, v), U = U.slice(0, -2), ye++), Pt.push(ye), m("margin", _) || m("margin-block", _) || m("margin-inline", _) || m("margin-top", _) || m("margin-right", _) || m("margin-bottom", _) || m("margin-left", _) || m("padding", _) || m("padding-block", _) || m("padding-inline", _) || m("padding-top", _) || m("padding-right", _) || m("padding-bottom", _) || m("padding-left", _))
2403
- Xn(O) && ei.p(_, v);
2505
+ if (kl(D, (x) => {
2506
+ Js.p(x.toLowerCase(), v), lt++;
2507
+ }), Fi(D) && ($t.p("\\9", v), L = L.slice(0, -2), lt++), Kt.push(lt), El.has(O))
2508
+ ul(D) && li.p(O, v);
2404
2509
  else {
2405
- if (m("z-index", _))
2406
- return Qs.p(U, v), I;
2407
- if (m("font", _)) {
2408
- if (!ts.has(U)) {
2409
- let C = el(O, function(Ie) {
2410
- Ie.type === "keyword" && He.p(Ie.value, v);
2510
+ if (O === "z-index")
2511
+ return ei.p(L, v), P;
2512
+ if (O === "font") {
2513
+ if (!is.has(L)) {
2514
+ let x = dl(D, function(Z) {
2515
+ Z.type === "keyword" && De.p(Z.value.toLowerCase(), v);
2411
2516
  });
2412
- if (!C)
2413
- return I;
2414
- let { font_size: S, line_height: N, font_family: X } = C;
2415
- X && Ft.p(X, v), S && Mt.p(S, v), N && qt.p(N, v);
2517
+ if (!x)
2518
+ return P;
2519
+ let { font_size: X, line_height: S, font_family: T } = x;
2520
+ T && Bt.p(T, v), X && it.p(X.toLowerCase(), v), S && rt.p(S.toLowerCase(), v);
2521
+ }
2522
+ } else if (O === "font-size") {
2523
+ if (!is.has(L)) {
2524
+ let x = L.toLowerCase();
2525
+ x.includes("var(") ? it.p(L, v) : it.p(x, v);
2416
2526
  }
2417
- } else if (m("font-size", _))
2418
- ts.has(U) || Mt.p(U, v);
2419
- else {
2420
- if (m("font-family", _))
2421
- return ts.has(U) || Ft.p(U, v), I;
2422
- if (m("line-height", _))
2423
- qt.p(U, v);
2424
- else {
2425
- if (m("transition", _) || m("animation", _))
2426
- return il(O.children, function(C) {
2427
- C.type === "fn" ? zt.p(C.value.text, v) : C.type === "duration" ? Kt.p(C.value.text, v) : C.type === "keyword" && He.p(C.value.text, v);
2428
- }), I;
2429
- if (m("animation-duration", _) || m("transition-duration", _))
2430
- for (let C of O.children)
2431
- C.type !== Ee && Kt.p(C.text, v);
2432
- else if (m("transition-timing-function", _) || m("animation-timing-function", _))
2433
- for (let C of O.children)
2434
- C.type !== Ee && zt.p(C.text, v);
2435
- else m("container-name", _) ? je.p(U, v) : m("container", _) ? ((fi = O.first_child) == null ? void 0 : fi.type) === he && je.p(O.first_child.text, v) : cl.has(al(_)) ? Js.push(U, _, v) : m("text-shadow", _) ? Vs.p(U, v) : m("box-shadow", _) && js.p(U, v);
2527
+ } else {
2528
+ if (O === "font-family")
2529
+ return is.has(L) || Bt.p(L, v), P;
2530
+ if (O === "line-height") {
2531
+ let x = L.toLowerCase();
2532
+ x.includes("var(") ? rt.p(L, v) : rt.p(x, v);
2533
+ } else {
2534
+ if (O === "transition" || O === "animation")
2535
+ return ml(D.children, function(x) {
2536
+ x.type === "fn" ? Gt.p(x.value.text.toLowerCase(), v) : x.type === "duration" ? nt.p(x.value.text.toLowerCase(), v) : x.type === "keyword" && De.p(x.value.text.toLowerCase(), v);
2537
+ }), P;
2538
+ if (O === "animation-duration" || O === "transition-duration") {
2539
+ for (let x of D.children)
2540
+ if (x.type !== Re) {
2541
+ let X = x.text;
2542
+ /var\(/i.test(X) ? nt.p(X, v) : nt.p(X.toLowerCase(), v);
2543
+ }
2544
+ } else if (O === "transition-timing-function" || O === "animation-timing-function")
2545
+ for (let x of D.children)
2546
+ x.type !== Re && Gt.p(x.text, v);
2547
+ else O === "container-name" ? Je.p(L, v) : O === "container" ? ((wi = D.first_child) == null ? void 0 : wi.type) === _e && Je.p(D.first_child.text, v) : yl.has(O) ? ni.push(L, E, v) : O === "text-shadow" ? ti.p(L, v) : O === "box-shadow" && si.p(L, v);
2436
2548
  }
2437
2549
  }
2438
2550
  }
2439
- let or = Ni(O);
2440
- B(O, (C) => {
2441
- switch (C.type) {
2442
- case ft: {
2443
- let S = C.unit, N = y(C);
2444
- return Xs.push(S, _, N), I;
2551
+ let yr = Fi(D);
2552
+ z(D, (x) => {
2553
+ var X;
2554
+ switch (x.type) {
2555
+ case mt: {
2556
+ let S = ((X = x.unit) == null ? void 0 : X.toLowerCase()) ?? "", T = A(x);
2557
+ return ii.push(S, E, T), P;
2445
2558
  }
2446
- case yr: {
2447
- let S = C.text;
2559
+ case Dr: {
2560
+ let S = x.text;
2448
2561
  if (!S || !S.startsWith("#"))
2449
- return I;
2450
- let N = S;
2451
- or && !N.endsWith("\\9") && (N = N + "\\9");
2452
- let X = N.length - 1;
2453
- Ge("\\9", N) && (X = X - 2);
2454
- let Ie = y(C);
2455
- return xe.push(N, _, Ie), me.p("hex" + X, Ie), I;
2562
+ return P;
2563
+ let T = S.toLowerCase();
2564
+ yr && !T.endsWith("\\9") && (T = T + "\\9");
2565
+ let Z = T.length - 1;
2566
+ ls("\\9", T) && (Z = Z - 2);
2567
+ let Fe = A(x);
2568
+ return we.push(T, E, Fe), Ae.p("hex" + Z, Fe), P;
2456
2569
  }
2457
- case he: {
2458
- let S = C.text, N = y(C);
2459
- if (m("font", _) || m("font-family", _))
2460
- return I;
2461
- ut.has(S) && He.p(S, N);
2462
- let X = S.length;
2463
- if (X > 20 || X < 3)
2464
- return I;
2465
- if (jn.has(S)) {
2466
- xe.push(S, _, N), me.p(S.toLowerCase(), N);
2570
+ case _e: {
2571
+ let S = x.text, T = A(x);
2572
+ if (O === "font" || O === "font-family")
2573
+ return P;
2574
+ xt.has(S) && De.p(S.toLowerCase(), T);
2575
+ let Z = S.length;
2576
+ if (Z > 20 || Z < 3)
2577
+ return P;
2578
+ if (_l.has(S)) {
2579
+ let Fe = S.toLowerCase();
2580
+ we.push(Fe, E, T), Ae.p(Fe, T);
2467
2581
  return;
2468
2582
  }
2469
- if (Wn.has(S)) {
2470
- xe.push(S, _, N), me.p("named", N);
2583
+ if (al.has(S)) {
2584
+ we.push(S.toLowerCase(), E, T), Ae.p("named", T);
2471
2585
  return;
2472
2586
  }
2473
- if (Qn.has(S)) {
2474
- xe.push(S, _, N), me.p("system", N);
2587
+ if (hl.has(S)) {
2588
+ we.push(S.toLowerCase(), E, T), Ae.p("system", T);
2475
2589
  return;
2476
2590
  }
2477
- return I;
2591
+ return P;
2478
2592
  }
2479
- case gs: {
2480
- let S = C.name, N = y(C);
2481
- if (Vn.has(S)) {
2482
- xe.push(C.text, _, N), me.p(S.toLowerCase(), N);
2593
+ case ks: {
2594
+ let S = x.name, T = A(x);
2595
+ if (cl.has(S)) {
2596
+ we.push(x.text, E, T), Ae.p(S.toLowerCase(), T);
2483
2597
  return;
2484
2598
  }
2485
- if (Ge("gradient", S)) {
2486
- Zs.p(C.text, N);
2599
+ if (ls("gradient", S)) {
2600
+ ri.p(x.text, T);
2487
2601
  return;
2488
2602
  }
2489
2603
  }
2490
2604
  }
2491
2605
  });
2492
2606
  }
2493
- } else if (a.type === Ar) {
2494
- let { value: T } = a, E = ll(T || "");
2495
- if (Er(E, "data:")) {
2496
- let R = E.length, d = hl(E);
2497
- h.total++, o += R;
2498
- let _ = {
2499
- line: a.line,
2500
- column: a.column,
2501
- offset: a.start,
2502
- length: a.length
2607
+ } else if (c.type === Fr) {
2608
+ let { value: R } = c, C = Gi(R || "");
2609
+ if (Bi(C, "data:")) {
2610
+ let k = C.length, g = Al(C);
2611
+ h.total++, a += k;
2612
+ let E = {
2613
+ line: c.line,
2614
+ column: c.column,
2615
+ offset: c.start,
2616
+ length: c.length
2503
2617
  };
2504
- if (h.unique.has(d)) {
2505
- let z = h.unique.get(d);
2506
- z.count++, z.size += R, h.unique.set(d, z), t && z.uniqueWithLocations && z.uniqueWithLocations.push(_);
2618
+ if (h.unique.has(g)) {
2619
+ let B = h.unique.get(g);
2620
+ B.count++, B.size += k, h.unique.set(g, B), t && B.uniqueWithLocations && B.uniqueWithLocations.push(E);
2507
2621
  } else {
2508
- let z = {
2622
+ let B = {
2509
2623
  count: 1,
2510
- size: R,
2511
- uniqueWithLocations: t ? [_] : void 0
2624
+ size: k,
2625
+ uniqueWithLocations: t ? [E] : void 0
2512
2626
  };
2513
- h.unique.set(d, z);
2627
+ h.unique.set(g, B);
2514
2628
  }
2515
2629
  }
2516
- } else if (a.type === Ii)
2517
- return Cs.p(a.name, y(a)), I;
2630
+ } else if (c.type === $i)
2631
+ return c.name && Ts.p(c.name.toLowerCase(), A(c)), P;
2518
2632
  });
2519
- let ti = $s.size, we = Xe.size(), Bt = Is.aggregate(), $t = Ps.aggregate(), Gt = Ds.aggregate(), si = Hs.size, b = Object.assign, ii = r.length, Yt = V.length, ri = k.aggregate(), ni = Xe.aggregate(), li = Gs.aggregate(), oi = Le.aggregate(), ai = Pt.aggregate(), hi = x.c();
2633
+ let oi = js.size, ye = et.size(), Wt = Ms.aggregate(), Yt = zs.aggregate(), Qt = qs.aggregate(), ai = Fs.size, b = Object.assign, hi = r.length, Vt = N.length, ci = f.aggregate(), _i = et.aggregate(), ui = Xs.aggregate(), fi = Pe.aggregate(), pi = Kt.aggregate(), di = d.c();
2520
2634
  return {
2521
2635
  stylesheet: {
2522
- sourceLinesOfCode: hi.total + we + Ne + Rt.size(),
2636
+ sourceLinesOfCode: di.total + ye + Ie + Lt.size(),
2523
2637
  linesOfCode: i,
2524
- size: ii,
2525
- complexity: ri.sum + ni.sum + li.sum + oi.sum + ai.sum,
2638
+ size: hi,
2639
+ complexity: ci.sum + _i.sum + ui.sum + fi.sum + pi.sum,
2526
2640
  comments: {
2527
2641
  total: n,
2528
2642
  size: l
2529
2643
  },
2530
2644
  embeddedContent: {
2531
2645
  size: {
2532
- total: o,
2533
- ratio: H(o, ii)
2646
+ total: a,
2647
+ ratio: H(a, hi)
2534
2648
  },
2535
2649
  types: {
2536
2650
  total: h.total,
@@ -2540,210 +2654,212 @@ function Ui(r, e, t) {
2540
2654
  }
2541
2655
  }
2542
2656
  },
2543
- atrules: b(hi, {
2657
+ atrules: b(di, {
2544
2658
  fontface: b(
2545
2659
  {
2546
- total: Yt,
2547
- totalUnique: Yt,
2548
- unique: V,
2549
- uniquenessRatio: Yt === 0 ? 0 : 1
2660
+ total: Vt,
2661
+ totalUnique: Vt,
2662
+ unique: N,
2663
+ uniquenessRatio: Vt === 0 ? 0 : 1
2550
2664
  },
2551
2665
  t ? {
2552
- uniqueWithLocations: ws.c().uniqueWithLocations
2666
+ uniqueWithLocations: Cs.c().uniqueWithLocations
2553
2667
  } : {}
2554
2668
  ),
2555
- import: ys.c(),
2556
- media: b(As.c(), {
2557
- browserhacks: Es.c(),
2558
- features: Cs.c()
2669
+ import: bs.c(),
2670
+ media: b(Rs.c(), {
2671
+ browserhacks: vs.c(),
2672
+ features: Ts.c()
2559
2673
  }),
2560
- charset: bs.c(),
2561
- supports: b(gt.c(), {
2562
- browserhacks: Rs.c()
2674
+ charset: Ss.c(),
2675
+ supports: b(Et.c(), {
2676
+ browserhacks: Os.c()
2563
2677
  }),
2564
- keyframes: b(xt.c(), {
2565
- prefixed: b(mt.c(), {
2566
- ratio: H(mt.size(), xt.size())
2678
+ keyframes: b(yt.c(), {
2679
+ prefixed: b(Ct.c(), {
2680
+ ratio: H(Ct.size(), yt.size())
2567
2681
  })
2568
2682
  }),
2569
- container: b(vs.c(), {
2570
- names: je.c()
2683
+ container: b(Ns.c(), {
2684
+ names: Je.c()
2571
2685
  }),
2572
- layer: Ve.c(),
2573
- property: Ts.c(),
2574
- complexity: ri,
2686
+ layer: Ze.c(),
2687
+ property: Ls.c(),
2688
+ complexity: ci,
2575
2689
  nesting: b(
2576
- kt.aggregate(),
2690
+ bt.aggregate(),
2577
2691
  {
2578
- items: kt.toArray()
2692
+ items: bt.toArray()
2579
2693
  },
2580
- Os.c()
2694
+ Us.c()
2581
2695
  )
2582
2696
  }),
2583
2697
  rules: {
2584
- total: wt,
2698
+ total: Rt,
2585
2699
  empty: {
2586
- total: yt,
2587
- ratio: H(yt, wt)
2700
+ total: vt,
2701
+ ratio: H(vt, Rt)
2588
2702
  },
2589
2703
  sizes: b(
2590
- At.aggregate(),
2704
+ Tt.aggregate(),
2591
2705
  {
2592
- items: At.toArray()
2706
+ items: Tt.toArray()
2593
2707
  },
2594
- Ss.c()
2708
+ Is.c()
2595
2709
  ),
2596
2710
  nesting: b(
2597
- bt.aggregate(),
2711
+ Nt.aggregate(),
2598
2712
  {
2599
- items: bt.toArray()
2713
+ items: Nt.toArray()
2600
2714
  },
2601
- Ls.c()
2715
+ Ds.c()
2602
2716
  ),
2603
2717
  selectors: b(
2604
- Et.aggregate(),
2718
+ St.aggregate(),
2605
2719
  {
2606
- items: Et.toArray()
2720
+ items: St.toArray()
2607
2721
  },
2608
- Ns.c()
2722
+ Hs.c()
2609
2723
  ),
2610
2724
  declarations: b(
2611
- Ct.aggregate(),
2725
+ Ot.aggregate(),
2612
2726
  {
2613
- items: Ct.toArray()
2727
+ items: Ot.toArray()
2614
2728
  },
2615
- Us.c()
2729
+ Ps.c()
2616
2730
  )
2617
2731
  },
2618
2732
  selectors: {
2619
- total: we,
2620
- totalUnique: si,
2621
- uniquenessRatio: H(si, we),
2733
+ total: ye,
2734
+ totalUnique: ai,
2735
+ uniquenessRatio: H(ai, ye),
2622
2736
  specificity: b(
2623
2737
  {
2624
2738
  /** @type Specificity */
2625
- min: ue === void 0 ? [0, 0, 0] : ue,
2739
+ min: fe === void 0 ? [0, 0, 0] : fe,
2626
2740
  /** @type Specificity */
2627
- max: _e === void 0 ? [0, 0, 0] : _e,
2741
+ max: ue === void 0 ? [0, 0, 0] : ue,
2628
2742
  /** @type Specificity */
2629
- sum: [Bt.sum, $t.sum, Gt.sum],
2743
+ sum: [Wt.sum, Yt.sum, Qt.sum],
2630
2744
  /** @type Specificity */
2631
- mean: [Bt.mean, $t.mean, Gt.mean],
2745
+ mean: [Wt.mean, Yt.mean, Qt.mean],
2632
2746
  /** @type Specificity */
2633
- mode: [Bt.mode, $t.mode, Gt.mode],
2747
+ mode: [Wt.mode, Yt.mode, Qt.mode],
2634
2748
  /** @type Specificity */
2635
- items: qs
2749
+ items: Bs
2636
2750
  },
2637
- Fs.c()
2751
+ Ks.c()
2638
2752
  ),
2639
- complexity: b(ni, Ms.c(), {
2640
- items: Xe.toArray()
2753
+ complexity: b(_i, $s.c(), {
2754
+ items: et.toArray()
2641
2755
  }),
2642
2756
  nesting: b(
2643
- St.aggregate(),
2757
+ Pt.aggregate(),
2644
2758
  {
2645
- items: St.toArray()
2759
+ items: Pt.toArray()
2646
2760
  },
2647
- Bs.c()
2761
+ Vs.c()
2648
2762
  ),
2649
- id: b(Tt.c(), {
2650
- ratio: H(Tt.size(), we)
2763
+ id: b(It.c(), {
2764
+ ratio: H(It.size(), ye)
2651
2765
  }),
2652
- pseudoClasses: zs.c(),
2653
- accessibility: b(Ot.c(), {
2654
- ratio: H(Ot.size(), we)
2766
+ pseudoClasses: Gs.c(),
2767
+ pseudoElements: Ws.c(),
2768
+ accessibility: b(Ht.c(), {
2769
+ ratio: H(Ht.size(), ye)
2655
2770
  }),
2656
- keyframes: Rt.c(),
2657
- prefixed: b(vt.c(), {
2658
- ratio: H(vt.size(), we)
2771
+ attributes: Ys.c(),
2772
+ keyframes: Lt.c(),
2773
+ prefixed: b(Ut.c(), {
2774
+ ratio: H(Ut.size(), ye)
2659
2775
  }),
2660
- combinators: Ks.c()
2776
+ combinators: Qs.c()
2661
2777
  },
2662
2778
  declarations: {
2663
- total: Ne,
2664
- totalUnique: ti,
2665
- uniquenessRatio: H(ti, Ne),
2779
+ total: Ie,
2780
+ totalUnique: oi,
2781
+ uniquenessRatio: H(oi, Ie),
2666
2782
  importants: {
2667
- total: Ze,
2668
- ratio: H(Ze, Ne),
2783
+ total: tt,
2784
+ ratio: H(tt, Ie),
2669
2785
  inKeyframes: {
2670
- total: Nt,
2671
- ratio: H(Nt, Ze)
2786
+ total: Dt,
2787
+ ratio: H(Dt, tt)
2672
2788
  }
2673
2789
  },
2674
- complexity: li,
2790
+ complexity: ui,
2675
2791
  nesting: b(
2676
- Lt.aggregate(),
2792
+ Mt.aggregate(),
2677
2793
  {
2678
- items: Lt.toArray()
2794
+ items: Mt.toArray()
2679
2795
  },
2680
- Ys.c()
2796
+ Zs.c()
2681
2797
  )
2682
2798
  },
2683
- properties: b(Ue.c(), {
2684
- prefixed: b(It.c(), {
2685
- ratio: H(It.size(), Ue.size())
2799
+ properties: b(He.c(), {
2800
+ prefixed: b(qt.c(), {
2801
+ ratio: H(qt.size(), He.size())
2686
2802
  }),
2687
- custom: b(Je.c(), {
2688
- ratio: H(Je.size(), Ue.size()),
2689
- importants: b(Ut.c(), {
2690
- ratio: H(Ut.size(), Je.size())
2803
+ custom: b(st.c(), {
2804
+ ratio: H(st.size(), He.size()),
2805
+ importants: b(Ft.c(), {
2806
+ ratio: H(Ft.size(), st.size())
2691
2807
  })
2692
2808
  }),
2693
- browserhacks: b(Ht.c(), {
2694
- ratio: H(Ht.size(), Ue.size())
2809
+ browserhacks: b(zt.c(), {
2810
+ ratio: H(zt.size(), He.size())
2695
2811
  }),
2696
- complexity: oi
2812
+ complexity: fi
2697
2813
  }),
2698
2814
  values: {
2699
- colors: b(xe.count(), {
2700
- formats: me.c()
2815
+ colors: b(we.count(), {
2816
+ formats: Ae.c()
2701
2817
  }),
2702
- gradients: Zs.c(),
2703
- fontFamilies: Ft.c(),
2704
- fontSizes: Mt.c(),
2705
- lineHeights: qt.c(),
2706
- zindexes: Qs.c(),
2707
- textShadows: Vs.c(),
2708
- boxShadows: js.c(),
2709
- borderRadiuses: Js.count(),
2818
+ gradients: ri.c(),
2819
+ fontFamilies: Bt.c(),
2820
+ fontSizes: it.c(),
2821
+ lineHeights: rt.c(),
2822
+ zindexes: ei.c(),
2823
+ textShadows: ti.c(),
2824
+ boxShadows: si.c(),
2825
+ borderRadiuses: ni.count(),
2710
2826
  animations: {
2711
- durations: Kt.c(),
2712
- timingFunctions: zt.c()
2827
+ durations: nt.c(),
2828
+ timingFunctions: Gt.c()
2713
2829
  },
2714
- prefixes: Ws.c(),
2715
- browserhacks: Dt.c(),
2716
- units: Xs.count(),
2717
- complexity: ai,
2718
- keywords: He.c(),
2719
- resets: ei.c()
2830
+ prefixes: Js.c(),
2831
+ browserhacks: $t.c(),
2832
+ units: ii.count(),
2833
+ complexity: pi,
2834
+ keywords: De.c(),
2835
+ resets: li.c()
2720
2836
  },
2721
2837
  __meta__: {
2722
- parseTime: f - c,
2723
- analyzeTime: Date.now() - f,
2838
+ parseTime: p - o,
2839
+ analyzeTime: Date.now() - p,
2724
2840
  total: Date.now() - s
2725
2841
  }
2726
2842
  };
2727
2843
  }
2728
- function Li(r, e) {
2844
+ function qi(r, e) {
2729
2845
  return r[0] === e[0] ? r[1] === e[1] ? e[2] - r[2] : e[1] - r[1] : e[0] - r[0];
2730
2846
  }
2731
2847
  export {
2732
- $ as KeywordSet,
2733
- dl as analyze,
2734
- Oi as calculateSpecificity,
2735
- Vn as colorFunctions,
2736
- jn as colorKeywords,
2737
- Li as compareSpecificity,
2738
- ut as cssKeywords,
2739
- pl as hasVendorPrefix,
2740
- Di as isAccessibilitySelector,
2741
- br as isMediaBrowserhack,
2742
- fl as isPropertyHack,
2743
- Rr as isSelectorPrefixed,
2744
- Cr as isSupportsBrowserhack,
2745
- rl as isValuePrefixed,
2746
- Wn as namedColors,
2747
- rs as selectorComplexity,
2748
- Qn as systemColors
2848
+ W as KeywordSet,
2849
+ Tl as analyze,
2850
+ Pi as calculateSpecificity,
2851
+ cl as colorFunctions,
2852
+ _l as colorKeywords,
2853
+ qi as compareSpecificity,
2854
+ xt as cssKeywords,
2855
+ vl as hasVendorPrefix,
2856
+ Br as isAccessibilitySelector,
2857
+ zr as isMediaBrowserhack,
2858
+ Cl as isPropertyHack,
2859
+ $r as isSelectorPrefixed,
2860
+ Mr as isSupportsBrowserhack,
2861
+ kl as isValuePrefixed,
2862
+ al as namedColors,
2863
+ os as selectorComplexity,
2864
+ hl as systemColors
2749
2865
  };