spawn-term 0.1.18 → 0.1.20
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.
package/assets/ink.cjs
CHANGED
|
@@ -75,6 +75,8 @@ var _process = /*#__PURE__*/ _interop_require_wildcard(require("process"));
|
|
|
75
75
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
76
76
|
var _assert = /*#__PURE__*/ _interop_require_default(require("assert"));
|
|
77
77
|
var _events = /*#__PURE__*/ _interop_require_wildcard(require("events"));
|
|
78
|
+
var _util = /*#__PURE__*/ _interop_require_default(require("util"));
|
|
79
|
+
var _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
78
80
|
var _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
|
|
79
81
|
var _module = /*#__PURE__*/ _interop_require_default(require("module"));
|
|
80
82
|
var _buffer = require("buffer");
|
|
@@ -25868,26 +25870,26 @@ var measureText = function(text) {
|
|
|
25868
25870
|
height: height
|
|
25869
25871
|
};
|
|
25870
25872
|
};
|
|
25871
|
-
var ANSI_BACKGROUND_OFFSET
|
|
25872
|
-
var wrapAnsi16
|
|
25873
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
25874
|
+
var wrapAnsi16 = function() {
|
|
25873
25875
|
var offset = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
25874
25876
|
return function(code) {
|
|
25875
25877
|
return "\x1b[".concat(code + offset, "m");
|
|
25876
25878
|
};
|
|
25877
25879
|
};
|
|
25878
|
-
var wrapAnsi256
|
|
25880
|
+
var wrapAnsi256 = function() {
|
|
25879
25881
|
var offset = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
25880
25882
|
return function(code) {
|
|
25881
25883
|
return "\x1b[".concat(38 + offset, ";5;").concat(code, "m");
|
|
25882
25884
|
};
|
|
25883
25885
|
};
|
|
25884
|
-
var wrapAnsi16m
|
|
25886
|
+
var wrapAnsi16m = function() {
|
|
25885
25887
|
var offset = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
25886
25888
|
return function(red, green, blue) {
|
|
25887
25889
|
return "\x1b[".concat(38 + offset, ";2;").concat(red, ";").concat(green, ";").concat(blue, "m");
|
|
25888
25890
|
};
|
|
25889
25891
|
};
|
|
25890
|
-
var styles$
|
|
25892
|
+
var styles$2 = {
|
|
25891
25893
|
modifier: {
|
|
25892
25894
|
reset: [
|
|
25893
25895
|
0,
|
|
@@ -26078,26 +26080,26 @@ var styles$3 = {
|
|
|
26078
26080
|
]
|
|
26079
26081
|
}
|
|
26080
26082
|
};
|
|
26081
|
-
Object.keys(styles$
|
|
26082
|
-
var foregroundColorNames
|
|
26083
|
-
var backgroundColorNames
|
|
26084
|
-
_to_consumable_array(foregroundColorNames
|
|
26085
|
-
function assembleStyles
|
|
26086
|
-
var _styles$
|
|
26083
|
+
Object.keys(styles$2.modifier);
|
|
26084
|
+
var foregroundColorNames = Object.keys(styles$2.color);
|
|
26085
|
+
var backgroundColorNames = Object.keys(styles$2.bgColor);
|
|
26086
|
+
_to_consumable_array(foregroundColorNames).concat(_to_consumable_array(backgroundColorNames));
|
|
26087
|
+
function assembleStyles() {
|
|
26088
|
+
var _styles$2;
|
|
26087
26089
|
var codes = new Map();
|
|
26088
26090
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
26089
26091
|
try {
|
|
26090
|
-
for(var _iterator = Object.entries(styles$
|
|
26092
|
+
for(var _iterator = Object.entries(styles$2)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
26091
26093
|
var _step_value = _sliced_to_array(_step.value, 2), groupName = _step_value[0], group = _step_value[1];
|
|
26092
26094
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
26093
26095
|
try {
|
|
26094
26096
|
for(var _iterator1 = Object.entries(group)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
26095
26097
|
var _step_value1 = _sliced_to_array(_step1.value, 2), styleName = _step_value1[0], style = _step_value1[1];
|
|
26096
|
-
styles$
|
|
26098
|
+
styles$2[styleName] = {
|
|
26097
26099
|
open: "\x1b[".concat(style[0], "m"),
|
|
26098
26100
|
close: "\x1b[".concat(style[1], "m")
|
|
26099
26101
|
};
|
|
26100
|
-
group[styleName] = styles$
|
|
26102
|
+
group[styleName] = styles$2[styleName];
|
|
26101
26103
|
codes.set(style[0], style[1]);
|
|
26102
26104
|
}
|
|
26103
26105
|
} catch (err) {
|
|
@@ -26114,7 +26116,7 @@ function assembleStyles$1() {
|
|
|
26114
26116
|
}
|
|
26115
26117
|
}
|
|
26116
26118
|
}
|
|
26117
|
-
Object.defineProperty(styles$
|
|
26119
|
+
Object.defineProperty(styles$2, groupName, {
|
|
26118
26120
|
value: group,
|
|
26119
26121
|
enumerable: false
|
|
26120
26122
|
});
|
|
@@ -26133,20 +26135,20 @@ function assembleStyles$1() {
|
|
|
26133
26135
|
}
|
|
26134
26136
|
}
|
|
26135
26137
|
}
|
|
26136
|
-
Object.defineProperty(styles$
|
|
26138
|
+
Object.defineProperty(styles$2, 'codes', {
|
|
26137
26139
|
value: codes,
|
|
26138
26140
|
enumerable: false
|
|
26139
26141
|
});
|
|
26140
|
-
styles$
|
|
26141
|
-
styles$
|
|
26142
|
-
styles$
|
|
26143
|
-
styles$
|
|
26144
|
-
styles$
|
|
26145
|
-
styles$
|
|
26146
|
-
styles$
|
|
26147
|
-
styles$
|
|
26142
|
+
styles$2.color.close = '\u001B[39m';
|
|
26143
|
+
styles$2.bgColor.close = '\u001B[49m';
|
|
26144
|
+
styles$2.color.ansi = wrapAnsi16();
|
|
26145
|
+
styles$2.color.ansi256 = wrapAnsi256();
|
|
26146
|
+
styles$2.color.ansi16m = wrapAnsi16m();
|
|
26147
|
+
styles$2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
26148
|
+
styles$2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
26149
|
+
styles$2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
26148
26150
|
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
26149
|
-
Object.defineProperties(styles$
|
|
26151
|
+
Object.defineProperties(styles$2, {
|
|
26150
26152
|
rgbToAnsi256: {
|
|
26151
26153
|
value: function(red, green, blue) {
|
|
26152
26154
|
// We use the extended greyscale palette here, with the exception of
|
|
@@ -26191,7 +26193,7 @@ function assembleStyles$1() {
|
|
|
26191
26193
|
},
|
|
26192
26194
|
hexToAnsi256: {
|
|
26193
26195
|
value: function(hex) {
|
|
26194
|
-
return (_styles$
|
|
26196
|
+
return (_styles$2 = styles$2).rgbToAnsi256.apply(_styles$2, _to_consumable_array(styles$2.hexToRgb(hex)));
|
|
26195
26197
|
},
|
|
26196
26198
|
enumerable: false
|
|
26197
26199
|
},
|
|
@@ -26232,20 +26234,20 @@ function assembleStyles$1() {
|
|
|
26232
26234
|
},
|
|
26233
26235
|
rgbToAnsi: {
|
|
26234
26236
|
value: function(red, green, blue) {
|
|
26235
|
-
return styles$
|
|
26237
|
+
return styles$2.ansi256ToAnsi(styles$2.rgbToAnsi256(red, green, blue));
|
|
26236
26238
|
},
|
|
26237
26239
|
enumerable: false
|
|
26238
26240
|
},
|
|
26239
26241
|
hexToAnsi: {
|
|
26240
26242
|
value: function(hex) {
|
|
26241
|
-
return styles$
|
|
26243
|
+
return styles$2.ansi256ToAnsi(styles$2.hexToAnsi256(hex));
|
|
26242
26244
|
},
|
|
26243
26245
|
enumerable: false
|
|
26244
26246
|
}
|
|
26245
26247
|
});
|
|
26246
|
-
return styles$
|
|
26248
|
+
return styles$2;
|
|
26247
26249
|
}
|
|
26248
|
-
var ansiStyles
|
|
26250
|
+
var ansiStyles = assembleStyles();
|
|
26249
26251
|
var ESCAPES$3 = new Set([
|
|
26250
26252
|
'\u001B',
|
|
26251
26253
|
'\u009B'
|
|
@@ -26443,7 +26445,7 @@ var exec = function(string, columns) {
|
|
|
26443
26445
|
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
|
|
26444
26446
|
}
|
|
26445
26447
|
}
|
|
26446
|
-
var code1 = ansiStyles
|
|
26448
|
+
var code1 = ansiStyles.codes.get(Number(escapeCode));
|
|
26447
26449
|
if (pre[index1 + 1] === '\n') {
|
|
26448
26450
|
if (escapeUrl) {
|
|
26449
26451
|
returnValue += wrapAnsiHyperlink('');
|
|
@@ -26525,7 +26527,7 @@ var checkAnsi = function(ansiCodes, isEscapes, endAnsiCode) {
|
|
|
26525
26527
|
if (ansiCode.includes(';')) {
|
|
26526
26528
|
ansiCode = ansiCode.split(';')[0][0] + '0';
|
|
26527
26529
|
}
|
|
26528
|
-
var item = ansiStyles
|
|
26530
|
+
var item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
|
|
26529
26531
|
if (item) {
|
|
26530
26532
|
var indexEscape = ansiCodes.indexOf(item.toString());
|
|
26531
26533
|
if (indexEscape === -1) {
|
|
@@ -26559,7 +26561,7 @@ var checkAnsi = function(ansiCodes, isEscapes, endAnsiCode) {
|
|
|
26559
26561
|
return output.indexOf(element) === index;
|
|
26560
26562
|
});
|
|
26561
26563
|
if (endAnsiCode !== undefined) {
|
|
26562
|
-
var fistEscapeCode = wrapAnsi(ansiStyles
|
|
26564
|
+
var fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
|
|
26563
26565
|
// TODO: Remove the use of `.reduce` here.
|
|
26564
26566
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
26565
26567
|
output = output.reduce(function(current, next) {
|
|
@@ -27100,7 +27102,7 @@ var applyGapStyles = function(node, style) {
|
|
|
27100
27102
|
node.setGap(Yoga.GUTTER_ROW, (_style_rowGap = style.rowGap) !== null && _style_rowGap !== void 0 ? _style_rowGap : 0);
|
|
27101
27103
|
}
|
|
27102
27104
|
};
|
|
27103
|
-
var styles$
|
|
27105
|
+
var styles$1 = function(node) {
|
|
27104
27106
|
var style = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
27105
27107
|
applyPositionStyles(node, style);
|
|
27106
27108
|
applyMarginStyles(node, style);
|
|
@@ -27241,7 +27243,7 @@ var reconciler = createReconciler({
|
|
|
27241
27243
|
if (key === 'style') {
|
|
27242
27244
|
setStyle(node, value);
|
|
27243
27245
|
if (node.yogaNode) {
|
|
27244
|
-
styles$
|
|
27246
|
+
styles$1(node.yogaNode, value);
|
|
27245
27247
|
}
|
|
27246
27248
|
continue;
|
|
27247
27249
|
}
|
|
@@ -27384,7 +27386,7 @@ var reconciler = createReconciler({
|
|
|
27384
27386
|
}
|
|
27385
27387
|
}
|
|
27386
27388
|
if (style && node.yogaNode) {
|
|
27387
|
-
styles$
|
|
27389
|
+
styles$1(node.yogaNode, style);
|
|
27388
27390
|
}
|
|
27389
27391
|
},
|
|
27390
27392
|
commitTextUpdate: function commitTextUpdate(node, _oldText, newText) {
|
|
@@ -27524,678 +27526,1238 @@ function requireCliBoxes() {
|
|
|
27524
27526
|
}
|
|
27525
27527
|
var cliBoxesExports = requireCliBoxes();
|
|
27526
27528
|
var cliBoxes = /*@__PURE__*/ getDefaultExportFromCjs(cliBoxesExports);
|
|
27527
|
-
var
|
|
27528
|
-
|
|
27529
|
-
var offset = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
27530
|
-
return function(code) {
|
|
27531
|
-
return "\x1b[".concat(code + offset, "m");
|
|
27532
|
-
};
|
|
27529
|
+
var lib = {
|
|
27530
|
+
exports: {}
|
|
27533
27531
|
};
|
|
27534
|
-
var
|
|
27535
|
-
|
|
27536
|
-
return function(code) {
|
|
27537
|
-
return "\x1b[".concat(38 + offset, ";5;").concat(code, "m");
|
|
27538
|
-
};
|
|
27532
|
+
var colors = {
|
|
27533
|
+
exports: {}
|
|
27539
27534
|
};
|
|
27540
|
-
var
|
|
27541
|
-
|
|
27542
|
-
return function(red, green, blue) {
|
|
27543
|
-
return "\x1b[".concat(38 + offset, ";2;").concat(red, ";").concat(green, ";").concat(blue, "m");
|
|
27544
|
-
};
|
|
27535
|
+
var styles = {
|
|
27536
|
+
exports: {}
|
|
27545
27537
|
};
|
|
27546
|
-
|
|
27547
|
-
|
|
27548
|
-
|
|
27549
|
-
|
|
27550
|
-
|
|
27551
|
-
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27555
|
-
|
|
27556
|
-
|
|
27557
|
-
|
|
27558
|
-
|
|
27559
|
-
|
|
27560
|
-
|
|
27561
|
-
|
|
27562
|
-
|
|
27563
|
-
|
|
27564
|
-
|
|
27565
|
-
|
|
27566
|
-
|
|
27567
|
-
|
|
27568
|
-
|
|
27569
|
-
|
|
27570
|
-
|
|
27571
|
-
|
|
27572
|
-
|
|
27573
|
-
|
|
27574
|
-
|
|
27575
|
-
|
|
27576
|
-
|
|
27577
|
-
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
|
|
27581
|
-
|
|
27582
|
-
|
|
27583
|
-
|
|
27584
|
-
|
|
27585
|
-
|
|
27586
|
-
|
|
27587
|
-
|
|
27588
|
-
|
|
27589
|
-
|
|
27590
|
-
|
|
27591
|
-
|
|
27592
|
-
|
|
27593
|
-
|
|
27594
|
-
|
|
27595
|
-
|
|
27596
|
-
|
|
27597
|
-
|
|
27598
|
-
|
|
27599
|
-
|
|
27600
|
-
|
|
27601
|
-
|
|
27602
|
-
|
|
27603
|
-
|
|
27604
|
-
|
|
27605
|
-
|
|
27606
|
-
|
|
27607
|
-
|
|
27608
|
-
|
|
27609
|
-
|
|
27610
|
-
|
|
27611
|
-
|
|
27612
|
-
|
|
27613
|
-
|
|
27614
|
-
|
|
27615
|
-
|
|
27616
|
-
|
|
27617
|
-
|
|
27618
|
-
|
|
27619
|
-
|
|
27620
|
-
|
|
27621
|
-
|
|
27622
|
-
|
|
27623
|
-
|
|
27624
|
-
|
|
27625
|
-
|
|
27626
|
-
|
|
27627
|
-
|
|
27628
|
-
|
|
27629
|
-
|
|
27630
|
-
|
|
27631
|
-
|
|
27632
|
-
|
|
27633
|
-
|
|
27634
|
-
|
|
27635
|
-
|
|
27636
|
-
|
|
27637
|
-
|
|
27638
|
-
|
|
27639
|
-
|
|
27640
|
-
|
|
27641
|
-
|
|
27642
|
-
|
|
27643
|
-
|
|
27644
|
-
|
|
27645
|
-
|
|
27646
|
-
|
|
27647
|
-
|
|
27648
|
-
|
|
27649
|
-
|
|
27650
|
-
|
|
27651
|
-
|
|
27652
|
-
|
|
27653
|
-
|
|
27654
|
-
|
|
27655
|
-
|
|
27656
|
-
|
|
27657
|
-
|
|
27658
|
-
|
|
27659
|
-
|
|
27660
|
-
|
|
27661
|
-
|
|
27662
|
-
|
|
27663
|
-
|
|
27664
|
-
|
|
27665
|
-
|
|
27666
|
-
|
|
27667
|
-
|
|
27668
|
-
|
|
27669
|
-
|
|
27670
|
-
|
|
27671
|
-
|
|
27672
|
-
|
|
27673
|
-
|
|
27674
|
-
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
|
|
27678
|
-
|
|
27679
|
-
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27688
|
-
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
|
|
27703
|
-
|
|
27704
|
-
|
|
27705
|
-
|
|
27706
|
-
|
|
27707
|
-
|
|
27708
|
-
|
|
27709
|
-
|
|
27710
|
-
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27719
|
-
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
27724
|
-
|
|
27725
|
-
|
|
27726
|
-
|
|
27727
|
-
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
27733
|
-
|
|
27734
|
-
|
|
27538
|
+
/*
|
|
27539
|
+
The MIT License (MIT)
|
|
27540
|
+
|
|
27541
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
27542
|
+
|
|
27543
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27544
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
27545
|
+
in the Software without restriction, including without limitation the rights
|
|
27546
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27547
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
27548
|
+
furnished to do so, subject to the following conditions:
|
|
27549
|
+
|
|
27550
|
+
The above copyright notice and this permission notice shall be included in
|
|
27551
|
+
all copies or substantial portions of the Software.
|
|
27552
|
+
|
|
27553
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27554
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27555
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27556
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27557
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27558
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27559
|
+
THE SOFTWARE.
|
|
27560
|
+
|
|
27561
|
+
*/ var hasRequiredStyles;
|
|
27562
|
+
function requireStyles() {
|
|
27563
|
+
if (hasRequiredStyles) return styles.exports;
|
|
27564
|
+
hasRequiredStyles = 1;
|
|
27565
|
+
(function(module) {
|
|
27566
|
+
var styles = {};
|
|
27567
|
+
module['exports'] = styles;
|
|
27568
|
+
var codes = {
|
|
27569
|
+
reset: [
|
|
27570
|
+
0,
|
|
27571
|
+
0
|
|
27572
|
+
],
|
|
27573
|
+
bold: [
|
|
27574
|
+
1,
|
|
27575
|
+
22
|
|
27576
|
+
],
|
|
27577
|
+
dim: [
|
|
27578
|
+
2,
|
|
27579
|
+
22
|
|
27580
|
+
],
|
|
27581
|
+
italic: [
|
|
27582
|
+
3,
|
|
27583
|
+
23
|
|
27584
|
+
],
|
|
27585
|
+
underline: [
|
|
27586
|
+
4,
|
|
27587
|
+
24
|
|
27588
|
+
],
|
|
27589
|
+
inverse: [
|
|
27590
|
+
7,
|
|
27591
|
+
27
|
|
27592
|
+
],
|
|
27593
|
+
hidden: [
|
|
27594
|
+
8,
|
|
27595
|
+
28
|
|
27596
|
+
],
|
|
27597
|
+
strikethrough: [
|
|
27598
|
+
9,
|
|
27599
|
+
29
|
|
27600
|
+
],
|
|
27601
|
+
black: [
|
|
27602
|
+
30,
|
|
27603
|
+
39
|
|
27604
|
+
],
|
|
27605
|
+
red: [
|
|
27606
|
+
31,
|
|
27607
|
+
39
|
|
27608
|
+
],
|
|
27609
|
+
green: [
|
|
27610
|
+
32,
|
|
27611
|
+
39
|
|
27612
|
+
],
|
|
27613
|
+
yellow: [
|
|
27614
|
+
33,
|
|
27615
|
+
39
|
|
27616
|
+
],
|
|
27617
|
+
blue: [
|
|
27618
|
+
34,
|
|
27619
|
+
39
|
|
27620
|
+
],
|
|
27621
|
+
magenta: [
|
|
27622
|
+
35,
|
|
27623
|
+
39
|
|
27624
|
+
],
|
|
27625
|
+
cyan: [
|
|
27626
|
+
36,
|
|
27627
|
+
39
|
|
27628
|
+
],
|
|
27629
|
+
white: [
|
|
27630
|
+
37,
|
|
27631
|
+
39
|
|
27632
|
+
],
|
|
27633
|
+
gray: [
|
|
27634
|
+
90,
|
|
27635
|
+
39
|
|
27636
|
+
],
|
|
27637
|
+
grey: [
|
|
27638
|
+
90,
|
|
27639
|
+
39
|
|
27640
|
+
],
|
|
27641
|
+
brightRed: [
|
|
27642
|
+
91,
|
|
27643
|
+
39
|
|
27644
|
+
],
|
|
27645
|
+
brightGreen: [
|
|
27646
|
+
92,
|
|
27647
|
+
39
|
|
27648
|
+
],
|
|
27649
|
+
brightYellow: [
|
|
27650
|
+
93,
|
|
27651
|
+
39
|
|
27652
|
+
],
|
|
27653
|
+
brightBlue: [
|
|
27654
|
+
94,
|
|
27655
|
+
39
|
|
27656
|
+
],
|
|
27657
|
+
brightMagenta: [
|
|
27658
|
+
95,
|
|
27659
|
+
39
|
|
27660
|
+
],
|
|
27661
|
+
brightCyan: [
|
|
27662
|
+
96,
|
|
27663
|
+
39
|
|
27664
|
+
],
|
|
27665
|
+
brightWhite: [
|
|
27666
|
+
97,
|
|
27667
|
+
39
|
|
27668
|
+
],
|
|
27669
|
+
bgBlack: [
|
|
27670
|
+
40,
|
|
27671
|
+
49
|
|
27672
|
+
],
|
|
27673
|
+
bgRed: [
|
|
27674
|
+
41,
|
|
27675
|
+
49
|
|
27676
|
+
],
|
|
27677
|
+
bgGreen: [
|
|
27678
|
+
42,
|
|
27679
|
+
49
|
|
27680
|
+
],
|
|
27681
|
+
bgYellow: [
|
|
27682
|
+
43,
|
|
27683
|
+
49
|
|
27684
|
+
],
|
|
27685
|
+
bgBlue: [
|
|
27686
|
+
44,
|
|
27687
|
+
49
|
|
27688
|
+
],
|
|
27689
|
+
bgMagenta: [
|
|
27690
|
+
45,
|
|
27691
|
+
49
|
|
27692
|
+
],
|
|
27693
|
+
bgCyan: [
|
|
27694
|
+
46,
|
|
27695
|
+
49
|
|
27696
|
+
],
|
|
27697
|
+
bgWhite: [
|
|
27698
|
+
47,
|
|
27699
|
+
49
|
|
27700
|
+
],
|
|
27701
|
+
bgGray: [
|
|
27702
|
+
100,
|
|
27703
|
+
49
|
|
27704
|
+
],
|
|
27705
|
+
bgGrey: [
|
|
27706
|
+
100,
|
|
27707
|
+
49
|
|
27708
|
+
],
|
|
27709
|
+
bgBrightRed: [
|
|
27710
|
+
101,
|
|
27711
|
+
49
|
|
27712
|
+
],
|
|
27713
|
+
bgBrightGreen: [
|
|
27714
|
+
102,
|
|
27715
|
+
49
|
|
27716
|
+
],
|
|
27717
|
+
bgBrightYellow: [
|
|
27718
|
+
103,
|
|
27719
|
+
49
|
|
27720
|
+
],
|
|
27721
|
+
bgBrightBlue: [
|
|
27722
|
+
104,
|
|
27723
|
+
49
|
|
27724
|
+
],
|
|
27725
|
+
bgBrightMagenta: [
|
|
27726
|
+
105,
|
|
27727
|
+
49
|
|
27728
|
+
],
|
|
27729
|
+
bgBrightCyan: [
|
|
27730
|
+
106,
|
|
27731
|
+
49
|
|
27732
|
+
],
|
|
27733
|
+
bgBrightWhite: [
|
|
27734
|
+
107,
|
|
27735
|
+
49
|
|
27736
|
+
],
|
|
27737
|
+
// legacy styles for colors pre v1.0.0
|
|
27738
|
+
blackBG: [
|
|
27739
|
+
40,
|
|
27740
|
+
49
|
|
27741
|
+
],
|
|
27742
|
+
redBG: [
|
|
27743
|
+
41,
|
|
27744
|
+
49
|
|
27745
|
+
],
|
|
27746
|
+
greenBG: [
|
|
27747
|
+
42,
|
|
27748
|
+
49
|
|
27749
|
+
],
|
|
27750
|
+
yellowBG: [
|
|
27751
|
+
43,
|
|
27752
|
+
49
|
|
27753
|
+
],
|
|
27754
|
+
blueBG: [
|
|
27755
|
+
44,
|
|
27756
|
+
49
|
|
27757
|
+
],
|
|
27758
|
+
magentaBG: [
|
|
27759
|
+
45,
|
|
27760
|
+
49
|
|
27761
|
+
],
|
|
27762
|
+
cyanBG: [
|
|
27763
|
+
46,
|
|
27764
|
+
49
|
|
27765
|
+
],
|
|
27766
|
+
whiteBG: [
|
|
27767
|
+
47,
|
|
27768
|
+
49
|
|
27769
|
+
]
|
|
27770
|
+
};
|
|
27771
|
+
Object.keys(codes).forEach(function(key) {
|
|
27772
|
+
var val = codes[key];
|
|
27773
|
+
var style = styles[key] = [];
|
|
27774
|
+
style.open = '\u001b[' + val[0] + 'm';
|
|
27775
|
+
style.close = '\u001b[' + val[1] + 'm';
|
|
27776
|
+
});
|
|
27777
|
+
})(styles);
|
|
27778
|
+
return styles.exports;
|
|
27779
|
+
}
|
|
27780
|
+
/*
|
|
27781
|
+
MIT License
|
|
27782
|
+
|
|
27783
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
27784
|
+
|
|
27785
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
27786
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
27787
|
+
the Software without restriction, including without limitation the rights to
|
|
27788
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
27789
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
27790
|
+
so, subject to the following conditions:
|
|
27791
|
+
|
|
27792
|
+
The above copyright notice and this permission notice shall be included in all
|
|
27793
|
+
copies or substantial portions of the Software.
|
|
27794
|
+
|
|
27795
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27796
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27797
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27798
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27799
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27800
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27801
|
+
SOFTWARE.
|
|
27802
|
+
*/ var hasFlag;
|
|
27803
|
+
var hasRequiredHasFlag;
|
|
27804
|
+
function requireHasFlag() {
|
|
27805
|
+
if (hasRequiredHasFlag) return hasFlag;
|
|
27806
|
+
hasRequiredHasFlag = 1;
|
|
27807
|
+
hasFlag = function hasFlag(flag, argv) {
|
|
27808
|
+
argv = argv || process.argv;
|
|
27809
|
+
var terminatorPos = argv.indexOf('--');
|
|
27810
|
+
var prefix = /^-{1,2}/.test(flag) ? '' : '--';
|
|
27811
|
+
var pos = argv.indexOf(prefix + flag);
|
|
27812
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
27813
|
+
};
|
|
27814
|
+
return hasFlag;
|
|
27815
|
+
}
|
|
27816
|
+
/*
|
|
27817
|
+
The MIT License (MIT)
|
|
27818
|
+
|
|
27819
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
27820
|
+
|
|
27821
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27822
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
27823
|
+
in the Software without restriction, including without limitation the rights
|
|
27824
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27825
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
27826
|
+
furnished to do so, subject to the following conditions:
|
|
27827
|
+
|
|
27828
|
+
The above copyright notice and this permission notice shall be included in
|
|
27829
|
+
all copies or substantial portions of the Software.
|
|
27830
|
+
|
|
27831
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27832
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27833
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27834
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27835
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27836
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27837
|
+
THE SOFTWARE.
|
|
27838
|
+
|
|
27839
|
+
*/ var supportsColors;
|
|
27840
|
+
var hasRequiredSupportsColors;
|
|
27841
|
+
function requireSupportsColors() {
|
|
27842
|
+
if (hasRequiredSupportsColors) return supportsColors;
|
|
27843
|
+
hasRequiredSupportsColors = 1;
|
|
27844
|
+
var os = _os.default;
|
|
27845
|
+
var hasFlag = requireHasFlag();
|
|
27846
|
+
var _$env = process.env;
|
|
27847
|
+
var forceColor = undefined;
|
|
27848
|
+
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
|
|
27849
|
+
forceColor = false;
|
|
27850
|
+
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
27851
|
+
forceColor = true;
|
|
27735
27852
|
}
|
|
27736
|
-
|
|
27737
|
-
|
|
27738
|
-
|
|
27739
|
-
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
var _styles$1;
|
|
27743
|
-
var codes = new Map();
|
|
27744
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
27745
|
-
try {
|
|
27746
|
-
for(var _iterator = Object.entries(styles$1)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
27747
|
-
var _step_value = _sliced_to_array(_step.value, 2), groupName = _step_value[0], group = _step_value[1];
|
|
27748
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
27749
|
-
try {
|
|
27750
|
-
for(var _iterator1 = Object.entries(group)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
27751
|
-
var _step_value1 = _sliced_to_array(_step1.value, 2), styleName = _step_value1[0], style = _step_value1[1];
|
|
27752
|
-
styles$1[styleName] = {
|
|
27753
|
-
open: "\x1b[".concat(style[0], "m"),
|
|
27754
|
-
close: "\x1b[".concat(style[1], "m")
|
|
27755
|
-
};
|
|
27756
|
-
group[styleName] = styles$1[styleName];
|
|
27757
|
-
codes.set(style[0], style[1]);
|
|
27758
|
-
}
|
|
27759
|
-
} catch (err) {
|
|
27760
|
-
_didIteratorError1 = true;
|
|
27761
|
-
_iteratorError1 = err;
|
|
27762
|
-
} finally{
|
|
27763
|
-
try {
|
|
27764
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
27765
|
-
_iterator1.return();
|
|
27766
|
-
}
|
|
27767
|
-
} finally{
|
|
27768
|
-
if (_didIteratorError1) {
|
|
27769
|
-
throw _iteratorError1;
|
|
27770
|
-
}
|
|
27771
|
-
}
|
|
27772
|
-
}
|
|
27773
|
-
Object.defineProperty(styles$1, groupName, {
|
|
27774
|
-
value: group,
|
|
27775
|
-
enumerable: false
|
|
27776
|
-
});
|
|
27853
|
+
if ('FORCE_COLOR' in _$env) {
|
|
27854
|
+
forceColor = _$env.FORCE_COLOR.length === 0 || parseInt(_$env.FORCE_COLOR, 10) !== 0;
|
|
27855
|
+
}
|
|
27856
|
+
function translateLevel(level) {
|
|
27857
|
+
if (level === 0) {
|
|
27858
|
+
return false;
|
|
27777
27859
|
}
|
|
27778
|
-
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27860
|
+
return {
|
|
27861
|
+
level: level,
|
|
27862
|
+
hasBasic: true,
|
|
27863
|
+
has256: level >= 2,
|
|
27864
|
+
has16m: level >= 3
|
|
27865
|
+
};
|
|
27866
|
+
}
|
|
27867
|
+
function supportsColor(stream) {
|
|
27868
|
+
if (forceColor === false) {
|
|
27869
|
+
return 0;
|
|
27870
|
+
}
|
|
27871
|
+
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
27872
|
+
return 3;
|
|
27873
|
+
}
|
|
27874
|
+
if (hasFlag('color=256')) {
|
|
27875
|
+
return 2;
|
|
27876
|
+
}
|
|
27877
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
27878
|
+
return 0;
|
|
27879
|
+
}
|
|
27880
|
+
var min = forceColor ? 1 : 0;
|
|
27881
|
+
if (process.platform === 'win32') {
|
|
27882
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
27883
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
27884
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
27885
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first
|
|
27886
|
+
// Windows release that supports 256 colors. Windows 10 build 14931 is the
|
|
27887
|
+
// first release that supports 16m/TrueColor.
|
|
27888
|
+
var osRelease = os.release().split('.');
|
|
27889
|
+
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
27890
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
27891
|
+
}
|
|
27892
|
+
return 1;
|
|
27893
|
+
}
|
|
27894
|
+
if ('CI' in _$env) {
|
|
27895
|
+
if ([
|
|
27896
|
+
'TRAVIS',
|
|
27897
|
+
'CIRCLECI',
|
|
27898
|
+
'APPVEYOR',
|
|
27899
|
+
'GITLAB_CI'
|
|
27900
|
+
].some(function(sign) {
|
|
27901
|
+
return sign in _$env;
|
|
27902
|
+
}) || _$env.CI_NAME === 'codeship') {
|
|
27903
|
+
return 1;
|
|
27904
|
+
}
|
|
27905
|
+
return min;
|
|
27906
|
+
}
|
|
27907
|
+
if ('TEAMCITY_VERSION' in _$env) {
|
|
27908
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_$env.TEAMCITY_VERSION) ? 1 : 0;
|
|
27909
|
+
}
|
|
27910
|
+
if ('TERM_PROGRAM' in _$env) {
|
|
27911
|
+
var version = parseInt((_$env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
27912
|
+
switch(_$env.TERM_PROGRAM){
|
|
27913
|
+
case 'iTerm.app':
|
|
27914
|
+
return version >= 3 ? 3 : 2;
|
|
27915
|
+
case 'Hyper':
|
|
27916
|
+
return 3;
|
|
27917
|
+
case 'Apple_Terminal':
|
|
27918
|
+
return 2;
|
|
27789
27919
|
}
|
|
27790
27920
|
}
|
|
27921
|
+
if (/-256(color)?$/i.test(_$env.TERM)) {
|
|
27922
|
+
return 2;
|
|
27923
|
+
}
|
|
27924
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(_$env.TERM)) {
|
|
27925
|
+
return 1;
|
|
27926
|
+
}
|
|
27927
|
+
if ('COLORTERM' in _$env) {
|
|
27928
|
+
return 1;
|
|
27929
|
+
}
|
|
27930
|
+
if (_$env.TERM === 'dumb') {
|
|
27931
|
+
return min;
|
|
27932
|
+
}
|
|
27933
|
+
return min;
|
|
27791
27934
|
}
|
|
27792
|
-
|
|
27793
|
-
|
|
27794
|
-
|
|
27795
|
-
}
|
|
27796
|
-
|
|
27797
|
-
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27823
|
-
|
|
27824
|
-
|
|
27825
|
-
|
|
27826
|
-
|
|
27827
|
-
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
|
|
27834
|
-
|
|
27835
|
-
|
|
27836
|
-
|
|
27837
|
-
|
|
27838
|
-
|
|
27839
|
-
|
|
27840
|
-
|
|
27841
|
-
|
|
27842
|
-
|
|
27843
|
-
|
|
27935
|
+
function getSupportLevel(stream) {
|
|
27936
|
+
var level = supportsColor(stream);
|
|
27937
|
+
return translateLevel(level);
|
|
27938
|
+
}
|
|
27939
|
+
supportsColors = {
|
|
27940
|
+
supportsColor: getSupportLevel,
|
|
27941
|
+
stdout: getSupportLevel(process.stdout),
|
|
27942
|
+
stderr: getSupportLevel(process.stderr)
|
|
27943
|
+
};
|
|
27944
|
+
return supportsColors;
|
|
27945
|
+
}
|
|
27946
|
+
var trap = {
|
|
27947
|
+
exports: {}
|
|
27948
|
+
};
|
|
27949
|
+
var hasRequiredTrap;
|
|
27950
|
+
function requireTrap() {
|
|
27951
|
+
if (hasRequiredTrap) return trap.exports;
|
|
27952
|
+
hasRequiredTrap = 1;
|
|
27953
|
+
(function(module) {
|
|
27954
|
+
module['exports'] = function runTheTrap(text, options) {
|
|
27955
|
+
var result = '';
|
|
27956
|
+
text = text || 'Run the trap, drop the bass';
|
|
27957
|
+
text = text.split('');
|
|
27958
|
+
var trap = {
|
|
27959
|
+
a: [
|
|
27960
|
+
'\u0040',
|
|
27961
|
+
'\u0104',
|
|
27962
|
+
'\u023a',
|
|
27963
|
+
'\u0245',
|
|
27964
|
+
'\u0394',
|
|
27965
|
+
'\u039b',
|
|
27966
|
+
'\u0414'
|
|
27967
|
+
],
|
|
27968
|
+
b: [
|
|
27969
|
+
'\u00df',
|
|
27970
|
+
'\u0181',
|
|
27971
|
+
'\u0243',
|
|
27972
|
+
'\u026e',
|
|
27973
|
+
'\u03b2',
|
|
27974
|
+
'\u0e3f'
|
|
27975
|
+
],
|
|
27976
|
+
c: [
|
|
27977
|
+
'\u00a9',
|
|
27978
|
+
'\u023b',
|
|
27979
|
+
'\u03fe'
|
|
27980
|
+
],
|
|
27981
|
+
d: [
|
|
27982
|
+
'\u00d0',
|
|
27983
|
+
'\u018a',
|
|
27984
|
+
'\u0500',
|
|
27985
|
+
'\u0501',
|
|
27986
|
+
'\u0502',
|
|
27987
|
+
'\u0503'
|
|
27988
|
+
],
|
|
27989
|
+
e: [
|
|
27990
|
+
'\u00cb',
|
|
27991
|
+
'\u0115',
|
|
27992
|
+
'\u018e',
|
|
27993
|
+
'\u0258',
|
|
27994
|
+
'\u03a3',
|
|
27995
|
+
'\u03be',
|
|
27996
|
+
'\u04bc',
|
|
27997
|
+
'\u0a6c'
|
|
27998
|
+
],
|
|
27999
|
+
f: [
|
|
28000
|
+
'\u04fa'
|
|
28001
|
+
],
|
|
28002
|
+
g: [
|
|
28003
|
+
'\u0262'
|
|
28004
|
+
],
|
|
28005
|
+
h: [
|
|
28006
|
+
'\u0126',
|
|
28007
|
+
'\u0195',
|
|
28008
|
+
'\u04a2',
|
|
28009
|
+
'\u04ba',
|
|
28010
|
+
'\u04c7',
|
|
28011
|
+
'\u050a'
|
|
28012
|
+
],
|
|
28013
|
+
i: [
|
|
28014
|
+
'\u0f0f'
|
|
28015
|
+
],
|
|
28016
|
+
j: [
|
|
28017
|
+
'\u0134'
|
|
28018
|
+
],
|
|
28019
|
+
k: [
|
|
28020
|
+
'\u0138',
|
|
28021
|
+
'\u04a0',
|
|
28022
|
+
'\u04c3',
|
|
28023
|
+
'\u051e'
|
|
28024
|
+
],
|
|
28025
|
+
l: [
|
|
28026
|
+
'\u0139'
|
|
28027
|
+
],
|
|
28028
|
+
m: [
|
|
28029
|
+
'\u028d',
|
|
28030
|
+
'\u04cd',
|
|
28031
|
+
'\u04ce',
|
|
28032
|
+
'\u0520',
|
|
28033
|
+
'\u0521',
|
|
28034
|
+
'\u0d69'
|
|
28035
|
+
],
|
|
28036
|
+
n: [
|
|
28037
|
+
'\u00d1',
|
|
28038
|
+
'\u014b',
|
|
28039
|
+
'\u019d',
|
|
28040
|
+
'\u0376',
|
|
28041
|
+
'\u03a0',
|
|
28042
|
+
'\u048a'
|
|
28043
|
+
],
|
|
28044
|
+
o: [
|
|
28045
|
+
'\u00d8',
|
|
28046
|
+
'\u00f5',
|
|
28047
|
+
'\u00f8',
|
|
28048
|
+
'\u01fe',
|
|
28049
|
+
'\u0298',
|
|
28050
|
+
'\u047a',
|
|
28051
|
+
'\u05dd',
|
|
28052
|
+
'\u06dd',
|
|
28053
|
+
'\u0e4f'
|
|
28054
|
+
],
|
|
28055
|
+
p: [
|
|
28056
|
+
'\u01f7',
|
|
28057
|
+
'\u048e'
|
|
28058
|
+
],
|
|
28059
|
+
q: [
|
|
28060
|
+
'\u09cd'
|
|
28061
|
+
],
|
|
28062
|
+
r: [
|
|
28063
|
+
'\u00ae',
|
|
28064
|
+
'\u01a6',
|
|
28065
|
+
'\u0210',
|
|
28066
|
+
'\u024c',
|
|
28067
|
+
'\u0280',
|
|
28068
|
+
'\u042f'
|
|
28069
|
+
],
|
|
28070
|
+
s: [
|
|
28071
|
+
'\u00a7',
|
|
28072
|
+
'\u03de',
|
|
28073
|
+
'\u03df',
|
|
28074
|
+
'\u03e8'
|
|
28075
|
+
],
|
|
28076
|
+
t: [
|
|
28077
|
+
'\u0141',
|
|
28078
|
+
'\u0166',
|
|
28079
|
+
'\u0373'
|
|
28080
|
+
],
|
|
28081
|
+
u: [
|
|
28082
|
+
'\u01b1',
|
|
28083
|
+
'\u054d'
|
|
28084
|
+
],
|
|
28085
|
+
v: [
|
|
28086
|
+
'\u05d8'
|
|
28087
|
+
],
|
|
28088
|
+
w: [
|
|
28089
|
+
'\u0428',
|
|
28090
|
+
'\u0460',
|
|
28091
|
+
'\u047c',
|
|
28092
|
+
'\u0d70'
|
|
28093
|
+
],
|
|
28094
|
+
x: [
|
|
28095
|
+
'\u04b2',
|
|
28096
|
+
'\u04fe',
|
|
28097
|
+
'\u04fc',
|
|
28098
|
+
'\u04fd'
|
|
28099
|
+
],
|
|
28100
|
+
y: [
|
|
28101
|
+
'\u00a5',
|
|
28102
|
+
'\u04b0',
|
|
28103
|
+
'\u04cb'
|
|
28104
|
+
],
|
|
28105
|
+
z: [
|
|
28106
|
+
'\u01b5',
|
|
28107
|
+
'\u0240'
|
|
28108
|
+
]
|
|
28109
|
+
};
|
|
28110
|
+
text.forEach(function(c) {
|
|
28111
|
+
c = c.toLowerCase();
|
|
28112
|
+
var chars = trap[c] || [
|
|
28113
|
+
' '
|
|
27844
28114
|
];
|
|
27845
|
-
|
|
27846
|
-
|
|
27847
|
-
|
|
27848
|
-
hexToAnsi256: {
|
|
27849
|
-
value: function(hex) {
|
|
27850
|
-
return (_styles$1 = styles$1).rgbToAnsi256.apply(_styles$1, _to_consumable_array(styles$1.hexToRgb(hex)));
|
|
27851
|
-
},
|
|
27852
|
-
enumerable: false
|
|
27853
|
-
},
|
|
27854
|
-
ansi256ToAnsi: {
|
|
27855
|
-
value: function value(code) {
|
|
27856
|
-
if (code < 8) {
|
|
27857
|
-
return 30 + code;
|
|
27858
|
-
}
|
|
27859
|
-
if (code < 16) {
|
|
27860
|
-
return 90 + (code - 8);
|
|
27861
|
-
}
|
|
27862
|
-
var red;
|
|
27863
|
-
var green;
|
|
27864
|
-
var blue;
|
|
27865
|
-
if (code >= 232) {
|
|
27866
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
27867
|
-
green = red;
|
|
27868
|
-
blue = red;
|
|
28115
|
+
var rand = Math.floor(Math.random() * chars.length);
|
|
28116
|
+
if (typeof trap[c] !== 'undefined') {
|
|
28117
|
+
result += trap[c][rand];
|
|
27869
28118
|
} else {
|
|
27870
|
-
|
|
27871
|
-
var remainder = code % 36;
|
|
27872
|
-
red = Math.floor(code / 36) / 5;
|
|
27873
|
-
green = Math.floor(remainder / 6) / 5;
|
|
27874
|
-
blue = remainder % 6 / 5;
|
|
28119
|
+
result += c;
|
|
27875
28120
|
}
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
|
|
27880
|
-
|
|
27881
|
-
|
|
27882
|
-
|
|
27883
|
-
|
|
28121
|
+
});
|
|
28122
|
+
return result;
|
|
28123
|
+
};
|
|
28124
|
+
})(trap);
|
|
28125
|
+
return trap.exports;
|
|
28126
|
+
}
|
|
28127
|
+
var zalgo = {
|
|
28128
|
+
exports: {}
|
|
28129
|
+
};
|
|
28130
|
+
var hasRequiredZalgo;
|
|
28131
|
+
function requireZalgo() {
|
|
28132
|
+
if (hasRequiredZalgo) return zalgo.exports;
|
|
28133
|
+
hasRequiredZalgo = 1;
|
|
28134
|
+
(function(module) {
|
|
28135
|
+
// please no
|
|
28136
|
+
module['exports'] = function zalgo(text, options) {
|
|
28137
|
+
text = text || ' he is here ';
|
|
28138
|
+
var soul = {
|
|
28139
|
+
'up': [
|
|
28140
|
+
'̍',
|
|
28141
|
+
'̎',
|
|
28142
|
+
'̄',
|
|
28143
|
+
'̅',
|
|
28144
|
+
'̿',
|
|
28145
|
+
'̑',
|
|
28146
|
+
'̆',
|
|
28147
|
+
'̐',
|
|
28148
|
+
'͒',
|
|
28149
|
+
'͗',
|
|
28150
|
+
'͑',
|
|
28151
|
+
'̇',
|
|
28152
|
+
'̈',
|
|
28153
|
+
'̊',
|
|
28154
|
+
'͂',
|
|
28155
|
+
'̓',
|
|
28156
|
+
'̈',
|
|
28157
|
+
'͊',
|
|
28158
|
+
'͋',
|
|
28159
|
+
'͌',
|
|
28160
|
+
'̃',
|
|
28161
|
+
'̂',
|
|
28162
|
+
'̌',
|
|
28163
|
+
'͐',
|
|
28164
|
+
'̀',
|
|
28165
|
+
'́',
|
|
28166
|
+
'̋',
|
|
28167
|
+
'̏',
|
|
28168
|
+
'̒',
|
|
28169
|
+
'̓',
|
|
28170
|
+
'̔',
|
|
28171
|
+
'̽',
|
|
28172
|
+
'̉',
|
|
28173
|
+
'ͣ',
|
|
28174
|
+
'ͤ',
|
|
28175
|
+
'ͥ',
|
|
28176
|
+
'ͦ',
|
|
28177
|
+
'ͧ',
|
|
28178
|
+
'ͨ',
|
|
28179
|
+
'ͩ',
|
|
28180
|
+
'ͪ',
|
|
28181
|
+
'ͫ',
|
|
28182
|
+
'ͬ',
|
|
28183
|
+
'ͭ',
|
|
28184
|
+
'ͮ',
|
|
28185
|
+
'ͯ',
|
|
28186
|
+
'̾',
|
|
28187
|
+
'͛',
|
|
28188
|
+
'͆',
|
|
28189
|
+
'̚'
|
|
28190
|
+
],
|
|
28191
|
+
'down': [
|
|
28192
|
+
'̖',
|
|
28193
|
+
'̗',
|
|
28194
|
+
'̘',
|
|
28195
|
+
'̙',
|
|
28196
|
+
'̜',
|
|
28197
|
+
'̝',
|
|
28198
|
+
'̞',
|
|
28199
|
+
'̟',
|
|
28200
|
+
'̠',
|
|
28201
|
+
'̤',
|
|
28202
|
+
'̥',
|
|
28203
|
+
'̦',
|
|
28204
|
+
'̩',
|
|
28205
|
+
'̪',
|
|
28206
|
+
'̫',
|
|
28207
|
+
'̬',
|
|
28208
|
+
'̭',
|
|
28209
|
+
'̮',
|
|
28210
|
+
'̯',
|
|
28211
|
+
'̰',
|
|
28212
|
+
'̱',
|
|
28213
|
+
'̲',
|
|
28214
|
+
'̳',
|
|
28215
|
+
'̹',
|
|
28216
|
+
'̺',
|
|
28217
|
+
'̻',
|
|
28218
|
+
'̼',
|
|
28219
|
+
'ͅ',
|
|
28220
|
+
'͇',
|
|
28221
|
+
'͈',
|
|
28222
|
+
'͉',
|
|
28223
|
+
'͍',
|
|
28224
|
+
'͎',
|
|
28225
|
+
'͓',
|
|
28226
|
+
'͔',
|
|
28227
|
+
'͕',
|
|
28228
|
+
'͖',
|
|
28229
|
+
'͙',
|
|
28230
|
+
'͚',
|
|
28231
|
+
'̣'
|
|
28232
|
+
],
|
|
28233
|
+
'mid': [
|
|
28234
|
+
'̕',
|
|
28235
|
+
'̛',
|
|
28236
|
+
'̀',
|
|
28237
|
+
'́',
|
|
28238
|
+
'͘',
|
|
28239
|
+
'̡',
|
|
28240
|
+
'̢',
|
|
28241
|
+
'̧',
|
|
28242
|
+
'̨',
|
|
28243
|
+
'̴',
|
|
28244
|
+
'̵',
|
|
28245
|
+
'̶',
|
|
28246
|
+
'͜',
|
|
28247
|
+
'͝',
|
|
28248
|
+
'͞',
|
|
28249
|
+
'͟',
|
|
28250
|
+
'͠',
|
|
28251
|
+
'͢',
|
|
28252
|
+
'̸',
|
|
28253
|
+
'̷',
|
|
28254
|
+
'͡',
|
|
28255
|
+
' ҉'
|
|
28256
|
+
]
|
|
28257
|
+
};
|
|
28258
|
+
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
28259
|
+
function randomNumber(range) {
|
|
28260
|
+
var r = Math.floor(Math.random() * range);
|
|
28261
|
+
return r;
|
|
28262
|
+
}
|
|
28263
|
+
function isChar(character) {
|
|
28264
|
+
var bool = false;
|
|
28265
|
+
all.filter(function(i) {
|
|
28266
|
+
bool = i === character;
|
|
28267
|
+
});
|
|
28268
|
+
return bool;
|
|
28269
|
+
}
|
|
28270
|
+
function heComes(text, options) {
|
|
28271
|
+
var result = '';
|
|
28272
|
+
var counts;
|
|
28273
|
+
var l;
|
|
28274
|
+
options = options || {};
|
|
28275
|
+
options['up'] = typeof options['up'] !== 'undefined' ? options['up'] : true;
|
|
28276
|
+
options['mid'] = typeof options['mid'] !== 'undefined' ? options['mid'] : true;
|
|
28277
|
+
options['down'] = typeof options['down'] !== 'undefined' ? options['down'] : true;
|
|
28278
|
+
options['size'] = typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
|
|
28279
|
+
text = text.split('');
|
|
28280
|
+
for(l in text){
|
|
28281
|
+
if (isChar(l)) {
|
|
28282
|
+
continue;
|
|
28283
|
+
}
|
|
28284
|
+
result = result + text[l];
|
|
28285
|
+
counts = {
|
|
28286
|
+
'up': 0,
|
|
28287
|
+
'down': 0,
|
|
28288
|
+
'mid': 0
|
|
28289
|
+
};
|
|
28290
|
+
switch(options.size){
|
|
28291
|
+
case 'mini':
|
|
28292
|
+
counts.up = randomNumber(8);
|
|
28293
|
+
counts.mid = randomNumber(2);
|
|
28294
|
+
counts.down = randomNumber(8);
|
|
28295
|
+
break;
|
|
28296
|
+
case 'maxi':
|
|
28297
|
+
counts.up = randomNumber(16) + 3;
|
|
28298
|
+
counts.mid = randomNumber(4) + 1;
|
|
28299
|
+
counts.down = randomNumber(64) + 3;
|
|
28300
|
+
break;
|
|
28301
|
+
default:
|
|
28302
|
+
counts.up = randomNumber(8) + 1;
|
|
28303
|
+
counts.mid = randomNumber(6) / 2;
|
|
28304
|
+
counts.down = randomNumber(8) + 1;
|
|
28305
|
+
break;
|
|
28306
|
+
}
|
|
28307
|
+
var arr = [
|
|
28308
|
+
'up',
|
|
28309
|
+
'mid',
|
|
28310
|
+
'down'
|
|
28311
|
+
];
|
|
28312
|
+
for(var d in arr){
|
|
28313
|
+
var index = arr[d];
|
|
28314
|
+
for(var i = 0; i <= counts[index]; i++){
|
|
28315
|
+
if (options[index]) {
|
|
28316
|
+
result = result + soul[index][randomNumber(soul[index].length)];
|
|
28317
|
+
}
|
|
28318
|
+
}
|
|
28319
|
+
}
|
|
27884
28320
|
}
|
|
27885
28321
|
return result;
|
|
27886
|
-
}
|
|
27887
|
-
|
|
27888
|
-
|
|
27889
|
-
|
|
27890
|
-
|
|
27891
|
-
|
|
27892
|
-
},
|
|
27893
|
-
enumerable: false
|
|
27894
|
-
},
|
|
27895
|
-
hexToAnsi: {
|
|
27896
|
-
value: function(hex) {
|
|
27897
|
-
return styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex));
|
|
27898
|
-
},
|
|
27899
|
-
enumerable: false
|
|
27900
|
-
}
|
|
27901
|
-
});
|
|
27902
|
-
return styles$1;
|
|
28322
|
+
}
|
|
28323
|
+
// don't summon him
|
|
28324
|
+
return heComes(text, options);
|
|
28325
|
+
};
|
|
28326
|
+
})(zalgo);
|
|
28327
|
+
return zalgo.exports;
|
|
27903
28328
|
}
|
|
27904
|
-
var
|
|
27905
|
-
|
|
27906
|
-
if (!('navigator' in globalThis)) {
|
|
27907
|
-
return 0;
|
|
27908
|
-
}
|
|
27909
|
-
if (globalThis.navigator.userAgentData) {
|
|
27910
|
-
var brand = navigator.userAgentData.brands.find(function(param) {
|
|
27911
|
-
var brand = param.brand;
|
|
27912
|
-
return brand === 'Chromium';
|
|
27913
|
-
});
|
|
27914
|
-
if (brand && brand.version > 93) {
|
|
27915
|
-
return 3;
|
|
27916
|
-
}
|
|
27917
|
-
}
|
|
27918
|
-
if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) {
|
|
27919
|
-
return 1;
|
|
27920
|
-
}
|
|
27921
|
-
return 0;
|
|
27922
|
-
}();
|
|
27923
|
-
var colorSupport = level !== 0 && {
|
|
27924
|
-
level: level,
|
|
27925
|
-
hasBasic: true,
|
|
27926
|
-
has256: level >= 2,
|
|
27927
|
-
has16m: level >= 3
|
|
27928
|
-
};
|
|
27929
|
-
var supportsColor = {
|
|
27930
|
-
stdout: colorSupport,
|
|
27931
|
-
stderr: colorSupport
|
|
28329
|
+
var america = {
|
|
28330
|
+
exports: {}
|
|
27932
28331
|
};
|
|
27933
|
-
|
|
27934
|
-
function
|
|
27935
|
-
|
|
27936
|
-
|
|
27937
|
-
|
|
27938
|
-
|
|
27939
|
-
|
|
27940
|
-
|
|
27941
|
-
|
|
27942
|
-
|
|
27943
|
-
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
|
|
27949
|
-
}
|
|
27950
|
-
|
|
27951
|
-
|
|
27952
|
-
|
|
27953
|
-
do {
|
|
27954
|
-
var gotCR = string[index - 1] === '\r';
|
|
27955
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
|
27956
|
-
endIndex = index + 1;
|
|
27957
|
-
index = string.indexOf('\n', endIndex);
|
|
27958
|
-
}while (index !== -1);
|
|
27959
|
-
returnValue += string.slice(endIndex);
|
|
27960
|
-
return returnValue;
|
|
28332
|
+
var hasRequiredAmerica;
|
|
28333
|
+
function requireAmerica() {
|
|
28334
|
+
if (hasRequiredAmerica) return america.exports;
|
|
28335
|
+
hasRequiredAmerica = 1;
|
|
28336
|
+
(function(module) {
|
|
28337
|
+
module['exports'] = function(colors) {
|
|
28338
|
+
return function(letter, i, exploded) {
|
|
28339
|
+
if (letter === ' ') return letter;
|
|
28340
|
+
switch(i % 3){
|
|
28341
|
+
case 0:
|
|
28342
|
+
return colors.red(letter);
|
|
28343
|
+
case 1:
|
|
28344
|
+
return colors.white(letter);
|
|
28345
|
+
case 2:
|
|
28346
|
+
return colors.blue(letter);
|
|
28347
|
+
}
|
|
28348
|
+
};
|
|
28349
|
+
};
|
|
28350
|
+
})(america);
|
|
28351
|
+
return america.exports;
|
|
27961
28352
|
}
|
|
27962
|
-
var
|
|
27963
|
-
|
|
27964
|
-
var STYLER = Symbol('STYLER');
|
|
27965
|
-
var IS_EMPTY = Symbol('IS_EMPTY');
|
|
27966
|
-
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
27967
|
-
var levelMapping = [
|
|
27968
|
-
'ansi',
|
|
27969
|
-
'ansi',
|
|
27970
|
-
'ansi256',
|
|
27971
|
-
'ansi16m'
|
|
27972
|
-
];
|
|
27973
|
-
var styles = Object.create(null);
|
|
27974
|
-
var applyOptions = function(object) {
|
|
27975
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
27976
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
27977
|
-
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
27978
|
-
}
|
|
27979
|
-
// Detect level if not set manually
|
|
27980
|
-
var colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
27981
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
27982
|
-
};
|
|
27983
|
-
var chalkFactory = function(options) {
|
|
27984
|
-
var chalk = function() {
|
|
27985
|
-
for(var _len = arguments.length, strings = new Array(_len), _key = 0; _key < _len; _key++){
|
|
27986
|
-
strings[_key] = arguments[_key];
|
|
27987
|
-
}
|
|
27988
|
-
return strings.join(' ');
|
|
27989
|
-
};
|
|
27990
|
-
applyOptions(chalk, options);
|
|
27991
|
-
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
27992
|
-
return chalk;
|
|
28353
|
+
var zebra = {
|
|
28354
|
+
exports: {}
|
|
27993
28355
|
};
|
|
27994
|
-
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
get: function get() {
|
|
28004
|
-
var builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
28005
|
-
Object.defineProperty(this, styleName, {
|
|
28006
|
-
value: builder
|
|
28007
|
-
});
|
|
28008
|
-
return builder;
|
|
28009
|
-
}
|
|
28356
|
+
var hasRequiredZebra;
|
|
28357
|
+
function requireZebra() {
|
|
28358
|
+
if (hasRequiredZebra) return zebra.exports;
|
|
28359
|
+
hasRequiredZebra = 1;
|
|
28360
|
+
(function(module) {
|
|
28361
|
+
module['exports'] = function(colors) {
|
|
28362
|
+
return function(letter, i, exploded) {
|
|
28363
|
+
return i % 2 === 0 ? letter : colors.inverse(letter);
|
|
28364
|
+
};
|
|
28010
28365
|
};
|
|
28011
|
-
};
|
|
28012
|
-
|
|
28013
|
-
} catch (err) {
|
|
28014
|
-
_didIteratorError = true;
|
|
28015
|
-
_iteratorError = err;
|
|
28016
|
-
} finally{
|
|
28017
|
-
try {
|
|
28018
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
28019
|
-
_iterator.return();
|
|
28020
|
-
}
|
|
28021
|
-
} finally{
|
|
28022
|
-
if (_didIteratorError) {
|
|
28023
|
-
throw _iteratorError;
|
|
28024
|
-
}
|
|
28025
|
-
}
|
|
28366
|
+
})(zebra);
|
|
28367
|
+
return zebra.exports;
|
|
28026
28368
|
}
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
var builder = createBuilder(this, this[STYLER], true);
|
|
28030
|
-
Object.defineProperty(this, 'visible', {
|
|
28031
|
-
value: builder
|
|
28032
|
-
});
|
|
28033
|
-
return builder;
|
|
28034
|
-
}
|
|
28369
|
+
var rainbow = {
|
|
28370
|
+
exports: {}
|
|
28035
28371
|
};
|
|
28036
|
-
var
|
|
28037
|
-
|
|
28038
|
-
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
|
|
28042
|
-
|
|
28043
|
-
|
|
28044
|
-
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
|
|
28372
|
+
var hasRequiredRainbow;
|
|
28373
|
+
function requireRainbow() {
|
|
28374
|
+
if (hasRequiredRainbow) return rainbow.exports;
|
|
28375
|
+
hasRequiredRainbow = 1;
|
|
28376
|
+
(function(module) {
|
|
28377
|
+
module['exports'] = function(colors) {
|
|
28378
|
+
// RoY G BiV
|
|
28379
|
+
var rainbowColors = [
|
|
28380
|
+
'red',
|
|
28381
|
+
'yellow',
|
|
28382
|
+
'green',
|
|
28383
|
+
'blue',
|
|
28384
|
+
'magenta'
|
|
28385
|
+
];
|
|
28386
|
+
return function(letter, i, exploded) {
|
|
28387
|
+
if (letter === ' ') {
|
|
28388
|
+
return letter;
|
|
28389
|
+
} else {
|
|
28390
|
+
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
28391
|
+
}
|
|
28392
|
+
};
|
|
28393
|
+
};
|
|
28394
|
+
})(rainbow);
|
|
28395
|
+
return rainbow.exports;
|
|
28396
|
+
}
|
|
28397
|
+
var random = {
|
|
28398
|
+
exports: {}
|
|
28062
28399
|
};
|
|
28063
|
-
var
|
|
28064
|
-
|
|
28065
|
-
|
|
28066
|
-
|
|
28067
|
-
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
|
|
28074
|
-
|
|
28075
|
-
|
|
28076
|
-
|
|
28077
|
-
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28081
|
-
|
|
28082
|
-
|
|
28083
|
-
|
|
28084
|
-
|
|
28085
|
-
|
|
28400
|
+
var hasRequiredRandom;
|
|
28401
|
+
function requireRandom() {
|
|
28402
|
+
if (hasRequiredRandom) return random.exports;
|
|
28403
|
+
hasRequiredRandom = 1;
|
|
28404
|
+
(function(module) {
|
|
28405
|
+
module['exports'] = function(colors) {
|
|
28406
|
+
var available = [
|
|
28407
|
+
'underline',
|
|
28408
|
+
'inverse',
|
|
28409
|
+
'grey',
|
|
28410
|
+
'yellow',
|
|
28411
|
+
'red',
|
|
28412
|
+
'green',
|
|
28413
|
+
'blue',
|
|
28414
|
+
'white',
|
|
28415
|
+
'cyan',
|
|
28416
|
+
'magenta',
|
|
28417
|
+
'brightYellow',
|
|
28418
|
+
'brightRed',
|
|
28419
|
+
'brightGreen',
|
|
28420
|
+
'brightBlue',
|
|
28421
|
+
'brightWhite',
|
|
28422
|
+
'brightCyan',
|
|
28423
|
+
'brightMagenta'
|
|
28424
|
+
];
|
|
28425
|
+
return function(letter, i, exploded) {
|
|
28426
|
+
return letter === ' ' ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
28427
|
+
};
|
|
28428
|
+
};
|
|
28429
|
+
})(random);
|
|
28430
|
+
return random.exports;
|
|
28431
|
+
}
|
|
28432
|
+
/*
|
|
28433
|
+
|
|
28434
|
+
The MIT License (MIT)
|
|
28435
|
+
|
|
28436
|
+
Original Library
|
|
28437
|
+
- Copyright (c) Marak Squires
|
|
28438
|
+
|
|
28439
|
+
Additional functionality
|
|
28440
|
+
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
28441
|
+
|
|
28442
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28443
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
28444
|
+
in the Software without restriction, including without limitation the rights
|
|
28445
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
28446
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28447
|
+
furnished to do so, subject to the following conditions:
|
|
28448
|
+
|
|
28449
|
+
The above copyright notice and this permission notice shall be included in
|
|
28450
|
+
all copies or substantial portions of the Software.
|
|
28451
|
+
|
|
28452
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28453
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28454
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28455
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28456
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28457
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28458
|
+
THE SOFTWARE.
|
|
28459
|
+
|
|
28460
|
+
*/ var hasRequiredColors;
|
|
28461
|
+
function requireColors() {
|
|
28462
|
+
if (hasRequiredColors) return colors.exports;
|
|
28463
|
+
hasRequiredColors = 1;
|
|
28464
|
+
(function(module) {
|
|
28465
|
+
var colors = {};
|
|
28466
|
+
module['exports'] = colors;
|
|
28467
|
+
colors.themes = {};
|
|
28468
|
+
var util = _util.default;
|
|
28469
|
+
var ansiStyles = colors.styles = requireStyles();
|
|
28470
|
+
var defineProps = Object.defineProperties;
|
|
28471
|
+
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
28472
|
+
colors.supportsColor = requireSupportsColors().supportsColor;
|
|
28473
|
+
if (typeof colors.enabled === 'undefined') {
|
|
28474
|
+
colors.enabled = colors.supportsColor() !== false;
|
|
28475
|
+
}
|
|
28476
|
+
colors.enable = function() {
|
|
28477
|
+
colors.enabled = true;
|
|
28478
|
+
};
|
|
28479
|
+
colors.disable = function() {
|
|
28480
|
+
colors.enabled = false;
|
|
28481
|
+
};
|
|
28482
|
+
colors.stripColors = colors.strip = function(str) {
|
|
28483
|
+
return ('' + str).replace(/\x1B\[\d+m/g, '');
|
|
28484
|
+
};
|
|
28485
|
+
// eslint-disable-next-line no-unused-vars
|
|
28486
|
+
colors.stylize = function stylize(str, style) {
|
|
28487
|
+
if (!colors.enabled) {
|
|
28488
|
+
return str + '';
|
|
28489
|
+
}
|
|
28490
|
+
var styleMap = ansiStyles[style];
|
|
28491
|
+
// Stylize should work for non-ANSI styles, too
|
|
28492
|
+
if (!styleMap && style in colors) {
|
|
28493
|
+
// Style maps like trap operate as functions on strings;
|
|
28494
|
+
// they don't have properties like open or close.
|
|
28495
|
+
return colors[style](str);
|
|
28496
|
+
}
|
|
28497
|
+
return styleMap.open + str + styleMap.close;
|
|
28498
|
+
};
|
|
28499
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
28500
|
+
var escapeStringRegexp = function escapeStringRegexp(str) {
|
|
28501
|
+
if (typeof str !== 'string') {
|
|
28502
|
+
throw new TypeError('Expected a string');
|
|
28086
28503
|
}
|
|
28504
|
+
return str.replace(matchOperatorsRe, '\\$&');
|
|
28087
28505
|
};
|
|
28088
|
-
|
|
28089
|
-
|
|
28090
|
-
|
|
28091
|
-
|
|
28092
|
-
|
|
28093
|
-
|
|
28094
|
-
|
|
28095
|
-
|
|
28096
|
-
|
|
28097
|
-
|
|
28098
|
-
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
|
|
28506
|
+
function build(_styles) {
|
|
28507
|
+
var builder = function builder() {
|
|
28508
|
+
return applyStyle.apply(builder, arguments);
|
|
28509
|
+
};
|
|
28510
|
+
builder._styles = _styles;
|
|
28511
|
+
// __proto__ is used because we must return a function, but there is
|
|
28512
|
+
// no way to create a function with a different prototype.
|
|
28513
|
+
builder.__proto__ = proto;
|
|
28514
|
+
return builder;
|
|
28515
|
+
}
|
|
28516
|
+
var styles = function() {
|
|
28517
|
+
var ret = {};
|
|
28518
|
+
ansiStyles.grey = ansiStyles.gray;
|
|
28519
|
+
Object.keys(ansiStyles).forEach(function(key) {
|
|
28520
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
|
|
28521
|
+
ret[key] = {
|
|
28522
|
+
get: function get() {
|
|
28523
|
+
return build(this._styles.concat(key));
|
|
28524
|
+
}
|
|
28102
28525
|
};
|
|
28526
|
+
});
|
|
28527
|
+
return ret;
|
|
28528
|
+
}();
|
|
28529
|
+
var proto = defineProps(function colors() {}, styles);
|
|
28530
|
+
function applyStyle() {
|
|
28531
|
+
var args = Array.prototype.slice.call(arguments);
|
|
28532
|
+
var str = args.map(function(arg) {
|
|
28533
|
+
// Use weak equality check so we can colorize null/undefined in safe mode
|
|
28534
|
+
if (arg != null && arg.constructor === String) {
|
|
28535
|
+
return arg;
|
|
28536
|
+
} else {
|
|
28537
|
+
return util.inspect(arg);
|
|
28538
|
+
}
|
|
28539
|
+
}).join(' ');
|
|
28540
|
+
if (!colors.enabled || !str) {
|
|
28541
|
+
return str;
|
|
28542
|
+
}
|
|
28543
|
+
var newLinesPresent = str.indexOf('\n') != -1;
|
|
28544
|
+
var nestedStyles = this._styles;
|
|
28545
|
+
var i = nestedStyles.length;
|
|
28546
|
+
while(i--){
|
|
28547
|
+
var code = ansiStyles[nestedStyles[i]];
|
|
28548
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
28549
|
+
if (newLinesPresent) {
|
|
28550
|
+
str = str.replace(newLineRegex, function(match) {
|
|
28551
|
+
return code.close + match + code.open;
|
|
28552
|
+
});
|
|
28553
|
+
}
|
|
28554
|
+
}
|
|
28555
|
+
return str;
|
|
28556
|
+
}
|
|
28557
|
+
colors.setTheme = function(theme) {
|
|
28558
|
+
if (typeof theme === 'string') {
|
|
28559
|
+
console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like ' + 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));');
|
|
28560
|
+
return;
|
|
28561
|
+
}
|
|
28562
|
+
for(var style in theme){
|
|
28563
|
+
(function(style) {
|
|
28564
|
+
colors[style] = function(str) {
|
|
28565
|
+
if (_type_of(theme[style]) === 'object') {
|
|
28566
|
+
var out = str;
|
|
28567
|
+
for(var i in theme[style]){
|
|
28568
|
+
out = colors[theme[style][i]](out);
|
|
28569
|
+
}
|
|
28570
|
+
return out;
|
|
28571
|
+
}
|
|
28572
|
+
return colors[theme[style]](str);
|
|
28573
|
+
};
|
|
28574
|
+
})(style);
|
|
28103
28575
|
}
|
|
28104
28576
|
};
|
|
28105
|
-
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28110
|
-
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
|
|
28577
|
+
function init() {
|
|
28578
|
+
var ret = {};
|
|
28579
|
+
Object.keys(styles).forEach(function(name) {
|
|
28580
|
+
ret[name] = {
|
|
28581
|
+
get: function get() {
|
|
28582
|
+
return build([
|
|
28583
|
+
name
|
|
28584
|
+
]);
|
|
28585
|
+
}
|
|
28586
|
+
};
|
|
28587
|
+
});
|
|
28588
|
+
return ret;
|
|
28114
28589
|
}
|
|
28115
|
-
|
|
28116
|
-
|
|
28117
|
-
|
|
28590
|
+
var sequencer = function sequencer(map, str) {
|
|
28591
|
+
var exploded = str.split('');
|
|
28592
|
+
exploded = exploded.map(map);
|
|
28593
|
+
return exploded.join('');
|
|
28594
|
+
};
|
|
28595
|
+
// custom formatter methods
|
|
28596
|
+
colors.trap = requireTrap();
|
|
28597
|
+
colors.zalgo = requireZalgo();
|
|
28598
|
+
// maps
|
|
28599
|
+
colors.maps = {};
|
|
28600
|
+
colors.maps.america = requireAmerica()(colors);
|
|
28601
|
+
colors.maps.zebra = requireZebra()(colors);
|
|
28602
|
+
colors.maps.rainbow = requireRainbow()(colors);
|
|
28603
|
+
colors.maps.random = requireRandom()(colors);
|
|
28604
|
+
for(var map in colors.maps){
|
|
28605
|
+
(function(map) {
|
|
28606
|
+
colors[map] = function(str) {
|
|
28607
|
+
return sequencer(colors.maps[map], str);
|
|
28608
|
+
};
|
|
28609
|
+
})(map);
|
|
28118
28610
|
}
|
|
28119
|
-
|
|
28611
|
+
defineProps(colors, init());
|
|
28612
|
+
})(colors);
|
|
28613
|
+
return colors.exports;
|
|
28120
28614
|
}
|
|
28121
|
-
var
|
|
28122
|
-
|
|
28123
|
-
enumerable: true,
|
|
28124
|
-
get: function get() {
|
|
28125
|
-
return this[GENERATOR].level;
|
|
28126
|
-
},
|
|
28127
|
-
set: function set(level) {
|
|
28128
|
-
this[GENERATOR].level = level;
|
|
28129
|
-
}
|
|
28130
|
-
}
|
|
28131
|
-
}));
|
|
28132
|
-
var createStyler = function(open, close, parent) {
|
|
28133
|
-
var openAll;
|
|
28134
|
-
var closeAll;
|
|
28135
|
-
if (parent === undefined) {
|
|
28136
|
-
openAll = open;
|
|
28137
|
-
closeAll = close;
|
|
28138
|
-
} else {
|
|
28139
|
-
openAll = parent.openAll + open;
|
|
28140
|
-
closeAll = close + parent.closeAll;
|
|
28141
|
-
}
|
|
28142
|
-
return {
|
|
28143
|
-
open: open,
|
|
28144
|
-
close: close,
|
|
28145
|
-
openAll: openAll,
|
|
28146
|
-
closeAll: closeAll,
|
|
28147
|
-
parent: parent
|
|
28148
|
-
};
|
|
28149
|
-
};
|
|
28150
|
-
var createBuilder = function(self1, _styler, _isEmpty) {
|
|
28151
|
-
// Single argument is hot path, implicit coercion is faster than anything
|
|
28152
|
-
// eslint-disable-next-line no-implicit-coercion
|
|
28153
|
-
var builder = function() {
|
|
28154
|
-
for(var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++){
|
|
28155
|
-
arguments_[_key] = arguments[_key];
|
|
28156
|
-
}
|
|
28157
|
-
return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
|
|
28158
|
-
};
|
|
28159
|
-
// We alter the prototype because we must return a function, but there is
|
|
28160
|
-
// no way to create a function with a different prototype
|
|
28161
|
-
Object.setPrototypeOf(builder, proto);
|
|
28162
|
-
builder[GENERATOR] = self1;
|
|
28163
|
-
builder[STYLER] = _styler;
|
|
28164
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
28165
|
-
return builder;
|
|
28166
|
-
};
|
|
28167
|
-
var applyStyle = function(self1, string) {
|
|
28168
|
-
if (self1.level <= 0 || !string) {
|
|
28169
|
-
return self1[IS_EMPTY] ? '' : string;
|
|
28170
|
-
}
|
|
28171
|
-
var styler = self1[STYLER];
|
|
28172
|
-
if (styler === undefined) {
|
|
28173
|
-
return string;
|
|
28174
|
-
}
|
|
28175
|
-
var openAll = styler.openAll, closeAll = styler.closeAll;
|
|
28176
|
-
if (string.includes('\u001B')) {
|
|
28177
|
-
while(styler !== undefined){
|
|
28178
|
-
// Replace any instances already present with a re-opening code
|
|
28179
|
-
// otherwise only the part of the string until said closing code
|
|
28180
|
-
// will be colored, and the rest will simply be 'plain'.
|
|
28181
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
28182
|
-
styler = styler.parent;
|
|
28183
|
-
}
|
|
28184
|
-
}
|
|
28185
|
-
// We can move both next actions out of loop, because remaining actions in loop won't have
|
|
28186
|
-
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
|
28187
|
-
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
|
28188
|
-
var lfIndex = string.indexOf('\n');
|
|
28189
|
-
if (lfIndex !== -1) {
|
|
28190
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
28191
|
-
}
|
|
28192
|
-
return openAll + string + closeAll;
|
|
28615
|
+
var extendStringPrototype = {
|
|
28616
|
+
exports: {}
|
|
28193
28617
|
};
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
|
|
28198
|
-
|
|
28618
|
+
var hasRequiredExtendStringPrototype;
|
|
28619
|
+
function requireExtendStringPrototype() {
|
|
28620
|
+
if (hasRequiredExtendStringPrototype) return extendStringPrototype.exports;
|
|
28621
|
+
hasRequiredExtendStringPrototype = 1;
|
|
28622
|
+
(function(module) {
|
|
28623
|
+
var colors = requireColors();
|
|
28624
|
+
module['exports'] = function() {
|
|
28625
|
+
//
|
|
28626
|
+
// Extends prototype of native string object to allow for "foo".red syntax
|
|
28627
|
+
//
|
|
28628
|
+
var addProperty = function addProperty(color, func) {
|
|
28629
|
+
String.prototype.__defineGetter__(color, func);
|
|
28630
|
+
};
|
|
28631
|
+
addProperty('strip', function() {
|
|
28632
|
+
return colors.strip(this);
|
|
28633
|
+
});
|
|
28634
|
+
addProperty('stripColors', function() {
|
|
28635
|
+
return colors.strip(this);
|
|
28636
|
+
});
|
|
28637
|
+
addProperty('trap', function() {
|
|
28638
|
+
return colors.trap(this);
|
|
28639
|
+
});
|
|
28640
|
+
addProperty('zalgo', function() {
|
|
28641
|
+
return colors.zalgo(this);
|
|
28642
|
+
});
|
|
28643
|
+
addProperty('zebra', function() {
|
|
28644
|
+
return colors.zebra(this);
|
|
28645
|
+
});
|
|
28646
|
+
addProperty('rainbow', function() {
|
|
28647
|
+
return colors.rainbow(this);
|
|
28648
|
+
});
|
|
28649
|
+
addProperty('random', function() {
|
|
28650
|
+
return colors.random(this);
|
|
28651
|
+
});
|
|
28652
|
+
addProperty('america', function() {
|
|
28653
|
+
return colors.america(this);
|
|
28654
|
+
});
|
|
28655
|
+
//
|
|
28656
|
+
// Iterate through all default styles and colors
|
|
28657
|
+
//
|
|
28658
|
+
var x = Object.keys(colors.styles);
|
|
28659
|
+
x.forEach(function(style) {
|
|
28660
|
+
addProperty(style, function() {
|
|
28661
|
+
return colors.stylize(this, style);
|
|
28662
|
+
});
|
|
28663
|
+
});
|
|
28664
|
+
function applyTheme(theme) {
|
|
28665
|
+
//
|
|
28666
|
+
// Remark: This is a list of methods that exist
|
|
28667
|
+
// on String that you should not overwrite.
|
|
28668
|
+
//
|
|
28669
|
+
var stringPrototypeBlacklist = [
|
|
28670
|
+
'__defineGetter__',
|
|
28671
|
+
'__defineSetter__',
|
|
28672
|
+
'__lookupGetter__',
|
|
28673
|
+
'__lookupSetter__',
|
|
28674
|
+
'charAt',
|
|
28675
|
+
'constructor',
|
|
28676
|
+
'hasOwnProperty',
|
|
28677
|
+
'isPrototypeOf',
|
|
28678
|
+
'propertyIsEnumerable',
|
|
28679
|
+
'toLocaleString',
|
|
28680
|
+
'toString',
|
|
28681
|
+
'valueOf',
|
|
28682
|
+
'charCodeAt',
|
|
28683
|
+
'indexOf',
|
|
28684
|
+
'lastIndexOf',
|
|
28685
|
+
'length',
|
|
28686
|
+
'localeCompare',
|
|
28687
|
+
'match',
|
|
28688
|
+
'repeat',
|
|
28689
|
+
'replace',
|
|
28690
|
+
'search',
|
|
28691
|
+
'slice',
|
|
28692
|
+
'split',
|
|
28693
|
+
'substring',
|
|
28694
|
+
'toLocaleLowerCase',
|
|
28695
|
+
'toLocaleUpperCase',
|
|
28696
|
+
'toLowerCase',
|
|
28697
|
+
'toUpperCase',
|
|
28698
|
+
'trim',
|
|
28699
|
+
'trimLeft',
|
|
28700
|
+
'trimRight'
|
|
28701
|
+
];
|
|
28702
|
+
Object.keys(theme).forEach(function(prop) {
|
|
28703
|
+
if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
|
|
28704
|
+
console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. ' + 'Ignoring style name');
|
|
28705
|
+
} else {
|
|
28706
|
+
if (typeof theme[prop] === 'string') {
|
|
28707
|
+
colors[prop] = colors[theme[prop]];
|
|
28708
|
+
addProperty(prop, function() {
|
|
28709
|
+
return colors[prop](this);
|
|
28710
|
+
});
|
|
28711
|
+
} else {
|
|
28712
|
+
var themePropApplicator = function themePropApplicator(str) {
|
|
28713
|
+
var ret = str || this;
|
|
28714
|
+
for(var t = 0; t < theme[prop].length; t++){
|
|
28715
|
+
ret = colors[theme[prop][t]](ret);
|
|
28716
|
+
}
|
|
28717
|
+
return ret;
|
|
28718
|
+
};
|
|
28719
|
+
addProperty(prop, themePropApplicator);
|
|
28720
|
+
colors[prop] = function(str) {
|
|
28721
|
+
return themePropApplicator(str);
|
|
28722
|
+
};
|
|
28723
|
+
}
|
|
28724
|
+
}
|
|
28725
|
+
});
|
|
28726
|
+
}
|
|
28727
|
+
colors.setTheme = function(theme) {
|
|
28728
|
+
if (typeof theme === 'string') {
|
|
28729
|
+
console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like ' + 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));');
|
|
28730
|
+
return;
|
|
28731
|
+
} else {
|
|
28732
|
+
applyTheme(theme);
|
|
28733
|
+
}
|
|
28734
|
+
};
|
|
28735
|
+
};
|
|
28736
|
+
})(extendStringPrototype);
|
|
28737
|
+
return extendStringPrototype.exports;
|
|
28738
|
+
}
|
|
28739
|
+
var hasRequiredLib;
|
|
28740
|
+
function requireLib() {
|
|
28741
|
+
if (hasRequiredLib) return lib.exports;
|
|
28742
|
+
hasRequiredLib = 1;
|
|
28743
|
+
(function(module) {
|
|
28744
|
+
var colors = requireColors();
|
|
28745
|
+
module['exports'] = colors;
|
|
28746
|
+
// Remark: By default, colors will add style properties to String.prototype.
|
|
28747
|
+
//
|
|
28748
|
+
// If you don't wish to extend String.prototype, you can do this instead and
|
|
28749
|
+
// native String will not be touched:
|
|
28750
|
+
//
|
|
28751
|
+
// var colors = require('colors/safe);
|
|
28752
|
+
// colors.red("foo")
|
|
28753
|
+
//
|
|
28754
|
+
//
|
|
28755
|
+
requireExtendStringPrototype()();
|
|
28756
|
+
})(lib);
|
|
28757
|
+
return lib.exports;
|
|
28758
|
+
}
|
|
28759
|
+
var libExports = requireLib();
|
|
28760
|
+
var chalk = /*@__PURE__*/ getDefaultExportFromCjs(libExports);
|
|
28199
28761
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
28200
28762
|
var ansiRegex = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
28201
28763
|
var isNamedColor = function(color) {
|
|
@@ -28428,24 +28990,24 @@ var CODE_POINT_0 = '0'.codePointAt(0);
|
|
|
28428
28990
|
var CODE_POINT_9 = '9'.codePointAt(0);
|
|
28429
28991
|
var endCodesSet$1 = new Set();
|
|
28430
28992
|
var endCodesMap$1 = new Map();
|
|
28431
|
-
var
|
|
28993
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
28432
28994
|
try {
|
|
28433
|
-
for(var
|
|
28434
|
-
var _step_value = _sliced_to_array(
|
|
28435
|
-
endCodesSet$1.add(ansiStyles
|
|
28436
|
-
endCodesMap$1.set(ansiStyles
|
|
28995
|
+
for(var _iterator = ansiStyles.codes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
28996
|
+
var _step_value = _sliced_to_array(_step.value, 2), start = _step_value[0], end = _step_value[1];
|
|
28997
|
+
endCodesSet$1.add(ansiStyles.color.ansi(end));
|
|
28998
|
+
endCodesMap$1.set(ansiStyles.color.ansi(start), ansiStyles.color.ansi(end));
|
|
28437
28999
|
}
|
|
28438
29000
|
} catch (err) {
|
|
28439
|
-
|
|
28440
|
-
|
|
29001
|
+
_didIteratorError = true;
|
|
29002
|
+
_iteratorError = err;
|
|
28441
29003
|
} finally{
|
|
28442
29004
|
try {
|
|
28443
|
-
if (!
|
|
28444
|
-
|
|
29005
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
29006
|
+
_iterator.return();
|
|
28445
29007
|
}
|
|
28446
29008
|
} finally{
|
|
28447
|
-
if (
|
|
28448
|
-
throw
|
|
29009
|
+
if (_didIteratorError) {
|
|
29010
|
+
throw _iteratorError;
|
|
28449
29011
|
}
|
|
28450
29012
|
}
|
|
28451
29013
|
}
|
|
@@ -28460,11 +29022,11 @@ function getEndCode$1(code) {
|
|
|
28460
29022
|
if (code.includes(';')) {
|
|
28461
29023
|
code = code[0] + '0';
|
|
28462
29024
|
}
|
|
28463
|
-
var returnValue = ansiStyles
|
|
29025
|
+
var returnValue = ansiStyles.codes.get(Number.parseInt(code, 10));
|
|
28464
29026
|
if (returnValue) {
|
|
28465
|
-
return ansiStyles
|
|
29027
|
+
return ansiStyles.color.ansi(returnValue);
|
|
28466
29028
|
}
|
|
28467
|
-
return ansiStyles
|
|
29029
|
+
return ansiStyles.reset.open;
|
|
28468
29030
|
}
|
|
28469
29031
|
function findNumberIndex$1(string) {
|
|
28470
29032
|
for(var index = 0; index < string.length; index++){
|
|
@@ -28526,7 +29088,7 @@ function reduceAnsiCodes$1(codes) {
|
|
|
28526
29088
|
try {
|
|
28527
29089
|
var _loop = function() {
|
|
28528
29090
|
var code = _step.value;
|
|
28529
|
-
if (code.code === ansiStyles
|
|
29091
|
+
if (code.code === ansiStyles.reset.open) {
|
|
28530
29092
|
// Reset code, disable all codes
|
|
28531
29093
|
returnValue = [];
|
|
28532
29094
|
} else if (endCodesSet$1.has(code.code)) {
|
|
@@ -28626,24 +29188,24 @@ var ESCAPES = new Set([
|
|
|
28626
29188
|
]); // \x1b and \x9b
|
|
28627
29189
|
var endCodesSet = new Set();
|
|
28628
29190
|
var endCodesMap = new Map();
|
|
28629
|
-
var
|
|
29191
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
28630
29192
|
try {
|
|
28631
|
-
for(var
|
|
28632
|
-
var _step_value1 = _sliced_to_array(
|
|
28633
|
-
endCodesSet.add(ansiStyles
|
|
28634
|
-
endCodesMap.set(ansiStyles
|
|
29193
|
+
for(var _iterator1 = ansiStyles.codes[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
29194
|
+
var _step_value1 = _sliced_to_array(_step1.value, 2), start1 = _step_value1[0], end1 = _step_value1[1];
|
|
29195
|
+
endCodesSet.add(ansiStyles.color.ansi(end1));
|
|
29196
|
+
endCodesMap.set(ansiStyles.color.ansi(start1), ansiStyles.color.ansi(end1));
|
|
28635
29197
|
}
|
|
28636
29198
|
} catch (err) {
|
|
28637
|
-
|
|
28638
|
-
|
|
29199
|
+
_didIteratorError1 = true;
|
|
29200
|
+
_iteratorError1 = err;
|
|
28639
29201
|
} finally{
|
|
28640
29202
|
try {
|
|
28641
|
-
if (!
|
|
28642
|
-
|
|
29203
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
29204
|
+
_iterator1.return();
|
|
28643
29205
|
}
|
|
28644
29206
|
} finally{
|
|
28645
|
-
if (
|
|
28646
|
-
throw
|
|
29207
|
+
if (_didIteratorError1) {
|
|
29208
|
+
throw _iteratorError1;
|
|
28647
29209
|
}
|
|
28648
29210
|
}
|
|
28649
29211
|
}
|
|
@@ -28661,11 +29223,11 @@ function getEndCode(code) {
|
|
|
28661
29223
|
if (code.includes(";")) {
|
|
28662
29224
|
code = code[0] + "0";
|
|
28663
29225
|
}
|
|
28664
|
-
var ret = ansiStyles
|
|
29226
|
+
var ret = ansiStyles.codes.get(parseInt(code, 10));
|
|
28665
29227
|
if (ret) {
|
|
28666
|
-
return ansiStyles
|
|
29228
|
+
return ansiStyles.color.ansi(ret);
|
|
28667
29229
|
} else {
|
|
28668
|
-
return ansiStyles
|
|
29230
|
+
return ansiStyles.reset.open;
|
|
28669
29231
|
}
|
|
28670
29232
|
}
|
|
28671
29233
|
function ansiCodesToString(codes) {
|
|
@@ -28682,7 +29244,7 @@ function ansiCodesToString(codes) {
|
|
|
28682
29244
|
try {
|
|
28683
29245
|
var _loop = function() {
|
|
28684
29246
|
var code = _step.value;
|
|
28685
|
-
if (code.code === ansiStyles
|
|
29247
|
+
if (code.code === ansiStyles.reset.open) {
|
|
28686
29248
|
// Reset code, disable all codes
|
|
28687
29249
|
ret = [];
|
|
28688
29250
|
} else if (endCodesSet.has(code.code)) {
|