@appsurify-testmap/rrweb-snapshot 2.1.1-alpha.6 → 2.1.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,10 +107,12 @@ function getUntaintedPrototype(key) {
107
107
  const iframeEl = document.createElement("iframe");
108
108
  document.body.appendChild(iframeEl);
109
109
  const win = iframeEl.contentWindow;
110
- if (!win) return defaultObj.prototype;
110
+ if (!win)
111
+ return defaultObj.prototype;
111
112
  const untaintedObject = win[key].prototype;
112
113
  document.body.removeChild(iframeEl);
113
- if (!untaintedObject) return defaultPrototype;
114
+ if (!untaintedObject)
115
+ return defaultPrototype;
114
116
  return untaintedBasePrototype[key] = untaintedObject;
115
117
  } catch (e) {
116
118
  return defaultPrototype;
@@ -129,7 +131,8 @@ function getUntaintedAccessor(key, instance, accessor) {
129
131
  untaintedPrototype,
130
132
  accessor
131
133
  )) == null ? void 0 : _a.get;
132
- if (!untaintedAccessor) return instance[accessor];
134
+ if (!untaintedAccessor)
135
+ return instance[accessor];
133
136
  untaintedAccessorCache[cacheKey] = untaintedAccessor;
134
137
  return untaintedAccessor.call(instance);
135
138
  }
@@ -142,7 +145,8 @@ function getUntaintedMethod(key, instance, method) {
142
145
  );
143
146
  const untaintedPrototype = getUntaintedPrototype(key);
144
147
  const untaintedMethod = untaintedPrototype[method];
145
- if (typeof untaintedMethod !== "function") return instance[method];
148
+ if (typeof untaintedMethod !== "function")
149
+ return instance[method];
146
150
  untaintedMethodCache[cacheKey] = untaintedMethod;
147
151
  return untaintedMethod.bind(instance);
148
152
  }
@@ -165,14 +169,16 @@ function getRootNode(n) {
165
169
  return getUntaintedMethod("Node", n, "getRootNode")();
166
170
  }
167
171
  function host(n) {
168
- if (!n || !("host" in n)) return null;
172
+ if (!n || !("host" in n))
173
+ return null;
169
174
  return getUntaintedAccessor("ShadowRoot", n, "host");
170
175
  }
171
176
  function styleSheets(n) {
172
177
  return n.styleSheets;
173
178
  }
174
179
  function shadowRoot(n) {
175
- if (!n || !("shadowRoot" in n)) return null;
180
+ if (!n || !("shadowRoot" in n))
181
+ return null;
176
182
  return getUntaintedAccessor("Element", n, "shadowRoot");
177
183
  }
