@appsurify-testmap/rrdom-nodejs 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.
@@ -133,7 +133,8 @@ function getDefaultExportFromCjs(x2) {
133
133
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
134
134
  }
135
135
  function getAugmentedNamespace(n) {
136
- if (n.__esModule) return n;
136
+ if (n.__esModule)
137
+ return n;
137
138
  var f = n.default;
138
139
  if (typeof f == "function") {
139
140
  var a = function a2() {
@@ -143,7 +144,8 @@ function getAugmentedNamespace(n) {
143
144
  return f.apply(this, arguments);
144
145
  };
145
146
  a.prototype = f.prototype;
146
- } else a = {};
147
+ } else
148
+ a = {};
147
149
  Object.defineProperty(a, "__esModule", { value: true });
148
150
  Object.keys(n).forEach(function(k) {
149
151
  var d = Object.getOwnPropertyDescriptor(n, k);
@@ -211,11 +213,14 @@ let CssSyntaxError$3 = class CssSyntaxError extends Error {
211
213
  this.message += ": " + this.reason;
212
214
  }
213
215
  showSourceCode(color) {
214
- if (!this.source) return "";
216
+ if (!this.source)
217
+ return "";
215
218
  let css = this.source;
216
- if (color == null) color = pico.isColorSupported;
219
+ if (color == null)
220
+ color = pico.isColorSupported;
217
221
  if (terminalHighlight$1) {
218
- if (color) css = terminalHighlight$1(css);
222
+ if (color)
223
+ css = terminalHighlight$1(css);
219
224
  }
220
225
  let lines = css.split(/\r?\n/);
221
226
  let start = Math.max(this.line - 3, 0);
@@ -308,7 +313,8 @@ let Stringifier$2 = class Stringifier {
308
313
  if (value.includes("\n")) {
309
314
  let indent = this.raw(node2, null, "indent");
310
315
  if (indent.length) {
311
- for (let step = 0; step < depth; step++) value += indent;
316
+ for (let step = 0; step < depth; step++)
317
+ value += indent;
312
318
  }
313
319
  }
314
320
  return value;
@@ -323,20 +329,23 @@ let Stringifier$2 = class Stringifier {
323
329
  } else {
324
330
  after = this.raw(node2, "after", "emptyBody");
325
331
  }
326
- if (after) this.builder(after);
332
+ if (after)
333
+ this.builder(after);
327
334
  this.builder("}", node2, "end");
328
335
  }
329
336
  body(node2) {
330
337
  let last = node2.nodes.length - 1;
331
338
  while (last > 0) {
332
- if (node2.nodes[last].type !== "comment") break;
339
+ if (node2.nodes[last].type !== "comment")
340
+ break;
333
341
  last -= 1;
334
342
  }
335
343
  let semicolon = this.raw(node2, "semicolon");
336
344
  for (let i = 0; i < node2.nodes.length; i++) {
337
345
  let child = node2.nodes[i];
338
346
  let before = this.raw(child, "before");
339
- if (before) this.builder(before);
347
+ if (before)
348
+ this.builder(before);
340
349
  this.stringify(child, last !== i || semicolon);
341
350
  }
342
351
  }
@@ -351,7 +360,8 @@ let Stringifier$2 = class Stringifier {
351
360
  if (node2.important) {
352
361
  string += node2.raws.important || " !important";
353
362
  }
354
- if (semicolon) string += ";";
363
+ if (semicolon)
364
+ string += ";";
355
365
  this.builder(string, node2);
356
366
  }
357
367
  document(node2) {
@@ -359,10 +369,12 @@ let Stringifier$2 = class Stringifier {
359
369
  }
360
370
  raw(node2, own, detect) {
361
371
  let value;
362
- if (!detect) detect = own;
372
+ if (!detect)
373
+ detect = own;
363
374
  if (own) {
364
375
  value = node2.raws[own];
365
- if (typeof value !== "undefined") return value;
376
+ if (typeof value !== "undefined")
377
+ return value;
366
378
  }
367
379
  let parent = node2.parent;
368
380
  if (detect === "before") {
@@ -373,9 +385,11 @@ let Stringifier$2 = class Stringifier {
373
385
  return "";
374
386
  }
375
387
  }
376
- if (!parent) return DEFAULT_RAW[detect];
388
+ if (!parent)
389
+ return DEFAULT_RAW[detect];
377
390
  let root2 = node2.root();
378
- if (!root2.rawCache) root2.rawCache = {};
391
+ if (!root2.rawCache)
392
+ root2.rawCache = {};
379
393
  if (typeof root2.rawCache[detect] !== "undefined") {
380
394
  return root2.rawCache[detect];
381
395
  }
@@ -388,11 +402,13 @@ let Stringifier$2 = class Stringifier {
388
402
  } else {
389
403
  root2.walk((i) => {
390
404
  value = i.raws[own];
391
- if (typeof value !== "undefined") return false;
405
+ if (typeof value !== "undefined")
406
+ return false;
392
407
  });
393
408
  }
394
409
  }
395
- if (typeof value === "undefined") value = DEFAULT_RAW[detect];
410
+ if (typeof value === "undefined")
411
+ value = DEFAULT_RAW[detect];
396
412
  root2.rawCache[detect] = value;
397
413
  return value;
398
414
  }
@@ -409,7 +425,8 @@ let Stringifier$2 = class Stringifier {
409
425
  }
410
426
  }
411
427
  });
412
- if (value) value = value.replace(/\S/g, "");
428
+ if (value)
429
+ value = value.replace(/\S/g, "");
413
430
  return value;
414
431
  }
415
432
  rawBeforeComment(root2, node2) {
@@ -453,7 +470,8 @@ let Stringifier$2 = class Stringifier {
453
470
  root2.walk((i) => {
454
471
  if (i.type !== "decl") {
455
472
  value = i.raws.between;
456
- if (typeof value !== "undefined") return false;
473
+ if (typeof value !== "undefined")
474
+ return false;
457
475
  }
458
476
  });
459
477
  return value;
@@ -471,7 +489,8 @@ let Stringifier$2 = class Stringifier {
471
489
  }
472
490
  }
473
491
  });
474
- if (value) value = value.replace(/\S/g, "");
492
+ if (value)
493
+ value = value.replace(/\S/g, "");
475
494
  return value;
476
495
  }
