braid-design-system 32.9.0 → 32.9.2

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.
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -1002,50 +1006,97 @@ var require_constants = __commonJS({
1002
1006
  "use strict";
1003
1007
  module2.exports = {
1004
1008
  MAX_LENGTH: 1024 * 64,
1009
+ // Digits
1005
1010
  CHAR_0: "0",
1011
+ /* 0 */
1006
1012
  CHAR_9: "9",
1013
+ /* 9 */
1014
+ // Alphabet chars.
1007
1015
  CHAR_UPPERCASE_A: "A",
1016
+ /* A */
1008
1017
  CHAR_LOWERCASE_A: "a",
1018
+ /* a */
1009
1019
  CHAR_UPPERCASE_Z: "Z",
1020
+ /* Z */
1010
1021
  CHAR_LOWERCASE_Z: "z",
1022
+ /* z */
1011
1023
  CHAR_LEFT_PARENTHESES: "(",
1024
+ /* ( */
1012
1025
  CHAR_RIGHT_PARENTHESES: ")",
1026
+ /* ) */
1013
1027
  CHAR_ASTERISK: "*",
1028
+ /* * */
1029
+ // Non-alphabetic chars.
1014
1030
  CHAR_AMPERSAND: "&",
1031
+ /* & */
1015
1032
  CHAR_AT: "@",
1033
+ /* @ */
1016
1034
  CHAR_BACKSLASH: "\\",
1035
+ /* \ */
1017
1036
  CHAR_BACKTICK: "`",
1037
+ /* ` */
1018
1038
  CHAR_CARRIAGE_RETURN: "\r",
1039
+ /* \r */
1019
1040
  CHAR_CIRCUMFLEX_ACCENT: "^",
1041
+ /* ^ */
1020
1042
  CHAR_COLON: ":",
1043
+ /* : */
1021
1044
  CHAR_COMMA: ",",
1045
+ /* , */
1022
1046
  CHAR_DOLLAR: "$",
1047
+ /* . */
1023
1048
  CHAR_DOT: ".",
1049
+ /* . */
1024
1050
  CHAR_DOUBLE_QUOTE: '"',
1051
+ /* " */
1025
1052
  CHAR_EQUAL: "=",
1053
+ /* = */
1026
1054
  CHAR_EXCLAMATION_MARK: "!",
1055
+ /* ! */
1027
1056
  CHAR_FORM_FEED: "\f",
1057
+ /* \f */
1028
1058
  CHAR_FORWARD_SLASH: "/",
1059
+ /* / */
1029
1060
  CHAR_HASH: "#",
1061
+ /* # */
1030
1062
  CHAR_HYPHEN_MINUS: "-",
1063
+ /* - */
1031
1064
  CHAR_LEFT_ANGLE_BRACKET: "<",
1065
+ /* < */
1032
1066
  CHAR_LEFT_CURLY_BRACE: "{",
1067
+ /* { */
1033
1068
  CHAR_LEFT_SQUARE_BRACKET: "[",
1069
+ /* [ */
1034
1070
  CHAR_LINE_FEED: "\n",
1071
+ /* \n */
1035
1072
  CHAR_NO_BREAK_SPACE: "\xA0",
1073
+ /* \u00A0 */
1036
1074
  CHAR_PERCENT: "%",
1075
+ /* % */
1037
1076
  CHAR_PLUS: "+",
1077
+ /* + */
1038
1078
  CHAR_QUESTION_MARK: "?",
1079
+ /* ? */
1039
1080
  CHAR_RIGHT_ANGLE_BRACKET: ">",
1081
+ /* > */
1040
1082
  CHAR_RIGHT_CURLY_BRACE: "}",
1083
+ /* } */
1041
1084
  CHAR_RIGHT_SQUARE_BRACKET: "]",
1085
+ /* ] */
1042
1086
  CHAR_SEMICOLON: ";",
1087
+ /* ; */
1043
1088
  CHAR_SINGLE_QUOTE: "'",
1089
+ /* ' */
1044
1090
  CHAR_SPACE: " ",
1091
+ /* */
1045
1092
  CHAR_TAB: " ",
1093
+ /* \t */
1046
1094
  CHAR_UNDERSCORE: "_",
1095
+ /* _ */
1047
1096
  CHAR_VERTICAL_LINE: "|",
1097
+ /* | */
1048
1098
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
1099
+ /* \uFEFF */
1049
1100
  };
1050
1101
  }
1051
1102
  });
