PageSourceSearch

https://info.kerkomroep.nl/__theme/b_8ca5a7d7-80f3-41c8-bea7-75cce…/51/css-anchor-positioning-fn-BWnHWV27.js

js kerkomroep.nl collected 2026-10-02 09:52:20 UTC 171,414 bytes, 6,447 lines download raw bytes

1var go = Object.defineProperty, bo = Object.defineProperties, So = Object.getOwnPropertyDescriptors, Tn = Object.getOwnPropertySymbols, vo = Object.prototype.hasOwnProperty, Co = Object.prototype.propertyIsEnumerable, An = (t, e, n) => e in t ? go(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, W = (t, e) => {
2  for (var n in e || (e = {}))
3    vo.call(e, n) && An(t, n, e[n]);
4  if (Tn)
5    for (var n of Tn(e))
6      Co.call(e, n) && An(t, n, e[n]);
7  return t;
8}, G = (t, e) => bo(t, So(e)), _ = (t, e, n) => new Promise((r, i) => {
9  var s = (a) => {
10    try {
11      c(n.next(a));
12    } catch (o) {
13      i(o);
14    }
15  }, l = (a) => {
16    try {
17      c(n.throw(a));
18    } catch (o) {
19      i(o);
20    }
21  }, c = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(s, l);
22  c((n = n.apply(t, e)).next());
23});
24const nn = Math.min, Vt = Math.max, xe = Math.round, fe = Math.floor, bt = (t) => ({
25  x: t,
26  y: t
27});
28function xo(t, e) {
29  return typeof t == "function" ? t(e) : t;
30}
31function wo(t) {
32  return W({
33    top: 0,
34    right: 0,
35    bottom: 0,
36    left: 0
37  }, t);
38}
39function Lo(t) {
40  return typeof t != "number" ? wo(t) : {
41    top: t,
42    right: t,
43    bottom: t,
44    left: t
45  };
46}
47function we(t) {
48  const {
49    x: e,
50    y: n,
51    width: r,
52    height: i
53  } = t;
54  return {
55    width: r,
56    height: i,
57    top: n,
58    left: e,
59    right: e + r,
60    bottom: n + i,
61    x: e,
62    y: n
63  };
64}
65function Oo(t, e) {
66  return _(this, null, function* () {
67    var n;
68    e === void 0 && (e = {});
69    const {
70      x: r,
71      y: i,
72      platform: s,
73      rects: l,
74      elements: c,
75      strategy: a
76    } = t, {
77      boundary: o = "clippingAncestors",
78      rootBoundary: u = "viewport",
79      elementContext: h = "floating",
80      altBoundary: f = !1,
81      padding: p = 0
82    } = xo(e, t), d = Lo(p), k = c[f ? h === "floating" ? "reference" : "floating" : h], g = we(yield s.getClippingRect({
83      element: (n = yield s.isElement == null ? void 0 : s.isElement(k)) == null || n ? k : k.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
84      boundary: o,
85      rootBoundary: u,
86      strategy: a
87    })), y = h === "floating" ? {
88      x: r,
89      y: i,
90      width: l.floating.width,
91      height: l.floating.height
92    } : l.reference, w = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating), x = (yield s.isElement == null ? void 0 : s.isElement(w)) ? (yield s.getScale == null ? void 0 : s.getScale(w)) || {
93      x: 1,
94      y: 1
95    } : {
96      x: 1,
97      y: 1
98    }, T = we(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({
99      elements: c,
100      rect: y,
101      offsetParent: w,
102      strategy: a
103    }) : y);
104    return {
105      top: (g.top - T.top + d.top) / x.y,
106      bottom: (T.bottom - g.bottom + d.bottom) / x.y,
107      left: (g.left - T.left + d.left) / x.x,
108      right: (T.right - g.right + d.right) / x.x
109    };
110  });
111}
112function Ee() {
113  return typeof window < "u";
114}
115function Kt(t) {
116  return Rr(t) ? (t.nodeName || "").toLowerCase() : "#document";
117}
118function it(t) {
119  var e;
120  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
121}
122function vt(t) {
123  var e;
124  return (e = (Rr(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
125}
126function Rr(t) {
127  return Ee() ? t instanceof Node || t instanceof it(t).Node : !1;
128}
129function ut(t) {
130  return Ee() ? t instanceof Element || t instanceof it(t).Element : !1;
131}
132function St(t) {
133  return Ee() ? t instanceof HTMLElement || t instanceof it(t).HTMLElement : !1;
134}
135function _n(t) {
136  return !Ee() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof it(t).ShadowRoot;
137}
138const To = /* @__PURE__ */ new Set(["inline", "contents"]);
139function ue(t) {
140  const {
141    overflow: e,
142    overflowX: n,
143    overflowY: r,
144    display: i
145  } = ht(t);
146  return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !To.has(i);
147}
148const Ao = /* @__PURE__ */ new Set(["table", "td", "th"]);
149function _o(t) {
150  return Ao.has(Kt(t));
151}
152const Po = [":popover-open", ":modal"];
153function je(t) {
154  return Po.some((e) => {
155    try {
156      return t.matches(e);
157    } catch {
158      return !1;
159    }
160  });
161}
162const Eo = ["transform", "translate", "scale", "rotate", "perspective"], jo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Do = ["paint", "layout", "strict", "content"];
163function yn(t) {
164  const e = gn(), n = ut(t) ? ht(t) : t;
165  return Eo.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || jo.some((r) => (n.willChange || "").includes(r)) || Do.some((r) => (n.contain || "").includes(r));
166}
167function Ro(t) {
168  let e = Tt(t);
169  for (; St(e) && !qt(e); ) {
170    if (yn(e))
171      return e;
172    if (je(e))
173      return null;
174    e = Tt(e);
175  }
176  return null;
177}
178function gn() {
179  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
180}
181const Io = /* @__PURE__ */ new Set(["html", "body", "#document"]);
182function qt(t) {
183  return Io.has(Kt(t));
184}
185function ht(t) {
186  return it(t).getComputedStyle(t);
187}
188function De(t) {
189  return ut(t) ? {
190    scrollLeft: t.scrollLeft,
191    scrollTop: t.scrollTop
192  } : {
193    scrollLeft: t.scrollX,
194    scrollTop: t.scrollY
195  };
196}
197function Tt(t) {
198  if (Kt(t) === "html")
199    return t;
vendor: 6,058 bytes, lines 200-412
200  const e = (
201    // Step into the shadow DOM of the parent of a slotted node.
202    t.assignedSlot || // DOM Element detected.
203    t.parentNode || // ShadowRoot detected.
204    _n(t) && t.host || // Fallback.
205    vt(t)
206  );
207  return _n(e) ? e.host : e;
208}
209function Ir(t) {
210  const e = Tt(t);
211  return qt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : St(e) && ue(e) ? e : Ir(e);
212}
213function le(t, e, n) {
214  var r;
215  e === void 0 && (e = []), n === void 0 && (n = !0);
216  const i = Ir(t), s = i === ((r = t.ownerDocument) == null ? void 0 : r.body), l = it(i);
217  if (s) {
218    const c = rn(l);
219    return e.concat(l, l.visualViewport || [], ue(i) ? i : [], c && n ? le(c) : []);
220  }
221  return e.concat(i, le(i, [], n));
222}
223function rn(t) {
224  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
225}
226function Mr(t) {
227  const e = ht(t);
228  let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
229  const i = St(t), s = i ? t.offsetWidth : n, l = i ? t.offsetHeight : r, c = xe(n) !== s || xe(r) !== l;
230  return c && (n = s, r = l), {
231    width: n,
232    height: r,
233    $: c
234  };
235}
236function bn(t) {
237  return ut(t) ? t : t.contextElement;
238}
239function Ht(t) {
240  const e = bn(t);
241  if (!St(e))
242    return bt(1);
243  const n = e.getBoundingClientRect(), {
244    width: r,
245    height: i,
246    $: s
247  } = Mr(e);
248  let l = (s ? xe(n.width) : n.width) / r, c = (s ? xe(n.height) : n.height) / i;
249  return (!l || !Number.isFinite(l)) && (l = 1), (!c || !Number.isFinite(c)) && (c = 1), {
250    x: l,
251    y: c
252  };
253}
254const Mo = /* @__PURE__ */ bt(0);
255function Nr(t) {
256  const e = it(t);
257  return !gn() || !e.visualViewport ? Mo : {
258    x: e.visualViewport.offsetLeft,
259    y: e.visualViewport.offsetTop
260  };
261}
262function No(t, e, n) {
263  return e === void 0 && (e = !1), !n || e && n !== it(t) ? !1 : e;
264}
265function Rt(t, e, n, r) {
266  e === void 0 && (e = !1), n === void 0 && (n = !1);
267  const i = t.getBoundingClientRect(), s = bn(t);
268  let l = bt(1);
269  e && (r ? ut(r) && (l = Ht(r)) : l = Ht(t));
270  const c = No(s, n, r) ? Nr(s) : bt(0);
271  let a = (i.left + c.x) / l.x, o = (i.top + c.y) / l.y, u = i.width / l.x, h = i.height / l.y;
272  if (s) {
273    const f = it(s), p = r && ut(r) ? it(r) : r;
274    let d = f, k = rn(d);
275    for (; k && r && p !== d; ) {
276      const g = Ht(k), y = k.getBoundingClientRect(), w = ht(k), x = y.left + (k.clientLeft + parseFloat(w.paddingLeft)) * g.x, T = y.top + (k.clientTop + parseFloat(w.paddingTop)) * g.y;
277      a *= g.x, o *= g.y, u *= g.x, h *= g.y, a += x, o += T, d = it(k), k = rn(d);
278    }
279  }
280  return we({
281    width: u,
282    height: h,
283    x: a,
284    y: o
285  });
286}
287function Re(t, e) {
288  const n = De(t).scrollLeft;
289  return e ? e.left + n : Rt(vt(t)).left + n;
290}
291function Fr(t, e) {
292  const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Re(t, n), i = n.top + e.scrollTop;
293  return {
294    x: r,
295    y: i
296  };
297}
298function Fo(t) {
299  let {
300    elements: e,
301    rect: n,
302    offsetParent: r,
303    strategy: i
304  } = t;
305  const s = i === "fixed", l = vt(r), c = e ? je(e.floating) : !1;
306  if (r === l || c && s)
307    return n;
308  let a = {
309    scrollLeft: 0,
310    scrollTop: 0
311  }, o = bt(1);
312  const u = bt(0), h = St(r);
313  if ((h || !h && !s) && ((Kt(r) !== "body" || ue(l)) && (a = De(r)), St(r))) {
314    const p = Rt(r);
315    o = Ht(r), u.x = p.x + r.clientLeft, u.y = p.y + r.clientTop;
316  }
317  const f = l && !h && !s ? Fr(l, a) : bt(0);
318  return {
319    width: n.width * o.x,
320    height: n.height * o.y,
321    x: n.x * o.x - a.scrollLeft * o.x + u.x + f.x,
322    y: n.y * o.y - a.scrollTop * o.y + u.y + f.y
323  };
324}
325function zo(t) {
326  return Array.from(t.getClientRects());
327}
328function $o(t) {
329  const e = vt(t), n = De(t), r = t.ownerDocument.body, i = Vt(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), s = Vt(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
330  let l = -n.scrollLeft + Re(t);
331  const c = -n.scrollTop;
332  return ht(r).direction === "rtl" && (l += Vt(e.clientWidth, r.clientWidth) - i), {
333    width: i,
334    height: s,
335    x: l,
336    y: c
337  };
338}
339const Pn = 25;
340function Bo(t, e) {
341  const n = it(t), r = vt(t), i = n.visualViewport;
342  let s = r.clientWidth, l = r.clientHeight, c = 0, a = 0;
343  if (i) {
344    s = i.width, l = i.height;
345    const u = gn();
346    (!u || u && e === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
347  }
348  const o = Re(r);
349  if (o <= 0) {
350    const u = r.ownerDocument, h = u.body, f = getComputedStyle(h), p = u.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, d = Math.abs(r.clientWidth - h.clientWidth - p);
351    d <= Pn && (s -= d);
352  } else o <= Pn && (s += o);
353  return {
354    width: s,
355    height: l,
356    x: c,
357    y: a
358  };
359}
360const Wo = /* @__PURE__ */ new Set(["absolute", "fixed"]);
361function Uo(t, e) {
362  const n = Rt(t, !0, e === "fixed"), r = n.top + t.clientTop, i = n.left + t.clientLeft, s = St(t) ? Ht(t) : bt(1), l = t.clientWidth * s.x, c = t.clientHeight * s.y, a = i * s.x, o = r * s.y;
363  return {
364    width: l,
365    height: c,
366    x: a,
367    y: o
368  };
369}
370function En(t, e, n) {
371  let r;
372  if (e === "viewport")
373    r = Bo(t, n);
374  else if (e === "document")
375    r = $o(vt(t));
376  else if (ut(e))
377    r = Uo(e, n);
378  else {
379    const i = Nr(t);
380    r = {
381      x: e.x - i.x,
382      y: e.y - i.y,
383      width: e.width,
384      height: e.height
385    };
386  }
387  return we(r);
388}
389function zr(t, e) {
390  const n = Tt(t);
391  return n === e || !ut(n) || qt(n) ? !1 : ht(n).position === "fixed" || zr(n, e);
392}
393function Vo(t, e) {
394  const n = e.get(t);
395  if (n)
396    return n;
397  let r = le(t, [], !1).filter((c) => ut(c) && Kt(c) !== "body"), i = null;
398  const s = ht(t).position === "fixed";
399  let l = s ? Tt(t) : t;
400  for (; ut(l) && !qt(l); ) {
401    const c = ht(l), a = yn(l);
402    !a && c.position === "fixed" && (i = null), (s ? !a && !i : !a && c.position === "static" && i && Wo.has(i.position) || ue(l) && !a && zr(t, l)) ? r = r.filter((o) => o !== l) : i = c, l = Tt(l);
403  }
404  return e.set(t, r), r;
405}
406function Ho(t) {
407  let {
408    element: e,
409    boundary: n,
410    rootBoundary: r,
411    strategy: i
412  } = t;
vendor: 5,288 bytes, lines 413-619
413  const s = [...n === "clippingAncestors" ? je(e) ? [] : Vo(e, this._c) : [].concat(n), r], l = s[0], c = s.reduce((a, o) => {
414    const u = En(e, o, i);
415    return a.top = Vt(u.top, a.top), a.right = nn(u.right, a.right), a.bottom = nn(u.bottom, a.bottom), a.left = Vt(u.left, a.left), a;
416  }, En(e, l, i));
417  return {
418    width: c.right - c.left,
419    height: c.bottom - c.top,
420    x: c.left,
421    y: c.top
422  };
423}
424function Qo(t) {
425  const {
426    width: e,
427    height: n
428  } = Mr(t);
429  return {
430    width: e,
431    height: n
432  };
433}
434function qo(t, e, n) {
435  const r = St(e), i = vt(e), s = n === "fixed", l = Rt(t, !0, s, e);
436  let c = {
437    scrollLeft: 0,
438    scrollTop: 0
439  };
440  const a = bt(0);
441  function o() {
442    a.x = Re(i);
443  }
444  if (r || !r && !s)
445    if ((Kt(e) !== "body" || ue(i)) && (c = De(e)), r) {
446      const p = Rt(e, !0, s, e);
447      a.x = p.x + e.clientLeft, a.y = p.y + e.clientTop;
448    } else i && o();
449  s && !r && i && o();
450  const u = i && !r && !s ? Fr(i, c) : bt(0), h = l.left + c.scrollLeft - a.x - u.x, f = l.top + c.scrollTop - a.y - u.y;
451  return {
452    x: h,
453    y: f,
454    width: l.width,
455    height: l.height
456  };
457}
458function Ne(t) {
459  return ht(t).position === "static";
460}
461function jn(t, e) {
462  if (!St(t) || ht(t).position === "fixed")
463    return null;
464  if (e)
465    return e(t);
466  let n = t.offsetParent;
467  return vt(t) === n && (n = n.ownerDocument.body), n;
468}
469function $r(t, e) {
470  const n = it(t);
471  if (je(t))
472    return n;
473  if (!St(t)) {
474    let i = Tt(t);
475    for (; i && !qt(i); ) {
476      if (ut(i) && !Ne(i))
477        return i;
478      i = Tt(i);
479    }
480    return n;
481  }
482  let r = jn(t, e);
483  for (; r && _o(r) && Ne(r); )
484    r = jn(r, e);
485  return r && qt(r) && Ne(r) && !yn(r) ? n : r || Ro(t) || n;
486}
487const Go = function(t) {
488  return _(this, null, function* () {
489    const e = this.getOffsetParent || $r, n = this.getDimensions, r = yield n(t.floating);
490    return {
491      reference: qo(t.reference, yield e(t.floating), t.strategy),
492      floating: {
493        x: 0,
494        y: 0,
495        width: r.width,
496        height: r.height
497      }
498    };
499  });
500};
501function Xo(t) {
502  return ht(t).direction === "rtl";
503}
504const nt = {
505  convertOffsetParentRelativeRectToViewportRelativeRect: Fo,
506  getDocumentElement: vt,
507  getClippingRect: Ho,
508  getOffsetParent: $r,
509  getElementRects: Go,
510  getClientRects: zo,
511  getDimensions: Qo,
512  getScale: Ht,
513  isElement: ut,
514  isRTL: Xo
515};
516function Br(t, e) {
517  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
518}
519function Yo(t, e) {
520  let n = null, r;
521  const i = vt(t);
522  function s() {
523    var c;
524    clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
525  }
526  function l(c, a) {
527    c === void 0 && (c = !1), a === void 0 && (a = 1), s();
528    const o = t.getBoundingClientRect(), {
529      left: u,
530      top: h,
531      width: f,
532      height: p
533    } = o;
534    if (c || e(), !f || !p)
535      return;
536    const d = fe(h), k = fe(i.clientWidth - (u + f)), g = fe(i.clientHeight - (h + p)), y = fe(u), w = {
537      rootMargin: -d + "px " + -k + "px " + -g + "px " + -y + "px",
538      threshold: Vt(0, nn(1, a)) || 1
539    };
540    let x = !0;
541    function T(lt) {
542      const v = lt[0].intersectionRatio;
543      if (v !== a) {
544        if (!x)
545          return l();
546        v ? l(!1, v) : r = setTimeout(() => {
547          l(!1, 1e-7);
548        }, 1e3);
549      }
550      v === 1 && !Br(o, t.getBoundingClientRect()) && l(), x = !1;
551    }
552    try {
553      n = new IntersectionObserver(T, G(W({}, w), {
554        // Handle <iframe>s
555        root: i.ownerDocument
556      }));
557    } catch {
558      n = new IntersectionObserver(T, w);
559    }
560    n.observe(t);
561  }
562  return l(!0), s;
563}
564function sn(t, e, n, r) {
565  r === void 0 && (r = {});
566  const {
567    ancestorScroll: i = !0,
568    ancestorResize: s = !0,
569    elementResize: l = typeof ResizeObserver == "function",
570    layoutShift: c = typeof IntersectionObserver == "function",
571    animationFrame: a = !1
572  } = r, o = bn(t), u = i || s ? [...o ? le(o) : [], ...le(e)] : [];
573  u.forEach((y) => {
574    i && y.addEventListener("scroll", n, {
575      passive: !0
576    }), s && y.addEventListener("resize", n);
577  });
578  const h = o && c ? Yo(o, n) : null;
579  let f = -1, p = null;
580  l && (p = new ResizeObserver((y) => {
581    let [w] = y;
582    w && w.target === o && p && (p.unobserve(e), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
583      var x;
584      (x = p) == null || x.observe(e);
585    })), n();
586  }), o && !a && p.observe(o), p.observe(e));
587  let d, k = a ? Rt(t) : null;
588  a && g();
589  function g() {
590    const y = Rt(t);
591    k && !Br(k, y) && n(), k = y, d = requestAnimationFrame(g);
592  }
593  return n(), () => {
594    var y;
595    u.forEach((w) => {
596      i && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
597    }), h == null || h(), (y = p) == null || y.disconnect(), p = null, a && cancelAnimationFrame(d);
598  };
599}
600const Jo = Oo;
601let Wt = null;
602class Q {
603  static createItem(e) {
604    return {
605      prev: null,
606      next: null,
607      data: e
608    };
609  }
610  constructor() {
611    this.head = null, this.tail = null, this.cursor = null;
612  }
613  createItem(e) {
614    return Q.createItem(e);
615  }
616  // cursor helpers
617  allocateCursor(e, n) {
618    let r;
619    return Wt !== null ? (r = Wt, Wt = Wt.cursor, r.prev = e, r.next = n, r.curs
vendor: 74,009 bytes, lines 619-3234
619or = this.cursor) : r = {
620      prev: e,
621      next: n,
622      cursor: this.cursor
623    }, this.cursor = r, r;
624  }
625  releaseCursor() {
626    const { cursor: e } = this;
627    this.cursor = e.cursor, e.prev = null, e.next = null, e.cursor = Wt, Wt = e;
628  }
629  updateCursors(e, n, r, i) {
630    let { cursor: s } = this;
631    for (; s !== null; )
632      s.prev === e && (s.prev = n), s.next === r && (s.next = i), s = s.cursor;
633  }
634  *[Symbol.iterator]() {
635    for (let e = this.head; e !== null; e = e.next)
636      yield e.data;
637  }
638  // getters
639  get size() {
640    let e = 0;
641    for (let n = this.head; n !== null; n = n.next)
642      e++;
643    return e;
644  }
645  get isEmpty() {
646    return this.head === null;
647  }
648  get first() {
649    return this.head && this.head.data;
650  }
651  get last() {
652    return this.tail && this.tail.data;
653  }
654  // convertors
655  fromArray(e) {
656    let n = null;
657    this.head = null;
658    for (let r of e) {
659      const i = Q.createItem(r);
660      n !== null ? n.next = i : this.head = i, i.prev = n, n = i;
661    }
662    return this.tail = n, this;
663  }
664  toArray() {
665    return [...this];
666  }
667  toJSON() {
668    return [...this];
669  }
670  // array-like methods
671  forEach(e, n = this) {
672    const r = this.allocateCursor(null, this.head);
673    for (; r.next !== null; ) {
674      const i = r.next;
675      r.next = i.next, e.call(n, i.data, i, this);
676    }
677    this.releaseCursor();
678  }
679  forEachRight(e, n = this) {
680    const r = this.allocateCursor(this.tail, null);
681    for (; r.prev !== null; ) {
682      const i = r.prev;
683      r.prev = i.prev, e.call(n, i.data, i, this);
684    }
685    this.releaseCursor();
686  }
687  reduce(e, n, r = this) {
688    let i = this.allocateCursor(null, this.head), s = n, l;
689    for (; i.next !== null; )
690      l = i.next, i.next = l.next, s = e.call(r, s, l.data, l, this);
691    return this.releaseCursor(), s;
692  }
693  reduceRight(e, n, r = this) {
694    let i = this.allocateCursor(this.tail, null), s = n, l;
695    for (; i.prev !== null; )
696      l = i.prev, i.prev = l.prev, s = e.call(r, s, l.data, l, this);
697    return this.releaseCursor(), s;
698  }
699  some(e, n = this) {
700    for (let r = this.head; r !== null; r = r.next)
701      if (e.call(n, r.data, r, this))
702        return !0;
703    return !1;
704  }
705  map(e, n = this) {
706    const r = new Q();
707    for (let i = this.head; i !== null; i = i.next)
708      r.appendData(e.call(n, i.data, i, this));
709    return r;
710  }
711  filter(e, n = this) {
712    const r = new Q();
713    for (let i = this.head; i !== null; i = i.next)
714      e.call(n, i.data, i, this) && r.appendData(i.data);
715    return r;
716  }
717  nextUntil(e, n, r = this) {
718    if (e === null)
719      return;
720    const i = this.allocateCursor(null, e);
721    for (; i.next !== null; ) {
722      const s = i.next;
723      if (i.next = s.next, n.call(r, s.data, s, this))
724        break;
725    }
726    this.releaseCursor();
727  }
728  prevUntil(e, n, r = this) {
729    if (e === null)
730      return;
731    const i = this.allocateCursor(e, null);
732    for (; i.prev !== null; ) {
733      const s = i.prev;
734      if (i.prev = s.prev, n.call(r, s.data, s, this))
735        break;
736    }
737    this.releaseCursor();
738  }
739  // mutation
740  clear() {
741    this.head = null, this.tail = null;
742  }
743  copy() {
744    const e = new Q();
745    for (let n of this)
746      e.appendData(n);
747    return e;
748  }
749  prepend(e) {
750    return this.updateCursors(null, e, this.head, e), this.head !== null ? (this.head.prev = e, e.next = this.head) : this.tail = e, this.head = e, this;
751  }
752  prependData(e) {
753    return this.prepend(Q.createItem(e));
754  }
755  append(e) {
756    return this.insert(e);
757  }
758  appendData(e) {
759    return this.insert(Q.createItem(e));
760  }
761  insert(e, n = null) {
762    if (n !== null)
763      if (this.updateCursors(n.prev, e, n, e), n.prev === null) {
764        if (this.head !== n)
765          throw new Error("before doesn't belong to list");
766        this.head = e, n.prev = e, e.next = n, this.updateCursors(null, e);
767      } else
768        n.prev.next = e, e.prev = n.prev, n.prev = e, e.next = n;
769    else
770      this.updateCursors(this.tail, e, null, e), this.tail !== null ? (this.tail.next = e, e.prev = this.tail) : this.head = e, this.tail = e;
771    return this;
772  }
773  insertData(e, n) {
774    return this.insert(Q.createItem(e), n);
775  }
776  remove(e) {
777    if (this.updateCursors(e, e.prev, e, e.next), e.prev !== null)
778      e.prev.next = e.next;
779    else {
780      if (this.head !== e)
781        throw new Error("item doesn't belong to list");
782      this.head = e.next;
783    }
784    if (e.next !== null)
785      e.next.prev = e.prev;
786    else {
787      if (this.tail !== e)
788        throw new Error("item doesn't belong to list");
789      this.tail = e.prev;
790    }
791    return e.prev = null, e.next = null, e;
792  }
793  push(e) {
794    this.insert(Q.createItem(e));
795  }
796  pop() {
797    return this.tail !== null ? this.remove(this.tail) : null;
798  }
799  unshift(e) {
800    this.prepend(Q.createItem(e));
801  }
802  shift() {
803    return this.head !== null ? this.remove(this.head) : null;
804  }
805  prependList(e) {
806    return this.insertList(e, this.head);
807  }
808  appendList(e) {
809    return this.insertList(e);
810  }
811  insertList(e, n) {
812    return e.head === null ? this : (n != null ? (this.updateCursors(n.prev, e.tail, n, e.head), n.prev !== null ? (n.prev.next = e.head, e.head.prev = n.prev) : this.head = e.head, n.prev = e.tail, e.tail.next = n) : (this.updateCursors(this.tail, e.tail, null, e.head), this.tail !== null ? (this.tail.next = e.head, e.head.prev = this.tail) : this.head = e.head, this.tail = e.tail), e.head = null, e.tail = null, this);
813  }
814  replace(e, n) {
815    "head" in n ? this.insertList(n, e) : this.insert(n, e), this.remove(e);
816  }
817}
818function Le(t) {
819  const e = {};
820  for (const n of Object.keys(t)) {
821    let r = t[n];
822    r && (Array.isArray(r) || r instanceof Q ? r = r.map(Le) : r.constructor === Object && (r = Le(r))), e[n] = r;
823  }
824  return e;
825}
826const wt = 0, m = 1, C = 2, U = 3, D = 4, Ct = 5, Ko = 6, X = 7, at = 8, O = 9, S = 10, F = 11, L = 12, B = 13, Ie = 14, tt = 15, J = 16, Z = 17, pt = 18, Zt = 19, ae = 20, P = 21, b = 22, ft = 23, Gt = 24, Y = 25, Zo = 0;
827function rt(t) {
828  return t >= 48 && t <= 57;
829}
830function Xt(t) {
831  return rt(t) || // 0 .. 9
832  t >= 65 && t <= 70 || // A .. F
833  t >= 97 && t <= 102;
834}
835function Sn(t) {
836  return t >= 65 && t <= 90;
837}
838function tl(t) {
839  return t >= 97 && t <= 122;
840}
841function el(t) {
842  return Sn(t) || tl(t);
843}
844function nl(t) {
845  return t >= 128;
846}
847function Oe(t) {
848  return el(t) || nl(t) || t === 95;
849}
850function Wr(t) {
851  return Oe(t) || rt(t) || t === 45;
852}
853function rl(t) {
854  return t >= 0 && t <= 8 || t === 11 || t >= 14 && t <= 31 || t === 127;
855}
856function Te(t) {
857  return t === 10 || t === 13 || t === 12;
858}
859function It(t) {
860  return Te(t) || t === 32 || t === 9;
861}
862function gt(t, e) {
863  return !(t !== 92 || Te(e) || e === Zo);
864}
865function Fe(t, e, n) {
866  return t === 45 ? Oe(e) || e === 45 || gt(e, n) : Oe(t) ? !0 : t === 92 ? gt(t, e) : !1;
867}
868function ze(t, e, n) {
869  return t === 43 || t === 45 ? rt(e) ? 2 : e === 46 && rt(n) ? 3 : 0 : t === 46 ? rt(e) ? 2 : 0 : rt(t) ? 1 : 0;
870}
871function Ur(t) {
872  return t === 65279 || t === 65534 ? 1 : 0;
873}
874const on = new Array(128), il = 128, ge = 130, Vr = 131, vn = 132, Hr = 133;
875for (let t = 0; t < on.length; t++)
876  on[t] = It(t) && ge || rt(t) && Vr || Oe(t) && vn || rl(t) && Hr || t || il;
877function $e(t) {
878  return t < 128 ? on[t] : vn;
879}
880function Qt(t, e) {
881  return e < t.length ? t.charCodeAt(e) : 0;
882}
883function ln(t, e, n) {
884  return n === 13 && Qt(t, e + 1) === 10 ? 2 : 1;
885}
886function Qr(t, e, n) {
887  let r = t.charCodeAt(e);
888  return Sn(r) && (r = r | 32), r === n;
889}
890function Ae(t, e, n, r) {
891  if (n - e !== r.length || e < 0 || n > t.length)
892    return !1;
893  for (let i = e; i < n; i++) {
894    const s = r.charCodeAt(i - e);
895    let l = t.charCodeAt(i);
896    if (Sn(l) && (l = l | 32), l !== s)
897      return !1;
898  }
899  return !0;
900}
901function sl(t, e) {
902  for (; e >= 0 && It(t.charCodeAt(e)); e--)
903    ;
904  return e + 1;
905}
906function pe(t, e) {
907  for (; e < t.length && It(t.charCodeAt(e)); e++)
908    ;
909  return e;
910}
911function Be(t, e) {
912  for (; e < t.length && rt(t.charCodeAt(e)); e++)
913    ;
914  return e;
915}
916function Yt(t, e) {
917  if (e += 2, Xt(Qt(t, e - 1))) {
918    for (const r = Math.min(t.length, e + 5); e < r && Xt(Qt(t, e)); e++)
919      ;
920    const n = Qt(t, e);
921    It(n) && (e += ln(t, e, n));
922  }
923  return e;
924}
925function de(t, e) {
926  for (; e < t.length; e++) {
927    const n = t.charCodeAt(e);
928    if (!Wr(n)) {
929      if (gt(n, Qt(t, e + 1))) {
930        e = Yt(t, e) - 1;
931        continue;
932      }
933      break;
934    }
935  }
936  return e;
937}
938function qr(t, e) {
939  let n = t.charCodeAt(e);
940  if ((n === 43 || n === 45) && (n = t.charCodeAt(e += 1)), rt(n) && (e = Be(t, e + 1), n = t.charCodeAt(e)), n === 46 && rt(t.charCodeAt(e + 1)) && (e += 2, e = Be(t, e)), Qr(
941    t,
942    e,
943    101
944    /* e */
945  )) {
946    let r = 0;
947    n = t.charCodeAt(e + 1), (n === 45 || n === 43) && (r = 1, n = t.charCodeAt(e + 2)), rt(n) && (e = Be(t, e + 1 + r + 1));
948  }
949  return e;
950}
951function We(t, e) {
952  for (; e < t.length; e++) {
953    const n = t.charCodeAt(e);
954    if (n === 41) {
955      e++;
956      break;
957    }
958    gt(n, Qt(t, e + 1)) && (e = Yt(t, e));
959  }
960  return e;
961}
962function Gr(t) {
963  if (t.length === 1 && !Xt(t.charCodeAt(0)))
964    return t[0];
965  let e = parseInt(t, 16);
966  return (e === 0 || // If this number is zero,
967  e >= 55296 && e <= 57343 || // or is for a surrogate,
968  e > 1114111) && (e = 65533), String.fromCodePoint(e);
969}
970const Xr = [
971  "EOF-token",
972  "ident-token",
973  "function-token",
974  "at-keyword-token",
975  "hash-token",
976  "string-token",
977  "bad-string-token",
978  "url-token",
979  "bad-url-token",
980  "delim-token",
981  "number-token",
982  "percentage-token",
983  "dimension-token",
984  "whitespace-token",
985  "CDO-token",
986  "CDC-token",
987  "colon-token",
988  "semicolon-token",
989  "comma-token",
990  "[-token",
991  "]-token",
992  "(-token",
993  ")-token",
994  "{-token",
995  "}-token",
996  "comment-token"
997], ol = 16 * 1024;
998function _e(t = null, e) {
999  return t === null || t.length < e ? new Uint32Array(Math.max(e + 1024, ol)) : t;
1000}
1001const Dn = 10, ll = 12, Rn = 13;
1002function In(t) {
1003  const e = t.source, n = e.length, r = e.length > 0 ? Ur(e.charCodeAt(0)) : 0, i = _e(t.lines, n), s = _e(t.columns, n);
1004  let l = t.startLine, c = t.startColumn;
1005  for (let a = r; a < n; a++) {
1006    const o = e.charCodeAt(a);
1007    i[a] = l, s[a] = c++, (o === Dn || o === Rn || o === ll) && (o === Rn && a + 1 < n && e.charCodeAt(a + 1) === Dn && (a++, i[a] = l, s[a] = c), l++, c = 1);
1008  }
1009  i[n] = l, s[n] = c, t.lines = i, t.columns = s, t.computed = !0;
1010}
1011class al {
1012  constructor(e, n, r, i) {
1013    this.setSource(e, n, r, i), this.lines = null, this.columns = null;
1014  }
1015  setSource(e = "", n = 0, r = 1, i = 1) {
1016    this.source = e, this.startOffset = n, this.startLine = r, this.startColumn = i, this.computed = !1;
1017  }
1018  getLocation(e, n) {
1019    return this.computed || In(this), {
1020      source: n,
1021      offset: this.startOffset + e,
1022      line: this.lines[e],
1023      column: this.columns[e]
1024    };
1025  }
1026  getLocationRange(e, n, r) {
1027    return this.computed || In(this), {
1028      source: r,
1029      start: {
1030        offset: this.startOffset + e,
1031        line: this.lines[e],
1032        column: this.columns[e]
1033      },
1034      end: {
1035        offset: this.startOffset + n,
1036        line: this.lines[n],
1037        column: this.columns[n]
1038      }
1039    };
1040  }
1041}
1042const mt = 16777215, kt = 24, Mt = new Uint8Array(32);
1043Mt[C] = b;
1044Mt[P] = b;
1045Mt[Zt] = ae;
1046Mt[ft] = Gt;
1047function Mn(t) {
1048  return Mt[t] !== 0;
1049}
1050class cl {
1051  constructor(e, n) {
1052    this.setSource(e, n);
1053  }
1054  reset() {
1055    this.eof = !1, this.tokenIndex = -1, this.tokenType = 0, this.tokenStart = this.firstCharOffset, this.tokenEnd = this.firstCharOffset;
1056  }
1057  setSource(e = "", n = () => {
1058  }) {
1059    e = String(e || "");
1060    const r = e.length, i = _e(this.offsetAndType, e.length + 1), s = _e(this.balance, e.length + 1);
1061    let l = 0, c = -1, a = 0, o = e.length;
1062    this.offsetAndType = null, this.balance = null, s.fill(0), n(e, (u, h, f) => {
1063      const p = l++;
1064      if (i[p] = u << kt | f, c === -1 && (c = h), s[p] = o, u === a) {
1065        const d = s[o];
1066        s[o] = p, o = d, a = Mt[i[d] >> kt];
1067      } else Mn(u) && (o = p, a = Mt[u]);
1068    }), i[l] = wt << kt | r, s[l] = l;
1069    for (let u = 0; u < l; u++) {
1070      const h = s[u];
1071      if (h <= u) {
1072        const f = s[h];
1073        f !== u && (s[u] = f);
1074      } else h > l && (s[u] = l);
1075    }
1076    this.source = e, this.firstCharOffset = c === -1 ? 0 : c, this.tokenCount = l, this.offsetAndType = i, this.balance = s, this.reset(), this.next();
1077  }
1078  lookupType(e) {
1079    return e += this.tokenIndex, e < this.tokenCount ? this.offsetAndType[e] >> kt : wt;
1080  }
1081  lookupTypeNonSC(e) {
1082    for (let n = this.tokenIndex; n < this.tokenCount; n++) {
1083      const r = this.offsetAndType[n] >> kt;
1084      if (r !== B && r !== Y && e-- === 0)
1085        return r;
1086    }
1087    return wt;
1088  }
1089  lookupOffset(e) {
1090    return e += this.tokenIndex, e < this.tokenCount ? this.offsetAndType[e - 1] & mt : this.source.length;
1091  }
1092  lookupOffsetNonSC(e) {
1093    for (let n = this.tokenIndex; n < this.tokenCount; n++) {
1094      const r = this.offsetAndType[n] >> kt;
1095      if (r !== B && r !== Y && e-- === 0)
1096        return n - this.tokenIndex;
1097    }
1098    return wt;
1099  }
1100  lookupValue(e, n) {
1101    return e += this.tokenIndex, e < this.tokenCount ? Ae(
1102      this.source,
1103      this.offsetAndType[e - 1] & mt,
1104      this.offsetAndType[e] & mt,
1105      n
1106    ) : !1;
1107  }
1108  getTokenStart(e) {
1109    return e === this.tokenIndex ? this.tokenStart : e > 0 ? e < this.tokenCount ? this.offsetAndType[e - 1] & mt : this.offsetAndType[this.tokenCount] & mt : this.firstCharOffset;
1110  }
1111  substrToCursor(e) {
1112    return this.source.substring(e, this.tokenStart);
1113  }
1114  isBalanceEdge(e) {
1115    return this.balance[this.tokenIndex] < e;
1116  }
1117  isDelim(e, n) {
1118    return n ? this.lookupType(n) === O && this.source.charCodeAt(this.lookupOffset(n)) === e : this.tokenType === O && this.source.charCodeAt(this.tokenStart) === e;
1119  }
1120  skip(e) {
1121    let n = this.tokenIndex + e;
1122    n < this.tokenCount ? (this.tokenIndex = n, this.tokenStart = this.offsetAndType[n - 1] & mt, n = this.offsetAndType[n], this.tokenType = n >> kt, this.tokenEnd = n & mt) : (this.tokenIndex = this.tokenCount, this.next());
1123  }
1124  next() {
1125    let e = this.tokenIndex + 1;
1126    e < this.tokenCount ? (this.tokenIndex = e, this.tokenStart = this.tokenEnd, e = this.offsetAndType[e], this.tokenType = e >> kt, this.tokenEnd = e & mt) : (this.eof = !0, this.tokenIndex = this.tokenCount, this.tokenType = wt, this.tokenStart = this.tokenEnd = this.source.length);
1127  }
1128  skipSC() {
1129    for (; this.tokenType === B || this.tokenType === Y; )
1130      this.next();
1131  }
1132  skipUntilBalanced(e, n) {
1133    let r = e, i = 0, s = 0;
1134    t:
1135      for (; r < this.tokenCount; r++) {
1136        if (i = this.balance[r], i < e)
1137          break t;
1138        switch (s = r > 0 ? this.offsetAndType[r - 1] & mt : this.firstCharOffset, n(this.source.charCodeAt(s))) {
1139          case 1:
1140            break t;
1141          case 2:
1142            r++;
1143            break t;
1144          default:
1145            Mn(this.offsetAndType[r] >> kt) && (r = i);
1146        }
1147      }
1148    this.skip(r - this.tokenIndex);
1149  }
1150  forEachToken(e) {
1151    for (let n = 0, r = this.firstCharOffset; n < this.tokenCount; n++) {
1152      const i = r, s = this.offsetAndType[n], l = s & mt, c = s >> kt;
1153      r = l, e(c, i, l, n);
1154    }
1155  }
1156  dump() {
1157    const e = new Array(this.tokenCount);
1158    return this.forEachToken((n, r, i, s) => {
1159      e[s] = {
1160        idx: s,
1161        type: Xr[n],
1162        chunk: this.source.substring(r, i),
1163        balance: this.balance[s]
1164      };
1165    }), e;
1166  }
1167}
1168function Yr(t, e) {
1169  function n(h) {
1170    return h < c ? t.charCodeAt(h) : 0;
1171  }
1172  function r() {
1173    if (o = qr(t, o), Fe(n(o), n(o + 1), n(o + 2))) {
1174      u = L, o = de(t, o);
1175      return;
1176    }
1177    if (n(o) === 37) {
1178      u = F, o++;
1179      return;
1180    }
1181    u = S;
1182  }
1183  function i() {
1184    const h = o;
1185    if (o = de(t, o), Ae(t, h, o, "url") && n(o) === 40) {
1186      if (o = pe(t, o + 1), n(o) === 34 || n(o) === 39) {
1187        u = C, o = h + 4;
1188        return;
1189      }
1190      l();
1191      return;
1192    }
1193    if (n(o) === 40) {
1194      u = C, o++;
1195      return;
1196    }
1197    u = m;
1198  }
1199  function s(h) {
1200    for (h || (h = n(o++)), u = Ct; o < t.length; o++) {
1201      const f = t.charCodeAt(o);
1202      switch ($e(f)) {
1203        // ending code point
1204        case h:
1205          o++;
1206          return;
1207        // EOF
1208        // case EofCategory:
1209        // This is a parse error. Return the <string-token>.
1210        // return;
1211        // newline
1212        case ge:
1213          if (Te(f)) {
1214            o += ln(t, o, f), u = Ko;
1215            return;
1216          }
1217          break;
1218        // U+005C REVERSE SOLIDUS (\)
1219        case 92:
1220          if (o === t.length - 1)
1221            break;
1222          const p = n(o + 1);
1223          Te(p) ? o += ln(t, o + 1, p) : gt(f, p) && (o = Yt(t, o) - 1);
1224          break;
1225      }
1226    }
1227  }
1228  function l() {
1229    for (u = X, o = pe(t, o); o < t.length; o++) {
1230      const h = t.charCodeAt(o);
1231      switch ($e(h)) {
1232        // U+0029 RIGHT PARENTHESIS ())
1233        case 41:
1234          o++;
1235          return;
1236        // EOF
1237        // case EofCategory:
1238        // This is a parse error. Return the <url-token>.
1239        // return;
1240        // whitespace
1241        case ge:
1242          if (o = pe(t, o), n(o) === 41 || o >= t.length) {
1243            o < t.length && o++;
1244            return;
1245          }
1246          o = We(t, o), u = at;
1247          return;
1248        // U+0022 QUOTATION MARK (")
1249        // U+0027 APOSTROPHE (')
1250        // U+0028 LEFT PARENTHESIS (()
1251        // non-printable code point
1252        case 34:
1253        case 39:
1254        case 40:
1255        case Hr:
1256          o = We(t, o), u = at;
1257          return;
1258        // U+005C REVERSE SOLIDUS (\)
1259        case 92:
1260          if (gt(h, n(o + 1))) {
1261            o = Yt(t, o) - 1;
1262            break;
1263          }
1264          o = We(t, o), u = at;
1265          return;
1266      }
1267    }
1268  }
1269  t = String(t || "");
1270  const c = t.length;
1271  let a = Ur(n(0)), o = a, u;
1272  for (; o < c; ) {
1273    const h = t.charCodeAt(o);
1274    switch ($e(h)) {
1275      // whitespace
1276      case ge:
1277        u = B, o = pe(t, o + 1);
1278        break;
1279      // U+0022 QUOTATION MARK (")
1280      case 34:
1281        s();
1282        break;
1283      // U+0023 NUMBER SIGN (#)
1284      case 35:
1285        Wr(n(o + 1)) || gt(n(o + 1), n(o + 2)) ? (u = D, o = de(t, o + 1)) : (u = O, o++);
1286        break;
1287      // U+0027 APOSTROPHE (')
1288      case 39:
1289        s();
1290        break;
1291      // U+0028 LEFT PARENTHESIS (()
1292      case 40:
1293        u = P, o++;
1294        break;
1295      // U+0029 RIGHT PARENTHESIS ())
1296      case 41:
1297        u = b, o++;
1298        break;
1299      // U+002B PLUS SIGN (+)
1300      case 43:
1301        ze(h, n(o + 1), n(o + 2)) ? r() : (u = O, o++);
1302        break;
1303      // U+002C COMMA (,)
1304      case 44:
1305        u = pt, o++;
1306        break;
1307      // U+002D HYPHEN-MINUS (-)
1308      case 45:
1309        ze(h, n(o + 1), n(o + 2)) ? r() : n(o + 1) === 45 && n(o + 2) === 62 ? (u = tt, o = o + 3) : Fe(h, n(o + 1), n(o + 2)) ? i() : (u = O, o++);
1310        break;
1311      // U+002E FULL STOP (.)
1312      case 46:
1313        ze(h, n(o + 1), n(o + 2)) ? r() : (u = O, o++);
1314        break;
1315      // U+002F SOLIDUS (/)
1316      case 47:
1317        n(o + 1) === 42 ? (u = Y, o = t.indexOf("*/", o + 2), o = o === -1 ? t.length : o + 2) : (u = O, o++);
1318        break;
1319      // U+003A COLON (:)
1320      case 58:
1321        u = J, o++;
1322        break;
1323      // U+003B SEMICOLON (;)
1324      case 59:
1325        u = Z, o++;
1326        break;
1327      // U+003C LESS-THAN SIGN (<)
1328      case 60:
1329        n(o + 1) === 33 && n(o + 2) === 45 && n(o + 3) === 45 ? (u = Ie, o = o + 4) : (u = O, o++);
1330        break;
1331      // U+0040 COMMERCIAL AT (@)
1332      case 64:
1333        Fe(n(o + 1), n(o + 2), n(o + 3)) ? (u = U, o = de(t, o + 1)) : (u = O, o++);
1334        break;
1335      // U+005B LEFT SQUARE BRACKET ([)
1336      case 91:
1337        u = Zt, o++;
1338        break;
1339      // U+005C REVERSE SOLIDUS (\)
1340      case 92:
1341        gt(h, n(o + 1)) ? i() : (u = O, o++);
1342        break;
1343      // U+005D RIGHT SQUARE BRACKET (])
1344      case 93:
1345        u = ae, o++;
1346        break;
1347      // U+007B LEFT CURLY BRACKET ({)
1348      case 123:
1349        u = ft, o++;
1350        break;
1351      // U+007D RIGHT CURLY BRACKET (})
1352      case 125:
1353        u = Gt, o++;
1354        break;
1355      // digit
1356      case Vr:
1357        r();
1358        break;
1359      // name-start code point
1360      case vn:
1361        i();
1362        break;
1363      // EOF
1364      // case EofCategory:
1365      // Return an <EOF-token>.
1366      // break;
1367      // anything else
1368      default:
1369        u = O, o++;
1370    }
1371    e(u, a, a = o);
1372  }
1373}
1374const Nn = 45;
1375function ul(t, e) {
1376  return e = e || 0, t.length - e >= 2 && t.charCodeAt(e) === Nn && t.charCodeAt(e + 1) === Nn;
1377}
1378const an = 92, Jr = 34, hl = 39;
1379function Kr(t) {
1380  const e = t.length, n = t.charCodeAt(0), r = n === Jr || n === hl ? 1 : 0, i = r === 1 && e > 1 && t.charCodeAt(e - 1) === n ? e - 2 : e - 1;
1381  let s = "";
1382  for (let l = r; l <= i; l++) {
1383    let c = t.charCodeAt(l);
1384    if (c === an) {
1385      if (l === i) {
1386        l !== e - 1 && (s = t.substr(l + 1));
1387        break;
1388      }
1389      if (c = t.charCodeAt(++l), gt(an, c)) {
1390        const a = l - 1, o = Yt(t, a);
1391        l = o - 1, s += Gr(t.substring(a + 1, o));
1392      } else
1393        c === 13 && t.charCodeAt(l + 1) === 10 && l++;
1394    } else
1395      s += t[l];
1396  }
1397  return s;
1398}
1399function fl(t, e) {
1400  const n = Jr;
1401  let r = "", i = !1;
1402  for (let s = 0; s < t.length; s++) {
1403    const l = t.charCodeAt(s);
1404    if (l === 0) {
1405      r += "�";
1406      continue;
1407    }
1408    if (l <= 31 || l === 127) {
1409      r += "\\" + l.toString(16), i = !0;
1410      continue;
1411    }
1412    l === n || l === an ? (r += "\\" + t.charAt(s), i = !1) : (i && (Xt(l) || It(l)) && (r += " "), r += t.charAt(s), i = !1);
1413  }
1414  return '"' + r + '"';
1415}
1416const pl = 32, cn = 92, dl = 34, ml = 39, kl = 40, Zr = 41;
1417function yl(t) {
1418  const e = t.length;
1419  let n = 4, r = t.charCodeAt(e - 1) === Zr ? e - 2 : e - 1, i = "";
1420  for (; n < r && It(t.charCodeAt(n)); )
1421    n++;
1422  for (; n < r && It(t.charCodeAt(r)); )
1423    r--;
1424  for (let s = n; s <= r; s++) {
1425    let l = t.charCodeAt(s);
1426    if (l === cn) {
1427      if (s === r) {
1428        s !== e - 1 && (i = t.substr(s + 1));
1429        break;
1430      }
1431      if (l = t.charCodeAt(++s), gt(cn, l)) {
1432        const c = s - 1, a = Yt(t, c);
1433        s = a - 1, i += Gr(t.substring(c + 1, a));
1434      } else
1435        l === 13 && t.charCodeAt(s + 1) === 10 && s++;
1436    } else
1437      i += t[s];
1438  }
1439  return i;
1440}
1441function gl(t) {
1442  let e = "", n = !1;
1443  for (let r = 0; r < t.length; r++) {
1444    const i = t.charCodeAt(r);
1445    if (i === 0) {
1446      e += "�";
1447      continue;
1448    }
1449    if (i <= 31 || i === 127) {
1450      e += "\\" + i.toString(16), n = !0;
1451      continue;
1452    }
1453    i === pl || i === cn || i === dl || i === ml || i === kl || i === Zr ? (e += "\\" + t.charAt(r), n = !1) : (n && Xt(i) && (e += " "), e += t.charAt(r), n = !1);
1454  }
1455  return "url(" + e + ")";
1456}
1457const { hasOwnProperty: Cn } = Object.prototype, te = function() {
1458};
1459function Fn(t) {
1460  return typeof t == "function" ? t : te;
1461}
1462function zn(t, e) {
1463  return function(n, r, i) {
1464    n.type === e && t.call(this, n, r, i);
1465  };
1466}
1467function bl(t, e) {
1468  const n = e.structure, r = [];
1469  for (const i in n) {
1470    if (Cn.call(n, i) === !1)
1471      continue;
1472    let s = n[i];
1473    const l = {
1474      name: i,
1475      type: !1,
1476      nullable: !1
1477    };
1478    Array.isArray(s) || (s = [s]);
1479    for (const c of s)
1480      c === null ? l.nullable = !0 : typeof c == "string" ? l.type = "node" : Array.isArray(c) && (l.type = "list");
1481    l.type && r.push(l);
1482  }
1483  return r.length ? {
1484    context: e.walkContext,
1485    fields: r
1486  } : null;
1487}
1488function Sl(t) {
1489  const e = {};
1490  for (const n in t.node)
1491    if (Cn.call(t.node, n)) {
1492      const r = t.node[n];
1493      if (!r.structure)
1494        throw new Error("Missed `structure` field in `" + n + "` node type definition");
1495      e[n] = bl(n, r);
1496    }
1497  return e;
1498}
1499function $n(t, e) {
1500  const n = t.fields.slice(), r = t.context, i = typeof r == "string";
1501  return e && n.reverse(), function(s, l, c, a) {
1502    let o;
1503    i && (o = l[r], l[r] = s);
1504    for (const u of n) {
1505      const h = s[u.name];
1506      if (!u.nullable || h) {
1507        if (u.type === "list") {
1508          if (e ? h.reduceRight(a, !1) : h.reduce(a, !1))
1509            return !0;
1510        } else if (c(h))
1511          return !0;
1512      }
1513    }
1514    i && (l[r] = o);
1515  };
1516}
1517function Bn({
1518  StyleSheet: t,
1519  Atrule: e,
1520  Rule: n,
1521  Block: r,
1522  DeclarationList: i
1523}) {
1524  return {
1525    Atrule: {
1526      StyleSheet: t,
1527      Atrule: e,
1528      Rule: n,
1529      Block: r
1530    },
1531    Rule: {
1532      StyleSheet: t,
1533      Atrule: e,
1534      Rule: n,
1535      Block: r
1536    },
1537    Declaration: {
1538      StyleSheet: t,
1539      Atrule: e,
1540      Rule: n,
1541      Block: r,
1542      DeclarationList: i
1543    }
1544  };
1545}
1546function vl(t) {
1547  const e = Sl(t), n = {}, r = {}, i = /* @__PURE__ */ Symbol("break-walk"), s = /* @__PURE__ */ Symbol("skip-node");
1548  for (const o in e)
1549    Cn.call(e, o) && e[o] !== null && (n[o] = $n(e[o], !1), r[o] = $n(e[o], !0));
1550  const l = Bn(n), c = Bn(r), a = function(o, u) {
1551    function h(y, w, x) {
1552      const T = f.call(g, y, w, x);
1553      return T === i ? !0 : T === s ? !1 : !!(d.hasOwnProperty(y.type) && d[y.type](y, g, h, k) || p.call(g, y, w, x) === i);
1554    }
1555    let f = te, p = te, d = n, k = (y, w, x, T) => y || h(w, x, T);
1556    const g = {
1557      break: i,
1558      skip: s,
1559      root: o,
1560      stylesheet: null,
1561      atrule: null,
1562      atrulePrelude: null,
1563      rule: null,
1564      selector: null,
1565      block: null,
1566      declaration: null,
1567      function: null
1568    };
1569    if (typeof u == "function")
1570      f = u;
1571    else if (u && (f = Fn(u.enter), p = Fn(u.leave), u.reverse && (d = r), u.visit)) {
1572      if (l.hasOwnProperty(u.visit))
1573        d = u.reverse ? c[u.visit] : l[u.visit];
1574      else if (!e.hasOwnProperty(u.visit))
1575        throw new Error("Bad value `" + u.visit + "` for `visit` option (should be: " + Object.keys(e).sort().join(", ") + ")");
1576      f = zn(f, u.visit), p = zn(p, u.visit);
1577    }
1578    if (f === te && p === te)
1579      throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");
1580    h(o);
1581  };
1582  return a.break = i, a.skip = s, a.find = function(o, u) {
1583    let h = null;
1584    return a(o, function(f, p, d) {
1585      if (u.call(this, f, p, d))
1586        return h = f, i;
1587    }), h;
1588  }, a.findLast = function(o, u) {
1589    let h = null;
1590    return a(o, {
1591      reverse: !0,
1592      enter(f, p, d) {
1593        if (u.call(this, f, p, d))
1594          return h = f, i;
1595      }
1596    }), h;
1597  }, a.findAll = function(o, u) {
1598    const h = [];
1599    return a(o, function(f, p, d) {
1600      u.call(this, f, p, d) && h.push(f);
1601    }), h;
1602  }, a;
1603}
1604const yt = 43, et = 45, be = 110, Pt = !0, Cl = !1;
1605function Se(t, e) {
1606  let n = this.tokenStart + t;
1607  const r = this.charCodeAt(n);
1608  for ((r === yt || r === et) && (e && this.error("Number sign is not allowed"), n++); n < this.tokenEnd; n++)
1609    rt(this.charCodeAt(n)) || this.error("Integer is expected", n);
1610}
1611function Ut(t) {
1612  return Se.call(this, 0, t);
1613}
1614function xt(t, e) {
1615  if (!this.cmpChar(this.tokenStart + t, e)) {
1616    let n = "";
1617    switch (e) {
1618      case be:
1619        n = "N is expected";
1620        break;
1621      case et:
1622        n = "HyphenMinus is expected";
1623        break;
1624    }
1625    this.error(n, this.tokenStart + t);
1626  }
1627}
1628function Ue() {
1629  let t = 0, e = 0, n = this.tokenType;
1630  for (; n === B || n === Y; )
1631    n = this.lookupType(++t);
1632  if (n !== S)
1633    if (this.isDelim(yt, t) || this.isDelim(et, t)) {
1634      e = this.isDelim(yt, t) ? yt : et;
1635      do
1636        n = this.lookupType(++t);
1637      while (n === B || n === Y);
1638      n !== S && (this.skip(t), Ut.call(this, Pt));
1639    } else
1640      return null;
1641  return t > 0 && this.skip(t), e === 0 && (n = this.charCodeAt(this.tokenStart), n !== yt && n !== et && this.error("Number sign is expected")), Ut.call(this, e !== 0), e === et ? "-" + this.consume(S) : this.consume(S);
1642}
1643const xl = "AnPlusB", wl = {
1644  a: [String, null],
1645  b: [String, null]
1646};
1647function ti() {
1648  const t = this.tokenStart;
1649  let e = null, n = null;
1650  if (this.tokenType === S)
1651    Ut.call(this, Cl), n = this.consume(S);
1652  else if (this.tokenType === m && this.cmpChar(this.tokenStart, et))
1653    switch (e = "-1", xt.call(this, 1, be), this.tokenEnd - this.tokenStart) {
1654      // -n
1655      // -n <signed-integer>
1656      // -n ['+' | '-'] <signless-integer>
1657      case 2:
1658        this.next(), n = Ue.call(this);
1659        break;
1660      // -n- <signless-integer>
1661      case 3:
1662        xt.call(this, 2, et), this.next(), this.skipSC(), Ut.call(this, Pt), n = "-" + this.consume(S);
1663        break;
1664      // <dashndashdigit-ident>
1665      default:
1666        xt.call(this, 2, et), Se.call(this, 3, Pt), this.next(), n = this.substrToCursor(t + 2);
1667    }
1668  else if (this.tokenType === m || this.isDelim(yt) && this.lookupType(1) === m) {
1669    let r = 0;
1670    switch (e = "1", this.isDelim(yt) && (r = 1, this.next()), xt.call(this, 0, be), this.tokenEnd - this.tokenStart) {
1671      // '+'? n
1672      // '+'? n <signed-integer>
1673      // '+'? n ['+' | '-'] <signless-integer>
1674      case 1:
1675        this.next(), n = Ue.call(this);
1676        break;
1677      // '+'? n- <signless-integer>
1678      case 2:
1679        xt.call(this, 1, et), this.next(), this.skipSC(), Ut.call(this, Pt), n = "-" + this.consume(S);
1680        break;
1681      // '+'? <ndashdigit-ident>
1682      default:
1683        xt.call(this, 1, et), Se.call(this, 2, Pt), this.next(), n = this.substrToCursor(t + r + 1);
1684    }
1685  } else if (this.tokenType === L) {
1686    const r = this.charCodeAt(this.tokenStart), i = r === yt || r === et;
1687    let s = this.tokenStart + i;
1688    for (; s < this.tokenEnd && rt(this.charCodeAt(s)); s++)
1689      ;
1690    s === this.tokenStart + i && this.error("Integer is expected", this.tokenStart + i), xt.call(this, s - this.tokenStart, be), e = this.substring(t, s), s + 1 === this.tokenEnd ? (this.next(), n = Ue.call(this)) : (xt.call(this, s - this.tokenStart + 1, et), s + 2 === this.tokenEnd ? (this.next(), this.skipSC(), Ut.call(this, Pt), n = "-" + this.consume(S)) : (Se.call(this, s - this.tokenStart + 2, Pt), this.next(), n = this.substrToCursor(s + 1)));
1691  } else
1692    this.error();
1693  return e !== null && e.charCodeAt(0) === yt && (e = e.substr(1)), n !== null && n.charCodeAt(0) === yt && (n = n.substr(1)), {
1694    type: "AnPlusB",
1695    loc: this.getLocation(t, this.tokenStart),
1696    a: e,
1697    b: n
1698  };
1699}
1700function ei(t) {
1701  if (t.a) {
1702    const e = t.a === "+1" && "n" || t.a === "1" && "n" || t.a === "-1" && "-n" || t.a + "n";
1703    if (t.b) {
1704      const n = t.b[0] === "-" || t.b[0] === "+" ? t.b : "+" + t.b;
1705      this.tokenize(e + n);
1706    } else
1707      this.tokenize(e);
1708  } else
1709    this.tokenize(t.b);
1710}
1711const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1712  __proto__: null,
1713  generate: ei,
1714  name: xl,
1715  parse: ti,
1716  structure: wl
1717}, Symbol.toStringTag, { value: "Module" }));
1718function Wn() {
1719  return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon, !0);
1720}
1721function Ol() {
1722  for (let t = 1, e; e = this.lookupType(t); t++) {
1723    if (e === Gt)
1724      return !0;
1725    if (e === ft || e === U)
1726      return !1;
1727  }
1728  return !1;
1729}
1730const Tl = "Atrule", Al = "atrule", _l = {
1731  name: String,
1732  prelude: ["AtrulePrelude", "Raw", null],
1733  block: ["Block", null]
1734};
1735function ni(t = !1) {
1736  const e = this.tokenStart;
1737  let n, r, i = null, s = null;
1738  switch (this.eat(U), n = this.substrToCursor(e + 1), r = n.toLowerCase(), this.skipSC(), this.eof === !1 && this.tokenType !== ft && this.tokenType !== Z && (this.parseAtrulePrelude ? i = this.parseWithFallback(this.AtrulePrelude.bind(this, n, t), Wn) : i = Wn.call(this, this.tokenIndex), this.skipSC()), this.tokenType) {
1739    case Z:
1740      this.next();
1741      break;
1742    case ft:
1743      hasOwnProperty.call(this.atrule, r) && typeof this.atrule[r].block == "function" ? s = this.atrule[r].block.call(this, t) : s = this.Block(Ol.call(this));
1744      break;
1745  }
1746  return {
1747    type: "Atrule",
1748    loc: this.getLocation(e, this.tokenStart),
1749    name: n,
1750    prelude: i,
1751    block: s
1752  };
1753}
1754function ri(t) {
1755  this.token(U, "@" + t.name), t.prelude !== null && this.node(t.prelude), t.block ? this.node(t.block) : this.token(Z, ";");
1756}
1757const Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1758  __proto__: null,
1759  generate: ri,
1760  name: Tl,
1761  parse: ni,
1762  structure: _l,
1763  walkContext: Al
1764}, Symbol.toStringTag, { value: "Module" })), El = "AtrulePrelude", jl = "atrulePrelude", Dl = {
1765  children: [[]]
1766};
1767function ii(t) {
1768  let e = null;
1769  return t !== null && (t = t.toLowerCase()), this.skipSC(), hasOwnProperty.call(this.atrule, t) && typeof this.atrule[t].prelude == "function" ? e = this.atrule[t].prelude.call(this) : e = this.readSequence(this.scope.AtrulePrelude), this.skipSC(), this.eof !== !0 && this.tokenType !== ft && this.tokenType !== Z && this.error("Semicolon or block is expected"), {
1770    type: "AtrulePrelude",
1771    loc: this.getLocationFromList(e),
1772    children: e
1773  };
1774}
1775function si(t) {
1776  this.children(t);
1777}
1778const Rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1779  __proto__: null,
1780  generate: si,
1781  name: El,
1782  parse: ii,
1783  structure: Dl,
1784  walkContext: jl
1785}, Symbol.toStringTag, { value: "Module" })), Il = 36, oi = 42, ve = 61, Ml = 94, un = 124, Nl = 126;
1786function Fl() {
1787  this.eof && this.error("Unexpected end of input");
1788  const t = this.tokenStart;
1789  let e = !1;
1790  return this.isDelim(oi) ? (e = !0, this.next()) : this.isDelim(un) || this.eat(m), this.isDelim(un) ? this.charCodeAt(this.tokenStart + 1) !== ve ? (this.next(), this.eat(m)) : e && this.error("Identifier is expected", this.tokenEnd) : e && this.error("Vertical line is expected"), {
1791    type: "Identifier",
1792    loc: this.getLocation(t, this.tokenStart),
1793    name: this.substrToCursor(t)
1794  };
1795}
1796function zl() {
1797  const t = this.tokenStart, e = this.charCodeAt(t);
1798  return e !== ve && // =
1799  e !== Nl && // ~=
1800  e !== Ml && // ^=
1801  e !== Il && // $=
1802  e !== oi && // *=
1803  e !== un && this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"), this.next(), e !== ve && (this.isDelim(ve) || this.error("Equal sign is expected"), this.next()), this.substrToCursor(t);
1804}
1805const $l = "AttributeSelector", Bl = {
1806  name: "Identifier",
1807  matcher: [String, null],
1808  value: ["String", "Identifier", null],
1809  flags: [String, null]
1810};
1811function li() {
1812  const t = this.tokenStart;
1813  let e, n = null, r = null, i = null;
1814  return this.eat(Zt), this.skipSC(), e = Fl.call(this), this.skipSC(), this.tokenType !== ae && (this.tokenType !== m && (n = zl.call(this), this.skipSC(), r = this.tokenType === Ct ? this.String() : this.Identifier(), this.skipSC()), this.tokenType === m && (i = this.consume(m), this.skipSC())), this.eat(ae), {
1815    type: "AttributeSelector",
1816    loc: this.getLocation(t, this.tokenStart),
1817    name: e,
1818    matcher: n,
1819    value: r,
1820    flags: i
1821  };
1822}
1823function ai(t) {
1824  this.token(O, "["), this.node(t.name), t.matcher !== null && (this.tokenize(t.matcher), this.node(t.value)), t.flags !== null && this.token(m, t.flags), this.token(O, "]");
1825}
1826const Wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1827  __proto__: null,
1828  generate: ai,
1829  name: $l,
1830  parse: li,
1831  structure: Bl
1832}, Symbol.toStringTag, { value: "Module" })), Ul = 38;
1833function ci() {
1834  return this.Raw(null, !0);
1835}
1836function Un() {
1837  return this.parseWithFallback(this.Rule, ci);
1838}
1839function Vn() {
1840  return this.Raw(this.consumeUntilSemicolonIncluded, !0);
1841}
1842function Vl() {
1843  if (this.tokenType === Z)
1844    return Vn.call(this, this.tokenIndex);
1845  const t = this.parseWithFallback(this.Declaration, Vn);
1846  return this.tokenType === Z && this.next(), t;
1847}
1848const Hl = "Block", Ql = "block", ql = {
1849  children: [[
1850    "Atrule",
1851    "Rule",
1852    "Declaration"
1853  ]]
1854};
1855function ui(t) {
1856  const e = t ? Vl : Un, n = this.tokenStart;
1857  let r = this.createList();
1858  this.eat(ft);
1859  t:
1860    for (; !this.eof; )
1861      switch (this.tokenType) {
1862        case Gt:
1863          break t;
1864        case B:
1865        case Y:
1866          this.next();
1867          break;
1868        case U:
1869          r.push(this.parseWithFallback(this.Atrule.bind(this, t), ci));
1870          break;
1871        default:
1872          t && this.isDelim(Ul) ? r.push(Un.call(this)) : r.push(e.call(this));
1873      }
1874  return this.eof || this.eat(Gt), {
1875    type: "Block",
1876    loc: this.getLocation(n, this.tokenStart),
1877    children: r
1878  };
1879}
1880function hi(t) {
1881  this.token(ft, "{"), this.children(t, (e) => {
1882    e.type === "Declaration" && this.token(Z, ";");
1883  }), this.token(Gt, "}");
1884}
1885const Gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1886  __proto__: null,
1887  generate: hi,
1888  name: Hl,
1889  parse: ui,
1890  structure: ql,
1891  walkContext: Ql
1892}, Symbol.toStringTag, { value: "Module" })), Xl = "Brackets", Yl = {
1893  children: [[]]
1894};
1895function fi(t, e) {
1896  const n = this.tokenStart;
1897  let r = null;
1898  return this.eat(Zt), r = t.call(this, e), this.eof || this.eat(ae), {
1899    type: "Brackets",
1900    loc: this.getLocation(n, this.tokenStart),
1901    children: r
1902  };
1903}
1904function pi(t) {
1905  this.token(O, "["), this.children(t), this.token(O, "]");
1906}
1907const Jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1908  __proto__: null,
1909  generate: pi,
1910  name: Xl,
1911  parse: fi,
1912  structure: Yl
1913}, Symbol.toStringTag, { value: "Module" })), Kl = "CDC", Zl = [];
1914function di() {
1915  const t = this.tokenStart;
1916  return this.eat(tt), {
1917    type: "CDC",
1918    loc: this.getLocation(t, this.tokenStart)
1919  };
1920}
1921function mi() {
1922  this.token(tt, "-->");
1923}
1924const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1925  __proto__: null,
1926  generate: mi,
1927  name: Kl,
1928  parse: di,
1929  structure: Zl
1930}, Symbol.toStringTag, { value: "Module" })), ea = "CDO", na = [];
1931function ki() {
1932  const t = this.tokenStart;
1933  return this.eat(Ie), {
1934    type: "CDO",
1935    loc: this.getLocation(t, this.tokenStart)
1936  };
1937}
1938function yi() {
1939  this.token(Ie, "<!--");
1940}
1941const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1942  __proto__: null,
1943  generate: yi,
1944  name: ea,
1945  parse: ki,
1946  structure: na
1947}, Symbol.toStringTag, { value: "Module" })), ia = 46, sa = "ClassSelector", oa = {
1948  name: String
1949};
1950function gi() {
1951  return this.eatDelim(ia), {
1952    type: "ClassSelector",
1953    loc: this.getLocation(this.tokenStart - 1, this.tokenEnd),
1954    name: this.consume(m)
1955  };
1956}
1957function bi(t) {
1958  this.token(O, "."), this.token(m, t.name);
1959}
1960const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1961  __proto__: null,
1962  generate: bi,
1963  name: sa,
1964  parse: gi,
1965  structure: oa
1966}, Symbol.toStringTag, { value: "Module" })), aa = 43, Hn = 47, ca = 62, ua = 126, ha = "Combinator", fa = {
1967  name: String
1968};
1969function Si() {
1970  const t = this.tokenStart;
1971  let e;
1972  switch (this.tokenType) {
1973    case B:
1974      e = " ";
1975      break;
1976    case O:
1977      switch (this.charCodeAt(this.tokenStart)) {
1978        case ca:
1979        case aa:
1980        case ua:
1981          this.next();
1982          break;
1983        case Hn:
1984          this.next(), this.eatIdent("deep"), this.eatDelim(Hn);
1985          break;
1986        default:
1987          this.error("Combinator is expected");
1988      }
1989      e = this.substrToCursor(t);
1990      break;
1991  }
1992  return {
1993    type: "Combinator",
1994    loc: this.getLocation(t, this.tokenStart),
1995    name: e
1996  };
1997}
1998function vi(t) {
1999  this.tokenize(t.name);
2000}
2001const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2002  __proto__: null,
2003  generate: vi,
2004  name: ha,
2005  parse: Si,
2006  structure: fa
2007}, Symbol.toStringTag, { value: "Module" })), da = 42, ma = 47, ka = "Comment", ya = {
2008  value: String
2009};
2010function Ci() {
2011  const t = this.tokenStart;
2012  let e = this.tokenEnd;
2013  return this.eat(Y), e - t + 2 >= 2 && this.charCodeAt(e - 2) === da && this.charCodeAt(e - 1) === ma && (e -= 2), {
2014    type: "Comment",
2015    loc: this.getLocation(t, this.tokenStart),
2016    value: this.substring(t + 2, e)
2017  };
2018}
2019function xi(t) {
2020  this.token(Y, "/*" + t.value + "*/");
2021}
2022const ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2023  __proto__: null,
2024  generate: xi,
2025  name: ka,
2026  parse: Ci,
2027  structure: ya
2028}, Symbol.toStringTag, { value: "Module" })), ba = /* @__PURE__ */ new Set([J, b, wt]), Sa = "Condition", va = {
2029  kind: String,
2030  children: [[
2031    "Identifier",
2032    "Feature",
2033    "FeatureFunction",
2034    "FeatureRange",
2035    "SupportsDeclaration"
2036  ]]
2037};
2038function Qn(t) {
2039  return this.lookupTypeNonSC(1) === m && ba.has(this.lookupTypeNonSC(2)) ? this.Feature(t) : this.FeatureRange(t);
2040}
2041const Ca = {
2042  media: Qn,
2043  container: Qn,
2044  supports() {
2045    return this.SupportsDeclaration();
2046  }
2047};
2048function wi(t = "media") {
2049  const e = this.createList();
2050  t: for (; !this.eof; )
2051    switch (this.tokenType) {
2052      case Y:
2053      case B:
2054        this.next();
2055        continue;
2056      case m:
2057        e.push(this.Identifier());
2058        break;
2059      case P: {
2060        let n = this.parseWithFallback(
2061          () => Ca[t].call(this, t),
2062          () => null
2063        );
2064        n || (n = this.parseWithFallback(
2065          () => {
2066            this.eat(P);
2067            const r = this.Condition(t);
2068            return this.eat(b), r;
2069          },
2070          () => this.GeneralEnclosed(t)
2071        )), e.push(n);
2072        break;
2073      }
2074      case C: {
2075        let n = this.parseWithFallback(
2076          () => this.FeatureFunction(t),
2077          () => null
2078        );
2079        n || (n = this.GeneralEnclosed(t)), e.push(n);
2080        break;
2081      }
2082      default:
2083        break t;
2084    }
2085  return e.isEmpty && this.error("Condition is expected"), {
2086    type: "Condition",
2087    loc: this.getLocationFromList(e),
2088    kind: t,
2089    children: e
2090  };
2091}
2092function Li(t) {
2093  t.children.forEach((e) => {
2094    e.type === "Condition" ? (this.token(P, "("), this.node(e), this.token(b, ")")) : this.node(e);
2095  });
2096}
2097const xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2098  __proto__: null,
2099  generate: Li,
2100  name: Sa,
2101  parse: wi,
2102  structure: va
2103}, Symbol.toStringTag, { value: "Module" })), Oi = 33, wa = 35, La = 36, Oa = 38, Ta = 42, Aa = 43, qn = 47;
2104function _a() {
2105  return this.Raw(this.consumeUntilExclamationMarkOrSemicolon, !0);
2106}
2107function Pa() {
2108  return this.Raw(this.consumeUntilExclamationMarkOrSemicolon, !1);
2109}
2110function Ea() {
2111  const t = this.tokenIndex, e = this.Value();
2112  return e.type !== "Raw" && this.eof === !1 && this.tokenType !== Z && this.isDelim(Oi) === !1 && this.isBalanceEdge(t) === !1 && this.error(), e;
2113}
2114const ja = "Declaration", Da = "declaration", Ra = {
2115  important: [Boolean, String],
2116  property: String,
2117  value: ["Value", "Raw"]
2118};
2119function Ti() {
2120  const t = this.tokenStart, e = this.tokenIndex, n = Ia.call(this), r = ul(n), i = r ? this.parseCustomProperty : this.parseValue, s = r ? Pa : _a;
2121  let l = !1, c;
2122  this.skipSC(), this.eat(J);
2123  const a = this.tokenIndex;
2124  if (r || this.skipSC(), i ? c = this.parseWithFallback(Ea, s) : c = s.call(this, this.tokenIndex), r && c.type === "Value" && c.children.isEmpty) {
2125    for (let o = a - this.tokenIndex; o <= 0; o++)
2126      if (this.lookupType(o) === B) {
2127        c.children.appendData({
2128          type: "WhiteSpace",
2129          loc: null,
2130          value: " "
2131        });
2132        break;
2133      }
2134  }
2135  return this.isDelim(Oi) && (l = Ma.call(this), this.skipSC()), this.eof === !1 && this.tokenType !== Z && this.isBalanceEdge(e) === !1 && this.error(), {
2136    type: "Declaration",
2137    loc: this.getLocation(t, this.tokenStart),
2138    important: l,
2139    property: n,
2140    value: c
2141  };
2142}
2143function Ai(t) {
2144  this.token(m, t.property), this.token(J, ":"), this.node(t.value), t.important && (this.token(O, "!"), this.token(m, t.important === !0 ? "important" : t.important));
2145}
2146function Ia() {
2147  const t = this.tokenStart;
2148  if (this.tokenType === O)
2149    switch (this.charCodeAt(this.tokenStart)) {
2150      case Ta:
2151      case La:
2152      case Aa:
2153      case wa:
2154      case Oa:
2155        this.next();
2156        break;
2157      // TODO: not sure we should support this hack
2158      case qn:
2159        this.next(), this.isDelim(qn) && this.next();
2160        break;
2161    }
2162  return this.tokenType === D ? this.eat(D) : this.eat(m), this.substrToCursor(t);
2163}
2164function Ma() {
2165  this.eat(O), this.skipSC();
2166  const t = this.consume(m);
2167  return t === "important" ? !0 : t;
2168}
2169const Na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2170  __proto__: null,
2171  generate: Ai,
2172  name: ja,
2173  parse: Ti,
2174  structure: Ra,
2175  walkContext: Da
2176}, Symbol.toStringTag, { value: "Module" })), Fa = 38;
2177function Ve() {
2178  return this.Raw(this.consumeUntilSemicolonIncluded, !0);
2179}
2180const za = "DeclarationList", $a = {
2181  children: [[
2182    "Declaration",
2183    "Atrule",
2184    "Rule"
2185  ]]
2186};
2187function _i() {
2188  const t = this.createList();
2189  for (; !this.eof; )
2190    switch (this.tokenType) {
2191      case B:
2192      case Y:
2193      case Z:
2194        this.next();
2195        break;
2196      case U:
2197        t.push(this.parseWithFallback(this.Atrule.bind(this, !0), Ve));
2198        break;
2199      default:
2200        this.isDelim(Fa) ? t.push(this.parseWithFallback(this.Rule, Ve)) : t.push(this.parseWithFallback(this.Declaration, Ve));
2201    }
2202  return {
2203    type: "DeclarationList",
2204    loc: this.getLocationFromList(t),
2205    children: t
2206  };
2207}
2208function Pi(t) {
2209  this.children(t, (e) => {
2210    e.type === "Declaration" && this.token(Z, ";");
2211  });
2212}
2213const Ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2214  __proto__: null,
2215  generate: Pi,
2216  name: za,
2217  parse: _i,
2218  structure: $a
2219}, Symbol.toStringTag, { value: "Module" })), Wa = "Dimension", Ua = {
2220  value: String,
2221  unit: String
2222};
2223function Ei() {
2224  const t = this.tokenStart, e = this.consumeNumber(L);
2225  return {
2226    type: "Dimension",
2227    loc: this.getLocation(t, this.tokenStart),
2228    value: e,
2229    unit: this.substring(t + e.length, this.tokenStart)
2230  };
2231}
2232function ji(t) {
2233  this.token(L, t.value + t.unit);
2234}
2235const Va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2236  __proto__: null,
2237  generate: ji,
2238  name: Wa,
2239  parse: Ei,
2240  structure: Ua
2241}, Symbol.toStringTag, { value: "Module" })), Ha = 47, Qa = "Feature", qa = {
2242  kind: String,
2243  name: String,
2244  value: ["Identifier", "Number", "Dimension", "Ratio", "Function", null]
2245};
2246function Di(t) {
2247  const e = this.tokenStart;
2248  let n, r = null;
2249  if (this.eat(P), this.skipSC(), n = this.consume(m), this.skipSC(), this.tokenType !== b) {
2250    switch (this.eat(J), this.skipSC(), this.tokenType) {
2251      case S:
2252        this.lookupNonWSType(1) === O ? r = this.Ratio() : r = this.Number();
2253        break;
2254      case L:
2255        r = this.Dimension();
2256        break;
2257      case m:
2258        r = this.Identifier();
2259        break;
2260      case C:
2261        r = this.parseWithFallback(
2262          () => {
2263            const i = this.Function(this.readSequence, this.scope.Value);
2264            return this.skipSC(), this.isDelim(Ha) && this.error(), i;
2265          },
2266          () => this.Ratio()
2267        );
2268        break;
2269      default:
2270        this.error("Number, dimension, ratio or identifier is expected");
2271    }
2272    this.skipSC();
2273  }
2274  return this.eof || this.eat(b), {
2275    type: "Feature",
2276    loc: this.getLocation(e, this.tokenStart),
2277    kind: t,
2278    name: n,
2279    value: r
2280  };
2281}
2282function Ri(t) {
2283  this.token(P, "("), this.token(m, t.name), t.value !== null && (this.token(J, ":"), this.node(t.value)), this.token(b, ")");
2284}
2285const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2286  __proto__: null,
2287  generate: Ri,
2288  name: Qa,
2289  parse: Di,
2290  structure: qa
2291}, Symbol.toStringTag, { value: "Module" })), Xa = "FeatureFunction", Ya = {
2292  kind: String,
2293  feature: String,
2294  value: ["Declaration", "Selector"]
2295};
2296function Ja(t, e) {
2297  const n = (this.features[t] || {})[e];
2298  return typeof n != "function" && this.error(`Unknown feature ${e}()`), n;
2299}
2300function Ii(t = "unknown") {
2301  const e = this.tokenStart, n = this.consumeFunctionName(), r = Ja.call(this, t, n.toLowerCase());
2302  this.skipSC();
2303  const i = this.parseWithFallback(
2304    () => {
2305      const s = this.tokenIndex, l = r.call(this);
2306      return this.eof === !1 && this.isBalanceEdge(s) === !1 && this.error(), l;
2307    },
2308    () => this.Raw(null, !1)
2309  );
2310  return this.eof || this.eat(b), {
2311    type: "FeatureFunction",
2312    loc: this.getLocation(e, this.tokenStart),
2313    kind: t,
2314    feature: n,
2315    value: i
2316  };
2317}
2318function Mi(t) {
2319  this.token(C, t.feature + "("), this.node(t.value), this.token(b, ")");
2320}
2321const Ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2322  __proto__: null,
2323  generate: Mi,
2324  name: Xa,
2325  parse: Ii,
2326  structure: Ya
2327}, Symbol.toStringTag, { value: "Module" })), Gn = 47, Za = 60, Xn = 61, tc = 62, ec = "FeatureRange", nc = {
2328  kind: String,
2329  left: ["Identifier", "Number", "Dimension", "Ratio", "Function"],
2330  leftComparison: String,
2331  middle: ["Identifier", "Number", "Dimension", "Ratio", "Function"],
2332  rightComparison: [String, null],
2333  right: ["Identifier", "Number", "Dimension", "Ratio", "Function", null]
2334};
2335function He() {
2336  switch (this.skipSC(), this.tokenType) {
2337    case S:
2338      return this.isDelim(Gn, this.lookupOffsetNonSC(1)) ? this.Ratio() : this.Number();
2339    case L:
2340      return this.Dimension();
2341    case m:
2342      return this.Identifier();
2343    case C:
2344      return this.parseWithFallback(
2345        () => {
2346          const t = this.Function(this.readSequence, this.scope.Value);
2347          return this.skipSC(), this.isDelim(Gn) && this.error(), t;
2348        },
2349        () => this.Ratio()
2350      );
2351    default:
2352      this.error("Number, dimension, ratio or identifier is expected");
2353  }
2354}
2355function Yn(t) {
2356  if (this.skipSC(), this.isDelim(Za) || this.isDelim(tc)) {
2357    const e = this.source[this.tokenStart];
2358    return this.next(), this.isDelim(Xn) ? (this.next(), e + "=") : e;
2359  }
2360  if (this.isDelim(Xn))
2361    return "=";
2362  this.error(`Expected ${t ? '":", ' : ""}"<", ">", "=" or ")"`);
2363}
2364function Ni(t = "unknown") {
2365  const e = this.tokenStart;
2366  this.skipSC(), this.eat(P);
2367  const n = He.call(this), r = Yn.call(this, n.type === "Identifier"), i = He.call(this);
2368  let s = null, l = null;
2369  return this.lookupNonWSType(0) !== b && (s = Yn.call(this), l = He.call(this)), this.skipSC(), this.eat(b), {
2370    type: "FeatureRange",
2371    loc: this.getLocation(e, this.tokenStart),
2372    kind: t,
2373    left: n,
2374    leftComparison: r,
2375    middle: i,
2376    rightComparison: s,
2377    right: l
2378  };
2379}
2380function Fi(t) {
2381  this.token(P, "("), this.node(t.left), this.tokenize(t.leftComparison), this.node(t.middle), t.right && (this.tokenize(t.rightComparison), this.node(t.right)), this.token(b, ")");
2382}
2383const rc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2384  __proto__: null,
2385  generate: Fi,
2386  name: ec,
2387  parse: Ni,
2388  structure: nc
2389}, Symbol.toStringTag, { value: "Module" })), ic = "Function", sc = "function", oc = {
2390  name: String,
2391  children: [[]]
2392};
2393function zi(t, e) {
2394  const n = this.tokenStart, r = this.consumeFunctionName(), i = r.toLowerCase();
2395  let s;
2396  return s = e.hasOwnProperty(i) ? e[i].call(this, e) : t.call(this, e), this.eof || this.eat(b), {
2397    type: "Function",
2398    loc: this.getLocation(n, this.tokenStart),
2399    name: r,
2400    children: s
2401  };
2402}
2403function $i(t) {
2404  this.token(C, t.name + "("), this.children(t), this.token(b, ")");
2405}
2406const lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2407  __proto__: null,
2408  generate: $i,
2409  name: ic,
2410  parse: zi,
2411  structure: oc,
2412  walkContext: sc
2413}, Symbol.toStringTag, { value: "Module" })), ac = "GeneralEnclosed", cc = {
2414  kind: String,
2415  function: [String, null],
2416  children: [[]]
2417};
2418function Bi(t) {
2419  const e = this.tokenStart;
2420  let n = null;
2421  this.tokenType === C ? n = this.consumeFunctionName() : this.eat(P);
2422  const r = this.parseWithFallback(
2423    () => {
2424      const i = this.tokenIndex, s = this.readSequence(this.scope.Value);
2425      return this.eof === !1 && this.isBalanceEdge(i) === !1 && this.error(), s;
2426    },
2427    () => this.createSingleNodeList(
2428      this.Raw(null, !1)
2429    )
2430  );
2431  return this.eof || this.eat(b), {
2432    type: "GeneralEnclosed",
2433    loc: this.getLocation(e, this.tokenStart),
2434    kind: t,
2435    function: n,
2436    children: r
2437  };
2438}
2439function Wi(t) {
2440  t.function ? this.token(C, t.function + "(") : this.token(P, "("), this.children(t), this.token(b, ")");
2441}
2442const uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2443  __proto__: null,
2444  generate: Wi,
2445  name: ac,
2446  parse: Bi,
2447  structure: cc
2448}, Symbol.toStringTag, { value: "Module" })), hc = "XXX", fc = "Hash", pc = {
2449  value: String
2450};
2451function Ui() {
2452  const t = this.tokenStart;
2453  return this.eat(D), {
2454    type: "Hash",
2455    loc: this.getLocation(t, this.tokenStart),
2456    value: this.substrToCursor(t + 1)
2457  };
2458}
2459function Vi(t) {
2460  this.token(D, "#" + t.value);
2461}
2462const dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2463  __proto__: null,
2464  generate: Vi,
2465  name: fc,
2466  parse: Ui,
2467  structure: pc,
2468  xxx: hc
2469}, Symbol.toStringTag, { value: "Module" })), mc = "Identifier", kc = {
2470  name: String
2471};
2472function Hi() {
2473  return {
2474    type: "Identifier",
2475    loc: this.getLocation(this.tokenStart, this.tokenEnd),
2476    name: this.consume(m)
2477  };
2478}
2479function Qi(t) {
2480  this.token(m, t.name);
2481}
2482const yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2483  __proto__: null,
2484  generate: Qi,
2485  name: mc,
2486  parse: Hi,
2487  structure: kc
2488}, Symbol.toStringTag, { value: "Module" })), gc = "IdSelector", bc = {
2489  name: String
2490};
2491function qi() {
2492  const t = this.tokenStart;
2493  return this.eat(D), {
2494    type: "IdSelector",
2495    loc: this.getLocation(t, this.tokenStart),
2496    name: this.substrToCursor(t + 1)
2497  };
2498}
2499function Gi(t) {
2500  this.token(O, "#" + t.name);
2501}
2502const Sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2503  __proto__: null,
2504  generate: Gi,
2505  name: gc,
2506  parse: qi,
2507  structure: bc
2508}, Symbol.toStringTag, { value: "Module" })), vc = 46, Cc = "Layer", xc = {
2509  name: String
2510};
2511function Xi() {
2512  let t = this.tokenStart, e = this.consume(m);
2513  for (; this.isDelim(vc); )
2514    this.eat(O), e += "." + this.consume(m);
2515  return {
2516    type: "Layer",
2517    loc: this.getLocation(t, this.tokenStart),
2518    name: e
2519  };
2520}
2521function Yi(t) {
2522  this.tokenize(t.name);
2523}
2524const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2525  __proto__: null,
2526  generate: Yi,
2527  name: Cc,
2528  parse: Xi,
2529  structure: xc
2530}, Symbol.toStringTag, { value: "Module" })), Lc = "LayerList", Oc = {
2531  children: [[
2532    "Layer"
2533  ]]
2534};
2535function Ji() {
2536  const t = this.createList();
2537  for (this.skipSC(); !this.eof && (t.push(this.Layer()), this.lookupTypeNonSC(0) === pt); )
2538    this.skipSC(), this.next(), this.skipSC();
2539  return {
2540    type: "LayerList",
2541    loc: this.getLocationFromList(t),
2542    children: t
2543  };
2544}
2545function Ki(t) {
2546  this.children(t, () => this.token(pt, ","));
2547}
2548const Tc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2549  __proto__: null,
2550  generate: Ki,
2551  name: Lc,
2552  parse: Ji,
2553  structure: Oc
2554}, Symbol.toStringTag, { value: "Module" })), Ac = "MediaQuery", _c = {
2555  modifier: [String, null],
2556  mediaType: [String, null],
2557  condition: ["Condition", null]
2558};
2559function Zi() {
2560  const t = this.tokenStart;
2561  let e = null, n = null, r = null;
2562  if (this.skipSC(), this.tokenType === m && this.lookupTypeNonSC(1) !== P) {
2563    const i = this.consume(m), s = i.toLowerCase();
2564    switch (s === "not" || s === "only" ? (this.skipSC(), e = s, n = this.consume(m)) : n = i, this.lookupTypeNonSC(0)) {
2565      case m: {
2566        this.skipSC(), this.eatIdent("and"), r = this.Condition("media");
2567        break;
2568      }
2569      case ft:
2570      case Z:
2571      case pt:
2572      case wt:
2573        break;
2574      default:
2575        this.error("Identifier or parenthesis is expected");
2576    }
2577  } else
2578    switch (this.tokenType) {
2579      case m:
2580      case P:
2581      case C: {
2582        r = this.Condition("media");
2583        break;
2584      }
2585      case ft:
2586      case Z:
2587      case wt:
2588        break;
2589      default:
2590        this.error("Identifier or parenthesis is expected");
2591    }
2592  return {
2593    type: "MediaQuery",
2594    loc: this.getLocation(t, this.tokenStart),
2595    modifier: e,
2596    mediaType: n,
2597    condition: r
2598  };
2599}
2600function ts(t) {
2601  t.mediaType ? (t.modifier && this.token(m, t.modifier), this.token(m, t.mediaType), t.condition && (this.token(m, "and"), this.node(t.condition))) : t.condition && this.node(t.condition);
2602}
2603const Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2604  __proto__: null,
2605  generate: ts,
2606  name: Ac,
2607  parse: Zi,
2608  structure: _c
2609}, Symbol.toStringTag, { value: "Module" })), Ec = "MediaQueryList", jc = {
2610  children: [[
2611    "MediaQuery"
2612  ]]
2613};
2614function es() {
2615  const t = this.createList();
2616  for (this.skipSC(); !this.eof && (t.push(this.MediaQuery()), this.tokenType === pt); )
2617    this.next();
2618  return {
2619    type: "MediaQueryList",
2620    loc: this.getLocationFromList(t),
2621    children: t
2622  };
2623}
2624function ns(t) {
2625  this.children(t, () => this.token(pt, ","));
2626}
2627const Dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2628  __proto__: null,
2629  generate: ns,
2630  name: Ec,
2631  parse: es,
2632  structure: jc
2633}, Symbol.toStringTag, { value: "Module" })), Rc = 38, Ic = "NestingSelector", Mc = {};
2634function rs() {
2635  const t = this.tokenStart;
2636  return this.eatDelim(Rc), {
2637    type: "NestingSelector",
2638    loc: this.getLocation(t, this.tokenStart)
2639  };
2640}
2641function is() {
2642  this.token(O, "&");
2643}
2644const Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2645  __proto__: null,
2646  generate: is,
2647  name: Ic,
2648  parse: rs,
2649  structure: Mc
2650}, Symbol.toStringTag, { value: "Module" })), Fc = "Nth", zc = {
2651  nth: ["AnPlusB", "Identifier"],
2652  selector: ["SelectorList", null]
2653};
2654function ss() {
2655  this.skipSC();
2656  const t = this.tokenStart;
2657  let e = t, n = null, r;
2658  return this.lookupValue(0, "odd") || this.lookupValue(0, "even") ? r = this.Identifier() : r = this.AnPlusB(), e = this.tokenStart, this.skipSC(), this.lookupValue(0, "of") && (this.next(), n = this.SelectorList(), e = this.tokenStart), {
2659    type: "Nth",
2660    loc: this.getLocation(t, e),
2661    nth: r,
2662    selector: n
2663  };
2664}
2665function os(t) {
2666  this.node(t.nth), t.selector !== null && (this.token(m, "of"), this.node(t.selector));
2667}
2668const $c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2669  __proto__: null,
2670  generate: os,
2671  name: Fc,
2672  parse: ss,
2673  structure: zc
2674}, Symbol.toStringTag, { value: "Module" })), Bc = "Number", Wc = {
2675  value: String
2676};
2677function ls() {
2678  return {
2679    type: "Number",
2680    loc: this.getLocation(this.tokenStart, this.tokenEnd),
2681    value: this.consume(S)
2682  };
2683}
2684function as(t) {
2685  this.token(S, t.value);
2686}
2687const Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2688  __proto__: null,
2689  generate: as,
2690  name: Bc,
2691  parse: ls,
2692  structure: Wc
2693}, Symbol.toStringTag, { value: "Module" })), Vc = "Operator", Hc = {
2694  value: String
2695};
2696function cs() {
2697  const t = this.tokenStart;
2698  return this.next(), {
2699    type: "Operator",
2700    loc: this.getLocation(t, this.tokenStart),
2701    value: this.substrToCursor(t)
2702  };
2703}
2704function us(t) {
2705  this.tokenize(t.value);
2706}
2707const Qc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2708  __proto__: null,
2709  generate: us,
2710  name: Vc,
2711  parse: cs,
2712  structure: Hc
2713}, Symbol.toStringTag, { value: "Module" })), qc = "Parentheses", Gc = {
2714  children: [[]]
2715};
2716function hs(t, e) {
2717  const n = this.tokenStart;
2718  let r = null;
2719  return this.eat(P), r = t.call(this, e), this.eof || this.eat(b), {
2720    type: "Parentheses",
2721    loc: this.getLocation(n, this.tokenStart),
2722    children: r
2723  };
2724}
2725function fs(t) {
2726  this.token(P, "("), this.children(t), this.token(b, ")");
2727}
2728const Xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2729  __proto__: null,
2730  generate: fs,
2731  name: qc,
2732  parse: hs,
2733  structure: Gc
2734}, Symbol.toStringTag, { value: "Module" })), Yc = "Percentage", Jc = {
2735  value: String
2736};
2737function ps() {
2738  return {
2739    type: "Percentage",
2740    loc: this.getLocation(this.tokenStart, this.tokenEnd),
2741    value: this.consumeNumber(F)
2742  };
2743}
2744function ds(t) {
2745  this.token(F, t.value + "%");
2746}
2747const Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2748  __proto__: null,
2749  generate: ds,
2750  name: Yc,
2751  parse: ps,
2752  structure: Jc
2753}, Symbol.toStringTag, { value: "Module" })), Zc = "PseudoClassSelector", tu = "function", eu = {
2754  name: String,
2755  children: [["Raw"], null]
2756};
2757function ms() {
2758  const t = this.tokenStart;
2759  let e = null, n, r;
2760  return this.eat(J), this.tokenType === C ? (n = this.consumeFunctionName(), r = n.toLowerCase(), this.lookupNonWSType(0) == b ? e = this.createList() : hasOwnProperty.call(this.pseudo, r) ? (this.skipSC(), e = this.pseudo[r].call(this), this.skipSC()) : (e = this.createList(), e.push(
2761    this.Raw(null, !1)
2762  )), this.eat(b)) : n = this.consume(m), {
2763    type: "PseudoClassSelector",
2764    loc: this.getLocation(t, this.tokenStart),
2765    name: n,
2766    children: e
2767  };
2768}
2769function ks(t) {
2770  this.token(J, ":"), t.children === null ? this.token(m, t.name) : (this.token(C, t.name + "("), this.children(t), this.token(b, ")"));
2771}
2772const nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2773  __proto__: null,
2774  generate: ks,
2775  name: Zc,
2776  parse: ms,
2777  structure: eu,
2778  walkContext: tu
2779}, Symbol.toStringTag, { value: "Module" })), ru = "PseudoElementSelector", iu = "function", su = {
2780  name: String,
2781  children: [["Raw"], null]
2782};
2783function ys() {
2784  const t = this.tokenStart;
2785  let e = null, n, r;
2786  return this.eat(J), this.eat(J), this.tokenType === C ? (n = this.consumeFunctionName(), r = n.toLowerCase(), this.lookupNonWSType(0) == b ? e = this.createList() : hasOwnProperty.call(this.pseudo, r) ? (this.skipSC(), e = this.pseudo[r].call(this), this.skipSC()) : (e = this.createList(), e.push(
2787    this.Raw(null, !1)
2788  )), this.eat(b)) : n = this.consume(m), {
2789    type: "PseudoElementSelector",
2790    loc: this.getLocation(t, this.tokenStart),
2791    name: n,
2792    children: e
2793  };
2794}
2795function gs(t) {
2796  this.token(J, ":"), this.token(J, ":"), t.children === null ? this.token(m, t.name) : (this.token(C, t.name + "("), this.children(t), this.token(b, ")"));
2797}
2798const ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2799  __proto__: null,
2800  generate: gs,
2801  name: ru,
2802  parse: ys,
2803  structure: su,
2804  walkContext: iu
2805}, Symbol.toStringTag, { value: "Module" })), Jn = 47;
2806function Kn() {
2807  switch (this.skipSC(), this.tokenType) {
2808    case S:
2809      return this.Number();
2810    case C:
2811      return this.Function(this.readSequence, this.scope.Value);
2812    default:
2813      this.error("Number of function is expected");
2814  }
2815}
2816const lu = "Ratio", au = {
2817  left: ["Number", "Function"],
2818  right: ["Number", "Function", null]
2819};
2820function bs() {
2821  const t = this.tokenStart, e = Kn.call(this);
2822  let n = null;
2823  return this.skipSC(), this.isDelim(Jn) && (this.eatDelim(Jn), n = Kn.call(this)), {
2824    type: "Ratio",
2825    loc: this.getLocation(t, this.tokenStart),
2826    left: e,
2827    right: n
2828  };
2829}
2830function Ss(t) {
2831  this.node(t.left), this.token(O, "/"), t.right ? this.node(t.right) : this.node(S, 1);
2832}
2833const cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2834  __proto__: null,
2835  generate: Ss,
2836  name: lu,
2837  parse: bs,
2838  structure: au
2839}, Symbol.toStringTag, { value: "Module" }));
2840function uu() {
2841  return this.tokenIndex > 0 && this.lookupType(-1) === B ? this.tokenIndex > 1 ? this.getTokenStart(this.tokenIndex - 1) : this.firstCharOffset : this.tokenStart;
2842}
2843const hu = "Raw", fu = {
2844  value: String
2845};
2846function vs(t, e) {
2847  const n = this.getTokenStart(this.tokenIndex);
2848  let r;
2849  return this.skipUntilBalanced(this.tokenIndex, t || this.consumeUntilBalanceEnd), e && this.tokenStart > n ? r = uu.call(this) : r = this.tokenStart, {
2850    type: "Raw",
2851    loc: this.getLocation(n, r),
2852    value: this.substring(n, r)
2853  };
2854}
2855function Cs(t) {
2856  this.tokenize(t.value);
2857}
2858const pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2859  __proto__: null,
2860  generate: Cs,
2861  name: hu,
2862  parse: vs,
2863  structure: fu
2864}, Symbol.toStringTag, { value: "Module" }));
2865function Zn() {
2866  return this.Raw(this.consumeUntilLeftCurlyBracket, !0);
2867}
2868function du() {
2869  const t = this.SelectorList();
2870  return t.type !== "Raw" && this.eof === !1 && this.tokenType !== ft && this.error(), t;
2871}
2872const mu = "Rule", ku = "rule", yu = {
2873  prelude: ["SelectorList", "Raw"],
2874  block: ["Block"]
2875};
2876function xs() {
2877  const t = this.tokenIndex, e = this.tokenStart;
2878  let n, r;
2879  return this.parseRulePrelude ? n = this.parseWithFallback(du, Zn) : n = Zn.call(this, t), r = this.Block(!0), {
2880    type: "Rule",
2881    loc: this.getLocation(e, this.tokenStart),
2882    prelude: n,
2883    block: r
2884  };
2885}
2886function ws(t) {
2887  this.node(t.prelude), this.node(t.block);
2888}
2889const gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2890  __proto__: null,
2891  generate: ws,
2892  name: mu,
2893  parse: xs,
2894  structure: yu,
2895  walkContext: ku
2896}, Symbol.toStringTag, { value: "Module" })), bu = "Scope", Su = {
2897  root: ["SelectorList", "Raw", null],
2898  limit: ["SelectorList", "Raw", null]
2899};
2900function Ls() {
2901  let t = null, e = null;
2902  this.skipSC();
2903  const n = this.tokenStart;
2904  return this.tokenType === P && (this.next(), this.skipSC(), t = this.parseWithFallback(
2905    this.SelectorList,
2906    () => this.Raw(!1, !0)
2907  ), this.skipSC(), this.eat(b)), this.lookupNonWSType(0) === m && (this.skipSC(), this.eatIdent("to"), this.skipSC(), this.eat(P), this.skipSC(), e = this.parseWithFallback(
2908    this.SelectorList,
2909    () => this.Raw(!1, !0)
2910  ), this.skipSC(), this.eat(b)), {
2911    type: "Scope",
2912    loc: this.getLocation(n, this.tokenStart),
2913    root: t,
2914    limit: e
2915  };
2916}
2917function Os(t) {
2918  t.root && (this.token(P, "("), this.node(t.root), this.token(b, ")")), t.limit && (this.token(m, "to"), this.token(P, "("), this.node(t.limit), this.token(b, ")"));
2919}
2920const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2921  __proto__: null,
2922  generate: Os,
2923  name: bu,
2924  parse: Ls,
2925  structure: Su
2926}, Symbol.toStringTag, { value: "Module" })), Cu = "Selector", xu = {
2927  children: [[
2928    "TypeSelector",
2929    "IdSelector",
2930    "ClassSelector",
2931    "AttributeSelector",
2932    "PseudoClassSelector",
2933    "PseudoElementSelector",
2934    "Combinator"
2935  ]]
2936};
2937function Ts() {
2938  const t = this.readSequence(this.scope.Selector);
2939  return this.getFirstListNode(t) === null && this.error("Selector is expected"), {
2940    type: "Selector",
2941    loc: this.getLocationFromList(t),
2942    children: t
2943  };
2944}
2945function As(t) {
2946  this.children(t);
2947}
2948const wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2949  __proto__: null,
2950  generate: As,
2951  name: Cu,
2952  parse: Ts,
2953  structure: xu
2954}, Symbol.toStringTag, { value: "Module" })), Lu = "SelectorList", Ou = "selector", Tu = {
2955  children: [[
2956    "Selector",
2957    "Raw"
2958  ]]
2959};
2960function _s() {
2961  const t = this.createList();
2962  for (; !this.eof; ) {
2963    if (t.push(this.Selector()), this.tokenType === pt) {
2964      this.next();
2965      continue;
2966    }
2967    break;
2968  }
2969  return {
2970    type: "SelectorList",
2971    loc: this.getLocationFromList(t),
2972    children: t
2973  };
2974}
2975function Ps(t) {
2976  this.children(t, () => this.token(pt, ","));
2977}
2978const Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2979  __proto__: null,
2980  generate: Ps,
2981  name: Lu,
2982  parse: _s,
2983  structure: Tu,
2984  walkContext: Ou
2985}, Symbol.toStringTag, { value: "Module" })), _u = "String", Pu = {
2986  value: String
2987};
2988function Es() {
2989  return {
2990    type: "String",
2991    loc: this.getLocation(this.tokenStart, this.tokenEnd),
2992    value: Kr(this.consume(Ct))
2993  };
2994}
2995function js(t) {
2996  this.token(Ct, fl(t.value));
2997}
2998const Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2999  __proto__: null,
3000  generate: js,
3001  name: _u,
3002  parse: Es,
3003  structure: Pu
3004}, Symbol.toStringTag, { value: "Module" })), ju = 33;
3005function tr() {
3006  return this.Raw(null, !1);
3007}
3008const Du = "StyleSheet", Ru = "stylesheet", Iu = {
3009  children: [[
3010    "Comment",
3011    "CDO",
3012    "CDC",
3013    "Atrule",
3014    "Rule",
3015    "Raw"
3016  ]]
3017};
3018function Ds() {
3019  const t = this.tokenStart, e = this.createList();
3020  let n;
3021  for (; !this.eof; ) {
3022    switch (this.tokenType) {
3023      case B:
3024        this.next();
3025        continue;
3026      case Y:
3027        if (this.charCodeAt(this.tokenStart + 2) !== ju) {
3028          this.next();
3029          continue;
3030        }
3031        n = this.Comment();
3032        break;
3033      case Ie:
3034        n = this.CDO();
3035        break;
3036      case tt:
3037        n = this.CDC();
3038        break;
3039      // CSS Syntax Module Level 3
3040      // §2.2 Error handling
3041      // At the "top level" of a stylesheet, an <at-keyword-token> starts an at-rule.
3042      case U:
3043        n = this.parseWithFallback(this.Atrule, tr);
3044        break;
3045      // Anything else starts a qualified rule ...
3046      default:
3047        n = this.parseWithFallback(this.Rule, tr);
3048    }
3049    e.push(n);
3050  }
3051  return {
3052    type: "StyleSheet",
3053    loc: this.getLocation(t, this.tokenStart),
3054    children: e
3055  };
3056}
3057function Rs(t) {
3058  this.children(t);
3059}
3060const Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3061  __proto__: null,
3062  generate: Rs,
3063  name: Du,
3064  parse: Ds,
3065  structure: Iu,
3066  walkContext: Ru
3067}, Symbol.toStringTag, { value: "Module" })), Nu = "SupportsDeclaration", Fu = {
3068  declaration: "Declaration"
3069};
3070function Is() {
3071  const t = this.tokenStart;
3072  this.eat(P), this.skipSC();
3073  const e = this.Declaration();
3074  return this.eof || this.eat(b), {
3075    type: "SupportsDeclaration",
3076    loc: this.getLocation(t, this.tokenStart),
3077    declaration: e
3078  };
3079}
3080function Ms(t) {
3081  this.token(P, "("), this.node(t.declaration), this.token(b, ")");
3082}
3083const zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3084  __proto__: null,
3085  generate: Ms,
3086  name: Nu,
3087  parse: Is,
3088  structure: Fu
3089}, Symbol.toStringTag, { value: "Module" })), $u = 42, er = 124;
3090function Qe() {
3091  this.tokenType !== m && this.isDelim($u) === !1 && this.error("Identifier or asterisk is expected"), this.next();
3092}
3093const Bu = "TypeSelector", Wu = {
3094  name: String
3095};
3096function Ns() {
3097  const t = this.tokenStart;
3098  return this.isDelim(er) ? (this.next(), Qe.call(this)) : (Qe.call(this), this.isDelim(er) && (this.next(), Qe.call(this))), {
3099    type: "TypeSelector",
3100    loc: this.getLocation(t, this.tokenStart),
3101    name: this.substrToCursor(t)
3102  };
3103}
3104function Fs(t) {
3105  this.tokenize(t.name);
3106}
3107const Uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3108  __proto__: null,
3109  generate: Fs,
3110  name: Bu,
3111  parse: Ns,
3112  structure: Wu
3113}, Symbol.toStringTag, { value: "Module" })), zs = 43, $s = 45, hn = 63;
3114function ee(t, e) {
3115  let n = 0;
3116  for (let r = this.tokenStart + t; r < this.tokenEnd; r++) {
3117    const i = this.charCodeAt(r);
3118    if (i === $s && e && n !== 0)
3119      return ee.call(this, t + n + 1, !1), -1;
3120    Xt(i) || this.error(
3121      e && n !== 0 ? "Hyphen minus" + (n < 6 ? " or hex digit" : "") + " is expected" : n < 6 ? "Hex digit is expected" : "Unexpected input",
3122      r
3123    ), ++n > 6 && this.error("Too many hex digits", r);
3124  }
3125  return this.next(), n;
3126}
3127function me(t) {
3128  let e = 0;
3129  for (; this.isDelim(hn); )
3130    ++e > t && this.error("Too many question marks"), this.next();
3131}
3132function Vu(t) {
3133  this.charCodeAt(this.tokenStart) !== t && this.error((t === zs ? "Plus sign" : "Hyphen minus") + " is expected");
3134}
3135function Hu() {
3136  let t = 0;
3137  switch (this.tokenType) {
3138    case S:
3139      if (t = ee.call(this, 1, !0), this.isDelim(hn)) {
3140        me.call(this, 6 - t);
3141        break;
3142      }
3143      if (this.tokenType === L || this.tokenType === S) {
3144        Vu.call(this, $s), ee.call(this, 1, !1);
3145        break;
3146      }
3147      break;
3148    case L:
3149      t = ee.call(this, 1, !0), t > 0 && me.call(this, 6 - t);
3150      break;
3151    default:
3152      if (this.eatDelim(zs), this.tokenType === m) {
3153        t = ee.call(this, 0, !0), t > 0 && me.call(this, 6 - t);
3154        break;
3155      }
3156      if (this.isDelim(hn)) {
3157        this.next(), me.call(this, 5);
3158        break;
3159      }
3160      this.error("Hex digit or question mark is expected");
3161  }
3162}
3163const Qu = "UnicodeRange", qu = {
3164  value: String
3165};
3166function Bs() {
3167  const t = this.tokenStart;
3168  return this.eatIdent("u"), Hu.call(this), {
3169    type: "UnicodeRange",
3170    loc: this.getLocation(t, this.tokenStart),
3171    value: this.substrToCursor(t)
3172  };
3173}
3174function Ws(t) {
3175  this.tokenize(t.value);
3176}
3177const Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3178  __proto__: null,
3179  generate: Ws,
3180  name: Qu,
3181  parse: Bs,
3182  structure: qu
3183}, Symbol.toStringTag, { value: "Module" })), Xu = "Url", Yu = {
3184  value: String
3185};
3186function Us() {
3187  const t = this.tokenStart;
3188  let e;
3189  switch (this.tokenType) {
3190    case X:
3191      e = yl(this.consume(X));
3192      break;
3193    case C:
3194      this.cmpStr(this.tokenStart, this.tokenEnd, "url(") || this.error("Function name must be `url`"), this.eat(C), this.skipSC(), e = Kr(this.consume(Ct)), this.skipSC(), this.eof || this.eat(b);
3195      break;
3196    default:
3197      this.error("Url or Function is expected");
3198  }
3199  return {
3200    type: "Url",
3201    loc: this.getLocation(t, this.tokenStart),
3202    value: e
3203  };
3204}
3205function Vs(t) {
3206  this.token(X, gl(t.value));
3207}
3208const Ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3209  __proto__: null,
3210  generate: Vs,
3211  name: Xu,
3212  parse: Us,
3213  structure: Yu
3214}, Symbol.toStringTag, { value: "Module" })), Ku = "Value", Zu = {
3215  children: [[]]
3216};
3217function Hs() {
3218  const t = this.tokenStart, e = this.readSequence(this.scope.Value);
3219  return {
3220    type: "Value",
3221    loc: this.getLocation(t, this.tokenStart),
3222    children: e
3223  };
3224}
3225function Qs(t) {
3226  this.children(t);
3227}
3228const th = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3229  __proto__: null,
3230  generate: Qs,
3231  name: Ku,
3232  parse: Hs,
3233  structure: Zu
3234}, Symbol.toStringTag, { value: "Module" })), eh = Object.freeze({
3235  type: "WhiteSpace",
3236  loc: null,
3237  value: " "
3238}), nh = "WhiteSpace", rh = {
3239  value: String
3240};
3241function qs() {
3242  return this.eat(B), eh;
3243}
3244function Gs(t) {
3245  this.token(B, t.value);
3246}
3247const ih = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3248  __proto__: null,
3249  generate: Gs,
3250  name: nh,
3251  parse: qs,
3252  structure: rh
3253}, Symbol.toStringTag, { value: "Module" })), sh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3254  __proto__: null,
3255  AnPlusB: Ll,
3256  Atrule: Pl,
3257  AtrulePrelude: Rl,
3258  AttributeSelector: Wl,
3259  Block: Gl,
3260  Brackets: Jl,
3261  CDC: ta,
3262  CDO: ra,
3263  ClassSelector: la,
3264  Combinator: pa,
3265  Comment: ga,
3266  Condition: xa,
3267  Declaration: Na,
3268  DeclarationList: Ba,
3269  Dimension: Va,
3270  Feature: Ga,
3271  FeatureFunction: Ka,
3272  FeatureRange: rc,
3273  Function: lc,
3274  GeneralEnclosed: uc,
3275  Hash: dc,
3276  IdSelector: Sc,
3277  Identifier: yc,
3278  Layer: wc,
3279  LayerList: Tc,
3280  MediaQuery: Pc,
3281  MediaQueryList: Dc,
3282  NestingSelector: Nc,
3283  Nth: $c,
3284  Number: Uc,
3285  Operator: Qc,
3286  Parentheses: Xc,
3287  Percentage: Kc,
3288  PseudoClassSelector: nu,
3289  PseudoElementSelector: ou,
3290  Ratio: cu,
3291  Raw: pu,
3292  Rule: gu,
3293  Scope: vu,
3294  Selector: wu,
3295  SelectorList: Au,
3296  String: Eu,
3297  StyleSheet: Mu,
3298  SupportsDeclaration: zu,
3299  TypeSelector: Uu,
3300  UnicodeRange: Gu,
3301  Url: Ju,
3302  Value: th,
3303  WhiteSpace: ih
3304}, Symbol.toStringTag, { value: "Module" })), oh = {
3305  node: sh
3306}, Lt = vl(oh), xn = [
3307  "left",
3308  "right",
3309  "top",
3310  "bottom",
3311  "inset-block-start",
3312  "inset-block-end",
3313  "inset-inline-start",
3314  "inset-inline-end",
3315  "inset-block",
3316  "inset-inline",
3317  "inset"
3318];
3319function ce(t) {
3320  return xn.includes(t);
3321}
3322const wn = [
3323  "margin-block-start",
3324  "margin-block-end",
3325  "margin-block",
3326  "margin-inline-start",
3327  "margin-inline-end",
3328  "margin-inline",
3329  "margin-bottom",
3330  "margin-left",
3331  "margin-right",
3332  "margin-top",
3333  "margin"
3334];
3335function lh(t) {
3336  return wn.includes(t);
3337}
3338const Ln = [
3339  "width",
3340  "height",
3341  "min-width",
3342  "min-height",
3343  "max-width",
3344  "max-height",
3345  "block-size",
3346  "inline-size",
3347  "min-block-size",
3348  "min-inline-size",
3349  "max-block-size",
3350  "max-inline-size"
3351];
3352function Xs(t) {
3353  return Ln.includes(t);
3354}
3355const Ys = [
3356  "justify-self",
3357  "align-self",
3358  "place-self"
3359];
3360function ah(t) {
3361  return Ys.includes(t);
3362}
3363const Js = [
3364  ...xn,
3365  ...wn,
3366  ...Ln,
3367  ...Ys,
3368  "position-anchor",
3369  "position-area"
3370], ch = [
3371  ...Ln,
3372  ...xn,
3373  ...wn
3374];
3375function Ks(t) {
3376  return ch.includes(
3377    t
3378  );
3379}
3380const uh = [
3381  "top",
3382  "left",
3383  "right",
3384  "bottom",
3385  "start",
3386  "end",
3387  "self-start",
3388  "self-end",
3389  "center",
3390  "inside",
3391  "outside"
3392];
3393function Zs(t) {
3394  return uh.includes(t);
3395}
3396const hh = [
3397  "width",
3398  "height",
3399  "block",
3400  "inline",
3401  "self-block",
3402  "self-inline"
3403];
3404function fh(t) {
3405  return hh.includes(t);
3406}
3407const nr = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
3408function ph(t) {
3409  const e = new SourceMapGenerator(), n = {
3410    line: 1,
3411    column: 0
3412  }, r = {
3413    line: 0,
3414    // should be zero to add first mapping
3415    column: 0
3416  }, i = {
3417    line: 1,
3418    column: 0
3419  }, s = {
3420    generated: i
3421  };
3422  let l = 1, c = 0, a = !1;
3423  const o = t.node;
3424  t.node = function(f) {
3425    if (f.loc && f.loc.start && nr.has(f.type)) {
3426      const p = f.loc.start.line, d = f.loc.start.column - 1;
3427      (r.line !== p || r.column !== d) && (r.line = p, r.column = d, n.line = l, n.column = c, a && (a = !1, (n.line !== i.line || n.column !== i.column) && e.addMapping(s)), a = !0, e.addMapping({
3428        source: f.loc.source,
3429        original: r,
3430        generated: n
3431      }));
3432    }
3433    o.call(this, f), a && nr.has(f.type) && (i.line = l, i.column = c);
3434  };
3435  const u = t.emit;
3436  t.emit = function(f, p, d) {
3437    for (let k = 0; k < f.length; k++)
3438      f.charCodeAt(k) === 10 ? (l++, c = 0) : c++;
3439    u(f, p, d);
3440  };
3441  const h = t.result;
3442  return t.result = function() {
3443    return a && e.addMapping(s), {
3444      css: h(),
3445      map: e
3446    };
3447  }, t;
3448}
3449const dh = 43, mh = 45, qe = (t, e) => {
3450  if (t === O && (t = e), typeof t == "string") {
3451    const n = t.charCodeAt(0);
3452    return n > 127 ? 32768 : n << 8;
3453  }
3454  return t;
3455}, to = [
3456  [m, m],
3457  [m, C],
3458  [m, X],
3459  [m, at],
3460  [m, "-"],
3461  [m, S],
3462  [m, F],
3463  [m, L],
3464  [m, tt],
3465  [m, P],
3466  [U, m],
3467  [U, C],
3468  [U, X],
3469  [U, at],
3470  [U, "-"],
3471  [U, S],
3472  [U, F],
3473  [U, L],
3474  [U, tt],
3475  [D, m],
3476  [D, C],
3477  [D, X],
3478  [D, at],
3479  [D, "-"],
3480  [D, S],
3481  [D, F],
3482  [D, L],
3483  [D, tt],
3484  [L, m],
3485  [L, C],
3486  [L, X],
3487  [L, at],
3488  [L, "-"],
3489  [L, S],
3490  [L, F],
3491  [L, L],
3492  [L, tt],
3493  ["#", m],
3494  ["#", C],
3495  ["#", X],
3496  ["#", at],
3497  ["#", "-"],
3498  ["#", S],
3499  ["#", F],
3500  ["#", L],
3501  ["#", tt],
3502  // https://github.com/w3c/csswg-drafts/pull/6874
3503  ["-", m],
3504  ["-", C],
3505  ["-", X],
3506  ["-", at],
3507  ["-", "-"],
3508  ["-", S],
3509  ["-", F],
3510  ["-", L],
3511  ["-", tt],
3512  // https://github.com/w3c/csswg-drafts/pull/6874
3513  [S, m],
3514  [S, C],
3515  [S, X],
3516  [S, at],
3517  [S, S],
3518  [S, F],
3519  [S, L],
3520  [S, "%"],
3521  [S, tt],
3522  // https://github.com/w3c/csswg-drafts/pull/6874
3523  ["@", m],
3524  ["@", C],
3525  ["@", X],
3526  ["@", at],
3527  ["@", "-"],
3528  ["@", tt],
3529  // https://github.com/w3c/csswg-drafts/pull/6874
3530  [".", S],
3531  [".", F],
3532  [".", L],
3533  ["+", S],
3534  ["+", F],
3535  ["+", L],
3536  ["/", "*"]
3537], kh = to.concat([
3538  [m, D],
3539  [L, D],
3540  [D, D],
3541  [U, P],
3542  [U, Ct],
3543  [U, J],
3544  [F, F],
3545  [F, L],
3546  [F, C],
3547  [F, "-"],
3548  [b, m],
3549  [b, C],
3550  [b, F],
3551  [b, L],
3552  [b, D],
3553  [b, "-"]
3554]);
3555function eo(t) {
3556  const e = new Set(
3557    t.map(([n, r]) => qe(n) << 16 | qe(r))
3558  );
3559  return function(n, r, i) {
3560    const s = qe(r, i), l = i.charCodeAt(0);
3561    return (l === mh && r !== m && r !== C && r !== tt || l === dh ? e.has(n << 16 | l << 8) : e.has(n << 16 | s)) && this.emit(" ", B, !0), s;
3562  };
3563}
3564const yh = eo(to), no = eo(kh), rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3565  __proto__: null,
3566  safe: no,
3567  spec: yh
3568}, Symbol.toStringTag, { value: "Module" })), gh = 92;
3569function bh(t, e) {
3570  if (typeof e == "function") {
3571    let n = null;
3572    t.children.forEach((r) => {
3573      n !== null && e.call(this, n), this.node(r), n = r;
3574    });
3575    return;
3576  }
3577  t.children.forEach(this.node, this);
3578}
3579function Sh(t) {
3580  Yr(t, (e, n, r) => {
3581    this.token(e, t.slice(n, r));
3582  });
3583}
3584function vh(t) {
3585  const e = /* @__PURE__ */ new Map();
3586  for (let [n, r] of Object.entries(t.node))
3587    typeof (r.generate || r) == "function" && e.set(n, r.generate || r);
3588  return function(n, r) {
3589    let i = "", s = 0, l = {
3590      node(a) {
3591        if (e.has(a.type))
3592          e.get(a.type).call(c, a);
3593        else
3594          throw new Error("Unknown node type: " + a.type);
3595      },
3596      tokenBefore: no,
3597      token(a, o) {
3598        s = this.tokenBefore(s, a, o), this.emit(o, a, !1), a === O && o.charCodeAt(0) === gh && this.emit(`
3599`, B, !0);
3600      },
3601      emit(a) {
3602        i += a;
3603      },
3604      result() {
3605        return i;
3606      }
3607    };
3608    r && (typeof r.decorator == "function" && (l = r.decorator(l)), r.sourceMap && (l = ph(l)), r.mode in rr && (l.tokenBefore = rr[r.mode]));
3609    const c = {
3610      node: (a) => l.node(a),
3611      children: bh,
3612      token: (a, o) => l.token(a, o),
3613      tokenize: Sh
3614    };
3615    return l.node(n), l.result();
3616  };
3617}
3618const Ch = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3619  __proto__: null,
3620  AnPlusB: ei,
3621  Atrule: ri,
3622  AtrulePrelude: si,
3623  AttributeSelector: ai,
3624  Block: hi,
3625  Brackets: pi,
3626  CDC: mi,
3627  CDO: yi,
3628  ClassSelector: bi,
3629  Combinator: vi,
3630  Comment: xi,
3631  Condition: Li,
3632  Declaration: Ai,
3633  DeclarationList: Pi,
3634  Dimension: ji,
3635  Feature: Ri,
3636  FeatureFunction: Mi,
3637  FeatureRange: Fi,
3638  Function: $i,
3639  GeneralEnclosed: Wi,
3640  Hash: Vi,
3641  IdSelector: Gi,
3642  Identifier: Qi,
3643  Layer: Yi,
3644  LayerList: Ki,
3645  MediaQuery: ts,
3646  MediaQueryList: ns,
3647  NestingSelector: is,
3648  Nth: os,
3649  Number: as,
3650  Operator: us,
3651  Parentheses: fs,
3652  Percentage: ds,
3653  PseudoClassSelector: ks,
3654  PseudoElementSelector: gs,
3655  Ratio: Ss,
3656  Raw: Cs,
3657  Rule: ws,
3658  Scope: Os,
3659  Selector: As,
3660  SelectorList: Ps,
3661  String: js,
3662  StyleSheet: Rs,
3663  SupportsDeclaration: Ms,
3664  TypeSelector: Fs,
3665  UnicodeRange: Ws,
3666  Url: Vs,
3667  Value: Qs,
3668  WhiteSpace: Gs
3669}, Symbol.toStringTag, { value: "Module" })), xh = {
3670  node: Ch
3671}, wh = vh(xh);
3672function Lh(t, e) {
3673  const n = Object.create(SyntaxError.prototype), r = new Error();
3674  return Object.assign(n, {
3675    name: t,
3676    message: e,
3677    get stack() {
3678      return (r.stack || "").replace(/^(.+\n){1,3}/, `${t}: ${e}
3679`);
3680    }
3681  });
3682}
3683const Ge = 100, ir = 60, sr = "    ";
3684function or({ source: t, line: e, column: n, baseLine: r, baseColumn: i }, s) {
3685  function l(d, k) {
3686    return o.slice(d, k).map(
3687      (g, y) => String(d + y + 1).padStart(f) + " |" + g
3688    ).join(`
3689`);
3690  }
3691  const c = `
3692`.repeat(Math.max(r - 1, 0)), a = " ".repeat(Math.max(i - 1, 0)), o = (c + a + t).split(/\r\n?|\n|\f/), u = Math.max(1, e - s) - 1, h = Math.min(e + s, o.length + 1), f = Math.max(4, String(h).length) + 1;
3693  let p = 0;
3694  n += (sr.length - 1) * (o[e - 1].substr(0, n - 1).match(/\t/g) || []).length, n > Ge && (p = n - ir + 3, n = ir - 2);
3695  for (let d = u; d <= h; d++)
3696    d >= 0 && d < o.length && (o[d] = o[d].replace(/\t/g, sr), o[d] = (p > 0 && o[d].length > p ? "…" : "") + o[d].substr(p, Ge - 2) + (o[d].length > p + Ge - 1 ? "…" : ""));
3697  return [
3698    l(u, e),
3699    new Array(n + f + 2).join("-") + "^",
3700    l(e, h)
vendor: 11,768 bytes, lines 3701-4114
3701  ].filter(Boolean).join(`
3702`).replace(/^(\s+\d+\s+\|\n)+/, "").replace(/\n(\s+\d+\s+\|)+$/, "");
3703}
3704function lr(t, e, n, r, i, s = 1, l = 1) {
3705  return Object.assign(Lh("SyntaxError", t), {
3706    source: e,
3707    offset: n,
3708    line: r,
3709    column: i,
3710    sourceFragment(c) {
3711      return or({ source: e, line: r, column: i, baseLine: s, baseColumn: l }, isNaN(c) ? 0 : c);
3712    },
3713    get formattedMessage() {
3714      return `Parse error: ${t}
3715` + or({ source: e, line: r, column: i, baseLine: s, baseColumn: l }, 2);
3716    }
3717  });
3718}
3719function Oh(t) {
3720  const e = this.createList();
3721  let n = !1;
3722  const r = {
3723    recognizer: t
3724  };
3725  for (; !this.eof; ) {
3726    switch (this.tokenType) {
3727      case Y:
3728        this.next();
3729        continue;
3730      case B:
3731        n = !0, this.next();
3732        continue;
3733    }
3734    let i = t.getNode.call(this, r);
3735    if (i === void 0)
3736      break;
3737    n && (t.onWhiteSpace && t.onWhiteSpace.call(this, i, e, r), n = !1), e.push(i);
3738  }
3739  return n && t.onWhiteSpace && t.onWhiteSpace.call(this, null, e, r), e;
3740}
3741const ar = () => {
3742}, Th = 33, Ah = 35, Xe = 59, cr = 123, ur = 0;
3743function _h(t) {
3744  return function() {
3745    return this[t]();
3746  };
3747}
3748function Ye(t) {
3749  const e = /* @__PURE__ */ Object.create(null);
3750  for (const n of Object.keys(t)) {
3751    const r = t[n], i = r.parse || r;
3752    i && (e[n] = i);
3753  }
3754  return e;
3755}
3756function Ph(t) {
3757  const e = {
3758    context: /* @__PURE__ */ Object.create(null),
3759    features: Object.assign(/* @__PURE__ */ Object.create(null), t.features),
3760    scope: Object.assign(/* @__PURE__ */ Object.create(null), t.scope),
3761    atrule: Ye(t.atrule),
3762    pseudo: Ye(t.pseudo),
3763    node: Ye(t.node)
3764  };
3765  for (const [n, r] of Object.entries(t.parseContext))
3766    switch (typeof r) {
3767      case "function":
3768        e.context[n] = r;
3769        break;
3770      case "string":
3771        e.context[n] = _h(r);
3772        break;
3773    }
3774  return W(W({
3775    config: e
3776  }, e), e.node);
3777}
3778function Eh(t) {
3779  let e = "", n = "<unknown>", r = !1, i = ar, s = !1;
3780  const l = new al(), c = Object.assign(new cl(), Ph(t || {}), {
3781    parseAtrulePrelude: !0,
3782    parseRulePrelude: !0,
3783    parseValue: !0,
3784    parseCustomProperty: !1,
3785    readSequence: Oh,
3786    consumeUntilBalanceEnd: () => 0,
3787    consumeUntilLeftCurlyBracket(a) {
3788      return a === cr ? 1 : 0;
3789    },
3790    consumeUntilLeftCurlyBracketOrSemicolon(a) {
3791      return a === cr || a === Xe ? 1 : 0;
3792    },
3793    consumeUntilExclamationMarkOrSemicolon(a) {
3794      return a === Th || a === Xe ? 1 : 0;
3795    },
3796    consumeUntilSemicolonIncluded(a) {
3797      return a === Xe ? 2 : 0;
3798    },
3799    createList() {
3800      return new Q();
3801    },
3802    createSingleNodeList(a) {
3803      return new Q().appendData(a);
3804    },
3805    getFirstListNode(a) {
3806      return a && a.first;
3807    },
3808    getLastListNode(a) {
3809      return a && a.last;
3810    },
3811    parseWithFallback(a, o) {
3812      const u = this.tokenIndex;
3813      try {
3814        return a.call(this);
3815      } catch (h) {
3816        if (s)
3817          throw h;
3818        this.skip(u - this.tokenIndex);
3819        const f = o.call(this);
3820        return s = !0, i(h, f), s = !1, f;
3821      }
3822    },
3823    lookupNonWSType(a) {
3824      let o;
3825      do
3826        if (o = this.lookupType(a++), o !== B && o !== Y)
3827          return o;
3828      while (o !== ur);
3829      return ur;
3830    },
3831    charCodeAt(a) {
3832      return a >= 0 && a < e.length ? e.charCodeAt(a) : 0;
3833    },
3834    substring(a, o) {
3835      return e.substring(a, o);
3836    },
3837    substrToCursor(a) {
3838      return this.source.substring(a, this.tokenStart);
3839    },
3840    cmpChar(a, o) {
3841      return Qr(e, a, o);
3842    },
3843    cmpStr(a, o, u) {
3844      return Ae(e, a, o, u);
3845    },
3846    consume(a) {
3847      const o = this.tokenStart;
3848      return this.eat(a), this.substrToCursor(o);
3849    },
3850    consumeFunctionName() {
3851      const a = e.substring(this.tokenStart, this.tokenEnd - 1);
3852      return this.eat(C), a;
3853    },
3854    consumeNumber(a) {
3855      const o = e.substring(this.tokenStart, qr(e, this.tokenStart));
3856      return this.eat(a), o;
3857    },
3858    eat(a) {
3859      if (this.tokenType !== a) {
3860        const o = Xr[a].slice(0, -6).replace(/-/g, " ").replace(/^./, (f) => f.toUpperCase());
3861        let u = `${/[[\](){}]/.test(o) ? `"${o}"` : o} is expected`, h = this.tokenStart;
3862        switch (a) {
3863          case m:
3864            this.tokenType === C || this.tokenType === X ? (h = this.tokenEnd - 1, u = "Identifier is expected but function found") : u = "Identifier is expected";
3865            break;
3866          case D:
3867            this.isDelim(Ah) && (this.next(), h++, u = "Name is expected");
3868            break;
3869          case F:
3870            this.tokenType === S && (h = this.tokenEnd, u = "Percent sign is expected");
3871            break;
3872        }
3873        this.error(u, h);
3874      }
3875      this.next();
3876    },
3877    eatIdent(a) {
3878      (this.tokenType !== m || this.lookupValue(0, a) === !1) && this.error(`Identifier "${a}" is expected`), this.next();
3879    },
3880    eatDelim(a) {
3881      this.isDelim(a) || this.error(`Delim "${String.fromCharCode(a)}" is expected`), this.next();
3882    },
3883    getLocation(a, o) {
3884      return r ? l.getLocationRange(
3885        a,
3886        o,
3887        n
3888      ) : null;
3889    },
3890    getLocationFromList(a) {
3891      if (r) {
3892        const o = this.getFirstListNode(a), u = this.getLastListNode(a);
3893        return l.getLocationRange(
3894          o !== null ? o.loc.start.offset - l.startOffset : this.tokenStart,
3895          u !== null ? u.loc.end.offset - l.startOffset : this.tokenStart,
3896          n
3897        );
3898      }
3899      return null;
3900    },
3901    error(a, o) {
3902      const u = typeof o < "u" && o < e.length ? l.getLocation(o) : this.eof ? l.getLocation(sl(e, e.length - 1)) : l.getLocation(this.tokenStart);
3903      throw new lr(
3904        a || "Unexpected input",
3905        e,
3906        u.offset,
3907        u.line,
3908        u.column,
3909        l.startLine,
3910        l.startColumn
3911      );
3912    }
3913  });
3914  return Object.assign(function(a, o) {
3915    e = a, o = o || {}, c.setSource(e, Yr), l.setSource(
3916      e,
3917      o.offset,
3918      o.line,
3919      o.column
3920    ), n = o.filename || "<unknown>", r = !!o.positions, i = typeof o.onParseError == "function" ? o.onParseError : ar, s = !1, c.parseAtrulePrelude = "parseAtrulePrelude" in o ? !!o.parseAtrulePrelude : !0, c.parseRulePrelude = "parseRulePrelude" in o ? !!o.parseRulePrelude : !0, c.parseValue = "parseValue" in o ? !!o.parseValue : !0, c.parseCustomProperty = "parseCustomProperty" in o ? !!o.parseCustomProperty : !1;
3921    const { context: u = "default", onComment: h } = o;
3922    if (!(u in c.context))
3923      throw new Error("Unknown context `" + u + "`");
3924    typeof h == "function" && c.forEachToken((p, d, k) => {
3925      if (p === Y) {
3926        const g = c.getLocation(d, k), y = Ae(e, k - 2, k, "*/") ? e.slice(d + 2, k - 2) : e.slice(d + 2, k);
3927        h(y, g);
3928      }
3929    });
3930    const f = c.context[u].call(c, o);
3931    return c.eof || c.error(), f;
3932  }, {
3933    SyntaxError: lr,
3934    config: c.config
3935  });
3936}
3937const jh = 35, Dh = 42, hr = 43, Rh = 45, Ih = 47, Mh = 117;
3938function ro(t) {
3939  switch (this.tokenType) {
3940    case D:
3941      return this.Hash();
3942    case pt:
3943      return this.Operator();
3944    case P:
3945      return this.Parentheses(this.readSequence, t.recognizer);
3946    case Zt:
3947      return this.Brackets(this.readSequence, t.recognizer);
3948    case Ct:
3949      return this.String();
3950    case L:
3951      return this.Dimension();
3952    case F:
3953      return this.Percentage();
3954    case S:
3955      return this.Number();
3956    case C:
3957      return this.cmpStr(this.tokenStart, this.tokenEnd, "url(") ? this.Url() : this.Function(this.readSequence, t.recognizer);
3958    case X:
3959      return this.Url();
3960    case m:
3961      return this.cmpChar(this.tokenStart, Mh) && this.cmpChar(this.tokenStart + 1, hr) ? this.UnicodeRange() : this.Identifier();
3962    case O: {
3963      const e = this.charCodeAt(this.tokenStart);
3964      if (e === Ih || e === Dh || e === hr || e === Rh)
3965        return this.Operator();
3966      e === jh && this.error("Hex or identifier is expected", this.tokenStart + 1);
3967      break;
3968    }
3969  }
3970}
3971const Nh = {
3972  getNode: ro
3973}, Fh = 35, zh = 38, $h = 42, Bh = 43, Wh = 47, fr = 46, Uh = 62, Vh = 124, Hh = 126;
3974function Qh(t, e) {
3975  e.last !== null && e.last.type !== "Combinator" && t !== null && t.type !== "Combinator" && e.push({
3976    // FIXME: this.Combinator() should be used instead
3977    type: "Combinator",
3978    loc: null,
3979    name: " "
3980  });
3981}
3982function qh() {
3983  switch (this.tokenType) {
3984    case Zt:
3985      return this.AttributeSelector();
3986    case D:
3987      return this.IdSelector();
3988    case J:
3989      return this.lookupType(1) === J ? this.PseudoElementSelector() : this.PseudoClassSelector();
3990    case m:
3991      return this.TypeSelector();
3992    case S:
3993    case F:
3994      return this.Percentage();
3995    case L:
3996      this.charCodeAt(this.tokenStart) === fr && this.error("Identifier is expected", this.tokenStart + 1);
3997      break;
3998    case O: {
3999      switch (this.charCodeAt(this.tokenStart)) {
4000        case Bh:
4001        case Uh:
4002        case Hh:
4003        case Wh:
4004          return this.Combinator();
4005        case fr:
4006          return this.ClassSelector();
4007        case $h:
4008        case Vh:
4009          return this.TypeSelector();
4010        case Fh:
4011          return this.IdSelector();
4012        case zh:
4013          return this.NestingSelector();
4014      }
4015      break;
4016    }
4017  }
4018}
4019const Gh = {
4020  onWhiteSpace: Qh,
4021  getNode: qh
4022};
4023function Xh() {
4024  return this.createSingleNodeList(
4025    this.Raw(null, !1)
4026  );
4027}
4028function Yh() {
4029  const t = this.createList();
4030  if (this.skipSC(), t.push(this.Identifier()), this.skipSC(), this.tokenType === pt) {
4031    t.push(this.Operator());
4032    const e = this.tokenIndex, n = this.parseCustomProperty ? this.Value(null) : this.Raw(this.consumeUntilExclamationMarkOrSemicolon, !1);
4033    if (n.type === "Value" && n.children.isEmpty) {
4034      for (let r = e - this.tokenIndex; r <= 0; r++)
4035        if (this.lookupType(r) === B) {
4036          n.children.appendData({
4037            type: "WhiteSpace",
4038            loc: null,
4039            value: " "
4040          });
4041          break;
4042        }
4043    }
4044    t.push(n);
4045  }
4046  return t;
4047}
4048function pr(t) {
4049  return t !== null && t.type === "Operator" && (t.value[t.value.length - 1] === "-" || t.value[t.value.length - 1] === "+");
4050}
4051const Jh = {
4052  getNode: ro,
4053  onWhiteSpace(t, e) {
4054    pr(t) && (t.value = " " + t.value), pr(e.last) && (e.last.value += " ");
4055  },
4056  expression: Xh,
4057  var: Yh
4058}, Kh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4059  __proto__: null,
4060  AtrulePrelude: Nh,
4061  Selector: Gh,
4062  Value: Jh
4063}, Symbol.toStringTag, { value: "Module" })), Zh = /* @__PURE__ */ new Set(["none", "and", "not", "or"]), tf = {
4064  parse: {
4065    prelude() {
4066      const t = this.createList();
4067      if (this.tokenType === m) {
4068        const e = this.substring(this.tokenStart, this.tokenEnd);
4069        Zh.has(e.toLowerCase()) || t.push(this.Identifier());
4070      }
4071      return t.push(this.Condition("container")), t;
4072    },
4073    block(t = !1) {
4074      return this.Block(t);
4075    }
4076  }
4077}, ef = {
4078  parse: {
4079    prelude: null,
4080    block() {
4081      return this.Block(!0);
4082    }
4083  }
4084};
4085function Je(t, e) {
4086  return this.parseWithFallback(
4087    () => {
4088      try {
4089        return t.call(this);
4090      } finally {
4091        this.skipSC(), this.lookupNonWSType(0) !== b && this.error();
4092      }
4093    },
4094    e || (() => this.Raw(null, !0))
4095  );
4096}
4097const dr = {
4098  layer() {
4099    this.skipSC();
4100    const t = this.createList(), e = Je.call(this, this.Layer);
4101    return (e.type !== "Raw" || e.value !== "") && t.push(e), t;
4102  },
4103  supports() {
4104    this.skipSC();
4105    const t = this.createList(), e = Je.call(
4106      this,
4107      this.Declaration,
4108      () => Je.call(this, () => this.Condition("supports"))
4109    );
4110    return (e.type !== "Raw" || e.value !== "") && t.push(e), t;
4111  }
4112}, nf = {
4113  parse: {
4114    prelude() {
4115      const t = this.createList();
4116      switch (this.tokenType) {
4117        case Ct:
4118          t.push(this.String());
4119          break;
4120        case X:
4121        case C:
4122          t.push(this.Url());
4123          break;
4124        default:
4125          this.error("String or url() is expected");
4126      }
4127      return this.skipSC(), this.tokenType === m && this.cmpStr(this.tokenStart, this.tokenEnd, "layer") ? t.push(this.Identifier()) : this.tokenType === C && this.cmpStr(this.tokenStart, this.tokenEnd, "layer(") && t.push(this.Function(null, dr)), this.skipSC(), this.tokenType === C && this.cmpStr(this.tokenStart, this.tokenEnd, "supports(") && t.push(this.Function(null, dr)), (this.lookupNonWSType(0) === m || this.lookupNonWSType(0) === P) && t.push(this.MediaQueryList()), t;
4128    },
4129    block: null
4130  }
4131}, rf = {
4132  parse: {
4133    prelude() {
4134      return this.createSingleNodeList(
4135        this.LayerList()
4136      );
4137    },
4138    block() {
4139      return this.Block(!1);
4140    }
4141  }
4142}, sf = {
4143  parse: {
4144    prelude() {
4145      return this.createSingleNodeList(
4146        this.MediaQueryList()
4147      );
4148    },
4149    block(t = !1) {
4150      return this.Block(t);
4151    }
4152  }
4153}, of = {
4154  parse: {
4155    prelude() {
4156      return this.createSingleNodeList(
4157        this.SelectorList()
4158      );
4159    },
4160    block() {
4161      return this.Block(!0);
4162    }
4163  }
4164}, lf = {
4165  parse: {
4166    prelude() {
4167      return this.createSingleNodeList(
4168        this.SelectorList()
4169      );
4170    },
4171    block() {
4172      return this.Block(!0);
4173    }
4174  }
4175}, af = {
4176  parse: {
4177    prelude() {
4178      return this.createSingleNodeList(
4179        this.Scope()
4180      );
4181    },
4182    block(t = !1) {
4183      return this.Block(t);
4184    }
4185  }
4186}, cf = {
4187  parse: {
4188    prelude: null,
4189    block(t = !1) {
4190      return this.Block(t);
4191    }
4192  }
4193}, uf = {
4194  parse: {
4195    prelude() {
4196      return this.createSingleNodeList(
4197        this.Condition("supports")
4198      );
4199    },
4200    block(t = !1) {
4201      return this.Block(t);
4202    }
4203  }
4204}, hf = {
4205  container: tf,
4206  "font-face": ef,
4207  import: nf,
4208  layer: rf,
4209  media: sf,
4210  nest: of,
4211  page: lf,
4212  scope: af,
4213  "starting-style": cf,
4214  supports: uf
4215};
4216function ff() {
4217  const t = this.createList();
4218  this.skipSC();
4219  t: for (; !this.eof; ) {
4220    switch (this.tokenType) {
4221      case m:
4222        t.push(this.Identifier());
4223        break;
4224      case Ct:
4225        t.push(this.String());
4226        break;
4227      case pt:
4228        t.push(this.Operator());
4229        break;
4230      case b:
4231        break t;
4232      default:
4233        this.error("Identifier, string or comma is expected");
4234    }
4235    this.skipSC();
4236  }
4237  return t;
4238}
4239const _t = {
4240  parse() {
4241    return this.createSingleNodeList(
4242      this.SelectorList()
4243    );
4244  }
4245}, Ke = {
4246  parse() {
4247    return this.createSingleNodeList(
4248      this.Selector()
4249    );
4250  }
4251}, pf = {
4252  parse() {
4253    return this.createSingleNodeList(
4254      this.Identifier()
4255    );
4256  }
4257}, df = {
4258  parse: ff
4259}, ke = {
4260  parse() {
4261    return this.createSingleNodeList(
4262      this.Nth()
4263    );
4264  }
4265}, mf = {
4266  dir: pf,
4267  has: _t,
4268  lang: df,
4269  matches: _t,
4270  is: _t,
4271  "-moz-any": _t,
4272  "-webkit-any": _t,
4273  where: _t,
4274  not: _t,
4275  "nth-child": ke,
4276  "nth-last-child": ke,
4277  "nth-last-of-type": ke,
4278  "nth-of-type": ke,
4279  slotted: Ke,
4280  host: Ke,
4281  "host-context": Ke
4282}, kf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4283  __proto__: null,
4284  AnPlusB: ti,
4285  Atrule: ni,
4286  AtrulePrelude: ii,
4287  AttributeSelector: li,
4288  Block: ui,
4289  Brackets: fi,
4290  CDC: di,
4291  CDO: ki,
4292  ClassSelector: gi,
4293  Combinator: Si,
4294  Comment: Ci,
4295  Condition: wi,
4296  Declaration: Ti,
4297  DeclarationList: _i,
4298  Dimension: Ei,
4299  Feature: Di,
4300  FeatureFunction: Ii,
4301  FeatureRange: Ni,
4302  Function: zi,
4303  GeneralEnclosed: Bi,
4304  Hash: Ui,
4305  IdSelector: qi,
4306  Identifier: Hi,
4307  Layer: Xi,
4308  LayerList: Ji,
4309  MediaQuery: Zi,
4310  MediaQueryList: es,
4311  NestingSelector: rs,
4312  Nth: ss,
4313  Number: ls,
4314  Operator: cs,
4315  Parentheses: hs,
4316  Percentage: ps,
4317  PseudoClassSelector: ms,
4318  PseudoElementSelector: ys,
4319  Ratio: bs,
4320  Raw: vs,
4321  Rule: xs,
4322  Scope: Ls,
4323  Selector: Ts,
4324  SelectorList: _s,
4325  String: Es,
4326  StyleSheet: Ds,
4327  SupportsDeclaration: Is,
4328  TypeSelector: Ns,
4329  UnicodeRange: Bs,
4330  Url: Us,
4331  Value: Hs,
4332  WhiteSpace: qs
4333}, Symbol.toStringTag, { value: "Module" })), yf = {
4334  parseContext: {
4335    default: "StyleSheet",
4336    stylesheet: "StyleSheet",
4337    atrule: "Atrule",
4338    atrulePrelude(t) {
4339      return this.AtrulePrelude(t.atrule ? String(t.atrule) : null);
4340    },
4341    mediaQueryList: "MediaQueryList",
4342    mediaQuery: "MediaQuery",
4343    condition(t) {
4344      return this.Condition(t.kind);
4345    },
4346    rule: "Rule",
4347    selectorList: "SelectorList",
4348    selector: "Selector",
4349    block() {
4350      return this.Block(!0);
4351    },
4352    declarationList: "DeclarationList",
4353    declaration: "Declaration",
4354    value: "Value"
4355  },
4356  features: {
4357    supports: {
4358      selector() {
4359        return this.Selector();
4360      }
4361    },
4362    container: {
4363      style() {
4364        return this.Declaration();
4365      }
4366    }
4367  },
4368  scope: Kh,
4369  atrule: hf,
4370  pseudo: mf,
4371  node: kf
4372}, gf = Eh(yf);
4373let bf = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ct = (t = 21) => {
4374  let e = "", n = t | 0;
4375  for (; n--; )
4376    e += bf[Math.random() * 64 | 0];
4377  return e;
4378};
4379const io = ct(), ne = /* @__PURE__ */ new Set();
4380function Pe(t) {
4381  return !!(t && t.type === "Function" && t.name === "anchor");
4382}
4383function Ot(t, e = !1) {
4384  return gf(t, {
4385    parseAtrulePrelude: !1,
4386    parseCustomProperty: !0,
4387    onParseError: (n) => {
4388      e && ne.add(n);
4389    }
4390  });
4391}
4392function K(t) {
4393  return wh(t, {
4394    // Default `safe` adds extra (potentially breaking) spaces for compatibility
4395    // with old browsers.
4396    mode: "spec"
4397  });
4398}
4399function so(t) {
4400  return t.type === "Declaration";
4401}
4402function Sf(t) {
4403  return t.toArray().reduce(
4404    (e, n) => n.type === "Operator" && n.value === "," ? (e.push([]), e) : (n.type === "Identifier" && e[e.length - 1].push(n), e),
4405    [[]]
4406  );
4407}
4408function fn(t) {
4409  return t ? t.children.map((e) => {
4410    var n;
4411    let r;
4412    ((n = e.children.last) == null ? void 0 : n.type) === "PseudoElementSelector" && (e = Le(e), r = K(e.children.last), e.children.pop());
4413    const i = K(e);
4414    return {
4415      selector: i + (r ?? ""),
4416      elementPart: i,
4417      pseudoElementPart: r
4418    };
4419  }).toArray() : [];
4420}
4421function vf() {
4422  ne.size > 0 && (console.group(
4423    `The CSS anchor positioning polyfill was not applied due to ${ne.size === 1 ? "a CSS parse error" : "CSS parse errors"}.`
4424  ), ne.forEach((t) => {
4425    console.warn(t.formattedMessage);
4426  }), console.groupEnd());
4427}
4428function Cf() {
4429  ne.clear();
4430}
4431const pn = [
4432  ...Js,
4433  "anchor-scope",
4434  "anchor-name"
4435].reduce(
4436  (t, e) => (t[e] = `--${e}-${io}`, t),
4437  {}
4438);
4439function xf(t, e) {
4440  return so(t) && pn[t.property] && e ? (e.children.appendData(G(W({}, t), {
4441    property: pn[t.property]
4442  })), { updated: !0 }) : { updated: !1 };
4443}
4444function wf(t, e) {
4445  const n = ["inset", "inset-block", "inset-inline"];
4446  if (!so(t) || !e || !n.includes(t.property))
4447    return { updated: !1 };
4448  const r = (i, s) => {
4449    s && e.children.appendData(G(W({}, t), {
4450      property: i,
4451      value: {
4452        type: "Value",
4453        children: new Q().fromArray([s])
4454      }
4455    }));
4456  };
4457  if (t.property === "inset") {
4458    const i = t.value.children.toArray(), [s, l, c, a] = (() => {
4459      switch (i.length) {
4460        case 1:
4461          return [i[0], i[0], i[0], i[0]];
4462        case 2:
4463          return [i[0], i[1], i[0], i[1]];
4464        case 3:
4465          return [i[0], i[1], i[2], i[1]];
4466        case 4:
4467          return [i[0], i[1], i[2], i[3]];
4468        default:
4469          return [];
4470      }
4471    })();
4472    r("top", s), r("right", l), r("bottom", c), r("left", a);
4473  } else if (t.property === "inset-block") {
4474    const i = t.value.children.toArray(), [s, l] = (() => {
4475      switch (i.length) {
4476        case 1:
4477          return [i[0], i[0]];
4478        case 2:
4479          return [i[0], i[1]];
4480        default:
4481          return [];
4482      }
4483    })();
4484    r("inset-block-start", s), r("inset-block-end", l);
4485  } else if (t.property === "inset-inline") {
4486    const i = t.value.children.toArray(), [s, l] = (() => {
4487      switch (i.length) {
4488        case 1:
4489          return [i[0], i[0]];
4490        case 2:
4491          return [i[0], i[1]];
4492        default:
4493          return [];
4494      }
4495    })();
4496    r("inset-inline-start", s), r("inset-inline-end", l);
4497  }
4498  return { updated: !0 };
4499}
4500function Lf(t) {
4501  for (const e of t) {
4502    let n = !1;
4503    const r = Ot(e.css, !0);
4504    Lt(r, {
4505      visit: "Declaration",
4506      enter(i) {
4507        var s;
4508        const l = (s = this.rule) == null ? void 0 : s.block, { updated: c } = wf(
4509          i,
4510          l
4511        ), { updated: a } = xf(i, l);
4512        (a || c) && (n = !0);
4513      }
4514    }), n && (e.css = K(r), e.changed = !0);
4515  }
4516  return t.some((e) => e.changed === !0);
4517}
4518var oo = /* @__PURE__ */ ((t) => (t.All = "all", t.None = "none", t))(oo || {});
4519function ot(t, e) {
4520  var n;
4521  return e = (n = pn[e]) != null ? n : e, (t instanceof HTMLElement ? getComputedStyle(t) : t.computedStyle).getPropertyValue(e).trim();
4522}
4523function Jt(t, e, n) {
4524  return ot(t, e) === n;
4525}
4526function Of(t, { selector: e, pseudoElementPart: n }) {
4527  const r = getComputedStyle(t, n), i = document.createElement("div"), s = document.createElement("style");
4528  i.id = `fake-pseudo-element-${ct()}`;
4529  for (const c of Array.from(r)) {
4530    const a = r.getPropertyValue(c);
4531    i.style.setProperty(c, a);
4532  }
4533  s.textContent += `#${i.id}${n} { content: ${r.content}; }`, s.textContent += `${e} { display: none !important; }`, document.head.append(s);
4534  const l = n === "::before" ? "afterbegin" : "beforeend";
4535  return t.insertAdjacentElement(l, i), { fakePseudoElement: i, sheet: s, computedStyle: r };
4536}
4537function Tf(t) {
4538  let e = t;
4539  for (; e; ) {
4540    if (Jt(e, "overflow", "scroll"))
4541      return e;
4542    e = e.parentElement;
4543  }
4544  return e;
4545}
4546function Af(t) {
4547  let e = Tf(t);
4548  return e === document.documentElement && (e = null), e ?? { scrollTop: 0, scrollLeft: 0 };
4549}
4550function _f(t, e) {
4551  const { elementPart: n, pseudoElementPart: r } = t, i = [];
4552  if (r && !(r === "::before" || r === "::after")) return i;
4553  const s = re(e.roots, n);
4554  if (!r)
4555    return i.push(...s), i;
4556  for (const l of s) {
4557    const { fakePseudoElement: c, sheet: a, computedStyle: o } = Of(
4558      l,
4559      t
4560    ), u = c.getBoundingClientRect(), { scrollY: h, scrollX: f } = globalThis, p = Af(l);
4561    i.push({
4562      fakePseudoElement: c,
4563      computedStyle: o,
4564      removeFakePseudoElement() {
4565        c.remove(), a.remove();
4566      },
4567      // For https://floating-ui.com/docs/autoupdate#ancestorscroll to work on
4568      // `VirtualElement`s.
4569      contextElement: l,
4570      // https://floating-ui.com/docs/virtual-elements
4571      getBoundingClientRect() {
4572        const { scrollY: d, scrollX: k } = globalThis, { scrollTop: g, scrollLeft: y } = p;
4573        return DOMRect.fromRect({
4574          y: u.y + (h - d) + (p.scrollTop - g),
4575          x: u.x + (f - k) + (p.scrollLeft - y),
4576          width: u.width,
4577          height: u.height
4578        });
4579      }
4580    });
4581  }
4582  return i;
4583}
4584function Pf(t, e) {
4585  const n = ot(t, "anchor-name");
4586  return e ? n.split(",").map((r) => r.trim()).includes(e) : !n;
4587}
4588function Ef(t, e) {
4589  const n = ot(t, "anchor-scope");
4590  return n === e || n === "all";
4591}
4592const On = (t) => _(null, null, function* () {
4593  var e, n, r;
4594  let i = yield (e = nt.getOffsetParent) == null ? void 0 : e.call(nt, t);
4595  return (yield (n = nt.isElement) == null ? void 0 : n.call(nt, i)) || (i = (yield (r = nt.getDocumentElement) == null ? void 0 : r.call(nt, t)) || window.document.documentElement), i;
4596}), re = (t, e) => t.flatMap(
4597  (n) => [...n.querySelectorAll(e)]
4598), mr = "InvalidMimeType";
4599function jf(t) {
4600  return !!((t.type === "text/css" || t.rel === "stylesheet") && t.href);
4601}
4602function Df(t) {
4603  const e = new URL(t.href, document.baseURI);
4604  if (jf(t) && e.origin === location.origin)
4605    return e;
4606}
4607function Rf(t) {
4608  return _(this, null, function* () {
4609    return (yield Promise.all(
4610      t.map((e) => _(null, null, function* () {
4611        var n;
4612        if (!e.url)
4613          return e;
4614        if ((n = e.el) != null && n.disabled)
4615          return null;
4616        try {
4617          const r = yield fetch(e.url.toString()), i = r.headers.get("content-type");
4618          if (!(i != null && i.startsWith("text/css"))) {
4619            const l = new Error(
4620              `Error loading ${e.url}: expected content-type "text/css", got "${i}".`
4621            );
4622            throw l.name = mr, l;
4623          }
4624          const s = yield r.text();
4625          return G(W({}, e), { css: s });
4626        } catch (r) {
4627          if (r instanceof Error && r.name === mr)
4628            return console.warn(r), null;
4629          throw r;
4630        }
4631      }))
4632    )).filter((e) => e !== null);
4633  });
4634}
4635const kr = '[style*="anchor"]', yr = '[style*="position-area"]';
4636function If(t) {
4637  const e = t ? t.filter(
4638    (r) => r instanceof HTMLElement && (r.matches(kr) || r.matches(yr))
4639  ) : Array.from(
4640    document.querySelectorAll(
4641      [
4642        kr,
4643        yr
4644      ].join(",")
4645    )
4646  ), n = [];
4647  return e.filter((r) => r instanceof HTMLElement).forEach((r) => {
4648    const i = ct(12), s = "data-has-inline-styles";
4649    r.setAttribute(s, i);
4650    const l = r.getAttribute("style"), c = `[${s}="${i}"] { ${l} }`;
4651    n.push({ el: r, css: c });
4652  }), n;
4653}
4654function Mf(t) {
4655  return _(this, null, function* () {
4656    var e, n;
4657    const r = (e = t.elements) != null ? e : re(t.roots, "link, style"), i = [];
4658    r.filter((c) => c instanceof HTMLElement).forEach((c) => {
4659      if (c.tagName.toLowerCase() === "link") {
4660        const a = Df(c);
4661        a && i.push({ el: c, url: a });
4662      }
4663      c.tagName.toLowerCase() === "style" && i.push({ el: c, css: c.innerHTML });
4664    });
4665    const s = t.excludeInlineStyles ? (n = t.elements) != null ? n : [] : void 0, l = If(s);
4666    return yield Rf([...i, ...l]);
4667  });
4668}
4669const Nf = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
4670let lo = (t = 21) => {
4671  let e = "", n = crypto.getRandomValues(new Uint8Array(t |= 0));
4672  for (; t--; )
4673    e += Nf[n[t] & 63];
4674  return e;
4675};
4676const ao = "--pa-cascade-property", co = "data-anchor-position-wrapper", uo = "data-pa-wrapper-for-", gr = "POLYFILL-POSITION-AREA", Ff = [
4677  "left",
4678  "center",
4679  "right",
4680  "span-left",
4681  "span-right",
4682  "x-start",
4683  "x-end",
4684  "span-x-start",
4685  "span-x-end",
4686  "self-x-start",
4687  "self-x-end",
4688  "span-self-x-start",
4689  "span-self-x-end",
4690  "span-all",
4691  "top",
4692  "bottom",
4693  "span-top",
4694  "span-bottom",
4695  "y-start",
4696  "y-end",
4697  "span-y-start",
4698  "span-y-end",
4699  "self-y-start",
4700  "self-y-end",
4701  "span-self-y-start",
4702  "span-self-y-end",
4703  "block-start",
4704  "block-end",
4705  "span-block-start",
4706  "span-block-end",
4707  "inline-start",
4708  "inline-end",
4709  "span-inline-start",
4710  "span-inline-end",
4711  "self-block-start",
4712  "self-block-end",
4713  "span-self-block-start",
4714  "span-self-block-end",
4715  "self-inline-start",
4716  "self-inline-end",
4717  "span-self-inline-start",
4718  "span-self-inline-end",
4719  "start",
4720  "end",
4721  "span-start",
4722  "span-end",
4723  "self-start",
4724  "self-end",
4725  "span-self-start",
4726  "span-self-end"
4727];
4728function ho(t) {
4729  return Ff.includes(t);
4730}
4731const br = {
4732  left: [
4733    0,
4734    1,
4735    "Irrelevant"
4736    /* Irrelevant */
4737  ],
4738  center: [
4739    1,
4740    2,
4741    "Irrelevant"
4742    /* Irrelevant */
4743  ],
4744  right: [
4745    2,
4746    3,
4747    "Irrelevant"
4748    /* Irrelevant */
4749  ],
4750  "span-left": [
4751    0,
4752    2,
4753    "Irrelevant"
4754    /* Irrelevant */
4755  ],
4756  "span-right": [
4757    1,
4758    3,
4759    "Irrelevant"
4760    /* Irrelevant */
4761  ],
4762  "x-start": [
4763    0,
4764    1,
4765    "Physical"
4766    /* Physical */
4767  ],
4768  "x-end": [
4769    2,
4770    3,
4771    "Physical"
4772    /* Physical */
4773  ],
4774  "span-x-start": [
4775    0,
4776    2,
4777    "Physical"
4778    /* Physical */
4779  ],
4780  "span-x-end": [
4781    1,
4782    3,
4783    "Physical"
4784    /* Physical */
4785  ],
4786  "self-x-start": [
4787    0,
4788    1,
4789    "PhysicalSelf"
4790    /* PhysicalSelf */
4791  ],
4792  "self-x-end": [
4793    2,
4794    3,
4795    "PhysicalSelf"
4796    /* PhysicalSelf */
4797  ],
4798  "span-self-x-start": [
4799    0,
4800    2,
4801    "PhysicalSelf"
4802    /* PhysicalSelf */
4803  ],
4804  "span-self-x-end": [
4805    1,
4806    3,
4807    "PhysicalSelf"
4808    /* PhysicalSelf */
4809  ],
4810  "span-all": [
4811    0,
4812    3,
4813    "Irrelevant"
4814    /* Irrelevant */
4815  ],
4816  top: [
4817    0,
4818    1,
4819    "Irrelevant"
4820    /* Irrelevant */
4821  ],
4822  bottom: [
4823    2,
4824    3,
4825    "Irrelevant"
4826    /* Irrelevant */
4827  ],
4828  "span-top": [
4829    0,
4830    2,
4831    "Irrelevant"
4832    /* Irrelevant */
4833  ],
4834  "span-bottom": [
4835    1,
4836    3,
4837    "Irrelevant"
4838    /* Irrelevant */
4839  ],
4840  "y-start": [
4841    0,
4842    1,
4843    "Physical"
4844    /* Physical */
4845  ],
4846  "y-end": [
4847    2,
4848    3,
4849    "Physical"
4850    /* Physical */
4851  ],
4852  "span-y-start": [
4853    0,
4854    2,
4855    "Physical"
4856    /* Physical */
4857  ],
4858  "span-y-end": [
4859    1,
4860    3,
4861    "Physical"
4862    /* Physical */
4863  ],
4864  "self-y-start": [
4865    0,
4866    1,
4867    "PhysicalSelf"
4868    /* PhysicalSelf */
4869  ],
4870  "self-y-end": [
4871    2,
4872    3,
4873    "PhysicalSelf"
4874    /* PhysicalSelf */
4875  ],
4876  "span-self-y-start": [
4877    0,
4878    2,
4879    "PhysicalSelf"
4880    /* PhysicalSelf */
4881  ],
4882  "span-self-y-end": [
4883    1,
4884    3,
4885    "PhysicalSelf"
4886    /* PhysicalSelf */
4887  ],
4888  "block-start": [
4889    0,
4890    1,
4891    "Logical"
4892    /* Logical */
4893  ],
4894  "block-end": [
4895    2,
4896    3,
4897    "Logical"
4898    /* Logical */
4899  ],
4900  "span-block-start": [
4901    0,
4902    2,
4903    "Logical"
4904    /* Logical */
4905  ],
4906  "span-block-end": [
4907    1,
4908    3,
4909    "Logical"
4910    /* Logical */
4911  ],
4912  "inline-start": [
4913    0,
4914    1,
4915    "Logical"
4916    /* Logical */
4917  ],
4918  "inline-end": [
4919    2,
4920    3,
4921    "Logical"
4922    /* Logical */
4923  ],
4924  "span-inline-start": [
4925    0,
4926    2,
4927    "Logical"
4928    /* Logical */
4929  ],
4930  "span-inline-end": [
4931    1,
4932    3,
4933    "Logical"
4934    /* Logical */
4935  ],
4936  "self-block-start": [
4937    0,
4938    1,
4939    "LogicalSelf"
4940    /* LogicalSelf */
4941  ],
4942  "self-block-end": [
4943    2,
4944    3,
4945    "LogicalSelf"
4946    /* LogicalSelf */
4947  ],
4948  "span-self-block-start": [
4949    0,
4950    2,
4951    "LogicalSelf"
4952    /* LogicalSelf */
4953  ],
4954  "span-self-block-end": [
4955    1,
4956    3,
4957    "LogicalSelf"
4958    /* LogicalSelf */
4959  ],
4960  "self-inline-start": [
4961    0,
4962    1,
4963    "LogicalSelf"
4964    /* LogicalSelf */
4965  ],
4966  "self-inline-end": [
4967    2,
4968    3,
4969    "LogicalSelf"
4970    /* LogicalSelf */
4971  ],
4972  "span-self-inline-start": [
4973    0,
4974    2,
4975    "LogicalSelf"
4976    /* LogicalSelf */
4977  ],
4978  "span-self-inline-end": [
4979    1,
4980    3,
4981    "LogicalSelf"
4982    /* LogicalSelf */
4983  ],
4984  start: [
4985    0,
4986    1,
4987    "Logical"
4988    /* Logical */
4989  ],
4990  end: [
4991    2,
4992    3,
4993    "Logical"
4994    /* Logical */
4995  ],
4996  "span-start": [
4997    0,
4998    2,
4999    "Logical"
5000    /* Logical */
5001  ],
5002  "span-end": [
5003    1,
5004    3,
5005    "Logical"
5006    /* Logical */
5007  ],
5008  "self-start": [
5009    0,
5010    1,
5011    "LogicalSelf"
5012    /* LogicalSelf */
5013  ],
5014  "self-end": [
5015    2,
5016    3,
5017    "LogicalSelf"
5018    /* LogicalSelf */
5019  ],
5020  "span-self-start": [
5021    0,
5022    2,
5023    "LogicalSelf"
5024    /* LogicalSelf */
5025  ],
5026  "span-self-end": [
5027    1,
5028    3,
5029    "LogicalSelf"
5030    /* LogicalSelf */
5031  ]
5032}, zf = [
5033  "left",
5034  "center",
5035  "right",
5036  "span-left",
5037  "span-right",
5038  "x-start",
5039  "x-end",
5040  "span-x-start",
5041  "span-x-end",
5042  "self-x-start",
5043  "self-x-end",
5044  "span-self-x-start",
5045  "span-self-x-end",
5046  "span-all"
5047], $f = [
5048  "top",
5049  "center",
5050  "bottom",
5051  "span-top",
5052  "span-bottom",
5053  "y-start",
5054  "y-end",
5055  "span-y-start",
5056  "span-y-end",
5057  "self-y-start",
5058  "self-y-end",
5059  "span-self-y-start",
5060  "span-self-y-end",
5061  "span-all"
5062], Bf = [
5063  "block-start",
5064  "center",
5065  "block-end",
5066  "span-block-start",
5067  "span-block-end",
5068  "span-all"
5069], Wf = [
5070  "inline-start",
5071  "center",
5072  "inline-end",
5073  "span-inline-start",
5074  "span-inline-end",
5075  "span-all"
5076], Uf = [
5077  "self-block-start",
5078  "center",
5079  "self-block-end",
5080  "span-self-block-start",
5081  "span-self-block-end",
5082  "span-all"
5083], Vf = [
5084  "self-inline-start",
5085  "center",
5086  "self-inline-end",
5087  "span-self-inline-start",
5088  "span-self-inline-end",
5089  "span-all"
5090], Sr = [
5091  "start",
5092  "center",
5093  "end",
5094  "span-start",
5095  "span-end",
5096  "span-all"
5097], vr = [
5098  "self-start",
5099  "center",
5100  "self-end",
5101  "span-self-start",
5102  "span-self-end",
5103  "span-all"
5104], Hf = ["block", "top", "bottom", "y"], Qf = ["inline", "left", "right", "x"];
5105function dn(t) {
5106  const e = t.split("-");
5107  for (const n of e) {
5108    if (Hf.includes(n)) return "block";
5109    if (Qf.includes(n)) return "inline";
5110  }
5111  return "ambiguous";
5112}
5113function qf(t, e) {
5114  return e[0].includes(t[0]) && e[1].includes(t[1]) || e[0].includes(t[1]) && e[1].includes(t[0]);
5115}
5116const Gf = [
5117  [zf, $f],
5118  [Bf, Wf],
5119  [Uf, Vf],
5120  [Sr, Sr],
5121  [vr, vr]
5122];
5123function Xf(t) {
5124  for (const e of Gf)
5125    if (qf(t, e)) return !0;
5126  return !1;
5127}
5128const Cr = (t) => {
5129  const e = getComputedStyle(t);
5130  return {
5131    writingMode: e.writingMode,
5132    direction: e.direction
5133  };
5134}, Yf = (t, e) => _(null, null, function* () {
5135  const n = yield On(t);
5136  switch (e) {
5137    case "Logical":
5138    case "Physical":
5139      return Cr(n);
5140    case "LogicalSelf":
5141    case "PhysicalSelf":
5142      return Cr(t);
5143    default:
5144      return null;
5145  }
5146}), Ze = (t) => t.reverse().map((e) => 3 - e), fo = (t, e) => t === "Irrelevant" ? e : t, Jf = (t, e) => _(null, [t, e], function* ({
5147  block: n,
5148  inline: r
5149}, i) {
5150  const s = fo(n[2], r[2]), l = yield Yf(i, s), c = {
5151    block: [n[0], n[1]],
5152    inline: [r[0], r[1]]
5153  };
5154  if (l) {
5155    if (l.direction === "rtl" && (c.inline = Ze(c.inline)), l.writingMode.startsWith("vertical")) {
5156      const a = c.block;
5157      c.block = c.inline, c.inline = a;
5158    }
5159    if (l.writingMode.startsWith("sideways")) {
5160      const a = c.block;
5161      c.block = c.inline, c.inline = a, l.writingMode.endsWith("lr") && (c.block = Ze(c.block));
5162    }
5163    l.writingMode.endsWith("rl") && (c.inline = Ze(c.inline));
5164  }
5165  return c;
5166}), Kf = ({
5167  block: t,
5168  inline: e
5169}) => {
5170  const n = [0, "top", "bottom", 0], r = [0, "left", "right", 0];
5171  return {
5172    block: [n[t[0]], n[t[1]]],
5173    inline: [r[e[0]], r[e[1]]]
5174  };
5175};
5176function xr([t, e]) {
5177  return t === 0 && e === 3 ? "center" : t === 0 ? "end" : e === 3 ? "start" : "center";
5178}
5179function Zf(t) {
5180  return t.type === "Declaration" && t.property === "position-area";
5181}
5182function tp(t) {
5183  const e = t.value.children.toArray().map(({ name: n }) => n);
5184  return e.length === 1 && (dn(e[0]) === "ambiguous" ? e.push(e[0]) : e.push("span-all")), e;
5185}
5186function ep(t) {
5187  if (!Zf(t)) return;
5188  const e = tp(t);
5189  if (!Xf(e)) return;
5190  const n = {};
5191  switch (dn(e[0])) {
5192    case "block":
5193      n.block = e[0], n.inline = e[1];
5194      break;
5195    case "inline":
5196      n.inline = e[0], n.block = e[1];
5197      break;
5198    case "ambiguous":
5199      dn(e[1]) == "block" ? (n.block = e[1], n.inline = e[0]) : (n.inline = e[1], n.block = e[0]);
5200      break;
5201  }
5202  const r = {
5203    block: br[n.block],
5204    inline: br[n.inline]
5205  }, i = `--pa-declaration-${lo(12)}`;
5206  return {
5207    values: n,
5208    grid: r,
5209    selectorUUID: i
5210  };
5211}
5212function np(t, e) {
5213  [
5214    // Insets are applied to a wrapping element
5215    "justify-self",
5216    "align-self"
5217  ].forEach((n) => {
5218    e.children.appendData({
5219      type: "Declaration",
5220      property: n,
5221      value: { type: "Raw", value: `var(--pa-value-${n})` },
5222      important: !1
5223    });
5224  }), e.children.appendData({
5225    type: "Declaration",
5226    property: ao,
5227    value: { type: "Raw", value: t.selectorUUID },
5228    important: !1
5229  });
5230}
5231function rp(t, e) {
5232  var n, r;
5233  let i;
5234  if (((n = t.parentElement) == null ? void 0 : n.tagName) === gr)
5235    i = t.parentElement;
5236  else {
5237    i = document.createElement(gr), i.style.display = "grid", i.style.position = "absolute";
5238    const s = getComputedStyle(t).pointerEvents;
5239    i.style.pointerEvents = "none", t.style.pointerEvents = s, ["top", "left", "right", "bottom"].forEach((l) => {
5240      i.style.setProperty(l, `var(--pa-value-${l})`);
5241    }), (r = t.parentElement) == null || r.insertBefore(i, t), i.appendChild(t);
5242  }
5243  return i.setAttribute(
5244    `${uo}${e}`,
5245    ""
5246  ), i;
5247}
5248function ip(t, e, n) {
5249  return _(this, null, function* () {
5250    const r = `--pa-target-${lo(12)}`, i = yield Jf(
5251      e.grid,
5252      t
5253    ), s = Kf(i), l = fo(
5254      e.grid.block[2],
5255      e.grid.inline[2]
5256    ), c = [
5257      "LogicalSelf",
5258      "PhysicalSelf"
5259      /* PhysicalSelf */
5260    ].includes(l) ? i : e.grid, a = {
5261      block: xr([c.block[0], c.block[1]]),
5262      inline: xr([
5263        c.inline[0],
5264        c.inline[1]
5265      ])
5266    };
5267    return {
5268      insets: s,
5269      alignments: a,
5270      targetUUID: r,
5271      targetEl: t,
5272      anchorEl: n,
5273      wrapperEl: rp(t, r),
5274      values: e.values,
5275      grid: e.grid,
5276      selectorUUID: e.selectorUUID
5277    };
5278  });
5279}
5280function sp(t, e) {
5281  return `
5282    [${co}="${e}"][${uo}${t}] {
5283      --pa-value-top: var(${t}-top);
5284      --pa-value-left: var(${t}-left);
5285      --pa-value-right: var(${t}-right);
5286      --pa-value-bottom: var(${t}-bottom);
5287      --pa-value-justify-self: var(${t}-justify-self);
5288      --pa-value-align-self: var(${t}-align-self);
5289    }
5290  `.replaceAll(`
5291`, "");
5292}
5293const op = [
5294  "normal",
5295  "most-width",
5296  "most-height",
5297  "most-block-size",
5298  "most-inline-size"
5299], lp = [
5300  "flip-block",
5301  "flip-inline",
5302  "flip-start"
5303];
5304function ap(t) {
5305  return t.type === "Declaration";
5306}
5307function cp(t) {
5308  return t.type === "Declaration" && t.property === "position-try-fallbacks";
5309}
5310function up(t) {
5311  return t.type === "Declaration" && t.property === "position-try-order";
5312}
5313function hp(t) {
5314  return t.type === "Declaration" && t.property === "position-try";
5315}
5316function fp(t) {
5317  return t.type === "Atrule" && t.name === "position-try";
5318}
5319function pp(t) {
5320  return lp.includes(t);
5321}
5322function dp(t) {
5323  return op.includes(t);
5324}
5325function mp(t, e) {
5326  const n = document.querySelector(t);
5327  if (n) {
5328    let r = yp(n);
5329    return e.forEach((i) => {
5330      r = po(r, i);
5331    }), r;
5332  }
5333}
5334function kp(t, e) {
5335  let n = t.declarations;
5336  return e.forEach((r) => {
5337    n = po(n, r);
5338  }), n;
5339}
5340function yp(t) {
5341  const e = {};
5342  return Js.forEach((n) => {
5343    const r = ot(t, `--${n}-${io}`);
5344    r && (e[n] = r);
5345  }), e;
5346}
5347const gp = {
5348  "flip-block": {
5349    top: "bottom",
5350    bottom: "top",
5351    "inset-block-start": "inset-block-end",
5352    "inset-block-end": "inset-block-start",
5353    "margin-top": "margin-bottom",
5354    "margin-bottom": "margin-top"
5355  },
5356  "flip-inline": {
5357    left: "right",
5358    right: "left",
5359    "inset-inline-start": "inset-inline-end",
5360    "inset-inline-end": "inset-inline-start",
5361    "margin-left": "margin-right",
5362    "margin-right": "margin-left"
5363  },
5364  "flip-start": {
5365    left: "top",
5366    right: "bottom",
5367    top: "left",
5368    bottom: "right",
5369    "inset-block-start": "inset-block-end",
5370    "inset-block-end": "inset-block-start",
5371    "inset-inline-start": "inset-inline-end",
5372    "inset-inline-end": "inset-inline-start",
5373    "inset-block": "inset-inline",
5374    "inset-inline": "inset-block"
5375  }
5376}, bp = {
5377  "flip-block": {
5378    top: "bottom",
5379    bottom: "top",
5380    start: "end",
5381    end: "start",
5382    "self-end": "self-start",
5383    "self-start": "self-end"
5384  },
5385  "flip-inline": {
5386    left: "right",
5387    right: "left",
5388    start: "end",
5389    end: "start",
5390    "self-end": "self-start",
5391    "self-start": "self-end"
5392  },
5393  "flip-start": {
5394    top: "left",
5395    left: "top",
5396    right: "bottom",
5397    bottom: "right"
5398  }
5399}, Sp = {
5400  "flip-block": {
5401    top: "bottom",
5402    bottom: "top",
5403    start: "end",
5404    end: "start"
5405  },
5406  "flip-inline": {
5407    left: "right",
5408    right: "left",
5409    start: "end",
5410    end: "start"
5411  },
5412  "flip-start": {
5413    // TODO: Requires fuller logic
5414  }
5415};
5416function vp(t, e) {
5417  return gp[e][t] || t;
5418}
5419function Cp(t, e) {
5420  return bp[e][t] || t;
5421}
5422function xp(t, e) {
5423  if (e === "flip-start")
5424    return t;
5425  {
5426    const n = Sp[e];
5427    return t.split("-").map((r) => n[r] || r).join("-");
5428  }
5429}
5430function wp(t, e, n) {
5431  if (t === "margin") {
5432    const [r, i, s, l] = e.children.toArray();
5433    n === "flip-block" ? l ? e.children.fromArray([s, i, r, l]) : s && e.children.fromArray([s, i, r]) : n === "flip-inline" && l && e.children.fromArray([r, l, s, i]);
5434  } else if (t === "margin-block") {
5435    const [r, i] = e.children.toArray();
5436    n === "flip-block" && i && e.children.fromArray([i, r]);
5437  } else if (t === "margin-inline") {
5438    const [r, i] = e.children.toArray();
5439    n === "flip-inline" && i && e.children.fromArray([i, r]);
5440  }
5441}
5442const Lp = (t, e) => {
5443  var n;
5444  return ((n = Ot(`#id{${t}: ${e};}`).children.first) == null ? void 0 : n.block.children.first).value;
5445};
5446function po(t, e) {
5447  const n = {};
5448  return Object.entries(t).forEach(([r, i]) => {
5449    const s = r, l = Lp(s, i), c = vp(s, e);
5450    c !== s && (n[s] != null || (n[s] = "revert")), Lt(l, {
5451      visit: "Function",
5452      enter(a) {
5453        Pe(a) && a.children.forEach((o) => {
5454          ie(o) && Zs(o.name) && (o.name = Cp(o.name, e));
5455        });
5456      }
5457    }), s === "position-area" && l.children.forEach((a) => {
5458      ie(a) && ho(a.name) && (a.name = xp(a.name, e));
5459    }), s.startsWith("margin") && wp(s, l, e), n[c] = K(l);
5460  }), n;
5461}
5462function mo(t) {
5463  const e = Sf(t), n = [];
5464  return e.forEach((r) => {
5465    const i = {
5466      atRules: [],
5467      tactics: [],
5468      positionAreas: []
5469    };
5470    r.forEach((s) => {
5471      pp(s.name) ? i.tactics.push(s.name) : s.name.startsWith("--") ? i.atRules.push(s.name) : ho(s.name) && i.positionAreas.push(s.name);
5472    }), i.positionAreas.length ? n.push({
5473      positionArea: i.positionAreas[0],
5474      type: "position-area"
5475    }) : i.atRules.length && i.tactics.length ? n.push({
5476      tactics: i.tactics,
5477      atRule: i.atRules[0],
5478      type: "at-rule-with-try-tactic"
5479    }) : i.atRules.length ? n.push({
5480      atRule: i.atRules[0],
5481      type: "at-rule"
5482    }) : i.tactics.length && n.push({
5483      tactics: i.tactics,
5484      type: "try-tactic"
5485    });
5486  }), n;
5487}
5488function Op(t) {
5489  return cp(t) && t.value.children.first ? mo(t.value.children) : [];
5490}
5491function Tp(t) {
5492  if (hp(t) && t.value.children.first) {
5493    const e = Le(t);
5494    let n;
5495    const r = e.value.children.first.name;
5496    r && dp(r) && (n = r, e.value.children.shift());
5497    const i = mo(e.value.children);
5498    return { order: n, options: i };
5499  }
5500  return {};
5501}
5502function Ap(t) {
5503  return up(t) && t.value.children.first ? {
5504    order: t.value.children.first.name
5505  } : {};
5506}
5507function _p(t) {
5508  const { order: e, options: n } = Tp(t);
5509  if (e || n)
5510    return { order: e, options: n };
5511  const { order: r } = Ap(t), i = Op(t);
5512  return r || i ? { order: r, options: i } : {};
5513}
5514function Pp(t) {
5515  return ce(t.property) || lh(t.property) || Xs(t.property) || ah(t.property) || ["position-anchor", "position-area"].includes(t.property);
5516}
5517function Ep(t) {
5518  var e, n;
5519  if (fp(t) && (e = t.prelude) != null && e.value && (n = t.block) != null && n.children) {
5520    const r = t.prelude.value, i = t.block.children.filter(
5521      (l) => ap(l) && Pp(l)
5522    ), s = {
5523      uuid: `${r}-try-${ct(12)}`,
5524      declarations: Object.fromEntries(
5525        i.map((l) => [l.property, K(l.value)])
5526      )
5527    };
5528    return { name: r, tryBlock: s };
5529  }
5530  return {};
5531}
5532function jp(t) {
5533  const e = {}, n = {}, r = {};
5534  for (const i of t) {
5535    const s = Ot(i.css);
5536    Lt(s, {
5537      visit: "Atrule",
5538      enter(l) {
5539        const { name: c, tryBlock: a } = Ep(l);
5540        c && a && (e[c] = a);
5541      }
5542    });
5543  }
5544  for (const i of t) {
5545    let s = !1;
5546    const l = /* @__PURE__ */ new Set(), c = Ot(i.css);
5547    Lt(c, {
5548      visit: "Declaration",
5549      enter(a) {
5550        var o;
5551        const u = (o = this.rule) == null ? void 0 : o.prelude, h = fn(u);
5552        if (!h.length) return;
5553        const { order: f, options: p } = _p(a), d = {};
5554        f && (d.order = f), h.forEach(({ selector: k }) => {
5555          var g;
5556          p == null || p.forEach((y) => {
5557            var w;
5558            let x;
5559            if (y.type === "at-rule")
5560              x = y.atRule;
5561            else if (y.type === "try-tactic") {
5562              x = `${k}-${y.tactics.join("-")}`;
5563              const T = mp(
5564                k,
5565                y.tactics
5566              );
5567              T && (e[x] = {
5568                uuid: `${k}-${y.tactics.join("-")}-try-${ct(12)}`,
5569                declarations: T
5570              });
5571            } else if (y.type === "at-rule-with-try-tactic") {
5572              x = `${k}-${y.atRule}-${y.tactics.join("-")}`;
5573              const T = e[y.atRule], lt = kp(
5574                T,
5575                y.tactics
5576              );
5577              lt && (e[x] = {
5578                uuid: `${k}-${y.atRule}-${y.tactics.join("-")}-try-${ct(12)}`,
5579                declarations: lt
5580              });
5581            }
5582            if (x && e[x]) {
5583              const T = `[data-anchor-polyfill="${e[x].uuid}"]`;
5584              n[T] != null || (n[T] = []), n[T].push(k), l.has(x) || (d.fallbacks != null || (d.fallbacks = []), d.fallbacks.push(e[x]), l.add(x), (w = this.stylesheet) == null || w.children.prependData({
5585                type: "Rule",
5586                prelude: {
5587                  type: "Raw",
5588                  value: T
5589                },
5590                block: {
5591                  type: "Block",
5592                  children: new Q().fromArray(
5593                    Object.entries(e[x].declarations).map(
5594                      ([lt, v]) => ({
5595                        type: "Declaration",
5596                        important: !0,
5597                        property: lt,
5598                        value: {
5599                          type: "Raw",
5600                          value: v
5601                        }
5602                      })
5603                    )
5604                  )
5605                }
5606              }), s = !0);
5607            }
5608          }), Object.keys(d).length > 0 && (r[k] ? (d.order && (r[k].order = d.order), d.fallbacks && ((g = r[k]).fallbacks != null || (g.fallbacks = []), r[k].fallbacks.push(
5609            ...d.fallbacks
5610          ))) : r[k] = d);
5611        });
5612      }
5613    }), s && (i.css = K(c), i.changed = !0);
5614  }
5615  return { fallbackTargets: n, validPositions: r };
5616}
5617function Dp(t, e) {
5618  return !t || t === e ? !1 : ko(t) ? t.document.contains(e) : t.contains(e);
5619}
5620function ko(t) {
5621  return !!(t && t === t.window);
5622}
5623function Rp(t) {
5624  return Jt(t, "position", "fixed");
5625}
5626function mn(t) {
5627  return !!(t && (Rp(t) || Jt(t, "position", "absolute")));
5628}
5629function wr(t, e) {
5630  return t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING;
5631}
5632function Ip(t) {
5633  return _(this, null, function* () {
5634    return yield nt.getOffsetParent(t);
5635  });
5636}
5637function tn(t) {
5638  return _(this, null, function* () {
5639    if (!["absolute", "fixed"].includes(ot(t, "position")))
5640      return yield Ip(t);
5641    let e = t.parentElement;
5642    for (; e; ) {
5643      if (!Jt(e, "position", "static") && Jt(e, "display", "block"))
5644        return e;
5645      e = e.parentElement;
5646    }
5647    return window;
5648  });
5649}
5650function Mp(t, e, n, r) {
5651  return _(this, null, function* () {
5652    const i = yield tn(t), s = yield tn(n);
5653    if (!(Dp(s, t) || ko(s)) || i === s && !(!mn(t) || wr(t, n)))
5654      return !1;
5655    if (i !== s) {
5656      let l;
5657      const c = [];
5658      for (l = i; l && l !== s && l !== window; )
5659        c.push(l), l = yield tn(l);
5660      const a = c[c.length - 1];
5661      if (a instanceof HTMLElement && !(!mn(a) || wr(a, n)))
5662        return !1;
5663    }
5664    {
5665      let l = t.parentElement;
5666      for (; l; ) {
5667        if (Jt(l, "content-visibility", "hidden"))
5668          return !1;
5669        l = l.parentElement;
5670      }
5671    }
5672    return !(e && r && Lr(t, e, r) !== Lr(n, e, r));
5673  });
5674}
5675function Lr(t, e, n) {
5676  for (; !(t.matches(n) && Ef(t, e)); ) {
5677    if (!t.parentElement)
5678      return null;
5679    t = t.parentElement;
5680  }
5681  return t;
5682}
5683function Np(t, e, n, r, i) {
5684  return _(this, null, function* () {
5685    if (!(t instanceof HTMLElement && n.length && mn(t)))
5686      return null;
5687    const s = n.flatMap((c) => _f(c, i)).filter((c) => Pf(c, e)), l = r.map((c) => c.selector).join(",") || null;
5688    for (let c = s.length - 1; c >= 0; c--) {
5689      const a = s[c], o = "fakePseudoElement" in a;
5690      if (yield Mp(
5691        o ? a.fakePseudoElement : a,
5692        e,
5693        t,
5694        l
5695      ))
5696        return o && a.removeFakePseudoElement(), a;
5697    }
5698    return null;
5699  });
5700}
5701function Fp(t) {
5702  return t.type === "Declaration" && t.property === "anchor-name";
5703}
5704function zp(t) {
5705  return t.type === "Declaration" && t.property === "anchor-scope";
5706}
5707function kn(t) {
5708  return !!(t && t.type === "Function" && t.name === "anchor-size");
5709}
5710function Ce(t) {
5711  return !!(t && t.type === "Function" && t.name === "var");
5712}
5713function ie(t) {
5714  return !!(t.type === "Identifier" && t.name);
5715}
5716function $p(t) {
5717  return !!(t.type === "Percentage" && t.value);
5718}
5719function Or(t, e) {
5720  let n, r, i, s = "", l = !1, c;
5721  const a = [];
5722  t.children.toArray().forEach((f) => {
5723    if (l) {
5724      s = `${s}${K(f)}`;
5725      return;
5726    }
5727    if (f.type === "Operator" && f.value === ",") {
5728      l = !0;
5729      return;
5730    }
5731    a.push(f);
5732  });
5733  let [o, u] = a;
5734  if (u || (u = o, o = void 0), o && (ie(o) && o.name.startsWith("--") ? n = o.name : Ce(o) && o.children.first && (c = o.children.first.name)), u)
5735    if (Pe(t)) {
5736      if (ie(u) && Zs(u.name))
5737        r = u.name;
5738      else if ($p(u)) {
5739        const f = Number(u.value);
5740        r = Number.isNaN(f) ? void 0 : f;
5741      }
5742    } else kn(t) && ie(u) && fh(u.name) && (i = u.name);
5743  const h = `--anchor-${ct(12)}`;
5744  return Object.assign(t, {
5745    type: "Raw",
5746    value: `var(${h})`,
5747    children: null
5748  }), Reflect.deleteProperty(t, "name"), {
5749    anchorName: n,
5750    anchorSide: r,
5751    anchorSize: i,
5752    fallbackValue: s,
5753    customPropName: c,
5754    uuid: h
5755  };
5756}
5757function Tr(t) {
5758  return t.value.children.map(({ name: e }) => e);
5759}
5760let se = {}, jt = {}, Dt = {}, oe = {}, Et = {};
5761function Bp() {
5762  se = {}, jt = {}, Dt = {}, oe = {}, Et = {};
5763}
5764function Wp(t, e) {
5765  var n;
5766  if ((Pe(t) || kn(t)) && e) {
5767    if (e.property.startsWith("--")) {
5768      const r = K(e.value), i = Or(t);
5769      return oe[i.uuid] = r, Dt[e.property] = [
5770        ...(n = Dt[e.property]) != null ? n : [],
5771        i
5772      ], { changed: !0 };
5773    }
5774    if (Pe(t) && ce(e.property) || kn(t) && Ks(e.property)) {
5775      const r = Or(t);
5776      return { prop: e.property, data: r, changed: !0 };
5777    }
5778  }
5779  return {};
5780}
5781function Ar(t, e, n) {
5782  return _(this, null, function* () {
5783    let r = e == null ? void 0 : e.anchorName;
5784    const i = e == null ? void 0 : e.customPropName;
5785    if (t && !r) {
5786      const a = ot(
5787        t,
5788        "position-anchor"
5789      );
5790      a ? r = a : i && (r = ot(t, i));
5791    }
5792    const s = r ? se[r] || [] : [], l = r ? jt[oo.All] || [] : [], c = r ? jt[r] || [] : [];
5793    return yield Np(
5794      t,
5795      r || null,
5796      s,
5797      [...l, ...c],
5798      { roots: n.roots }
5799    );
5800  });
5801}
5802function Up(t, e) {
5803  return _(this, null, function* () {
5804    var n, r, i, s, l, c, a, o, u, h, f;
5805    const p = {}, d = {};
5806    Bp();
5807    const { fallbackTargets: k, validPositions: g } = jp(t);
5808    for (const v of t) {
5809      let R = !1;
5810      const z = Ot(v.css);
5811      Lt(z, function(A) {
5812        var $, I, E, V;
5813        const j = ($ = this.rule) == null ? void 0 : $.prelude, M = fn(j);
5814        if (Fp(A) && M.length)
5815          for (const N of Tr(A))
5816            se[N] != null || (se[N] = []), se[N].push(...M);
5817        if (zp(A) && M.length)
5818          for (const N of Tr(A))
5819            jt[N] != null || (jt[N] = []), jt[N].push(...M);
5820        const {
5821          prop: q,
5822          data: dt,
5823          changed: At
5824        } = Wp(A, this.declaration);
5825        if (q && dt && M.length)
5826          for (const { selector: N } of M)
5827            p[N] = G(W({}, p[N]), {
5828              [q]: [...(E = (I = p[N]) == null ? void 0 : I[q]) != null ? E : [], dt]
5829            });
5830        let H;
5831        if (this.block && (H = ep(A), H)) {
5832          np(
5833            H,
5834            this.block
5835          );
5836          for (const { selector: N } of M)
5837            d[N] = [
5838              ...(V = d[N]) != null ? V : [],
5839              H
5840            ];
5841        }
5842        (At || H) && (R = !0);
5843      }), R && (v.css = K(z), v.changed = !0);
5844    }
5845    const y = new Set(Object.keys(Dt)), w = {}, x = (v) => {
5846      var R, z, A, $, I;
5847      const E = [], V = new Set((z = (R = w[v]) == null ? void 0 : R.names) != null ? z : []);
5848      for (; V.size > 0; )
5849        for (const j of V)
5850          E.push(...(A = Dt[j]) != null ? A : []), V.delete(j), (I = ($ = w[j]) == null ? void 0 : $.names) != null && I.length && w[j].names.forEach((M) => V.add(M));
5851      return E;
5852    };
5853    for (; y.size > 0; ) {
5854      const v = [];
5855      for (const R of t) {
5856        let z = !1;
5857        const A = Ot(R.css);
5858        Lt(A, {
5859          visit: "Function",
5860          enter($) {
5861            var I, E;
5862            const V = (I = this.rule) == null ? void 0 : I.prelude, j = this.declaration, M = j == null ? void 0 : j.property;
5863            if ((V == null ? void 0 : V.children.isEmpty) === !1 && Ce($) && j && M && $.children.first && y.has($.children.first.
5863name) && // For now, we only want assignments to other CSS custom properties
5864            M.startsWith("--")) {
5865              const q = $.children.first, dt = (E = Dt[q.name]) != null ? E : [], At = x(q.name);
5866              if (!(dt.length || At.length))
5867                return;
5868              const H = `${q.name}-anchor-${ct(12)}`, N = K(j.value);
5869              oe[H] = N, w[M] || (w[M] = { names: [], uuids: [] });
5870              const Nt = w[M];
5871              Nt.names.includes(q.name) || Nt.names.push(q.name), Nt.uuids.push(H), v.push(M), q.name = H, z = !0;
5872            }
5873          }
5874        }), z && (R.css = K(A), R.changed = !0);
5875      }
5876      y.clear(), v.forEach((R) => y.add(R));
5877    }
5878    for (const v of t) {
5879      let R = !1;
5880      const z = Ot(v.css);
5881      Lt(z, {
5882        visit: "Function",
5883        enter(A) {
5884          var $, I, E, V, j, M, q;
5885          const dt = ($ = this.rule) == null ? void 0 : $.prelude, At = this.declaration, H = At == null ? void 0 : At.property;
5886          if ((dt == null ? void 0 : dt.children.isEmpty) === !1 && Ce(A) && At && H && A.children.first && // Now we only want assignments to inset/sizing properties
5887          (ce(H) || Xs(H))) {
5888            const N = A.children.first, Nt = (I = Dt[N.name]) != null ? I : [], Me = x(N.name);
5889            if (!(Nt.length || Me.length))
5890              return;
5891            const he = `${H}-${ct(12)}`;
5892            if (Me.length) {
5893              const Ft = /* @__PURE__ */ new Set([N.name]);
5894              for (; Ft.size > 0; )
5895                for (const zt of Ft) {
5896                  const st = w[zt];
5897                  if ((E = st == null ? void 0 : st.names) != null && E.length && (V = st == null ? void 0 : st.uuids) != null && V.length)
5898                    for (const $t of st.names)
5899                      for (const Bt of st.uuids)
5900                        Et[Bt] = G(W({}, Et[Bt]), {
5901                          // - `key` (`propUuid`) is the property-specific
5902                          //   uuid to append to the new custom property name
5903                          // - `value` is the new property-specific custom
5904                          //   property value to use
5905                          [he]: `${$t}-${he}`
5906                        });
5907                  Ft.delete(zt), (j = st == null ? void 0 : st.names) != null && j.length && st.names.forEach(($t) => Ft.add($t));
5908                }
5909            }
5910            const yo = fn(dt);
5911            for (const Ft of [...Nt, ...Me]) {
5912              const zt = W({}, Ft), st = `--anchor-${ct(12)}-${H}`, $t = zt.uuid;
5913              zt.uuid = st;
5914              for (const { selector: Bt } of yo)
5915                p[Bt] = G(W({}, p[Bt]), {
5916                  [H]: [...(q = (M = p[Bt]) == null ? void 0 : M[H]) != null ? q : [], zt]
5917                });
5918              Et[$t] = G(W({}, Et[$t]), {
5919                // - `key` (`propUuid`) is the property-specific
5920                //   uuid to append to the new custom property name
5921                // - `value` is the new property-specific custom
5922                //   property value to use
5923                [he]: st
5924              });
5925            }
5926            N.name = `${N.name}-${he}`, R = !0;
5927          }
5928        }
5929      }), R && (v.css = K(z), v.changed = !0);
5930    }
5931    if (Object.keys(Et).length > 0)
5932      for (const v of t) {
5933        let R = !1;
5934        const z = Ot(v.css);
5935        Lt(z, {
5936          visit: "Function",
5937          enter(A) {
5938            var $, I, E, V;
5939            if (Ce(A) && (I = ($ = A.children.first) == null ? void 0 : $.name) != null && I.startsWith("--") && (V = (E = this.declaration) == null ? void 0 : E.property) != null && V.startsWith("--") && this.block) {
5940              const j = A.children.first, M = Et[j.name];
5941              if (M)
5942                for (const [q, dt] of Object.entries(M))
5943                  this.block.children.appendData({
5944                    type: "Declaration",
5945                    important: !1,
5946                    property: `${this.declaration.property}-${q}`,
5947                    value: {
5948                      type: "Raw",
5949                      value: K(this.declaration.value).replace(
5950                        `var(${j.name})`,
5951                        `var(${dt})`
5952                      )
5953                    }
5954                  }), R = !0;
5955              oe[j.name] && (this.declaration.value = {
5956                type: "Raw",
5957                value: oe[j.name]
5958              }, R = !0);
5959            }
5960          }
5961        }), R && (v.css = K(z), v.changed = !0);
5962      }
5963    const T = /* @__PURE__ */ new Map();
5964    for (const [v, R] of Object.entries(p)) {
5965      let z;
5966      v.startsWith("[data-anchor-polyfill=") && (n = k[v]) != null && n.length ? z = re(
5967        e.roots,
5968        k[v].join(",")
5969      ) : z = re(e.roots, v);
5970      for (const [A, $] of Object.entries(R))
5971        for (const I of $)
5972          for (const E of z) {
5973            const V = yield Ar(E, I, {
5974              roots: e.roots
5975            }), j = `--anchor-${ct(12)}`;
5976            T.set(E, G(W({}, (r = T.get(E)) != null ? r : {}), {
5977              [I.uuid]: j
5978            })), E.setAttribute(
5979              "style",
5980              `${I.uuid}: var(${j}); ${(i = E.getAttribute("style")) != null ? i : ""}`
5981            ), g[v] = G(W({}, g[v]), {
5982              declarations: G(W({}, (s = g[v]) == null ? void 0 : s.declarations), {
5983                [A]: [
5984                  ...(a = (c = (l = g[v]) == null ? void 0 : l.declarations) == null ? void 0 : c[A]) != null ? a : [],
5985                  G(W({}, I), { anchorEl: V, targetEl: E, uuid: j })
5986                ]
5987              })
5988            });
5989          }
5990    }
5991    const lt = {
5992      el: document.createElement("link"),
5993      changed: !1,
5994      created: !0,
5995      css: ""
5996    };
5997    t.push(lt);
5998    for (const [v, R] of Object.entries(d)) {
5999      const z = re(e.roots, v);
6000      for (const A of z) {
6001        const $ = yield Ar(A, null, {
6002          roots: e.roots
6003        });
6004        for (const I of R) {
6005          const E = yield ip(
6006            A,
6007            I,
6008            $
6009          );
6010          lt.css += sp(
6011            E.targetUUID,
6012            I.selectorUUID
6013          ), lt.changed = !0, g[v] = G(W({}, g[v]), {
6014            declarations: G(W({}, (o = g[v]) == null ? void 0 : o.declarations), {
6015              "position-area": [
6016                ...(f = (h = (u = g[v]) == null ? void 0 : u.declarations) == null ? void 0 : h["position-area"]) != null ? f : [],
6017                E
6018              ]
6019            })
6020          });
6021        }
6022      }
6023    }
6024    return { rules: g, inlineStyles: T, anchorScopes: jt };
6025  });
6026}
6027const Vp = [
6028  "as",
6029  "blocking",
6030  "crossorigin",
6031  // 'disabled' is not relevant for style elements, but this exclusion is
6032  // theoretical, as a <link rel=stylesheet disabled> will not be loaded, and
6033  // will not reach this part of the polyfill. See #246.
6034  "disabled",
6035  "fetchpriority",
6036  "href",
6037  "hreflang",
6038  "integrity",
6039  "referrerpolicy",
6040  "rel",
6041  "type"
6042];
6043function _r(t, e, n = !1) {
6044  const r = [];
6045  for (const { el: i, css: s, changed: l, created: c = !1 } of t) {
6046    const a = { el: i, css: s, changed: !1 };
6047    if (l) {
6048      if (i.tagName.toLowerCase() === "style")
6049        i.innerHTML = s;
6050      else if (i instanceof HTMLLinkElement) {
6051        const o = document.createElement("style");
6052        o.textContent = s;
6053        for (const u of i.getAttributeNames())
6054          if (!u.startsWith("on") && !Vp.includes(u)) {
6055            const h = i.getAttribute(u);
6056            h !== null && o.setAttribute(u, h);
6057          }
6058        i.hasAttribute("href") && o.setAttribute("data-original-href", i.getAttribute("href")), c ? (o.setAttribute("data-generated-by-polyfill", "true"), document.head.insertAdjacentElement("beforeend", o)) : (i.insertAdjacentElement("beforebegin", o), i.remove()), a.el = o;
6059      } else if (i.hasAttribute("data-has-inline-styles")) {
6060        const o = i.getAttribute("data-has-inline-styles");
6061        if (o) {
6062          const u = `[data-has-inline-styles="${o}"]{`;
6063          let h = s.slice(u.length, -1);
6064          const f = e == null ? void 0 : e.get(i);
6065          if (f)
6066            for (const [p, d] of Object.entries(f))
6067              h = `${p}: var(${d}); ${h}`;
6068          i.setAttribute("style", h);
6069        }
6070      }
6071    }
6072    n && i.hasAttribute("data-has-inline-styles") && i.removeAttribute("data-has-inline-styles"), r.push(a);
6073  }
6074  return r;
6075}
6076const Hp = G(W({}, nt), { _c: /* @__PURE__ */ new Map() }), Qp = (t, e) => {
6077  let n;
6078  switch (t) {
6079    case "start":
6080    case "self-start":
6081      n = 0;
6082      break;
6083    case "end":
6084    case "self-end":
6085      n = 100;
6086      break;
6087    default:
6088      typeof t == "number" && !Number.isNaN(t) && (n = t);
6089  }
6090  if (n !== void 0)
6091    return e ? 100 - n : n;
6092}, qp = (t, e) => {
6093  let n;
6094  switch (t) {
6095    case "block":
6096    case "self-block":
6097      n = e ? "width" : "height";
6098      break;
6099    case "inline":
6100    case "self-inline":
6101      n = e ? "height" : "width";
6102      break;
6103  }
6104  return n;
6105}, Pr = (t) => {
6106  switch (t) {
6107    case "top":
6108    case "bottom":
6109    case "inset-block-start":
6110    case "inset-block-end":
6111      return "y";
6112    case "left":
6113    case "right":
6114    case "inset-inline-start":
6115    case "inset-inline-end":
6116      return "x";
6117  }
6118  return null;
6119}, Gp = (t) => {
6120  switch (t) {
6121    case "x":
6122      return "width";
6123    case "y":
6124      return "height";
6125  }
6126  return null;
6127}, Er = (t) => ot(t, "display") === "inline", jr = (t, e) => (e === "x" ? ["border-left-width", "border-right-width"] : ["border-top-width", "border-bottom-width"]).reduce(
6128  (n, r) => n + parseInt(ot(t, r), 10),
6129  0
6130) || 0, ye = (t, e) => parseInt(ot(t, `margin-${e}`), 10) || 0, Xp = (t) => ({
6131  top: ye(t, "top"),
6132  right: ye(t, "right"),
6133  bottom: ye(t, "bottom"),
6134  left: ye(t, "left")
6135}), en = (t) => _(null, [t], function* ({
6136  targetEl: e,
6137  targetProperty: n,
6138  anchorRect: r,
6139  anchorSide: i,
6140  anchorSize: s,
6141  fallback: l = null
6142}) {
6143  var c;
6144  if (!((s || i !== void 0) && e && r))
6145    return l;
6146  if (s) {
6147    if (!Ks(n))
6148      return l;
6149    let a;
6150    switch (s) {
6151      case "width":
6152      case "height":
6153        a = s;
6154        break;
6155      default: {
6156        let o = !1;
6157        const u = ot(e, "writing-mode");
6158        o = u.startsWith("vertical-") || u.startsWith("sideways-"), a = qp(s, o);
6159      }
6160    }
6161    return a ? `${r[a]}px` : l;
6162  }
6163  if (i !== void 0) {
6164    let a, o;
6165    const u = Pr(n);
6166    if (!(ce(n) && u && (!ce(i) || u === Pr(i))))
6167      return l;
6168    const h = [
6169      "top",
6170      "left",
6171      "inset-block-start",
6172      "inset-inline-start"
6173    ], f = [
6174      "bottom",
6175      "right",
6176      "inset-block-end",
6177      "inset-inline-end"
6178    ];
6179    switch (i) {
6180      case "left":
6181      case "top":
6182        a = 0;
6183        break;
6184      case "right":
6185      case "bottom":
6186        a = 100;
6187        break;
6188      case "center":
6189        a = 50;
6190        break;
6191      case "inside":
6192        a = h.includes(n) ? 0 : 100;
6193        break;
6194      case "outside":
6195        a = h.includes(n) ? 100 : 0;
6196        break;
6197      default:
6198        if (e) {
6199          const k = (yield (c = nt.isRTL) == null ? void 0 : c.call(nt, e)) || !1;
6200          a = Qp(i, k);
6201        }
6202    }
6203    const p = typeof a == "number" && !Number.isNaN(a), d = Gp(u);
6204    if (p && d) {
6205      f.includes(n) && (o = yield On(e));
6206      let k = r[u] + r[d] * (a / 100);
6207      switch (n) {
6208        case "bottom":
6209        case "inset-block-end": {
6210          if (!o)
6211            break;
6212          let g = o.clientHeight;
6213          if (g === 0 && Er(o)) {
6214            const y = jr(o, u);
6215            g = o.offsetHeight - y;
6216          }
6217          k = g - k;
6218          break;
6219        }
6220        case "right":
6221        case "inset-inline-end": {
6222          if (!o)
6223            break;
6224          let g = o.clientWidth;
6225          if (g === 0 && Er(o)) {
6226            const y = jr(o, u);
6227            g = o.offsetWidth - y;
6228          }
6229          k = g - k;
6230          break;
6231        }
6232      }
6233      return `${k}px`;
6234    }
6235  }
6236  return l;
6237}), Yp = (t) => "wrapperEl" in t, Jp = (t) => "uuid" in t;
6238function Kp(t, e = !1) {
6239  return _(this, null, function* () {
6240    const n = document.documentElement;
6241    for (const [r, i] of Object.entries(t))
6242      for (const s of i) {
6243        const l = s.anchorEl, c = s.targetEl;
6244        if (l && c)
6245          if (Yp(s)) {
6246            const a = s.wrapperEl, o = (u, h, f) => _(null, null, function* () {
6247              return u === 0 ? "0px" : yield en({
6248                targetEl: a,
6249                targetProperty: h,
6250                anchorRect: f,
6251                anchorSide: u
6252              });
6253            });
6254            sn(
6255              l,
6256              a,
6257              () => _(null, null, function* () {
6258                const u = ot(
6259                  c,
6260                  ao
6261                );
6262                a.setAttribute(co, u);
6263                const h = yield nt.getElementRects({
6264                  reference: l,
6265                  floating: a,
6266                  strategy: "absolute"
6267                }), f = s.insets, p = yield o(
6268                  f.block[0],
6269                  "top",
6270                  h.reference
6271                ), d = yield o(
6272                  f.block[1],
6273                  "bottom",
6274                  h.reference
6275                ), k = yield o(
6276                  f.inline[0],
6277                  "left",
6278                  h.reference
6279                ), g = yield o(
6280                  f.inline[1],
6281                  "right",
6282                  h.reference
6283                );
6284                n.style.setProperty(
6285                  `${s.targetUUID}-top`,
6286                  p || null
6287                ), n.style.setProperty(
6288                  `${s.targetUUID}-left`,
6289                  k || null
6290                ), n.style.setProperty(
6291                  `${s.targetUUID}-right`,
6292                  g || null
6293                ), n.style.setProperty(
6294                  `${s.targetUUID}-bottom`,
6295                  d || null
6296                ), n.style.setProperty(
6297                  `${s.targetUUID}-justify-self`,
6298                  s.alignments.inline
6299                ), n.style.setProperty(
6300                  `${s.targetUUID}-align-self`,
6301                  s.alignments.block
6302                );
6303              }),
6304              { animationFrame: e }
6305            );
6306          } else
6307            sn(
6308              l,
6309              c,
6310              () => _(null, null, function* () {
6311                const a = yield nt.getElementRects({
6312                  reference: l,
6313                  floating: c,
6314                  strategy: "absolute"
6315                }), o = yield en({
6316                  targetEl: c,
6317                  targetProperty: r,
6318                  anchorRect: a.reference,
6319                  anchorSide: s.anchorSide,
6320                  anchorSize: s.anchorSize,
6321                  fallback: s.fallbackValue
6322                });
6323                n.style.setProperty(s.uuid, o);
6324              }),
6325              { animationFrame: e }
6326            );
6327        else if (Jp(s)) {
6328          const a = yield en({
6329            targetProperty: r,
6330            anchorSide: s.anchorSide,
6331            anchorSize: s.anchorSize,
6332            fallback: s.fallbackValue
6333          });
6334          n.style.setProperty(s.uuid, a);
6335        }
6336      }
6337  });
6338}
6339function Dr(t, e) {
6340  return _(this, null, function* () {
6341    const n = yield nt.getElementRects({
6342      reference: t,
6343      floating: t,
6344      strategy: "absolute"
6345    });
6346    return yield Jo(
6347      {
6348        x: t.offsetLeft,
6349        y: t.offsetTop,
6350        platform: Hp,
6351        rects: n,
6352        elements: {
6353          floating: t,
6354          reference: e
6355        },
6356        strategy: "absolute"
6357      },
6358      {
6359        padding: Xp(t)
6360      }
6361    );
6362  });
6363}
6364function Zp(t, e, n = !1) {
6365  return _(this, null, function* () {
6366    if (!e.length)
6367      return;
6368    const r = document.querySelectorAll(t);
6369    for (const i of r) {
6370      let s = !1;
6371      const l = yield On(i);
6372      sn(
6373        // We're just checking whether the target element overflows, so we don't
6374        // care about the position of the anchor element in this case. Passing in
6375        // an empty object instead of a reference element avoids unnecessarily
6376        // watching for irrelevant changes.
6377        {},
6378        i,
6379        () => _(null, null, function* () {
6380          if (s)
6381            return;
6382          s = !0, i.removeAttribute("data-anchor-polyfill");
6383          const c = yield Dr(i, l);
6384          if (Object.values(c).every((a) => a <= 0)) {
6385            i.removeAttribute("data-anchor-polyfill-last-successful"), s = !1;
6386            return;
6387          }
6388          for (const [a, { uuid: o }] of e.entries()) {
6389            i.setAttribute("data-anchor-polyfill", o);
6390            const u = yield Dr(i, l);
6391            if (Object.values(u).every((h) => h <= 0)) {
6392              i.setAttribute("data-anchor-polyfill-last-successful", o), s = !1;
6393              break;
6394            }
6395            if (a === e.length - 1) {
6396              const h = i.getAttribute(
6397                "data-anchor-polyfill-last-successful"
6398              );
6399              h ? i.setAttribute("data-anchor-polyfill", h) : i.removeAttribute("data-anchor-polyfill"), s = !1;
6400              break;
6401            }
6402          }
6403        }),
6404        { animationFrame: n, layoutShift: !1 }
6405      );
6406    }
6407  });
6408}
6409function td(t, e = !1) {
6410  return _(this, null, function* () {
6411    var n, r;
6412    for (const i of Object.values(t))
6413      yield Kp((n = i.declarations) != null ? n : {}, e);
6414    for (const [i, s] of Object.entries(t))
6415      yield Zp(
6416        i,
6417        (r = s.fallbacks) != null ? r : [],
6418        e
6419      );
6420  });
6421}
6422function ed(t = {}) {
6423  const e = typeof t == "boolean" ? { useAnimationFrame: t } : t, n = e.useAnimationFrame === void 0 ? !!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME : e.useAnimationFrame;
6424  return Array.isArray(e.elements) || (e.elements = void 0), (!Array.isArray(e.roots) || e.roots.length === 0) && (e.roots = [document]), Object.assign(e, {
6425    useAnimationFrame: n
6426  });
6427}
6428function nd(t) {
6429  return _(this, null, function* () {
6430    const e = ed(
6431      t ?? window.ANCHOR_POSITIONING_POLYFILL_OPTIONS
6432    );
6433    let n = yield Mf(e), r = {}, i;
6434    Cf();
6435    try {
6436      Lf(n) && (n = _r(n));
6437      const s = yield Up(n, { roots: e.roots });
6438      r = s.rules, i = s.inlineStyles;
6439    } catch (s) {
6440      throw vf(), s;
6441    }
6442    return Object.values(r).length && (_r(n, i, !0), yield td(r, e.useAnimationFrame)), r;
6443  });
6444}
6445export {
6446  nd as default
6447};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.