178
184
  function querySelector(n, selectors) {
@@ -290,7 +296,8 @@ function fixBrowserCompatibilityIssuesInCSS(cssText) {
290
296
  }
291
297
  function escapeImportStatement(rule2) {
292
298
  const { cssText } = rule2;
293
- if (cssText.split('"').length < 3) return cssText;
299
+ if (cssText.split('"').length < 3)
300
+ return cssText;
294
301
  const statement = ["@import", `url(${JSON.stringify(rule2.href)})`];
295
302
  if (rule2.layerName === "") {
296
303
  statement.push(`layer`);
@@ -367,7 +374,8 @@ class Mirror {
367
374
  }
368
375
  getId(n) {
369
376
  var _a;
370
- if (!n) return -1;
377
+ if (!n)
378
+ return -1;
371
379
  const id = (_a = this.getMeta(n)) == null ? void 0 : _a.id;
372
380
  return id != null ? id : -1;
373
381
  }
@@ -406,7 +414,8 @@ class Mirror {
406
414
  const oldNode = this.getNode(id);
407
415
  if (oldNode) {
408
416
  const meta = this.nodeMetaMap.get(oldNode);
409
- if (meta) this.nodeMetaMap.set(n, meta);
417
+ if (meta)
418
+ this.nodeMetaMap.set(n, meta);
410
419
  }
411
420
  this.idNodeMap.set(id, n);
412
421
  }
@@ -443,7 +452,8 @@ function toLowerCase(str) {
443
452
  const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__";
444
453
  function is2DCanvasBlank(canvas) {
445
454
  const ctx = canvas.getContext("2d");
446
- if (!ctx) return true;
455
+ if (!ctx)
456
+ return true;
447
457
  const chunkSize = 50;
448
458
  for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
449
459
  for (let y = 0; y < canvas.height; y += chunkSize) {
@@ -459,13 +469,15 @@ function is2DCanvasBlank(canvas) {
459
469
  Math.min(chunkSize, canvas.height - y)
460
470
  ).data.buffer
461
471
  );
462
- if (pixelBuffer.some((pixel) => pixel !== 0)) return false;
472
+ if (pixelBuffer.some((pixel) => pixel !== 0))
473
+ return false;
463
474
  }
464
475
  }
465
476
  return true;
466
477
  }
467
478
  function isNodeMetaEqual(a, b) {
468
- if (!a || !b || a.type !== b.type) return false;
479
+ if (!a || !b || a.type !== b.type)
480
+ return false;
469
481
  if (a.type === NodeType.Document)
470
482
  return a.compatMode === b.compatMode;
471
483
  else if (a.type === NodeType.DocumentType)
@@ -657,7 +669,8 @@ function isSelectorUnique(selector, target) {
657
669
  }
658
670
  }
659
671
  function buildSelector(node2) {
660
- if (!(node2 instanceof Element)) return null;
672
+ if (!(node2 instanceof Element))
673
+ return null;
661
674
  if (node2.id) {
662
675
  return `#${CSS.escape(node2.id)}`;
663
676
  }
@@ -705,11 +718,15 @@ function buildXPath(node2) {
705
718
  if (element.id) {
706
719
  return `//*[@id="${CSS.escape(element.id)}"]`;
707
720
  }
708
- if (element.tagName.toLowerCase() === "html") return "/html";
709
- if (element === document.head) return "/html/head";
710
- if (element === document.body) return "/html/body";
721
+ if (element.tagName.toLowerCase() === "html")
722
+ return "/html";
723
+ if (element === document.head)
724
+ return "/html/head";
725
+ if (element === document.body)
726
+ return "/html/body";
711
727
  const parent = element.parentNode;
712
- if (!parent) return "";
728
+ if (!parent)
729
+ return "";
713
730
  const tag = element.tagName.toLowerCase();
714
731
  const siblings = Array.from(parent.children).filter(
715
732
  (el) => el.tagName.toLowerCase() === tag
@@ -721,7 +738,8 @@ function buildXPath(node2) {
721
738
  case Node.CDATA_SECTION_NODE:
722
739
  case Node.COMMENT_NODE: {
723
740
  const parent = node2.parentNode;
724
- if (!parent) return "";
741
+ if (!parent)
742
+ return "";
725
743
  const typeMap = {
726
744
  [Node.TEXT_NODE]: "text()",
727
745
  [Node.CDATA_SECTION_NODE]: "text()",
@@ -1012,9 +1030,11 @@ function _isBlockedElement(element, blockClass, blockSelector) {
1012
1030
  return false;
1013
1031
  }
1014
1032
  function classMatchesRegex(node2, regex, checkAncestors) {
1015
- if (!node2) return false;
1033
+ if (!node2)
1034
+ return false;
1016
1035
  if (node2.nodeType !== node2.ELEMENT_NODE) {
1017
- if (!checkAncestors) return false;
1036
+ if (!checkAncestors)
1037
+ return false;
1018
1038
  return classMatchesRegex(index.parentNode(node2), regex, checkAncestors);
1019
1039
  }
1020
1040
  for (let eIndex = node2.classList.length; eIndex--; ) {
@@ -1023,7 +1043,8 @@ function classMatchesRegex(node2, regex, checkAncestors) {
1023
1043
  return true;
1024
1044
  }
1025
1045
  }
1026
- if (!checkAncestors) return false;
1046
+ if (!checkAncestors)
1047
+ return false;
1027
1048
  return classMatchesRegex(index.parentNode(node2), regex, checkAncestors);
1028
1049
  }
1029
1050
  function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors) {
@@ -1041,18 +1062,23 @@ function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors)
1041
1062
  try {
1042
1063
  if (typeof maskTextClass === "string") {
1043
1064
  if (checkAncestors) {
1044
- if (el.closest(`.${maskTextClass}`)) return true;
1065
+ if (el.closest(`.${maskTextClass}`))
1066
+ return true;
1045
1067
  } else {
1046
- if (el.classList.contains(maskTextClass)) return true;
1068
+ if (el.classList.contains(maskTextClass))
1069
+ return true;
1047
1070
  }
1048
1071
  } else {
1049
- if (classMatchesRegex(el, maskTextClass, checkAncestors)) return true;
1072
+ if (classMatchesRegex(el, maskTextClass, checkAncestors))
1073
+ return true;
1050
1074
  }
1051
1075
  if (maskTextSelector) {
1052
1076
  if (checkAncestors) {
1053
- if (el.closest(maskTextSelector)) return true;
1077
+ if (el.closest(maskTextSelector))
1078
+ return true;
1054
1079
  } else {
1055
- if (el.matches(maskTextSelector)) return true;
1080
+ if (el.matches(maskTextSelector))
1081
+ return true;
1056
1082
  }
1057
1083
  }
1058
1084
  } catch (e) {
@@ -1100,7 +1126,8 @@ function onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {
1100
1126
  } catch (error) {
1101
1127
  return;
1102
1128
  }
1103
- if (styleSheetLoaded) return;
1129
+ if (styleSheetLoaded)
1130
+ return;
1104
1131
  const timer = setTimeout(() => {
1105
1132
  if (!fired) {
1106
1133
  listener();
@@ -1197,7 +1224,8 @@ function serializeNode(n, options) {
1197
1224
  }
1198
1225
  }
1199
1226
  function getRootId(doc, mirror) {
1200
- if (!mirror.hasNode(doc)) return void 0;
1227
+ if (!mirror.hasNode(doc))
1228
+ return void 0;
1201
1229
  const docId = mirror.getId(doc);
1202
1230
  return docId === 1 ? void 0 : docId;
1203
1231
  }
@@ -1358,7 +1386,8 @@ function serializeElementNode(n, options) {
1358
1386
  image.crossOrigin = "anonymous";
1359
1387
  if (image.complete && image.naturalWidth !== 0)
1360
1388
  recordInlineImage();
1361
- else image.addEventListener("load", recordInlineImage);
1389
+ else
1390
+ image.addEventListener("load", recordInlineImage);
1362
1391
  return;
1363
1392
  } else {
1364
1393
  console.warn(
@@ -1370,8 +1399,10 @@ function serializeElementNode(n, options) {
1370
1399
  priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute("crossorigin");
1371
1400
  }
1372
1401
  };
1373
- if (image.complete && image.naturalWidth !== 0) recordInlineImage();
1374
- else image.addEventListener("load", recordInlineImage);
1402
+ if (image.complete && image.naturalWidth !== 0)
1403
+ recordInlineImage();
1404
+ else
1405
+ image.addEventListener("load", recordInlineImage);
1375
1406
  }
1376
1407
  if (tagName === "audio" || tagName === "video") {
1377
1408
  const mediaAttributes = attributes;
@@ -1406,7 +1437,8 @@ function serializeElementNode(n, options) {
1406
1437
  }
1407
1438
  let isCustomElement;
1408
1439
  try {
1409
- if (customElements.get(tagName)) isCustomElement = true;
1440
+ if (customElements.get(tagName))
1441
+ isCustomElement = true;
1410
1442
  } catch (e) {
1411
1443
  }
1412
1444
  return {
@@ -1590,7 +1622,8 @@ function serializeNodeWithId(n, options) {
1590
1622
  keepIframeSrcFn,
1591
1623
  cssCaptured: false
1592
1624
  };
1593
- if (serializedNode.type === NodeType.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1625
+ if (serializedNode.type === NodeType.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0)
1626
+ ;
1594
1627
  else {
1595
1628
  if (serializedNode.type === NodeType.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1596
1629
  bypassOptions.cssCaptured = true;
@@ -1841,7 +1874,8 @@ function getDefaultExportFromCjs(x2) {
1841
1874
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1842
1875
  }
1843
1876
  function getAugmentedNamespace(n) {
1844
- if (n.__esModule) return n;
1877
+ if (n.__esModule)
1878
+ return n;
1845
1879
  var f = n.default;
1846
1880
  if (typeof f == "function") {
1847
1881
  var a = function a2() {
@@ -1851,7 +1885,8 @@ function getAugmentedNamespace(n) {
1851
1885
  return f.apply(this, arguments);
1852
1886
  };
1853
1887
  a.prototype = f.prototype;
1854
- } else a = {};
1888
+ } else
1889
+ a = {};
1855
1890
  Object.defineProperty(a, "__esModule", { value: true });
1856
1891
  Object.keys(n).forEach(function(k) {
1857
1892
  var d = Object.getOwnPropertyDescriptor(n, k);
@@ -1919,11 +1954,14 @@ let CssSyntaxError$3 = class CssSyntaxError extends Error {
1919
1954
  this.message += ": " + this.reason;
1920
1955
  }
1921
1956
  showSourceCode(color) {
1922
- if (!this.source) return "";
1957
+ if (!this.source)
1958
+ return "";
1923
1959
  let css = this.source;
1924
- if (color == null) color = pico.isColorSupported;
1960
+ if (color == null)
1961
+ color = pico.isColorSupported;
1925
1962
  if (terminalHighlight$1) {
1926
- if (color) css = terminalHighlight$1(css);
1963
+ if (color)
1964
+ css = terminalHighlight$1(css);
1927
1965
  }
1928
1966
  let lines = css.split(/\r?\n/);
1929
1967
  let start = Math.max(this.line - 3, 0);
@@ -2016,7 +2054,8 @@ let Stringifier$2 = class Stringifier {
2016
2054
  if (value.includes("\n")) {
2017
2055
  let indent = this.raw(node2, null, "indent");
2018
2056
  if (indent.length) {
2019
- for (let step = 0; step < depth; step++) value += indent;
2057
+ for (let step = 0; step < depth; step++)
2058
+ value += indent;
2020
2059
  }
2021
2060
  }
2022
2061
  return value;
@@ -2031,20 +2070,23 @@ let Stringifier$2 = class Stringifier {
2031
2070
  } else {
2032
2071
  after = this.raw(node2, "after", "emptyBody");
2033
2072
  }
2034
- if (after) this.builder(after);
2073
+ if (after)
2074
+ this.builder(after);
2035
2075
  this.builder("}", node2, "end");
2036
2076
  }
2037
2077
  body(node2) {
2038
2078
  let last = node2.nodes.length - 1;
2039
2079
  while (last > 0) {
2040
- if (node2.nodes[last].type !== "comment") break;
2080
+ if (node2.nodes[last].type !== "comment")
2081
+ break;
2041
2082
  last -= 1;
2042
2083
  }
2043
2084
  let semicolon = this.raw(node2, "semicolon");
2044
2085
  for (let i = 0; i < node2.nodes.length; i++) {
2045
2086
  let child = node2.nodes[i];
2046
2087
  let before = this.raw(child, "before");
2047
- if (before) this.builder(before);
2088
+ if (before)
2089
+ this.builder(before);
2048
2090
  this.stringify(child, last !== i || semicolon);
2049
2091
  }
2050
2092
  }
@@ -2059,7 +2101,8 @@ let Stringifier$2 = class Stringifier {
2059
2101
  if (node2.important) {
2060
2102
  string += node2.raws.important || " !important";
2061
2103
  }
2062
- if (semicolon) string += ";";
2104
+ if (semicolon)
2105
+ string += ";";
2063
2106
  this.builder(string, node2);
2064
2107
  }
2065
2108
  document(node2) {
@@ -2067,10 +2110,12 @@ let Stringifier$2 = class Stringifier {
2067
2110
  }
2068
2111
  raw(node2, own, detect) {
2069
2112
  let value;
2070
- if (!detect) detect = own;
2113
+ if (!detect)
2114
+ detect = own;
2071
2115
  if (own) {
2072
2116
  value = node2.raws[own];
2073
- if (typeof value !== "undefined") return value;
2117
+ if (typeof value !== "undefined")
2118
+ return value;
2074
2119
  }
2075
2120
  let parent = node2.parent;
2076
2121
  if (detect === "before") {
@@ -2081,9 +2126,11 @@ let Stringifier$2 = class Stringifier {
2081
2126
  return "";
2082
2127
  }
2083
2128
  }
2084
- if (!parent) return DEFAULT_RAW[detect];
2129
+ if (!parent)
2130
+ return DEFAULT_RAW[detect];
2085
2131
  let root2 = node2.root();
2086
- if (!root2.rawCache) root2.rawCache = {};
2132
+ if (!root2.rawCache)
2133
+ root2.rawCache = {};
2087
2134
  if (typeof root2.rawCache[detect] !== "undefined") {
2088
2135
  return root2.rawCache[detect];
2089
2136
  }
@@ -2096,11 +2143,13 @@ let Stringifier$2 = class Stringifier {
2096
2143
  } else {
2097
2144
  root2.walk((i) => {
2098
2145
  value = i.raws[own];
2099
- if (typeof value !== "undefined") return false;
2146
+ if (typeof value !== "undefined")
2147
+ return false;
2100
2148
  });
2101
2149
  }
2102
2150
  }
2103
- if (typeof value === "undefined") value = DEFAULT_RAW[detect];
2151
+ if (typeof value === "undefined")
2152
+ value = DEFAULT_RAW[detect];
2104
2153
  root2.rawCache[detect] = value;
2105
2154
  return value;
2106
2155
  }
@@ -2117,7 +2166,8 @@ let Stringifier$2 = class Stringifier {
2117
2166
  }
2118
2167
  }
2119
2168
  });
2120
- if (value) value = value.replace(/\S/g, "");
2169
+ if (value)
2170
+ value = value.replace(/\S/g, "");
2121
2171
  return value;
2122
2172
  }
2123
2173
  rawBeforeComment(root2, node2) {
@@ -2161,7 +2211,8 @@ let Stringifier$2 = class Stringifier {
2161
2211
  root2.walk((i) => {
2162
2212
  if (i.type !== "decl") {
2163
2213
  value = i.raws.between;
2164
- if (typeof value !== "undefined") return false;
2214
+ if (typeof value !== "undefined")
2215
+ return false;
2165
2216
  }
2166
2217
  });
2167
2218
  return value;
@@ -2179,7 +2230,8 @@ let Stringifier$2 = class Stringifier {
2179
2230
  }
2180
2231
  }
2181
2232
  });
2182
- if (value) value = value.replace(/\S/g, "");
2233
+ if (value)
2234
+ value = value.replace(/\S/g, "");
2183
2235
  return value;
2184
2236
  }
2185
2237
  rawColon(root2) {
@@ -2197,13 +2249,15 @@ let Stringifier$2 = class Stringifier {
2197
2249
  root2.walk((i) => {
2198
2250
  if (i.nodes && i.nodes.length === 0) {
2199
2251
  value = i.raws.after;
2200
- if (typeof value !== "undefined") return false;
2252
+ if (typeof value !== "undefined")
2253
+ return false;
2201
2254
  }
2202
2255
  });
2203
2256
  return value;
2204
2257
  }
2205
2258
  rawIndent(root2) {
2206
- if (root2.raws.indent) return root2.raws.indent;
2259
+ if (root2.raws.indent)
2260
+ return root2.raws.indent;
2207
2261
  let value;
2208
2262
  root2.walk((i) => {
2209
2263
  let p = i.parent;
@@ -2223,7 +2277,8 @@ let Stringifier$2 = class Stringifier {
2223
2277
  root2.walk((i) => {
2224
2278
  if (i.nodes && i.nodes.length && i.last.type === "decl") {
2225
2279
  value = i.raws.semicolon;
2226
- if (typeof value !== "undefined") return false;
2280
+ if (typeof value !== "undefined")
2281
+ return false;
2227
2282
  }
2228
2283
  });
2229
2284
  return value;
@@ -2238,7 +2293,8 @@ let Stringifier$2 = class Stringifier {
2238
2293
  }
2239
2294
  root(node2) {
2240
2295
  this.body(node2);
2241
- if (node2.raws.after) this.builder(node2.raws.after);
2296
+ if (node2.raws.after)
2297
+ this.builder(node2.raws.after);
2242
2298
  }
2243
2299
  rule(node2) {
2244
2300
  this.block(node2, this.rawValue(node2, "selector"));
@@ -2274,17 +2330,20 @@ function cloneNode(obj, parent) {
2274
2330
  if (!Object.prototype.hasOwnProperty.call(obj, i)) {
2275
2331
  continue;
2276
2332
  }
2277
- if (i === "proxyCache") continue;
2333
+ if (i === "proxyCache")
2334
+ continue;
2278
2335
  let value = obj[i];
2279
2336
  let type = typeof value;
2280
2337
  if (i === "parent" && type === "object") {
2281
- if (parent) cloned[i] = parent;
2338
+ if (parent)
2339
+ cloned[i] = parent;
2282
2340
  } else if (i === "source") {
2283
2341
  cloned[i] = value;
2284
2342
  } else if (Array.isArray(value)) {
2285
2343
  cloned[i] = value.map((j) => cloneNode(j, cloned));
2286
2344
  } else {
2287
- if (type === "object" && value !== null) value = cloneNode(value);
2345
+ if (type === "object" && value !== null)
2346
+ value = cloneNode(value);
2288
2347
  cloned[i] = value;
2289
2348
  }
2290
2349
  }
@@ -2338,7 +2397,8 @@ let Node$5 = class Node2 {
2338
2397
  cleanRaws(keepBetween) {
2339
2398
  delete this.raws.before;
2340
2399
  delete this.raws.after;
2341
- if (!keepBetween) delete this.raws.between;
2400
+ if (!keepBetween)
2401
+ delete this.raws.between;
2342
2402
  }
2343
2403
  clone(overrides = {}) {
2344
2404
  let cloned = cloneNode(this);
@@ -2381,7 +2441,8 @@ let Node$5 = class Node2 {
2381
2441
  }
2382
2442
  },
2383
2443
  set(node2, prop, value) {
2384
- if (node2[prop] === value) return true;
2444
+ if (node2[prop] === value)
2445
+ return true;
2385
2446
  node2[prop] = value;
2386
2447
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
2387
2448
  prop === "text") {
@@ -2401,7 +2462,8 @@ let Node$5 = class Node2 {
2401
2462
  }
2402
2463
  }
2403
2464
  next() {
2404
- if (!this.parent) return void 0;
2465
+ if (!this.parent)
2466
+ return void 0;
2405
2467
  let index2 = this.parent.index(this);
2406
2468
  return this.parent.nodes[index2 + 1];
2407
2469
  }
@@ -2412,7 +2474,8 @@ let Node$5 = class Node2 {
2412
2474
  } else if (opts.word) {
2413
2475
  stringRepresentation = this.toString();
2414
2476
  let index2 = stringRepresentation.indexOf(opts.word);
2415
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
2477
+ if (index2 !== -1)
2478
+ pos = this.positionInside(index2, stringRepresentation);
2416
2479
  }
2417
2480
  return pos;
2418
2481
  }
@@ -2431,7 +2494,8 @@ let Node$5 = class Node2 {
2431
2494
  return { column, line };
2432
2495
  }
2433
2496
  prev() {
2434
- if (!this.parent) return void 0;
2497
+ if (!this.parent)
2498
+ return void 0;
2435
2499
  let index2 = this.parent.index(this);
2436
2500
  return this.parent.nodes[index2 - 1];
2437
2501
  }
@@ -2526,7 +2590,8 @@ let Node$5 = class Node2 {
2526
2590
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
2527
2591
  continue;
2528
2592
  }
2529
- if (name === "parent" || name === "proxyCache") continue;
2593
+ if (name === "parent" || name === "proxyCache")
2594
+ continue;
2530
2595
  let value = this[name];
2531
2596
  if (Array.isArray(value)) {
2532
2597
  fixed[name] = value.map((i) => {
@@ -2566,7 +2631,8 @@ let Node$5 = class Node2 {
2566
2631
  return this.proxyCache;
2567
2632
  }
2568
2633
  toString(stringifier2 = stringify$3) {
2569
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
2634
+ if (stringifier2.stringify)
2635
+ stringifier2 = stringifier2.stringify;
2570
2636
  let result2 = "";
2571
2637
  stringifier2(this, (i) => {
2572
2638
  result2 += i;
@@ -2575,7 +2641,8 @@ let Node$5 = class Node2 {
2575
2641
  }
2576
2642
  warn(result2, text, opts) {
2577
2643
  let data = { node: this };
2578
- for (let i in opts) data[i] = opts[i];
2644
+ for (let i in opts)
2645
+ data[i] = opts[i];
2579
2646
  return result2.warn(text, data);
2580
2647
  }
2581
2648
  get proxyOf() {
@@ -2631,7 +2698,8 @@ function fromBase64(str) {
2631
2698
  }
2632
2699
  let PreviousMap$2 = class PreviousMap {
2633
2700
  constructor(css, opts) {
2634
- if (opts.map === false) return;
2701
+ if (opts.map === false)
2702
+ return;
2635
2703
  this.loadAnnotation(css);
2636
2704
  this.inline = this.startWith(this.annotation, "data:");
2637
2705
  let prev = opts.map ? opts.map.prev : void 0;
@@ -2639,8 +2707,10 @@ let PreviousMap$2 = class PreviousMap {
2639
2707
  if (!this.mapFile && opts.from) {
2640
2708
  this.mapFile = opts.from;
2641
2709
  }
2642
- if (this.mapFile) this.root = dirname$1(this.mapFile);
2643
- if (text) this.text = text;
2710
+ if (this.mapFile)
2711
+ this.root = dirname$1(this.mapFile);
2712
+ if (text)
2713
+ this.text = text;
2644
2714
  }
2645
2715
  consumer() {
2646
2716
  if (!this.consumerCache) {
@@ -2666,12 +2736,14 @@ let PreviousMap$2 = class PreviousMap {
2666
2736
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
2667
2737
  }
2668
2738
  isMap(map) {
2669
- if (typeof map !== "object") return false;
2739
+ if (typeof map !== "object")
2740
+ return false;
2670
2741
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
2671
2742
  }
2672
2743
  loadAnnotation(css) {
2673
2744
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
2674
- if (!comments) return;
2745
+ if (!comments)
2746
+ return;
2675
2747
  let start = css.lastIndexOf(comments.pop());
2676
2748
  let end = css.indexOf("*/", start);
2677
2749
  if (start > -1 && end > -1) {
@@ -2686,7 +2758,8 @@ let PreviousMap$2 = class PreviousMap {
2686
2758
  }
2687
2759
  }
2688
2760
  loadMap(file, prev) {
2689
- if (prev === false) return false;
2761
+ if (prev === false)
2762
+ return false;
2690
2763
  if (prev) {
2691
2764
  if (typeof prev === "string") {
2692
2765
  return prev;
@@ -2716,12 +2789,14 @@ let PreviousMap$2 = class PreviousMap {
2716
2789
  return this.decodeInline(this.annotation);
2717
2790
  } else if (this.annotation) {
2718
2791
  let map = this.annotation;
2719
- if (file) map = join(dirname$1(file), map);
2792
+ if (file)
2793
+ map = join(dirname$1(file), map);
2720
2794
  return this.loadFile(map);
2721
2795
  }
2722
2796
  }
2723
2797
  startWith(string, start) {
2724
- if (!string) return false;
2798
+ if (!string)
2799
+ return false;
2725
2800
  return string.substr(0, start.length) === start;
2726
2801
  }
2727
2802
  withContent() {
@@ -2764,13 +2839,15 @@ let Input$4 = class Input {
2764
2839
  if (map.text) {
2765
2840
  this.map = map;
2766
2841
  let file = map.consumer().file;
2767
- if (!this.file && file) this.file = this.mapResolve(file);
2842
+ if (!this.file && file)
2843
+ this.file = this.mapResolve(file);
2768
2844
  }
2769
2845
  }
2770
2846
  if (!this.file) {
2771
2847
  this.id = "<input css " + nanoid(6) + ">";
2772
2848
  }
2773
- if (this.map) this.map.file = this.from;
2849
+ if (this.map)
2850
+ this.map.file = this.from;
2774
2851
  }
2775
2852
  error(message, line, column, opts = {}) {
2776
2853
  let result2, endLine, endColumn;
@@ -2872,10 +2949,12 @@ let Input$4 = class Input {
2872
2949
  return resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
2873
2950
  }
2874
2951
  origin(line, column, endLine, endColumn) {
2875
- if (!this.map) return false;
2952
+ if (!this.map)
2953
+ return false;
2876
2954
  let consumer = this.map.consumer();
2877
2955
  let from = consumer.originalPositionFor({ column, line });
2878
- if (!from.source) return false;
2956
+ if (!from.source)
2957
+ return false;
2879
2958
  let to;
2880
2959
  if (typeof endLine === "number") {
2881
2960
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -2904,7 +2983,8 @@ let Input$4 = class Input {
2904
2983
  }
2905
2984
  }
2906
2985
  let source = consumer.sourceContentFor(from.source);
2907
- if (source) result2.source = source;
2986
+ if (source)
2987
+ result2.source = source;
2908
2988
  return result2;
2909
2989
  }
2910
2990
  toJSON() {
@@ -2962,7 +3042,8 @@ let MapGenerator$2 = class MapGenerator {
2962
3042
  content = this.outputFile() + ".map";
2963
3043
  }
2964
3044
  let eol = "\n";
2965
- if (this.css.includes("\r\n")) eol = "\r\n";
3045
+ if (this.css.includes("\r\n"))
3046
+ eol = "\r\n";
2966
3047
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
2967
3048
  }
2968
3049
  applyPrevMaps() {
@@ -2982,12 +3063,14 @@ let MapGenerator$2 = class MapGenerator {
2982
3063
  }
2983
3064
  }
2984
3065
  clearAnnotation() {
2985
- if (this.mapOpts.annotation === false) return;
3066
+ if (this.mapOpts.annotation === false)
3067
+ return;
2986
3068
  if (this.root) {
2987
3069
  let node2;
2988
3070
  for (let i = this.root.nodes.length - 1; i >= 0; i--) {
2989
3071
  node2 = this.root.nodes[i];
2990
- if (node2.type !== "comment") continue;
3072
+ if (node2.type !== "comment")
3073
+ continue;
2991
3074
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
2992
3075
  this.root.removeChild(i);
2993
3076
  }
@@ -3028,9 +3111,12 @@ let MapGenerator$2 = class MapGenerator {
3028
3111
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
3029
3112
  });
3030
3113
  }
3031
- if (this.isSourcesContent()) this.setSourcesContent();
3032
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
3033
- if (this.isAnnotation()) this.addAnnotation();
3114
+ if (this.isSourcesContent())
3115
+ this.setSourcesContent();
3116
+ if (this.root && this.previous().length > 0)
3117
+ this.applyPrevMaps();
3118
+ if (this.isAnnotation())
3119
+ this.addAnnotation();
3034
3120
  if (this.isInline()) {
3035
3121
  return [this.css];
3036
3122
  } else {
@@ -3150,11 +3236,15 @@ let MapGenerator$2 = class MapGenerator {
3150
3236
  }
3151
3237
  }
3152
3238
  path(file) {
3153
- if (this.mapOpts.absolute) return file;
3154
- if (file.charCodeAt(0) === 60) return file;
3155
- if (/^\w+:\/\//.test(file)) return file;
3239
+ if (this.mapOpts.absolute)
3240
+ return file;
3241
+ if (file.charCodeAt(0) === 60)
3242
+ return file;
3243
+ if (/^\w+:\/\//.test(file))
3244
+ return file;
3156
3245
  let cached = this.memoizedPaths.get(file);
3157
- if (cached) return cached;
3246
+ if (cached)
3247
+ return cached;
3158
3248
  let from = this.opts.to ? dirname(this.opts.to) : ".";
3159
3249
  if (typeof this.mapOpts.annotation === "string") {
3160
3250
  from = dirname(resolve(from, this.mapOpts.annotation));
@@ -3177,7 +3267,8 @@ let MapGenerator$2 = class MapGenerator {
3177
3267
  });
3178
3268
  } else {
3179
3269
  let input2 = new Input$3(this.originalCSS, this.opts);
3180
- if (input2.map) this.previousMaps.push(input2.map);
3270
+ if (input2.map)
3271
+ this.previousMaps.push(input2.map);
3181
3272
  }
3182
3273
  }
3183
3274
  return this.previousMaps;
@@ -3218,7 +3309,8 @@ let MapGenerator$2 = class MapGenerator {
3218
3309
  }
3219
3310
  toFileUrl(path) {
3220
3311
  let cached = this.memoizedFileURLs.get(path);
3221
- if (cached) return cached;
3312
+ if (cached)
3313
+ return cached;
3222
3314
  if (pathToFileURL) {
3223
3315
  let fileURL = pathToFileURL(path).toString();
3224
3316
  this.memoizedFileURLs.set(path, fileURL);
@@ -3231,7 +3323,8 @@ let MapGenerator$2 = class MapGenerator {
3231
3323
  }
3232
3324
  toUrl(path) {
3233
3325
  let cached = this.memoizedURLs.get(path);
3234
- if (cached) return cached;
3326
+ if (cached)
3327
+ return cached;
3235
3328
  if (sep === "\\") {
3236
3329
  path = path.replace(/\\/g, "/");
3237
3330
  }
@@ -3260,7 +3353,8 @@ let AtRule$4;
3260
3353
  let Root$6;
3261
3354
  function cleanSource(nodes) {
3262
3355
  return nodes.map((i) => {
3263
- if (i.nodes) i.nodes = cleanSource(i.nodes);
3356
+ if (i.nodes)
3357
+ i.nodes = cleanSource(i.nodes);
3264
3358
  delete i.source;
3265
3359
  return i;
3266
3360
  });
@@ -3277,7 +3371,8 @@ let Container$7 = class Container extends Node$2 {
3277
3371
  append(...children) {
3278
3372
  for (let child of children) {
3279
3373
  let nodes = this.normalize(child, this.last);
3280
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
3374
+ for (let node2 of nodes)
3375
+ this.proxyOf.nodes.push(node2);
3281
3376
  }
3282
3377
  this.markDirty();
3283
3378
  return this;
@@ -3285,17 +3380,20 @@ let Container$7 = class Container extends Node$2 {
3285
3380
  cleanRaws(keepBetween) {
3286
3381
  super.cleanRaws(keepBetween);
3287
3382
  if (this.nodes) {
3288
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
3383
+ for (let node2 of this.nodes)
3384
+ node2.cleanRaws(keepBetween);
3289
3385
  }
3290
3386
  }
3291
3387
  each(callback) {
3292
- if (!this.proxyOf.nodes) return void 0;
3388
+ if (!this.proxyOf.nodes)
3389
+ return void 0;
3293
3390
  let iterator = this.getIterator();
3294
3391
  let index2, result2;
3295
3392
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
3296
3393
  index2 = this.indexes[iterator];
3297
3394
  result2 = callback(this.proxyOf.nodes[index2], index2);
3298
- if (result2 === false) break;
3395
+ if (result2 === false)
3396
+ break;
3299
3397
  this.indexes[iterator] += 1;
3300
3398
  }
3301
3399
  delete this.indexes[iterator];
@@ -3305,8 +3403,10 @@ let Container$7 = class Container extends Node$2 {
3305
3403
  return this.nodes.every(condition);
3306
3404
  }
3307
3405
  getIterator() {
3308
- if (!this.lastEach) this.lastEach = 0;
3309
- if (!this.indexes) this.indexes = {};
3406
+ if (!this.lastEach)
3407
+ this.lastEach = 0;
3408
+ if (!this.indexes)
3409
+ this.indexes = {};
3310
3410
  this.lastEach += 1;
3311
3411
  let iterator = this.lastEach;
3312
3412
  this.indexes[iterator] = 0;
@@ -3348,7 +3448,8 @@ let Container$7 = class Container extends Node$2 {
3348
3448
  }
3349
3449
  },
3350
3450
  set(node2, prop, value) {
3351
- if (node2[prop] === value) return true;
3451
+ if (node2[prop] === value)
3452
+ return true;
3352
3453
  node2[prop] = value;
3353
3454
  if (prop === "name" || prop === "params" || prop === "selector") {
3354
3455
  node2.markDirty();
@@ -3358,15 +3459,18 @@ let Container$7 = class Container extends Node$2 {
3358
3459
  };
3359
3460
  }
3360
3461
  index(child) {
3361
- if (typeof child === "number") return child;
3362
- if (child.proxyOf) child = child.proxyOf;
3462
+ if (typeof child === "number")
3463
+ return child;
3464
+ if (child.proxyOf)
3465
+ child = child.proxyOf;
3363
3466
  return this.proxyOf.nodes.indexOf(child);
3364
3467
  }
3365
3468
  insertAfter(exist, add) {
3366
3469
  let existIndex = this.index(exist);
3367
3470
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
3368
3471
  existIndex = this.index(exist);
3369
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3472
+ for (let node2 of nodes)
3473
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3370
3474
  let index2;
3371
3475
  for (let id in this.indexes) {
3372
3476
  index2 = this.indexes[id];
@@ -3382,7 +3486,8 @@ let Container$7 = class Container extends Node$2 {
3382
3486
  let type = existIndex === 0 ? "prepend" : false;
3383
3487
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
3384
3488
  existIndex = this.index(exist);
3385
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
3489
+ for (let node2 of nodes)
3490
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
3386
3491
  let index2;
3387
3492
  for (let id in this.indexes) {
3388
3493
  index2 = this.indexes[id];
@@ -3401,12 +3506,14 @@ let Container$7 = class Container extends Node$2 {
3401
3506
  } else if (Array.isArray(nodes)) {
3402
3507
  nodes = nodes.slice(0);
3403
3508
  for (let i of nodes) {
3404
- if (i.parent) i.parent.removeChild(i, "ignore");
3509
+ if (i.parent)
3510
+ i.parent.removeChild(i, "ignore");
3405
3511
  }
3406
3512
  } else if (nodes.type === "root" && this.type !== "document") {
3407
3513
  nodes = nodes.nodes.slice(0);
3408
3514
  for (let i of nodes) {
3409
- if (i.parent) i.parent.removeChild(i, "ignore");
3515
+ if (i.parent)
3516
+ i.parent.removeChild(i, "ignore");
3410
3517
  }
3411
3518
  } else if (nodes.type) {
3412
3519
  nodes = [nodes];
@@ -3427,10 +3534,13 @@ let Container$7 = class Container extends Node$2 {
3427
3534
  throw new Error("Unknown node type in node creation");
3428
3535
  }
3429
3536
  let processed = nodes.map((i) => {
3430
- if (!i[my$1]) Container.rebuild(i);
3537
+ if (!i[my$1])
3538
+ Container.rebuild(i);
3431
3539
  i = i.proxyOf;
3432
- if (i.parent) i.parent.removeChild(i);
3433
- if (i[isClean$1]) markDirtyUp(i);
3540
+ if (i.parent)
3541
+ i.parent.removeChild(i);
3542
+ if (i[isClean$1])
3543
+ markDirtyUp(i);
3434
3544
  if (typeof i.raws.before === "undefined") {
3435
3545
  if (sample && typeof sample.raws.before !== "undefined") {
3436
3546
  i.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -3445,7 +3555,8 @@ let Container$7 = class Container extends Node$2 {
3445
3555
  children = children.reverse();
3446
3556
  for (let child of children) {
3447
3557
  let nodes = this.normalize(child, this.first, "prepend").reverse();
3448
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
3558
+ for (let node2 of nodes)
3559
+ this.proxyOf.nodes.unshift(node2);
3449
3560
  for (let id in this.indexes) {
3450
3561
  this.indexes[id] = this.indexes[id] + nodes.length;
3451
3562
  }
@@ -3459,7 +3570,8 @@ let Container$7 = class Container extends Node$2 {
3459
3570
  return this;
3460
3571
  }
3461
3572
  removeAll() {
3462
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
3573
+ for (let node2 of this.proxyOf.nodes)
3574
+ node2.parent = void 0;
3463
3575
  this.proxyOf.nodes = [];
3464
3576
  this.markDirty();
3465
3577
  return this;
@@ -3484,8 +3596,10 @@ let Container$7 = class Container extends Node$2 {
3484
3596
  opts = {};
3485
3597
  }
3486
3598
  this.walkDecls((decl) => {
3487
- if (opts.props && !opts.props.includes(decl.prop)) return;
3488
- if (opts.fast && !decl.value.includes(opts.fast)) return;
3599
+ if (opts.props && !opts.props.includes(decl.prop))
3600
+ return;
3601
+ if (opts.fast && !decl.value.includes(opts.fast))
3602
+ return;
3489
3603
  decl.value = decl.value.replace(pattern, callback);
3490
3604
  });
3491
3605
  this.markDirty();
@@ -3582,11 +3696,13 @@ let Container$7 = class Container extends Node$2 {
3582
3696
  });
3583
3697
  }
3584
3698
  get first() {
3585
- if (!this.proxyOf.nodes) return void 0;
3699
+ if (!this.proxyOf.nodes)
3700
+ return void 0;
3586
3701
  return this.proxyOf.nodes[0];
3587
3702
  }
3588
3703
  get last() {
3589
- if (!this.proxyOf.nodes) return void 0;
3704
+ if (!this.proxyOf.nodes)
3705
+ return void 0;
3590
3706
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
3591
3707
  }
3592
3708
  };
@@ -3648,7 +3764,8 @@ var document$1 = Document$3;
3648
3764
  Document$3.default = Document$3;
3649
3765
  let printed = {};
3650
3766
  var warnOnce$2 = function warnOnce(message) {
3651
- if (printed[message]) return;
3767
+ if (printed[message])
3768
+ return;
3652
3769
  printed[message] = true;
3653
3770
  if (typeof console !== "undefined" && console.warn) {
3654
3771
  console.warn(message);
@@ -3665,7 +3782,8 @@ let Warning$2 = class Warning {
3665
3782
  this.endLine = range.end.line;
3666
3783
  this.endColumn = range.end.column;
3667
3784
  }
3668
- for (let opt in opts) this[opt] = opts[opt];
3785
+ for (let opt in opts)
3786
+ this[opt] = opts[opt];
3669
3787
  }
3670
3788
  toString() {
3671
3789
  if (this.node) {
@@ -3757,8 +3875,10 @@ var tokenize = function tokenizer(input2, options = {}) {
3757
3875
  return returned.length === 0 && pos >= length;
3758
3876
  }
3759
3877
  function nextToken(opts) {
3760
- if (returned.length) return returned.pop();
3761
- if (pos >= length) return;
3878
+ if (returned.length)
3879
+ return returned.pop();
3880
+ if (pos >= length)
3881
+ return;
3762
3882
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
3763
3883
  code = css.charCodeAt(pos);
3764
3884
  switch (code) {
@@ -3930,11 +4050,13 @@ let AtRule$3 = class AtRule extends Container$5 {
3930
4050
  this.type = "atrule";
3931
4051
  }
3932
4052
  append(...children) {
3933
- if (!this.proxyOf.nodes) this.nodes = [];
4053
+ if (!this.proxyOf.nodes)
4054
+ this.nodes = [];
3934
4055
  return super.append(...children);
3935
4056
  }
3936
4057
  prepend(...children) {
3937
- if (!this.proxyOf.nodes) this.nodes = [];
4058
+ if (!this.proxyOf.nodes)
4059
+ this.nodes = [];
3938
4060
  return super.prepend(...children);
3939
4061
  }
3940
4062
  };
@@ -3948,7 +4070,8 @@ let Root$5 = class Root extends Container$4 {
3948
4070
  constructor(defaults) {
3949
4071
  super(defaults);
3950
4072
  this.type = "root";
3951
- if (!this.nodes) this.nodes = [];
4073
+ if (!this.nodes)
4074
+ this.nodes = [];
3952
4075
  }
3953
4076
  normalize(child, sample, type) {
3954
4077
  let nodes = super.normalize(child);
@@ -4019,19 +4142,23 @@ let list$2 = {
4019
4142
  } else if (letter === "(") {
4020
4143
  func += 1;
4021
4144
  } else if (letter === ")") {
4022
- if (func > 0) func -= 1;
4145
+ if (func > 0)
4146
+ func -= 1;
4023
4147
  } else if (func === 0) {
4024
- if (separators.includes(letter)) split = true;
4148
+ if (separators.includes(letter))
4149
+ split = true;
4025
4150
  }
4026
4151
  if (split) {
4027
- if (current !== "") array.push(current.trim());
4152
+ if (current !== "")
4153
+ array.push(current.trim());
4028
4154
  current = "";
4029
4155
  split = false;
4030
4156
  } else {
4031
4157
  current += letter;
4032
4158
  }
4033
4159
  }
4034
- if (last || current !== "") array.push(current.trim());
4160
+ if (last || current !== "")
4161
+ array.push(current.trim());
4035
4162
  return array;
4036
4163
  }
4037
4164
  };
@@ -4043,7 +4170,8 @@ let Rule$3 = class Rule extends Container$3 {
4043
4170
  constructor(defaults) {
4044
4171
  super(defaults);
4045
4172
  this.type = "rule";
4046
- if (!this.nodes) this.nodes = [];
4173
+ if (!this.nodes)
4174
+ this.nodes = [];
4047
4175
  }
4048
4176
  get selectors() {
4049
4177
  return list$1.comma(this.selector);
@@ -4071,7 +4199,8 @@ function findLastWithPosition(tokens) {
4071
4199
  for (let i = tokens.length - 1; i >= 0; i--) {
4072
4200
  let token = tokens[i];
4073
4201
  let pos = token[3] || token[2];
4074
- if (pos) return pos;
4202
+ if (pos)
4203
+ return pos;
4075
4204
  }
4076
4205
  }
4077
4206
  let Parser$1 = class Parser {
@@ -4164,14 +4293,16 @@ let Parser$1 = class Parser {
4164
4293
  }
4165
4294
  checkMissedSemicolon(tokens) {
4166
4295
  let colon = this.colon(tokens);
4167
- if (colon === false) return;
4296
+ if (colon === false)
4297
+ return;
4168
4298
  let founded = 0;
4169
4299
  let token;
4170
4300
  for (let j = colon - 1; j >= 0; j--) {
4171
4301
  token = tokens[j];
4172
4302
  if (token[0] !== "space") {
4173
4303
  founded += 1;
4174
- if (founded === 2) break;
4304
+ if (founded === 2)
4305
+ break;
4175
4306
  }
4176
4307
  }
4177
4308
  throw this.input.error(
@@ -4237,7 +4368,8 @@ let Parser$1 = class Parser {
4237
4368
  );
4238
4369
  node2.source.end.offset++;
4239
4370
  while (tokens[0][0] !== "word") {
4240
- if (tokens.length === 1) this.unknownWord(tokens);
4371
+ if (tokens.length === 1)
4372
+ this.unknownWord(tokens);
4241
4373
  node2.raws.before += tokens.shift()[1];
4242
4374
  }
4243
4375
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -4271,7 +4403,8 @@ let Parser$1 = class Parser {
4271
4403
  let next;
4272
4404
  while (tokens.length) {
4273
4405
  next = tokens[0][0];
4274
- if (next !== "space" && next !== "comment") break;
4406
+ if (next !== "space" && next !== "comment")
4407
+ break;
4275
4408
  firstSpaces.push(tokens.shift());
4276
4409
  }
4277
4410
  this.precheckMissedSemicolon(tokens);
@@ -4281,7 +4414,8 @@ let Parser$1 = class Parser {
4281
4414
  node2.important = true;
4282
4415
  let string = this.stringFrom(tokens, i);
4283
4416
  string = this.spacesFromEnd(tokens) + string;
4284
- if (string !== " !important") node2.raws.important = string;
4417
+ if (string !== " !important")
4418
+ node2.raws.important = string;
4285
4419
  break;
4286
4420
  } else if (token[1].toLowerCase() === "important") {
4287
4421
  let cache = tokens.slice(0);
@@ -4343,7 +4477,8 @@ let Parser$1 = class Parser {
4343
4477
  }
4344
4478
  }
4345
4479
  endFile() {
4346
- if (this.current.parent) this.unclosedBlock();
4480
+ if (this.current.parent)
4481
+ this.unclosedBlock();
4347
4482
  if (this.current.nodes && this.current.nodes.length) {
4348
4483
  this.current.raws.semicolon = this.semicolon;
4349
4484
  }
@@ -4377,7 +4512,8 @@ let Parser$1 = class Parser {
4377
4512
  };
4378
4513
  node2.raws.before = this.spaces;
4379
4514
  this.spaces = "";
4380
- if (node2.type !== "comment") this.semicolon = false;
4515
+ if (node2.type !== "comment")
4516
+ this.semicolon = false;
4381
4517
  }
4382
4518
  other(start) {
4383
4519
  let end = false;
@@ -4392,10 +4528,12 @@ let Parser$1 = class Parser {
4392
4528
  type = token[0];
4393
4529
  tokens.push(token);
4394
4530
  if (type === "(" || type === "[") {
4395
- if (!bracket) bracket = token;
4531
+ if (!bracket)
4532
+ bracket = token;
4396
4533
  brackets.push(type === "(" ? ")" : "]");
4397
4534
  } else if (customProperty && colon && type === "{") {
4398
- if (!bracket) bracket = token;
4535
+ if (!bracket)
4536
+ bracket = token;
4399
4537
  brackets.push("}");
4400
4538
  } else if (brackets.length === 0) {
4401
4539
  if (type === ";") {
@@ -4417,17 +4555,21 @@ let Parser$1 = class Parser {
4417
4555
  }
4418
4556
  } else if (type === brackets[brackets.length - 1]) {
4419
4557
  brackets.pop();
4420
- if (brackets.length === 0) bracket = null;
4558
+ if (brackets.length === 0)
4559
+ bracket = null;
4421
4560
  }
4422
4561
  token = this.tokenizer.nextToken();
4423
4562
  }
4424
- if (this.tokenizer.endOfFile()) end = true;
4425
- if (brackets.length > 0) this.unclosedBracket(bracket);
4563
+ if (this.tokenizer.endOfFile())
4564
+ end = true;
4565
+ if (brackets.length > 0)
4566
+ this.unclosedBracket(bracket);
4426
4567
  if (end && colon) {
4427
4568
  if (!customProperty) {
4428
4569
  while (tokens.length) {
4429
4570
  token = tokens[tokens.length - 1][0];
4430
- if (token !== "space" && token !== "comment") break;
4571
+ if (token !== "space" && token !== "comment")
4572
+ break;
4431
4573
  this.tokenizer.back(tokens.pop());
4432
4574
  }
4433
4575
  }
@@ -4514,7 +4656,8 @@ let Parser$1 = class Parser {
4514
4656
  let spaces = "";
4515
4657
  while (tokens.length) {
4516
4658
  lastTokenType = tokens[tokens.length - 1][0];
4517
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
4659
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
4660
+ break;
4518
4661
  spaces = tokens.pop()[1] + spaces;
4519
4662
  }
4520
4663
  return spaces;
@@ -4525,7 +4668,8 @@ let Parser$1 = class Parser {
4525
4668
  let spaces = "";
4526
4669
  while (tokens.length) {
4527
4670
  next = tokens[0][0];
4528
- if (next !== "space" && next !== "comment") break;
4671
+ if (next !== "space" && next !== "comment")
4672
+ break;
4529
4673
  spaces += tokens.shift()[1];
4530
4674
  }
4531
4675
  return spaces;
@@ -4535,7 +4679,8 @@ let Parser$1 = class Parser {
4535
4679
  let spaces = "";
4536
4680
  while (tokens.length) {
4537
4681
  lastTokenType = tokens[tokens.length - 1][0];
4538
- if (lastTokenType !== "space") break;
4682
+ if (lastTokenType !== "space")
4683
+ break;
4539
4684
  spaces = tokens.pop()[1] + spaces;
4540
4685
  }
4541
4686
  return spaces;
@@ -4697,7 +4842,8 @@ function toStack(node2) {
4697
4842
  }
4698
4843
  function cleanMarks(node2) {
4699
4844
  node2[isClean] = false;
4700
- if (node2.nodes) node2.nodes.forEach((i) => cleanMarks(i));
4845
+ if (node2.nodes)
4846
+ node2.nodes.forEach((i) => cleanMarks(i));
4701
4847
  return node2;
4702
4848
  }
4703
4849
  let postcss$2 = {};
@@ -4711,15 +4857,20 @@ let LazyResult$2 = class LazyResult {
4711
4857
  } else if (css instanceof LazyResult || css instanceof Result$2) {
4712
4858
  root2 = cleanMarks(css.root);
4713
4859
  if (css.map) {
4714
- if (typeof opts.map === "undefined") opts.map = {};
4715
- if (!opts.map.inline) opts.map.inline = false;
4860
+ if (typeof opts.map === "undefined")
4861
+ opts.map = {};
4862
+ if (!opts.map.inline)
4863
+ opts.map.inline = false;
4716
4864
  opts.map.prev = css.map;
4717
4865
  }
4718
4866
  } else {
4719
4867
  let parser2 = parse$2;
4720
- if (opts.syntax) parser2 = opts.syntax.parse;
4721
- if (opts.parser) parser2 = opts.parser;
4722
- if (parser2.parse) parser2 = parser2.parse;
4868
+ if (opts.syntax)
4869
+ parser2 = opts.syntax.parse;
4870
+ if (opts.parser)
4871
+ parser2 = opts.parser;
4872
+ if (parser2.parse)
4873
+ parser2 = parser2.parse;
4723
4874
  try {
4724
4875
  root2 = parser2(css, opts);
4725
4876
  } catch (error) {
@@ -4741,8 +4892,10 @@ let LazyResult$2 = class LazyResult {
4741
4892
  });
4742
4893
  }
4743
4894
  async() {
4744
- if (this.error) return Promise.reject(this.error);
4745
- if (this.processed) return Promise.resolve(this.result);
4895
+ if (this.error)
4896
+ return Promise.reject(this.error);
4897
+ if (this.processed)
4898
+ return Promise.resolve(this.result);
4746
4899
  if (!this.processing) {
4747
4900
  this.processing = this.runAsync();
4748
4901
  }
@@ -4760,7 +4913,8 @@ let LazyResult$2 = class LazyResult {
4760
4913
  handleError(error, node2) {
4761
4914
  let plugin2 = this.result.lastPlugin;
4762
4915
  try {
4763
- if (node2) node2.addToError(error);
4916
+ if (node2)
4917
+ node2.addToError(error);
4764
4918
  this.error = error;
4765
4919
  if (error.name === "CssSyntaxError" && !error.plugin) {
4766
4920
  error.plugin = plugin2.postcssPlugin;
@@ -4780,14 +4934,16 @@ let LazyResult$2 = class LazyResult {
4780
4934
  }
4781
4935
  }
4782
4936
  } catch (err) {
4783
- if (console && console.error) console.error(err);
4937
+ if (console && console.error)
4938
+ console.error(err);
4784
4939
  }
4785
4940
  return error;
4786
4941
  }
4787
4942
  prepareVisitors() {
4788
4943
  this.listeners = {};
4789
4944
  let add = (plugin2, type, cb) => {
4790
- if (!this.listeners[type]) this.listeners[type] = [];
4945
+ if (!this.listeners[type])
4946
+ this.listeners[type] = [];
4791
4947
  this.listeners[type].push([plugin2, cb]);
4792
4948
  };
4793
4949
  for (let plugin2 of this.plugins) {
@@ -4894,15 +5050,20 @@ let LazyResult$2 = class LazyResult {
4894
5050
  }
4895
5051
  }
4896
5052
  stringify() {
4897
- if (this.error) throw this.error;
4898
- if (this.stringified) return this.result;
5053
+ if (this.error)
5054
+ throw this.error;
5055
+ if (this.stringified)
5056
+ return this.result;
4899
5057
  this.stringified = true;
4900
5058
  this.sync();
4901
5059
  let opts = this.result.opts;
4902
5060
  let str = stringify$2;
4903
- if (opts.syntax) str = opts.syntax.stringify;
4904
- if (opts.stringifier) str = opts.stringifier;
4905
- if (str.stringify) str = str.stringify;
5061
+ if (opts.syntax)
5062
+ str = opts.syntax.stringify;
5063
+ if (opts.stringifier)
5064
+ str = opts.stringifier;
5065
+ if (str.stringify)
5066
+ str = str.stringify;
4906
5067
  let map = new MapGenerator$1(str, this.result.root, this.result.opts);
4907
5068
  let data = map.generate();
4908
5069
  this.result.css = data[0];
@@ -4910,8 +5071,10 @@ let LazyResult$2 = class LazyResult {
4910
5071
  return this.result;
4911
5072
  }
4912
5073
  sync() {
4913
- if (this.error) throw this.error;
4914
- if (this.processed) return this.result;
5074
+ if (this.error)
5075
+ throw this.error;
5076
+ if (this.processed)
5077
+ return this.result;
4915
5078
  this.processed = true;
4916
5079
  if (this.processing) {
4917
5080
  throw this.getAsyncError();
@@ -5030,13 +5193,15 @@ let LazyResult$2 = class LazyResult {
5030
5193
  if (event === CHILDREN) {
5031
5194
  if (node2.nodes) {
5032
5195
  node2.each((child) => {
5033
- if (!child[isClean]) this.walkSync(child);
5196
+ if (!child[isClean])
5197
+ this.walkSync(child);
5034
5198
  });
5035
5199
  }
5036
5200
  } else {
5037
5201
  let visitors = this.listeners[event];
5038
5202
  if (visitors) {
5039
- if (this.visitSync(visitors, node2.toProxy())) return;
5203
+ if (this.visitSync(visitors, node2.toProxy()))
5204
+ return;
5040
5205
  }
5041
5206
  }
5042
5207
  }
@@ -5114,7 +5279,8 @@ let NoWorkResult$1 = class NoWorkResult {
5114
5279
  }
5115
5280
  }
5116
5281
  async() {
5117
- if (this.error) return Promise.reject(this.error);
5282
+ if (this.error)
5283
+ return Promise.reject(this.error);
5118
5284
  return Promise.resolve(this.result);
5119
5285
  }
5120
5286
  catch(onRejected) {
@@ -5124,7 +5290,8 @@ let NoWorkResult$1 = class NoWorkResult {
5124
5290
  return this.async().then(onFinally, onFinally);
5125
5291
  }
5126
5292
  sync() {
5127
- if (this.error) throw this.error;
5293
+ if (this.error)
5294
+ throw this.error;
5128
5295
  return this.result;
5129
5296
  }
5130
5297
  then(onFulfilled, onRejected) {
@@ -5244,7 +5411,8 @@ let Input$1 = input;
5244
5411
  let Root$1 = root;
5245
5412
  let Rule$1 = rule;
5246
5413
  function fromJSON$1(json, inputs) {
5247
- if (Array.isArray(json)) return json.map((n) => fromJSON$1(n));
5414
+ if (Array.isArray(json))
5415
+ return json.map((n) => fromJSON$1(n));
5248
5416
  let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
5249
5417
  if (ownInputs) {
5250
5418
  inputs = [];
@@ -5330,7 +5498,8 @@ postcss.plugin = function plugin(name, initializer) {
5330
5498
  let cache;
5331
5499
  Object.defineProperty(creator, "postcss", {
5332
5500
  get() {
5333
- if (!cache) cache = creator();
5501
+ if (!cache)
5502
+ cache = creator();
5334
5503
  return cache;
5335
5504
  }
5336
5505
  });
@@ -5439,7 +5608,8 @@ function getTagName(n) {
5439
5608
  }
5440
5609
  function adaptCssForReplay(cssText, cache) {
5441
5610
  const cachedStyle = cache == null ? void 0 : cache.stylesWithHoverClass.get(cssText);
5442
- if (cachedStyle) return cachedStyle;
5611
+ if (cachedStyle)
5612
+ return cachedStyle;
5443
5613
  let result2 = cssText;
5444
5614
  try {
5445
5615
  const ast = postcss$1([
@@ -5560,12 +5730,14 @@ function buildNode(n, options) {
5560
5730
  if (value === null) {
5561
5731
  continue;
5562
5732
  }
5563
- if (value === true) value = "";
5733
+ if (value === true)
5734
+ value = "";
5564
5735
  if (name.startsWith("rr_")) {
5565
5736
  specialAttributes[name] = value;
5566
5737
  continue;
5567
5738
  }
5568
- if (typeof value !== "string") ;
5739
+ if (typeof value !== "string")
5740
+ ;
5569
5741
  else if (tagName === "style" && name === "_cssText") {
5570
5742
  buildStyleNode(n, node2, value, options);
5571
5743
  continue;
@@ -5688,7 +5860,8 @@ function buildNodeWithSN(n, options) {
5688
5860
  if (mirror.has(n.id)) {
5689
5861
  const nodeInMirror = mirror.getNode(n.id);
5690
5862
  const meta = mirror.getMeta(nodeInMirror);
5691
- if (isNodeMetaEqual(meta, n)) return mirror.getNode(n.id);
5863
+ if (isNodeMetaEqual(meta, n))
5864
+ return mirror.getNode(n.id);
5692
5865
  }
5693
5866
  let node2 = buildNode(n, { doc, hackCss, cache });
5694
5867
  if (!node2) {
@@ -5734,7 +5907,8 @@ function buildNodeWithSN(n, options) {
5734
5907
  const htmlElement = childNode;
5735
5908
  let body = null;
5736
5909
  htmlElement.childNodes.forEach((child) => {
5737
- if (child.nodeName === "BODY") body = child;
5910
+ if (child.nodeName === "BODY")
5911
+ body = child;
5738
5912
  });
5739
5913
  if (body) {
5740
5914
  htmlElement.removeChild(body);