@appsurify-testmap/rrweb-record 2.1.1-alpha.6 → 2.1.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,10 +111,12 @@ function getUntaintedPrototype$1(key) {
111
111
  const iframeEl = document.createElement("iframe");
112
112
  document.body.appendChild(iframeEl);
113
113
  const win = iframeEl.contentWindow;
114
- if (!win) return defaultObj.prototype;
114
+ if (!win)
115
+ return defaultObj.prototype;
115
116
  const untaintedObject = win[key].prototype;
116
117
  document.body.removeChild(iframeEl);
117
- if (!untaintedObject) return defaultPrototype;
118
+ if (!untaintedObject)
119
+ return defaultPrototype;
118
120
  return untaintedBasePrototype$1[key] = untaintedObject;
119
121
  } catch (e) {
120
122
  return defaultPrototype;
@@ -133,7 +135,8 @@ function getUntaintedAccessor$1(key, instance, accessor) {
133
135
  untaintedPrototype,
134
136
  accessor
135
137
  )) == null ? void 0 : _a2.get;
136
- if (!untaintedAccessor) return instance[accessor];
138
+ if (!untaintedAccessor)
139
+ return instance[accessor];
137
140
  untaintedAccessorCache$1[cacheKey] = untaintedAccessor;
138
141
  return untaintedAccessor.call(instance);
139
142
  }
@@ -146,7 +149,8 @@ function getUntaintedMethod$1(key, instance, method) {
146
149
  );
147
150
  const untaintedPrototype = getUntaintedPrototype$1(key);
148
151
  const untaintedMethod = untaintedPrototype[method];
149
- if (typeof untaintedMethod !== "function") return instance[method];
152
+ if (typeof untaintedMethod !== "function")
153
+ return instance[method];
150
154
  untaintedMethodCache$1[cacheKey] = untaintedMethod;
151
155
  return untaintedMethod.bind(instance);
152
156
  }
@@ -169,14 +173,16 @@ function getRootNode$1(n2) {
169
173
  return getUntaintedMethod$1("Node", n2, "getRootNode")();
170
174
  }
171
175
  function host$1(n2) {
172
- if (!n2 || !("host" in n2)) return null;
176
+ if (!n2 || !("host" in n2))
177
+ return null;
173
178
  return getUntaintedAccessor$1("ShadowRoot", n2, "host");
174
179
  }
175
180
  function styleSheets$1(n2) {
176
181
  return n2.styleSheets;
177
182
  }
178
183
  function shadowRoot$1(n2) {
179
- if (!n2 || !("shadowRoot" in n2)) return null;
184
+ if (!n2 || !("shadowRoot" in n2))
185
+ return null;
180
186
  return getUntaintedAccessor$1("Element", n2, "shadowRoot");
181
187
  }