@@ -1058,17 +1109,29 @@ var require_parse = __commonJS({
1058
1109
  var {
1059
1110
  MAX_LENGTH,
1060
1111
  CHAR_BACKSLASH,
1112
+ /* \ */
1061
1113
  CHAR_BACKTICK,
1114
+ /* ` */
1062
1115
  CHAR_COMMA,
1116
+ /* , */
1063
1117
  CHAR_DOT,
1118
+ /* . */
1064
1119
  CHAR_LEFT_PARENTHESES,
1120
+ /* ( */
1065
1121
  CHAR_RIGHT_PARENTHESES,
1122
+ /* ) */
1066
1123
  CHAR_LEFT_CURLY_BRACE,
1124
+ /* { */
1067
1125
  CHAR_RIGHT_CURLY_BRACE,
1126
+ /* } */
1068
1127
  CHAR_LEFT_SQUARE_BRACKET,
1128
+ /* [ */
1069
1129
  CHAR_RIGHT_SQUARE_BRACKET,
1130
+ /* ] */
1070
1131
  CHAR_DOUBLE_QUOTE,
1132
+ /* " */
1071
1133
  CHAR_SINGLE_QUOTE,
1134
+ /* ' */
1072
1135
  CHAR_NO_BREAK_SPACE,
1073
1136
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
1074
1137
  } = require_constants();
@@ -1417,61 +1480,112 @@ var require_constants2 = __commonJS({
1417
1480
  module2.exports = {
1418
1481
  MAX_LENGTH: 1024 * 64,
1419
1482
  POSIX_REGEX_SOURCE,
1483
+ // regular expressions
1420
1484
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
1421
1485
  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
1422
1486
  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
1423
1487
  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
1424
1488
  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
1425
1489
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
1490
+ // Replace globs with equivalent patterns to reduce parsing time.
1426
1491
  REPLACEMENTS: {
1427
1492
  "***": "*",
1428
1493
  "**/**": "**",
1429
1494
  "**/**/**": "**"
1430
1495
  },
1496
+ // Digits
1431
1497
  CHAR_0: 48,
1498
+ /* 0 */
1432
1499
  CHAR_9: 57,
1500
+ /* 9 */
1501
+ // Alphabet chars.
1433
1502
  CHAR_UPPERCASE_A: 65,
1503
+ /* A */
1434
1504
  CHAR_LOWERCASE_A: 97,
1505
+ /* a */
1435
1506
  CHAR_UPPERCASE_Z: 90,
1507
+ /* Z */
1436
1508
  CHAR_LOWERCASE_Z: 122,
1509
+ /* z */
1437
1510
  CHAR_LEFT_PARENTHESES: 40,
1511
+ /* ( */
1438
1512
  CHAR_RIGHT_PARENTHESES: 41,
1513
+ /* ) */
1439
1514
  CHAR_ASTERISK: 42,
1515
+ /* * */
1516
+ // Non-alphabetic chars.
1440
1517
  CHAR_AMPERSAND: 38,
1518
+ /* & */
1441
1519
  CHAR_AT: 64,
1520
+ /* @ */
1442
1521
  CHAR_BACKWARD_SLASH: 92,
1522
+ /* \ */
1443
1523
  CHAR_CARRIAGE_RETURN: 13,
1524
+ /* \r */
1444
1525
  CHAR_CIRCUMFLEX_ACCENT: 94,
1526
+ /* ^ */
1445
1527
  CHAR_COLON: 58,
1528
+ /* : */
1446
1529
  CHAR_COMMA: 44,
1530
+ /* , */
1447
1531
  CHAR_DOT: 46,
1532
+ /* . */
1448
1533
  CHAR_DOUBLE_QUOTE: 34,
1534
+ /* " */
1449
1535
  CHAR_EQUAL: 61,
1536
+ /* = */
1450
1537
  CHAR_EXCLAMATION_MARK: 33,
1538
+ /* ! */
1451
1539
  CHAR_FORM_FEED: 12,
1540
+ /* \f */
1452
1541
  CHAR_FORWARD_SLASH: 47,
1542
+ /* / */
1453
1543
  CHAR_GRAVE_ACCENT: 96,
1544
+ /* ` */
1454
1545
  CHAR_HASH: 35,
1546
+ /* # */
1455
1547
  CHAR_HYPHEN_MINUS: 45,
1548
+ /* - */
1456
1549
  CHAR_LEFT_ANGLE_BRACKET: 60,
1550
+ /* < */
1457
1551
  CHAR_LEFT_CURLY_BRACE: 123,
1552
+ /* { */
1458
1553
  CHAR_LEFT_SQUARE_BRACKET: 91,
1554
+ /* [ */
1459
1555
  CHAR_LINE_FEED: 10,
1556
+ /* \n */
1460
1557
  CHAR_NO_BREAK_SPACE: 160,
1558
+ /* \u00A0 */
1461
1559
  CHAR_PERCENT: 37,
1560
+ /* % */
1462
1561
  CHAR_PLUS: 43,
1562
+ /* + */
1463
1563
  CHAR_QUESTION_MARK: 63,
1564
+ /* ? */
1464
1565
  CHAR_RIGHT_ANGLE_BRACKET: 62,
1566
+ /* > */
1465
1567
  CHAR_RIGHT_CURLY_BRACE: 125,
1568
+ /* } */
1466
1569
  CHAR_RIGHT_SQUARE_BRACKET: 93,
1570
+ /* ] */
1467
1571
  CHAR_SEMICOLON: 59,
1572
+ /* ; */
1468
1573
  CHAR_SINGLE_QUOTE: 39,
1574
+ /* ' */
1469
1575
  CHAR_SPACE: 32,
1576
+ /* */
1470
1577
  CHAR_TAB: 9,
1578
+ /* \t */
1471
1579
  CHAR_UNDERSCORE: 95,
1580
+ /* _ */
1472
1581
  CHAR_VERTICAL_LINE: 124,
1582
+ /* | */
1473
1583
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1584
+ /* \uFEFF */
1474
1585
  SEP: path.sep,
1586
+ /**
1587
+ * Create EXTGLOB_CHARS
1588
+ */
1475
1589
  extglobChars(chars) {
1476
1590
  return {
1477
1591
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -1481,6 +1595,9 @@ var require_constants2 = __commonJS({
1481
1595
  "@": { type: "at", open: "(?:", close: ")" }
1482
1596
  };
1483
1597
  },
1598
+ /**
1599
+ * Create GLOB_CHARS
1600
+ */
1484
1601
  globChars(win32) {
1485
1602
  return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
1486
1603
  }
@@ -1558,20 +1675,35 @@ var require_scan = __commonJS({
1558
1675
  var utils = require_utils2();
1559
1676
  var {
1560
1677
  CHAR_ASTERISK,
1678
+ /* * */
1561
1679
  CHAR_AT,
1680
+ /* @ */
1562
1681
  CHAR_BACKWARD_SLASH,
1682
+ /* \ */
1563
1683
  CHAR_COMMA,
1684
+ /* , */
1564
1685
  CHAR_DOT,
1686
+ /* . */
1565
1687
  CHAR_EXCLAMATION_MARK,
1688
+ /* ! */
1566
1689
  CHAR_FORWARD_SLASH,
1690
+ /* / */
1567
1691
  CHAR_LEFT_CURLY_BRACE,
1692
+ /* { */
1568
1693
  CHAR_LEFT_PARENTHESES,
1694
+ /* ( */
1569
1695
  CHAR_LEFT_SQUARE_BRACKET,
1696
+ /* [ */
1570
1697
  CHAR_PLUS,
1698
+ /* + */
1571
1699
  CHAR_QUESTION_MARK,
1700
+ /* ? */
1572
1701
  CHAR_RIGHT_CURLY_BRACE,
1702
+ /* } */
1573
1703
  CHAR_RIGHT_PARENTHESES,
1704
+ /* ) */
1574
1705
  CHAR_RIGHT_SQUARE_BRACKET
1706
+ /* ] */
1575
1707
  } = require_constants2();
1576
1708
  var isPathSeparator = (code) => {
1577
1709
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -3302,8 +3434,18 @@ var require_tasks = __commonJS({
3302
3434
  const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
3303
3435
  const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
3304
3436
  const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
3305
- const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
3306
- const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
3437
+ const staticTasks = convertPatternsToTasks(
3438
+ staticPatterns,
3439
+ negativePatterns,
3440
+ /* dynamic */
3441
+ false
3442
+ );
3443
+ const dynamicTasks = convertPatternsToTasks(
3444
+ dynamicPatterns,
3445
+ negativePatterns,
3446
+ /* dynamic */
3447
+ true
3448
+ );
3307
3449
  return staticTasks.concat(dynamicTasks);
3308
3450
  }
3309
3451
  exports2.generate = generate;
@@ -5579,7 +5721,9 @@ var require_WorkerHandler = __commonJS({
5579
5721
  function setupWorkerThreadWorker(script, WorkerThreads2) {
5580
5722
  var worker2 = new WorkerThreads2.Worker(script, {
5581
5723
  stdout: false,
5724
+ // automatically pipe worker.STDOUT to process.STDOUT
5582
5725
  stderr: false
5726
+ // automatically pipe worker.STDERR to process.STDERR
5583
5727
  });
5584
5728
  worker2.isWorkerThread = true;
5585
5729
  worker2.send = function(message) {
@@ -6138,7 +6282,8 @@ var require_worker = __commonJS({
6138
6282
  throw error;
6139
6283
  }
6140
6284
  }
6141
- if (WorkerThreads && WorkerThreads.parentPort !== null) {
6285
+ if (WorkerThreads && /* if there is a parentPort, we are in a WorkerThread */
6286
+ WorkerThreads.parentPort !== null) {
6142
6287
  parentPort = WorkerThreads.parentPort;
6143
6288
  worker.send = parentPort.postMessage.bind(parentPort);
6144
6289
  worker.on = parentPort.on.bind(parentPort);
@@ -6278,14 +6423,17 @@ var require_eta = __commonJS({
6278
6423
  this.timeBuffer = [initTime];
6279
6424
  this.eta = "0";
6280
6425
  }
6426
+ // add new values to calculation buffer
6281
6427
  update(time, value, total) {
6282
6428
  this.valueBuffer.push(value);
6283
6429
  this.timeBuffer.push(time);
6284
6430
  this.calculate(total - value);
6285
6431
  }
6432
+ // fetch estimated time
6286
6433
  getTime() {
6287
6434
  return this.eta;
6288
6435
  }
6436
+ // eta calculation - request number of remaining events
6289
6437
  calculate(remaining) {
6290
6438
  const currentBufferSize = this.valueBuffer.length;
6291
6439
  const buffer = Math.min(this.etaBufferLength, currentBufferSize);
@@ -6322,18 +6470,21 @@ var require_terminal = __commonJS({
6322
6470
  this.linewrap = true;
6323
6471
  this.dy = 0;
6324
6472
  }
6473
+ // save cursor position + settings
6325
6474
  cursorSave() {
6326
6475
  if (!this.stream.isTTY) {
6327
6476
  return;
6328
6477
  }
6329
6478
  this.stream.write("\x1B7");
6330
6479
  }
6480
+ // restore last cursor position + settings
6331
6481
  cursorRestore() {
6332
6482
  if (!this.stream.isTTY) {
6333
6483
  return;
6334
6484
  }
6335
6485
  this.stream.write("\x1B8");
6336
6486
  }
6487
+ // show/hide cursor
6337
6488
  cursor(enabled) {
6338
6489
  if (!this.stream.isTTY) {
6339
6490
  return;
@@ -6344,12 +6495,14 @@ var require_terminal = __commonJS({
6344
6495
  this.stream.write("\x1B[?25l");
6345
6496
  }
6346
6497
  }
6498
+ // change cursor positionn
6347
6499
  cursorTo(x = null, y = null) {
6348
6500
  if (!this.stream.isTTY) {
6349
6501
  return;
6350
6502
  }
6351
6503
  _readline.cursorTo(this.stream, x, y);
6352
6504
  }
6505
+ // change relative cursor position
6353
6506
  cursorRelative(dx = null, dy = null) {
6354
6507
  if (!this.stream.isTTY) {
6355
6508
  return;
@@ -6357,6 +6510,7 @@ var require_terminal = __commonJS({
6357
6510
  this.dy = this.dy + dy;
6358
6511
  _readline.moveCursor(this.stream, dx, dy);
6359
6512
  }
6513
+ // relative reset
6360
6514
  cursorRelativeReset() {
6361
6515
  if (!this.stream.isTTY) {
6362
6516
  return;
@@ -6365,28 +6519,34 @@ var require_terminal = __commonJS({
6365
6519
  _readline.cursorTo(this.stream, 0, null);
6366
6520
  this.dy = 0;
6367
6521
  }
6522
+ // clear to the right from cursor
6368
6523
  clearRight() {
6369
6524
  if (!this.stream.isTTY) {
6370
6525
  return;
6371
6526
  }
6372
6527
  _readline.clearLine(this.stream, 1);
6373
6528
  }
6529
+ // clear the full line
6374
6530
  clearLine() {
6375
6531
  if (!this.stream.isTTY) {
6376
6532
  return;
6377
6533
  }
6378
6534
  _readline.clearLine(this.stream, 0);
6379
6535
  }
6536
+ // clear everyting beyond the current line
6380
6537
  clearBottom() {
6381
6538
  if (!this.stream.isTTY) {
6382
6539
  return;
6383
6540
  }
6384
6541
  _readline.clearScreenDown(this.stream);
6385
6542
  }
6543
+ // add new line; increment counter
6386
6544
  newline() {
6387
6545
  this.stream.write("\n");
6388
6546
  this.dy++;
6389
6547
  }
6548
+ // write content to output stream
6549
+ // @TODO use string-width to strip length
6390
6550
  write(s, rawWrite = false) {
6391
6551
  if (this.linewrap === true && rawWrite === false) {
6392
6552
  this.stream.write(s.substr(0, this.getWidth()));
@@ -6394,6 +6554,7 @@ var require_terminal = __commonJS({
6394
6554
  this.stream.write(s);
6395
6555
  }
6396
6556
  }
6557
+ // control line wrapping
6397
6558
  lineWrapping(enabled) {
6398
6559
  if (!this.stream.isTTY) {
6399
6560
  return;
@@ -6405,9 +6566,11 @@ var require_terminal = __commonJS({
6405
6566
  this.stream.write("\x1B[?7l");
6406
6567
  }
6407
6568
  }
6569
+ // tty environment ?
6408
6570
  isTTY() {
6409
6571
  return this.stream.isTTY === true;
6410
6572
  }
6573
+ // get terminal width
6411
6574
  getWidth() {
6412
6575
  return this.stream.columns || (this.stream.isTTY ? 80 : 200);
6413
6576
  }
@@ -6447,7 +6610,22 @@ var require_is_fullwidth_code_point = __commonJS({
6447
6610
  if (Number.isNaN(codePoint)) {
6448
6611
  return false;
6449
6612
  }
6450
- if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) {
6613
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
6614
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
6615
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
6616
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
6617
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
6618
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
6619
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
6620
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
6621
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
6622
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
6623
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
6624
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
6625
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
6626
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
6627
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
6628
+ 131072 <= codePoint && codePoint <= 262141)) {
6451
6629
  return true;
6452
6630
  }
6453
6631
  return false;
@@ -6635,6 +6813,7 @@ var require_generic_bar = __commonJS({
6635
6813
  this.isActive = false;
6636
6814
  this.formatter = typeof this.options.format === "function" ? this.options.format : _formatter;
6637
6815
  }
6816
+ // internal render function
6638
6817
  render(forceRendering = false) {
6639
6818
  const params = {
6640
6819
  progress: this.getProgress(),
@@ -6660,6 +6839,7 @@ var require_generic_bar = __commonJS({
6660
6839
  this.emit("redraw-post");
6661
6840
  }
6662
6841
  }
6842
+ // start the progress bar
6663
6843
  start(total, startValue, payload) {
6664
6844
  this.value = startValue || 0;
6665
6845
  this.total = typeof total !== "undefined" && total >= 0 ? total : 100;
@@ -6672,11 +6852,15 @@ var require_generic_bar = __commonJS({
6672
6852
  this.isActive = true;
6673
6853
  this.emit("start", total, startValue);
6674
6854
  }
6855
+ // stop the bar
6675
6856
  stop() {
6676
6857
  this.isActive = false;
6677
6858
  this.stopTime = Date.now();
6678
6859
  this.emit("stop", this.total, this.value);
6679
6860
  }
6861
+ // update the bar value
6862
+ // update(value, payload)
6863
+ // update(payload)
6680
6864
  update(arg0, arg1 = {}) {
6681
6865
  if (typeof arg0 === "number") {
6682
6866
  this.value = arg0;
@@ -6691,6 +6875,7 @@ var require_generic_bar = __commonJS({
6691
6875
  this.stop();
6692
6876
  }
6693
6877
  }
6878
+ // calculate the actual progress value
6694
6879
  getProgress() {
6695
6880
  let progress = this.value / this.total;
6696
6881
  if (this.options.progressCalculationRelative) {
@@ -6702,6 +6887,9 @@ var require_generic_bar = __commonJS({
6702
6887
  progress = Math.min(Math.max(progress, 0), 1);
6703
6888
  return progress;
6704
6889
  }
6890
+ // update the bar value
6891
+ // increment(delta, payload)
6892
+ // increment(payload)
6705
6893
  increment(arg0 = 1, arg1 = {}) {
6706
6894
  if (typeof arg0 === "object") {
6707
6895
  this.update(this.value + 1, arg0);
@@ -6709,14 +6897,17 @@ var require_generic_bar = __commonJS({
6709
6897
  this.update(this.value + arg0, arg1);
6710
6898
  }
6711
6899
  }
6900
+ // get the total (limit) value
6712
6901
  getTotal() {
6713
6902
  return this.total;
6714
6903
  }
6904
+ // set the total (limit) value
6715
6905
  setTotal(total) {
6716
6906
  if (typeof total !== "undefined" && total >= 0) {
6717
6907
  this.total = total;
6718
6908
  }
6719
6909
  }
6910
+ // force eta calculation update (long running processes)
6720
6911
  updateETA() {
6721
6912
  this.eta.update(Date.now(), this.value, this.total);
6722
6913
  }
@@ -6735,6 +6926,7 @@ var require_options = __commonJS({
6735
6926
  }
6736
6927
  }
6737
6928
  module2.exports = {
6929
+ // set global options
6738
6930
  parse: function parse(rawOptions, preset) {
6739
6931
  const options = {};
6740
6932
  const opt = Object.assign({}, preset, rawOptions);
@@ -6786,6 +6978,7 @@ var require_single_bar = __commonJS({
6786
6978
  this.schedulingRate = this.terminal.isTTY() ? this.options.throttleTime : this.options.notTTYSchedule;
6787
6979
  this.sigintCallback = null;
6788
6980
  }
6981
+ // internal render function
6789
6982
  render() {
6790
6983
  if (this.timer) {
6791
6984
  clearTimeout(this.timer);
@@ -6806,6 +6999,7 @@ var require_single_bar = __commonJS({
6806
6999
  this.render();
6807
7000
  }
6808
7001
  }
7002
+ // start the progress bar
6809
7003
  start(total, startValue, payload) {
6810
7004
  if (this.options.noTTYOutput === false && this.terminal.isTTY() === false) {
6811
7005
  return;
@@ -6825,6 +7019,7 @@ var require_single_bar = __commonJS({
6825
7019
  super.start(total, startValue, payload);
6826
7020
  this.render();
6827
7021
  }
7022
+ // stop the bar
6828
7023
  stop() {
6829
7024
  if (!this.timer) {
6830
7025
  return;
@@ -6876,6 +7071,7 @@ var require_multi_bar = __commonJS({
6876
7071
  this.loggingBuffer = [];
6877
7072
  this.sigintCallback = null;
6878
7073
  }
7074
+ // add a new bar to the stack
6879
7075
  create(total, startValue, payload, barOptions = {}) {
6880
7076
  const bar = new _BarElement(Object.assign({}, this.options, barOptions));
6881
7077
  this.bars.push(bar);
@@ -6901,6 +7097,7 @@ var require_multi_bar = __commonJS({
6901
7097
  this.emit("start");
6902
7098
  return bar;
6903
7099
  }
7100
+ // remove a bar from the stack
6904
7101
  remove(bar) {
6905
7102
  const index = this.bars.indexOf(bar);
6906
7103
  if (index < 0) {
@@ -6912,6 +7109,7 @@ var require_multi_bar = __commonJS({
6912
7109
  this.terminal.clearBottom();
6913
7110
  return true;
6914
7111
  }
7112
+ // internal update routine
6915
7113
  update() {
6916
7114
  if (this.timer) {
6917
7115
  clearTimeout(this.timer);
@@ -7081,6 +7279,7 @@ function assembleStyles() {
7081
7279
  const styles2 = {
7082
7280
  modifier: {
7083
7281
  reset: [0, 0],
7282
+ // 21 isn't widely supported and 22 does the same thing
7084
7283
  bold: [1, 22],
7085
7284
  dim: [2, 22],
7086
7285
  italic: [3, 23],
@@ -7099,6 +7298,7 @@ function assembleStyles() {
7099
7298
  magenta: [35, 39],
7100
7299
  cyan: [36, 39],
7101
7300
  white: [37, 39],
7301
+ // Bright color
7102
7302
  blackBright: [90, 39],
7103
7303
  redBright: [91, 39],
7104
7304
  greenBright: [92, 39],
@@ -7117,6 +7317,7 @@ function assembleStyles() {
7117
7317
  bgMagenta: [45, 49],
7118
7318
  bgCyan: [46, 49],
7119
7319
  bgWhite: [47, 49],
7320
+ // Bright color
7120
7321
  bgBlackBright: [100, 49],
7121
7322
  bgRedBright: [101, 49],
7122
7323
  bgGreenBright: [102, 49],
@@ -7185,9 +7386,11 @@ function assembleStyles() {
7185
7386
  }
7186
7387
  const integer = Number.parseInt(colorString, 16);
7187
7388
  return [
7389
+ /* eslint-disable no-bitwise */
7188
7390
  integer >> 16 & 255,
7189
7391
  integer >> 8 & 255,
7190
7392
  integer & 255
7393
+ /* eslint-enable no-bitwise */
7191
7394
  ];
7192
7395
  },
7193
7396
  enumerable: false
@@ -7638,35 +7841,51 @@ ${result.error}
7638
7841
  pool.terminate();
7639
7842
  });
7640
7843
  }
7641
- /*!
7642
- * fill-range <https://github.com/jonschlinkert/fill-range>
7643
- *
7644
- * Copyright (c) 2014-present, Jon Schlinkert.
7645
- * Licensed under the MIT License.
7646
- */
7647
- /*!
7648
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
7649
- *
7650
- * Copyright (c) 2014-2016, Jon Schlinkert.
7651
- * Licensed under the MIT License.
7652
- */
7653
- /*!
7654
- * is-glob <https://github.com/jonschlinkert/is-glob>
7655
- *
7656
- * Copyright (c) 2014-2017, Jon Schlinkert.
7657
- * Released under the MIT License.
7658
- */
7659
- /*!
7660
- * is-number <https://github.com/jonschlinkert/is-number>
7661
- *
7662
- * Copyright (c) 2014-present, Jon Schlinkert.
7663
- * Released under the MIT License.
7664
- */
7665
- /*!
7666
- * to-regex-range <https://github.com/micromatch/to-regex-range>
7667
- *
7668
- * Copyright (c) 2015-present, Jon Schlinkert.
7669
- * Released under the MIT License.
7670
- */
7671
- /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7672
- /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7844
+ /*! Bundled license information:
7845
+
7846
+ is-extglob/index.js:
7847
+ (*!
7848
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
7849
+ *
7850
+ * Copyright (c) 2014-2016, Jon Schlinkert.
7851
+ * Licensed under the MIT License.
7852
+ *)
7853
+
7854
+ is-glob/index.js:
7855
+ (*!
7856
+ * is-glob <https://github.com/jonschlinkert/is-glob>
7857
+ *
7858
+ * Copyright (c) 2014-2017, Jon Schlinkert.
7859
+ * Released under the MIT License.
7860
+ *)
7861
+
7862
+ is-number/index.js:
7863
+ (*!
7864
+ * is-number <https://github.com/jonschlinkert/is-number>
7865
+ *
7866
+ * Copyright (c) 2014-present, Jon Schlinkert.
7867
+ * Released under the MIT License.
7868
+ *)
7869
+
7870
+ to-regex-range/index.js:
7871
+ (*!
7872
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
7873
+ *
7874
+ * Copyright (c) 2015-present, Jon Schlinkert.
7875
+ * Released under the MIT License.
7876
+ *)
7877
+
7878
+ fill-range/index.js:
7879
+ (*!
7880
+ * fill-range <https://github.com/jonschlinkert/fill-range>
7881
+ *
7882
+ * Copyright (c) 2014-present, Jon Schlinkert.
7883
+ * Licensed under the MIT License.
7884
+ *)
7885
+
7886
+ queue-microtask/index.js:
7887
+ (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
7888
+
7889
+ run-parallel/index.js:
7890
+ (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
7891
+ */