477
496
  rawColon(root2) {
@@ -489,13 +508,15 @@ let Stringifier$2 = class Stringifier {
489
508
  root2.walk((i) => {
490
509
  if (i.nodes && i.nodes.length === 0) {
491
510
  value = i.raws.after;
492
- if (typeof value !== "undefined") return false;
511
+ if (typeof value !== "undefined")
512
+ return false;
493
513
  }
494
514
  });
495
515
  return value;
496
516
  }
497
517
  rawIndent(root2) {
498
- if (root2.raws.indent) return root2.raws.indent;
518
+ if (root2.raws.indent)
519
+ return root2.raws.indent;
499
520
  let value;
500
521
  root2.walk((i) => {
501
522
  let p = i.parent;
@@ -515,7 +536,8 @@ let Stringifier$2 = class Stringifier {
515
536
  root2.walk((i) => {
516
537
  if (i.nodes && i.nodes.length && i.last.type === "decl") {
517
538
  value = i.raws.semicolon;
518
- if (typeof value !== "undefined") return false;
539
+ if (typeof value !== "undefined")
540
+ return false;
519
541
  }
520
542
  });
521
543
  return value;
@@ -530,7 +552,8 @@ let Stringifier$2 = class Stringifier {
530
552
  }
531
553
  root(node2) {
532
554
  this.body(node2);
533
- if (node2.raws.after) this.builder(node2.raws.after);
555
+ if (node2.raws.after)
556
+ this.builder(node2.raws.after);
534
557
  }
535
558
  rule(node2) {
536
559
  this.block(node2, this.rawValue(node2, "selector"));
@@ -566,17 +589,20 @@ function cloneNode(obj, parent) {
566
589
  if (!Object.prototype.hasOwnProperty.call(obj, i)) {
567
590
  continue;
568
591
  }
569
- if (i === "proxyCache") continue;
592
+ if (i === "proxyCache")
593
+ continue;
570
594
  let value = obj[i];
571
595
  let type = typeof value;
572
596
  if (i === "parent" && type === "object") {
573
- if (parent) cloned[i] = parent;
597
+ if (parent)
598
+ cloned[i] = parent;
574
599
  } else if (i === "source") {
575
600
  cloned[i] = value;
576
601
  } else if (Array.isArray(value)) {
577
602
  cloned[i] = value.map((j) => cloneNode(j, cloned));
578
603
  } else {
579
- if (type === "object" && value !== null) value = cloneNode(value);
604
+ if (type === "object" && value !== null)
605
+ value = cloneNode(value);
580
606
  cloned[i] = value;
581
607
  }
582
608
  }
@@ -630,7 +656,8 @@ let Node$5 = class Node2 {
630
656
  cleanRaws(keepBetween) {
631
657
  delete this.raws.before;
632
658
  delete this.raws.after;
633
- if (!keepBetween) delete this.raws.between;
659
+ if (!keepBetween)
660
+ delete this.raws.between;
634
661
  }
635
662
  clone(overrides = {}) {
636
663
  let cloned = cloneNode(this);
@@ -673,7 +700,8 @@ let Node$5 = class Node2 {
673
700
  }
674
701
  },
675
702
  set(node2, prop, value) {
676
- if (node2[prop] === value) return true;
703
+ if (node2[prop] === value)
704
+ return true;
677
705
  node2[prop] = value;
678
706
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
679
707
  prop === "text") {
@@ -693,7 +721,8 @@ let Node$5 = class Node2 {
693
721
  }
694
722
  }
695
723
  next() {
696
- if (!this.parent) return void 0;
724
+ if (!this.parent)
725
+ return void 0;
697
726
  let index2 = this.parent.index(this);
698
727
  return this.parent.nodes[index2 + 1];
699
728
  }
@@ -704,7 +733,8 @@ let Node$5 = class Node2 {
704
733
  } else if (opts.word) {
705
734
  stringRepresentation = this.toString();
706
735
  let index2 = stringRepresentation.indexOf(opts.word);
707
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
736
+ if (index2 !== -1)
737
+ pos = this.positionInside(index2, stringRepresentation);
708
738
  }
709
739
  return pos;
710
740
  }
@@ -723,7 +753,8 @@ let Node$5 = class Node2 {
723
753
  return { column, line };
724
754
  }
725
755
  prev() {
726
- if (!this.parent) return void 0;
756
+ if (!this.parent)
757
+ return void 0;
727
758
  let index2 = this.parent.index(this);
728
759
  return this.parent.nodes[index2 - 1];
729
760
  }
@@ -818,7 +849,8 @@ let Node$5 = class Node2 {
818
849
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
819
850
  continue;
820
851
  }
821
- if (name === "parent" || name === "proxyCache") continue;
852
+ if (name === "parent" || name === "proxyCache")
853
+ continue;
822
854
  let value = this[name];
823
855
  if (Array.isArray(value)) {
824
856
  fixed[name] = value.map((i) => {
@@ -858,7 +890,8 @@ let Node$5 = class Node2 {
858
890
  return this.proxyCache;
859
891
  }
860
892
  toString(stringifier2 = stringify$3) {
861
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
893
+ if (stringifier2.stringify)
894
+ stringifier2 = stringifier2.stringify;
862
895
  let result2 = "";
863
896
  stringifier2(this, (i) => {
864
897
  result2 += i;
@@ -867,7 +900,8 @@ let Node$5 = class Node2 {
867
900
  }
868
901
  warn(result2, text, opts) {
869
902
  let data = { node: this };
870
- for (let i in opts) data[i] = opts[i];
903
+ for (let i in opts)
904
+ data[i] = opts[i];
871
905
  return result2.warn(text, data);
872
906
  }
873
907
  get proxyOf() {
@@ -923,7 +957,8 @@ function fromBase64(str) {
923
957
  }
924
958
  let PreviousMap$2 = class PreviousMap {
925
959
  constructor(css, opts) {
926
- if (opts.map === false) return;
960
+ if (opts.map === false)
961
+ return;
927
962
  this.loadAnnotation(css);
928
963
  this.inline = this.startWith(this.annotation, "data:");
929
964
  let prev = opts.map ? opts.map.prev : void 0;
@@ -931,8 +966,10 @@ let PreviousMap$2 = class PreviousMap {
931
966
  if (!this.mapFile && opts.from) {
932
967
  this.mapFile = opts.from;
933
968
  }
934
- if (this.mapFile) this.root = dirname$1(this.mapFile);
935
- if (text) this.text = text;
969
+ if (this.mapFile)
970
+ this.root = dirname$1(this.mapFile);
971
+ if (text)
972
+ this.text = text;
936
973
  }
937
974
  consumer() {
938
975
  if (!this.consumerCache) {
@@ -958,12 +995,14 @@ let PreviousMap$2 = class PreviousMap {
958
995
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
959
996
  }
960
997
  isMap(map) {
961
- if (typeof map !== "object") return false;
998
+ if (typeof map !== "object")
999
+ return false;
962
1000
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
963
1001
  }
964
1002
  loadAnnotation(css) {
965
1003
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
966
- if (!comments) return;
1004
+ if (!comments)
1005
+ return;
967
1006
  let start = css.lastIndexOf(comments.pop());
968
1007
  let end = css.indexOf("*/", start);
969
1008
  if (start > -1 && end > -1) {
@@ -978,7 +1017,8 @@ let PreviousMap$2 = class PreviousMap {
978
1017
  }
979
1018
  }
980
1019
  loadMap(file, prev) {
981
- if (prev === false) return false;
1020
+ if (prev === false)
1021
+ return false;
982
1022
  if (prev) {
983
1023
  if (typeof prev === "string") {
984
1024
  return prev;
@@ -1008,12 +1048,14 @@ let PreviousMap$2 = class PreviousMap {
1008
1048
  return this.decodeInline(this.annotation);
1009
1049
  } else if (this.annotation) {
1010
1050
  let map = this.annotation;
1011
- if (file) map = join(dirname$1(file), map);
1051
+ if (file)
1052
+ map = join(dirname$1(file), map);
1012
1053
  return this.loadFile(map);
1013
1054
  }
1014
1055
  }
1015
1056
  startWith(string, start) {
1016
- if (!string) return false;
1057
+ if (!string)
1058
+ return false;
1017
1059
  return string.substr(0, start.length) === start;
1018
1060
  }
1019
1061
  withContent() {
@@ -1056,13 +1098,15 @@ let Input$4 = class Input {
1056
1098
  if (map.text) {
1057
1099
  this.map = map;
1058
1100
  let file = map.consumer().file;
1059
- if (!this.file && file) this.file = this.mapResolve(file);
1101
+ if (!this.file && file)
1102
+ this.file = this.mapResolve(file);
1060
1103
  }
1061
1104
  }
1062
1105
  if (!this.file) {
1063
1106
  this.id = "<input css " + nanoid(6) + ">";
1064
1107
  }
1065
- if (this.map) this.map.file = this.from;
1108
+ if (this.map)
1109
+ this.map.file = this.from;
1066
1110
  }
1067
1111
  error(message, line, column, opts = {}) {
1068
1112
  let result2, endLine, endColumn;
@@ -1164,10 +1208,12 @@ let Input$4 = class Input {
1164
1208
  return resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
1165
1209
  }
1166
1210
  origin(line, column, endLine, endColumn) {
1167
- if (!this.map) return false;
1211
+ if (!this.map)
1212
+ return false;
1168
1213
  let consumer = this.map.consumer();
1169
1214
  let from = consumer.originalPositionFor({ column, line });
1170
- if (!from.source) return false;
1215
+ if (!from.source)
1216
+ return false;
1171
1217
  let to;
1172
1218
  if (typeof endLine === "number") {
1173
1219
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -1196,7 +1242,8 @@ let Input$4 = class Input {
1196
1242
  }
1197
1243
  }
1198
1244
  let source = consumer.sourceContentFor(from.source);
1199
- if (source) result2.source = source;
1245
+ if (source)
1246
+ result2.source = source;
1200
1247
  return result2;
1201
1248
  }
1202
1249
  toJSON() {
@@ -1254,7 +1301,8 @@ let MapGenerator$2 = class MapGenerator {
1254
1301
  content = this.outputFile() + ".map";
1255
1302
  }
1256
1303
  let eol = "\n";
1257
- if (this.css.includes("\r\n")) eol = "\r\n";
1304
+ if (this.css.includes("\r\n"))
1305
+ eol = "\r\n";
1258
1306
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
1259
1307
  }
1260
1308
  applyPrevMaps() {
@@ -1274,12 +1322,14 @@ let MapGenerator$2 = class MapGenerator {
1274
1322
  }
1275
1323
  }
1276
1324
  clearAnnotation() {
1277
- if (this.mapOpts.annotation === false) return;
1325
+ if (this.mapOpts.annotation === false)
1326
+ return;
1278
1327
  if (this.root) {
1279
1328
  let node2;
1280
1329
  for (let i = this.root.nodes.length - 1; i >= 0; i--) {
1281
1330
  node2 = this.root.nodes[i];
1282
- if (node2.type !== "comment") continue;
1331
+ if (node2.type !== "comment")
1332
+ continue;
1283
1333
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
1284
1334
  this.root.removeChild(i);
1285
1335
  }
@@ -1320,9 +1370,12 @@ let MapGenerator$2 = class MapGenerator {
1320
1370
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
1321
1371
  });
1322
1372
  }
1323
- if (this.isSourcesContent()) this.setSourcesContent();
1324
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
1325
- if (this.isAnnotation()) this.addAnnotation();
1373
+ if (this.isSourcesContent())
1374
+ this.setSourcesContent();
1375
+ if (this.root && this.previous().length > 0)
1376
+ this.applyPrevMaps();
1377
+ if (this.isAnnotation())
1378
+ this.addAnnotation();
1326
1379
  if (this.isInline()) {
1327
1380
  return [this.css];
1328
1381
  } else {
@@ -1442,11 +1495,15 @@ let MapGenerator$2 = class MapGenerator {
1442
1495
  }
1443
1496
  }
1444
1497
  path(file) {
1445
- if (this.mapOpts.absolute) return file;
1446
- if (file.charCodeAt(0) === 60) return file;
1447
- if (/^\w+:\/\//.test(file)) return file;
1498
+ if (this.mapOpts.absolute)
1499
+ return file;
1500
+ if (file.charCodeAt(0) === 60)
1501
+ return file;
1502
+ if (/^\w+:\/\//.test(file))
1503
+ return file;
1448
1504
  let cached = this.memoizedPaths.get(file);
1449
- if (cached) return cached;
1505
+ if (cached)
1506
+ return cached;
1450
1507
  let from = this.opts.to ? dirname(this.opts.to) : ".";
1451
1508
  if (typeof this.mapOpts.annotation === "string") {
1452
1509
  from = dirname(resolve(from, this.mapOpts.annotation));
@@ -1469,7 +1526,8 @@ let MapGenerator$2 = class MapGenerator {
1469
1526
  });
1470
1527
  } else {
1471
1528
  let input2 = new Input$3(this.originalCSS, this.opts);
1472
- if (input2.map) this.previousMaps.push(input2.map);
1529
+ if (input2.map)
1530
+ this.previousMaps.push(input2.map);
1473
1531
  }
1474
1532
  }
1475
1533
  return this.previousMaps;
@@ -1510,7 +1568,8 @@ let MapGenerator$2 = class MapGenerator {
1510
1568
  }
1511
1569
  toFileUrl(path) {
1512
1570
  let cached = this.memoizedFileURLs.get(path);
1513
- if (cached) return cached;
1571
+ if (cached)
1572
+ return cached;
1514
1573
  if (pathToFileURL) {
1515
1574
  let fileURL = pathToFileURL(path).toString();
1516
1575
  this.memoizedFileURLs.set(path, fileURL);
@@ -1523,7 +1582,8 @@ let MapGenerator$2 = class MapGenerator {
1523
1582
  }
1524
1583
  toUrl(path) {
1525
1584
  let cached = this.memoizedURLs.get(path);
1526
- if (cached) return cached;
1585
+ if (cached)
1586
+ return cached;
1527
1587
  if (sep === "\\") {
1528
1588
  path = path.replace(/\\/g, "/");
1529
1589
  }
@@ -1552,7 +1612,8 @@ let AtRule$4;
1552
1612
  let Root$6;
1553
1613
  function cleanSource(nodes) {
1554
1614
  return nodes.map((i) => {
1555
- if (i.nodes) i.nodes = cleanSource(i.nodes);
1615
+ if (i.nodes)
1616
+ i.nodes = cleanSource(i.nodes);
1556
1617
  delete i.source;
1557
1618
  return i;
1558
1619
  });
@@ -1569,7 +1630,8 @@ let Container$7 = class Container extends Node$2 {
1569
1630
  append(...children) {
1570
1631
  for (let child of children) {
1571
1632
  let nodes = this.normalize(child, this.last);
1572
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
1633
+ for (let node2 of nodes)
1634
+ this.proxyOf.nodes.push(node2);
1573
1635
  }
1574
1636
  this.markDirty();
1575
1637
  return this;
@@ -1577,17 +1639,20 @@ let Container$7 = class Container extends Node$2 {
1577
1639
  cleanRaws(keepBetween) {
1578
1640
  super.cleanRaws(keepBetween);
1579
1641
  if (this.nodes) {
1580
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
1642
+ for (let node2 of this.nodes)
1643
+ node2.cleanRaws(keepBetween);
1581
1644
  }
1582
1645
  }
1583
1646
  each(callback) {
1584
- if (!this.proxyOf.nodes) return void 0;
1647
+ if (!this.proxyOf.nodes)
1648
+ return void 0;
1585
1649
  let iterator = this.getIterator();
1586
1650
  let index2, result2;
1587
1651
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
1588
1652
  index2 = this.indexes[iterator];
1589
1653
  result2 = callback(this.proxyOf.nodes[index2], index2);
1590
- if (result2 === false) break;
1654
+ if (result2 === false)
1655
+ break;
1591
1656
  this.indexes[iterator] += 1;
1592
1657
  }
1593
1658
  delete this.indexes[iterator];
@@ -1597,8 +1662,10 @@ let Container$7 = class Container extends Node$2 {
1597
1662
  return this.nodes.every(condition);
1598
1663
  }
1599
1664
  getIterator() {
1600
- if (!this.lastEach) this.lastEach = 0;
1601
- if (!this.indexes) this.indexes = {};
1665
+ if (!this.lastEach)
1666
+ this.lastEach = 0;
1667
+ if (!this.indexes)
1668
+ this.indexes = {};
1602
1669
  this.lastEach += 1;
1603
1670
  let iterator = this.lastEach;
1604
1671
  this.indexes[iterator] = 0;
@@ -1640,7 +1707,8 @@ let Container$7 = class Container extends Node$2 {
1640
1707
  }
1641
1708
  },
1642
1709
  set(node2, prop, value) {
1643
- if (node2[prop] === value) return true;
1710
+ if (node2[prop] === value)
1711
+ return true;
1644
1712
  node2[prop] = value;
1645
1713
  if (prop === "name" || prop === "params" || prop === "selector") {
1646
1714
  node2.markDirty();
@@ -1650,15 +1718,18 @@ let Container$7 = class Container extends Node$2 {
1650
1718
  };
1651
1719
  }
1652
1720
  index(child) {
1653
- if (typeof child === "number") return child;
1654
- if (child.proxyOf) child = child.proxyOf;
1721
+ if (typeof child === "number")
1722
+ return child;
1723
+ if (child.proxyOf)
1724
+ child = child.proxyOf;
1655
1725
  return this.proxyOf.nodes.indexOf(child);
1656
1726
  }
1657
1727
  insertAfter(exist, add) {
1658
1728
  let existIndex = this.index(exist);
1659
1729
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
1660
1730
  existIndex = this.index(exist);
1661
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
1731
+ for (let node2 of nodes)
1732
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
1662
1733
  let index2;
1663
1734
  for (let id in this.indexes) {
1664
1735
  index2 = this.indexes[id];
@@ -1674,7 +1745,8 @@ let Container$7 = class Container extends Node$2 {
1674
1745
  let type = existIndex === 0 ? "prepend" : false;
1675
1746
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
1676
1747
  existIndex = this.index(exist);
1677
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
1748
+ for (let node2 of nodes)
1749
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
1678
1750
  let index2;
1679
1751
  for (let id in this.indexes) {
1680
1752
  index2 = this.indexes[id];
@@ -1693,12 +1765,14 @@ let Container$7 = class Container extends Node$2 {
1693
1765
  } else if (Array.isArray(nodes)) {
1694
1766
  nodes = nodes.slice(0);
1695
1767
  for (let i of nodes) {
1696
- if (i.parent) i.parent.removeChild(i, "ignore");
1768
+ if (i.parent)
1769
+ i.parent.removeChild(i, "ignore");
1697
1770
  }
1698
1771
  } else if (nodes.type === "root" && this.type !== "document") {
1699
1772
  nodes = nodes.nodes.slice(0);
1700
1773
  for (let i of nodes) {
1701
- if (i.parent) i.parent.removeChild(i, "ignore");
1774
+ if (i.parent)
1775
+ i.parent.removeChild(i, "ignore");
1702
1776
  }
1703
1777
  } else if (nodes.type) {
1704
1778
  nodes = [nodes];
@@ -1719,10 +1793,13 @@ let Container$7 = class Container extends Node$2 {
1719
1793
  throw new Error("Unknown node type in node creation");
1720
1794
  }
1721
1795
  let processed = nodes.map((i) => {
1722
- if (!i[my$1]) Container.rebuild(i);
1796
+ if (!i[my$1])
1797
+ Container.rebuild(i);
1723
1798
  i = i.proxyOf;
1724
- if (i.parent) i.parent.removeChild(i);
1725
- if (i[isClean$1]) markDirtyUp(i);
1799
+ if (i.parent)
1800
+ i.parent.removeChild(i);
1801
+ if (i[isClean$1])
1802
+ markDirtyUp(i);
1726
1803
  if (typeof i.raws.before === "undefined") {
1727
1804
  if (sample && typeof sample.raws.before !== "undefined") {
1728
1805
  i.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -1737,7 +1814,8 @@ let Container$7 = class Container extends Node$2 {
1737
1814
  children = children.reverse();
1738
1815
  for (let child of children) {
1739
1816
  let nodes = this.normalize(child, this.first, "prepend").reverse();
1740
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
1817
+ for (let node2 of nodes)
1818
+ this.proxyOf.nodes.unshift(node2);
1741
1819
  for (let id in this.indexes) {
1742
1820
  this.indexes[id] = this.indexes[id] + nodes.length;
1743
1821
  }
@@ -1751,7 +1829,8 @@ let Container$7 = class Container extends Node$2 {
1751
1829
  return this;
1752
1830
  }
1753
1831
  removeAll() {
1754
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
1832
+ for (let node2 of this.proxyOf.nodes)
1833
+ node2.parent = void 0;
1755
1834
  this.proxyOf.nodes = [];
1756
1835
  this.markDirty();
1757
1836
  return this;
@@ -1776,8 +1855,10 @@ let Container$7 = class Container extends Node$2 {
1776
1855
  opts = {};
1777
1856
  }
1778
1857
  this.walkDecls((decl) => {
1779
- if (opts.props && !opts.props.includes(decl.prop)) return;
1780
- if (opts.fast && !decl.value.includes(opts.fast)) return;
1858
+ if (opts.props && !opts.props.includes(decl.prop))
1859
+ return;
1860
+ if (opts.fast && !decl.value.includes(opts.fast))
1861
+ return;
1781
1862
  decl.value = decl.value.replace(pattern, callback);
1782
1863
  });
1783
1864
  this.markDirty();
@@ -1874,11 +1955,13 @@ let Container$7 = class Container extends Node$2 {
1874
1955
  });
1875
1956
  }
1876
1957
  get first() {
1877
- if (!this.proxyOf.nodes) return void 0;
1958
+ if (!this.proxyOf.nodes)
1959
+ return void 0;
1878
1960
  return this.proxyOf.nodes[0];
1879
1961
  }
1880
1962
  get last() {
1881
- if (!this.proxyOf.nodes) return void 0;
1963
+ if (!this.proxyOf.nodes)
1964
+ return void 0;
1882
1965
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
1883
1966
  }
1884
1967
  };
@@ -1940,7 +2023,8 @@ var document$1 = Document$3;
1940
2023
  Document$3.default = Document$3;
1941
2024
  let printed = {};
1942
2025
  var warnOnce$2 = function warnOnce(message) {
1943
- if (printed[message]) return;
2026
+ if (printed[message])
2027
+ return;
1944
2028
  printed[message] = true;
1945
2029
  if (typeof console !== "undefined" && console.warn) {
1946
2030
  console.warn(message);
@@ -1957,7 +2041,8 @@ let Warning$2 = class Warning {
1957
2041
  this.endLine = range.end.line;
1958
2042
  this.endColumn = range.end.column;
1959
2043
  }
1960
- for (let opt in opts) this[opt] = opts[opt];
2044
+ for (let opt in opts)
2045
+ this[opt] = opts[opt];
1961
2046
  }
1962
2047
  toString() {
1963
2048
  if (this.node) {
@@ -2049,8 +2134,10 @@ var tokenize = function tokenizer(input2, options = {}) {
2049
2134
  return returned.length === 0 && pos >= length;
2050
2135
  }
2051
2136
  function nextToken(opts) {
2052
- if (returned.length) return returned.pop();
2053
- if (pos >= length) return;
2137
+ if (returned.length)
2138
+ return returned.pop();
2139
+ if (pos >= length)
2140
+ return;
2054
2141
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
2055
2142
  code = css.charCodeAt(pos);
2056
2143
  switch (code) {
@@ -2222,11 +2309,13 @@ let AtRule$3 = class AtRule extends Container$5 {
2222
2309
  this.type = "atrule";
2223
2310
  }
2224
2311
  append(...children) {
2225
- if (!this.proxyOf.nodes) this.nodes = [];
2312
+ if (!this.proxyOf.nodes)
2313
+ this.nodes = [];
2226
2314
  return super.append(...children);
2227
2315
  }
2228
2316
  prepend(...children) {
2229
- if (!this.proxyOf.nodes) this.nodes = [];
2317
+ if (!this.proxyOf.nodes)
2318
+ this.nodes = [];
2230
2319
  return super.prepend(...children);
2231
2320
  }
2232
2321
  };
@@ -2240,7 +2329,8 @@ let Root$5 = class Root extends Container$4 {
2240
2329
  constructor(defaults) {
2241
2330
  super(defaults);
2242
2331
  this.type = "root";
2243
- if (!this.nodes) this.nodes = [];
2332
+ if (!this.nodes)
2333
+ this.nodes = [];
2244
2334
  }
2245
2335
  normalize(child, sample, type) {
2246
2336
  let nodes = super.normalize(child);
@@ -2311,19 +2401,23 @@ let list$2 = {
2311
2401
  } else if (letter === "(") {
2312
2402
  func += 1;
2313
2403
  } else if (letter === ")") {
2314
- if (func > 0) func -= 1;
2404
+ if (func > 0)
2405
+ func -= 1;
2315
2406
  } else if (func === 0) {
2316
- if (separators.includes(letter)) split = true;
2407
+ if (separators.includes(letter))
2408
+ split = true;
2317
2409
  }
2318
2410
  if (split) {
2319
- if (current !== "") array.push(current.trim());
2411
+ if (current !== "")
2412
+ array.push(current.trim());
2320
2413
  current = "";
2321
2414
  split = false;
2322
2415
  } else {
2323
2416
  current += letter;
2324
2417
  }
2325
2418
  }
2326
- if (last || current !== "") array.push(current.trim());
2419
+ if (last || current !== "")
2420
+ array.push(current.trim());
2327
2421
  return array;
2328
2422
  }
2329
2423
  };
@@ -2335,7 +2429,8 @@ let Rule$3 = class Rule extends Container$3 {
2335
2429
  constructor(defaults) {
2336
2430
  super(defaults);
2337
2431
  this.type = "rule";
2338
- if (!this.nodes) this.nodes = [];
2432
+ if (!this.nodes)
2433
+ this.nodes = [];
2339
2434
  }
2340
2435
  get selectors() {
2341
2436
  return list$1.comma(this.selector);
@@ -2363,7 +2458,8 @@ function findLastWithPosition(tokens) {
2363
2458
  for (let i = tokens.length - 1; i >= 0; i--) {
2364
2459
  let token = tokens[i];
2365
2460
  let pos = token[3] || token[2];
2366
- if (pos) return pos;
2461
+ if (pos)
2462
+ return pos;
2367
2463
  }
2368
2464
  }
2369
2465
  let Parser$1 = class Parser {
@@ -2456,14 +2552,16 @@ let Parser$1 = class Parser {
2456
2552
  }
2457
2553
  checkMissedSemicolon(tokens) {
2458
2554
  let colon = this.colon(tokens);
2459
- if (colon === false) return;
2555
+ if (colon === false)
2556
+ return;
2460
2557
  let founded = 0;
2461
2558
  let token;
2462
2559
  for (let j = colon - 1; j >= 0; j--) {
2463
2560
  token = tokens[j];
2464
2561
  if (token[0] !== "space") {
2465
2562
  founded += 1;
2466
- if (founded === 2) break;
2563
+ if (founded === 2)
2564
+ break;
2467
2565
  }
2468
2566
  }
2469
2567
  throw this.input.error(
@@ -2529,7 +2627,8 @@ let Parser$1 = class Parser {
2529
2627
  );
2530
2628
  node2.source.end.offset++;
2531
2629
  while (tokens[0][0] !== "word") {
2532
- if (tokens.length === 1) this.unknownWord(tokens);
2630
+ if (tokens.length === 1)
2631
+ this.unknownWord(tokens);
2533
2632
  node2.raws.before += tokens.shift()[1];
2534
2633
  }
2535
2634
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -2563,7 +2662,8 @@ let Parser$1 = class Parser {
2563
2662
  let next;
2564
2663
  while (tokens.length) {
2565
2664
  next = tokens[0][0];
2566
- if (next !== "space" && next !== "comment") break;
2665
+ if (next !== "space" && next !== "comment")
2666
+ break;
2567
2667
  firstSpaces.push(tokens.shift());
2568
2668
  }
2569
2669
  this.precheckMissedSemicolon(tokens);
@@ -2573,7 +2673,8 @@ let Parser$1 = class Parser {
2573
2673
  node2.important = true;
2574
2674
  let string = this.stringFrom(tokens, i);
2575
2675
  string = this.spacesFromEnd(tokens) + string;
2576
- if (string !== " !important") node2.raws.important = string;
2676
+ if (string !== " !important")
2677
+ node2.raws.important = string;
2577
2678
  break;
2578
2679
  } else if (token[1].toLowerCase() === "important") {
2579
2680
  let cache = tokens.slice(0);
@@ -2635,7 +2736,8 @@ let Parser$1 = class Parser {
2635
2736
  }
2636
2737
  }
2637
2738
  endFile() {
2638
- if (this.current.parent) this.unclosedBlock();
2739
+ if (this.current.parent)
2740
+ this.unclosedBlock();
2639
2741
  if (this.current.nodes && this.current.nodes.length) {
2640
2742
  this.current.raws.semicolon = this.semicolon;
2641
2743
  }
@@ -2669,7 +2771,8 @@ let Parser$1 = class Parser {
2669
2771
  };
2670
2772
  node2.raws.before = this.spaces;
2671
2773
  this.spaces = "";
2672
- if (node2.type !== "comment") this.semicolon = false;
2774
+ if (node2.type !== "comment")
2775
+ this.semicolon = false;
2673
2776
  }
2674
2777
  other(start) {
2675
2778
  let end = false;
@@ -2684,10 +2787,12 @@ let Parser$1 = class Parser {
2684
2787
  type = token[0];
2685
2788
  tokens.push(token);
2686
2789
  if (type === "(" || type === "[") {
2687
- if (!bracket) bracket = token;
2790
+ if (!bracket)
2791
+ bracket = token;
2688
2792
  brackets.push(type === "(" ? ")" : "]");
2689
2793
  } else if (customProperty && colon && type === "{") {
2690
- if (!bracket) bracket = token;
2794
+ if (!bracket)
2795
+ bracket = token;
2691
2796
  brackets.push("}");
2692
2797
  } else if (brackets.length === 0) {
2693
2798
  if (type === ";") {
@@ -2709,17 +2814,21 @@ let Parser$1 = class Parser {
2709
2814
  }
2710
2815
  } else if (type === brackets[brackets.length - 1]) {
2711
2816
  brackets.pop();
2712
- if (brackets.length === 0) bracket = null;
2817
+ if (brackets.length === 0)
2818
+ bracket = null;
2713
2819
  }
2714
2820
  token = this.tokenizer.nextToken();
2715
2821
  }
2716
- if (this.tokenizer.endOfFile()) end = true;
2717
- if (brackets.length > 0) this.unclosedBracket(bracket);
2822
+ if (this.tokenizer.endOfFile())
2823
+ end = true;
2824
+ if (brackets.length > 0)
2825
+ this.unclosedBracket(bracket);
2718
2826
  if (end && colon) {
2719
2827
  if (!customProperty) {
2720
2828
  while (tokens.length) {
2721
2829
  token = tokens[tokens.length - 1][0];
2722
- if (token !== "space" && token !== "comment") break;
2830
+ if (token !== "space" && token !== "comment")
2831
+ break;
2723
2832
  this.tokenizer.back(tokens.pop());
2724
2833
  }
2725
2834
  }
@@ -2806,7 +2915,8 @@ let Parser$1 = class Parser {
2806
2915
  let spaces = "";
2807
2916
  while (tokens.length) {
2808
2917
  lastTokenType = tokens[tokens.length - 1][0];
2809
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
2918
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
2919
+ break;
2810
2920
  spaces = tokens.pop()[1] + spaces;
2811
2921
  }
2812
2922
  return spaces;
@@ -2817,7 +2927,8 @@ let Parser$1 = class Parser {
2817
2927
  let spaces = "";
2818
2928
  while (tokens.length) {
2819
2929
  next = tokens[0][0];
2820
- if (next !== "space" && next !== "comment") break;
2930
+ if (next !== "space" && next !== "comment")
2931
+ break;
2821
2932
  spaces += tokens.shift()[1];
2822
2933
  }
2823
2934
  return spaces;
@@ -2827,7 +2938,8 @@ let Parser$1 = class Parser {
2827
2938
  let spaces = "";
2828
2939
  while (tokens.length) {
2829
2940
  lastTokenType = tokens[tokens.length - 1][0];
2830
- if (lastTokenType !== "space") break;
2941
+ if (lastTokenType !== "space")
2942
+ break;
2831
2943
  spaces = tokens.pop()[1] + spaces;
2832
2944
  }
2833
2945
  return spaces;
@@ -2989,7 +3101,8 @@ function toStack(node2) {
2989
3101
  }
2990
3102
  function cleanMarks(node2) {
2991
3103
  node2[isClean] = false;
2992
- if (node2.nodes) node2.nodes.forEach((i) => cleanMarks(i));
3104
+ if (node2.nodes)
3105
+ node2.nodes.forEach((i) => cleanMarks(i));
2993
3106
  return node2;
2994
3107
  }
2995
3108
  let postcss$2 = {};
@@ -3003,15 +3116,20 @@ let LazyResult$2 = class LazyResult {
3003
3116
  } else if (css instanceof LazyResult || css instanceof Result$2) {
3004
3117
  root2 = cleanMarks(css.root);
3005
3118
  if (css.map) {
3006
- if (typeof opts.map === "undefined") opts.map = {};
3007
- if (!opts.map.inline) opts.map.inline = false;
3119
+ if (typeof opts.map === "undefined")
3120
+ opts.map = {};
3121
+ if (!opts.map.inline)
3122
+ opts.map.inline = false;
3008
3123
  opts.map.prev = css.map;
3009
3124
  }
3010
3125
  } else {
3011
3126
  let parser2 = parse$2;
3012
- if (opts.syntax) parser2 = opts.syntax.parse;
3013
- if (opts.parser) parser2 = opts.parser;
3014
- if (parser2.parse) parser2 = parser2.parse;
3127
+ if (opts.syntax)
3128
+ parser2 = opts.syntax.parse;
3129
+ if (opts.parser)
3130
+ parser2 = opts.parser;
3131
+ if (parser2.parse)
3132
+ parser2 = parser2.parse;
3015
3133
  try {
3016
3134
  root2 = parser2(css, opts);
3017
3135
  } catch (error) {
@@ -3033,8 +3151,10 @@ let LazyResult$2 = class LazyResult {
3033
3151
  });
3034
3152
  }
3035
3153
  async() {
3036
- if (this.error) return Promise.reject(this.error);
3037
- if (this.processed) return Promise.resolve(this.result);
3154
+ if (this.error)
3155
+ return Promise.reject(this.error);
3156
+ if (this.processed)
3157
+ return Promise.resolve(this.result);
3038
3158
  if (!this.processing) {
3039
3159
  this.processing = this.runAsync();
3040
3160
  }
@@ -3052,7 +3172,8 @@ let LazyResult$2 = class LazyResult {
3052
3172
  handleError(error, node2) {
3053
3173
  let plugin2 = this.result.lastPlugin;
3054
3174
  try {
3055
- if (node2) node2.addToError(error);
3175
+ if (node2)
3176
+ node2.addToError(error);
3056
3177
  this.error = error;
3057
3178
  if (error.name === "CssSyntaxError" && !error.plugin) {
3058
3179
  error.plugin = plugin2.postcssPlugin;
@@ -3072,14 +3193,16 @@ let LazyResult$2 = class LazyResult {
3072
3193
  }
3073
3194
  }
3074
3195
  } catch (err) {
3075
- if (console && console.error) console.error(err);
3196
+ if (console && console.error)
3197
+ console.error(err);
3076
3198
  }
3077
3199
  return error;
3078
3200
  }
3079
3201
  prepareVisitors() {
3080
3202
  this.listeners = {};
3081
3203
  let add = (plugin2, type, cb) => {
3082
- if (!this.listeners[type]) this.listeners[type] = [];
3204
+ if (!this.listeners[type])
3205
+ this.listeners[type] = [];
3083
3206
  this.listeners[type].push([plugin2, cb]);
3084
3207
  };
3085
3208
  for (let plugin2 of this.plugins) {
@@ -3186,15 +3309,20 @@ let LazyResult$2 = class LazyResult {
3186
3309
  }
3187
3310
  }
3188
3311
  stringify() {
3189
- if (this.error) throw this.error;
3190
- if (this.stringified) return this.result;
3312
+ if (this.error)
3313
+ throw this.error;
3314
+ if (this.stringified)
3315
+ return this.result;
3191
3316
  this.stringified = true;
3192
3317
  this.sync();
3193
3318
  let opts = this.result.opts;
3194
3319
  let str = stringify$2;
3195
- if (opts.syntax) str = opts.syntax.stringify;
3196
- if (opts.stringifier) str = opts.stringifier;
3197
- if (str.stringify) str = str.stringify;
3320
+ if (opts.syntax)
3321
+ str = opts.syntax.stringify;
3322
+ if (opts.stringifier)
3323
+ str = opts.stringifier;
3324
+ if (str.stringify)
3325
+ str = str.stringify;
3198
3326
  let map = new MapGenerator$1(str, this.result.root, this.result.opts);
3199
3327
  let data = map.generate();
3200
3328
  this.result.css = data[0];
@@ -3202,8 +3330,10 @@ let LazyResult$2 = class LazyResult {
3202
3330
  return this.result;
3203
3331
  }
3204
3332
  sync() {
3205
- if (this.error) throw this.error;
3206
- if (this.processed) return this.result;
3333
+ if (this.error)
3334
+ throw this.error;
3335
+ if (this.processed)
3336
+ return this.result;
3207
3337
  this.processed = true;
3208
3338
  if (this.processing) {
3209
3339
  throw this.getAsyncError();
@@ -3322,13 +3452,15 @@ let LazyResult$2 = class LazyResult {
3322
3452
  if (event === CHILDREN) {
3323
3453
  if (node2.nodes) {
3324
3454
  node2.each((child) => {
3325
- if (!child[isClean]) this.walkSync(child);
3455
+ if (!child[isClean])
3456
+ this.walkSync(child);
3326
3457
  });
3327
3458
  }
3328
3459
  } else {
3329
3460
  let visitors = this.listeners[event];
3330
3461
  if (visitors) {
3331
- if (this.visitSync(visitors, node2.toProxy())) return;
3462
+ if (this.visitSync(visitors, node2.toProxy()))
3463
+ return;
3332
3464
  }
3333
3465
  }
3334
3466
  }
@@ -3406,7 +3538,8 @@ let NoWorkResult$1 = class NoWorkResult {
3406
3538
  }
3407
3539
  }
3408
3540
  async() {
3409
- if (this.error) return Promise.reject(this.error);
3541
+ if (this.error)
3542
+ return Promise.reject(this.error);
3410
3543
  return Promise.resolve(this.result);
3411
3544
  }
3412
3545
  catch(onRejected) {
@@ -3416,7 +3549,8 @@ let NoWorkResult$1 = class NoWorkResult {
3416
3549
  return this.async().then(onFinally, onFinally);
3417
3550
  }
3418
3551
  sync() {
3419
- if (this.error) throw this.error;
3552
+ if (this.error)
3553
+ throw this.error;
3420
3554
  return this.result;
3421
3555
  }
3422
3556
  then(onFulfilled, onRejected) {
@@ -3536,7 +3670,8 @@ let Input$1 = input;
3536
3670
  let Root$1 = root;
3537
3671
  let Rule$1 = rule;
3538
3672
  function fromJSON$1(json, inputs) {
3539
- if (Array.isArray(json)) return json.map((n) => fromJSON$1(n));
3673
+ if (Array.isArray(json))
3674
+ return json.map((n) => fromJSON$1(n));
3540
3675
  let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
3541
3676
  if (ownInputs) {
3542
3677
  inputs = [];
@@ -3622,7 +3757,8 @@ postcss.plugin = function plugin(name, initializer) {
3622
3757
  let cache;
3623
3758
  Object.defineProperty(creator, "postcss", {
3624
3759
  get() {
3625
- if (!cache) cache = creator();
3760
+ if (!cache)
3761
+ cache = creator();
3626
3762
  return cache;
3627
3763
  }
3628
3764
  });
@@ -3708,7 +3844,8 @@ function toCSSText(style) {
3708
3844
  const properties = [];
3709
3845
  for (const name in style) {
3710
3846
  const value = style[name];
3711
- if (typeof value !== "string") continue;
3847
+ if (typeof value !== "string")
3848
+ continue;
3712
3849
  const normalizedName = hyphenate(name);
3713
3850
  properties.push(`${normalizedName}: ${value};`);
3714
3851
  }
@@ -3717,7 +3854,8 @@ function toCSSText(style) {
3717
3854
  const camelizeRE = /-([a-z])/g;
3718
3855
  const CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;
3719
3856
  const camelize = (str) => {
3720
- if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
3857
+ if (CUSTOM_PROPERTY_REGEX.test(str))
3858
+ return str;
3721
3859
  return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
3722
3860
  };
3723
3861
  const hyphenateRE = /\B([A-Z])/g;
@@ -3750,11 +3888,15 @@ class BaseRRNode {
3750
3888
  return childNodes;
3751
3889
  }
3752
3890
  contains(node2) {
3753
- if (!(node2 instanceof BaseRRNode)) return false;
3754
- else if (node2.ownerDocument !== this.ownerDocument) return false;
3755
- else if (node2 === this) return true;
3891
+ if (!(node2 instanceof BaseRRNode))
3892
+ return false;
3893
+ else if (node2.ownerDocument !== this.ownerDocument)
3894
+ return false;
3895
+ else if (node2 === this)
3896
+ return true;
3756
3897
  while (node2.parentNode) {
3757
- if (node2.parentNode === this) return true;
3898
+ if (node2.parentNode === this)
3899
+ return true;
3758
3900
  node2 = node2.parentNode;
3759
3901
  }
3760
3902
  return false;
@@ -3962,15 +4104,20 @@ class BaseRRElement extends BaseRRNode {
3962
4104
  const style = this.attributes.style ? parseCSSText(this.attributes.style) : {};
3963
4105
  const hyphenateRE2 = /\B([A-Z])/g;
3964
4106
  style.setProperty = (name, value, priority) => {
3965
- if (hyphenateRE2.test(name)) return;
4107
+ if (hyphenateRE2.test(name))
4108
+ return;
3966
4109
  const normalizedName = camelize(name);
3967
- if (!value) delete style[normalizedName];
3968
- else style[normalizedName] = value;
3969
- if (priority === "important") style[normalizedName] += " !important";
4110
+ if (!value)
4111
+ delete style[normalizedName];
4112
+ else
4113
+ style[normalizedName] = value;
4114
+ if (priority === "important")
4115
+ style[normalizedName] += " !important";
3970
4116
  this.attributes.style = toCSSText(style);
3971
4117
  };
3972
4118
  style.removeProperty = (name) => {
3973
- if (hyphenateRE2.test(name)) return "";
4119
+ if (hyphenateRE2.test(name))
4120
+ return "";
3974
4121
  const normalizedName = camelize(name);
3975
4122
  const value = style[normalizedName] || "";
3976
4123
  delete style[normalizedName];
@@ -3980,7 +4127,8 @@ class BaseRRElement extends BaseRRNode {
3980
4127
  return style;
3981
4128
  }
3982
4129
  getAttribute(name) {
3983
- if (this.attributes[name] === void 0) return null;
4130
+ if (this.attributes[name] === void 0)
4131
+ return null;
3984
4132
  return this.attributes[name];
3985
4133
  }
3986
4134
  setAttribute(name, attribute) {
@@ -4106,7 +4254,8 @@ class ClassList {
4106
4254
  __publicField2(this, "add", (...classNames) => {
4107
4255
  for (const item of classNames) {
4108
4256
  const className = String(item);
4109
- if (this.classes.indexOf(className) >= 0) continue;
4257
+ if (this.classes.indexOf(className) >= 0)
4258
+ continue;
4110
4259
  this.classes.push(className);
4111
4260
  }
4112
4261
  this.onChange && this.onChange(this.classes.join(" "));
@@ -4125,7 +4274,8 @@ class ClassList {
4125
4274
  }
4126
4275
  }
4127
4276
  function appendChild(parent, newChild) {
4128
- if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
4277
+ if (newChild.parentNode)
4278
+ newChild.parentNode.removeChild(newChild);
4129
4279
  if (parent.lastChild) {
4130
4280
  parent.lastChild.nextSibling = newChild;
4131
4281
  newChild.previousSibling = parent.lastChild;
@@ -4141,18 +4291,23 @@ function appendChild(parent, newChild) {
4141
4291
  return newChild;
4142
4292
  }
4143
4293
  function insertBefore(parent, newChild, refChild) {
4144
- if (!refChild) return appendChild(parent, newChild);
4294
+ if (!refChild)
4295
+ return appendChild(parent, newChild);
4145
4296
  if (refChild.parentNode !== parent)
4146
4297
  throw new Error(
4147
4298
  "Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode."
4148
4299
  );
4149
- if (newChild === refChild) return newChild;
4150
- if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
4300
+ if (newChild === refChild)
4301
+ return newChild;
4302
+ if (newChild.parentNode)
4303
+ newChild.parentNode.removeChild(newChild);
4151
4304
  newChild.previousSibling = refChild.previousSibling;
4152
4305
  refChild.previousSibling = newChild;
4153
4306
  newChild.nextSibling = refChild;
4154
- if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;
4155
- else parent.firstChild = newChild;
4307
+ if (newChild.previousSibling)
4308
+ newChild.previousSibling.nextSibling = newChild;
4309
+ else
4310
+ parent.firstChild = newChild;
4156
4311
  newChild.parentElement = parent;
4157
4312
  newChild.parentNode = parent;
4158
4313
  newChild.ownerDocument = parent.ownerDocument;
@@ -4165,10 +4320,12 @@ function removeChild(parent, child) {
4165
4320
  );
4166
4321
  if (child.previousSibling)
4167
4322
  child.previousSibling.nextSibling = child.nextSibling;
4168
- else parent.firstChild = child.nextSibling;
4323
+ else
4324
+ parent.firstChild = child.nextSibling;
4169
4325
  if (child.nextSibling)
4170
4326
  child.nextSibling.previousSibling = child.previousSibling;
4171
- else parent.lastChild = child.previousSibling;
4327
+ else
4328
+ parent.lastChild = child.previousSibling;
4172
4329
  child.previousSibling = null;
4173
4330
  child.nextSibling = null;
4174
4331
  child.parentElement = null;
@@ -4193,9 +4350,12 @@ class RRWindow {
4193
4350
  __publicField(this, "scrollTop", 0);
4194
4351
  }
4195
4352
  scrollTo(options) {
4196
- if (!options) return;
4197
- if (typeof options.left === "number") this.scrollLeft = options.left;
4198
- if (typeof options.top === "number") this.scrollTop = options.top;
4353
+ if (!options)
4354
+ return;
4355
+ if (typeof options.left === "number")
4356
+ this.scrollLeft = options.left;
4357
+ if (typeof options.top === "number")
4358
+ this.scrollTop = options.top;
4199
4359
  }
4200
4360
  }
4201
4361
  class RRDocument extends BaseRRDocument {
@@ -4358,7 +4518,8 @@ class RRElement extends BaseRRElement {
4358
4518
  }
4359
4519
  getAttribute(name) {
4360
4520
  const upperName = name && name.toLowerCase();
4361
- if (upperName in this.attributes) return this.attributes[upperName];
4521
+ if (upperName in this.attributes)
4522
+ return this.attributes[upperName];
4362
4523
  return null;
4363
4524
  }
4364
4525
  setAttribute(name, attribute) {
@@ -4369,16 +4530,19 @@ class RRElement extends BaseRRElement {
4369
4530
  }
4370
4531
  get firstElementChild() {
4371
4532
  for (const child of this.childNodes)
4372
- if (child.RRNodeType === NodeType.Element) return child;
4533
+ if (child.RRNodeType === NodeType.Element)
4534
+ return child;
4373
4535
  return null;
4374
4536
  }
4375
4537
  get nextElementSibling() {
4376
4538
  const parentNode = this.parentNode;
4377
- if (!parentNode) return null;
4539
+ if (!parentNode)
4540
+ return null;
4378
4541
  const siblings = parentNode.childNodes;
4379
4542
  const index = siblings.indexOf(this);
4380
4543
  for (let i = index + 1; i < siblings.length; i++)
4381
- if (siblings[i] instanceof RRElement) return siblings[i];
4544
+ if (siblings[i] instanceof RRElement)
4545
+ return siblings[i];
4382
4546
  return null;
4383
4547
  }
4384
4548
  querySelectorAll(selectors) {
@@ -4396,11 +4560,13 @@ class RRElement extends BaseRRElement {
4396
4560
  return result2;
4397
4561
  }
4398
4562
  getElementById(elementId) {
4399
- if (this.id === elementId) return this;
4563
+ if (this.id === elementId)
4564
+ return this;
4400
4565
  for (const child of this.childNodes) {
4401
4566
  if (child instanceof RRElement) {
4402
4567
  const result2 = child.getElementById(elementId);
4403
- if (result2 !== null) return result2;
4568
+ if (result2 !== null)
4569
+ return result2;
4404
4570
  }
4405
4571
  }
4406
4572
  return null;
@@ -4498,7 +4664,8 @@ class RRCDATASection extends BaseRRCDATASection {
4498
4664
  }
4499
4665
  }
4500
4666
  function polyfillPerformance() {
4501
- if (typeof window !== "undefined" || "performance" in global) return;
4667
+ if (typeof window !== "undefined" || "performance" in global)
4668
+ return;
4502
4669
  const performance = require("perf_hooks").performance;
4503
4670
  global.performance = performance;
4504
4671
  }
@@ -4513,7 +4680,8 @@ function polyfillRAF() {
4513
4680
  timeoutHandle = null;
4514
4681
  Object.keys(currentRequests).forEach(function(id) {
4515
4682
  const request = currentRequests[id];
4516
- if (request) request(Date.now());
4683
+ if (request)
4684
+ request(Date.now());
4517
4685
  });
4518
4686
  }
4519
4687
  function requestAnimationFrame(callback) {
@@ -4534,16 +4702,19 @@ function polyfillRAF() {
4534
4702
  global.cancelAnimationFrame = cancelAnimationFrame;
4535
4703
  }
4536
4704
  function polyfillEvent() {
4537
- if (typeof Event !== "undefined") return;
4705
+ if (typeof Event !== "undefined")
4706
+ return;
4538
4707
  global.Event = function() {
4539
4708
  };
4540
4709
  }
4541
4710
  function polyfillNode() {
4542
- if (typeof Node !== "undefined") return;
4711
+ if (typeof Node !== "undefined")
4712
+ return;
4543
4713
  global.Node = BaseRRNode;
4544
4714
  }
4545
4715
  function polyfillDocument() {
4546
- if (typeof document !== "undefined") return;
4716
+ if (typeof document !== "undefined")
4717
+ return;
4547
4718
  const rrdom = new RRDocument();
4548
4719
  (() => {
4549
4720
  var _a, _b;