182
188
  function querySelector$1(n2, selectors) {
@@ -294,7 +300,8 @@ function fixBrowserCompatibilityIssuesInCSS(cssText) {
294
300
  }
295
301
  function escapeImportStatement(rule2) {
296
302
  const { cssText } = rule2;
297
- if (cssText.split('"').length < 3) return cssText;
303
+ if (cssText.split('"').length < 3)
304
+ return cssText;
298
305
  const statement = ["@import", `url(${JSON.stringify(rule2.href)})`];
299
306
  if (rule2.layerName === "") {
300
307
  statement.push(`layer`);
@@ -371,7 +378,8 @@ class Mirror {
371
378
  }
372
379
  getId(n2) {
373
380
  var _a2;
374
- if (!n2) return -1;
381
+ if (!n2)
382
+ return -1;
375
383
  const id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id;
376
384
  return id != null ? id : -1;
377
385
  }
@@ -410,7 +418,8 @@ class Mirror {
410
418
  const oldNode = this.getNode(id);
411
419
  if (oldNode) {
412
420
  const meta = this.nodeMetaMap.get(oldNode);
413
- if (meta) this.nodeMetaMap.set(n2, meta);
421
+ if (meta)
422
+ this.nodeMetaMap.set(n2, meta);
414
423
  }
415
424
  this.idNodeMap.set(id, n2);
416
425
  }
@@ -447,7 +456,8 @@ function toLowerCase(str) {
447
456
  const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__";
448
457
  function is2DCanvasBlank(canvas) {
449
458
  const ctx = canvas.getContext("2d");
450
- if (!ctx) return true;
459
+ if (!ctx)
460
+ return true;
451
461
  const chunkSize = 50;
452
462
  for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
453
463
  for (let y = 0; y < canvas.height; y += chunkSize) {
@@ -463,7 +473,8 @@ function is2DCanvasBlank(canvas) {
463
473
  Math.min(chunkSize, canvas.height - y)
464
474
  ).data.buffer
465
475
  );
466
- if (pixelBuffer.some((pixel) => pixel !== 0)) return false;
476
+ if (pixelBuffer.some((pixel) => pixel !== 0))
477
+ return false;
467
478
  }
468
479
  }
469
480
  return true;
@@ -649,7 +660,8 @@ function isSelectorUnique(selector, target) {
649
660
  }
650
661
  }
651
662
  function buildSelector(node2) {
652
- if (!(node2 instanceof Element)) return null;
663
+ if (!(node2 instanceof Element))
664
+ return null;
653
665
  if (node2.id) {
654
666
  return `#${CSS.escape(node2.id)}`;
655
667
  }
@@ -697,11 +709,15 @@ function buildXPath(node2) {
697
709
  if (element.id) {
698
710
  return `//*[@id="${CSS.escape(element.id)}"]`;
699
711
  }
700
- if (element.tagName.toLowerCase() === "html") return "/html";
701
- if (element === document.head) return "/html/head";
702
- if (element === document.body) return "/html/body";
712
+ if (element.tagName.toLowerCase() === "html")
713
+ return "/html";
714
+ if (element === document.head)
715
+ return "/html/head";
716
+ if (element === document.body)
717
+ return "/html/body";
703
718
  const parent = element.parentNode;
704
- if (!parent) return "";
719
+ if (!parent)
720
+ return "";
705
721
  const tag = element.tagName.toLowerCase();
706
722
  const siblings = Array.from(parent.children).filter(
707
723
  (el) => el.tagName.toLowerCase() === tag
@@ -713,7 +729,8 @@ function buildXPath(node2) {
713
729
  case Node.CDATA_SECTION_NODE:
714
730
  case Node.COMMENT_NODE: {
715
731
  const parent = node2.parentNode;
716
- if (!parent) return "";
732
+ if (!parent)
733
+ return "";
717
734
  const typeMap = {
718
735
  [Node.TEXT_NODE]: "text()",
719
736
  [Node.CDATA_SECTION_NODE]: "text()",
@@ -1004,9 +1021,11 @@ function _isBlockedElement(element, blockClass, blockSelector) {
1004
1021
  return false;
1005
1022
  }
1006
1023
  function classMatchesRegex(node2, regex, checkAncestors) {
1007
- if (!node2) return false;
1024
+ if (!node2)
1025
+ return false;
1008
1026
  if (node2.nodeType !== node2.ELEMENT_NODE) {
1009
- if (!checkAncestors) return false;
1027
+ if (!checkAncestors)
1028
+ return false;
1010
1029
  return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);
1011
1030
  }
1012
1031
  for (let eIndex = node2.classList.length; eIndex--; ) {
@@ -1015,7 +1034,8 @@ function classMatchesRegex(node2, regex, checkAncestors) {
1015
1034
  return true;
1016
1035
  }
1017
1036
  }
1018
- if (!checkAncestors) return false;
1037
+ if (!checkAncestors)
1038
+ return false;
1019
1039
  return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);
1020
1040
  }
1021
1041
  function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors) {
@@ -1033,18 +1053,23 @@ function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors)
1033
1053
  try {
1034
1054
  if (typeof maskTextClass === "string") {
1035
1055
  if (checkAncestors) {
1036
- if (el.closest(`.${maskTextClass}`)) return true;
1056
+ if (el.closest(`.${maskTextClass}`))
1057
+ return true;
1037
1058
  } else {
1038
- if (el.classList.contains(maskTextClass)) return true;
1059
+ if (el.classList.contains(maskTextClass))
1060
+ return true;
1039
1061
  }
1040
1062
  } else {
1041
- if (classMatchesRegex(el, maskTextClass, checkAncestors)) return true;
1063
+ if (classMatchesRegex(el, maskTextClass, checkAncestors))
1064
+ return true;
1042
1065
  }
1043
1066
  if (maskTextSelector) {
1044
1067
  if (checkAncestors) {
1045
- if (el.closest(maskTextSelector)) return true;
1068
+ if (el.closest(maskTextSelector))
1069
+ return true;
1046
1070
  } else {
1047
- if (el.matches(maskTextSelector)) return true;
1071
+ if (el.matches(maskTextSelector))
1072
+ return true;
1048
1073
  }
1049
1074
  }
1050
1075
  } catch (e2) {
@@ -1092,7 +1117,8 @@ function onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {
1092
1117
  } catch (error) {
1093
1118
  return;
1094
1119
  }
1095
- if (styleSheetLoaded) return;
1120
+ if (styleSheetLoaded)
1121
+ return;
1096
1122
  const timer = setTimeout(() => {
1097
1123
  if (!fired) {
1098
1124
  listener();
@@ -1189,7 +1215,8 @@ function serializeNode(n2, options) {
1189
1215
  }
1190
1216
  }
1191
1217
  function getRootId(doc, mirror2) {
1192
- if (!mirror2.hasNode(doc)) return void 0;
1218
+ if (!mirror2.hasNode(doc))
1219
+ return void 0;
1193
1220
  const docId = mirror2.getId(doc);
1194
1221
  return docId === 1 ? void 0 : docId;
1195
1222
  }
@@ -1350,7 +1377,8 @@ function serializeElementNode(n2, options) {
1350
1377
  image.crossOrigin = "anonymous";
1351
1378
  if (image.complete && image.naturalWidth !== 0)
1352
1379
  recordInlineImage();
1353
- else image.addEventListener("load", recordInlineImage);
1380
+ else
1381
+ image.addEventListener("load", recordInlineImage);
1354
1382
  return;
1355
1383
  } else {
1356
1384
  console.warn(
@@ -1362,8 +1390,10 @@ function serializeElementNode(n2, options) {
1362
1390
  priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute("crossorigin");
1363
1391
  }
1364
1392
  };
1365
- if (image.complete && image.naturalWidth !== 0) recordInlineImage();
1366
- else image.addEventListener("load", recordInlineImage);
1393
+ if (image.complete && image.naturalWidth !== 0)
1394
+ recordInlineImage();
1395
+ else
1396
+ image.addEventListener("load", recordInlineImage);
1367
1397
  }
1368
1398
  if (tagName === "audio" || tagName === "video") {
1369
1399
  const mediaAttributes = attributes;
@@ -1398,7 +1428,8 @@ function serializeElementNode(n2, options) {
1398
1428
  }
1399
1429
  let isCustomElement;
1400
1430
  try {
1401
- if (customElements.get(tagName)) isCustomElement = true;
1431
+ if (customElements.get(tagName))
1432
+ isCustomElement = true;
1402
1433
  } catch (e2) {
1403
1434
  }
1404
1435
  return {
@@ -1582,7 +1613,8 @@ function serializeNodeWithId(n2, options) {
1582
1613
  keepIframeSrcFn,
1583
1614
  cssCaptured: false
1584
1615
  };
1585
- if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1616
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0)
1617
+ ;
1586
1618
  else {
1587
1619
  if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1588
1620
  bypassOptions.cssCaptured = true;
@@ -1787,7 +1819,8 @@ function getDefaultExportFromCjs$1(x2) {
1787
1819
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1788
1820
  }
1789
1821
  function getAugmentedNamespace$1(n2) {
1790
- if (n2.__esModule) return n2;
1822
+ if (n2.__esModule)
1823
+ return n2;
1791
1824
  var f2 = n2.default;
1792
1825
  if (typeof f2 == "function") {
1793
1826
  var a2 = function a22() {
@@ -1797,7 +1830,8 @@ function getAugmentedNamespace$1(n2) {
1797
1830
  return f2.apply(this, arguments);
1798
1831
  };
1799
1832
  a2.prototype = f2.prototype;
1800
- } else a2 = {};
1833
+ } else
1834
+ a2 = {};
1801
1835
  Object.defineProperty(a2, "__esModule", { value: true });
1802
1836
  Object.keys(n2).forEach(function(k) {
1803
1837
  var d = Object.getOwnPropertyDescriptor(n2, k);
@@ -1865,11 +1899,14 @@ let CssSyntaxError$3$1 = class CssSyntaxError extends Error {
1865
1899
  this.message += ": " + this.reason;
1866
1900
  }
1867
1901
  showSourceCode(color) {
1868
- if (!this.source) return "";
1902
+ if (!this.source)
1903
+ return "";
1869
1904
  let css = this.source;
1870
- if (color == null) color = pico$1.isColorSupported;
1905
+ if (color == null)
1906
+ color = pico$1.isColorSupported;
1871
1907
  if (terminalHighlight$1$1) {
1872
- if (color) css = terminalHighlight$1$1(css);
1908
+ if (color)
1909
+ css = terminalHighlight$1$1(css);
1873
1910
  }
1874
1911
  let lines = css.split(/\r?\n/);
1875
1912
  let start = Math.max(this.line - 3, 0);
@@ -1962,7 +1999,8 @@ let Stringifier$2$1 = class Stringifier {
1962
1999
  if (value.includes("\n")) {
1963
2000
  let indent = this.raw(node2, null, "indent");
1964
2001
  if (indent.length) {
1965
- for (let step = 0; step < depth; step++) value += indent;
2002
+ for (let step = 0; step < depth; step++)
2003
+ value += indent;
1966
2004
  }
1967
2005
  }
1968
2006
  return value;
@@ -1977,20 +2015,23 @@ let Stringifier$2$1 = class Stringifier {
1977
2015
  } else {
1978
2016
  after = this.raw(node2, "after", "emptyBody");
1979
2017
  }
1980
- if (after) this.builder(after);
2018
+ if (after)
2019
+ this.builder(after);
1981
2020
  this.builder("}", node2, "end");
1982
2021
  }
1983
2022
  body(node2) {
1984
2023
  let last = node2.nodes.length - 1;
1985
2024
  while (last > 0) {
1986
- if (node2.nodes[last].type !== "comment") break;
2025
+ if (node2.nodes[last].type !== "comment")
2026
+ break;
1987
2027
  last -= 1;
1988
2028
  }
1989
2029
  let semicolon = this.raw(node2, "semicolon");
1990
2030
  for (let i2 = 0; i2 < node2.nodes.length; i2++) {
1991
2031
  let child = node2.nodes[i2];
1992
2032
  let before = this.raw(child, "before");
1993
- if (before) this.builder(before);
2033
+ if (before)
2034
+ this.builder(before);
1994
2035
  this.stringify(child, last !== i2 || semicolon);
1995
2036
  }
1996
2037
  }
@@ -2005,7 +2046,8 @@ let Stringifier$2$1 = class Stringifier {
2005
2046
  if (node2.important) {
2006
2047
  string += node2.raws.important || " !important";
2007
2048
  }
2008
- if (semicolon) string += ";";
2049
+ if (semicolon)
2050
+ string += ";";
2009
2051
  this.builder(string, node2);
2010
2052
  }
2011
2053
  document(node2) {
@@ -2013,10 +2055,12 @@ let Stringifier$2$1 = class Stringifier {
2013
2055
  }
2014
2056
  raw(node2, own, detect) {
2015
2057
  let value;
2016
- if (!detect) detect = own;
2058
+ if (!detect)
2059
+ detect = own;
2017
2060
  if (own) {
2018
2061
  value = node2.raws[own];
2019
- if (typeof value !== "undefined") return value;
2062
+ if (typeof value !== "undefined")
2063
+ return value;
2020
2064
  }
2021
2065
  let parent = node2.parent;
2022
2066
  if (detect === "before") {
@@ -2027,9 +2071,11 @@ let Stringifier$2$1 = class Stringifier {
2027
2071
  return "";
2028
2072
  }
2029
2073
  }
2030
- if (!parent) return DEFAULT_RAW$1[detect];
2074
+ if (!parent)
2075
+ return DEFAULT_RAW$1[detect];
2031
2076
  let root2 = node2.root();
2032
- if (!root2.rawCache) root2.rawCache = {};
2077
+ if (!root2.rawCache)
2078
+ root2.rawCache = {};
2033
2079
  if (typeof root2.rawCache[detect] !== "undefined") {
2034
2080
  return root2.rawCache[detect];
2035
2081
  }
@@ -2042,11 +2088,13 @@ let Stringifier$2$1 = class Stringifier {
2042
2088
  } else {
2043
2089
  root2.walk((i2) => {
2044
2090
  value = i2.raws[own];
2045
- if (typeof value !== "undefined") return false;
2091
+ if (typeof value !== "undefined")
2092
+ return false;
2046
2093
  });
2047
2094
  }
2048
2095
  }
2049
- if (typeof value === "undefined") value = DEFAULT_RAW$1[detect];
2096
+ if (typeof value === "undefined")
2097
+ value = DEFAULT_RAW$1[detect];
2050
2098
  root2.rawCache[detect] = value;
2051
2099
  return value;
2052
2100
  }
@@ -2063,7 +2111,8 @@ let Stringifier$2$1 = class Stringifier {
2063
2111
  }
2064
2112
  }
2065
2113
  });
2066
- if (value) value = value.replace(/\S/g, "");
2114
+ if (value)
2115
+ value = value.replace(/\S/g, "");
2067
2116
  return value;
2068
2117
  }
2069
2118
  rawBeforeComment(root2, node2) {
@@ -2107,7 +2156,8 @@ let Stringifier$2$1 = class Stringifier {
2107
2156
  root2.walk((i2) => {
2108
2157
  if (i2.type !== "decl") {
2109
2158
  value = i2.raws.between;
2110
- if (typeof value !== "undefined") return false;
2159
+ if (typeof value !== "undefined")
2160
+ return false;
2111
2161
  }
2112
2162
  });
2113
2163
  return value;
@@ -2125,7 +2175,8 @@ let Stringifier$2$1 = class Stringifier {
2125
2175
  }
2126
2176
  }
2127
2177
  });
2128
- if (value) value = value.replace(/\S/g, "");
2178
+ if (value)
2179
+ value = value.replace(/\S/g, "");
2129
2180
  return value;
2130
2181
  }
2131
2182
  rawColon(root2) {
@@ -2143,13 +2194,15 @@ let Stringifier$2$1 = class Stringifier {
2143
2194
  root2.walk((i2) => {
2144
2195
  if (i2.nodes && i2.nodes.length === 0) {
2145
2196
  value = i2.raws.after;
2146
- if (typeof value !== "undefined") return false;
2197
+ if (typeof value !== "undefined")
2198
+ return false;
2147
2199
  }
2148
2200
  });
2149
2201
  return value;
2150
2202
  }
2151
2203
  rawIndent(root2) {
2152
- if (root2.raws.indent) return root2.raws.indent;
2204
+ if (root2.raws.indent)
2205
+ return root2.raws.indent;
2153
2206
  let value;
2154
2207
  root2.walk((i2) => {
2155
2208
  let p = i2.parent;
@@ -2169,7 +2222,8 @@ let Stringifier$2$1 = class Stringifier {
2169
2222
  root2.walk((i2) => {
2170
2223
  if (i2.nodes && i2.nodes.length && i2.last.type === "decl") {
2171
2224
  value = i2.raws.semicolon;
2172
- if (typeof value !== "undefined") return false;
2225
+ if (typeof value !== "undefined")
2226
+ return false;
2173
2227
  }
2174
2228
  });
2175
2229
  return value;
@@ -2184,7 +2238,8 @@ let Stringifier$2$1 = class Stringifier {
2184
2238
  }
2185
2239
  root(node2) {
2186
2240
  this.body(node2);
2187
- if (node2.raws.after) this.builder(node2.raws.after);
2241
+ if (node2.raws.after)
2242
+ this.builder(node2.raws.after);
2188
2243
  }
2189
2244
  rule(node2) {
2190
2245
  this.block(node2, this.rawValue(node2, "selector"));
@@ -2220,17 +2275,20 @@ function cloneNode$1(obj, parent) {
2220
2275
  if (!Object.prototype.hasOwnProperty.call(obj, i2)) {
2221
2276
  continue;
2222
2277
  }
2223
- if (i2 === "proxyCache") continue;
2278
+ if (i2 === "proxyCache")
2279
+ continue;
2224
2280
  let value = obj[i2];
2225
2281
  let type = typeof value;
2226
2282
  if (i2 === "parent" && type === "object") {
2227
- if (parent) cloned[i2] = parent;
2283
+ if (parent)
2284
+ cloned[i2] = parent;
2228
2285
  } else if (i2 === "source") {
2229
2286
  cloned[i2] = value;
2230
2287
  } else if (Array.isArray(value)) {
2231
2288
  cloned[i2] = value.map((j) => cloneNode$1(j, cloned));
2232
2289
  } else {
2233
- if (type === "object" && value !== null) value = cloneNode$1(value);
2290
+ if (type === "object" && value !== null)
2291
+ value = cloneNode$1(value);
2234
2292
  cloned[i2] = value;
2235
2293
  }
2236
2294
  }
@@ -2284,7 +2342,8 @@ let Node$5$1 = class Node2 {
2284
2342
  cleanRaws(keepBetween) {
2285
2343
  delete this.raws.before;
2286
2344
  delete this.raws.after;
2287
- if (!keepBetween) delete this.raws.between;
2345
+ if (!keepBetween)
2346
+ delete this.raws.between;
2288
2347
  }
2289
2348
  clone(overrides = {}) {
2290
2349
  let cloned = cloneNode$1(this);
@@ -2327,7 +2386,8 @@ let Node$5$1 = class Node2 {
2327
2386
  }
2328
2387
  },
2329
2388
  set(node2, prop, value) {
2330
- if (node2[prop] === value) return true;
2389
+ if (node2[prop] === value)
2390
+ return true;
2331
2391
  node2[prop] = value;
2332
2392
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
2333
2393
  prop === "text") {
@@ -2347,7 +2407,8 @@ let Node$5$1 = class Node2 {
2347
2407
  }
2348
2408
  }
2349
2409
  next() {
2350
- if (!this.parent) return void 0;
2410
+ if (!this.parent)
2411
+ return void 0;
2351
2412
  let index2 = this.parent.index(this);
2352
2413
  return this.parent.nodes[index2 + 1];
2353
2414
  }
@@ -2358,7 +2419,8 @@ let Node$5$1 = class Node2 {
2358
2419
  } else if (opts.word) {
2359
2420
  stringRepresentation = this.toString();
2360
2421
  let index2 = stringRepresentation.indexOf(opts.word);
2361
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
2422
+ if (index2 !== -1)
2423
+ pos = this.positionInside(index2, stringRepresentation);
2362
2424
  }
2363
2425
  return pos;
2364
2426
  }
@@ -2377,7 +2439,8 @@ let Node$5$1 = class Node2 {
2377
2439
  return { column, line };
2378
2440
  }
2379
2441
  prev() {
2380
- if (!this.parent) return void 0;
2442
+ if (!this.parent)
2443
+ return void 0;
2381
2444
  let index2 = this.parent.index(this);
2382
2445
  return this.parent.nodes[index2 - 1];
2383
2446
  }
@@ -2472,7 +2535,8 @@ let Node$5$1 = class Node2 {
2472
2535
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
2473
2536
  continue;
2474
2537
  }
2475
- if (name === "parent" || name === "proxyCache") continue;
2538
+ if (name === "parent" || name === "proxyCache")
2539
+ continue;
2476
2540
  let value = this[name];
2477
2541
  if (Array.isArray(value)) {
2478
2542
  fixed[name] = value.map((i2) => {
@@ -2512,7 +2576,8 @@ let Node$5$1 = class Node2 {
2512
2576
  return this.proxyCache;
2513
2577
  }
2514
2578
  toString(stringifier2 = stringify$3$1) {
2515
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
2579
+ if (stringifier2.stringify)
2580
+ stringifier2 = stringifier2.stringify;
2516
2581
  let result2 = "";
2517
2582
  stringifier2(this, (i2) => {
2518
2583
  result2 += i2;
@@ -2521,7 +2586,8 @@ let Node$5$1 = class Node2 {
2521
2586
  }
2522
2587
  warn(result2, text, opts) {
2523
2588
  let data = { node: this };
2524
- for (let i2 in opts) data[i2] = opts[i2];
2589
+ for (let i2 in opts)
2590
+ data[i2] = opts[i2];
2525
2591
  return result2.warn(text, data);
2526
2592
  }
2527
2593
  get proxyOf() {
@@ -2577,7 +2643,8 @@ function fromBase64$1(str) {
2577
2643
  }
2578
2644
  let PreviousMap$2$1 = class PreviousMap {
2579
2645
  constructor(css, opts) {
2580
- if (opts.map === false) return;
2646
+ if (opts.map === false)
2647
+ return;
2581
2648
  this.loadAnnotation(css);
2582
2649
  this.inline = this.startWith(this.annotation, "data:");
2583
2650
  let prev = opts.map ? opts.map.prev : void 0;
@@ -2585,8 +2652,10 @@ let PreviousMap$2$1 = class PreviousMap {
2585
2652
  if (!this.mapFile && opts.from) {
2586
2653
  this.mapFile = opts.from;
2587
2654
  }
2588
- if (this.mapFile) this.root = dirname$1$1(this.mapFile);
2589
- if (text) this.text = text;
2655
+ if (this.mapFile)
2656
+ this.root = dirname$1$1(this.mapFile);
2657
+ if (text)
2658
+ this.text = text;
2590
2659
  }
2591
2660
  consumer() {
2592
2661
  if (!this.consumerCache) {
@@ -2612,12 +2681,14 @@ let PreviousMap$2$1 = class PreviousMap {
2612
2681
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
2613
2682
  }
2614
2683
  isMap(map) {
2615
- if (typeof map !== "object") return false;
2684
+ if (typeof map !== "object")
2685
+ return false;
2616
2686
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
2617
2687
  }
2618
2688
  loadAnnotation(css) {
2619
2689
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
2620
- if (!comments) return;
2690
+ if (!comments)
2691
+ return;
2621
2692
  let start = css.lastIndexOf(comments.pop());
2622
2693
  let end = css.indexOf("*/", start);
2623
2694
  if (start > -1 && end > -1) {
@@ -2632,7 +2703,8 @@ let PreviousMap$2$1 = class PreviousMap {
2632
2703
  }
2633
2704
  }
2634
2705
  loadMap(file, prev) {
2635
- if (prev === false) return false;
2706
+ if (prev === false)
2707
+ return false;
2636
2708
  if (prev) {
2637
2709
  if (typeof prev === "string") {
2638
2710
  return prev;
@@ -2662,12 +2734,14 @@ let PreviousMap$2$1 = class PreviousMap {
2662
2734
  return this.decodeInline(this.annotation);
2663
2735
  } else if (this.annotation) {
2664
2736
  let map = this.annotation;
2665
- if (file) map = join$1(dirname$1$1(file), map);
2737
+ if (file)
2738
+ map = join$1(dirname$1$1(file), map);
2666
2739
  return this.loadFile(map);
2667
2740
  }
2668
2741
  }
2669
2742
  startWith(string, start) {
2670
- if (!string) return false;
2743
+ if (!string)
2744
+ return false;
2671
2745
  return string.substr(0, start.length) === start;
2672
2746
  }
2673
2747
  withContent() {
@@ -2710,13 +2784,15 @@ let Input$4$1 = class Input {
2710
2784
  if (map.text) {
2711
2785
  this.map = map;
2712
2786
  let file = map.consumer().file;
2713
- if (!this.file && file) this.file = this.mapResolve(file);
2787
+ if (!this.file && file)
2788
+ this.file = this.mapResolve(file);
2714
2789
  }
2715
2790
  }
2716
2791
  if (!this.file) {
2717
2792
  this.id = "<input css " + nanoid$2(6) + ">";
2718
2793
  }
2719
- if (this.map) this.map.file = this.from;
2794
+ if (this.map)
2795
+ this.map.file = this.from;
2720
2796
  }
2721
2797
  error(message, line, column, opts = {}) {
2722
2798
  let result2, endLine, endColumn;
@@ -2818,10 +2894,12 @@ let Input$4$1 = class Input {
2818
2894
  return resolve$1$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
2819
2895
  }
2820
2896
  origin(line, column, endLine, endColumn) {
2821
- if (!this.map) return false;
2897
+ if (!this.map)
2898
+ return false;
2822
2899
  let consumer = this.map.consumer();
2823
2900
  let from = consumer.originalPositionFor({ column, line });
2824
- if (!from.source) return false;
2901
+ if (!from.source)
2902
+ return false;
2825
2903
  let to;
2826
2904
  if (typeof endLine === "number") {
2827
2905
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -2850,7 +2928,8 @@ let Input$4$1 = class Input {
2850
2928
  }
2851
2929
  }
2852
2930
  let source = consumer.sourceContentFor(from.source);
2853
- if (source) result2.source = source;
2931
+ if (source)
2932
+ result2.source = source;
2854
2933
  return result2;
2855
2934
  }
2856
2935
  toJSON() {
@@ -2908,7 +2987,8 @@ let MapGenerator$2$1 = class MapGenerator {
2908
2987
  content = this.outputFile() + ".map";
2909
2988
  }
2910
2989
  let eol = "\n";
2911
- if (this.css.includes("\r\n")) eol = "\r\n";
2990
+ if (this.css.includes("\r\n"))
2991
+ eol = "\r\n";
2912
2992
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
2913
2993
  }
2914
2994
  applyPrevMaps() {
@@ -2928,12 +3008,14 @@ let MapGenerator$2$1 = class MapGenerator {
2928
3008
  }
2929
3009
  }
2930
3010
  clearAnnotation() {
2931
- if (this.mapOpts.annotation === false) return;
3011
+ if (this.mapOpts.annotation === false)
3012
+ return;
2932
3013
  if (this.root) {
2933
3014
  let node2;
2934
3015
  for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {
2935
3016
  node2 = this.root.nodes[i2];
2936
- if (node2.type !== "comment") continue;
3017
+ if (node2.type !== "comment")
3018
+ continue;
2937
3019
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
2938
3020
  this.root.removeChild(i2);
2939
3021
  }
@@ -2974,9 +3056,12 @@ let MapGenerator$2$1 = class MapGenerator {
2974
3056
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
2975
3057
  });
2976
3058
  }
2977
- if (this.isSourcesContent()) this.setSourcesContent();
2978
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
2979
- if (this.isAnnotation()) this.addAnnotation();
3059
+ if (this.isSourcesContent())
3060
+ this.setSourcesContent();
3061
+ if (this.root && this.previous().length > 0)
3062
+ this.applyPrevMaps();
3063
+ if (this.isAnnotation())
3064
+ this.addAnnotation();
2980
3065
  if (this.isInline()) {
2981
3066
  return [this.css];
2982
3067
  } else {
@@ -3096,11 +3181,15 @@ let MapGenerator$2$1 = class MapGenerator {
3096
3181
  }
3097
3182
  }
3098
3183
  path(file) {
3099
- if (this.mapOpts.absolute) return file;
3100
- if (file.charCodeAt(0) === 60) return file;
3101
- if (/^\w+:\/\//.test(file)) return file;
3184
+ if (this.mapOpts.absolute)
3185
+ return file;
3186
+ if (file.charCodeAt(0) === 60)
3187
+ return file;
3188
+ if (/^\w+:\/\//.test(file))
3189
+ return file;
3102
3190
  let cached = this.memoizedPaths.get(file);
3103
- if (cached) return cached;
3191
+ if (cached)
3192
+ return cached;
3104
3193
  let from = this.opts.to ? dirname$2(this.opts.to) : ".";
3105
3194
  if (typeof this.mapOpts.annotation === "string") {
3106
3195
  from = dirname$2(resolve$2(from, this.mapOpts.annotation));
@@ -3123,7 +3212,8 @@ let MapGenerator$2$1 = class MapGenerator {
3123
3212
  });
3124
3213
  } else {
3125
3214
  let input2 = new Input$3$1(this.originalCSS, this.opts);
3126
- if (input2.map) this.previousMaps.push(input2.map);
3215
+ if (input2.map)
3216
+ this.previousMaps.push(input2.map);
3127
3217
  }
3128
3218
  }
3129
3219
  return this.previousMaps;
@@ -3164,7 +3254,8 @@ let MapGenerator$2$1 = class MapGenerator {
3164
3254
  }
3165
3255
  toFileUrl(path) {
3166
3256
  let cached = this.memoizedFileURLs.get(path);
3167
- if (cached) return cached;
3257
+ if (cached)
3258
+ return cached;
3168
3259
  if (pathToFileURL$2) {
3169
3260
  let fileURL = pathToFileURL$2(path).toString();
3170
3261
  this.memoizedFileURLs.set(path, fileURL);
@@ -3177,7 +3268,8 @@ let MapGenerator$2$1 = class MapGenerator {
3177
3268
  }
3178
3269
  toUrl(path) {
3179
3270
  let cached = this.memoizedURLs.get(path);
3180
- if (cached) return cached;
3271
+ if (cached)
3272
+ return cached;
3181
3273
  if (sep$1 === "\\") {
3182
3274
  path = path.replace(/\\/g, "/");
3183
3275
  }
@@ -3206,7 +3298,8 @@ let AtRule$4$1;
3206
3298
  let Root$6$1;
3207
3299
  function cleanSource$1(nodes) {
3208
3300
  return nodes.map((i2) => {
3209
- if (i2.nodes) i2.nodes = cleanSource$1(i2.nodes);
3301
+ if (i2.nodes)
3302
+ i2.nodes = cleanSource$1(i2.nodes);
3210
3303
  delete i2.source;
3211
3304
  return i2;
3212
3305
  });
@@ -3223,7 +3316,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3223
3316
  append(...children) {
3224
3317
  for (let child of children) {
3225
3318
  let nodes = this.normalize(child, this.last);
3226
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
3319
+ for (let node2 of nodes)
3320
+ this.proxyOf.nodes.push(node2);
3227
3321
  }
3228
3322
  this.markDirty();
3229
3323
  return this;
@@ -3231,17 +3325,20 @@ let Container$7$1 = class Container extends Node$2$1 {
3231
3325
  cleanRaws(keepBetween) {
3232
3326
  super.cleanRaws(keepBetween);
3233
3327
  if (this.nodes) {
3234
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
3328
+ for (let node2 of this.nodes)
3329
+ node2.cleanRaws(keepBetween);
3235
3330
  }
3236
3331
  }
3237
3332
  each(callback) {
3238
- if (!this.proxyOf.nodes) return void 0;
3333
+ if (!this.proxyOf.nodes)
3334
+ return void 0;
3239
3335
  let iterator = this.getIterator();
3240
3336
  let index2, result2;
3241
3337
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
3242
3338
  index2 = this.indexes[iterator];
3243
3339
  result2 = callback(this.proxyOf.nodes[index2], index2);
3244
- if (result2 === false) break;
3340
+ if (result2 === false)
3341
+ break;
3245
3342
  this.indexes[iterator] += 1;
3246
3343
  }
3247
3344
  delete this.indexes[iterator];
@@ -3251,8 +3348,10 @@ let Container$7$1 = class Container extends Node$2$1 {
3251
3348
  return this.nodes.every(condition);
3252
3349
  }
3253
3350
  getIterator() {
3254
- if (!this.lastEach) this.lastEach = 0;
3255
- if (!this.indexes) this.indexes = {};
3351
+ if (!this.lastEach)
3352
+ this.lastEach = 0;
3353
+ if (!this.indexes)
3354
+ this.indexes = {};
3256
3355
  this.lastEach += 1;
3257
3356
  let iterator = this.lastEach;
3258
3357
  this.indexes[iterator] = 0;
@@ -3294,7 +3393,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3294
3393
  }
3295
3394
  },
3296
3395
  set(node2, prop, value) {
3297
- if (node2[prop] === value) return true;
3396
+ if (node2[prop] === value)
3397
+ return true;
3298
3398
  node2[prop] = value;
3299
3399
  if (prop === "name" || prop === "params" || prop === "selector") {
3300
3400
  node2.markDirty();
@@ -3304,15 +3404,18 @@ let Container$7$1 = class Container extends Node$2$1 {
3304
3404
  };
3305
3405
  }
3306
3406
  index(child) {
3307
- if (typeof child === "number") return child;
3308
- if (child.proxyOf) child = child.proxyOf;
3407
+ if (typeof child === "number")
3408
+ return child;
3409
+ if (child.proxyOf)
3410
+ child = child.proxyOf;
3309
3411
  return this.proxyOf.nodes.indexOf(child);
3310
3412
  }
3311
3413
  insertAfter(exist, add) {
3312
3414
  let existIndex = this.index(exist);
3313
3415
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
3314
3416
  existIndex = this.index(exist);
3315
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3417
+ for (let node2 of nodes)
3418
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3316
3419
  let index2;
3317
3420
  for (let id in this.indexes) {
3318
3421
  index2 = this.indexes[id];
@@ -3328,7 +3431,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3328
3431
  let type = existIndex === 0 ? "prepend" : false;
3329
3432
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
3330
3433
  existIndex = this.index(exist);
3331
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
3434
+ for (let node2 of nodes)
3435
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
3332
3436
  let index2;
3333
3437
  for (let id in this.indexes) {
3334
3438
  index2 = this.indexes[id];
@@ -3347,12 +3451,14 @@ let Container$7$1 = class Container extends Node$2$1 {
3347
3451
  } else if (Array.isArray(nodes)) {
3348
3452
  nodes = nodes.slice(0);
3349
3453
  for (let i2 of nodes) {
3350
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
3454
+ if (i2.parent)
3455
+ i2.parent.removeChild(i2, "ignore");
3351
3456
  }
3352
3457
  } else if (nodes.type === "root" && this.type !== "document") {
3353
3458
  nodes = nodes.nodes.slice(0);
3354
3459
  for (let i2 of nodes) {
3355
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
3460
+ if (i2.parent)
3461
+ i2.parent.removeChild(i2, "ignore");
3356
3462
  }
3357
3463
  } else if (nodes.type) {
3358
3464
  nodes = [nodes];
@@ -3373,10 +3479,13 @@ let Container$7$1 = class Container extends Node$2$1 {
3373
3479
  throw new Error("Unknown node type in node creation");
3374
3480
  }
3375
3481
  let processed = nodes.map((i2) => {
3376
- if (!i2[my$1$1]) Container.rebuild(i2);
3482
+ if (!i2[my$1$1])
3483
+ Container.rebuild(i2);
3377
3484
  i2 = i2.proxyOf;
3378
- if (i2.parent) i2.parent.removeChild(i2);
3379
- if (i2[isClean$1$1]) markDirtyUp$1(i2);
3485
+ if (i2.parent)
3486
+ i2.parent.removeChild(i2);
3487
+ if (i2[isClean$1$1])
3488
+ markDirtyUp$1(i2);
3380
3489
  if (typeof i2.raws.before === "undefined") {
3381
3490
  if (sample && typeof sample.raws.before !== "undefined") {
3382
3491
  i2.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -3391,7 +3500,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3391
3500
  children = children.reverse();
3392
3501
  for (let child of children) {
3393
3502
  let nodes = this.normalize(child, this.first, "prepend").reverse();
3394
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
3503
+ for (let node2 of nodes)
3504
+ this.proxyOf.nodes.unshift(node2);
3395
3505
  for (let id in this.indexes) {
3396
3506
  this.indexes[id] = this.indexes[id] + nodes.length;
3397
3507
  }
@@ -3405,7 +3515,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3405
3515
  return this;
3406
3516
  }
3407
3517
  removeAll() {
3408
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
3518
+ for (let node2 of this.proxyOf.nodes)
3519
+ node2.parent = void 0;
3409
3520
  this.proxyOf.nodes = [];
3410
3521
  this.markDirty();
3411
3522
  return this;
@@ -3430,8 +3541,10 @@ let Container$7$1 = class Container extends Node$2$1 {
3430
3541
  opts = {};
3431
3542
  }
3432
3543
  this.walkDecls((decl) => {
3433
- if (opts.props && !opts.props.includes(decl.prop)) return;
3434
- if (opts.fast && !decl.value.includes(opts.fast)) return;
3544
+ if (opts.props && !opts.props.includes(decl.prop))
3545
+ return;
3546
+ if (opts.fast && !decl.value.includes(opts.fast))
3547
+ return;
3435
3548
  decl.value = decl.value.replace(pattern, callback);
3436
3549
  });
3437
3550
  this.markDirty();
@@ -3528,11 +3641,13 @@ let Container$7$1 = class Container extends Node$2$1 {
3528
3641
  });
3529
3642
  }
3530
3643
  get first() {
3531
- if (!this.proxyOf.nodes) return void 0;
3644
+ if (!this.proxyOf.nodes)
3645
+ return void 0;
3532
3646
  return this.proxyOf.nodes[0];
3533
3647
  }
3534
3648
  get last() {
3535
- if (!this.proxyOf.nodes) return void 0;
3649
+ if (!this.proxyOf.nodes)
3650
+ return void 0;
3536
3651
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
3537
3652
  }
3538
3653
  };
@@ -3594,7 +3709,8 @@ var document$1$1 = Document$3$1;
3594
3709
  Document$3$1.default = Document$3$1;
3595
3710
  let printed$1 = {};
3596
3711
  var warnOnce$2$1 = function warnOnce(message) {
3597
- if (printed$1[message]) return;
3712
+ if (printed$1[message])
3713
+ return;
3598
3714
  printed$1[message] = true;
3599
3715
  if (typeof console !== "undefined" && console.warn) {
3600
3716
  console.warn(message);
@@ -3611,7 +3727,8 @@ let Warning$2$1 = class Warning {
3611
3727
  this.endLine = range.end.line;
3612
3728
  this.endColumn = range.end.column;
3613
3729
  }
3614
- for (let opt in opts) this[opt] = opts[opt];
3730
+ for (let opt in opts)
3731
+ this[opt] = opts[opt];
3615
3732
  }
3616
3733
  toString() {
3617
3734
  if (this.node) {
@@ -3703,8 +3820,10 @@ var tokenize$1 = function tokenizer(input2, options = {}) {
3703
3820
  return returned.length === 0 && pos >= length;
3704
3821
  }
3705
3822
  function nextToken(opts) {
3706
- if (returned.length) return returned.pop();
3707
- if (pos >= length) return;
3823
+ if (returned.length)
3824
+ return returned.pop();
3825
+ if (pos >= length)
3826
+ return;
3708
3827
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
3709
3828
  code = css.charCodeAt(pos);
3710
3829
  switch (code) {
@@ -3876,11 +3995,13 @@ let AtRule$3$1 = class AtRule extends Container$5$1 {
3876
3995
  this.type = "atrule";
3877
3996
  }
3878
3997
  append(...children) {
3879
- if (!this.proxyOf.nodes) this.nodes = [];
3998
+ if (!this.proxyOf.nodes)
3999
+ this.nodes = [];
3880
4000
  return super.append(...children);
3881
4001
  }
3882
4002
  prepend(...children) {
3883
- if (!this.proxyOf.nodes) this.nodes = [];
4003
+ if (!this.proxyOf.nodes)
4004
+ this.nodes = [];
3884
4005
  return super.prepend(...children);
3885
4006
  }
3886
4007
  };
@@ -3894,7 +4015,8 @@ let Root$5$1 = class Root extends Container$4$1 {
3894
4015
  constructor(defaults) {
3895
4016
  super(defaults);
3896
4017
  this.type = "root";
3897
- if (!this.nodes) this.nodes = [];
4018
+ if (!this.nodes)
4019
+ this.nodes = [];
3898
4020
  }
3899
4021
  normalize(child, sample, type) {
3900
4022
  let nodes = super.normalize(child);
@@ -3965,19 +4087,23 @@ let list$2$1 = {
3965
4087
  } else if (letter === "(") {
3966
4088
  func += 1;
3967
4089
  } else if (letter === ")") {
3968
- if (func > 0) func -= 1;
4090
+ if (func > 0)
4091
+ func -= 1;
3969
4092
  } else if (func === 0) {
3970
- if (separators.includes(letter)) split = true;
4093
+ if (separators.includes(letter))
4094
+ split = true;
3971
4095
  }
3972
4096
  if (split) {
3973
- if (current !== "") array.push(current.trim());
4097
+ if (current !== "")
4098
+ array.push(current.trim());
3974
4099
  current = "";
3975
4100
  split = false;
3976
4101
  } else {
3977
4102
  current += letter;
3978
4103
  }
3979
4104
  }
3980
- if (last || current !== "") array.push(current.trim());
4105
+ if (last || current !== "")
4106
+ array.push(current.trim());
3981
4107
  return array;
3982
4108
  }
3983
4109
  };
@@ -3989,7 +4115,8 @@ let Rule$3$1 = class Rule extends Container$3$1 {
3989
4115
  constructor(defaults) {
3990
4116
  super(defaults);
3991
4117
  this.type = "rule";
3992
- if (!this.nodes) this.nodes = [];
4118
+ if (!this.nodes)
4119
+ this.nodes = [];
3993
4120
  }
3994
4121
  get selectors() {
3995
4122
  return list$1$1.comma(this.selector);
@@ -4017,7 +4144,8 @@ function findLastWithPosition$1(tokens) {
4017
4144
  for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
4018
4145
  let token = tokens[i2];
4019
4146
  let pos = token[3] || token[2];
4020
- if (pos) return pos;
4147
+ if (pos)
4148
+ return pos;
4021
4149
  }
4022
4150
  }
4023
4151
  let Parser$1$1 = class Parser {
@@ -4110,14 +4238,16 @@ let Parser$1$1 = class Parser {
4110
4238
  }
4111
4239
  checkMissedSemicolon(tokens) {
4112
4240
  let colon = this.colon(tokens);
4113
- if (colon === false) return;
4241
+ if (colon === false)
4242
+ return;
4114
4243
  let founded = 0;
4115
4244
  let token;
4116
4245
  for (let j = colon - 1; j >= 0; j--) {
4117
4246
  token = tokens[j];
4118
4247
  if (token[0] !== "space") {
4119
4248
  founded += 1;
4120
- if (founded === 2) break;
4249
+ if (founded === 2)
4250
+ break;
4121
4251
  }
4122
4252
  }
4123
4253
  throw this.input.error(
@@ -4183,7 +4313,8 @@ let Parser$1$1 = class Parser {
4183
4313
  );
4184
4314
  node2.source.end.offset++;
4185
4315
  while (tokens[0][0] !== "word") {
4186
- if (tokens.length === 1) this.unknownWord(tokens);
4316
+ if (tokens.length === 1)
4317
+ this.unknownWord(tokens);
4187
4318
  node2.raws.before += tokens.shift()[1];
4188
4319
  }
4189
4320
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -4217,7 +4348,8 @@ let Parser$1$1 = class Parser {
4217
4348
  let next;
4218
4349
  while (tokens.length) {
4219
4350
  next = tokens[0][0];
4220
- if (next !== "space" && next !== "comment") break;
4351
+ if (next !== "space" && next !== "comment")
4352
+ break;
4221
4353
  firstSpaces.push(tokens.shift());
4222
4354
  }
4223
4355
  this.precheckMissedSemicolon(tokens);
@@ -4227,7 +4359,8 @@ let Parser$1$1 = class Parser {
4227
4359
  node2.important = true;
4228
4360
  let string = this.stringFrom(tokens, i2);
4229
4361
  string = this.spacesFromEnd(tokens) + string;
4230
- if (string !== " !important") node2.raws.important = string;
4362
+ if (string !== " !important")
4363
+ node2.raws.important = string;
4231
4364
  break;
4232
4365
  } else if (token[1].toLowerCase() === "important") {
4233
4366
  let cache = tokens.slice(0);
@@ -4289,7 +4422,8 @@ let Parser$1$1 = class Parser {
4289
4422
  }
4290
4423
  }
4291
4424
  endFile() {
4292
- if (this.current.parent) this.unclosedBlock();
4425
+ if (this.current.parent)
4426
+ this.unclosedBlock();
4293
4427
  if (this.current.nodes && this.current.nodes.length) {
4294
4428
  this.current.raws.semicolon = this.semicolon;
4295
4429
  }
@@ -4323,7 +4457,8 @@ let Parser$1$1 = class Parser {
4323
4457
  };
4324
4458
  node2.raws.before = this.spaces;
4325
4459
  this.spaces = "";
4326
- if (node2.type !== "comment") this.semicolon = false;
4460
+ if (node2.type !== "comment")
4461
+ this.semicolon = false;
4327
4462
  }
4328
4463
  other(start) {
4329
4464
  let end = false;
@@ -4338,10 +4473,12 @@ let Parser$1$1 = class Parser {
4338
4473
  type = token[0];
4339
4474
  tokens.push(token);
4340
4475
  if (type === "(" || type === "[") {
4341
- if (!bracket) bracket = token;
4476
+ if (!bracket)
4477
+ bracket = token;
4342
4478
  brackets.push(type === "(" ? ")" : "]");
4343
4479
  } else if (customProperty && colon && type === "{") {
4344
- if (!bracket) bracket = token;
4480
+ if (!bracket)
4481
+ bracket = token;
4345
4482
  brackets.push("}");
4346
4483
  } else if (brackets.length === 0) {
4347
4484
  if (type === ";") {
@@ -4363,17 +4500,21 @@ let Parser$1$1 = class Parser {
4363
4500
  }
4364
4501
  } else if (type === brackets[brackets.length - 1]) {
4365
4502
  brackets.pop();
4366
- if (brackets.length === 0) bracket = null;
4503
+ if (brackets.length === 0)
4504
+ bracket = null;
4367
4505
  }
4368
4506
  token = this.tokenizer.nextToken();
4369
4507
  }
4370
- if (this.tokenizer.endOfFile()) end = true;
4371
- if (brackets.length > 0) this.unclosedBracket(bracket);
4508
+ if (this.tokenizer.endOfFile())
4509
+ end = true;
4510
+ if (brackets.length > 0)
4511
+ this.unclosedBracket(bracket);
4372
4512
  if (end && colon) {
4373
4513
  if (!customProperty) {
4374
4514
  while (tokens.length) {
4375
4515
  token = tokens[tokens.length - 1][0];
4376
- if (token !== "space" && token !== "comment") break;
4516
+ if (token !== "space" && token !== "comment")
4517
+ break;
4377
4518
  this.tokenizer.back(tokens.pop());
4378
4519
  }
4379
4520
  }
@@ -4460,7 +4601,8 @@ let Parser$1$1 = class Parser {
4460
4601
  let spaces = "";
4461
4602
  while (tokens.length) {
4462
4603
  lastTokenType = tokens[tokens.length - 1][0];
4463
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
4604
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
4605
+ break;
4464
4606
  spaces = tokens.pop()[1] + spaces;
4465
4607
  }
4466
4608
  return spaces;
@@ -4471,7 +4613,8 @@ let Parser$1$1 = class Parser {
4471
4613
  let spaces = "";
4472
4614
  while (tokens.length) {
4473
4615
  next = tokens[0][0];
4474
- if (next !== "space" && next !== "comment") break;
4616
+ if (next !== "space" && next !== "comment")
4617
+ break;
4475
4618
  spaces += tokens.shift()[1];
4476
4619
  }
4477
4620
  return spaces;
@@ -4481,7 +4624,8 @@ let Parser$1$1 = class Parser {
4481
4624
  let spaces = "";
4482
4625
  while (tokens.length) {
4483
4626
  lastTokenType = tokens[tokens.length - 1][0];
4484
- if (lastTokenType !== "space") break;
4627
+ if (lastTokenType !== "space")
4628
+ break;
4485
4629
  spaces = tokens.pop()[1] + spaces;
4486
4630
  }
4487
4631
  return spaces;
@@ -4643,7 +4787,8 @@ function toStack$1(node2) {
4643
4787
  }
4644
4788
  function cleanMarks$1(node2) {
4645
4789
  node2[isClean$3] = false;
4646
- if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks$1(i2));
4790
+ if (node2.nodes)
4791
+ node2.nodes.forEach((i2) => cleanMarks$1(i2));
4647
4792
  return node2;
4648
4793
  }
4649
4794
  let postcss$2$1 = {};
@@ -4657,15 +4802,20 @@ let LazyResult$2$1 = class LazyResult {
4657
4802
  } else if (css instanceof LazyResult || css instanceof Result$2$1) {
4658
4803
  root2 = cleanMarks$1(css.root);
4659
4804
  if (css.map) {
4660
- if (typeof opts.map === "undefined") opts.map = {};
4661
- if (!opts.map.inline) opts.map.inline = false;
4805
+ if (typeof opts.map === "undefined")
4806
+ opts.map = {};
4807
+ if (!opts.map.inline)
4808
+ opts.map.inline = false;
4662
4809
  opts.map.prev = css.map;
4663
4810
  }
4664
4811
  } else {
4665
4812
  let parser2 = parse$2$1;
4666
- if (opts.syntax) parser2 = opts.syntax.parse;
4667
- if (opts.parser) parser2 = opts.parser;
4668
- if (parser2.parse) parser2 = parser2.parse;
4813
+ if (opts.syntax)
4814
+ parser2 = opts.syntax.parse;
4815
+ if (opts.parser)
4816
+ parser2 = opts.parser;
4817
+ if (parser2.parse)
4818
+ parser2 = parser2.parse;
4669
4819
  try {
4670
4820
  root2 = parser2(css, opts);
4671
4821
  } catch (error) {
@@ -4687,8 +4837,10 @@ let LazyResult$2$1 = class LazyResult {
4687
4837
  });
4688
4838
  }
4689
4839
  async() {
4690
- if (this.error) return Promise.reject(this.error);
4691
- if (this.processed) return Promise.resolve(this.result);
4840
+ if (this.error)
4841
+ return Promise.reject(this.error);
4842
+ if (this.processed)
4843
+ return Promise.resolve(this.result);
4692
4844
  if (!this.processing) {
4693
4845
  this.processing = this.runAsync();
4694
4846
  }
@@ -4706,7 +4858,8 @@ let LazyResult$2$1 = class LazyResult {
4706
4858
  handleError(error, node2) {
4707
4859
  let plugin22 = this.result.lastPlugin;
4708
4860
  try {
4709
- if (node2) node2.addToError(error);
4861
+ if (node2)
4862
+ node2.addToError(error);
4710
4863
  this.error = error;
4711
4864
  if (error.name === "CssSyntaxError" && !error.plugin) {
4712
4865
  error.plugin = plugin22.postcssPlugin;
@@ -4726,14 +4879,16 @@ let LazyResult$2$1 = class LazyResult {
4726
4879
  }
4727
4880
  }
4728
4881
  } catch (err) {
4729
- if (console && console.error) console.error(err);
4882
+ if (console && console.error)
4883
+ console.error(err);
4730
4884
  }
4731
4885
  return error;
4732
4886
  }
4733
4887
  prepareVisitors() {
4734
4888
  this.listeners = {};
4735
4889
  let add = (plugin22, type, cb) => {
4736
- if (!this.listeners[type]) this.listeners[type] = [];
4890
+ if (!this.listeners[type])
4891
+ this.listeners[type] = [];
4737
4892
  this.listeners[type].push([plugin22, cb]);
4738
4893
  };
4739
4894
  for (let plugin22 of this.plugins) {
@@ -4840,15 +4995,20 @@ let LazyResult$2$1 = class LazyResult {
4840
4995
  }
4841
4996
  }
4842
4997
  stringify() {
4843
- if (this.error) throw this.error;
4844
- if (this.stringified) return this.result;
4998
+ if (this.error)
4999
+ throw this.error;
5000
+ if (this.stringified)
5001
+ return this.result;
4845
5002
  this.stringified = true;
4846
5003
  this.sync();
4847
5004
  let opts = this.result.opts;
4848
5005
  let str = stringify$2$1;
4849
- if (opts.syntax) str = opts.syntax.stringify;
4850
- if (opts.stringifier) str = opts.stringifier;
4851
- if (str.stringify) str = str.stringify;
5006
+ if (opts.syntax)
5007
+ str = opts.syntax.stringify;
5008
+ if (opts.stringifier)
5009
+ str = opts.stringifier;
5010
+ if (str.stringify)
5011
+ str = str.stringify;
4852
5012
  let map = new MapGenerator$1$1(str, this.result.root, this.result.opts);
4853
5013
  let data = map.generate();
4854
5014
  this.result.css = data[0];
@@ -4856,8 +5016,10 @@ let LazyResult$2$1 = class LazyResult {
4856
5016
  return this.result;
4857
5017
  }
4858
5018
  sync() {
4859
- if (this.error) throw this.error;
4860
- if (this.processed) return this.result;
5019
+ if (this.error)
5020
+ throw this.error;
5021
+ if (this.processed)
5022
+ return this.result;
4861
5023
  this.processed = true;
4862
5024
  if (this.processing) {
4863
5025
  throw this.getAsyncError();
@@ -4976,13 +5138,15 @@ let LazyResult$2$1 = class LazyResult {
4976
5138
  if (event === CHILDREN$1) {
4977
5139
  if (node2.nodes) {
4978
5140
  node2.each((child) => {
4979
- if (!child[isClean$3]) this.walkSync(child);
5141
+ if (!child[isClean$3])
5142
+ this.walkSync(child);
4980
5143
  });
4981
5144
  }
4982
5145
  } else {
4983
5146
  let visitors = this.listeners[event];
4984
5147
  if (visitors) {
4985
- if (this.visitSync(visitors, node2.toProxy())) return;
5148
+ if (this.visitSync(visitors, node2.toProxy()))
5149
+ return;
4986
5150
  }
4987
5151
  }
4988
5152
  }
@@ -5060,7 +5224,8 @@ let NoWorkResult$1$1 = class NoWorkResult {
5060
5224
  }
5061
5225
  }
5062
5226
  async() {
5063
- if (this.error) return Promise.reject(this.error);
5227
+ if (this.error)
5228
+ return Promise.reject(this.error);
5064
5229
  return Promise.resolve(this.result);
5065
5230
  }
5066
5231
  catch(onRejected) {
@@ -5070,7 +5235,8 @@ let NoWorkResult$1$1 = class NoWorkResult {
5070
5235
  return this.async().then(onFinally, onFinally);
5071
5236
  }
5072
5237
  sync() {
5073
- if (this.error) throw this.error;
5238
+ if (this.error)
5239
+ throw this.error;
5074
5240
  return this.result;
5075
5241
  }
5076
5242
  then(onFulfilled, onRejected) {
@@ -5190,7 +5356,8 @@ let Input$1$1 = input$1;
5190
5356
  let Root$1$1 = root$1;
5191
5357
  let Rule$1$1 = rule$1;
5192
5358
  function fromJSON$1$1(json, inputs) {
5193
- if (Array.isArray(json)) return json.map((n2) => fromJSON$1$1(n2));
5359
+ if (Array.isArray(json))
5360
+ return json.map((n2) => fromJSON$1$1(n2));
5194
5361
  let _a2 = json, { inputs: ownInputs } = _a2, defaults = __objRest(_a2, ["inputs"]);
5195
5362
  if (ownInputs) {
5196
5363
  inputs = [];
@@ -5276,7 +5443,8 @@ postcss$3.plugin = function plugin(name, initializer) {
5276
5443
  let cache;
5277
5444
  Object.defineProperty(creator, "postcss", {
5278
5445
  get() {
5279
- if (!cache) cache = creator();
5446
+ if (!cache)
5447
+ cache = creator();
5280
5448
  return cache;
5281
5449
  }
5282
5450
  });
@@ -5422,7 +5590,8 @@ function getDefaultExportFromCjs(x2) {
5422
5590
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5423
5591
  }
5424
5592
  function getAugmentedNamespace(n2) {
5425
- if (n2.__esModule) return n2;
5593
+ if (n2.__esModule)
5594
+ return n2;
5426
5595
  var f2 = n2.default;
5427
5596
  if (typeof f2 == "function") {
5428
5597
  var a2 = function a22() {
@@ -5432,7 +5601,8 @@ function getAugmentedNamespace(n2) {
5432
5601
  return f2.apply(this, arguments);
5433
5602
  };
5434
5603
  a2.prototype = f2.prototype;
5435
- } else a2 = {};
5604
+ } else
5605
+ a2 = {};
5436
5606
  Object.defineProperty(a2, "__esModule", { value: true });
5437
5607
  Object.keys(n2).forEach(function(k) {
5438
5608
  var d = Object.getOwnPropertyDescriptor(n2, k);
@@ -5500,11 +5670,14 @@ let CssSyntaxError$3 = class CssSyntaxError2 extends Error {
5500
5670
  this.message += ": " + this.reason;
5501
5671
  }
5502
5672
  showSourceCode(color) {
5503
- if (!this.source) return "";
5673
+ if (!this.source)
5674
+ return "";
5504
5675
  let css = this.source;
5505
- if (color == null) color = pico.isColorSupported;
5676
+ if (color == null)
5677
+ color = pico.isColorSupported;
5506
5678
  if (terminalHighlight$1) {
5507
- if (color) css = terminalHighlight$1(css);
5679
+ if (color)
5680
+ css = terminalHighlight$1(css);
5508
5681
  }
5509
5682
  let lines = css.split(/\r?\n/);
5510
5683
  let start = Math.max(this.line - 3, 0);
@@ -5597,7 +5770,8 @@ let Stringifier$2 = class Stringifier2 {
5597
5770
  if (value.includes("\n")) {
5598
5771
  let indent = this.raw(node2, null, "indent");
5599
5772
  if (indent.length) {
5600
- for (let step = 0; step < depth; step++) value += indent;
5773
+ for (let step = 0; step < depth; step++)
5774
+ value += indent;
5601
5775
  }
5602
5776
  }
5603
5777
  return value;
@@ -5612,20 +5786,23 @@ let Stringifier$2 = class Stringifier2 {
5612
5786
  } else {
5613
5787
  after = this.raw(node2, "after", "emptyBody");
5614
5788
  }
5615
- if (after) this.builder(after);
5789
+ if (after)
5790
+ this.builder(after);
5616
5791
  this.builder("}", node2, "end");
5617
5792
  }
5618
5793
  body(node2) {
5619
5794
  let last = node2.nodes.length - 1;
5620
5795
  while (last > 0) {
5621
- if (node2.nodes[last].type !== "comment") break;
5796
+ if (node2.nodes[last].type !== "comment")
5797
+ break;
5622
5798
  last -= 1;
5623
5799
  }
5624
5800
  let semicolon = this.raw(node2, "semicolon");
5625
5801
  for (let i2 = 0; i2 < node2.nodes.length; i2++) {
5626
5802
  let child = node2.nodes[i2];
5627
5803
  let before = this.raw(child, "before");
5628
- if (before) this.builder(before);
5804
+ if (before)
5805
+ this.builder(before);
5629
5806
  this.stringify(child, last !== i2 || semicolon);
5630
5807
  }
5631
5808
  }
@@ -5640,7 +5817,8 @@ let Stringifier$2 = class Stringifier2 {
5640
5817
  if (node2.important) {
5641
5818
  string += node2.raws.important || " !important";
5642
5819
  }
5643
- if (semicolon) string += ";";
5820
+ if (semicolon)
5821
+ string += ";";
5644
5822
  this.builder(string, node2);
5645
5823
  }
5646
5824
  document(node2) {
@@ -5648,10 +5826,12 @@ let Stringifier$2 = class Stringifier2 {
5648
5826
  }
5649
5827
  raw(node2, own, detect) {
5650
5828
  let value;
5651
- if (!detect) detect = own;
5829
+ if (!detect)
5830
+ detect = own;
5652
5831
  if (own) {
5653
5832
  value = node2.raws[own];
5654
- if (typeof value !== "undefined") return value;
5833
+ if (typeof value !== "undefined")
5834
+ return value;
5655
5835
  }
5656
5836
  let parent = node2.parent;
5657
5837
  if (detect === "before") {
@@ -5662,9 +5842,11 @@ let Stringifier$2 = class Stringifier2 {
5662
5842
  return "";
5663
5843
  }
5664
5844
  }
5665
- if (!parent) return DEFAULT_RAW[detect];
5845
+ if (!parent)
5846
+ return DEFAULT_RAW[detect];
5666
5847
  let root2 = node2.root();
5667
- if (!root2.rawCache) root2.rawCache = {};
5848
+ if (!root2.rawCache)
5849
+ root2.rawCache = {};
5668
5850
  if (typeof root2.rawCache[detect] !== "undefined") {
5669
5851
  return root2.rawCache[detect];
5670
5852
  }
@@ -5677,11 +5859,13 @@ let Stringifier$2 = class Stringifier2 {
5677
5859
  } else {
5678
5860
  root2.walk((i2) => {
5679
5861
  value = i2.raws[own];
5680
- if (typeof value !== "undefined") return false;
5862
+ if (typeof value !== "undefined")
5863
+ return false;
5681
5864
  });
5682
5865
  }
5683
5866
  }
5684
- if (typeof value === "undefined") value = DEFAULT_RAW[detect];
5867
+ if (typeof value === "undefined")
5868
+ value = DEFAULT_RAW[detect];
5685
5869
  root2.rawCache[detect] = value;
5686
5870
  return value;
5687
5871
  }
@@ -5698,7 +5882,8 @@ let Stringifier$2 = class Stringifier2 {
5698
5882
  }
5699
5883
  }
5700
5884
  });
5701
- if (value) value = value.replace(/\S/g, "");
5885
+ if (value)
5886
+ value = value.replace(/\S/g, "");
5702
5887
  return value;
5703
5888
  }
5704
5889
  rawBeforeComment(root2, node2) {
@@ -5742,7 +5927,8 @@ let Stringifier$2 = class Stringifier2 {
5742
5927
  root2.walk((i2) => {
5743
5928
  if (i2.type !== "decl") {
5744
5929
  value = i2.raws.between;
5745
- if (typeof value !== "undefined") return false;
5930
+ if (typeof value !== "undefined")
5931
+ return false;
5746
5932
  }
5747
5933
  });
5748
5934
  return value;
@@ -5760,7 +5946,8 @@ let Stringifier$2 = class Stringifier2 {
5760
5946
  }
5761
5947
  }
5762
5948
  });
5763
- if (value) value = value.replace(/\S/g, "");
5949
+ if (value)
5950
+ value = value.replace(/\S/g, "");
5764
5951
  return value;
5765
5952
  }
5766
5953
  rawColon(root2) {
@@ -5778,13 +5965,15 @@ let Stringifier$2 = class Stringifier2 {
5778
5965
  root2.walk((i2) => {
5779
5966
  if (i2.nodes && i2.nodes.length === 0) {
5780
5967
  value = i2.raws.after;
5781
- if (typeof value !== "undefined") return false;
5968
+ if (typeof value !== "undefined")
5969
+ return false;
5782
5970
  }
5783
5971
  });
5784
5972
  return value;
5785
5973
  }
5786
5974
  rawIndent(root2) {
5787
- if (root2.raws.indent) return root2.raws.indent;
5975
+ if (root2.raws.indent)
5976
+ return root2.raws.indent;
5788
5977
  let value;
5789
5978
  root2.walk((i2) => {
5790
5979
  let p = i2.parent;
@@ -5804,7 +5993,8 @@ let Stringifier$2 = class Stringifier2 {
5804
5993
  root2.walk((i2) => {
5805
5994
  if (i2.nodes && i2.nodes.length && i2.last.type === "decl") {
5806
5995
  value = i2.raws.semicolon;
5807
- if (typeof value !== "undefined") return false;
5996
+ if (typeof value !== "undefined")
5997
+ return false;
5808
5998
  }
5809
5999
  });
5810
6000
  return value;
@@ -5819,7 +6009,8 @@ let Stringifier$2 = class Stringifier2 {
5819
6009
  }
5820
6010
  root(node2) {
5821
6011
  this.body(node2);
5822
- if (node2.raws.after) this.builder(node2.raws.after);
6012
+ if (node2.raws.after)
6013
+ this.builder(node2.raws.after);
5823
6014
  }
5824
6015
  rule(node2) {
5825
6016
  this.block(node2, this.rawValue(node2, "selector"));
@@ -5855,17 +6046,20 @@ function cloneNode(obj, parent) {
5855
6046
  if (!Object.prototype.hasOwnProperty.call(obj, i2)) {
5856
6047
  continue;
5857
6048
  }
5858
- if (i2 === "proxyCache") continue;
6049
+ if (i2 === "proxyCache")
6050
+ continue;
5859
6051
  let value = obj[i2];
5860
6052
  let type = typeof value;
5861
6053
  if (i2 === "parent" && type === "object") {
5862
- if (parent) cloned[i2] = parent;
6054
+ if (parent)
6055
+ cloned[i2] = parent;
5863
6056
  } else if (i2 === "source") {
5864
6057
  cloned[i2] = value;
5865
6058
  } else if (Array.isArray(value)) {
5866
6059
  cloned[i2] = value.map((j) => cloneNode(j, cloned));
5867
6060
  } else {
5868
- if (type === "object" && value !== null) value = cloneNode(value);
6061
+ if (type === "object" && value !== null)
6062
+ value = cloneNode(value);
5869
6063
  cloned[i2] = value;
5870
6064
  }
5871
6065
  }
@@ -5919,7 +6113,8 @@ let Node$5 = class Node22 {
5919
6113
  cleanRaws(keepBetween) {
5920
6114
  delete this.raws.before;
5921
6115
  delete this.raws.after;
5922
- if (!keepBetween) delete this.raws.between;
6116
+ if (!keepBetween)
6117
+ delete this.raws.between;
5923
6118
  }
5924
6119
  clone(overrides = {}) {
5925
6120
  let cloned = cloneNode(this);
@@ -5962,7 +6157,8 @@ let Node$5 = class Node22 {
5962
6157
  }
5963
6158
  },
5964
6159
  set(node2, prop, value) {
5965
- if (node2[prop] === value) return true;
6160
+ if (node2[prop] === value)
6161
+ return true;
5966
6162
  node2[prop] = value;
5967
6163
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
5968
6164
  prop === "text") {
@@ -5982,7 +6178,8 @@ let Node$5 = class Node22 {
5982
6178
  }
5983
6179
  }
5984
6180
  next() {
5985
- if (!this.parent) return void 0;
6181
+ if (!this.parent)
6182
+ return void 0;
5986
6183
  let index2 = this.parent.index(this);
5987
6184
  return this.parent.nodes[index2 + 1];
5988
6185
  }
@@ -5993,7 +6190,8 @@ let Node$5 = class Node22 {
5993
6190
  } else if (opts.word) {
5994
6191
  stringRepresentation = this.toString();
5995
6192
  let index2 = stringRepresentation.indexOf(opts.word);
5996
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
6193
+ if (index2 !== -1)
6194
+ pos = this.positionInside(index2, stringRepresentation);
5997
6195
  }
5998
6196
  return pos;
5999
6197
  }
@@ -6012,7 +6210,8 @@ let Node$5 = class Node22 {
6012
6210
  return { column, line };
6013
6211
  }
6014
6212
  prev() {
6015
- if (!this.parent) return void 0;
6213
+ if (!this.parent)
6214
+ return void 0;
6016
6215
  let index2 = this.parent.index(this);
6017
6216
  return this.parent.nodes[index2 - 1];
6018
6217
  }
@@ -6107,7 +6306,8 @@ let Node$5 = class Node22 {
6107
6306
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
6108
6307
  continue;
6109
6308
  }
6110
- if (name === "parent" || name === "proxyCache") continue;
6309
+ if (name === "parent" || name === "proxyCache")
6310
+ continue;
6111
6311
  let value = this[name];
6112
6312
  if (Array.isArray(value)) {
6113
6313
  fixed[name] = value.map((i2) => {
@@ -6147,7 +6347,8 @@ let Node$5 = class Node22 {
6147
6347
  return this.proxyCache;
6148
6348
  }
6149
6349
  toString(stringifier2 = stringify$3) {
6150
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
6350
+ if (stringifier2.stringify)
6351
+ stringifier2 = stringifier2.stringify;
6151
6352
  let result2 = "";
6152
6353
  stringifier2(this, (i2) => {
6153
6354
  result2 += i2;
@@ -6156,7 +6357,8 @@ let Node$5 = class Node22 {
6156
6357
  }
6157
6358
  warn(result2, text, opts) {
6158
6359
  let data = { node: this };
6159
- for (let i2 in opts) data[i2] = opts[i2];
6360
+ for (let i2 in opts)
6361
+ data[i2] = opts[i2];
6160
6362
  return result2.warn(text, data);
6161
6363
  }
6162
6364
  get proxyOf() {
@@ -6212,7 +6414,8 @@ function fromBase64(str) {
6212
6414
  }
6213
6415
  let PreviousMap$2 = class PreviousMap2 {
6214
6416
  constructor(css, opts) {
6215
- if (opts.map === false) return;
6417
+ if (opts.map === false)
6418
+ return;
6216
6419
  this.loadAnnotation(css);
6217
6420
  this.inline = this.startWith(this.annotation, "data:");
6218
6421
  let prev = opts.map ? opts.map.prev : void 0;
@@ -6220,8 +6423,10 @@ let PreviousMap$2 = class PreviousMap2 {
6220
6423
  if (!this.mapFile && opts.from) {
6221
6424
  this.mapFile = opts.from;
6222
6425
  }
6223
- if (this.mapFile) this.root = dirname$1(this.mapFile);
6224
- if (text) this.text = text;
6426
+ if (this.mapFile)
6427
+ this.root = dirname$1(this.mapFile);
6428
+ if (text)
6429
+ this.text = text;
6225
6430
  }
6226
6431
  consumer() {
6227
6432
  if (!this.consumerCache) {
@@ -6247,12 +6452,14 @@ let PreviousMap$2 = class PreviousMap2 {
6247
6452
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
6248
6453
  }
6249
6454
  isMap(map) {
6250
- if (typeof map !== "object") return false;
6455
+ if (typeof map !== "object")
6456
+ return false;
6251
6457
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
6252
6458
  }
6253
6459
  loadAnnotation(css) {
6254
6460
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
6255
- if (!comments) return;
6461
+ if (!comments)
6462
+ return;
6256
6463
  let start = css.lastIndexOf(comments.pop());
6257
6464
  let end = css.indexOf("*/", start);
6258
6465
  if (start > -1 && end > -1) {
@@ -6267,7 +6474,8 @@ let PreviousMap$2 = class PreviousMap2 {
6267
6474
  }
6268
6475
  }
6269
6476
  loadMap(file, prev) {
6270
- if (prev === false) return false;
6477
+ if (prev === false)
6478
+ return false;
6271
6479
  if (prev) {
6272
6480
  if (typeof prev === "string") {
6273
6481
  return prev;
@@ -6297,12 +6505,14 @@ let PreviousMap$2 = class PreviousMap2 {
6297
6505
  return this.decodeInline(this.annotation);
6298
6506
  } else if (this.annotation) {
6299
6507
  let map = this.annotation;
6300
- if (file) map = join(dirname$1(file), map);
6508
+ if (file)
6509
+ map = join(dirname$1(file), map);
6301
6510
  return this.loadFile(map);
6302
6511
  }
6303
6512
  }
6304
6513
  startWith(string, start) {
6305
- if (!string) return false;
6514
+ if (!string)
6515
+ return false;
6306
6516
  return string.substr(0, start.length) === start;
6307
6517
  }
6308
6518
  withContent() {
@@ -6345,13 +6555,15 @@ let Input$4 = class Input2 {
6345
6555
  if (map.text) {
6346
6556
  this.map = map;
6347
6557
  let file = map.consumer().file;
6348
- if (!this.file && file) this.file = this.mapResolve(file);
6558
+ if (!this.file && file)
6559
+ this.file = this.mapResolve(file);
6349
6560
  }
6350
6561
  }
6351
6562
  if (!this.file) {
6352
6563
  this.id = "<input css " + nanoid(6) + ">";
6353
6564
  }
6354
- if (this.map) this.map.file = this.from;
6565
+ if (this.map)
6566
+ this.map.file = this.from;
6355
6567
  }
6356
6568
  error(message, line, column, opts = {}) {
6357
6569
  let result2, endLine, endColumn;
@@ -6453,10 +6665,12 @@ let Input$4 = class Input2 {
6453
6665
  return resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
6454
6666
  }
6455
6667
  origin(line, column, endLine, endColumn) {
6456
- if (!this.map) return false;
6668
+ if (!this.map)
6669
+ return false;
6457
6670
  let consumer = this.map.consumer();
6458
6671
  let from = consumer.originalPositionFor({ column, line });
6459
- if (!from.source) return false;
6672
+ if (!from.source)
6673
+ return false;
6460
6674
  let to;
6461
6675
  if (typeof endLine === "number") {
6462
6676
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -6485,7 +6699,8 @@ let Input$4 = class Input2 {
6485
6699
  }
6486
6700
  }
6487
6701
  let source = consumer.sourceContentFor(from.source);
6488
- if (source) result2.source = source;
6702
+ if (source)
6703
+ result2.source = source;
6489
6704
  return result2;
6490
6705
  }
6491
6706
  toJSON() {
@@ -6543,7 +6758,8 @@ let MapGenerator$2 = class MapGenerator2 {
6543
6758
  content = this.outputFile() + ".map";
6544
6759
  }
6545
6760
  let eol = "\n";
6546
- if (this.css.includes("\r\n")) eol = "\r\n";
6761
+ if (this.css.includes("\r\n"))
6762
+ eol = "\r\n";
6547
6763
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
6548
6764
  }
6549
6765
  applyPrevMaps() {
@@ -6563,12 +6779,14 @@ let MapGenerator$2 = class MapGenerator2 {
6563
6779
  }
6564
6780
  }
6565
6781
  clearAnnotation() {
6566
- if (this.mapOpts.annotation === false) return;
6782
+ if (this.mapOpts.annotation === false)
6783
+ return;
6567
6784
  if (this.root) {
6568
6785
  let node2;
6569
6786
  for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {
6570
6787
  node2 = this.root.nodes[i2];
6571
- if (node2.type !== "comment") continue;
6788
+ if (node2.type !== "comment")
6789
+ continue;
6572
6790
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
6573
6791
  this.root.removeChild(i2);
6574
6792
  }
@@ -6609,9 +6827,12 @@ let MapGenerator$2 = class MapGenerator2 {
6609
6827
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
6610
6828
  });
6611
6829
  }
6612
- if (this.isSourcesContent()) this.setSourcesContent();
6613
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
6614
- if (this.isAnnotation()) this.addAnnotation();
6830
+ if (this.isSourcesContent())
6831
+ this.setSourcesContent();
6832
+ if (this.root && this.previous().length > 0)
6833
+ this.applyPrevMaps();
6834
+ if (this.isAnnotation())
6835
+ this.addAnnotation();
6615
6836
  if (this.isInline()) {
6616
6837
  return [this.css];
6617
6838
  } else {
@@ -6731,11 +6952,15 @@ let MapGenerator$2 = class MapGenerator2 {
6731
6952
  }
6732
6953
  }
6733
6954
  path(file) {
6734
- if (this.mapOpts.absolute) return file;
6735
- if (file.charCodeAt(0) === 60) return file;
6736
- if (/^\w+:\/\//.test(file)) return file;
6955
+ if (this.mapOpts.absolute)
6956
+ return file;
6957
+ if (file.charCodeAt(0) === 60)
6958
+ return file;
6959
+ if (/^\w+:\/\//.test(file))
6960
+ return file;
6737
6961
  let cached = this.memoizedPaths.get(file);
6738
- if (cached) return cached;
6962
+ if (cached)
6963
+ return cached;
6739
6964
  let from = this.opts.to ? dirname(this.opts.to) : ".";
6740
6965
  if (typeof this.mapOpts.annotation === "string") {
6741
6966
  from = dirname(resolve(from, this.mapOpts.annotation));
@@ -6758,7 +6983,8 @@ let MapGenerator$2 = class MapGenerator2 {
6758
6983
  });
6759
6984
  } else {
6760
6985
  let input2 = new Input$3(this.originalCSS, this.opts);
6761
- if (input2.map) this.previousMaps.push(input2.map);
6986
+ if (input2.map)
6987
+ this.previousMaps.push(input2.map);
6762
6988
  }
6763
6989
  }
6764
6990
  return this.previousMaps;
@@ -6799,7 +7025,8 @@ let MapGenerator$2 = class MapGenerator2 {
6799
7025
  }
6800
7026
  toFileUrl(path) {
6801
7027
  let cached = this.memoizedFileURLs.get(path);
6802
- if (cached) return cached;
7028
+ if (cached)
7029
+ return cached;
6803
7030
  if (pathToFileURL) {
6804
7031
  let fileURL = pathToFileURL(path).toString();
6805
7032
  this.memoizedFileURLs.set(path, fileURL);
@@ -6812,7 +7039,8 @@ let MapGenerator$2 = class MapGenerator2 {
6812
7039
  }
6813
7040
  toUrl(path) {
6814
7041
  let cached = this.memoizedURLs.get(path);
6815
- if (cached) return cached;
7042
+ if (cached)
7043
+ return cached;
6816
7044
  if (sep === "\\") {
6817
7045
  path = path.replace(/\\/g, "/");
6818
7046
  }
@@ -6841,7 +7069,8 @@ let AtRule$4;
6841
7069
  let Root$6;
6842
7070
  function cleanSource(nodes) {
6843
7071
  return nodes.map((i2) => {
6844
- if (i2.nodes) i2.nodes = cleanSource(i2.nodes);
7072
+ if (i2.nodes)
7073
+ i2.nodes = cleanSource(i2.nodes);
6845
7074
  delete i2.source;
6846
7075
  return i2;
6847
7076
  });
@@ -6858,7 +7087,8 @@ let Container$7 = class Container2 extends Node$2 {
6858
7087
  append(...children) {
6859
7088
  for (let child of children) {
6860
7089
  let nodes = this.normalize(child, this.last);
6861
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
7090
+ for (let node2 of nodes)
7091
+ this.proxyOf.nodes.push(node2);
6862
7092
  }
6863
7093
  this.markDirty();
6864
7094
  return this;
@@ -6866,17 +7096,20 @@ let Container$7 = class Container2 extends Node$2 {
6866
7096
  cleanRaws(keepBetween) {
6867
7097
  super.cleanRaws(keepBetween);
6868
7098
  if (this.nodes) {
6869
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
7099
+ for (let node2 of this.nodes)
7100
+ node2.cleanRaws(keepBetween);
6870
7101
  }
6871
7102
  }
6872
7103
  each(callback) {
6873
- if (!this.proxyOf.nodes) return void 0;
7104
+ if (!this.proxyOf.nodes)
7105
+ return void 0;
6874
7106
  let iterator = this.getIterator();
6875
7107
  let index2, result2;
6876
7108
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
6877
7109
  index2 = this.indexes[iterator];
6878
7110
  result2 = callback(this.proxyOf.nodes[index2], index2);
6879
- if (result2 === false) break;
7111
+ if (result2 === false)
7112
+ break;
6880
7113
  this.indexes[iterator] += 1;
6881
7114
  }
6882
7115
  delete this.indexes[iterator];
@@ -6886,8 +7119,10 @@ let Container$7 = class Container2 extends Node$2 {
6886
7119
  return this.nodes.every(condition);
6887
7120
  }
6888
7121
  getIterator() {
6889
- if (!this.lastEach) this.lastEach = 0;
6890
- if (!this.indexes) this.indexes = {};
7122
+ if (!this.lastEach)
7123
+ this.lastEach = 0;
7124
+ if (!this.indexes)
7125
+ this.indexes = {};
6891
7126
  this.lastEach += 1;
6892
7127
  let iterator = this.lastEach;
6893
7128
  this.indexes[iterator] = 0;
@@ -6929,7 +7164,8 @@ let Container$7 = class Container2 extends Node$2 {
6929
7164
  }
6930
7165
  },
6931
7166
  set(node2, prop, value) {
6932
- if (node2[prop] === value) return true;
7167
+ if (node2[prop] === value)
7168
+ return true;
6933
7169
  node2[prop] = value;
6934
7170
  if (prop === "name" || prop === "params" || prop === "selector") {
6935
7171
  node2.markDirty();
@@ -6939,15 +7175,18 @@ let Container$7 = class Container2 extends Node$2 {
6939
7175
  };
6940
7176
  }
6941
7177
  index(child) {
6942
- if (typeof child === "number") return child;
6943
- if (child.proxyOf) child = child.proxyOf;
7178
+ if (typeof child === "number")
7179
+ return child;
7180
+ if (child.proxyOf)
7181
+ child = child.proxyOf;
6944
7182
  return this.proxyOf.nodes.indexOf(child);
6945
7183
  }
6946
7184
  insertAfter(exist, add) {
6947
7185
  let existIndex = this.index(exist);
6948
7186
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
6949
7187
  existIndex = this.index(exist);
6950
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
7188
+ for (let node2 of nodes)
7189
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
6951
7190
  let index2;
6952
7191
  for (let id in this.indexes) {
6953
7192
  index2 = this.indexes[id];
@@ -6963,7 +7202,8 @@ let Container$7 = class Container2 extends Node$2 {
6963
7202
  let type = existIndex === 0 ? "prepend" : false;
6964
7203
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
6965
7204
  existIndex = this.index(exist);
6966
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
7205
+ for (let node2 of nodes)
7206
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
6967
7207
  let index2;
6968
7208
  for (let id in this.indexes) {
6969
7209
  index2 = this.indexes[id];
@@ -6982,12 +7222,14 @@ let Container$7 = class Container2 extends Node$2 {
6982
7222
  } else if (Array.isArray(nodes)) {
6983
7223
  nodes = nodes.slice(0);
6984
7224
  for (let i2 of nodes) {
6985
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
7225
+ if (i2.parent)
7226
+ i2.parent.removeChild(i2, "ignore");
6986
7227
  }
6987
7228
  } else if (nodes.type === "root" && this.type !== "document") {
6988
7229
  nodes = nodes.nodes.slice(0);
6989
7230
  for (let i2 of nodes) {
6990
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
7231
+ if (i2.parent)
7232
+ i2.parent.removeChild(i2, "ignore");
6991
7233
  }
6992
7234
  } else if (nodes.type) {
6993
7235
  nodes = [nodes];
@@ -7008,10 +7250,13 @@ let Container$7 = class Container2 extends Node$2 {
7008
7250
  throw new Error("Unknown node type in node creation");
7009
7251
  }
7010
7252
  let processed = nodes.map((i2) => {
7011
- if (!i2[my$1]) Container2.rebuild(i2);
7253
+ if (!i2[my$1])
7254
+ Container2.rebuild(i2);
7012
7255
  i2 = i2.proxyOf;
7013
- if (i2.parent) i2.parent.removeChild(i2);
7014
- if (i2[isClean$1]) markDirtyUp(i2);
7256
+ if (i2.parent)
7257
+ i2.parent.removeChild(i2);
7258
+ if (i2[isClean$1])
7259
+ markDirtyUp(i2);
7015
7260
  if (typeof i2.raws.before === "undefined") {
7016
7261
  if (sample && typeof sample.raws.before !== "undefined") {
7017
7262
  i2.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -7026,7 +7271,8 @@ let Container$7 = class Container2 extends Node$2 {
7026
7271
  children = children.reverse();
7027
7272
  for (let child of children) {
7028
7273
  let nodes = this.normalize(child, this.first, "prepend").reverse();
7029
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
7274
+ for (let node2 of nodes)
7275
+ this.proxyOf.nodes.unshift(node2);
7030
7276
  for (let id in this.indexes) {
7031
7277
  this.indexes[id] = this.indexes[id] + nodes.length;
7032
7278
  }
@@ -7040,7 +7286,8 @@ let Container$7 = class Container2 extends Node$2 {
7040
7286
  return this;
7041
7287
  }
7042
7288
  removeAll() {
7043
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
7289
+ for (let node2 of this.proxyOf.nodes)
7290
+ node2.parent = void 0;
7044
7291
  this.proxyOf.nodes = [];
7045
7292
  this.markDirty();
7046
7293
  return this;
@@ -7065,8 +7312,10 @@ let Container$7 = class Container2 extends Node$2 {
7065
7312
  opts = {};
7066
7313
  }
7067
7314
  this.walkDecls((decl) => {
7068
- if (opts.props && !opts.props.includes(decl.prop)) return;
7069
- if (opts.fast && !decl.value.includes(opts.fast)) return;
7315
+ if (opts.props && !opts.props.includes(decl.prop))
7316
+ return;
7317
+ if (opts.fast && !decl.value.includes(opts.fast))
7318
+ return;
7070
7319
  decl.value = decl.value.replace(pattern, callback);
7071
7320
  });
7072
7321
  this.markDirty();
@@ -7163,11 +7412,13 @@ let Container$7 = class Container2 extends Node$2 {
7163
7412
  });
7164
7413
  }
7165
7414
  get first() {
7166
- if (!this.proxyOf.nodes) return void 0;
7415
+ if (!this.proxyOf.nodes)
7416
+ return void 0;
7167
7417
  return this.proxyOf.nodes[0];
7168
7418
  }
7169
7419
  get last() {
7170
- if (!this.proxyOf.nodes) return void 0;
7420
+ if (!this.proxyOf.nodes)
7421
+ return void 0;
7171
7422
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
7172
7423
  }
7173
7424
  };
@@ -7229,7 +7480,8 @@ var document$1 = Document$3;
7229
7480
  Document$3.default = Document$3;
7230
7481
  let printed = {};
7231
7482
  var warnOnce$2 = function warnOnce2(message) {
7232
- if (printed[message]) return;
7483
+ if (printed[message])
7484
+ return;
7233
7485
  printed[message] = true;
7234
7486
  if (typeof console !== "undefined" && console.warn) {
7235
7487
  console.warn(message);
@@ -7246,7 +7498,8 @@ let Warning$2 = class Warning2 {
7246
7498
  this.endLine = range.end.line;
7247
7499
  this.endColumn = range.end.column;
7248
7500
  }
7249
- for (let opt in opts) this[opt] = opts[opt];
7501
+ for (let opt in opts)
7502
+ this[opt] = opts[opt];
7250
7503
  }
7251
7504
  toString() {
7252
7505
  if (this.node) {
@@ -7338,8 +7591,10 @@ var tokenize = function tokenizer2(input2, options = {}) {
7338
7591
  return returned.length === 0 && pos >= length;
7339
7592
  }
7340
7593
  function nextToken(opts) {
7341
- if (returned.length) return returned.pop();
7342
- if (pos >= length) return;
7594
+ if (returned.length)
7595
+ return returned.pop();
7596
+ if (pos >= length)
7597
+ return;
7343
7598
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
7344
7599
  code = css.charCodeAt(pos);
7345
7600
  switch (code) {
@@ -7511,11 +7766,13 @@ let AtRule$3 = class AtRule2 extends Container$5 {
7511
7766
  this.type = "atrule";
7512
7767
  }
7513
7768
  append(...children) {
7514
- if (!this.proxyOf.nodes) this.nodes = [];
7769
+ if (!this.proxyOf.nodes)
7770
+ this.nodes = [];
7515
7771
  return super.append(...children);
7516
7772
  }
7517
7773
  prepend(...children) {
7518
- if (!this.proxyOf.nodes) this.nodes = [];
7774
+ if (!this.proxyOf.nodes)
7775
+ this.nodes = [];
7519
7776
  return super.prepend(...children);
7520
7777
  }
7521
7778
  };
@@ -7529,7 +7786,8 @@ let Root$5 = class Root2 extends Container$4 {
7529
7786
  constructor(defaults) {
7530
7787
  super(defaults);
7531
7788
  this.type = "root";
7532
- if (!this.nodes) this.nodes = [];
7789
+ if (!this.nodes)
7790
+ this.nodes = [];
7533
7791
  }
7534
7792
  normalize(child, sample, type) {
7535
7793
  let nodes = super.normalize(child);
@@ -7600,19 +7858,23 @@ let list$2 = {
7600
7858
  } else if (letter === "(") {
7601
7859
  func += 1;
7602
7860
  } else if (letter === ")") {
7603
- if (func > 0) func -= 1;
7861
+ if (func > 0)
7862
+ func -= 1;
7604
7863
  } else if (func === 0) {
7605
- if (separators.includes(letter)) split = true;
7864
+ if (separators.includes(letter))
7865
+ split = true;
7606
7866
  }
7607
7867
  if (split) {
7608
- if (current !== "") array.push(current.trim());
7868
+ if (current !== "")
7869
+ array.push(current.trim());
7609
7870
  current = "";
7610
7871
  split = false;
7611
7872
  } else {
7612
7873
  current += letter;
7613
7874
  }
7614
7875
  }
7615
- if (last || current !== "") array.push(current.trim());
7876
+ if (last || current !== "")
7877
+ array.push(current.trim());
7616
7878
  return array;
7617
7879
  }
7618
7880
  };
@@ -7624,7 +7886,8 @@ let Rule$3 = class Rule2 extends Container$3 {
7624
7886
  constructor(defaults) {
7625
7887
  super(defaults);
7626
7888
  this.type = "rule";
7627
- if (!this.nodes) this.nodes = [];
7889
+ if (!this.nodes)
7890
+ this.nodes = [];
7628
7891
  }
7629
7892
  get selectors() {
7630
7893
  return list$1.comma(this.selector);
@@ -7652,7 +7915,8 @@ function findLastWithPosition(tokens) {
7652
7915
  for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
7653
7916
  let token = tokens[i2];
7654
7917
  let pos = token[3] || token[2];
7655
- if (pos) return pos;
7918
+ if (pos)
7919
+ return pos;
7656
7920
  }
7657
7921
  }
7658
7922
  let Parser$1 = class Parser2 {
@@ -7745,14 +8009,16 @@ let Parser$1 = class Parser2 {
7745
8009
  }
7746
8010
  checkMissedSemicolon(tokens) {
7747
8011
  let colon = this.colon(tokens);
7748
- if (colon === false) return;
8012
+ if (colon === false)
8013
+ return;
7749
8014
  let founded = 0;
7750
8015
  let token;
7751
8016
  for (let j = colon - 1; j >= 0; j--) {
7752
8017
  token = tokens[j];
7753
8018
  if (token[0] !== "space") {
7754
8019
  founded += 1;
7755
- if (founded === 2) break;
8020
+ if (founded === 2)
8021
+ break;
7756
8022
  }
7757
8023
  }
7758
8024
  throw this.input.error(
@@ -7818,7 +8084,8 @@ let Parser$1 = class Parser2 {
7818
8084
  );
7819
8085
  node2.source.end.offset++;
7820
8086
  while (tokens[0][0] !== "word") {
7821
- if (tokens.length === 1) this.unknownWord(tokens);
8087
+ if (tokens.length === 1)
8088
+ this.unknownWord(tokens);
7822
8089
  node2.raws.before += tokens.shift()[1];
7823
8090
  }
7824
8091
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -7852,7 +8119,8 @@ let Parser$1 = class Parser2 {
7852
8119
  let next;
7853
8120
  while (tokens.length) {
7854
8121
  next = tokens[0][0];
7855
- if (next !== "space" && next !== "comment") break;
8122
+ if (next !== "space" && next !== "comment")
8123
+ break;
7856
8124
  firstSpaces.push(tokens.shift());
7857
8125
  }
7858
8126
  this.precheckMissedSemicolon(tokens);
@@ -7862,7 +8130,8 @@ let Parser$1 = class Parser2 {
7862
8130
  node2.important = true;
7863
8131
  let string = this.stringFrom(tokens, i2);
7864
8132
  string = this.spacesFromEnd(tokens) + string;
7865
- if (string !== " !important") node2.raws.important = string;
8133
+ if (string !== " !important")
8134
+ node2.raws.important = string;
7866
8135
  break;
7867
8136
  } else if (token[1].toLowerCase() === "important") {
7868
8137
  let cache = tokens.slice(0);
@@ -7924,7 +8193,8 @@ let Parser$1 = class Parser2 {
7924
8193
  }
7925
8194
  }
7926
8195
  endFile() {
7927
- if (this.current.parent) this.unclosedBlock();
8196
+ if (this.current.parent)
8197
+ this.unclosedBlock();
7928
8198
  if (this.current.nodes && this.current.nodes.length) {
7929
8199
  this.current.raws.semicolon = this.semicolon;
7930
8200
  }
@@ -7958,7 +8228,8 @@ let Parser$1 = class Parser2 {
7958
8228
  };
7959
8229
  node2.raws.before = this.spaces;
7960
8230
  this.spaces = "";
7961
- if (node2.type !== "comment") this.semicolon = false;
8231
+ if (node2.type !== "comment")
8232
+ this.semicolon = false;
7962
8233
  }
7963
8234
  other(start) {
7964
8235
  let end = false;
@@ -7973,10 +8244,12 @@ let Parser$1 = class Parser2 {
7973
8244
  type = token[0];
7974
8245
  tokens.push(token);
7975
8246
  if (type === "(" || type === "[") {
7976
- if (!bracket) bracket = token;
8247
+ if (!bracket)
8248
+ bracket = token;
7977
8249
  brackets.push(type === "(" ? ")" : "]");
7978
8250
  } else if (customProperty && colon && type === "{") {
7979
- if (!bracket) bracket = token;
8251
+ if (!bracket)
8252
+ bracket = token;
7980
8253
  brackets.push("}");
7981
8254
  } else if (brackets.length === 0) {
7982
8255
  if (type === ";") {
@@ -7998,17 +8271,21 @@ let Parser$1 = class Parser2 {
7998
8271
  }
7999
8272
  } else if (type === brackets[brackets.length - 1]) {
8000
8273
  brackets.pop();
8001
- if (brackets.length === 0) bracket = null;
8274
+ if (brackets.length === 0)
8275
+ bracket = null;
8002
8276
  }
8003
8277
  token = this.tokenizer.nextToken();
8004
8278
  }
8005
- if (this.tokenizer.endOfFile()) end = true;
8006
- if (brackets.length > 0) this.unclosedBracket(bracket);
8279
+ if (this.tokenizer.endOfFile())
8280
+ end = true;
8281
+ if (brackets.length > 0)
8282
+ this.unclosedBracket(bracket);
8007
8283
  if (end && colon) {
8008
8284
  if (!customProperty) {
8009
8285
  while (tokens.length) {
8010
8286
  token = tokens[tokens.length - 1][0];
8011
- if (token !== "space" && token !== "comment") break;
8287
+ if (token !== "space" && token !== "comment")
8288
+ break;
8012
8289
  this.tokenizer.back(tokens.pop());
8013
8290
  }
8014
8291
  }
@@ -8095,7 +8372,8 @@ let Parser$1 = class Parser2 {
8095
8372
  let spaces = "";
8096
8373
  while (tokens.length) {
8097
8374
  lastTokenType = tokens[tokens.length - 1][0];
8098
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
8375
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
8376
+ break;
8099
8377
  spaces = tokens.pop()[1] + spaces;
8100
8378
  }
8101
8379
  return spaces;
@@ -8106,7 +8384,8 @@ let Parser$1 = class Parser2 {
8106
8384
  let spaces = "";
8107
8385
  while (tokens.length) {
8108
8386
  next = tokens[0][0];
8109
- if (next !== "space" && next !== "comment") break;
8387
+ if (next !== "space" && next !== "comment")
8388
+ break;
8110
8389
  spaces += tokens.shift()[1];
8111
8390
  }
8112
8391
  return spaces;
@@ -8116,7 +8395,8 @@ let Parser$1 = class Parser2 {
8116
8395
  let spaces = "";
8117
8396
  while (tokens.length) {
8118
8397
  lastTokenType = tokens[tokens.length - 1][0];
8119
- if (lastTokenType !== "space") break;
8398
+ if (lastTokenType !== "space")
8399
+ break;
8120
8400
  spaces = tokens.pop()[1] + spaces;
8121
8401
  }
8122
8402
  return spaces;
@@ -8278,7 +8558,8 @@ function toStack(node2) {
8278
8558
  }
8279
8559
  function cleanMarks(node2) {
8280
8560
  node2[isClean] = false;
8281
- if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks(i2));
8561
+ if (node2.nodes)
8562
+ node2.nodes.forEach((i2) => cleanMarks(i2));
8282
8563
  return node2;
8283
8564
  }
8284
8565
  let postcss$2 = {};
@@ -8292,15 +8573,20 @@ let LazyResult$2 = class LazyResult2 {
8292
8573
  } else if (css instanceof LazyResult2 || css instanceof Result$2) {
8293
8574
  root2 = cleanMarks(css.root);
8294
8575
  if (css.map) {
8295
- if (typeof opts.map === "undefined") opts.map = {};
8296
- if (!opts.map.inline) opts.map.inline = false;
8576
+ if (typeof opts.map === "undefined")
8577
+ opts.map = {};
8578
+ if (!opts.map.inline)
8579
+ opts.map.inline = false;
8297
8580
  opts.map.prev = css.map;
8298
8581
  }
8299
8582
  } else {
8300
8583
  let parser2 = parse$2;
8301
- if (opts.syntax) parser2 = opts.syntax.parse;
8302
- if (opts.parser) parser2 = opts.parser;
8303
- if (parser2.parse) parser2 = parser2.parse;
8584
+ if (opts.syntax)
8585
+ parser2 = opts.syntax.parse;
8586
+ if (opts.parser)
8587
+ parser2 = opts.parser;
8588
+ if (parser2.parse)
8589
+ parser2 = parser2.parse;
8304
8590
  try {
8305
8591
  root2 = parser2(css, opts);
8306
8592
  } catch (error) {
@@ -8322,8 +8608,10 @@ let LazyResult$2 = class LazyResult2 {
8322
8608
  });
8323
8609
  }
8324
8610
  async() {
8325
- if (this.error) return Promise.reject(this.error);
8326
- if (this.processed) return Promise.resolve(this.result);
8611
+ if (this.error)
8612
+ return Promise.reject(this.error);
8613
+ if (this.processed)
8614
+ return Promise.resolve(this.result);
8327
8615
  if (!this.processing) {
8328
8616
  this.processing = this.runAsync();
8329
8617
  }
@@ -8341,7 +8629,8 @@ let LazyResult$2 = class LazyResult2 {
8341
8629
  handleError(error, node2) {
8342
8630
  let plugin22 = this.result.lastPlugin;
8343
8631
  try {
8344
- if (node2) node2.addToError(error);
8632
+ if (node2)
8633
+ node2.addToError(error);
8345
8634
  this.error = error;
8346
8635
  if (error.name === "CssSyntaxError" && !error.plugin) {
8347
8636
  error.plugin = plugin22.postcssPlugin;
@@ -8361,14 +8650,16 @@ let LazyResult$2 = class LazyResult2 {
8361
8650
  }
8362
8651
  }
8363
8652
  } catch (err) {
8364
- if (console && console.error) console.error(err);
8653
+ if (console && console.error)
8654
+ console.error(err);
8365
8655
  }
8366
8656
  return error;
8367
8657
  }
8368
8658
  prepareVisitors() {
8369
8659
  this.listeners = {};
8370
8660
  let add = (plugin22, type, cb) => {
8371
- if (!this.listeners[type]) this.listeners[type] = [];
8661
+ if (!this.listeners[type])
8662
+ this.listeners[type] = [];
8372
8663
  this.listeners[type].push([plugin22, cb]);
8373
8664
  };
8374
8665
  for (let plugin22 of this.plugins) {
@@ -8475,15 +8766,20 @@ let LazyResult$2 = class LazyResult2 {
8475
8766
  }
8476
8767
  }
8477
8768
  stringify() {
8478
- if (this.error) throw this.error;
8479
- if (this.stringified) return this.result;
8769
+ if (this.error)
8770
+ throw this.error;
8771
+ if (this.stringified)
8772
+ return this.result;
8480
8773
  this.stringified = true;
8481
8774
  this.sync();
8482
8775
  let opts = this.result.opts;
8483
8776
  let str = stringify$2;
8484
- if (opts.syntax) str = opts.syntax.stringify;
8485
- if (opts.stringifier) str = opts.stringifier;
8486
- if (str.stringify) str = str.stringify;
8777
+ if (opts.syntax)
8778
+ str = opts.syntax.stringify;
8779
+ if (opts.stringifier)
8780
+ str = opts.stringifier;
8781
+ if (str.stringify)
8782
+ str = str.stringify;
8487
8783
  let map = new MapGenerator$1(str, this.result.root, this.result.opts);
8488
8784
  let data = map.generate();
8489
8785
  this.result.css = data[0];
@@ -8491,8 +8787,10 @@ let LazyResult$2 = class LazyResult2 {
8491
8787
  return this.result;
8492
8788
  }
8493
8789
  sync() {
8494
- if (this.error) throw this.error;
8495
- if (this.processed) return this.result;
8790
+ if (this.error)
8791
+ throw this.error;
8792
+ if (this.processed)
8793
+ return this.result;
8496
8794
  this.processed = true;
8497
8795
  if (this.processing) {
8498
8796
  throw this.getAsyncError();
@@ -8611,13 +8909,15 @@ let LazyResult$2 = class LazyResult2 {
8611
8909
  if (event === CHILDREN) {
8612
8910
  if (node2.nodes) {
8613
8911
  node2.each((child) => {
8614
- if (!child[isClean]) this.walkSync(child);
8912
+ if (!child[isClean])
8913
+ this.walkSync(child);
8615
8914
  });
8616
8915
  }
8617
8916
  } else {
8618
8917
  let visitors = this.listeners[event];
8619
8918
  if (visitors) {
8620
- if (this.visitSync(visitors, node2.toProxy())) return;
8919
+ if (this.visitSync(visitors, node2.toProxy()))
8920
+ return;
8621
8921
  }
8622
8922
  }
8623
8923
  }
@@ -8695,7 +8995,8 @@ let NoWorkResult$1 = class NoWorkResult2 {
8695
8995
  }
8696
8996
  }
8697
8997
  async() {
8698
- if (this.error) return Promise.reject(this.error);
8998
+ if (this.error)
8999
+ return Promise.reject(this.error);
8699
9000
  return Promise.resolve(this.result);
8700
9001
  }
8701
9002
  catch(onRejected) {
@@ -8705,7 +9006,8 @@ let NoWorkResult$1 = class NoWorkResult2 {
8705
9006
  return this.async().then(onFinally, onFinally);
8706
9007
  }
8707
9008
  sync() {
8708
- if (this.error) throw this.error;
9009
+ if (this.error)
9010
+ throw this.error;
8709
9011
  return this.result;
8710
9012
  }
8711
9013
  then(onFulfilled, onRejected) {
@@ -8825,7 +9127,8 @@ let Input$1 = input;
8825
9127
  let Root$1 = root;
8826
9128
  let Rule$1 = rule;
8827
9129
  function fromJSON$1(json, inputs) {
8828
- if (Array.isArray(json)) return json.map((n2) => fromJSON$1(n2));
9130
+ if (Array.isArray(json))
9131
+ return json.map((n2) => fromJSON$1(n2));
8829
9132
  let _a2 = json, { inputs: ownInputs } = _a2, defaults = __objRest(_a2, ["inputs"]);
8830
9133
  if (ownInputs) {
8831
9134
  inputs = [];
@@ -8911,7 +9214,8 @@ postcss.plugin = function plugin2(name, initializer) {
8911
9214
  let cache;
8912
9215
  Object.defineProperty(creator, "postcss", {
8913
9216
  get() {
8914
- if (!cache) cache = creator();
9217
+ if (!cache)
9218
+ cache = creator();
8915
9219
  return cache;
8916
9220
  }
8917
9221
  });
@@ -8997,11 +9301,15 @@ class BaseRRNode {
8997
9301
  return childNodes2;
8998
9302
  }
8999
9303
  contains(node2) {
9000
- if (!(node2 instanceof BaseRRNode)) return false;
9001
- else if (node2.ownerDocument !== this.ownerDocument) return false;
9002
- else if (node2 === this) return true;
9304
+ if (!(node2 instanceof BaseRRNode))
9305
+ return false;
9306
+ else if (node2.ownerDocument !== this.ownerDocument)
9307
+ return false;
9308
+ else if (node2 === this)
9309
+ return true;
9003
9310
  while (node2.parentNode) {
9004
- if (node2.parentNode === this) return true;
9311
+ if (node2.parentNode === this)
9312
+ return true;
9005
9313
  node2 = node2.parentNode;
9006
9314
  }
9007
9315
  return false;
@@ -9079,10 +9387,12 @@ function getUntaintedPrototype(key) {
9079
9387
  const iframeEl = document.createElement("iframe");
9080
9388
  document.body.appendChild(iframeEl);
9081
9389
  const win = iframeEl.contentWindow;
9082
- if (!win) return defaultObj.prototype;
9390
+ if (!win)
9391
+ return defaultObj.prototype;
9083
9392
  const untaintedObject = win[key].prototype;
9084
9393
  document.body.removeChild(iframeEl);
9085
- if (!untaintedObject) return defaultPrototype;
9394
+ if (!untaintedObject)
9395
+ return defaultPrototype;
9086
9396
  return untaintedBasePrototype[key] = untaintedObject;
9087
9397
  } catch (e) {
9088
9398
  return defaultPrototype;
@@ -9101,7 +9411,8 @@ function getUntaintedAccessor(key, instance, accessor) {
9101
9411
  untaintedPrototype,
9102
9412
  accessor
9103
9413
  )) == null ? void 0 : _a2.get;
9104
- if (!untaintedAccessor) return instance[accessor];
9414
+ if (!untaintedAccessor)
9415
+ return instance[accessor];
9105
9416
  untaintedAccessorCache[cacheKey] = untaintedAccessor;
9106
9417
  return untaintedAccessor.call(instance);
9107
9418
  }
@@ -9114,7 +9425,8 @@ function getUntaintedMethod(key, instance, method) {
9114
9425
  );
9115
9426
  const untaintedPrototype = getUntaintedPrototype(key);
9116
9427
  const untaintedMethod = untaintedPrototype[method];
9117
- if (typeof untaintedMethod !== "function") return instance[method];
9428
+ if (typeof untaintedMethod !== "function")
9429
+ return instance[method];
9118
9430
  untaintedMethodCache[cacheKey] = untaintedMethod;
9119
9431
  return untaintedMethod.bind(instance);
9120
9432
  }
@@ -9137,14 +9449,16 @@ function getRootNode(n2) {
9137
9449
  return getUntaintedMethod("Node", n2, "getRootNode")();
9138
9450
  }
9139
9451
  function host(n2) {
9140
- if (!n2 || !("host" in n2)) return null;
9452
+ if (!n2 || !("host" in n2))
9453
+ return null;
9141
9454
  return getUntaintedAccessor("ShadowRoot", n2, "host");
9142
9455
  }
9143
9456
  function styleSheets(n2) {
9144
9457
  return n2.styleSheets;
9145
9458
  }
9146
9459
  function shadowRoot(n2) {
9147
- if (!n2 || !("shadowRoot" in n2)) return null;
9460
+ if (!n2 || !("shadowRoot" in n2))
9461
+ return null;
9148
9462
  return getUntaintedAccessor("Element", n2, "shadowRoot");
9149
9463
  }
9150
9464
  function querySelector(n2, selectors) {
@@ -9352,16 +9666,21 @@ function isBlocked(node2, blockClass, blockSelector, checkAncestors) {
9352
9666
  }
9353
9667
  try {
9354
9668
  if (typeof blockClass === "string") {
9355
- if (el.classList.contains(blockClass)) return true;
9356
- if (checkAncestors && el.closest("." + blockClass) !== null) return true;
9669
+ if (el.classList.contains(blockClass))
9670
+ return true;
9671
+ if (checkAncestors && el.closest("." + blockClass) !== null)
9672
+ return true;
9357
9673
  } else {
9358
- if (classMatchesRegex(el, blockClass, checkAncestors)) return true;
9674
+ if (classMatchesRegex(el, blockClass, checkAncestors))
9675
+ return true;
9359
9676
  }
9360
9677
  } catch (e2) {
9361
9678
  }
9362
9679
  if (blockSelector) {
9363
- if (el.matches(blockSelector)) return true;
9364
- if (checkAncestors && el.closest(blockSelector) !== null) return true;
9680
+ if (el.matches(blockSelector))
9681
+ return true;
9682
+ if (checkAncestors && el.closest(blockSelector) !== null)
9683
+ return true;
9365
9684
  }
9366
9685
  return false;
9367
9686
  }
@@ -9411,7 +9730,8 @@ function isSerializedStylesheet(n2, mirror2) {
9411
9730
  );
9412
9731
  }
9413
9732
  function hasShadowRoot(n2) {
9414
- if (!n2) return false;
9733
+ if (!n2)
9734
+ return false;
9415
9735
  if (n2 instanceof BaseRRNode && "shadowRoot" in n2) {
9416
9736
  return Boolean(n2.shadowRoot);
9417
9737
  }
@@ -9434,11 +9754,13 @@ class StyleSheetMirror {
9434
9754
  * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.
9435
9755
  */
9436
9756
  add(stylesheet, id) {
9437
- if (this.has(stylesheet)) return this.getId(stylesheet);
9757
+ if (this.has(stylesheet))
9758
+ return this.getId(stylesheet);
9438
9759
  let newId;
9439
9760
  if (id === void 0) {
9440
9761
  newId = this.id++;
9441
- } else newId = id;
9762
+ } else
9763
+ newId = id;
9442
9764
  this.styleIDMap.set(stylesheet, newId);
9443
9765
  this.idStyleMap.set(newId, stylesheet);
9444
9766
  return newId;
@@ -9471,13 +9793,15 @@ function getRootShadowHost(n2) {
9471
9793
  }
9472
9794
  function shadowHostInDom(n2) {
9473
9795
  const doc = n2.ownerDocument;
9474
- if (!doc) return false;
9796
+ if (!doc)
9797
+ return false;
9475
9798
  const shadowHost = getRootShadowHost(n2);
9476
9799
  return index.contains(doc, shadowHost);
9477
9800
  }
9478
9801
  function inDom(n2) {
9479
9802
  const doc = n2.ownerDocument;
9480
- if (!doc) return false;
9803
+ if (!doc)
9804
+ return false;
9481
9805
  return index.contains(doc, n2) || shadowHostInDom(n2);
9482
9806
  }
9483
9807
  var EventType = /* @__PURE__ */ ((EventType2) => {
@@ -9798,7 +10122,8 @@ class MutationBuffer {
9798
10122
  if (_node) {
9799
10123
  const parentId = this.mirror.getId(index.parentNode(_node.value));
9800
10124
  const nextId = getNextId(_node.value);
9801
- if (nextId === -1) continue;
10125
+ if (nextId === -1)
10126
+ continue;
9802
10127
  else if (parentId !== -1) {
9803
10128
  node2 = _node;
9804
10129
  break;
@@ -10107,8 +10432,10 @@ class MutationBuffer {
10107
10432
  if (this.addedSet.has(n2)) {
10108
10433
  deepDelete(this.addedSet, n2);
10109
10434
  this.droppedSet.add(n2);
10110
- } else if (this.addedSet.has(m.target) && nodeId === -1) ;
10111
- else if (isAncestorRemoved(m.target, this.mirror)) ;
10435
+ } else if (this.addedSet.has(m.target) && nodeId === -1)
10436
+ ;
10437
+ else if (isAncestorRemoved(m.target, this.mirror))
10438
+ ;
10112
10439
  else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {
10113
10440
  deepDelete(this.movedSet, n2);
10114
10441
  } else {
@@ -10126,8 +10453,10 @@ class MutationBuffer {
10126
10453
  }
10127
10454
  });
10128
10455
  __publicField(this, "genAdds", (n2, target) => {
10129
- if (this.processedNodeManager.inOtherBuffer(n2, this)) return;
10130
- if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;
10456
+ if (this.processedNodeManager.inOtherBuffer(n2, this))
10457
+ return;
10458
+ if (this.addedSet.has(n2) || this.movedSet.has(n2))
10459
+ return;
10131
10460
  if (this.mirror.hasNode(n2)) {
10132
10461
  if (isIgnored(n2, this.mirror, this.slimDOMOptions)) {
10133
10462
  return;
@@ -10223,23 +10552,27 @@ function processRemoves(n2, cache) {
10223
10552
  const queue = [n2];
10224
10553
  while (queue.length) {
10225
10554
  const next = queue.pop();
10226
- if (cache.has(next)) continue;
10555
+ if (cache.has(next))
10556
+ continue;
10227
10557
  cache.add(next);
10228
10558
  index.childNodes(next).forEach((n22) => queue.push(n22));
10229
10559
  }
10230
10560
  return;
10231
10561
  }
10232
10562
  function isParentRemoved(removes, n2, mirror2) {
10233
- if (removes.size === 0) return false;
10563
+ if (removes.size === 0)
10564
+ return false;
10234
10565
  return _isParentRemoved(removes, n2);
10235
10566
  }
10236
10567
  function _isParentRemoved(removes, n2, _mirror2) {
10237
10568
  const node2 = index.parentNode(n2);
10238
- if (!node2) return false;
10569
+ if (!node2)
10570
+ return false;
10239
10571
  return removes.has(node2);
10240
10572
  }
10241
10573
  function isAncestorInSet(set, n2) {
10242
- if (set.size === 0) return false;
10574
+ if (set.size === 0)
10575
+ return false;
10243
10576
  return _isAncestorInSet(set, n2);
10244
10577
  }
10245
10578
  function _isAncestorInSet(set, n2) {
@@ -10413,7 +10746,8 @@ function initMouseInteractionObserver({
10413
10746
  } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {
10414
10747
  thisEventKey = "TouchEnd";
10415
10748
  }
10416
- } else if (pointerType === PointerTypes.Pen) ;
10749
+ } else if (pointerType === PointerTypes.Pen)
10750
+ ;
10417
10751
  } else if (legacy_isTouchEvent(event)) {
10418
10752
  pointerType = PointerTypes.Touch;
10419
10753
  }
@@ -10675,9 +11009,12 @@ function getNestedCSSRulePositions(rule2) {
10675
11009
  }
10676
11010
  function getIdAndStyleId(sheet, mirror2, styleMirror) {
10677
11011
  let id, styleId;
10678
- if (!sheet) return {};
10679
- if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);
10680
- else styleId = styleMirror.getId(sheet);
11012
+ if (!sheet)
11013
+ return {};
11014
+ if (sheet.ownerNode)
11015
+ id = mirror2.getId(sheet.ownerNode);
11016
+ else
11017
+ styleId = styleMirror.getId(sheet);
10681
11018
  return {
10682
11019
  styleId,
10683
11020
  id
@@ -10882,8 +11219,10 @@ function initAdoptedStyleSheetObserver({
10882
11219
  }, host2) {
10883
11220
  var _a2, _b, _c;
10884
11221
  let hostId = null;
10885
- if (host2.nodeName === "#document") hostId = mirror2.getId(host2);
10886
- else hostId = mirror2.getId(index.host(host2));
11222
+ if (host2.nodeName === "#document")
11223
+ hostId = mirror2.getId(host2);
11224
+ else
11225
+ hostId = mirror2.getId(index.host(host2));
10887
11226
  const patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? void 0 : _a2.Document : (_c = (_b = host2.ownerDocument) == null ? void 0 : _b.defaultView) == null ? void 0 : _c.ShadowRoot;
10888
11227
  const originalPropertyDescriptor = (patchTarget == null ? void 0 : patchTarget.prototype) ? Object.getOwnPropertyDescriptor(
10889
11228
  patchTarget == null ? void 0 : patchTarget.prototype,
@@ -11084,7 +11423,8 @@ function initSelectionObserver(param) {
11084
11423
  let collapsed = true;
11085
11424
  const updateSelection = callbackWrapper(() => {
11086
11425
  const selection = doc.getSelection();
11087
- if (!selection || collapsed && (selection == null ? void 0 : selection.isCollapsed)) return;
11426
+ if (!selection || collapsed && (selection == null ? void 0 : selection.isCollapsed))
11427
+ return;
11088
11428
  collapsed = selection.isCollapsed || false;
11089
11429
  const ranges = [];
11090
11430
  const count = selection.rangeCount || 0;
@@ -11092,7 +11432,8 @@ function initSelectionObserver(param) {
11092
11432
  const range = selection.getRangeAt(i2);
11093
11433
  const { startContainer, startOffset, endContainer, endOffset } = range;
11094
11434
  const blocked = isBlocked(startContainer, blockClass, blockSelector, true) || isBlocked(endContainer, blockClass, blockSelector, true);
11095
- if (blocked) continue;
11435
+ if (blocked)
11436
+ continue;
11096
11437
  ranges.push({
11097
11438
  start: mirror2.getId(startContainer),
11098
11439
  startOffset,
@@ -11110,8 +11451,9 @@ function initCustomElementObserver({
11110
11451
  customElementCb
11111
11452
  }) {
11112
11453
  const win = doc.defaultView;
11113
- if (!win || !win.customElements) return () => {
11114
- };
11454
+ if (!win || !win.customElements)
11455
+ return () => {
11456
+ };
11115
11457
  const restoreHandler = patch(
11116
11458
  win.customElements,
11117
11459
  "define",
@@ -11333,9 +11675,11 @@ class CrossOriginIframeMirror {
11333
11675
  }
11334
11676
  getRemoteId(iframe, id, map) {
11335
11677
  const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);
11336
- if (typeof id !== "number") return id;
11678
+ if (typeof id !== "number")
11679
+ return id;
11337
11680
  const remoteId = remoteIdToIdMap.get(id);
11338
- if (!remoteId) return -1;
11681
+ if (!remoteId)
11682
+ return -1;
11339
11683
  return remoteId;
11340
11684
  }
11341
11685
  getRemoteIds(iframe, ids) {
@@ -11436,9 +11780,11 @@ class IframeManager {
11436
11780
  crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)
11437
11781
  return;
11438
11782
  const iframeSourceWindow = message.source;
11439
- if (!iframeSourceWindow) return;
11783
+ if (!iframeSourceWindow)
11784
+ return;
11440
11785
  const iframeEl = this.crossOriginIframeMap.get(message.source);
11441
- if (!iframeEl) return;
11786
+ if (!iframeEl)
11787
+ return;
11442
11788
  const transformedEvent = this.transformCrossOriginEvent(
11443
11789
  iframeEl,
11444
11790
  crossOriginMessageEvent.data.event
@@ -11567,7 +11913,8 @@ class IframeManager {
11567
11913
  }
11568
11914
  replace(iframeMirror, obj, iframeEl, keys) {
11569
11915
  for (const key of keys) {
11570
- if (!Array.isArray(obj[key]) && typeof obj[key] !== "number") continue;
11916
+ if (!Array.isArray(obj[key]) && typeof obj[key] !== "number")
11917
+ continue;
11571
11918
  if (Array.isArray(obj[key])) {
11572
11919
  obj[key] = iframeMirror.getIds(
11573
11920
  iframeEl,
@@ -11594,7 +11941,8 @@ class IframeManager {
11594
11941
  }
11595
11942
  }
11596
11943
  patchRootIdOnNode(node2, rootId) {
11597
- if (node2.type !== NodeType.Document && !node2.rootId) node2.rootId = rootId;
11944
+ if (node2.type !== NodeType.Document && !node2.rootId)
11945
+ node2.rootId = rootId;
11598
11946
  if ("childNodes" in node2) {
11599
11947
  node2.childNodes.forEach((child) => {
11600
11948
  this.patchRootIdOnNode(child, rootId);
@@ -11621,8 +11969,10 @@ class ShadowDomManager {
11621
11969
  this.patchAttachShadow(Element, document);
11622
11970
  }
11623
11971
  addShadowRoot(shadowRoot2, doc) {
11624
- if (!isNativeShadowDom(shadowRoot2)) return;
11625
- if (this.shadowDoms.has(shadowRoot2)) return;
11972
+ if (!isNativeShadowDom(shadowRoot2))
11973
+ return;
11974
+ if (this.shadowDoms.has(shadowRoot2))
11975
+ return;
11626
11976
  this.shadowDoms.add(shadowRoot2);
11627
11977
  const observer = initMutationObserver(
11628
11978
  __spreadProps(__spreadValues({}, this.bypassOptions), {
@@ -11664,7 +12014,8 @@ class ShadowDomManager {
11664
12014
  * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.
11665
12015
  */
11666
12016
  observeAttachShadow(iframeElement) {
11667
- if (!iframeElement.contentWindow || !iframeElement.contentDocument) return;
12017
+ if (!iframeElement.contentWindow || !iframeElement.contentDocument)
12018
+ return;
11668
12019
  this.patchAttachShadow(
11669
12020
  iframeElement.contentWindow.Element,
11670
12021
  iframeElement.contentDocument
@@ -11901,7 +12252,8 @@ function initCanvasContextObserver(win, blockClass, blockSelector, setPreserveDr
11901
12252
  return function(contextType, ...args) {
11902
12253
  if (!isBlocked(this, blockClass, blockSelector, true)) {
11903
12254
  const ctxName = getNormalizedContextName(contextType);
11904
- if (!("__context" in this)) this.__context = ctxName;
12255
+ if (!("__context" in this))
12256
+ this.__context = ctxName;
11905
12257
  if (setPreserveDrawingBufferToTrue && ["webgl", "webgl2"].includes(ctxName)) {
11906
12258
  if (args[0] && typeof args[0] === "object") {
11907
12259
  const contextAttributes = args[0];
@@ -12018,7 +12370,8 @@ function WorkerWrapper(options) {
12018
12370
  let objURL;
12019
12371
  try {
12020
12372
  objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);
12021
- if (!objURL) throw "";
12373
+ if (!objURL)
12374
+ throw "";
12022
12375
  const worker = new Worker(objURL, {
12023
12376
  name: options == null ? void 0 : options.name
12024
12377
  });
@@ -12100,7 +12453,8 @@ class CanvasManager {
12100
12453
  worker.onmessage = (e2) => {
12101
12454
  const { id } = e2.data;
12102
12455
  snapshotInProgressMap.set(id, false);
12103
- if (!("base64" in e2.data)) return;
12456
+ if (!("base64" in e2.data))
12457
+ return;
12104
12458
  const { base64, type, width, height } = e2.data;
12105
12459
  this.mutationCb({
12106
12460
  id,
@@ -12153,8 +12507,10 @@ class CanvasManager {
12153
12507
  getCanvas().forEach(async (canvas) => {
12154
12508
  var _a2;
12155
12509
  const id = this.mirror.getId(canvas);
12156
- if (snapshotInProgressMap.get(id)) return;
12157
- if (canvas.width === 0 || canvas.height === 0) return;
12510
+ if (snapshotInProgressMap.get(id))
12511
+ return;
12512
+ if (canvas.width === 0 || canvas.height === 0)
12513
+ return;
12158
12514
  snapshotInProgressMap.set(id, true);
12159
12515
  if (["webgl", "webgl2"].includes(canvas.__context)) {
12160
12516
  const context = canvas.getContext(canvas.__context);
@@ -12233,7 +12589,8 @@ class CanvasManager {
12233
12589
  return;
12234
12590
  }
12235
12591
  const valuesWithType = this.pendingCanvasMutations.get(canvas);
12236
- if (!valuesWithType || id === -1) return;
12592
+ if (!valuesWithType || id === -1)
12593
+ return;
12237
12594
  const values = valuesWithType.map((value) => {
12238
12595
  const _a2 = value, { type: type2 } = _a2, rest = __objRest(_a2, ["type"]);
12239
12596
  return rest;
@@ -12268,12 +12625,14 @@ class StylesheetManager {
12268
12625
  this.trackLinkElement(linkEl);
12269
12626
  }
12270
12627
  trackLinkElement(linkEl) {
12271
- if (this.trackedLinkElements.has(linkEl)) return;
12628
+ if (this.trackedLinkElements.has(linkEl))
12629
+ return;
12272
12630
  this.trackedLinkElements.add(linkEl);
12273
12631
  this.trackStylesheetInLinkElement(linkEl);
12274
12632
  }
12275
12633
  adoptStyleSheets(sheets, hostId) {
12276
- if (sheets.length === 0) return;
12634
+ if (sheets.length === 0)
12635
+ return;
12277
12636
  const adoptedStyleSheetData = {
12278
12637
  id: hostId,
12279
12638
  styleIds: []
@@ -12290,10 +12649,12 @@ class StylesheetManager {
12290
12649
  index: index2
12291
12650
  }))
12292
12651
  });
12293
- } else styleId = this.styleMirror.getId(sheet);
12652
+ } else
12653
+ styleId = this.styleMirror.getId(sheet);
12294
12654
  adoptedStyleSheetData.styleIds.push(styleId);
12295
12655
  }
12296
- if (styles.length > 0) adoptedStyleSheetData.styles = styles;
12656
+ if (styles.length > 0)
12657
+ adoptedStyleSheetData.styles = styles;
12297
12658
  this.adoptedStyleSheetCb(adoptedStyleSheetData);
12298
12659
  }
12299
12660
  reset() {
@@ -12472,7 +12833,8 @@ class VisibilityManager {
12472
12833
  this.startPendingFlushLoop();
12473
12834
  }
12474
12835
  startPendingFlushLoop() {
12475
- if (this.disabled) return;
12836
+ if (this.disabled)
12837
+ return;
12476
12838
  const loop = (timestamp) => {
12477
12839
  if (timestamp - this.lastFlushTime >= this.rafThrottle) {
12478
12840
  this.lastFlushTime = timestamp;
@@ -12483,8 +12845,10 @@ class VisibilityManager {
12483
12845
  this.rafId = requestAnimationFrame(loop);
12484
12846
  }
12485
12847
  flushPendingVisibilityMutations() {
12486
- if (this.disabled) return;
12487
- if (this.frozen || this.locked || this.elements.size === 0) return;
12848
+ if (this.disabled)
12849
+ return;
12850
+ if (this.frozen || this.locked || this.elements.size === 0)
12851
+ return;
12488
12852
  const state = computeVisibility(this.elements, this.previousState, {
12489
12853
  root: this.root,
12490
12854
  threshold: this.threshold,
@@ -12530,17 +12894,20 @@ class VisibilityManager {
12530
12894
  }
12531
12895
  flushBuffer() {
12532
12896
  var _a2;
12533
- if (this.buffer.size === 0) return;
12897
+ if (this.buffer.size === 0)
12898
+ return;
12534
12899
  (_a2 = this.notifyActivity) == null ? void 0 : _a2.call(this, this.buffer.size);
12535
12900
  this.mutationCb({ mutations: Array.from(this.buffer.values()) });
12536
12901
  this.buffer.clear();
12537
12902
  }
12538
12903
  observe(el) {
12539
- if (this.disabled) return;
12904
+ if (this.disabled)
12905
+ return;
12540
12906
  this.elements.add(el);
12541
12907
  }
12542
12908
  unobserve(el) {
12543
- if (this.disabled) return;
12909
+ if (this.disabled)
12910
+ return;
12544
12911
  this.elements.delete(el);
12545
12912
  this.previousState.delete(el);
12546
12913
  this.pending.delete(el);
@@ -12561,7 +12928,8 @@ class VisibilityManager {
12561
12928
  this.elements.clear();
12562
12929
  this.previousState.clear();
12563
12930
  this.pending.clear();
12564
- if (this.rafId) cancelAnimationFrame(this.rafId);
12931
+ if (this.rafId)
12932
+ cancelAnimationFrame(this.rafId);
12565
12933
  }
12566
12934
  }
12567
12935
  let wrappedEmit;
@@ -12571,6 +12939,36 @@ let visibilityManager;
12571
12939
  let recording = false;
12572
12940
  const customEventQueue = [];
12573
12941
  let flushCustomEventQueue;
12942
+ function waitForDOMStabilization(win) {
12943
+ const maxWaitMs = 5e3;
12944
+ return new Promise((resolve2) => {
12945
+ const captureAfterPaint = () => {
12946
+ requestAnimationFrame(() => {
12947
+ requestAnimationFrame(() => {
12948
+ resolve2();
12949
+ });
12950
+ });
12951
+ };
12952
+ const safeResolve = /* @__PURE__ */ (() => {
12953
+ let called = false;
12954
+ return () => {
12955
+ if (!called) {
12956
+ called = true;
12957
+ captureAfterPaint();
12958
+ }
12959
+ };
12960
+ })();
12961
+ if (["interactive", "complete"].includes(win.document.readyState)) {
12962
+ safeResolve();
12963
+ } else {
12964
+ win.addEventListener("DOMContentLoaded", safeResolve, { once: true });
12965
+ win.addEventListener("load", safeResolve, { once: true });
12966
+ setTimeout(() => {
12967
+ safeResolve();
12968
+ }, maxWaitMs);
12969
+ }
12970
+ });
12971
+ }
12574
12972
  try {
12575
12973
  if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {
12576
12974
  const cleanFrame = document.createElement("iframe");
@@ -13048,8 +13446,28 @@ function record(options = {}) {
13048
13446
  flushCustomEventQueue();
13049
13447
  }
13050
13448
  };
13449
+ const runInit = async () => {
13450
+ if (flushCustomEvent === "before") {
13451
+ flushCustomEventQueue();
13452
+ }
13453
+ if (recordAfter === "DOMContentStabilized") {
13454
+ console.log(`[rrweb] \u{1F7E2} Waiting for DOM stabilization...`);
13455
+ await waitForDOMStabilization(window);
13456
+ console.log(`[rrweb] \u2705 DOM stabilized, starting recording`);
13457
+ }
13458
+ takeFullSnapshot$1();
13459
+ handlers.push(observe(document));
13460
+ recording = true;
13461
+ if (flushCustomEvent === "after") {
13462
+ flushCustomEventQueue();
13463
+ }
13464
+ };
13051
13465
  if (document.readyState === "interactive" || document.readyState === "complete") {
13052
- init();
13466
+ if (recordAfter === "DOMContentStabilized") {
13467
+ void runInit();
13468
+ } else {
13469
+ init();
13470
+ }
13053
13471
  } else {
13054
13472
  handlers.push(
13055
13473
  on("DOMContentLoaded", () => {
@@ -13057,7 +13475,9 @@ function record(options = {}) {
13057
13475
  type: EventType.DomContentLoaded,
13058
13476
  data: {}
13059
13477
  });
13060
- if (recordAfter === "DOMContentLoaded") init();
13478
+ if (recordAfter === "DOMContentLoaded" || recordAfter === "DOMContentStabilized") {
13479
+ void runInit();
13480
+ }
13061
13481
  })
13062
13482
  );
13063
13483
  handlers.push(
@@ -13068,7 +13488,8 @@ function record(options = {}) {
13068
13488
  type: EventType.Load,
13069
13489
  data: {}
13070
13490
  });
13071
- if (recordAfter === "load") init();
13491
+ if (recordAfter === "load")
13492
+ void runInit();
13072
13493
  },
13073
13494
  window
13074
13495
  )
@@ -13085,6 +13506,7 @@ function record(options = {}) {
13085
13506
  console.warn(error);
13086
13507
  }
13087
13508
  }
13509
+ record.isRecording = () => recording;
13088
13510
  record.flushCustomEventQueue = () => {
13089
13511
  console.warn(`[rrweb] CustomEvent flushing: ${customEventQueue.length} events`);
13090
13512
  flushCustomEventQueue();