@jsii/runtime 1.67.0 → 1.69.0
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/lib/host.js +10 -9
- package/package.json +7 -7
- package/test/__snapshots__/kernel-host.test.js.snap +19 -19
- package/webpack/bin/jsii-runtime.js +2653 -986
- package/webpack/lib/program.js +11277 -5859
|
@@ -2,115 +2,154 @@ var __webpack_modules__ = {
|
|
|
2
2
|
5756: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
3
3
|
"use strict";
|
|
4
4
|
module = __webpack_require__.nmd(module);
|
|
5
|
-
const wrapAnsi16 = (fn, offset) => (...args) =>
|
|
5
|
+
const wrapAnsi16 = (fn, offset) => (...args) => {
|
|
6
|
+
const code = fn(...args);
|
|
7
|
+
return `[${code + offset}m`;
|
|
8
|
+
};
|
|
9
|
+
const wrapAnsi256 = (fn, offset) => (...args) => {
|
|
6
10
|
const code = fn(...args);
|
|
7
11
|
return `[${38 + offset};5;${code}m`;
|
|
8
|
-
}
|
|
12
|
+
};
|
|
13
|
+
const wrapAnsi16m = (fn, offset) => (...args) => {
|
|
9
14
|
const rgb = fn(...args);
|
|
10
15
|
return `[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
11
|
-
}
|
|
16
|
+
};
|
|
17
|
+
const ansi2ansi = n => n;
|
|
18
|
+
const rgb2rgb = (r, g, b) => [ r, g, b ];
|
|
19
|
+
const setLazyProperty = (object, property, get) => {
|
|
12
20
|
Object.defineProperty(object, property, {
|
|
13
21
|
get: () => {
|
|
14
22
|
const value = get();
|
|
15
|
-
|
|
23
|
+
Object.defineProperty(object, property, {
|
|
16
24
|
value,
|
|
17
|
-
enumerable:
|
|
18
|
-
configurable:
|
|
19
|
-
})
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
return value;
|
|
20
29
|
},
|
|
21
|
-
enumerable:
|
|
22
|
-
configurable:
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true
|
|
23
32
|
});
|
|
24
33
|
};
|
|
25
34
|
let colorConvert;
|
|
26
35
|
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
if (colorConvert === undefined) {
|
|
37
|
+
colorConvert = __webpack_require__(9208);
|
|
38
|
+
}
|
|
39
|
+
const offset = isBackground ? 10 : 0;
|
|
40
|
+
const styles = {};
|
|
29
41
|
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
30
|
-
const name = "ansi16"
|
|
31
|
-
sourceSpace === targetSpace
|
|
42
|
+
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
43
|
+
if (sourceSpace === targetSpace) {
|
|
44
|
+
styles[name] = wrap(identity, offset);
|
|
45
|
+
} else if (typeof suite === "object") {
|
|
46
|
+
styles[name] = wrap(suite[targetSpace], offset);
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
49
|
return styles;
|
|
34
50
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
51
|
+
function assembleStyles() {
|
|
52
|
+
const codes = new Map;
|
|
53
|
+
const styles = {
|
|
54
|
+
modifier: {
|
|
55
|
+
reset: [ 0, 0 ],
|
|
56
|
+
bold: [ 1, 22 ],
|
|
57
|
+
dim: [ 2, 22 ],
|
|
58
|
+
italic: [ 3, 23 ],
|
|
59
|
+
underline: [ 4, 24 ],
|
|
60
|
+
inverse: [ 7, 27 ],
|
|
61
|
+
hidden: [ 8, 28 ],
|
|
62
|
+
strikethrough: [ 9, 29 ]
|
|
63
|
+
},
|
|
64
|
+
color: {
|
|
65
|
+
black: [ 30, 39 ],
|
|
66
|
+
red: [ 31, 39 ],
|
|
67
|
+
green: [ 32, 39 ],
|
|
68
|
+
yellow: [ 33, 39 ],
|
|
69
|
+
blue: [ 34, 39 ],
|
|
70
|
+
magenta: [ 35, 39 ],
|
|
71
|
+
cyan: [ 36, 39 ],
|
|
72
|
+
white: [ 37, 39 ],
|
|
73
|
+
blackBright: [ 90, 39 ],
|
|
74
|
+
redBright: [ 91, 39 ],
|
|
75
|
+
greenBright: [ 92, 39 ],
|
|
76
|
+
yellowBright: [ 93, 39 ],
|
|
77
|
+
blueBright: [ 94, 39 ],
|
|
78
|
+
magentaBright: [ 95, 39 ],
|
|
79
|
+
cyanBright: [ 96, 39 ],
|
|
80
|
+
whiteBright: [ 97, 39 ]
|
|
81
|
+
},
|
|
82
|
+
bgColor: {
|
|
83
|
+
bgBlack: [ 40, 49 ],
|
|
84
|
+
bgRed: [ 41, 49 ],
|
|
85
|
+
bgGreen: [ 42, 49 ],
|
|
86
|
+
bgYellow: [ 43, 49 ],
|
|
87
|
+
bgBlue: [ 44, 49 ],
|
|
88
|
+
bgMagenta: [ 45, 49 ],
|
|
89
|
+
bgCyan: [ 46, 49 ],
|
|
90
|
+
bgWhite: [ 47, 49 ],
|
|
91
|
+
bgBlackBright: [ 100, 49 ],
|
|
92
|
+
bgRedBright: [ 101, 49 ],
|
|
93
|
+
bgGreenBright: [ 102, 49 ],
|
|
94
|
+
bgYellowBright: [ 103, 49 ],
|
|
95
|
+
bgBlueBright: [ 104, 49 ],
|
|
96
|
+
bgMagentaBright: [ 105, 49 ],
|
|
97
|
+
bgCyanBright: [ 106, 49 ],
|
|
98
|
+
bgWhiteBright: [ 107, 49 ]
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
styles.color.gray = styles.color.blackBright;
|
|
102
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
103
|
+
styles.color.grey = styles.color.blackBright;
|
|
104
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
105
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
106
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
107
|
+
styles[styleName] = {
|
|
90
108
|
open: `[${style[0]}m`,
|
|
91
109
|
close: `[${style[1]}m`
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
enumerable: !1
|
|
96
|
-
});
|
|
110
|
+
};
|
|
111
|
+
group[styleName] = styles[styleName];
|
|
112
|
+
codes.set(style[0], style[1]);
|
|
97
113
|
}
|
|
98
|
-
|
|
99
|
-
value:
|
|
100
|
-
enumerable:
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
Object.defineProperty(styles, groupName, {
|
|
115
|
+
value: group,
|
|
116
|
+
enumerable: false
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
Object.defineProperty(styles, "codes", {
|
|
120
|
+
value: codes,
|
|
121
|
+
enumerable: false
|
|
122
|
+
});
|
|
123
|
+
styles.color.close = "[39m";
|
|
124
|
+
styles.bgColor.close = "[49m";
|
|
125
|
+
setLazyProperty(styles.color, "ansi", (() => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)));
|
|
126
|
+
setLazyProperty(styles.color, "ansi256", (() => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)));
|
|
127
|
+
setLazyProperty(styles.color, "ansi16m", (() => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)));
|
|
128
|
+
setLazyProperty(styles.bgColor, "ansi", (() => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)));
|
|
129
|
+
setLazyProperty(styles.bgColor, "ansi256", (() => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)));
|
|
130
|
+
setLazyProperty(styles.bgColor, "ansi16m", (() => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)));
|
|
131
|
+
return styles;
|
|
132
|
+
}
|
|
133
|
+
Object.defineProperty(module, "exports", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: assembleStyles
|
|
109
136
|
});
|
|
110
137
|
},
|
|
111
138
|
1201: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
112
139
|
"use strict";
|
|
113
|
-
const ansiStyles = __webpack_require__(5756)
|
|
140
|
+
const ansiStyles = __webpack_require__(5756);
|
|
141
|
+
const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(9797);
|
|
142
|
+
const {stringReplaceAll, stringEncaseCRLFWithFirstIndex} = __webpack_require__(8564);
|
|
143
|
+
const {isArray} = Array;
|
|
144
|
+
const levelMapping = [ "ansi", "ansi", "ansi256", "ansi16m" ];
|
|
145
|
+
const styles = Object.create(null);
|
|
146
|
+
const applyOptions = (object, options = {}) => {
|
|
147
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
148
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
149
|
+
}
|
|
150
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
151
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
152
|
+
};
|
|
114
153
|
class ChalkClass {
|
|
115
154
|
constructor(options) {
|
|
116
155
|
return chalkFactory(options);
|
|
@@ -118,47 +157,54 @@ var __webpack_modules__ = {
|
|
|
118
157
|
}
|
|
119
158
|
const chalkFactory = options => {
|
|
120
159
|
const chalk = {};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
})(chalk, options), chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_),
|
|
126
|
-
Object.setPrototypeOf(chalk, Chalk.prototype), Object.setPrototypeOf(chalk.template, chalk),
|
|
160
|
+
applyOptions(chalk, options);
|
|
161
|
+
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
|
|
162
|
+
Object.setPrototypeOf(chalk, Chalk.prototype);
|
|
163
|
+
Object.setPrototypeOf(chalk.template, chalk);
|
|
127
164
|
chalk.template.constructor = () => {
|
|
128
165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
129
|
-
}
|
|
166
|
+
};
|
|
167
|
+
chalk.template.Instance = ChalkClass;
|
|
168
|
+
return chalk.template;
|
|
130
169
|
};
|
|
131
170
|
function Chalk(options) {
|
|
132
171
|
return chalkFactory(options);
|
|
133
172
|
}
|
|
134
|
-
for (const [styleName, style] of Object.entries(ansiStyles))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
173
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
174
|
+
styles[styleName] = {
|
|
175
|
+
get() {
|
|
176
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
177
|
+
Object.defineProperty(this, styleName, {
|
|
178
|
+
value: builder
|
|
179
|
+
});
|
|
180
|
+
return builder;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
142
184
|
styles.visible = {
|
|
143
185
|
get() {
|
|
144
|
-
const builder = createBuilder(this, this._styler,
|
|
145
|
-
|
|
186
|
+
const builder = createBuilder(this, this._styler, true);
|
|
187
|
+
Object.defineProperty(this, "visible", {
|
|
146
188
|
value: builder
|
|
147
|
-
})
|
|
189
|
+
});
|
|
190
|
+
return builder;
|
|
148
191
|
}
|
|
149
192
|
};
|
|
150
193
|
const usedModels = [ "rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256" ];
|
|
151
|
-
for (const model of usedModels) styles[model] = {
|
|
152
|
-
get() {
|
|
153
|
-
const {level} = this;
|
|
154
|
-
return function(...arguments_) {
|
|
155
|
-
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
156
|
-
return createBuilder(this, styler, this._isEmpty);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
194
|
for (const model of usedModels) {
|
|
161
|
-
styles[
|
|
195
|
+
styles[model] = {
|
|
196
|
+
get() {
|
|
197
|
+
const {level} = this;
|
|
198
|
+
return function(...arguments_) {
|
|
199
|
+
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
200
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
for (const model of usedModels) {
|
|
206
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
207
|
+
styles[bgModel] = {
|
|
162
208
|
get() {
|
|
163
209
|
const {level} = this;
|
|
164
210
|
return function(...arguments_) {
|
|
@@ -171,7 +217,7 @@ var __webpack_modules__ = {
|
|
|
171
217
|
const proto = Object.defineProperties((() => {}), {
|
|
172
218
|
...styles,
|
|
173
219
|
level: {
|
|
174
|
-
enumerable:
|
|
220
|
+
enumerable: true,
|
|
175
221
|
get() {
|
|
176
222
|
return this._generator.level;
|
|
177
223
|
},
|
|
@@ -179,61 +225,115 @@ var __webpack_modules__ = {
|
|
|
179
225
|
this._generator.level = level;
|
|
180
226
|
}
|
|
181
227
|
}
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
228
|
+
});
|
|
229
|
+
const createStyler = (open, close, parent) => {
|
|
230
|
+
let openAll;
|
|
231
|
+
let closeAll;
|
|
232
|
+
if (parent === undefined) {
|
|
233
|
+
openAll = open;
|
|
234
|
+
closeAll = close;
|
|
235
|
+
} else {
|
|
236
|
+
openAll = parent.openAll + open;
|
|
237
|
+
closeAll = close + parent.closeAll;
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
186
240
|
open,
|
|
187
241
|
close,
|
|
188
242
|
openAll,
|
|
189
243
|
closeAll,
|
|
190
244
|
parent
|
|
191
245
|
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
246
|
+
};
|
|
247
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
248
|
+
const builder = (...arguments_) => {
|
|
249
|
+
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
250
|
+
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
251
|
+
}
|
|
252
|
+
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
253
|
+
};
|
|
254
|
+
Object.setPrototypeOf(builder, proto);
|
|
255
|
+
builder._generator = self;
|
|
256
|
+
builder._styler = _styler;
|
|
257
|
+
builder._isEmpty = _isEmpty;
|
|
258
|
+
return builder;
|
|
259
|
+
};
|
|
260
|
+
const applyStyle = (self, string) => {
|
|
261
|
+
if (self.level <= 0 || !string) {
|
|
262
|
+
return self._isEmpty ? "" : string;
|
|
263
|
+
}
|
|
198
264
|
let styler = self._styler;
|
|
199
|
-
if (
|
|
265
|
+
if (styler === undefined) {
|
|
266
|
+
return string;
|
|
267
|
+
}
|
|
200
268
|
const {openAll, closeAll} = styler;
|
|
201
|
-
if (
|
|
202
|
-
|
|
269
|
+
if (string.indexOf("") !== -1) {
|
|
270
|
+
while (styler !== undefined) {
|
|
271
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
272
|
+
styler = styler.parent;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
203
275
|
const lfIndex = string.indexOf("\n");
|
|
204
|
-
|
|
205
|
-
|
|
276
|
+
if (lfIndex !== -1) {
|
|
277
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
278
|
+
}
|
|
279
|
+
return openAll + string + closeAll;
|
|
206
280
|
};
|
|
207
281
|
let template;
|
|
208
282
|
const chalkTag = (chalk, ...strings) => {
|
|
209
283
|
const [firstString] = strings;
|
|
210
|
-
if (!isArray(firstString) || !isArray(firstString.raw))
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
284
|
+
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
285
|
+
return strings.join(" ");
|
|
286
|
+
}
|
|
287
|
+
const arguments_ = strings.slice(1);
|
|
288
|
+
const parts = [ firstString.raw[0] ];
|
|
289
|
+
for (let i = 1; i < firstString.length; i++) {
|
|
290
|
+
parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
|
|
291
|
+
}
|
|
292
|
+
if (template === undefined) {
|
|
293
|
+
template = __webpack_require__(2154);
|
|
294
|
+
}
|
|
295
|
+
return template(chalk, parts.join(""));
|
|
214
296
|
};
|
|
215
297
|
Object.defineProperties(Chalk.prototype, styles);
|
|
216
298
|
const chalk = Chalk();
|
|
217
|
-
chalk.supportsColor = stdoutColor
|
|
299
|
+
chalk.supportsColor = stdoutColor;
|
|
300
|
+
chalk.stderr = Chalk({
|
|
218
301
|
level: stderrColor ? stderrColor.level : 0
|
|
219
|
-
})
|
|
302
|
+
});
|
|
303
|
+
chalk.stderr.supportsColor = stderrColor;
|
|
304
|
+
module.exports = chalk;
|
|
220
305
|
},
|
|
221
306
|
2154: module => {
|
|
222
307
|
"use strict";
|
|
223
|
-
const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi
|
|
308
|
+
const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
309
|
+
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
310
|
+
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
311
|
+
const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
312
|
+
const ESCAPES = new Map([ [ "n", "\n" ], [ "r", "\r" ], [ "t", "\t" ], [ "b", "\b" ], [ "f", "\f" ], [ "v", "\v" ], [ "0", "\0" ], [ "\\", "\\" ], [ "e", "" ], [ "a", "" ] ]);
|
|
224
313
|
function unescape(c) {
|
|
225
|
-
const u =
|
|
226
|
-
|
|
314
|
+
const u = c[0] === "u";
|
|
315
|
+
const bracket = c[1] === "{";
|
|
316
|
+
if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
317
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
318
|
+
}
|
|
319
|
+
if (u && bracket) {
|
|
320
|
+
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
|
321
|
+
}
|
|
322
|
+
return ESCAPES.get(c) || c;
|
|
227
323
|
}
|
|
228
324
|
function parseArguments(name, arguments_) {
|
|
229
|
-
const results = []
|
|
325
|
+
const results = [];
|
|
326
|
+
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
230
327
|
let matches;
|
|
231
328
|
for (const chunk of chunks) {
|
|
232
329
|
const number = Number(chunk);
|
|
233
|
-
if (Number.isNaN(number)) {
|
|
234
|
-
|
|
330
|
+
if (!Number.isNaN(number)) {
|
|
331
|
+
results.push(number);
|
|
332
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
235
333
|
results.push(matches[2].replace(ESCAPE_REGEX, ((m, escape, character) => escape ? unescape(escape) : character)));
|
|
236
|
-
} else
|
|
334
|
+
} else {
|
|
335
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
336
|
+
}
|
|
237
337
|
}
|
|
238
338
|
return results;
|
|
239
339
|
}
|
|
@@ -241,42 +341,65 @@ var __webpack_modules__ = {
|
|
|
241
341
|
STYLE_REGEX.lastIndex = 0;
|
|
242
342
|
const results = [];
|
|
243
343
|
let matches;
|
|
244
|
-
|
|
344
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
245
345
|
const name = matches[1];
|
|
246
346
|
if (matches[2]) {
|
|
247
347
|
const args = parseArguments(name, matches[2]);
|
|
248
348
|
results.push([ name ].concat(args));
|
|
249
|
-
} else
|
|
349
|
+
} else {
|
|
350
|
+
results.push([ name ]);
|
|
351
|
+
}
|
|
250
352
|
}
|
|
251
353
|
return results;
|
|
252
354
|
}
|
|
253
355
|
function buildStyle(chalk, styles) {
|
|
254
356
|
const enabled = {};
|
|
255
|
-
for (const layer of styles)
|
|
357
|
+
for (const layer of styles) {
|
|
358
|
+
for (const style of layer.styles) {
|
|
359
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
256
362
|
let current = chalk;
|
|
257
|
-
for (const [styleName, styles] of Object.entries(enabled))
|
|
258
|
-
if (!(
|
|
363
|
+
for (const [styleName, styles] of Object.entries(enabled)) {
|
|
364
|
+
if (!Array.isArray(styles)) {
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
if (!(styleName in current)) {
|
|
368
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
369
|
+
}
|
|
259
370
|
current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
|
|
260
371
|
}
|
|
261
372
|
return current;
|
|
262
373
|
}
|
|
263
374
|
module.exports = (chalk, temporary) => {
|
|
264
|
-
const styles = []
|
|
375
|
+
const styles = [];
|
|
376
|
+
const chunks = [];
|
|
265
377
|
let chunk = [];
|
|
266
|
-
|
|
267
|
-
if (escapeCharacter)
|
|
378
|
+
temporary.replace(TEMPLATE_REGEX, ((m, escapeCharacter, inverse, style, close, character) => {
|
|
379
|
+
if (escapeCharacter) {
|
|
380
|
+
chunk.push(unescape(escapeCharacter));
|
|
381
|
+
} else if (style) {
|
|
268
382
|
const string = chunk.join("");
|
|
269
|
-
chunk = []
|
|
383
|
+
chunk = [];
|
|
384
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
|
270
385
|
styles.push({
|
|
271
386
|
inverse,
|
|
272
387
|
styles: parseStyle(style)
|
|
273
388
|
});
|
|
274
389
|
} else if (close) {
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
390
|
+
if (styles.length === 0) {
|
|
391
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
392
|
+
}
|
|
393
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
394
|
+
chunk = [];
|
|
395
|
+
styles.pop();
|
|
396
|
+
} else {
|
|
397
|
+
chunk.push(character);
|
|
398
|
+
}
|
|
399
|
+
}));
|
|
400
|
+
chunks.push(chunk.join(""));
|
|
401
|
+
if (styles.length > 0) {
|
|
402
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
280
403
|
throw new Error(errMessage);
|
|
281
404
|
}
|
|
282
405
|
return chunks.join("");
|
|
@@ -284,32 +407,45 @@ var __webpack_modules__ = {
|
|
|
284
407
|
},
|
|
285
408
|
8564: module => {
|
|
286
409
|
"use strict";
|
|
410
|
+
const stringReplaceAll = (string, substring, replacer) => {
|
|
411
|
+
let index = string.indexOf(substring);
|
|
412
|
+
if (index === -1) {
|
|
413
|
+
return string;
|
|
414
|
+
}
|
|
415
|
+
const substringLength = substring.length;
|
|
416
|
+
let endIndex = 0;
|
|
417
|
+
let returnValue = "";
|
|
418
|
+
do {
|
|
419
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
420
|
+
endIndex = index + substringLength;
|
|
421
|
+
index = string.indexOf(substring, endIndex);
|
|
422
|
+
} while (index !== -1);
|
|
423
|
+
returnValue += string.substr(endIndex);
|
|
424
|
+
return returnValue;
|
|
425
|
+
};
|
|
426
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
427
|
+
let endIndex = 0;
|
|
428
|
+
let returnValue = "";
|
|
429
|
+
do {
|
|
430
|
+
const gotCR = string[index - 1] === "\r";
|
|
431
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
432
|
+
endIndex = index + 1;
|
|
433
|
+
index = string.indexOf("\n", endIndex);
|
|
434
|
+
} while (index !== -1);
|
|
435
|
+
returnValue += string.substr(endIndex);
|
|
436
|
+
return returnValue;
|
|
437
|
+
};
|
|
287
438
|
module.exports = {
|
|
288
|
-
stringReplaceAll
|
|
289
|
-
|
|
290
|
-
if (-1 === index) return string;
|
|
291
|
-
const substringLength = substring.length;
|
|
292
|
-
let endIndex = 0, returnValue = "";
|
|
293
|
-
do {
|
|
294
|
-
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer,
|
|
295
|
-
endIndex = index + substringLength, index = string.indexOf(substring, endIndex);
|
|
296
|
-
} while (-1 !== index);
|
|
297
|
-
return returnValue += string.substr(endIndex), returnValue;
|
|
298
|
-
},
|
|
299
|
-
stringEncaseCRLFWithFirstIndex: (string, prefix, postfix, index) => {
|
|
300
|
-
let endIndex = 0, returnValue = "";
|
|
301
|
-
do {
|
|
302
|
-
const gotCR = "\r" === string[index - 1];
|
|
303
|
-
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix,
|
|
304
|
-
endIndex = index + 1, index = string.indexOf("\n", endIndex);
|
|
305
|
-
} while (-1 !== index);
|
|
306
|
-
return returnValue += string.substr(endIndex), returnValue;
|
|
307
|
-
}
|
|
439
|
+
stringReplaceAll,
|
|
440
|
+
stringEncaseCRLFWithFirstIndex
|
|
308
441
|
};
|
|
309
442
|
},
|
|
310
443
|
2538: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
311
|
-
const cssKeywords = __webpack_require__(6150)
|
|
312
|
-
|
|
444
|
+
const cssKeywords = __webpack_require__(6150);
|
|
445
|
+
const reverseKeywords = {};
|
|
446
|
+
for (const key of Object.keys(cssKeywords)) {
|
|
447
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
448
|
+
}
|
|
313
449
|
const convert = {
|
|
314
450
|
rgb: {
|
|
315
451
|
channels: 3,
|
|
@@ -374,84 +510,227 @@ var __webpack_modules__ = {
|
|
|
374
510
|
};
|
|
375
511
|
module.exports = convert;
|
|
376
512
|
for (const model of Object.keys(convert)) {
|
|
377
|
-
if (!("channels" in convert[model]))
|
|
378
|
-
|
|
379
|
-
|
|
513
|
+
if (!("channels" in convert[model])) {
|
|
514
|
+
throw new Error("missing channels property: " + model);
|
|
515
|
+
}
|
|
516
|
+
if (!("labels" in convert[model])) {
|
|
517
|
+
throw new Error("missing channel labels property: " + model);
|
|
518
|
+
}
|
|
519
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
|
520
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
521
|
+
}
|
|
380
522
|
const {channels, labels} = convert[model];
|
|
381
|
-
delete convert[model].channels
|
|
523
|
+
delete convert[model].channels;
|
|
524
|
+
delete convert[model].labels;
|
|
525
|
+
Object.defineProperty(convert[model], "channels", {
|
|
382
526
|
value: channels
|
|
383
|
-
})
|
|
527
|
+
});
|
|
528
|
+
Object.defineProperty(convert[model], "labels", {
|
|
384
529
|
value: labels
|
|
385
530
|
});
|
|
386
531
|
}
|
|
387
532
|
convert.rgb.hsl = function(rgb) {
|
|
388
|
-
const r = rgb[0] / 255
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
533
|
+
const r = rgb[0] / 255;
|
|
534
|
+
const g = rgb[1] / 255;
|
|
535
|
+
const b = rgb[2] / 255;
|
|
536
|
+
const min = Math.min(r, g, b);
|
|
537
|
+
const max = Math.max(r, g, b);
|
|
538
|
+
const delta = max - min;
|
|
539
|
+
let h;
|
|
540
|
+
let s;
|
|
541
|
+
if (max === min) {
|
|
542
|
+
h = 0;
|
|
543
|
+
} else if (r === max) {
|
|
544
|
+
h = (g - b) / delta;
|
|
545
|
+
} else if (g === max) {
|
|
546
|
+
h = 2 + (b - r) / delta;
|
|
547
|
+
} else if (b === max) {
|
|
548
|
+
h = 4 + (r - g) / delta;
|
|
549
|
+
}
|
|
550
|
+
h = Math.min(h * 60, 360);
|
|
551
|
+
if (h < 0) {
|
|
552
|
+
h += 360;
|
|
553
|
+
}
|
|
392
554
|
const l = (min + max) / 2;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
555
|
+
if (max === min) {
|
|
556
|
+
s = 0;
|
|
557
|
+
} else if (l <= .5) {
|
|
558
|
+
s = delta / (max + min);
|
|
559
|
+
} else {
|
|
560
|
+
s = delta / (2 - max - min);
|
|
561
|
+
}
|
|
562
|
+
return [ h, s * 100, l * 100 ];
|
|
563
|
+
};
|
|
564
|
+
convert.rgb.hsv = function(rgb) {
|
|
565
|
+
let rdif;
|
|
566
|
+
let gdif;
|
|
567
|
+
let bdif;
|
|
568
|
+
let h;
|
|
569
|
+
let s;
|
|
570
|
+
const r = rgb[0] / 255;
|
|
571
|
+
const g = rgb[1] / 255;
|
|
572
|
+
const b = rgb[2] / 255;
|
|
573
|
+
const v = Math.max(r, g, b);
|
|
574
|
+
const diff = v - Math.min(r, g, b);
|
|
575
|
+
const diffc = function(c) {
|
|
576
|
+
return (v - c) / 6 / diff + 1 / 2;
|
|
399
577
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
578
|
+
if (diff === 0) {
|
|
579
|
+
h = 0;
|
|
580
|
+
s = 0;
|
|
581
|
+
} else {
|
|
582
|
+
s = diff / v;
|
|
583
|
+
rdif = diffc(r);
|
|
584
|
+
gdif = diffc(g);
|
|
585
|
+
bdif = diffc(b);
|
|
586
|
+
if (r === v) {
|
|
587
|
+
h = bdif - gdif;
|
|
588
|
+
} else if (g === v) {
|
|
589
|
+
h = 1 / 3 + rdif - bdif;
|
|
590
|
+
} else if (b === v) {
|
|
591
|
+
h = 2 / 3 + gdif - rdif;
|
|
592
|
+
}
|
|
593
|
+
if (h < 0) {
|
|
594
|
+
h += 1;
|
|
595
|
+
} else if (h > 1) {
|
|
596
|
+
h -= 1;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return [ h * 360, s * 100, v * 100 ];
|
|
600
|
+
};
|
|
601
|
+
convert.rgb.hwb = function(rgb) {
|
|
602
|
+
const r = rgb[0];
|
|
603
|
+
const g = rgb[1];
|
|
405
604
|
let b = rgb[2];
|
|
406
|
-
const h = convert.rgb.hsl(rgb)[0]
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
605
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
606
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
607
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
608
|
+
return [ h, w * 100, b * 100 ];
|
|
609
|
+
};
|
|
610
|
+
convert.rgb.cmyk = function(rgb) {
|
|
611
|
+
const r = rgb[0] / 255;
|
|
612
|
+
const g = rgb[1] / 255;
|
|
613
|
+
const b = rgb[2] / 255;
|
|
614
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
615
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
616
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
617
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
618
|
+
return [ c * 100, m * 100, y * 100, k * 100 ];
|
|
619
|
+
};
|
|
620
|
+
function comparativeDistance(x, y) {
|
|
621
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
622
|
+
}
|
|
623
|
+
convert.rgb.keyword = function(rgb) {
|
|
412
624
|
const reversed = reverseKeywords[rgb];
|
|
413
|
-
if (reversed)
|
|
414
|
-
|
|
625
|
+
if (reversed) {
|
|
626
|
+
return reversed;
|
|
627
|
+
}
|
|
628
|
+
let currentClosestDistance = Infinity;
|
|
629
|
+
let currentClosestKeyword;
|
|
415
630
|
for (const keyword of Object.keys(cssKeywords)) {
|
|
416
|
-
const value = cssKeywords[keyword]
|
|
417
|
-
distance
|
|
631
|
+
const value = cssKeywords[keyword];
|
|
632
|
+
const distance = comparativeDistance(rgb, value);
|
|
633
|
+
if (distance < currentClosestDistance) {
|
|
634
|
+
currentClosestDistance = distance;
|
|
635
|
+
currentClosestKeyword = keyword;
|
|
636
|
+
}
|
|
418
637
|
}
|
|
419
|
-
var x, y;
|
|
420
638
|
return currentClosestKeyword;
|
|
421
|
-
}
|
|
639
|
+
};
|
|
640
|
+
convert.keyword.rgb = function(keyword) {
|
|
422
641
|
return cssKeywords[keyword];
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
|
|
642
|
+
};
|
|
643
|
+
convert.rgb.xyz = function(rgb) {
|
|
644
|
+
let r = rgb[0] / 255;
|
|
645
|
+
let g = rgb[1] / 255;
|
|
646
|
+
let b = rgb[2] / 255;
|
|
647
|
+
r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
|
|
648
|
+
g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
|
|
426
649
|
b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
|
|
427
|
-
|
|
428
|
-
|
|
650
|
+
const x = r * .4124 + g * .3576 + b * .1805;
|
|
651
|
+
const y = r * .2126 + g * .7152 + b * .0722;
|
|
652
|
+
const z = r * .0193 + g * .1192 + b * .9505;
|
|
653
|
+
return [ x * 100, y * 100, z * 100 ];
|
|
654
|
+
};
|
|
655
|
+
convert.rgb.lab = function(rgb) {
|
|
429
656
|
const xyz = convert.rgb.xyz(rgb);
|
|
430
|
-
let x = xyz[0]
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
657
|
+
let x = xyz[0];
|
|
658
|
+
let y = xyz[1];
|
|
659
|
+
let z = xyz[2];
|
|
660
|
+
x /= 95.047;
|
|
661
|
+
y /= 100;
|
|
662
|
+
z /= 108.883;
|
|
663
|
+
x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
664
|
+
y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
665
|
+
z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
666
|
+
const l = 116 * y - 16;
|
|
667
|
+
const a = 500 * (x - y);
|
|
668
|
+
const b = 200 * (y - z);
|
|
669
|
+
return [ l, a, b ];
|
|
670
|
+
};
|
|
671
|
+
convert.hsl.rgb = function(hsl) {
|
|
672
|
+
const h = hsl[0] / 360;
|
|
673
|
+
const s = hsl[1] / 100;
|
|
674
|
+
const l = hsl[2] / 100;
|
|
675
|
+
let t2;
|
|
676
|
+
let t3;
|
|
677
|
+
let val;
|
|
678
|
+
if (s === 0) {
|
|
679
|
+
val = l * 255;
|
|
680
|
+
return [ val, val, val ];
|
|
681
|
+
}
|
|
682
|
+
if (l < .5) {
|
|
683
|
+
t2 = l * (1 + s);
|
|
684
|
+
} else {
|
|
685
|
+
t2 = l + s - l * s;
|
|
686
|
+
}
|
|
687
|
+
const t1 = 2 * l - t2;
|
|
688
|
+
const rgb = [ 0, 0, 0 ];
|
|
689
|
+
for (let i = 0; i < 3; i++) {
|
|
690
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
691
|
+
if (t3 < 0) {
|
|
692
|
+
t3++;
|
|
693
|
+
}
|
|
694
|
+
if (t3 > 1) {
|
|
695
|
+
t3--;
|
|
696
|
+
}
|
|
697
|
+
if (6 * t3 < 1) {
|
|
698
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
|
699
|
+
} else if (2 * t3 < 1) {
|
|
700
|
+
val = t2;
|
|
701
|
+
} else if (3 * t3 < 2) {
|
|
702
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
703
|
+
} else {
|
|
704
|
+
val = t1;
|
|
705
|
+
}
|
|
706
|
+
rgb[i] = val * 255;
|
|
707
|
+
}
|
|
443
708
|
return rgb;
|
|
444
|
-
}
|
|
709
|
+
};
|
|
710
|
+
convert.hsl.hsv = function(hsl) {
|
|
445
711
|
const h = hsl[0];
|
|
446
|
-
let s = hsl[1] / 100
|
|
712
|
+
let s = hsl[1] / 100;
|
|
713
|
+
let l = hsl[2] / 100;
|
|
714
|
+
let smin = s;
|
|
447
715
|
const lmin = Math.max(l, .01);
|
|
448
|
-
l *= 2
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const
|
|
716
|
+
l *= 2;
|
|
717
|
+
s *= l <= 1 ? l : 2 - l;
|
|
718
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
719
|
+
const v = (l + s) / 2;
|
|
720
|
+
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
721
|
+
return [ h, sv * 100, v * 100 ];
|
|
722
|
+
};
|
|
723
|
+
convert.hsv.rgb = function(hsv) {
|
|
724
|
+
const h = hsv[0] / 60;
|
|
725
|
+
const s = hsv[1] / 100;
|
|
452
726
|
let v = hsv[2] / 100;
|
|
453
|
-
const hi = Math.floor(h) % 6
|
|
454
|
-
|
|
727
|
+
const hi = Math.floor(h) % 6;
|
|
728
|
+
const f = h - Math.floor(h);
|
|
729
|
+
const p = 255 * v * (1 - s);
|
|
730
|
+
const q = 255 * v * (1 - s * f);
|
|
731
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
732
|
+
v *= 255;
|
|
733
|
+
switch (hi) {
|
|
455
734
|
case 0:
|
|
456
735
|
return [ v, t, p ];
|
|
457
736
|
|
|
@@ -470,244 +749,507 @@ var __webpack_modules__ = {
|
|
|
470
749
|
case 5:
|
|
471
750
|
return [ v, p, q ];
|
|
472
751
|
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
|
|
752
|
+
};
|
|
753
|
+
convert.hsv.hsl = function(hsv) {
|
|
754
|
+
const h = hsv[0];
|
|
755
|
+
const s = hsv[1] / 100;
|
|
756
|
+
const v = hsv[2] / 100;
|
|
757
|
+
const vmin = Math.max(v, .01);
|
|
758
|
+
let sl;
|
|
759
|
+
let l;
|
|
476
760
|
l = (2 - s) * v;
|
|
477
761
|
const lmin = (2 - s) * vmin;
|
|
478
|
-
|
|
479
|
-
|
|
762
|
+
sl = s * vmin;
|
|
763
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
764
|
+
sl = sl || 0;
|
|
765
|
+
l /= 2;
|
|
766
|
+
return [ h, sl * 100, l * 100 ];
|
|
767
|
+
};
|
|
768
|
+
convert.hwb.rgb = function(hwb) {
|
|
480
769
|
const h = hwb[0] / 360;
|
|
481
|
-
let wh = hwb[1] / 100
|
|
770
|
+
let wh = hwb[1] / 100;
|
|
771
|
+
let bl = hwb[2] / 100;
|
|
482
772
|
const ratio = wh + bl;
|
|
483
773
|
let f;
|
|
484
|
-
ratio > 1
|
|
485
|
-
|
|
486
|
-
|
|
774
|
+
if (ratio > 1) {
|
|
775
|
+
wh /= ratio;
|
|
776
|
+
bl /= ratio;
|
|
777
|
+
}
|
|
778
|
+
const i = Math.floor(6 * h);
|
|
779
|
+
const v = 1 - bl;
|
|
780
|
+
f = 6 * h - i;
|
|
781
|
+
if ((i & 1) !== 0) {
|
|
782
|
+
f = 1 - f;
|
|
783
|
+
}
|
|
487
784
|
const n = wh + f * (v - wh);
|
|
488
|
-
let r
|
|
785
|
+
let r;
|
|
786
|
+
let g;
|
|
787
|
+
let b;
|
|
489
788
|
switch (i) {
|
|
490
789
|
default:
|
|
491
790
|
case 6:
|
|
492
791
|
case 0:
|
|
493
|
-
r = v
|
|
792
|
+
r = v;
|
|
793
|
+
g = n;
|
|
794
|
+
b = wh;
|
|
494
795
|
break;
|
|
495
796
|
|
|
496
797
|
case 1:
|
|
497
|
-
r = n
|
|
798
|
+
r = n;
|
|
799
|
+
g = v;
|
|
800
|
+
b = wh;
|
|
498
801
|
break;
|
|
499
802
|
|
|
500
803
|
case 2:
|
|
501
|
-
r = wh
|
|
804
|
+
r = wh;
|
|
805
|
+
g = v;
|
|
806
|
+
b = n;
|
|
502
807
|
break;
|
|
503
808
|
|
|
504
809
|
case 3:
|
|
505
|
-
r = wh
|
|
810
|
+
r = wh;
|
|
811
|
+
g = n;
|
|
812
|
+
b = v;
|
|
506
813
|
break;
|
|
507
814
|
|
|
508
815
|
case 4:
|
|
509
|
-
r = n
|
|
816
|
+
r = n;
|
|
817
|
+
g = wh;
|
|
818
|
+
b = v;
|
|
510
819
|
break;
|
|
511
820
|
|
|
512
821
|
case 5:
|
|
513
|
-
r = v
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
return [
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
r =
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
822
|
+
r = v;
|
|
823
|
+
g = wh;
|
|
824
|
+
b = n;
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
return [ r * 255, g * 255, b * 255 ];
|
|
828
|
+
};
|
|
829
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
830
|
+
const c = cmyk[0] / 100;
|
|
831
|
+
const m = cmyk[1] / 100;
|
|
832
|
+
const y = cmyk[2] / 100;
|
|
833
|
+
const k = cmyk[3] / 100;
|
|
834
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
835
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
836
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
837
|
+
return [ r * 255, g * 255, b * 255 ];
|
|
838
|
+
};
|
|
839
|
+
convert.xyz.rgb = function(xyz) {
|
|
840
|
+
const x = xyz[0] / 100;
|
|
841
|
+
const y = xyz[1] / 100;
|
|
842
|
+
const z = xyz[2] / 100;
|
|
843
|
+
let r;
|
|
844
|
+
let g;
|
|
845
|
+
let b;
|
|
846
|
+
r = x * 3.2406 + y * -1.5372 + z * -.4986;
|
|
847
|
+
g = x * -.9689 + y * 1.8758 + z * .0415;
|
|
848
|
+
b = x * .0557 + y * -.204 + z * 1.057;
|
|
849
|
+
r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
|
|
850
|
+
g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
|
|
851
|
+
b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
|
|
852
|
+
r = Math.min(Math.max(0, r), 1);
|
|
853
|
+
g = Math.min(Math.max(0, g), 1);
|
|
854
|
+
b = Math.min(Math.max(0, b), 1);
|
|
855
|
+
return [ r * 255, g * 255, b * 255 ];
|
|
856
|
+
};
|
|
857
|
+
convert.xyz.lab = function(xyz) {
|
|
858
|
+
let x = xyz[0];
|
|
859
|
+
let y = xyz[1];
|
|
860
|
+
let z = xyz[2];
|
|
861
|
+
x /= 95.047;
|
|
862
|
+
y /= 100;
|
|
863
|
+
z /= 108.883;
|
|
864
|
+
x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
865
|
+
y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
866
|
+
z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
867
|
+
const l = 116 * y - 16;
|
|
868
|
+
const a = 500 * (x - y);
|
|
869
|
+
const b = 200 * (y - z);
|
|
870
|
+
return [ l, a, b ];
|
|
871
|
+
};
|
|
872
|
+
convert.lab.xyz = function(lab) {
|
|
873
|
+
const l = lab[0];
|
|
874
|
+
const a = lab[1];
|
|
875
|
+
const b = lab[2];
|
|
876
|
+
let x;
|
|
877
|
+
let y;
|
|
878
|
+
let z;
|
|
879
|
+
y = (l + 16) / 116;
|
|
880
|
+
x = a / 500 + y;
|
|
881
|
+
z = y - b / 200;
|
|
882
|
+
const y2 = y ** 3;
|
|
883
|
+
const x2 = x ** 3;
|
|
884
|
+
const z2 = z ** 3;
|
|
885
|
+
y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
|
|
886
|
+
x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
|
|
887
|
+
z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
|
|
888
|
+
x *= 95.047;
|
|
889
|
+
y *= 100;
|
|
890
|
+
z *= 108.883;
|
|
891
|
+
return [ x, y, z ];
|
|
892
|
+
};
|
|
893
|
+
convert.lab.lch = function(lab) {
|
|
894
|
+
const l = lab[0];
|
|
895
|
+
const a = lab[1];
|
|
896
|
+
const b = lab[2];
|
|
541
897
|
let h;
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
898
|
+
const hr = Math.atan2(b, a);
|
|
899
|
+
h = hr * 360 / 2 / Math.PI;
|
|
900
|
+
if (h < 0) {
|
|
901
|
+
h += 360;
|
|
902
|
+
}
|
|
903
|
+
const c = Math.sqrt(a * a + b * b);
|
|
904
|
+
return [ l, c, h ];
|
|
905
|
+
};
|
|
906
|
+
convert.lch.lab = function(lch) {
|
|
907
|
+
const l = lch[0];
|
|
908
|
+
const c = lch[1];
|
|
909
|
+
const h = lch[2];
|
|
910
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
911
|
+
const a = c * Math.cos(hr);
|
|
912
|
+
const b = c * Math.sin(hr);
|
|
913
|
+
return [ l, a, b ];
|
|
914
|
+
};
|
|
915
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
548
916
|
const [r, g, b] = args;
|
|
549
|
-
let value =
|
|
550
|
-
|
|
917
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
918
|
+
value = Math.round(value / 50);
|
|
919
|
+
if (value === 0) {
|
|
920
|
+
return 30;
|
|
921
|
+
}
|
|
551
922
|
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
552
|
-
|
|
553
|
-
|
|
923
|
+
if (value === 2) {
|
|
924
|
+
ansi += 60;
|
|
925
|
+
}
|
|
926
|
+
return ansi;
|
|
927
|
+
};
|
|
928
|
+
convert.hsv.ansi16 = function(args) {
|
|
554
929
|
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
930
|
+
};
|
|
931
|
+
convert.rgb.ansi256 = function(args) {
|
|
932
|
+
const r = args[0];
|
|
933
|
+
const g = args[1];
|
|
934
|
+
const b = args[2];
|
|
935
|
+
if (r === g && g === b) {
|
|
936
|
+
if (r < 8) {
|
|
937
|
+
return 16;
|
|
938
|
+
}
|
|
939
|
+
if (r > 248) {
|
|
940
|
+
return 231;
|
|
941
|
+
}
|
|
942
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
943
|
+
}
|
|
944
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
945
|
+
return ansi;
|
|
946
|
+
};
|
|
947
|
+
convert.ansi16.rgb = function(args) {
|
|
560
948
|
let color = args % 10;
|
|
561
|
-
if (
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
949
|
+
if (color === 0 || color === 7) {
|
|
950
|
+
if (args > 50) {
|
|
951
|
+
color += 3.5;
|
|
952
|
+
}
|
|
953
|
+
color = color / 10.5 * 255;
|
|
954
|
+
return [ color, color, color ];
|
|
955
|
+
}
|
|
956
|
+
const mult = (~~(args > 50) + 1) * .5;
|
|
957
|
+
const r = (color & 1) * mult * 255;
|
|
958
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
959
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
960
|
+
return [ r, g, b ];
|
|
961
|
+
};
|
|
962
|
+
convert.ansi256.rgb = function(args) {
|
|
566
963
|
if (args >= 232) {
|
|
567
|
-
const c =
|
|
964
|
+
const c = (args - 232) * 10 + 8;
|
|
568
965
|
return [ c, c, c ];
|
|
569
966
|
}
|
|
570
|
-
let rem;
|
|
571
967
|
args -= 16;
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
const
|
|
968
|
+
let rem;
|
|
969
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
970
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
971
|
+
const b = rem % 6 / 5 * 255;
|
|
972
|
+
return [ r, g, b ];
|
|
973
|
+
};
|
|
974
|
+
convert.rgb.hex = function(args) {
|
|
975
|
+
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
976
|
+
const string = integer.toString(16).toUpperCase();
|
|
575
977
|
return "000000".substring(string.length) + string;
|
|
576
|
-
}
|
|
978
|
+
};
|
|
979
|
+
convert.hex.rgb = function(args) {
|
|
577
980
|
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
578
|
-
if (!match)
|
|
981
|
+
if (!match) {
|
|
982
|
+
return [ 0, 0, 0 ];
|
|
983
|
+
}
|
|
579
984
|
let colorString = match[0];
|
|
580
|
-
|
|
985
|
+
if (match[0].length === 3) {
|
|
986
|
+
colorString = colorString.split("").map((char => char + char)).join("");
|
|
987
|
+
}
|
|
581
988
|
const integer = parseInt(colorString, 16);
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
const
|
|
989
|
+
const r = integer >> 16 & 255;
|
|
990
|
+
const g = integer >> 8 & 255;
|
|
991
|
+
const b = integer & 255;
|
|
992
|
+
return [ r, g, b ];
|
|
993
|
+
};
|
|
994
|
+
convert.rgb.hcg = function(rgb) {
|
|
995
|
+
const r = rgb[0] / 255;
|
|
996
|
+
const g = rgb[1] / 255;
|
|
997
|
+
const b = rgb[2] / 255;
|
|
998
|
+
const max = Math.max(Math.max(r, g), b);
|
|
999
|
+
const min = Math.min(Math.min(r, g), b);
|
|
1000
|
+
const chroma = max - min;
|
|
1001
|
+
let grayscale;
|
|
1002
|
+
let hue;
|
|
1003
|
+
if (chroma < 1) {
|
|
1004
|
+
grayscale = min / (1 - chroma);
|
|
1005
|
+
} else {
|
|
1006
|
+
grayscale = 0;
|
|
1007
|
+
}
|
|
1008
|
+
if (chroma <= 0) {
|
|
1009
|
+
hue = 0;
|
|
1010
|
+
} else if (max === r) {
|
|
1011
|
+
hue = (g - b) / chroma % 6;
|
|
1012
|
+
} else if (max === g) {
|
|
1013
|
+
hue = 2 + (b - r) / chroma;
|
|
1014
|
+
} else {
|
|
1015
|
+
hue = 4 + (r - g) / chroma;
|
|
1016
|
+
}
|
|
1017
|
+
hue /= 6;
|
|
1018
|
+
hue %= 1;
|
|
1019
|
+
return [ hue * 360, chroma * 100, grayscale * 100 ];
|
|
1020
|
+
};
|
|
1021
|
+
convert.hsl.hcg = function(hsl) {
|
|
1022
|
+
const s = hsl[1] / 100;
|
|
1023
|
+
const l = hsl[2] / 100;
|
|
1024
|
+
const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
|
|
590
1025
|
let f = 0;
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
1026
|
+
if (c < 1) {
|
|
1027
|
+
f = (l - .5 * c) / (1 - c);
|
|
1028
|
+
}
|
|
1029
|
+
return [ hsl[0], c * 100, f * 100 ];
|
|
1030
|
+
};
|
|
1031
|
+
convert.hsv.hcg = function(hsv) {
|
|
1032
|
+
const s = hsv[1] / 100;
|
|
1033
|
+
const v = hsv[2] / 100;
|
|
1034
|
+
const c = s * v;
|
|
594
1035
|
let f = 0;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
1036
|
+
if (c < 1) {
|
|
1037
|
+
f = (v - c) / (1 - c);
|
|
1038
|
+
}
|
|
1039
|
+
return [ hsv[0], c * 100, f * 100 ];
|
|
1040
|
+
};
|
|
1041
|
+
convert.hcg.rgb = function(hcg) {
|
|
1042
|
+
const h = hcg[0] / 360;
|
|
1043
|
+
const c = hcg[1] / 100;
|
|
1044
|
+
const g = hcg[2] / 100;
|
|
1045
|
+
if (c === 0) {
|
|
1046
|
+
return [ g * 255, g * 255, g * 255 ];
|
|
1047
|
+
}
|
|
1048
|
+
const pure = [ 0, 0, 0 ];
|
|
1049
|
+
const hi = h % 1 * 6;
|
|
1050
|
+
const v = hi % 1;
|
|
1051
|
+
const w = 1 - v;
|
|
600
1052
|
let mg = 0;
|
|
601
1053
|
switch (Math.floor(hi)) {
|
|
602
1054
|
case 0:
|
|
603
|
-
pure[0] = 1
|
|
1055
|
+
pure[0] = 1;
|
|
1056
|
+
pure[1] = v;
|
|
1057
|
+
pure[2] = 0;
|
|
604
1058
|
break;
|
|
605
1059
|
|
|
606
1060
|
case 1:
|
|
607
|
-
pure[0] = w
|
|
1061
|
+
pure[0] = w;
|
|
1062
|
+
pure[1] = 1;
|
|
1063
|
+
pure[2] = 0;
|
|
608
1064
|
break;
|
|
609
1065
|
|
|
610
1066
|
case 2:
|
|
611
|
-
pure[0] = 0
|
|
1067
|
+
pure[0] = 0;
|
|
1068
|
+
pure[1] = 1;
|
|
1069
|
+
pure[2] = v;
|
|
612
1070
|
break;
|
|
613
1071
|
|
|
614
1072
|
case 3:
|
|
615
|
-
pure[0] = 0
|
|
1073
|
+
pure[0] = 0;
|
|
1074
|
+
pure[1] = w;
|
|
1075
|
+
pure[2] = 1;
|
|
616
1076
|
break;
|
|
617
1077
|
|
|
618
1078
|
case 4:
|
|
619
|
-
pure[0] = v
|
|
1079
|
+
pure[0] = v;
|
|
1080
|
+
pure[1] = 0;
|
|
1081
|
+
pure[2] = 1;
|
|
620
1082
|
break;
|
|
621
1083
|
|
|
622
1084
|
default:
|
|
623
|
-
pure[0] = 1
|
|
1085
|
+
pure[0] = 1;
|
|
1086
|
+
pure[1] = 0;
|
|
1087
|
+
pure[2] = w;
|
|
624
1088
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
1089
|
+
mg = (1 - c) * g;
|
|
1090
|
+
return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ];
|
|
1091
|
+
};
|
|
1092
|
+
convert.hcg.hsv = function(hcg) {
|
|
1093
|
+
const c = hcg[1] / 100;
|
|
1094
|
+
const g = hcg[2] / 100;
|
|
1095
|
+
const v = c + g * (1 - c);
|
|
628
1096
|
let f = 0;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1097
|
+
if (v > 0) {
|
|
1098
|
+
f = c / v;
|
|
1099
|
+
}
|
|
1100
|
+
return [ hcg[0], f * 100, v * 100 ];
|
|
1101
|
+
};
|
|
1102
|
+
convert.hcg.hsl = function(hcg) {
|
|
1103
|
+
const c = hcg[1] / 100;
|
|
1104
|
+
const g = hcg[2] / 100;
|
|
1105
|
+
const l = g * (1 - c) + .5 * c;
|
|
632
1106
|
let s = 0;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
1107
|
+
if (l > 0 && l < .5) {
|
|
1108
|
+
s = c / (2 * l);
|
|
1109
|
+
} else if (l >= .5 && l < 1) {
|
|
1110
|
+
s = c / (2 * (1 - l));
|
|
1111
|
+
}
|
|
1112
|
+
return [ hcg[0], s * 100, l * 100 ];
|
|
1113
|
+
};
|
|
1114
|
+
convert.hcg.hwb = function(hcg) {
|
|
1115
|
+
const c = hcg[1] / 100;
|
|
1116
|
+
const g = hcg[2] / 100;
|
|
1117
|
+
const v = c + g * (1 - c);
|
|
1118
|
+
return [ hcg[0], (v - c) * 100, (1 - v) * 100 ];
|
|
1119
|
+
};
|
|
1120
|
+
convert.hwb.hcg = function(hwb) {
|
|
1121
|
+
const w = hwb[1] / 100;
|
|
1122
|
+
const b = hwb[2] / 100;
|
|
1123
|
+
const v = 1 - b;
|
|
1124
|
+
const c = v - w;
|
|
640
1125
|
let g = 0;
|
|
641
|
-
|
|
642
|
-
|
|
1126
|
+
if (c < 1) {
|
|
1127
|
+
g = (v - c) / (1 - c);
|
|
1128
|
+
}
|
|
1129
|
+
return [ hwb[0], c * 100, g * 100 ];
|
|
1130
|
+
};
|
|
1131
|
+
convert.apple.rgb = function(apple) {
|
|
643
1132
|
return [ apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255 ];
|
|
644
|
-
}
|
|
1133
|
+
};
|
|
1134
|
+
convert.rgb.apple = function(rgb) {
|
|
645
1135
|
return [ rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535 ];
|
|
646
|
-
}
|
|
1136
|
+
};
|
|
1137
|
+
convert.gray.rgb = function(args) {
|
|
647
1138
|
return [ args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255 ];
|
|
648
|
-
}
|
|
1139
|
+
};
|
|
1140
|
+
convert.gray.hsl = function(args) {
|
|
649
1141
|
return [ 0, 0, args[0] ];
|
|
650
|
-
}
|
|
1142
|
+
};
|
|
1143
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
1144
|
+
convert.gray.hwb = function(gray) {
|
|
651
1145
|
return [ 0, 100, gray[0] ];
|
|
652
|
-
}
|
|
1146
|
+
};
|
|
1147
|
+
convert.gray.cmyk = function(gray) {
|
|
653
1148
|
return [ 0, 0, 0, gray[0] ];
|
|
654
|
-
}
|
|
1149
|
+
};
|
|
1150
|
+
convert.gray.lab = function(gray) {
|
|
655
1151
|
return [ gray[0], 0, 0 ];
|
|
656
|
-
}
|
|
657
|
-
|
|
1152
|
+
};
|
|
1153
|
+
convert.gray.hex = function(gray) {
|
|
1154
|
+
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
1155
|
+
const integer = (val << 16) + (val << 8) + val;
|
|
1156
|
+
const string = integer.toString(16).toUpperCase();
|
|
658
1157
|
return "000000".substring(string.length) + string;
|
|
659
|
-
}
|
|
660
|
-
|
|
1158
|
+
};
|
|
1159
|
+
convert.rgb.gray = function(rgb) {
|
|
1160
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
1161
|
+
return [ val / 255 * 100 ];
|
|
661
1162
|
};
|
|
662
1163
|
},
|
|
663
1164
|
9208: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
664
|
-
const conversions = __webpack_require__(2538)
|
|
665
|
-
|
|
666
|
-
|
|
1165
|
+
const conversions = __webpack_require__(2538);
|
|
1166
|
+
const route = __webpack_require__(2051);
|
|
1167
|
+
const convert = {};
|
|
1168
|
+
const models = Object.keys(conversions);
|
|
1169
|
+
function wrapRaw(fn) {
|
|
1170
|
+
const wrappedFn = function(...args) {
|
|
1171
|
+
const arg0 = args[0];
|
|
1172
|
+
if (arg0 === undefined || arg0 === null) {
|
|
1173
|
+
return arg0;
|
|
1174
|
+
}
|
|
1175
|
+
if (arg0.length > 1) {
|
|
1176
|
+
args = arg0;
|
|
1177
|
+
}
|
|
1178
|
+
return fn(args);
|
|
1179
|
+
};
|
|
1180
|
+
if ("conversion" in fn) {
|
|
1181
|
+
wrappedFn.conversion = fn.conversion;
|
|
1182
|
+
}
|
|
1183
|
+
return wrappedFn;
|
|
1184
|
+
}
|
|
1185
|
+
function wrapRounded(fn) {
|
|
1186
|
+
const wrappedFn = function(...args) {
|
|
1187
|
+
const arg0 = args[0];
|
|
1188
|
+
if (arg0 === undefined || arg0 === null) {
|
|
1189
|
+
return arg0;
|
|
1190
|
+
}
|
|
1191
|
+
if (arg0.length > 1) {
|
|
1192
|
+
args = arg0;
|
|
1193
|
+
}
|
|
1194
|
+
const result = fn(args);
|
|
1195
|
+
if (typeof result === "object") {
|
|
1196
|
+
for (let len = result.length, i = 0; i < len; i++) {
|
|
1197
|
+
result[i] = Math.round(result[i]);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return result;
|
|
1201
|
+
};
|
|
1202
|
+
if ("conversion" in fn) {
|
|
1203
|
+
wrappedFn.conversion = fn.conversion;
|
|
1204
|
+
}
|
|
1205
|
+
return wrappedFn;
|
|
1206
|
+
}
|
|
1207
|
+
models.forEach((fromModel => {
|
|
1208
|
+
convert[fromModel] = {};
|
|
1209
|
+
Object.defineProperty(convert[fromModel], "channels", {
|
|
667
1210
|
value: conversions[fromModel].channels
|
|
668
|
-
})
|
|
1211
|
+
});
|
|
1212
|
+
Object.defineProperty(convert[fromModel], "labels", {
|
|
669
1213
|
value: conversions[fromModel].labels
|
|
670
1214
|
});
|
|
671
1215
|
const routes = route(fromModel);
|
|
672
|
-
Object.keys(routes)
|
|
1216
|
+
const routeModels = Object.keys(routes);
|
|
1217
|
+
routeModels.forEach((toModel => {
|
|
673
1218
|
const fn = routes[toModel];
|
|
674
|
-
convert[fromModel][toModel] =
|
|
675
|
-
|
|
676
|
-
const arg0 = args[0];
|
|
677
|
-
if (null == arg0) return arg0;
|
|
678
|
-
arg0.length > 1 && (args = arg0);
|
|
679
|
-
const result = fn(args);
|
|
680
|
-
if ("object" == typeof result) for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
|
|
681
|
-
return result;
|
|
682
|
-
};
|
|
683
|
-
return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
|
|
684
|
-
}(fn), convert[fromModel][toModel].raw = function(fn) {
|
|
685
|
-
const wrappedFn = function(...args) {
|
|
686
|
-
const arg0 = args[0];
|
|
687
|
-
return null == arg0 ? arg0 : (arg0.length > 1 && (args = arg0), fn(args));
|
|
688
|
-
};
|
|
689
|
-
return "conversion" in fn && (wrappedFn.conversion = fn.conversion), wrappedFn;
|
|
690
|
-
}(fn);
|
|
1219
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
1220
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
691
1221
|
}));
|
|
692
|
-
}))
|
|
1222
|
+
}));
|
|
1223
|
+
module.exports = convert;
|
|
693
1224
|
},
|
|
694
1225
|
2051: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
695
1226
|
const conversions = __webpack_require__(2538);
|
|
696
|
-
function
|
|
697
|
-
const graph =
|
|
698
|
-
|
|
699
|
-
|
|
1227
|
+
function buildGraph() {
|
|
1228
|
+
const graph = {};
|
|
1229
|
+
const models = Object.keys(conversions);
|
|
1230
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
1231
|
+
graph[models[i]] = {
|
|
700
1232
|
distance: -1,
|
|
701
1233
|
parent: null
|
|
702
1234
|
};
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
1235
|
+
}
|
|
1236
|
+
return graph;
|
|
1237
|
+
}
|
|
1238
|
+
function deriveBFS(fromModel) {
|
|
1239
|
+
const graph = buildGraph();
|
|
1240
|
+
const queue = [ fromModel ];
|
|
1241
|
+
graph[fromModel].distance = 0;
|
|
1242
|
+
while (queue.length) {
|
|
1243
|
+
const current = queue.pop();
|
|
1244
|
+
const adjacents = Object.keys(conversions[current]);
|
|
707
1245
|
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
708
|
-
const adjacent = adjacents[i]
|
|
709
|
-
|
|
710
|
-
|
|
1246
|
+
const adjacent = adjacents[i];
|
|
1247
|
+
const node = graph[adjacent];
|
|
1248
|
+
if (node.distance === -1) {
|
|
1249
|
+
node.distance = graph[current].distance + 1;
|
|
1250
|
+
node.parent = current;
|
|
1251
|
+
queue.unshift(adjacent);
|
|
1252
|
+
}
|
|
711
1253
|
}
|
|
712
1254
|
}
|
|
713
1255
|
return graph;
|
|
@@ -719,16 +1261,27 @@ var __webpack_modules__ = {
|
|
|
719
1261
|
}
|
|
720
1262
|
function wrapConversion(toModel, graph) {
|
|
721
1263
|
const path = [ graph[toModel].parent, toModel ];
|
|
722
|
-
let fn = conversions[graph[toModel].parent][toModel]
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
1264
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
1265
|
+
let cur = graph[toModel].parent;
|
|
1266
|
+
while (graph[cur].parent) {
|
|
1267
|
+
path.unshift(graph[cur].parent);
|
|
1268
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1269
|
+
cur = graph[cur].parent;
|
|
1270
|
+
}
|
|
1271
|
+
fn.conversion = path;
|
|
1272
|
+
return fn;
|
|
726
1273
|
}
|
|
727
1274
|
module.exports = function(fromModel) {
|
|
728
|
-
const graph = deriveBFS(fromModel)
|
|
1275
|
+
const graph = deriveBFS(fromModel);
|
|
1276
|
+
const conversion = {};
|
|
1277
|
+
const models = Object.keys(graph);
|
|
729
1278
|
for (let len = models.length, i = 0; i < len; i++) {
|
|
730
1279
|
const toModel = models[i];
|
|
731
|
-
|
|
1280
|
+
const node = graph[toModel];
|
|
1281
|
+
if (node.parent === null) {
|
|
1282
|
+
continue;
|
|
1283
|
+
}
|
|
1284
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
732
1285
|
}
|
|
733
1286
|
return conversion;
|
|
734
1287
|
};
|
|
@@ -889,62 +1442,48 @@ var __webpack_modules__ = {
|
|
|
889
1442
|
4288: module => {
|
|
890
1443
|
"use strict";
|
|
891
1444
|
module.exports = (flag, argv = process.argv) => {
|
|
892
|
-
const prefix = flag.startsWith("-") ? "" :
|
|
893
|
-
|
|
1445
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
1446
|
+
const position = argv.indexOf(prefix + flag);
|
|
1447
|
+
const terminatorPosition = argv.indexOf("--");
|
|
1448
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
894
1449
|
};
|
|
895
1450
|
},
|
|
896
1451
|
3437: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
897
1452
|
"use strict";
|
|
898
|
-
const Yallist = __webpack_require__(1455)
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
|
|
912
|
-
}, trim = self => {
|
|
913
|
-
if (self[LENGTH] > self[MAX]) for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && null !== walker; ) {
|
|
914
|
-
const prev = walker.prev;
|
|
915
|
-
del(self, walker), walker = prev;
|
|
916
|
-
}
|
|
917
|
-
}, del = (self, node) => {
|
|
918
|
-
if (node) {
|
|
919
|
-
const hit = node.value;
|
|
920
|
-
self[DISPOSE] && self[DISPOSE](hit.key, hit.value), self[LENGTH] -= hit.length,
|
|
921
|
-
self[CACHE].delete(hit.key), self[LRU_LIST].removeNode(node);
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
|
-
class Entry {
|
|
925
|
-
constructor(key, value, length, now, maxAge) {
|
|
926
|
-
this.key = key, this.value = value, this.length = length, this.now = now, this.maxAge = maxAge || 0;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
const forEachStep = (self, fn, node, thisp) => {
|
|
930
|
-
let hit = node.value;
|
|
931
|
-
isStale(self, hit) && (del(self, node), self[ALLOW_STALE] || (hit = void 0)), hit && fn.call(thisp, hit.value, hit.key, self);
|
|
932
|
-
};
|
|
933
|
-
module.exports = class {
|
|
1453
|
+
const Yallist = __webpack_require__(1455);
|
|
1454
|
+
const MAX = Symbol("max");
|
|
1455
|
+
const LENGTH = Symbol("length");
|
|
1456
|
+
const LENGTH_CALCULATOR = Symbol("lengthCalculator");
|
|
1457
|
+
const ALLOW_STALE = Symbol("allowStale");
|
|
1458
|
+
const MAX_AGE = Symbol("maxAge");
|
|
1459
|
+
const DISPOSE = Symbol("dispose");
|
|
1460
|
+
const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
|
|
1461
|
+
const LRU_LIST = Symbol("lruList");
|
|
1462
|
+
const CACHE = Symbol("cache");
|
|
1463
|
+
const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
|
|
1464
|
+
const naiveLength = () => 1;
|
|
1465
|
+
class LRUCache {
|
|
934
1466
|
constructor(options) {
|
|
935
|
-
if (
|
|
1467
|
+
if (typeof options === "number") options = {
|
|
936
1468
|
max: options
|
|
937
|
-
}
|
|
938
|
-
|
|
1469
|
+
};
|
|
1470
|
+
if (!options) options = {};
|
|
1471
|
+
if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
|
|
1472
|
+
const max = this[MAX] = options.max || Infinity;
|
|
939
1473
|
const lc = options.length || naiveLength;
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
this[
|
|
1474
|
+
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
|
|
1475
|
+
this[ALLOW_STALE] = options.stale || false;
|
|
1476
|
+
if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
1477
|
+
this[MAX_AGE] = options.maxAge || 0;
|
|
1478
|
+
this[DISPOSE] = options.dispose;
|
|
1479
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
1480
|
+
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
1481
|
+
this.reset();
|
|
944
1482
|
}
|
|
945
1483
|
set max(mL) {
|
|
946
|
-
if ("number"
|
|
947
|
-
this[MAX] = mL ||
|
|
1484
|
+
if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number");
|
|
1485
|
+
this[MAX] = mL || Infinity;
|
|
1486
|
+
trim(this);
|
|
948
1487
|
}
|
|
949
1488
|
get max() {
|
|
950
1489
|
return this[MAX];
|
|
@@ -956,17 +1495,24 @@ var __webpack_modules__ = {
|
|
|
956
1495
|
return this[ALLOW_STALE];
|
|
957
1496
|
}
|
|
958
1497
|
set maxAge(mA) {
|
|
959
|
-
if ("number"
|
|
960
|
-
this[MAX_AGE] = mA
|
|
1498
|
+
if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number");
|
|
1499
|
+
this[MAX_AGE] = mA;
|
|
1500
|
+
trim(this);
|
|
961
1501
|
}
|
|
962
1502
|
get maxAge() {
|
|
963
1503
|
return this[MAX_AGE];
|
|
964
1504
|
}
|
|
965
1505
|
set lengthCalculator(lC) {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1506
|
+
if (typeof lC !== "function") lC = naiveLength;
|
|
1507
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
1508
|
+
this[LENGTH_CALCULATOR] = lC;
|
|
1509
|
+
this[LENGTH] = 0;
|
|
1510
|
+
this[LRU_LIST].forEach((hit => {
|
|
1511
|
+
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
1512
|
+
this[LENGTH] += hit.length;
|
|
1513
|
+
}));
|
|
1514
|
+
}
|
|
1515
|
+
trim(this);
|
|
970
1516
|
}
|
|
971
1517
|
get lengthCalculator() {
|
|
972
1518
|
return this[LENGTH_CALCULATOR];
|
|
@@ -979,16 +1525,18 @@ var __webpack_modules__ = {
|
|
|
979
1525
|
}
|
|
980
1526
|
rforEach(fn, thisp) {
|
|
981
1527
|
thisp = thisp || this;
|
|
982
|
-
for (let walker = this[LRU_LIST].tail;
|
|
1528
|
+
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
|
|
983
1529
|
const prev = walker.prev;
|
|
984
|
-
forEachStep(this, fn, walker, thisp)
|
|
1530
|
+
forEachStep(this, fn, walker, thisp);
|
|
1531
|
+
walker = prev;
|
|
985
1532
|
}
|
|
986
1533
|
}
|
|
987
1534
|
forEach(fn, thisp) {
|
|
988
1535
|
thisp = thisp || this;
|
|
989
|
-
for (let walker = this[LRU_LIST].head;
|
|
1536
|
+
for (let walker = this[LRU_LIST].head; walker !== null; ) {
|
|
990
1537
|
const next = walker.next;
|
|
991
|
-
forEachStep(this, fn, walker, thisp)
|
|
1538
|
+
forEachStep(this, fn, walker, thisp);
|
|
1539
|
+
walker = next;
|
|
992
1540
|
}
|
|
993
1541
|
}
|
|
994
1542
|
keys() {
|
|
@@ -998,11 +1546,15 @@ var __webpack_modules__ = {
|
|
|
998
1546
|
return this[LRU_LIST].toArray().map((k => k.value));
|
|
999
1547
|
}
|
|
1000
1548
|
reset() {
|
|
1001
|
-
this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length
|
|
1002
|
-
|
|
1549
|
+
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
|
1550
|
+
this[LRU_LIST].forEach((hit => this[DISPOSE](hit.key, hit.value)));
|
|
1551
|
+
}
|
|
1552
|
+
this[CACHE] = new Map;
|
|
1553
|
+
this[LRU_LIST] = new Yallist;
|
|
1554
|
+
this[LENGTH] = 0;
|
|
1003
1555
|
}
|
|
1004
1556
|
dump() {
|
|
1005
|
-
return this[LRU_LIST].map((hit =>
|
|
1557
|
+
return this[LRU_LIST].map((hit => isStale(this, hit) ? false : {
|
|
1006
1558
|
k: hit.key,
|
|
1007
1559
|
v: hit.value,
|
|
1008
1560
|
e: hit.now + (hit.maxAge || 0)
|
|
@@ -1012,34 +1564,56 @@ var __webpack_modules__ = {
|
|
|
1012
1564
|
return this[LRU_LIST];
|
|
1013
1565
|
}
|
|
1014
1566
|
set(key, value, maxAge) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1567
|
+
maxAge = maxAge || this[MAX_AGE];
|
|
1568
|
+
if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
1569
|
+
const now = maxAge ? Date.now() : 0;
|
|
1570
|
+
const len = this[LENGTH_CALCULATOR](value, key);
|
|
1017
1571
|
if (this[CACHE].has(key)) {
|
|
1018
|
-
if (len > this[MAX])
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1572
|
+
if (len > this[MAX]) {
|
|
1573
|
+
del(this, this[CACHE].get(key));
|
|
1574
|
+
return false;
|
|
1575
|
+
}
|
|
1576
|
+
const node = this[CACHE].get(key);
|
|
1577
|
+
const item = node.value;
|
|
1578
|
+
if (this[DISPOSE]) {
|
|
1579
|
+
if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
|
|
1580
|
+
}
|
|
1581
|
+
item.now = now;
|
|
1582
|
+
item.maxAge = maxAge;
|
|
1583
|
+
item.value = value;
|
|
1584
|
+
this[LENGTH] += len - item.length;
|
|
1585
|
+
item.length = len;
|
|
1586
|
+
this.get(key);
|
|
1587
|
+
trim(this);
|
|
1588
|
+
return true;
|
|
1023
1589
|
}
|
|
1024
1590
|
const hit = new Entry(key, value, len, now, maxAge);
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1591
|
+
if (hit.length > this[MAX]) {
|
|
1592
|
+
if (this[DISPOSE]) this[DISPOSE](key, value);
|
|
1593
|
+
return false;
|
|
1594
|
+
}
|
|
1595
|
+
this[LENGTH] += hit.length;
|
|
1596
|
+
this[LRU_LIST].unshift(hit);
|
|
1597
|
+
this[CACHE].set(key, this[LRU_LIST].head);
|
|
1598
|
+
trim(this);
|
|
1599
|
+
return true;
|
|
1028
1600
|
}
|
|
1029
1601
|
has(key) {
|
|
1030
|
-
if (!this[CACHE].has(key)) return
|
|
1602
|
+
if (!this[CACHE].has(key)) return false;
|
|
1031
1603
|
const hit = this[CACHE].get(key).value;
|
|
1032
1604
|
return !isStale(this, hit);
|
|
1033
1605
|
}
|
|
1034
1606
|
get(key) {
|
|
1035
|
-
return get(this, key,
|
|
1607
|
+
return get(this, key, true);
|
|
1036
1608
|
}
|
|
1037
1609
|
peek(key) {
|
|
1038
|
-
return get(this, key,
|
|
1610
|
+
return get(this, key, false);
|
|
1039
1611
|
}
|
|
1040
1612
|
pop() {
|
|
1041
1613
|
const node = this[LRU_LIST].tail;
|
|
1042
|
-
|
|
1614
|
+
if (!node) return null;
|
|
1615
|
+
del(this, node);
|
|
1616
|
+
return node.value;
|
|
1043
1617
|
}
|
|
1044
1618
|
del(key) {
|
|
1045
1619
|
del(this, this[CACHE].get(key));
|
|
@@ -1048,17 +1622,77 @@ var __webpack_modules__ = {
|
|
|
1048
1622
|
this.reset();
|
|
1049
1623
|
const now = Date.now();
|
|
1050
1624
|
for (let l = arr.length - 1; l >= 0; l--) {
|
|
1051
|
-
const hit = arr[l]
|
|
1052
|
-
|
|
1625
|
+
const hit = arr[l];
|
|
1626
|
+
const expiresAt = hit.e || 0;
|
|
1627
|
+
if (expiresAt === 0) this.set(hit.k, hit.v); else {
|
|
1053
1628
|
const maxAge = expiresAt - now;
|
|
1054
|
-
maxAge > 0
|
|
1629
|
+
if (maxAge > 0) {
|
|
1630
|
+
this.set(hit.k, hit.v, maxAge);
|
|
1631
|
+
}
|
|
1055
1632
|
}
|
|
1056
1633
|
}
|
|
1057
1634
|
}
|
|
1058
1635
|
prune() {
|
|
1059
|
-
this[CACHE].forEach(((value, key) => get(this, key,
|
|
1636
|
+
this[CACHE].forEach(((value, key) => get(this, key, false)));
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
const get = (self, key, doUse) => {
|
|
1640
|
+
const node = self[CACHE].get(key);
|
|
1641
|
+
if (node) {
|
|
1642
|
+
const hit = node.value;
|
|
1643
|
+
if (isStale(self, hit)) {
|
|
1644
|
+
del(self, node);
|
|
1645
|
+
if (!self[ALLOW_STALE]) return undefined;
|
|
1646
|
+
} else {
|
|
1647
|
+
if (doUse) {
|
|
1648
|
+
if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
|
|
1649
|
+
self[LRU_LIST].unshiftNode(node);
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
return hit.value;
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
const isStale = (self, hit) => {
|
|
1656
|
+
if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
|
|
1657
|
+
const diff = Date.now() - hit.now;
|
|
1658
|
+
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
|
|
1659
|
+
};
|
|
1660
|
+
const trim = self => {
|
|
1661
|
+
if (self[LENGTH] > self[MAX]) {
|
|
1662
|
+
for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) {
|
|
1663
|
+
const prev = walker.prev;
|
|
1664
|
+
del(self, walker);
|
|
1665
|
+
walker = prev;
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
const del = (self, node) => {
|
|
1670
|
+
if (node) {
|
|
1671
|
+
const hit = node.value;
|
|
1672
|
+
if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
|
|
1673
|
+
self[LENGTH] -= hit.length;
|
|
1674
|
+
self[CACHE].delete(hit.key);
|
|
1675
|
+
self[LRU_LIST].removeNode(node);
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1678
|
+
class Entry {
|
|
1679
|
+
constructor(key, value, length, now, maxAge) {
|
|
1680
|
+
this.key = key;
|
|
1681
|
+
this.value = value;
|
|
1682
|
+
this.length = length;
|
|
1683
|
+
this.now = now;
|
|
1684
|
+
this.maxAge = maxAge || 0;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
const forEachStep = (self, fn, node, thisp) => {
|
|
1688
|
+
let hit = node.value;
|
|
1689
|
+
if (isStale(self, hit)) {
|
|
1690
|
+
del(self, node);
|
|
1691
|
+
if (!self[ALLOW_STALE]) hit = undefined;
|
|
1060
1692
|
}
|
|
1693
|
+
if (hit) fn.call(thisp, hit.value, hit.key, self);
|
|
1061
1694
|
};
|
|
1695
|
+
module.exports = LRUCache;
|
|
1062
1696
|
},
|
|
1063
1697
|
7706: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1064
1698
|
const ANY = Symbol("SemVer ANY");
|
|
@@ -1067,297 +1701,691 @@ var __webpack_modules__ = {
|
|
|
1067
1701
|
return ANY;
|
|
1068
1702
|
}
|
|
1069
1703
|
constructor(comp, options) {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
comp
|
|
1704
|
+
options = parseOptions(options);
|
|
1705
|
+
if (comp instanceof Comparator) {
|
|
1706
|
+
if (comp.loose === !!options.loose) {
|
|
1707
|
+
return comp;
|
|
1708
|
+
} else {
|
|
1709
|
+
comp = comp.value;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
debug("comparator", comp, options);
|
|
1713
|
+
this.options = options;
|
|
1714
|
+
this.loose = !!options.loose;
|
|
1715
|
+
this.parse(comp);
|
|
1716
|
+
if (this.semver === ANY) {
|
|
1717
|
+
this.value = "";
|
|
1718
|
+
} else {
|
|
1719
|
+
this.value = this.operator + this.semver.version;
|
|
1073
1720
|
}
|
|
1074
|
-
debug("comparator", comp, options), this.options = options, this.loose = !!options.loose,
|
|
1075
|
-
this.parse(comp), this.semver === ANY ? this.value = "" : this.value = this.operator + this.semver.version,
|
|
1076
1721
|
debug("comp", this);
|
|
1077
1722
|
}
|
|
1078
1723
|
parse(comp) {
|
|
1079
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1724
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1725
|
+
const m = comp.match(r);
|
|
1726
|
+
if (!m) {
|
|
1727
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
1728
|
+
}
|
|
1729
|
+
this.operator = m[1] !== undefined ? m[1] : "";
|
|
1730
|
+
if (this.operator === "=") {
|
|
1731
|
+
this.operator = "";
|
|
1732
|
+
}
|
|
1733
|
+
if (!m[2]) {
|
|
1734
|
+
this.semver = ANY;
|
|
1735
|
+
} else {
|
|
1736
|
+
this.semver = new SemVer(m[2], this.options.loose);
|
|
1737
|
+
}
|
|
1083
1738
|
}
|
|
1084
1739
|
toString() {
|
|
1085
1740
|
return this.value;
|
|
1086
1741
|
}
|
|
1087
1742
|
test(version) {
|
|
1088
|
-
|
|
1089
|
-
if (
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1743
|
+
debug("Comparator.test", version, this.options.loose);
|
|
1744
|
+
if (this.semver === ANY || version === ANY) {
|
|
1745
|
+
return true;
|
|
1746
|
+
}
|
|
1747
|
+
if (typeof version === "string") {
|
|
1748
|
+
try {
|
|
1749
|
+
version = new SemVer(version, this.options);
|
|
1750
|
+
} catch (er) {
|
|
1751
|
+
return false;
|
|
1752
|
+
}
|
|
1093
1753
|
}
|
|
1094
1754
|
return cmp(version, this.operator, this.semver, this.options);
|
|
1095
1755
|
}
|
|
1096
1756
|
intersects(comp, options) {
|
|
1097
|
-
if (!(comp instanceof Comparator))
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1757
|
+
if (!(comp instanceof Comparator)) {
|
|
1758
|
+
throw new TypeError("a Comparator is required");
|
|
1759
|
+
}
|
|
1760
|
+
if (!options || typeof options !== "object") {
|
|
1761
|
+
options = {
|
|
1762
|
+
loose: !!options,
|
|
1763
|
+
includePrerelease: false
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
if (this.operator === "") {
|
|
1767
|
+
if (this.value === "") {
|
|
1768
|
+
return true;
|
|
1769
|
+
}
|
|
1770
|
+
return new Range(comp.value, options).test(this.value);
|
|
1771
|
+
} else if (comp.operator === "") {
|
|
1772
|
+
if (comp.value === "") {
|
|
1773
|
+
return true;
|
|
1774
|
+
}
|
|
1775
|
+
return new Range(this.value, options).test(comp.semver);
|
|
1776
|
+
}
|
|
1777
|
+
const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
|
|
1778
|
+
const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
|
|
1779
|
+
const sameSemVer = this.semver.version === comp.semver.version;
|
|
1780
|
+
const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
|
|
1781
|
+
const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
|
|
1782
|
+
const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
|
|
1104
1783
|
return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
|
|
1105
1784
|
}
|
|
1106
1785
|
}
|
|
1107
1786
|
module.exports = Comparator;
|
|
1108
|
-
const parseOptions = __webpack_require__(3867)
|
|
1787
|
+
const parseOptions = __webpack_require__(3867);
|
|
1788
|
+
const {re, t} = __webpack_require__(9541);
|
|
1789
|
+
const cmp = __webpack_require__(1918);
|
|
1790
|
+
const debug = __webpack_require__(5432);
|
|
1791
|
+
const SemVer = __webpack_require__(3013);
|
|
1792
|
+
const Range = __webpack_require__(6833);
|
|
1109
1793
|
},
|
|
1110
1794
|
6833: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1111
1795
|
class Range {
|
|
1112
1796
|
constructor(range, options) {
|
|
1113
|
-
|
|
1114
|
-
if (range instanceof
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1797
|
+
options = parseOptions(options);
|
|
1798
|
+
if (range instanceof Range) {
|
|
1799
|
+
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
1800
|
+
return range;
|
|
1801
|
+
} else {
|
|
1802
|
+
return new Range(range.raw, options);
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
if (range instanceof Comparator) {
|
|
1806
|
+
this.raw = range.value;
|
|
1807
|
+
this.set = [ [ range ] ];
|
|
1808
|
+
this.format();
|
|
1809
|
+
return this;
|
|
1810
|
+
}
|
|
1811
|
+
this.options = options;
|
|
1812
|
+
this.loose = !!options.loose;
|
|
1813
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
1814
|
+
this.raw = range;
|
|
1815
|
+
this.set = range.split("||").map((r => this.parseRange(r.trim()))).filter((c => c.length));
|
|
1816
|
+
if (!this.set.length) {
|
|
1817
|
+
throw new TypeError(`Invalid SemVer Range: ${range}`);
|
|
1818
|
+
}
|
|
1819
|
+
if (this.set.length > 1) {
|
|
1820
|
+
const first = this.set[0];
|
|
1821
|
+
this.set = this.set.filter((c => !isNullSet(c[0])));
|
|
1822
|
+
if (this.set.length === 0) {
|
|
1823
|
+
this.set = [ first ];
|
|
1824
|
+
} else if (this.set.length > 1) {
|
|
1825
|
+
for (const c of this.set) {
|
|
1826
|
+
if (c.length === 1 && isAny(c[0])) {
|
|
1827
|
+
this.set = [ c ];
|
|
1828
|
+
break;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1124
1831
|
}
|
|
1125
1832
|
}
|
|
1126
1833
|
this.format();
|
|
1127
1834
|
}
|
|
1128
1835
|
format() {
|
|
1129
|
-
|
|
1130
|
-
this.range;
|
|
1836
|
+
this.range = this.set.map((comps => comps.join(" ").trim())).join("||").trim();
|
|
1837
|
+
return this.range;
|
|
1131
1838
|
}
|
|
1132
1839
|
toString() {
|
|
1133
1840
|
return this.range;
|
|
1134
1841
|
}
|
|
1135
1842
|
parseRange(range) {
|
|
1136
1843
|
range = range.trim();
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
loose
|
|
1144
|
-
|
|
1145
|
-
|
|
1844
|
+
const memoOpts = Object.keys(this.options).join(",");
|
|
1845
|
+
const memoKey = `parseRange:${memoOpts}:${range}`;
|
|
1846
|
+
const cached = cache.get(memoKey);
|
|
1847
|
+
if (cached) {
|
|
1848
|
+
return cached;
|
|
1849
|
+
}
|
|
1850
|
+
const loose = this.options.loose;
|
|
1851
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
1852
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
1853
|
+
debug("hyphen replace", range);
|
|
1854
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
1855
|
+
debug("comparator trim", range);
|
|
1856
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
1857
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
1858
|
+
range = range.split(/\s+/).join(" ");
|
|
1859
|
+
let rangeList = range.split(" ").map((comp => parseComparator(comp, this.options))).join(" ").split(/\s+/).map((comp => replaceGTE0(comp, this.options)));
|
|
1860
|
+
if (loose) {
|
|
1861
|
+
rangeList = rangeList.filter((comp => {
|
|
1862
|
+
debug("loose invalid filter", comp, this.options);
|
|
1863
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
1864
|
+
}));
|
|
1865
|
+
}
|
|
1866
|
+
debug("range list", rangeList);
|
|
1867
|
+
const rangeMap = new Map;
|
|
1868
|
+
const comparators = rangeList.map((comp => new Comparator(comp, this.options)));
|
|
1146
1869
|
for (const comp of comparators) {
|
|
1147
|
-
if (isNullSet(comp))
|
|
1870
|
+
if (isNullSet(comp)) {
|
|
1871
|
+
return [ comp ];
|
|
1872
|
+
}
|
|
1148
1873
|
rangeMap.set(comp.value, comp);
|
|
1149
1874
|
}
|
|
1150
|
-
rangeMap.size > 1 && rangeMap.has("")
|
|
1875
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
1876
|
+
rangeMap.delete("");
|
|
1877
|
+
}
|
|
1151
1878
|
const result = [ ...rangeMap.values() ];
|
|
1152
|
-
|
|
1879
|
+
cache.set(memoKey, result);
|
|
1880
|
+
return result;
|
|
1153
1881
|
}
|
|
1154
1882
|
intersects(range, options) {
|
|
1155
|
-
if (!(range instanceof Range))
|
|
1883
|
+
if (!(range instanceof Range)) {
|
|
1884
|
+
throw new TypeError("a Range is required");
|
|
1885
|
+
}
|
|
1156
1886
|
return this.set.some((thisComparators => isSatisfiable(thisComparators, options) && range.set.some((rangeComparators => isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator => rangeComparators.every((rangeComparator => thisComparator.intersects(rangeComparator, options)))))))));
|
|
1157
1887
|
}
|
|
1158
1888
|
test(version) {
|
|
1159
|
-
if (!version)
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1889
|
+
if (!version) {
|
|
1890
|
+
return false;
|
|
1891
|
+
}
|
|
1892
|
+
if (typeof version === "string") {
|
|
1893
|
+
try {
|
|
1894
|
+
version = new SemVer(version, this.options);
|
|
1895
|
+
} catch (er) {
|
|
1896
|
+
return false;
|
|
1897
|
+
}
|
|
1164
1898
|
}
|
|
1165
|
-
for (let i = 0; i < this.set.length; i++)
|
|
1166
|
-
|
|
1899
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
1900
|
+
if (testSet(this.set[i], version, this.options)) {
|
|
1901
|
+
return true;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
return false;
|
|
1167
1905
|
}
|
|
1168
1906
|
}
|
|
1169
1907
|
module.exports = Range;
|
|
1170
|
-
const
|
|
1908
|
+
const LRU = __webpack_require__(3437);
|
|
1909
|
+
const cache = new LRU({
|
|
1171
1910
|
max: 1e3
|
|
1172
|
-
})
|
|
1173
|
-
|
|
1911
|
+
});
|
|
1912
|
+
const parseOptions = __webpack_require__(3867);
|
|
1913
|
+
const Comparator = __webpack_require__(7706);
|
|
1914
|
+
const debug = __webpack_require__(5432);
|
|
1915
|
+
const SemVer = __webpack_require__(3013);
|
|
1916
|
+
const {re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace} = __webpack_require__(9541);
|
|
1917
|
+
const isNullSet = c => c.value === "<0.0.0-0";
|
|
1918
|
+
const isAny = c => c.value === "";
|
|
1919
|
+
const isSatisfiable = (comparators, options) => {
|
|
1920
|
+
let result = true;
|
|
1174
1921
|
const remainingComparators = comparators.slice();
|
|
1175
1922
|
let testComparator = remainingComparators.pop();
|
|
1176
|
-
|
|
1177
|
-
|
|
1923
|
+
while (result && remainingComparators.length) {
|
|
1924
|
+
result = remainingComparators.every((otherComparator => testComparator.intersects(otherComparator, options)));
|
|
1925
|
+
testComparator = remainingComparators.pop();
|
|
1926
|
+
}
|
|
1178
1927
|
return result;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1928
|
+
};
|
|
1929
|
+
const parseComparator = (comp, options) => {
|
|
1930
|
+
debug("comp", comp, options);
|
|
1931
|
+
comp = replaceCarets(comp, options);
|
|
1932
|
+
debug("caret", comp);
|
|
1933
|
+
comp = replaceTildes(comp, options);
|
|
1934
|
+
debug("tildes", comp);
|
|
1935
|
+
comp = replaceXRanges(comp, options);
|
|
1936
|
+
debug("xrange", comp);
|
|
1937
|
+
comp = replaceStars(comp, options);
|
|
1938
|
+
debug("stars", comp);
|
|
1939
|
+
return comp;
|
|
1940
|
+
};
|
|
1941
|
+
const isX = id => !id || id.toLowerCase() === "x" || id === "*";
|
|
1942
|
+
const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c => replaceTilde(c, options))).join(" ");
|
|
1943
|
+
const replaceTilde = (comp, options) => {
|
|
1183
1944
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1184
1945
|
return comp.replace(r, ((_, M, m, p, pr) => {
|
|
1946
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
1185
1947
|
let ret;
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1948
|
+
if (isX(M)) {
|
|
1949
|
+
ret = "";
|
|
1950
|
+
} else if (isX(m)) {
|
|
1951
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1952
|
+
} else if (isX(p)) {
|
|
1953
|
+
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
1954
|
+
} else if (pr) {
|
|
1955
|
+
debug("replaceTilde pr", pr);
|
|
1956
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1957
|
+
} else {
|
|
1958
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1959
|
+
}
|
|
1960
|
+
debug("tilde return", ret);
|
|
1961
|
+
return ret;
|
|
1189
1962
|
}));
|
|
1190
|
-
}
|
|
1963
|
+
};
|
|
1964
|
+
const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c => replaceCaret(c, options))).join(" ");
|
|
1965
|
+
const replaceCaret = (comp, options) => {
|
|
1191
1966
|
debug("caret", comp, options);
|
|
1192
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
|
1967
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
1968
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
1193
1969
|
return comp.replace(r, ((_, M, m, p, pr) => {
|
|
1970
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
1194
1971
|
let ret;
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1972
|
+
if (isX(M)) {
|
|
1973
|
+
ret = "";
|
|
1974
|
+
} else if (isX(m)) {
|
|
1975
|
+
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
1976
|
+
} else if (isX(p)) {
|
|
1977
|
+
if (M === "0") {
|
|
1978
|
+
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
1979
|
+
} else {
|
|
1980
|
+
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
1981
|
+
}
|
|
1982
|
+
} else if (pr) {
|
|
1983
|
+
debug("replaceCaret pr", pr);
|
|
1984
|
+
if (M === "0") {
|
|
1985
|
+
if (m === "0") {
|
|
1986
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
1987
|
+
} else {
|
|
1988
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1989
|
+
}
|
|
1990
|
+
} else {
|
|
1991
|
+
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
1992
|
+
}
|
|
1993
|
+
} else {
|
|
1994
|
+
debug("no pr");
|
|
1995
|
+
if (M === "0") {
|
|
1996
|
+
if (m === "0") {
|
|
1997
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
1998
|
+
} else {
|
|
1999
|
+
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
2000
|
+
}
|
|
2001
|
+
} else {
|
|
2002
|
+
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
debug("caret return", ret);
|
|
2006
|
+
return ret;
|
|
1199
2007
|
}));
|
|
1200
|
-
}
|
|
1201
|
-
|
|
2008
|
+
};
|
|
2009
|
+
const replaceXRanges = (comp, options) => {
|
|
2010
|
+
debug("replaceXRanges", comp, options);
|
|
2011
|
+
return comp.split(/\s+/).map((c => replaceXRange(c, options))).join(" ");
|
|
2012
|
+
};
|
|
2013
|
+
const replaceXRange = (comp, options) => {
|
|
1202
2014
|
comp = comp.trim();
|
|
1203
2015
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1204
2016
|
return comp.replace(r, ((ret, gtlt, M, m, p, pr) => {
|
|
1205
2017
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1206
|
-
const xM = isX(M)
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
2018
|
+
const xM = isX(M);
|
|
2019
|
+
const xm = xM || isX(m);
|
|
2020
|
+
const xp = xm || isX(p);
|
|
2021
|
+
const anyX = xp;
|
|
2022
|
+
if (gtlt === "=" && anyX) {
|
|
2023
|
+
gtlt = "";
|
|
2024
|
+
}
|
|
2025
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
2026
|
+
if (xM) {
|
|
2027
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
2028
|
+
ret = "<0.0.0-0";
|
|
2029
|
+
} else {
|
|
2030
|
+
ret = "*";
|
|
2031
|
+
}
|
|
2032
|
+
} else if (gtlt && anyX) {
|
|
2033
|
+
if (xm) {
|
|
2034
|
+
m = 0;
|
|
2035
|
+
}
|
|
2036
|
+
p = 0;
|
|
2037
|
+
if (gtlt === ">") {
|
|
2038
|
+
gtlt = ">=";
|
|
2039
|
+
if (xm) {
|
|
2040
|
+
M = +M + 1;
|
|
2041
|
+
m = 0;
|
|
2042
|
+
p = 0;
|
|
2043
|
+
} else {
|
|
2044
|
+
m = +m + 1;
|
|
2045
|
+
p = 0;
|
|
2046
|
+
}
|
|
2047
|
+
} else if (gtlt === "<=") {
|
|
2048
|
+
gtlt = "<";
|
|
2049
|
+
if (xm) {
|
|
2050
|
+
M = +M + 1;
|
|
2051
|
+
} else {
|
|
2052
|
+
m = +m + 1;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
if (gtlt === "<") {
|
|
2056
|
+
pr = "-0";
|
|
2057
|
+
}
|
|
2058
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
2059
|
+
} else if (xm) {
|
|
2060
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
2061
|
+
} else if (xp) {
|
|
2062
|
+
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
2063
|
+
}
|
|
2064
|
+
debug("xRange return", ret);
|
|
2065
|
+
return ret;
|
|
1213
2066
|
}));
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
|
|
2067
|
+
};
|
|
2068
|
+
const replaceStars = (comp, options) => {
|
|
2069
|
+
debug("replaceStars", comp, options);
|
|
2070
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
2071
|
+
};
|
|
2072
|
+
const replaceGTE0 = (comp, options) => {
|
|
2073
|
+
debug("replaceGTE0", comp, options);
|
|
2074
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
2075
|
+
};
|
|
2076
|
+
const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
|
|
2077
|
+
if (isX(fM)) {
|
|
2078
|
+
from = "";
|
|
2079
|
+
} else if (isX(fm)) {
|
|
2080
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
2081
|
+
} else if (isX(fp)) {
|
|
2082
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
2083
|
+
} else if (fpr) {
|
|
2084
|
+
from = `>=${from}`;
|
|
2085
|
+
} else {
|
|
2086
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
2087
|
+
}
|
|
2088
|
+
if (isX(tM)) {
|
|
2089
|
+
to = "";
|
|
2090
|
+
} else if (isX(tm)) {
|
|
2091
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
2092
|
+
} else if (isX(tp)) {
|
|
2093
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
2094
|
+
} else if (tpr) {
|
|
2095
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
2096
|
+
} else if (incPr) {
|
|
2097
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
2098
|
+
} else {
|
|
2099
|
+
to = `<=${to}`;
|
|
2100
|
+
}
|
|
2101
|
+
return `${from} ${to}`.trim();
|
|
2102
|
+
};
|
|
2103
|
+
const testSet = (set, version, options) => {
|
|
2104
|
+
for (let i = 0; i < set.length; i++) {
|
|
2105
|
+
if (!set[i].test(version)) {
|
|
2106
|
+
return false;
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
1217
2109
|
if (version.prerelease.length && !options.includePrerelease) {
|
|
1218
|
-
for (let i = 0; i < set.length; i++)
|
|
1219
|
-
|
|
1220
|
-
if (
|
|
2110
|
+
for (let i = 0; i < set.length; i++) {
|
|
2111
|
+
debug(set[i].semver);
|
|
2112
|
+
if (set[i].semver === Comparator.ANY) {
|
|
2113
|
+
continue;
|
|
2114
|
+
}
|
|
2115
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
2116
|
+
const allowed = set[i].semver;
|
|
2117
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
2118
|
+
return true;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
1221
2121
|
}
|
|
1222
|
-
return
|
|
2122
|
+
return false;
|
|
1223
2123
|
}
|
|
1224
|
-
return
|
|
2124
|
+
return true;
|
|
1225
2125
|
};
|
|
1226
2126
|
},
|
|
1227
2127
|
3013: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1228
|
-
const debug = __webpack_require__(5432)
|
|
2128
|
+
const debug = __webpack_require__(5432);
|
|
2129
|
+
const {MAX_LENGTH, MAX_SAFE_INTEGER} = __webpack_require__(9041);
|
|
2130
|
+
const {re, t} = __webpack_require__(9541);
|
|
2131
|
+
const parseOptions = __webpack_require__(3867);
|
|
2132
|
+
const {compareIdentifiers} = __webpack_require__(3650);
|
|
1229
2133
|
class SemVer {
|
|
1230
2134
|
constructor(version, options) {
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
version
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
2135
|
+
options = parseOptions(options);
|
|
2136
|
+
if (version instanceof SemVer) {
|
|
2137
|
+
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
2138
|
+
return version;
|
|
2139
|
+
} else {
|
|
2140
|
+
version = version.version;
|
|
2141
|
+
}
|
|
2142
|
+
} else if (typeof version !== "string") {
|
|
2143
|
+
throw new TypeError(`Invalid Version: ${version}`);
|
|
2144
|
+
}
|
|
2145
|
+
if (version.length > MAX_LENGTH) {
|
|
2146
|
+
throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
2147
|
+
}
|
|
2148
|
+
debug("SemVer", version, options);
|
|
2149
|
+
this.options = options;
|
|
2150
|
+
this.loose = !!options.loose;
|
|
1237
2151
|
this.includePrerelease = !!options.includePrerelease;
|
|
1238
2152
|
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
1239
|
-
if (!m)
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
2153
|
+
if (!m) {
|
|
2154
|
+
throw new TypeError(`Invalid Version: ${version}`);
|
|
2155
|
+
}
|
|
2156
|
+
this.raw = version;
|
|
2157
|
+
this.major = +m[1];
|
|
2158
|
+
this.minor = +m[2];
|
|
2159
|
+
this.patch = +m[3];
|
|
2160
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
2161
|
+
throw new TypeError("Invalid major version");
|
|
2162
|
+
}
|
|
2163
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
2164
|
+
throw new TypeError("Invalid minor version");
|
|
2165
|
+
}
|
|
2166
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
2167
|
+
throw new TypeError("Invalid patch version");
|
|
2168
|
+
}
|
|
2169
|
+
if (!m[4]) {
|
|
2170
|
+
this.prerelease = [];
|
|
2171
|
+
} else {
|
|
2172
|
+
this.prerelease = m[4].split(".").map((id => {
|
|
2173
|
+
if (/^[0-9]+$/.test(id)) {
|
|
2174
|
+
const num = +id;
|
|
2175
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
2176
|
+
return num;
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
return id;
|
|
2180
|
+
}));
|
|
2181
|
+
}
|
|
2182
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
2183
|
+
this.format();
|
|
1251
2184
|
}
|
|
1252
2185
|
format() {
|
|
1253
|
-
|
|
1254
|
-
this.
|
|
2186
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
2187
|
+
if (this.prerelease.length) {
|
|
2188
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
2189
|
+
}
|
|
2190
|
+
return this.version;
|
|
1255
2191
|
}
|
|
1256
2192
|
toString() {
|
|
1257
2193
|
return this.version;
|
|
1258
2194
|
}
|
|
1259
2195
|
compare(other) {
|
|
1260
|
-
|
|
1261
|
-
|
|
2196
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
2197
|
+
if (!(other instanceof SemVer)) {
|
|
2198
|
+
if (typeof other === "string" && other === this.version) {
|
|
2199
|
+
return 0;
|
|
2200
|
+
}
|
|
1262
2201
|
other = new SemVer(other, this.options);
|
|
1263
2202
|
}
|
|
1264
|
-
|
|
2203
|
+
if (other.version === this.version) {
|
|
2204
|
+
return 0;
|
|
2205
|
+
}
|
|
2206
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
1265
2207
|
}
|
|
1266
2208
|
compareMain(other) {
|
|
1267
|
-
|
|
2209
|
+
if (!(other instanceof SemVer)) {
|
|
2210
|
+
other = new SemVer(other, this.options);
|
|
2211
|
+
}
|
|
2212
|
+
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
1268
2213
|
}
|
|
1269
2214
|
comparePre(other) {
|
|
1270
|
-
if (other instanceof SemVer
|
|
1271
|
-
|
|
1272
|
-
|
|
2215
|
+
if (!(other instanceof SemVer)) {
|
|
2216
|
+
other = new SemVer(other, this.options);
|
|
2217
|
+
}
|
|
2218
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
2219
|
+
return -1;
|
|
2220
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
2221
|
+
return 1;
|
|
2222
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
2223
|
+
return 0;
|
|
2224
|
+
}
|
|
1273
2225
|
let i = 0;
|
|
1274
2226
|
do {
|
|
1275
|
-
const a = this.prerelease[i]
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
if (
|
|
1279
|
-
|
|
2227
|
+
const a = this.prerelease[i];
|
|
2228
|
+
const b = other.prerelease[i];
|
|
2229
|
+
debug("prerelease compare", i, a, b);
|
|
2230
|
+
if (a === undefined && b === undefined) {
|
|
2231
|
+
return 0;
|
|
2232
|
+
} else if (b === undefined) {
|
|
2233
|
+
return 1;
|
|
2234
|
+
} else if (a === undefined) {
|
|
2235
|
+
return -1;
|
|
2236
|
+
} else if (a === b) {
|
|
2237
|
+
continue;
|
|
2238
|
+
} else {
|
|
2239
|
+
return compareIdentifiers(a, b);
|
|
2240
|
+
}
|
|
1280
2241
|
} while (++i);
|
|
1281
2242
|
}
|
|
1282
2243
|
compareBuild(other) {
|
|
1283
|
-
|
|
2244
|
+
if (!(other instanceof SemVer)) {
|
|
2245
|
+
other = new SemVer(other, this.options);
|
|
2246
|
+
}
|
|
1284
2247
|
let i = 0;
|
|
1285
2248
|
do {
|
|
1286
|
-
const a = this.build[i]
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
if (
|
|
1290
|
-
|
|
2249
|
+
const a = this.build[i];
|
|
2250
|
+
const b = other.build[i];
|
|
2251
|
+
debug("prerelease compare", i, a, b);
|
|
2252
|
+
if (a === undefined && b === undefined) {
|
|
2253
|
+
return 0;
|
|
2254
|
+
} else if (b === undefined) {
|
|
2255
|
+
return 1;
|
|
2256
|
+
} else if (a === undefined) {
|
|
2257
|
+
return -1;
|
|
2258
|
+
} else if (a === b) {
|
|
2259
|
+
continue;
|
|
2260
|
+
} else {
|
|
2261
|
+
return compareIdentifiers(a, b);
|
|
2262
|
+
}
|
|
1291
2263
|
} while (++i);
|
|
1292
2264
|
}
|
|
1293
2265
|
inc(release, identifier) {
|
|
1294
2266
|
switch (release) {
|
|
1295
2267
|
case "premajor":
|
|
1296
|
-
this.prerelease.length = 0
|
|
2268
|
+
this.prerelease.length = 0;
|
|
2269
|
+
this.patch = 0;
|
|
2270
|
+
this.minor = 0;
|
|
2271
|
+
this.major++;
|
|
2272
|
+
this.inc("pre", identifier);
|
|
1297
2273
|
break;
|
|
1298
2274
|
|
|
1299
2275
|
case "preminor":
|
|
1300
|
-
this.prerelease.length = 0
|
|
2276
|
+
this.prerelease.length = 0;
|
|
2277
|
+
this.patch = 0;
|
|
2278
|
+
this.minor++;
|
|
2279
|
+
this.inc("pre", identifier);
|
|
1301
2280
|
break;
|
|
1302
2281
|
|
|
1303
2282
|
case "prepatch":
|
|
1304
|
-
this.prerelease.length = 0
|
|
2283
|
+
this.prerelease.length = 0;
|
|
2284
|
+
this.inc("patch", identifier);
|
|
2285
|
+
this.inc("pre", identifier);
|
|
1305
2286
|
break;
|
|
1306
2287
|
|
|
1307
2288
|
case "prerelease":
|
|
1308
|
-
|
|
2289
|
+
if (this.prerelease.length === 0) {
|
|
2290
|
+
this.inc("patch", identifier);
|
|
2291
|
+
}
|
|
2292
|
+
this.inc("pre", identifier);
|
|
1309
2293
|
break;
|
|
1310
2294
|
|
|
1311
2295
|
case "major":
|
|
1312
|
-
|
|
1313
|
-
|
|
2296
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
2297
|
+
this.major++;
|
|
2298
|
+
}
|
|
2299
|
+
this.minor = 0;
|
|
2300
|
+
this.patch = 0;
|
|
2301
|
+
this.prerelease = [];
|
|
1314
2302
|
break;
|
|
1315
2303
|
|
|
1316
2304
|
case "minor":
|
|
1317
|
-
|
|
2305
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
2306
|
+
this.minor++;
|
|
2307
|
+
}
|
|
2308
|
+
this.patch = 0;
|
|
1318
2309
|
this.prerelease = [];
|
|
1319
2310
|
break;
|
|
1320
2311
|
|
|
1321
2312
|
case "patch":
|
|
1322
|
-
|
|
2313
|
+
if (this.prerelease.length === 0) {
|
|
2314
|
+
this.patch++;
|
|
2315
|
+
}
|
|
2316
|
+
this.prerelease = [];
|
|
1323
2317
|
break;
|
|
1324
2318
|
|
|
1325
2319
|
case "pre":
|
|
1326
|
-
if (
|
|
2320
|
+
if (this.prerelease.length === 0) {
|
|
2321
|
+
this.prerelease = [ 0 ];
|
|
2322
|
+
} else {
|
|
1327
2323
|
let i = this.prerelease.length;
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
2324
|
+
while (--i >= 0) {
|
|
2325
|
+
if (typeof this.prerelease[i] === "number") {
|
|
2326
|
+
this.prerelease[i]++;
|
|
2327
|
+
i = -2;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
if (i === -1) {
|
|
2331
|
+
this.prerelease.push(0);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
if (identifier) {
|
|
2335
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
2336
|
+
if (isNaN(this.prerelease[1])) {
|
|
2337
|
+
this.prerelease = [ identifier, 0 ];
|
|
2338
|
+
}
|
|
2339
|
+
} else {
|
|
2340
|
+
this.prerelease = [ identifier, 0 ];
|
|
2341
|
+
}
|
|
1331
2342
|
}
|
|
1332
|
-
identifier && (0 === compareIdentifiers(this.prerelease[0], identifier) ? isNaN(this.prerelease[1]) && (this.prerelease = [ identifier, 0 ]) : this.prerelease = [ identifier, 0 ]);
|
|
1333
2343
|
break;
|
|
1334
2344
|
|
|
1335
2345
|
default:
|
|
1336
2346
|
throw new Error(`invalid increment argument: ${release}`);
|
|
1337
2347
|
}
|
|
1338
|
-
|
|
2348
|
+
this.format();
|
|
2349
|
+
this.raw = this.version;
|
|
2350
|
+
return this;
|
|
1339
2351
|
}
|
|
1340
2352
|
}
|
|
1341
2353
|
module.exports = SemVer;
|
|
1342
2354
|
},
|
|
1343
2355
|
3470: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1344
2356
|
const parse = __webpack_require__(7507);
|
|
1345
|
-
|
|
2357
|
+
const clean = (version, options) => {
|
|
1346
2358
|
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
1347
2359
|
return s ? s.version : null;
|
|
1348
2360
|
};
|
|
2361
|
+
module.exports = clean;
|
|
1349
2362
|
},
|
|
1350
2363
|
1918: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1351
|
-
const eq = __webpack_require__(8443)
|
|
1352
|
-
|
|
2364
|
+
const eq = __webpack_require__(8443);
|
|
2365
|
+
const neq = __webpack_require__(1017);
|
|
2366
|
+
const gt = __webpack_require__(6077);
|
|
2367
|
+
const gte = __webpack_require__(4578);
|
|
2368
|
+
const lt = __webpack_require__(866);
|
|
2369
|
+
const lte = __webpack_require__(698);
|
|
2370
|
+
const cmp = (a, op, b, loose) => {
|
|
1353
2371
|
switch (op) {
|
|
1354
2372
|
case "===":
|
|
1355
|
-
|
|
1356
|
-
|
|
2373
|
+
if (typeof a === "object") {
|
|
2374
|
+
a = a.version;
|
|
2375
|
+
}
|
|
2376
|
+
if (typeof b === "object") {
|
|
2377
|
+
b = b.version;
|
|
2378
|
+
}
|
|
2379
|
+
return a === b;
|
|
1357
2380
|
|
|
1358
2381
|
case "!==":
|
|
1359
|
-
|
|
1360
|
-
|
|
2382
|
+
if (typeof a === "object") {
|
|
2383
|
+
a = a.version;
|
|
2384
|
+
}
|
|
2385
|
+
if (typeof b === "object") {
|
|
2386
|
+
b = b.version;
|
|
2387
|
+
}
|
|
2388
|
+
return a !== b;
|
|
1361
2389
|
|
|
1362
2390
|
case "":
|
|
1363
2391
|
case "=":
|
|
@@ -1383,145 +2411,216 @@ var __webpack_modules__ = {
|
|
|
1383
2411
|
throw new TypeError(`Invalid operator: ${op}`);
|
|
1384
2412
|
}
|
|
1385
2413
|
};
|
|
2414
|
+
module.exports = cmp;
|
|
1386
2415
|
},
|
|
1387
2416
|
4115: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1388
|
-
const SemVer = __webpack_require__(3013)
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
2417
|
+
const SemVer = __webpack_require__(3013);
|
|
2418
|
+
const parse = __webpack_require__(7507);
|
|
2419
|
+
const {re, t} = __webpack_require__(9541);
|
|
2420
|
+
const coerce = (version, options) => {
|
|
2421
|
+
if (version instanceof SemVer) {
|
|
2422
|
+
return version;
|
|
2423
|
+
}
|
|
2424
|
+
if (typeof version === "number") {
|
|
2425
|
+
version = String(version);
|
|
2426
|
+
}
|
|
2427
|
+
if (typeof version !== "string") {
|
|
2428
|
+
return null;
|
|
2429
|
+
}
|
|
2430
|
+
options = options || {};
|
|
1392
2431
|
let match = null;
|
|
1393
|
-
if (
|
|
2432
|
+
if (!options.rtl) {
|
|
2433
|
+
match = version.match(re[t.COERCE]);
|
|
2434
|
+
} else {
|
|
1394
2435
|
let next;
|
|
1395
|
-
|
|
1396
|
-
|
|
2436
|
+
while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
2437
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
2438
|
+
match = next;
|
|
2439
|
+
}
|
|
2440
|
+
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
|
|
2441
|
+
}
|
|
1397
2442
|
re[t.COERCERTL].lastIndex = -1;
|
|
1398
|
-
}
|
|
1399
|
-
|
|
2443
|
+
}
|
|
2444
|
+
if (match === null) {
|
|
2445
|
+
return null;
|
|
2446
|
+
}
|
|
2447
|
+
return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
|
|
1400
2448
|
};
|
|
2449
|
+
module.exports = coerce;
|
|
1401
2450
|
},
|
|
1402
2451
|
6845: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1403
2452
|
const SemVer = __webpack_require__(3013);
|
|
1404
|
-
|
|
1405
|
-
const versionA = new SemVer(a, loose)
|
|
2453
|
+
const compareBuild = (a, b, loose) => {
|
|
2454
|
+
const versionA = new SemVer(a, loose);
|
|
2455
|
+
const versionB = new SemVer(b, loose);
|
|
1406
2456
|
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
1407
2457
|
};
|
|
2458
|
+
module.exports = compareBuild;
|
|
1408
2459
|
},
|
|
1409
2460
|
2310: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1410
2461
|
const compare = __webpack_require__(2247);
|
|
1411
|
-
|
|
2462
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
2463
|
+
module.exports = compareLoose;
|
|
1412
2464
|
},
|
|
1413
2465
|
2247: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1414
2466
|
const SemVer = __webpack_require__(3013);
|
|
1415
|
-
|
|
2467
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
2468
|
+
module.exports = compare;
|
|
1416
2469
|
},
|
|
1417
2470
|
5209: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1418
|
-
const parse = __webpack_require__(7507)
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
{
|
|
1422
|
-
|
|
1423
|
-
|
|
2471
|
+
const parse = __webpack_require__(7507);
|
|
2472
|
+
const eq = __webpack_require__(8443);
|
|
2473
|
+
const diff = (version1, version2) => {
|
|
2474
|
+
if (eq(version1, version2)) {
|
|
2475
|
+
return null;
|
|
2476
|
+
} else {
|
|
2477
|
+
const v1 = parse(version1);
|
|
2478
|
+
const v2 = parse(version2);
|
|
2479
|
+
const hasPre = v1.prerelease.length || v2.prerelease.length;
|
|
2480
|
+
const prefix = hasPre ? "pre" : "";
|
|
2481
|
+
const defaultResult = hasPre ? "prerelease" : "";
|
|
2482
|
+
for (const key in v1) {
|
|
2483
|
+
if (key === "major" || key === "minor" || key === "patch") {
|
|
2484
|
+
if (v1[key] !== v2[key]) {
|
|
2485
|
+
return prefix + key;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
1424
2489
|
return defaultResult;
|
|
1425
2490
|
}
|
|
1426
2491
|
};
|
|
2492
|
+
module.exports = diff;
|
|
1427
2493
|
},
|
|
1428
2494
|
8443: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1429
2495
|
const compare = __webpack_require__(2247);
|
|
1430
|
-
|
|
2496
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
2497
|
+
module.exports = eq;
|
|
1431
2498
|
},
|
|
1432
2499
|
6077: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1433
2500
|
const compare = __webpack_require__(2247);
|
|
1434
|
-
|
|
2501
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
2502
|
+
module.exports = gt;
|
|
1435
2503
|
},
|
|
1436
2504
|
4578: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1437
2505
|
const compare = __webpack_require__(2247);
|
|
1438
|
-
|
|
2506
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
2507
|
+
module.exports = gte;
|
|
1439
2508
|
},
|
|
1440
2509
|
5210: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1441
2510
|
const SemVer = __webpack_require__(3013);
|
|
1442
|
-
|
|
1443
|
-
|
|
2511
|
+
const inc = (version, release, options, identifier) => {
|
|
2512
|
+
if (typeof options === "string") {
|
|
2513
|
+
identifier = options;
|
|
2514
|
+
options = undefined;
|
|
2515
|
+
}
|
|
1444
2516
|
try {
|
|
1445
2517
|
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier).version;
|
|
1446
2518
|
} catch (er) {
|
|
1447
2519
|
return null;
|
|
1448
2520
|
}
|
|
1449
2521
|
};
|
|
2522
|
+
module.exports = inc;
|
|
1450
2523
|
},
|
|
1451
2524
|
866: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1452
2525
|
const compare = __webpack_require__(2247);
|
|
1453
|
-
|
|
2526
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
2527
|
+
module.exports = lt;
|
|
1454
2528
|
},
|
|
1455
2529
|
698: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1456
2530
|
const compare = __webpack_require__(2247);
|
|
1457
|
-
|
|
2531
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
2532
|
+
module.exports = lte;
|
|
1458
2533
|
},
|
|
1459
2534
|
5847: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1460
2535
|
const SemVer = __webpack_require__(3013);
|
|
1461
|
-
|
|
2536
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
2537
|
+
module.exports = major;
|
|
1462
2538
|
},
|
|
1463
2539
|
1757: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1464
2540
|
const SemVer = __webpack_require__(3013);
|
|
1465
|
-
|
|
2541
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
2542
|
+
module.exports = minor;
|
|
1466
2543
|
},
|
|
1467
2544
|
1017: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1468
2545
|
const compare = __webpack_require__(2247);
|
|
1469
|
-
|
|
2546
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
2547
|
+
module.exports = neq;
|
|
1470
2548
|
},
|
|
1471
2549
|
7507: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1472
|
-
const {MAX_LENGTH} = __webpack_require__(9041)
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
2550
|
+
const {MAX_LENGTH} = __webpack_require__(9041);
|
|
2551
|
+
const {re, t} = __webpack_require__(9541);
|
|
2552
|
+
const SemVer = __webpack_require__(3013);
|
|
2553
|
+
const parseOptions = __webpack_require__(3867);
|
|
2554
|
+
const parse = (version, options) => {
|
|
2555
|
+
options = parseOptions(options);
|
|
2556
|
+
if (version instanceof SemVer) {
|
|
2557
|
+
return version;
|
|
2558
|
+
}
|
|
2559
|
+
if (typeof version !== "string") {
|
|
2560
|
+
return null;
|
|
2561
|
+
}
|
|
2562
|
+
if (version.length > MAX_LENGTH) {
|
|
2563
|
+
return null;
|
|
2564
|
+
}
|
|
2565
|
+
const r = options.loose ? re[t.LOOSE] : re[t.FULL];
|
|
2566
|
+
if (!r.test(version)) {
|
|
2567
|
+
return null;
|
|
2568
|
+
}
|
|
1478
2569
|
try {
|
|
1479
2570
|
return new SemVer(version, options);
|
|
1480
2571
|
} catch (er) {
|
|
1481
2572
|
return null;
|
|
1482
2573
|
}
|
|
1483
2574
|
};
|
|
2575
|
+
module.exports = parse;
|
|
1484
2576
|
},
|
|
1485
2577
|
8150: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1486
2578
|
const SemVer = __webpack_require__(3013);
|
|
1487
|
-
|
|
2579
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
2580
|
+
module.exports = patch;
|
|
1488
2581
|
},
|
|
1489
2582
|
8011: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1490
2583
|
const parse = __webpack_require__(7507);
|
|
1491
|
-
|
|
2584
|
+
const prerelease = (version, options) => {
|
|
1492
2585
|
const parsed = parse(version, options);
|
|
1493
2586
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1494
2587
|
};
|
|
2588
|
+
module.exports = prerelease;
|
|
1495
2589
|
},
|
|
1496
2590
|
9201: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1497
2591
|
const compare = __webpack_require__(2247);
|
|
1498
|
-
|
|
2592
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
2593
|
+
module.exports = rcompare;
|
|
1499
2594
|
},
|
|
1500
2595
|
7391: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1501
2596
|
const compareBuild = __webpack_require__(6845);
|
|
1502
|
-
|
|
2597
|
+
const rsort = (list, loose) => list.sort(((a, b) => compareBuild(b, a, loose)));
|
|
2598
|
+
module.exports = rsort;
|
|
1503
2599
|
},
|
|
1504
2600
|
8915: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1505
2601
|
const Range = __webpack_require__(6833);
|
|
1506
|
-
|
|
2602
|
+
const satisfies = (version, range, options) => {
|
|
1507
2603
|
try {
|
|
1508
2604
|
range = new Range(range, options);
|
|
1509
2605
|
} catch (er) {
|
|
1510
|
-
return
|
|
2606
|
+
return false;
|
|
1511
2607
|
}
|
|
1512
2608
|
return range.test(version);
|
|
1513
2609
|
};
|
|
2610
|
+
module.exports = satisfies;
|
|
1514
2611
|
},
|
|
1515
2612
|
1934: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1516
2613
|
const compareBuild = __webpack_require__(6845);
|
|
1517
|
-
|
|
2614
|
+
const sort = (list, loose) => list.sort(((a, b) => compareBuild(a, b, loose)));
|
|
2615
|
+
module.exports = sort;
|
|
1518
2616
|
},
|
|
1519
2617
|
2555: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1520
2618
|
const parse = __webpack_require__(7507);
|
|
1521
|
-
|
|
2619
|
+
const valid = (version, options) => {
|
|
1522
2620
|
const v = parse(version, options);
|
|
1523
2621
|
return v ? v.version : null;
|
|
1524
2622
|
};
|
|
2623
|
+
module.exports = valid;
|
|
1525
2624
|
},
|
|
1526
2625
|
6027: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1527
2626
|
const internalRe = __webpack_require__(9541);
|
|
@@ -1573,117 +2672,188 @@ var __webpack_modules__ = {
|
|
|
1573
2672
|
};
|
|
1574
2673
|
},
|
|
1575
2674
|
9041: module => {
|
|
2675
|
+
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
2676
|
+
const MAX_LENGTH = 256;
|
|
1576
2677
|
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
2678
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
1577
2679
|
module.exports = {
|
|
1578
|
-
SEMVER_SPEC_VERSION
|
|
1579
|
-
MAX_LENGTH
|
|
2680
|
+
SEMVER_SPEC_VERSION,
|
|
2681
|
+
MAX_LENGTH,
|
|
1580
2682
|
MAX_SAFE_INTEGER,
|
|
1581
|
-
MAX_SAFE_COMPONENT_LENGTH
|
|
2683
|
+
MAX_SAFE_COMPONENT_LENGTH
|
|
1582
2684
|
};
|
|
1583
2685
|
},
|
|
1584
2686
|
5432: module => {
|
|
1585
|
-
const debug = "object"
|
|
2687
|
+
const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
1586
2688
|
module.exports = debug;
|
|
1587
2689
|
},
|
|
1588
2690
|
3650: module => {
|
|
1589
|
-
const numeric = /^[0-9]
|
|
1590
|
-
|
|
1591
|
-
|
|
2691
|
+
const numeric = /^[0-9]+$/;
|
|
2692
|
+
const compareIdentifiers = (a, b) => {
|
|
2693
|
+
const anum = numeric.test(a);
|
|
2694
|
+
const bnum = numeric.test(b);
|
|
2695
|
+
if (anum && bnum) {
|
|
2696
|
+
a = +a;
|
|
2697
|
+
b = +b;
|
|
2698
|
+
}
|
|
2699
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
1592
2700
|
};
|
|
2701
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
1593
2702
|
module.exports = {
|
|
1594
2703
|
compareIdentifiers,
|
|
1595
|
-
rcompareIdentifiers
|
|
2704
|
+
rcompareIdentifiers
|
|
1596
2705
|
};
|
|
1597
2706
|
},
|
|
1598
2707
|
3867: module => {
|
|
1599
2708
|
const opts = [ "includePrerelease", "loose", "rtl" ];
|
|
1600
|
-
|
|
1601
|
-
loose:
|
|
1602
|
-
} : opts.filter((k => options[k])).reduce(((o, k) =>
|
|
2709
|
+
const parseOptions = options => !options ? {} : typeof options !== "object" ? {
|
|
2710
|
+
loose: true
|
|
2711
|
+
} : opts.filter((k => options[k])).reduce(((o, k) => {
|
|
2712
|
+
o[k] = true;
|
|
2713
|
+
return o;
|
|
2714
|
+
}), {});
|
|
2715
|
+
module.exports = parseOptions;
|
|
1603
2716
|
},
|
|
1604
2717
|
9541: (module, exports, __webpack_require__) => {
|
|
1605
|
-
const {MAX_SAFE_COMPONENT_LENGTH} = __webpack_require__(9041)
|
|
2718
|
+
const {MAX_SAFE_COMPONENT_LENGTH} = __webpack_require__(9041);
|
|
2719
|
+
const debug = __webpack_require__(5432);
|
|
2720
|
+
exports = module.exports = {};
|
|
2721
|
+
const re = exports.re = [];
|
|
2722
|
+
const src = exports.src = [];
|
|
2723
|
+
const t = exports.t = {};
|
|
1606
2724
|
let R = 0;
|
|
1607
2725
|
const createToken = (name, value, isGlobal) => {
|
|
1608
2726
|
const index = R++;
|
|
1609
|
-
debug(name, index, value)
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
createToken("
|
|
1615
|
-
createToken("
|
|
1616
|
-
createToken("
|
|
1617
|
-
createToken("
|
|
1618
|
-
createToken("
|
|
1619
|
-
createToken("
|
|
1620
|
-
createToken("
|
|
1621
|
-
createToken("
|
|
1622
|
-
createToken("
|
|
1623
|
-
createToken("
|
|
1624
|
-
createToken("
|
|
1625
|
-
createToken("
|
|
1626
|
-
createToken("
|
|
1627
|
-
createToken("
|
|
1628
|
-
createToken("
|
|
1629
|
-
createToken("
|
|
1630
|
-
createToken("
|
|
1631
|
-
|
|
1632
|
-
createToken("
|
|
1633
|
-
createToken("
|
|
1634
|
-
|
|
1635
|
-
createToken("
|
|
1636
|
-
createToken("
|
|
2727
|
+
debug(name, index, value);
|
|
2728
|
+
t[name] = index;
|
|
2729
|
+
src[index] = value;
|
|
2730
|
+
re[index] = new RegExp(value, isGlobal ? "g" : undefined);
|
|
2731
|
+
};
|
|
2732
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
2733
|
+
createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
|
|
2734
|
+
createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
|
|
2735
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`);
|
|
2736
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
2737
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
2738
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
2739
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
2740
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
2741
|
+
createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
|
|
2742
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
2743
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
2744
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
2745
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
2746
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
2747
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
2748
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
2749
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
2750
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` + `)?)?`);
|
|
2751
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` + `)?)?`);
|
|
2752
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
2753
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2754
|
+
createToken("COERCE", `${"(^|[^\\d])" + "(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:$|[^\\d])`);
|
|
2755
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
2756
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
2757
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
2758
|
+
exports.tildeTrimReplace = "$1~";
|
|
2759
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
2760
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2761
|
+
createToken("LONECARET", "(?:\\^)");
|
|
2762
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
2763
|
+
exports.caretTrimReplace = "$1^";
|
|
2764
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
2765
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
2766
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
2767
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
2768
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
2769
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
2770
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`);
|
|
2771
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`);
|
|
2772
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
2773
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
1637
2774
|
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
1638
2775
|
},
|
|
1639
2776
|
4933: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1640
2777
|
const outside = __webpack_require__(939);
|
|
1641
|
-
|
|
2778
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
2779
|
+
module.exports = gtr;
|
|
1642
2780
|
},
|
|
1643
2781
|
8842: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1644
2782
|
const Range = __webpack_require__(6833);
|
|
1645
|
-
|
|
1646
|
-
|
|
2783
|
+
const intersects = (r1, r2, options) => {
|
|
2784
|
+
r1 = new Range(r1, options);
|
|
2785
|
+
r2 = new Range(r2, options);
|
|
2786
|
+
return r1.intersects(r2);
|
|
2787
|
+
};
|
|
2788
|
+
module.exports = intersects;
|
|
1647
2789
|
},
|
|
1648
2790
|
7233: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1649
2791
|
const outside = __webpack_require__(939);
|
|
1650
|
-
|
|
2792
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
2793
|
+
module.exports = ltr;
|
|
1651
2794
|
},
|
|
1652
2795
|
1678: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1653
|
-
const SemVer = __webpack_require__(3013)
|
|
1654
|
-
|
|
1655
|
-
|
|
2796
|
+
const SemVer = __webpack_require__(3013);
|
|
2797
|
+
const Range = __webpack_require__(6833);
|
|
2798
|
+
const maxSatisfying = (versions, range, options) => {
|
|
2799
|
+
let max = null;
|
|
2800
|
+
let maxSV = null;
|
|
2801
|
+
let rangeObj = null;
|
|
1656
2802
|
try {
|
|
1657
2803
|
rangeObj = new Range(range, options);
|
|
1658
2804
|
} catch (er) {
|
|
1659
2805
|
return null;
|
|
1660
2806
|
}
|
|
1661
|
-
|
|
1662
|
-
rangeObj.test(v)
|
|
1663
|
-
|
|
2807
|
+
versions.forEach((v => {
|
|
2808
|
+
if (rangeObj.test(v)) {
|
|
2809
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
2810
|
+
max = v;
|
|
2811
|
+
maxSV = new SemVer(max, options);
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
}));
|
|
2815
|
+
return max;
|
|
1664
2816
|
};
|
|
2817
|
+
module.exports = maxSatisfying;
|
|
1665
2818
|
},
|
|
1666
2819
|
1553: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1667
|
-
const SemVer = __webpack_require__(3013)
|
|
1668
|
-
|
|
1669
|
-
|
|
2820
|
+
const SemVer = __webpack_require__(3013);
|
|
2821
|
+
const Range = __webpack_require__(6833);
|
|
2822
|
+
const minSatisfying = (versions, range, options) => {
|
|
2823
|
+
let min = null;
|
|
2824
|
+
let minSV = null;
|
|
2825
|
+
let rangeObj = null;
|
|
1670
2826
|
try {
|
|
1671
2827
|
rangeObj = new Range(range, options);
|
|
1672
2828
|
} catch (er) {
|
|
1673
2829
|
return null;
|
|
1674
2830
|
}
|
|
1675
|
-
|
|
1676
|
-
rangeObj.test(v)
|
|
1677
|
-
|
|
2831
|
+
versions.forEach((v => {
|
|
2832
|
+
if (rangeObj.test(v)) {
|
|
2833
|
+
if (!min || minSV.compare(v) === 1) {
|
|
2834
|
+
min = v;
|
|
2835
|
+
minSV = new SemVer(min, options);
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
}));
|
|
2839
|
+
return min;
|
|
1678
2840
|
};
|
|
2841
|
+
module.exports = minSatisfying;
|
|
1679
2842
|
},
|
|
1680
2843
|
2262: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1681
|
-
const SemVer = __webpack_require__(3013)
|
|
1682
|
-
|
|
2844
|
+
const SemVer = __webpack_require__(3013);
|
|
2845
|
+
const Range = __webpack_require__(6833);
|
|
2846
|
+
const gt = __webpack_require__(6077);
|
|
2847
|
+
const minVersion = (range, loose) => {
|
|
1683
2848
|
range = new Range(range, loose);
|
|
1684
2849
|
let minver = new SemVer("0.0.0");
|
|
1685
|
-
if (range.test(minver))
|
|
1686
|
-
|
|
2850
|
+
if (range.test(minver)) {
|
|
2851
|
+
return minver;
|
|
2852
|
+
}
|
|
2853
|
+
minver = new SemVer("0.0.0-0");
|
|
2854
|
+
if (range.test(minver)) {
|
|
2855
|
+
return minver;
|
|
2856
|
+
}
|
|
1687
2857
|
minver = null;
|
|
1688
2858
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1689
2859
|
const comparators = range.set[i];
|
|
@@ -1692,12 +2862,18 @@ var __webpack_modules__ = {
|
|
|
1692
2862
|
const compver = new SemVer(comparator.semver.version);
|
|
1693
2863
|
switch (comparator.operator) {
|
|
1694
2864
|
case ">":
|
|
1695
|
-
|
|
2865
|
+
if (compver.prerelease.length === 0) {
|
|
2866
|
+
compver.patch++;
|
|
2867
|
+
} else {
|
|
2868
|
+
compver.prerelease.push(0);
|
|
2869
|
+
}
|
|
1696
2870
|
compver.raw = compver.format();
|
|
1697
2871
|
|
|
1698
2872
|
case "":
|
|
1699
2873
|
case ">=":
|
|
1700
|
-
setMin
|
|
2874
|
+
if (!setMin || gt(compver, setMin)) {
|
|
2875
|
+
setMin = compver;
|
|
2876
|
+
}
|
|
1701
2877
|
break;
|
|
1702
2878
|
|
|
1703
2879
|
case "<":
|
|
@@ -1707,162 +2883,368 @@ var __webpack_modules__ = {
|
|
|
1707
2883
|
default:
|
|
1708
2884
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1709
2885
|
}
|
|
1710
|
-
}))
|
|
2886
|
+
}));
|
|
2887
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
2888
|
+
minver = setMin;
|
|
2889
|
+
}
|
|
1711
2890
|
}
|
|
1712
|
-
|
|
2891
|
+
if (minver && range.test(minver)) {
|
|
2892
|
+
return minver;
|
|
2893
|
+
}
|
|
2894
|
+
return null;
|
|
1713
2895
|
};
|
|
2896
|
+
module.exports = minVersion;
|
|
1714
2897
|
},
|
|
1715
2898
|
939: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1716
|
-
const SemVer = __webpack_require__(3013)
|
|
1717
|
-
|
|
2899
|
+
const SemVer = __webpack_require__(3013);
|
|
2900
|
+
const Comparator = __webpack_require__(7706);
|
|
2901
|
+
const {ANY} = Comparator;
|
|
2902
|
+
const Range = __webpack_require__(6833);
|
|
2903
|
+
const satisfies = __webpack_require__(8915);
|
|
2904
|
+
const gt = __webpack_require__(6077);
|
|
2905
|
+
const lt = __webpack_require__(866);
|
|
2906
|
+
const lte = __webpack_require__(698);
|
|
2907
|
+
const gte = __webpack_require__(4578);
|
|
2908
|
+
const outside = (version, range, hilo, options) => {
|
|
2909
|
+
version = new SemVer(version, options);
|
|
2910
|
+
range = new Range(range, options);
|
|
1718
2911
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1719
|
-
switch (
|
|
1720
|
-
hilo) {
|
|
2912
|
+
switch (hilo) {
|
|
1721
2913
|
case ">":
|
|
1722
|
-
gtfn = gt
|
|
2914
|
+
gtfn = gt;
|
|
2915
|
+
ltefn = lte;
|
|
2916
|
+
ltfn = lt;
|
|
2917
|
+
comp = ">";
|
|
2918
|
+
ecomp = ">=";
|
|
1723
2919
|
break;
|
|
1724
2920
|
|
|
1725
2921
|
case "<":
|
|
1726
|
-
gtfn = lt
|
|
2922
|
+
gtfn = lt;
|
|
2923
|
+
ltefn = gte;
|
|
2924
|
+
ltfn = gt;
|
|
2925
|
+
comp = "<";
|
|
2926
|
+
ecomp = "<=";
|
|
1727
2927
|
break;
|
|
1728
2928
|
|
|
1729
2929
|
default:
|
|
1730
2930
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
1731
2931
|
}
|
|
1732
|
-
if (satisfies(version, range, options))
|
|
2932
|
+
if (satisfies(version, range, options)) {
|
|
2933
|
+
return false;
|
|
2934
|
+
}
|
|
1733
2935
|
for (let i = 0; i < range.set.length; ++i) {
|
|
1734
2936
|
const comparators = range.set[i];
|
|
1735
|
-
let high = null
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
2937
|
+
let high = null;
|
|
2938
|
+
let low = null;
|
|
2939
|
+
comparators.forEach((comparator => {
|
|
2940
|
+
if (comparator.semver === ANY) {
|
|
2941
|
+
comparator = new Comparator(">=0.0.0");
|
|
2942
|
+
}
|
|
2943
|
+
high = high || comparator;
|
|
2944
|
+
low = low || comparator;
|
|
2945
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
2946
|
+
high = comparator;
|
|
2947
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
2948
|
+
low = comparator;
|
|
2949
|
+
}
|
|
2950
|
+
}));
|
|
2951
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
2952
|
+
return false;
|
|
2953
|
+
}
|
|
2954
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
2955
|
+
return false;
|
|
2956
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
2957
|
+
return false;
|
|
2958
|
+
}
|
|
1742
2959
|
}
|
|
1743
|
-
return
|
|
2960
|
+
return true;
|
|
1744
2961
|
};
|
|
2962
|
+
module.exports = outside;
|
|
1745
2963
|
},
|
|
1746
2964
|
3018: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1747
|
-
const satisfies = __webpack_require__(8915)
|
|
2965
|
+
const satisfies = __webpack_require__(8915);
|
|
2966
|
+
const compare = __webpack_require__(2247);
|
|
1748
2967
|
module.exports = (versions, range, options) => {
|
|
1749
2968
|
const set = [];
|
|
1750
|
-
let first = null
|
|
2969
|
+
let first = null;
|
|
2970
|
+
let prev = null;
|
|
1751
2971
|
const v = versions.sort(((a, b) => compare(a, b, options)));
|
|
1752
2972
|
for (const version of v) {
|
|
1753
|
-
satisfies(version, range, options)
|
|
1754
|
-
|
|
2973
|
+
const included = satisfies(version, range, options);
|
|
2974
|
+
if (included) {
|
|
2975
|
+
prev = version;
|
|
2976
|
+
if (!first) {
|
|
2977
|
+
first = version;
|
|
2978
|
+
}
|
|
2979
|
+
} else {
|
|
2980
|
+
if (prev) {
|
|
2981
|
+
set.push([ first, prev ]);
|
|
2982
|
+
}
|
|
2983
|
+
prev = null;
|
|
2984
|
+
first = null;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
if (first) {
|
|
2988
|
+
set.push([ first, null ]);
|
|
1755
2989
|
}
|
|
1756
|
-
first && set.push([ first, null ]);
|
|
1757
2990
|
const ranges = [];
|
|
1758
|
-
for (const [min, max] of set)
|
|
1759
|
-
|
|
2991
|
+
for (const [min, max] of set) {
|
|
2992
|
+
if (min === max) {
|
|
2993
|
+
ranges.push(min);
|
|
2994
|
+
} else if (!max && min === v[0]) {
|
|
2995
|
+
ranges.push("*");
|
|
2996
|
+
} else if (!max) {
|
|
2997
|
+
ranges.push(`>=${min}`);
|
|
2998
|
+
} else if (min === v[0]) {
|
|
2999
|
+
ranges.push(`<=${max}`);
|
|
3000
|
+
} else {
|
|
3001
|
+
ranges.push(`${min} - ${max}`);
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
const simplified = ranges.join(" || ");
|
|
3005
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1760
3006
|
return simplified.length < original.length ? simplified : range;
|
|
1761
3007
|
};
|
|
1762
3008
|
},
|
|
1763
3009
|
8563: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1764
|
-
const Range = __webpack_require__(6833)
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
3010
|
+
const Range = __webpack_require__(6833);
|
|
3011
|
+
const Comparator = __webpack_require__(7706);
|
|
3012
|
+
const {ANY} = Comparator;
|
|
3013
|
+
const satisfies = __webpack_require__(8915);
|
|
3014
|
+
const compare = __webpack_require__(2247);
|
|
3015
|
+
const subset = (sub, dom, options = {}) => {
|
|
3016
|
+
if (sub === dom) {
|
|
3017
|
+
return true;
|
|
3018
|
+
}
|
|
3019
|
+
sub = new Range(sub, options);
|
|
3020
|
+
dom = new Range(dom, options);
|
|
3021
|
+
let sawNonNull = false;
|
|
3022
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
3023
|
+
for (const simpleDom of dom.set) {
|
|
3024
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
3025
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
3026
|
+
if (isSub) {
|
|
3027
|
+
continue OUTER;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
if (sawNonNull) {
|
|
3031
|
+
return false;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
return true;
|
|
3035
|
+
};
|
|
3036
|
+
const simpleSubset = (sub, dom, options) => {
|
|
3037
|
+
if (sub === dom) {
|
|
3038
|
+
return true;
|
|
3039
|
+
}
|
|
3040
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
3041
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
3042
|
+
return true;
|
|
3043
|
+
} else if (options.includePrerelease) {
|
|
3044
|
+
sub = [ new Comparator(">=0.0.0-0") ];
|
|
3045
|
+
} else {
|
|
3046
|
+
sub = [ new Comparator(">=0.0.0") ];
|
|
3047
|
+
}
|
|
1769
3048
|
}
|
|
1770
|
-
if (
|
|
1771
|
-
if (options.includePrerelease)
|
|
1772
|
-
|
|
3049
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
3050
|
+
if (options.includePrerelease) {
|
|
3051
|
+
return true;
|
|
3052
|
+
} else {
|
|
3053
|
+
dom = [ new Comparator(">=0.0.0") ];
|
|
3054
|
+
}
|
|
1773
3055
|
}
|
|
1774
3056
|
const eqSet = new Set;
|
|
1775
|
-
let gt, lt
|
|
1776
|
-
for (const c of sub)
|
|
1777
|
-
|
|
3057
|
+
let gt, lt;
|
|
3058
|
+
for (const c of sub) {
|
|
3059
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
3060
|
+
gt = higherGT(gt, c, options);
|
|
3061
|
+
} else if (c.operator === "<" || c.operator === "<=") {
|
|
3062
|
+
lt = lowerLT(lt, c, options);
|
|
3063
|
+
} else {
|
|
3064
|
+
eqSet.add(c.semver);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
if (eqSet.size > 1) {
|
|
3068
|
+
return null;
|
|
3069
|
+
}
|
|
3070
|
+
let gtltComp;
|
|
1778
3071
|
if (gt && lt) {
|
|
1779
|
-
|
|
1780
|
-
if (
|
|
3072
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
3073
|
+
if (gtltComp > 0) {
|
|
3074
|
+
return null;
|
|
3075
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
3076
|
+
return null;
|
|
3077
|
+
}
|
|
1781
3078
|
}
|
|
1782
3079
|
for (const eq of eqSet) {
|
|
1783
|
-
if (gt && !satisfies(eq, String(gt), options))
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
3080
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
3081
|
+
return null;
|
|
3082
|
+
}
|
|
3083
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
3084
|
+
return null;
|
|
3085
|
+
}
|
|
3086
|
+
for (const c of dom) {
|
|
3087
|
+
if (!satisfies(eq, String(c), options)) {
|
|
3088
|
+
return false;
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
return true;
|
|
3092
|
+
}
|
|
3093
|
+
let higher, lower;
|
|
3094
|
+
let hasDomLT, hasDomGT;
|
|
3095
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
3096
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
3097
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
3098
|
+
needDomLTPre = false;
|
|
1787
3099
|
}
|
|
1788
|
-
let needDomLTPre = !(!lt || options.includePrerelease || !lt.semver.prerelease.length) && lt.semver, needDomGTPre = !(!gt || options.includePrerelease || !gt.semver.prerelease.length) && gt.semver;
|
|
1789
|
-
needDomLTPre && 1 === needDomLTPre.prerelease.length && "<" === lt.operator && 0 === needDomLTPre.prerelease[0] && (needDomLTPre = !1);
|
|
1790
3100
|
for (const c of dom) {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
if (
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
3101
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
3102
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
3103
|
+
if (gt) {
|
|
3104
|
+
if (needDomGTPre) {
|
|
3105
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
3106
|
+
needDomGTPre = false;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
3110
|
+
higher = higherGT(gt, c, options);
|
|
3111
|
+
if (higher === c && higher !== gt) {
|
|
3112
|
+
return false;
|
|
3113
|
+
}
|
|
3114
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
3115
|
+
return false;
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
if (lt) {
|
|
3119
|
+
if (needDomLTPre) {
|
|
3120
|
+
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
3121
|
+
needDomLTPre = false;
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
3125
|
+
lower = lowerLT(lt, c, options);
|
|
3126
|
+
if (lower === c && lower !== lt) {
|
|
3127
|
+
return false;
|
|
3128
|
+
}
|
|
3129
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
3130
|
+
return false;
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
3134
|
+
return false;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
3138
|
+
return false;
|
|
3139
|
+
}
|
|
3140
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
3141
|
+
return false;
|
|
3142
|
+
}
|
|
3143
|
+
if (needDomGTPre || needDomLTPre) {
|
|
3144
|
+
return false;
|
|
3145
|
+
}
|
|
3146
|
+
return true;
|
|
3147
|
+
};
|
|
3148
|
+
const higherGT = (a, b, options) => {
|
|
3149
|
+
if (!a) {
|
|
3150
|
+
return b;
|
|
3151
|
+
}
|
|
1809
3152
|
const comp = compare(a.semver, b.semver, options);
|
|
1810
|
-
return comp
|
|
3153
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1811
3154
|
};
|
|
1812
|
-
|
|
1813
|
-
if (
|
|
1814
|
-
|
|
1815
|
-
let sawNonNull = !1;
|
|
1816
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
1817
|
-
for (const simpleDom of dom.set) {
|
|
1818
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1819
|
-
if (sawNonNull = sawNonNull || null !== isSub, isSub) continue OUTER;
|
|
1820
|
-
}
|
|
1821
|
-
if (sawNonNull) return !1;
|
|
3155
|
+
const lowerLT = (a, b, options) => {
|
|
3156
|
+
if (!a) {
|
|
3157
|
+
return b;
|
|
1822
3158
|
}
|
|
1823
|
-
|
|
3159
|
+
const comp = compare(a.semver, b.semver, options);
|
|
3160
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1824
3161
|
};
|
|
3162
|
+
module.exports = subset;
|
|
1825
3163
|
},
|
|
1826
3164
|
8378: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1827
3165
|
const Range = __webpack_require__(6833);
|
|
1828
|
-
|
|
3166
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp => comp.map((c => c.value)).join(" ").trim().split(" ")));
|
|
3167
|
+
module.exports = toComparators;
|
|
1829
3168
|
},
|
|
1830
3169
|
7396: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1831
3170
|
const Range = __webpack_require__(6833);
|
|
1832
|
-
|
|
3171
|
+
const validRange = (range, options) => {
|
|
1833
3172
|
try {
|
|
1834
3173
|
return new Range(range, options).range || "*";
|
|
1835
3174
|
} catch (er) {
|
|
1836
3175
|
return null;
|
|
1837
3176
|
}
|
|
1838
3177
|
};
|
|
3178
|
+
module.exports = validRange;
|
|
1839
3179
|
},
|
|
1840
3180
|
9797: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1841
3181
|
"use strict";
|
|
1842
|
-
const os = __webpack_require__(2037)
|
|
3182
|
+
const os = __webpack_require__(2037);
|
|
3183
|
+
const tty = __webpack_require__(6224);
|
|
3184
|
+
const hasFlag = __webpack_require__(4288);
|
|
3185
|
+
const {env} = process;
|
|
1843
3186
|
let forceColor;
|
|
3187
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
3188
|
+
forceColor = 0;
|
|
3189
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
3190
|
+
forceColor = 1;
|
|
3191
|
+
}
|
|
3192
|
+
if ("FORCE_COLOR" in env) {
|
|
3193
|
+
if (env.FORCE_COLOR === "true") {
|
|
3194
|
+
forceColor = 1;
|
|
3195
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
3196
|
+
forceColor = 0;
|
|
3197
|
+
} else {
|
|
3198
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
1844
3201
|
function translateLevel(level) {
|
|
1845
|
-
|
|
3202
|
+
if (level === 0) {
|
|
3203
|
+
return false;
|
|
3204
|
+
}
|
|
3205
|
+
return {
|
|
1846
3206
|
level,
|
|
1847
|
-
hasBasic:
|
|
3207
|
+
hasBasic: true,
|
|
1848
3208
|
has256: level >= 2,
|
|
1849
3209
|
has16m: level >= 3
|
|
1850
3210
|
};
|
|
1851
3211
|
}
|
|
1852
3212
|
function supportsColor(haveStream, streamIsTTY) {
|
|
1853
|
-
if (
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
if (
|
|
3213
|
+
if (forceColor === 0) {
|
|
3214
|
+
return 0;
|
|
3215
|
+
}
|
|
3216
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
3217
|
+
return 3;
|
|
3218
|
+
}
|
|
3219
|
+
if (hasFlag("color=256")) {
|
|
3220
|
+
return 2;
|
|
3221
|
+
}
|
|
3222
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
3223
|
+
return 0;
|
|
3224
|
+
}
|
|
1857
3225
|
const min = forceColor || 0;
|
|
1858
|
-
if ("dumb"
|
|
1859
|
-
|
|
3226
|
+
if (env.TERM === "dumb") {
|
|
3227
|
+
return min;
|
|
3228
|
+
}
|
|
3229
|
+
if (process.platform === "win32") {
|
|
1860
3230
|
const osRelease = os.release().split(".");
|
|
1861
|
-
|
|
3231
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
3232
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
3233
|
+
}
|
|
3234
|
+
return 1;
|
|
3235
|
+
}
|
|
3236
|
+
if ("CI" in env) {
|
|
3237
|
+
if ([ "TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE" ].some((sign => sign in env)) || env.CI_NAME === "codeship") {
|
|
3238
|
+
return 1;
|
|
3239
|
+
}
|
|
3240
|
+
return min;
|
|
3241
|
+
}
|
|
3242
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
3243
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
3244
|
+
}
|
|
3245
|
+
if (env.COLORTERM === "truecolor") {
|
|
3246
|
+
return 3;
|
|
1862
3247
|
}
|
|
1863
|
-
if ("CI" in env) return [ "TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE" ].some((sign => sign in env)) || "codeship" === env.CI_NAME ? 1 : min;
|
|
1864
|
-
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
1865
|
-
if ("truecolor" === env.COLORTERM) return 3;
|
|
1866
3248
|
if ("TERM_PROGRAM" in env) {
|
|
1867
3249
|
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1868
3250
|
switch (env.TERM_PROGRAM) {
|
|
@@ -1873,172 +3255,397 @@ var __webpack_modules__ = {
|
|
|
1873
3255
|
return 2;
|
|
1874
3256
|
}
|
|
1875
3257
|
}
|
|
1876
|
-
|
|
3258
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
3259
|
+
return 2;
|
|
3260
|
+
}
|
|
3261
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
3262
|
+
return 1;
|
|
3263
|
+
}
|
|
3264
|
+
if ("COLORTERM" in env) {
|
|
3265
|
+
return 1;
|
|
3266
|
+
}
|
|
3267
|
+
return min;
|
|
3268
|
+
}
|
|
3269
|
+
function getSupportLevel(stream) {
|
|
3270
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
3271
|
+
return translateLevel(level);
|
|
1877
3272
|
}
|
|
1878
|
-
hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never") ? forceColor = 0 : (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) && (forceColor = 1),
|
|
1879
|
-
"FORCE_COLOR" in env && (forceColor = "true" === env.FORCE_COLOR ? 1 : "false" === env.FORCE_COLOR ? 0 : 0 === env.FORCE_COLOR.length ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3)),
|
|
1880
3273
|
module.exports = {
|
|
1881
|
-
supportsColor:
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
stdout: translateLevel(supportsColor(!0, tty.isatty(1))),
|
|
1885
|
-
stderr: translateLevel(supportsColor(!0, tty.isatty(2)))
|
|
3274
|
+
supportsColor: getSupportLevel,
|
|
3275
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
3276
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
1886
3277
|
};
|
|
1887
3278
|
},
|
|
1888
3279
|
3278: module => {
|
|
1889
3280
|
"use strict";
|
|
1890
3281
|
module.exports = function(Yallist) {
|
|
1891
3282
|
Yallist.prototype[Symbol.iterator] = function*() {
|
|
1892
|
-
for (let walker = this.head; walker; walker = walker.next)
|
|
3283
|
+
for (let walker = this.head; walker; walker = walker.next) {
|
|
3284
|
+
yield walker.value;
|
|
3285
|
+
}
|
|
1893
3286
|
};
|
|
1894
3287
|
};
|
|
1895
3288
|
},
|
|
1896
3289
|
1455: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
1897
3290
|
"use strict";
|
|
3291
|
+
module.exports = Yallist;
|
|
3292
|
+
Yallist.Node = Node;
|
|
3293
|
+
Yallist.create = Yallist;
|
|
1898
3294
|
function Yallist(list) {
|
|
1899
3295
|
var self = this;
|
|
1900
|
-
if (self instanceof Yallist
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
3296
|
+
if (!(self instanceof Yallist)) {
|
|
3297
|
+
self = new Yallist;
|
|
3298
|
+
}
|
|
3299
|
+
self.tail = null;
|
|
3300
|
+
self.head = null;
|
|
3301
|
+
self.length = 0;
|
|
3302
|
+
if (list && typeof list.forEach === "function") {
|
|
3303
|
+
list.forEach((function(item) {
|
|
3304
|
+
self.push(item);
|
|
3305
|
+
}));
|
|
3306
|
+
} else if (arguments.length > 0) {
|
|
3307
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
3308
|
+
self.push(arguments[i]);
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
1904
3311
|
return self;
|
|
1905
3312
|
}
|
|
1906
|
-
function
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
if (node
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
3313
|
+
Yallist.prototype.removeNode = function(node) {
|
|
3314
|
+
if (node.list !== this) {
|
|
3315
|
+
throw new Error("removing node which does not belong to this list");
|
|
3316
|
+
}
|
|
3317
|
+
var next = node.next;
|
|
3318
|
+
var prev = node.prev;
|
|
3319
|
+
if (next) {
|
|
3320
|
+
next.prev = prev;
|
|
3321
|
+
}
|
|
3322
|
+
if (prev) {
|
|
3323
|
+
prev.next = next;
|
|
3324
|
+
}
|
|
3325
|
+
if (node === this.head) {
|
|
3326
|
+
this.head = next;
|
|
3327
|
+
}
|
|
3328
|
+
if (node === this.tail) {
|
|
3329
|
+
this.tail = prev;
|
|
3330
|
+
}
|
|
3331
|
+
node.list.length--;
|
|
3332
|
+
node.next = null;
|
|
3333
|
+
node.prev = null;
|
|
3334
|
+
node.list = null;
|
|
3335
|
+
return next;
|
|
3336
|
+
};
|
|
3337
|
+
Yallist.prototype.unshiftNode = function(node) {
|
|
3338
|
+
if (node === this.head) {
|
|
3339
|
+
return;
|
|
3340
|
+
}
|
|
3341
|
+
if (node.list) {
|
|
3342
|
+
node.list.removeNode(node);
|
|
3343
|
+
}
|
|
3344
|
+
var head = this.head;
|
|
3345
|
+
node.list = this;
|
|
3346
|
+
node.next = head;
|
|
3347
|
+
if (head) {
|
|
3348
|
+
head.prev = node;
|
|
3349
|
+
}
|
|
3350
|
+
this.head = node;
|
|
3351
|
+
if (!this.tail) {
|
|
3352
|
+
this.tail = node;
|
|
3353
|
+
}
|
|
3354
|
+
this.length++;
|
|
3355
|
+
};
|
|
3356
|
+
Yallist.prototype.pushNode = function(node) {
|
|
3357
|
+
if (node === this.tail) {
|
|
3358
|
+
return;
|
|
3359
|
+
}
|
|
3360
|
+
if (node.list) {
|
|
3361
|
+
node.list.removeNode(node);
|
|
3362
|
+
}
|
|
3363
|
+
var tail = this.tail;
|
|
3364
|
+
node.list = this;
|
|
3365
|
+
node.prev = tail;
|
|
3366
|
+
if (tail) {
|
|
3367
|
+
tail.next = node;
|
|
3368
|
+
}
|
|
3369
|
+
this.tail = node;
|
|
3370
|
+
if (!this.head) {
|
|
3371
|
+
this.head = node;
|
|
3372
|
+
}
|
|
3373
|
+
this.length++;
|
|
3374
|
+
};
|
|
3375
|
+
Yallist.prototype.push = function() {
|
|
3376
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
3377
|
+
push(this, arguments[i]);
|
|
3378
|
+
}
|
|
1946
3379
|
return this.length;
|
|
1947
|
-
}
|
|
1948
|
-
|
|
3380
|
+
};
|
|
3381
|
+
Yallist.prototype.unshift = function() {
|
|
3382
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
3383
|
+
unshift(this, arguments[i]);
|
|
3384
|
+
}
|
|
1949
3385
|
return this.length;
|
|
1950
|
-
}
|
|
3386
|
+
};
|
|
3387
|
+
Yallist.prototype.pop = function() {
|
|
3388
|
+
if (!this.tail) {
|
|
3389
|
+
return undefined;
|
|
3390
|
+
}
|
|
3391
|
+
var res = this.tail.value;
|
|
3392
|
+
this.tail = this.tail.prev;
|
|
1951
3393
|
if (this.tail) {
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
this.
|
|
3394
|
+
this.tail.next = null;
|
|
3395
|
+
} else {
|
|
3396
|
+
this.head = null;
|
|
1955
3397
|
}
|
|
1956
|
-
|
|
3398
|
+
this.length--;
|
|
3399
|
+
return res;
|
|
3400
|
+
};
|
|
3401
|
+
Yallist.prototype.shift = function() {
|
|
3402
|
+
if (!this.head) {
|
|
3403
|
+
return undefined;
|
|
3404
|
+
}
|
|
3405
|
+
var res = this.head.value;
|
|
3406
|
+
this.head = this.head.next;
|
|
1957
3407
|
if (this.head) {
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
this.
|
|
3408
|
+
this.head.prev = null;
|
|
3409
|
+
} else {
|
|
3410
|
+
this.tail = null;
|
|
1961
3411
|
}
|
|
1962
|
-
|
|
3412
|
+
this.length--;
|
|
3413
|
+
return res;
|
|
3414
|
+
};
|
|
3415
|
+
Yallist.prototype.forEach = function(fn, thisp) {
|
|
1963
3416
|
thisp = thisp || this;
|
|
1964
|
-
for (var walker = this.head, i = 0;
|
|
1965
|
-
|
|
1966
|
-
|
|
3417
|
+
for (var walker = this.head, i = 0; walker !== null; i++) {
|
|
3418
|
+
fn.call(thisp, walker.value, i, this);
|
|
3419
|
+
walker = walker.next;
|
|
3420
|
+
}
|
|
3421
|
+
};
|
|
3422
|
+
Yallist.prototype.forEachReverse = function(fn, thisp) {
|
|
1967
3423
|
thisp = thisp || this;
|
|
1968
|
-
for (var walker = this.tail, i = this.length - 1;
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
for (var i = 0, walker = this.
|
|
1975
|
-
|
|
1976
|
-
|
|
3424
|
+
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
|
|
3425
|
+
fn.call(thisp, walker.value, i, this);
|
|
3426
|
+
walker = walker.prev;
|
|
3427
|
+
}
|
|
3428
|
+
};
|
|
3429
|
+
Yallist.prototype.get = function(n) {
|
|
3430
|
+
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
|
|
3431
|
+
walker = walker.next;
|
|
3432
|
+
}
|
|
3433
|
+
if (i === n && walker !== null) {
|
|
3434
|
+
return walker.value;
|
|
3435
|
+
}
|
|
3436
|
+
};
|
|
3437
|
+
Yallist.prototype.getReverse = function(n) {
|
|
3438
|
+
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
|
|
3439
|
+
walker = walker.prev;
|
|
3440
|
+
}
|
|
3441
|
+
if (i === n && walker !== null) {
|
|
3442
|
+
return walker.value;
|
|
3443
|
+
}
|
|
3444
|
+
};
|
|
3445
|
+
Yallist.prototype.map = function(fn, thisp) {
|
|
1977
3446
|
thisp = thisp || this;
|
|
1978
|
-
|
|
1979
|
-
walker =
|
|
3447
|
+
var res = new Yallist;
|
|
3448
|
+
for (var walker = this.head; walker !== null; ) {
|
|
3449
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
3450
|
+
walker = walker.next;
|
|
3451
|
+
}
|
|
1980
3452
|
return res;
|
|
1981
|
-
}
|
|
3453
|
+
};
|
|
3454
|
+
Yallist.prototype.mapReverse = function(fn, thisp) {
|
|
1982
3455
|
thisp = thisp || this;
|
|
1983
|
-
|
|
1984
|
-
walker =
|
|
3456
|
+
var res = new Yallist;
|
|
3457
|
+
for (var walker = this.tail; walker !== null; ) {
|
|
3458
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
3459
|
+
walker = walker.prev;
|
|
3460
|
+
}
|
|
1985
3461
|
return res;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
3462
|
+
};
|
|
3463
|
+
Yallist.prototype.reduce = function(fn, initial) {
|
|
3464
|
+
var acc;
|
|
3465
|
+
var walker = this.head;
|
|
3466
|
+
if (arguments.length > 1) {
|
|
3467
|
+
acc = initial;
|
|
3468
|
+
} else if (this.head) {
|
|
3469
|
+
walker = this.head.next;
|
|
3470
|
+
acc = this.head.value;
|
|
3471
|
+
} else {
|
|
3472
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
3473
|
+
}
|
|
3474
|
+
for (var i = 0; walker !== null; i++) {
|
|
3475
|
+
acc = fn(acc, walker.value, i);
|
|
3476
|
+
walker = walker.next;
|
|
1991
3477
|
}
|
|
1992
|
-
for (var i = 0; null !== walker; i++) acc = fn(acc, walker.value, i), walker = walker.next;
|
|
1993
3478
|
return acc;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
3479
|
+
};
|
|
3480
|
+
Yallist.prototype.reduceReverse = function(fn, initial) {
|
|
3481
|
+
var acc;
|
|
3482
|
+
var walker = this.tail;
|
|
3483
|
+
if (arguments.length > 1) {
|
|
3484
|
+
acc = initial;
|
|
3485
|
+
} else if (this.tail) {
|
|
3486
|
+
walker = this.tail.prev;
|
|
3487
|
+
acc = this.tail.value;
|
|
3488
|
+
} else {
|
|
3489
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
3490
|
+
}
|
|
3491
|
+
for (var i = this.length - 1; walker !== null; i--) {
|
|
3492
|
+
acc = fn(acc, walker.value, i);
|
|
3493
|
+
walker = walker.prev;
|
|
3494
|
+
}
|
|
2002
3495
|
return acc;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
|
|
3496
|
+
};
|
|
3497
|
+
Yallist.prototype.toArray = function() {
|
|
3498
|
+
var arr = new Array(this.length);
|
|
3499
|
+
for (var i = 0, walker = this.head; walker !== null; i++) {
|
|
3500
|
+
arr[i] = walker.value;
|
|
3501
|
+
walker = walker.next;
|
|
3502
|
+
}
|
|
2006
3503
|
return arr;
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
|
|
3504
|
+
};
|
|
3505
|
+
Yallist.prototype.toArrayReverse = function() {
|
|
3506
|
+
var arr = new Array(this.length);
|
|
3507
|
+
for (var i = 0, walker = this.tail; walker !== null; i++) {
|
|
3508
|
+
arr[i] = walker.value;
|
|
3509
|
+
walker = walker.prev;
|
|
3510
|
+
}
|
|
2010
3511
|
return arr;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
3512
|
+
};
|
|
3513
|
+
Yallist.prototype.slice = function(from, to) {
|
|
3514
|
+
to = to || this.length;
|
|
3515
|
+
if (to < 0) {
|
|
3516
|
+
to += this.length;
|
|
3517
|
+
}
|
|
3518
|
+
from = from || 0;
|
|
3519
|
+
if (from < 0) {
|
|
3520
|
+
from += this.length;
|
|
3521
|
+
}
|
|
2013
3522
|
var ret = new Yallist;
|
|
2014
|
-
if (to < from || to < 0)
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
3523
|
+
if (to < from || to < 0) {
|
|
3524
|
+
return ret;
|
|
3525
|
+
}
|
|
3526
|
+
if (from < 0) {
|
|
3527
|
+
from = 0;
|
|
3528
|
+
}
|
|
3529
|
+
if (to > this.length) {
|
|
3530
|
+
to = this.length;
|
|
3531
|
+
}
|
|
3532
|
+
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
|
3533
|
+
walker = walker.next;
|
|
3534
|
+
}
|
|
3535
|
+
for (;walker !== null && i < to; i++, walker = walker.next) {
|
|
3536
|
+
ret.push(walker.value);
|
|
3537
|
+
}
|
|
2018
3538
|
return ret;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
3539
|
+
};
|
|
3540
|
+
Yallist.prototype.sliceReverse = function(from, to) {
|
|
3541
|
+
to = to || this.length;
|
|
3542
|
+
if (to < 0) {
|
|
3543
|
+
to += this.length;
|
|
3544
|
+
}
|
|
3545
|
+
from = from || 0;
|
|
3546
|
+
if (from < 0) {
|
|
3547
|
+
from += this.length;
|
|
3548
|
+
}
|
|
2021
3549
|
var ret = new Yallist;
|
|
2022
|
-
if (to < from || to < 0)
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
3550
|
+
if (to < from || to < 0) {
|
|
3551
|
+
return ret;
|
|
3552
|
+
}
|
|
3553
|
+
if (from < 0) {
|
|
3554
|
+
from = 0;
|
|
3555
|
+
}
|
|
3556
|
+
if (to > this.length) {
|
|
3557
|
+
to = this.length;
|
|
3558
|
+
}
|
|
3559
|
+
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
|
|
3560
|
+
walker = walker.prev;
|
|
3561
|
+
}
|
|
3562
|
+
for (;walker !== null && i > from; i--, walker = walker.prev) {
|
|
3563
|
+
ret.push(walker.value);
|
|
3564
|
+
}
|
|
2026
3565
|
return ret;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
|
|
3566
|
+
};
|
|
3567
|
+
Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
|
|
3568
|
+
if (start > this.length) {
|
|
3569
|
+
start = this.length - 1;
|
|
3570
|
+
}
|
|
3571
|
+
if (start < 0) {
|
|
3572
|
+
start = this.length + start;
|
|
3573
|
+
}
|
|
3574
|
+
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
|
|
3575
|
+
walker = walker.next;
|
|
3576
|
+
}
|
|
2030
3577
|
var ret = [];
|
|
2031
|
-
for (i = 0; walker && i < deleteCount; i++)
|
|
2032
|
-
|
|
2033
|
-
|
|
3578
|
+
for (var i = 0; walker && i < deleteCount; i++) {
|
|
3579
|
+
ret.push(walker.value);
|
|
3580
|
+
walker = this.removeNode(walker);
|
|
3581
|
+
}
|
|
3582
|
+
if (walker === null) {
|
|
3583
|
+
walker = this.tail;
|
|
3584
|
+
}
|
|
3585
|
+
if (walker !== this.head && walker !== this.tail) {
|
|
3586
|
+
walker = walker.prev;
|
|
3587
|
+
}
|
|
3588
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
3589
|
+
walker = insert(this, walker, nodes[i]);
|
|
3590
|
+
}
|
|
2034
3591
|
return ret;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
3592
|
+
};
|
|
3593
|
+
Yallist.prototype.reverse = function() {
|
|
3594
|
+
var head = this.head;
|
|
3595
|
+
var tail = this.tail;
|
|
3596
|
+
for (var walker = head; walker !== null; walker = walker.prev) {
|
|
2037
3597
|
var p = walker.prev;
|
|
2038
|
-
walker.prev = walker.next
|
|
3598
|
+
walker.prev = walker.next;
|
|
3599
|
+
walker.next = p;
|
|
2039
3600
|
}
|
|
2040
|
-
|
|
3601
|
+
this.head = tail;
|
|
3602
|
+
this.tail = head;
|
|
3603
|
+
return this;
|
|
2041
3604
|
};
|
|
3605
|
+
function insert(self, node, value) {
|
|
3606
|
+
var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
|
|
3607
|
+
if (inserted.next === null) {
|
|
3608
|
+
self.tail = inserted;
|
|
3609
|
+
}
|
|
3610
|
+
if (inserted.prev === null) {
|
|
3611
|
+
self.head = inserted;
|
|
3612
|
+
}
|
|
3613
|
+
self.length++;
|
|
3614
|
+
return inserted;
|
|
3615
|
+
}
|
|
3616
|
+
function push(self, item) {
|
|
3617
|
+
self.tail = new Node(item, self.tail, null, self);
|
|
3618
|
+
if (!self.head) {
|
|
3619
|
+
self.head = self.tail;
|
|
3620
|
+
}
|
|
3621
|
+
self.length++;
|
|
3622
|
+
}
|
|
3623
|
+
function unshift(self, item) {
|
|
3624
|
+
self.head = new Node(item, null, self.head, self);
|
|
3625
|
+
if (!self.tail) {
|
|
3626
|
+
self.tail = self.head;
|
|
3627
|
+
}
|
|
3628
|
+
self.length++;
|
|
3629
|
+
}
|
|
3630
|
+
function Node(value, prev, next, list) {
|
|
3631
|
+
if (!(this instanceof Node)) {
|
|
3632
|
+
return new Node(value, prev, next, list);
|
|
3633
|
+
}
|
|
3634
|
+
this.list = list;
|
|
3635
|
+
this.value = value;
|
|
3636
|
+
if (prev) {
|
|
3637
|
+
prev.next = this;
|
|
3638
|
+
this.prev = prev;
|
|
3639
|
+
} else {
|
|
3640
|
+
this.prev = null;
|
|
3641
|
+
}
|
|
3642
|
+
if (next) {
|
|
3643
|
+
next.prev = this;
|
|
3644
|
+
this.next = next;
|
|
3645
|
+
} else {
|
|
3646
|
+
this.next = null;
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
2042
3649
|
try {
|
|
2043
3650
|
__webpack_require__(3278)(Yallist);
|
|
2044
3651
|
} catch (er) {}
|
|
@@ -2046,27 +3653,37 @@ var __webpack_modules__ = {
|
|
|
2046
3653
|
6829: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
2047
3654
|
"use strict";
|
|
2048
3655
|
Object.defineProperty(exports, "__esModule", {
|
|
2049
|
-
value:
|
|
2050
|
-
})
|
|
2051
|
-
|
|
3656
|
+
value: true
|
|
3657
|
+
});
|
|
3658
|
+
exports.NodeRelease = void 0;
|
|
3659
|
+
const process = __webpack_require__(7282);
|
|
3660
|
+
const semver_1 = __webpack_require__(6027);
|
|
3661
|
+
const ONE_DAY_IN_MILLISECONDS = 864e5;
|
|
2052
3662
|
class NodeRelease {
|
|
2053
3663
|
constructor(majorVersion, opts) {
|
|
2054
3664
|
var _a, _b;
|
|
2055
|
-
this.majorVersion = majorVersion
|
|
2056
|
-
this.
|
|
2057
|
-
this.
|
|
2058
|
-
this.
|
|
3665
|
+
this.majorVersion = majorVersion;
|
|
3666
|
+
this.endOfLifeDate = opts.endOfLife === true ? undefined : opts.endOfLife;
|
|
3667
|
+
this.untested = (_a = opts.untested) !== null && _a !== void 0 ? _a : false;
|
|
3668
|
+
this.supportedRange = new semver_1.Range((_b = opts.supportedRange) !== null && _b !== void 0 ? _b : `^${majorVersion}.0.0`);
|
|
3669
|
+
this.endOfLife = opts.endOfLife === true || opts.endOfLife.getTime() <= Date.now();
|
|
3670
|
+
this.deprecated = !this.endOfLife && opts.endOfLife !== true && opts.endOfLife.getTime() - NodeRelease.DEPRECATION_WINDOW_MS <= Date.now();
|
|
2059
3671
|
this.supported = !this.untested && !this.endOfLife;
|
|
2060
3672
|
}
|
|
2061
3673
|
static forThisRuntime() {
|
|
2062
|
-
const semver = new semver_1.SemVer(process.version)
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
3674
|
+
const semver = new semver_1.SemVer(process.version);
|
|
3675
|
+
const majorVersion = semver.major;
|
|
3676
|
+
for (const nodeRelease of this.ALL_RELEASES) {
|
|
3677
|
+
if (nodeRelease.majorVersion === majorVersion) {
|
|
3678
|
+
return {
|
|
3679
|
+
nodeRelease,
|
|
3680
|
+
knownBroken: !nodeRelease.supportedRange.test(semver)
|
|
3681
|
+
};
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
2067
3684
|
return {
|
|
2068
|
-
nodeRelease:
|
|
2069
|
-
knownBroken:
|
|
3685
|
+
nodeRelease: undefined,
|
|
3686
|
+
knownBroken: false
|
|
2070
3687
|
};
|
|
2071
3688
|
}
|
|
2072
3689
|
toString() {
|
|
@@ -2074,8 +3691,10 @@ var __webpack_modules__ = {
|
|
|
2074
3691
|
return `${this.supportedRange.raw}${eolInfo}`;
|
|
2075
3692
|
}
|
|
2076
3693
|
}
|
|
2077
|
-
exports.NodeRelease = NodeRelease
|
|
2078
|
-
|
|
3694
|
+
exports.NodeRelease = NodeRelease;
|
|
3695
|
+
NodeRelease.DEPRECATION_WINDOW_MS = 30 * ONE_DAY_IN_MILLISECONDS;
|
|
3696
|
+
NodeRelease.ALL_RELEASES = [ ...[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ].map((majorVersion => new NodeRelease(majorVersion, {
|
|
3697
|
+
endOfLife: true
|
|
2079
3698
|
}))), new NodeRelease(13, {
|
|
2080
3699
|
endOfLife: new Date("2020-06-01")
|
|
2081
3700
|
}), new NodeRelease(15, {
|
|
@@ -2096,41 +3715,59 @@ var __webpack_modules__ = {
|
|
|
2096
3715
|
endOfLife: new Date("2025-04-30")
|
|
2097
3716
|
}), new NodeRelease(19, {
|
|
2098
3717
|
endOfLife: new Date("2023-06-01"),
|
|
2099
|
-
untested:
|
|
3718
|
+
untested: true
|
|
2100
3719
|
}), new NodeRelease(20, {
|
|
2101
3720
|
endOfLife: new Date("2026-04-30"),
|
|
2102
|
-
untested:
|
|
3721
|
+
untested: true
|
|
2103
3722
|
}) ];
|
|
2104
3723
|
},
|
|
2105
3724
|
7962: (__unused_webpack_module, exports, __webpack_require__) => {
|
|
2106
3725
|
"use strict";
|
|
2107
3726
|
Object.defineProperty(exports, "__esModule", {
|
|
2108
|
-
value:
|
|
2109
|
-
})
|
|
2110
|
-
|
|
2111
|
-
|
|
3727
|
+
value: true
|
|
3728
|
+
});
|
|
3729
|
+
exports.checkNode = void 0;
|
|
3730
|
+
const chalk_1 = __webpack_require__(1201);
|
|
3731
|
+
const console_1 = __webpack_require__(6206);
|
|
3732
|
+
const process_1 = __webpack_require__(7282);
|
|
3733
|
+
const constants_1 = __webpack_require__(6829);
|
|
3734
|
+
function checkNode() {
|
|
2112
3735
|
const {nodeRelease, knownBroken} = constants_1.NodeRelease.forThisRuntime();
|
|
2113
|
-
if (null
|
|
3736
|
+
if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.endOfLife) {
|
|
2114
3737
|
const qualifier = nodeRelease.endOfLifeDate ? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}` : "";
|
|
2115
|
-
veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`,
|
|
2116
|
-
} else if (knownBroken)
|
|
3738
|
+
veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`, `Please upgrade to a supported node version as soon as possible.`);
|
|
3739
|
+
} else if (knownBroken) {
|
|
3740
|
+
veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${process_1.version} is unsupported and has known compatibility issues with this software.`);
|
|
3741
|
+
} else if (!nodeRelease || nodeRelease.untested) {
|
|
3742
|
+
veryVisibleMessage(chalk_1.bgYellow.black, `This software has not been tested with node ${process_1.version}.`);
|
|
3743
|
+
} else if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.deprecated) {
|
|
2117
3744
|
const deadline = nodeRelease.endOfLifeDate.toISOString().slice(0, 10);
|
|
2118
|
-
veryVisibleMessage(chalk_1.bgYellowBright.black, `Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`,
|
|
3745
|
+
veryVisibleMessage(chalk_1.bgYellowBright.black, `Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`, `Please upgrade to a supported node version as soon as possible.`);
|
|
2119
3746
|
}
|
|
2120
3747
|
function veryVisibleMessage(chalk, message, callToAction = "You may to encounter runtime issues, and should switch to a supported release.") {
|
|
2121
3748
|
const lines = [ message, callToAction, "", `This software is currently running on node ${process_1.version}.`, "As of the current release of this software, supported node releases are:", ...constants_1.NodeRelease.ALL_RELEASES.filter((release => release.supported)).sort(((l, r) => {
|
|
2122
3749
|
var _a, _b, _c, _d;
|
|
2123
|
-
return (
|
|
2124
|
-
})).map((release => `- ${release.toString()}${release.deprecated ? " [DEPRECATED]" : ""}`)) ]
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
3750
|
+
return ((_b = (_a = r.endOfLifeDate) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = l.endOfLifeDate) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0);
|
|
3751
|
+
})).map((release => `- ${release.toString()}${release.deprecated ? " [DEPRECATED]" : ""}`)) ];
|
|
3752
|
+
const len = Math.max(...lines.map((l => l.length)));
|
|
3753
|
+
const border = chalk("!".repeat(len + 8));
|
|
3754
|
+
const spacer = chalk(`!! ${" ".repeat(len)} !!`);
|
|
3755
|
+
(0, console_1.error)(border);
|
|
3756
|
+
(0, console_1.error)(spacer);
|
|
3757
|
+
for (const line of lines) {
|
|
3758
|
+
(0, console_1.error)(chalk(`!! ${line.padEnd(len, " ")} !!`));
|
|
3759
|
+
}
|
|
3760
|
+
(0, console_1.error)(spacer);
|
|
3761
|
+
(0, console_1.error)(border);
|
|
2128
3762
|
}
|
|
2129
|
-
}
|
|
3763
|
+
}
|
|
3764
|
+
exports.checkNode = checkNode;
|
|
2130
3765
|
},
|
|
2131
3766
|
9317: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
2132
3767
|
"use strict";
|
|
2133
|
-
|
|
3768
|
+
const index_1 = __webpack_require__(7962);
|
|
3769
|
+
(0, index_1.checkNode)();
|
|
3770
|
+
module.exports = {};
|
|
2134
3771
|
},
|
|
2135
3772
|
2081: module => {
|
|
2136
3773
|
"use strict";
|
|
@@ -2156,40 +3793,68 @@ var __webpack_modules__ = {
|
|
|
2156
3793
|
"use strict";
|
|
2157
3794
|
module.exports = require("tty");
|
|
2158
3795
|
}
|
|
2159
|
-
}
|
|
3796
|
+
};
|
|
3797
|
+
|
|
3798
|
+
var __webpack_module_cache__ = {};
|
|
2160
3799
|
|
|
2161
3800
|
function __webpack_require__(moduleId) {
|
|
2162
3801
|
var cachedModule = __webpack_module_cache__[moduleId];
|
|
2163
|
-
if (
|
|
3802
|
+
if (cachedModule !== undefined) {
|
|
3803
|
+
return cachedModule.exports;
|
|
3804
|
+
}
|
|
2164
3805
|
var module = __webpack_module_cache__[moduleId] = {
|
|
2165
3806
|
id: moduleId,
|
|
2166
|
-
loaded:
|
|
3807
|
+
loaded: false,
|
|
2167
3808
|
exports: {}
|
|
2168
3809
|
};
|
|
2169
|
-
|
|
2170
|
-
module.loaded =
|
|
3810
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
3811
|
+
module.loaded = true;
|
|
3812
|
+
return module.exports;
|
|
2171
3813
|
}
|
|
2172
3814
|
|
|
2173
|
-
|
|
2174
|
-
module
|
|
3815
|
+
(() => {
|
|
3816
|
+
__webpack_require__.nmd = module => {
|
|
3817
|
+
module.paths = [];
|
|
3818
|
+
if (!module.children) module.children = [];
|
|
3819
|
+
return module;
|
|
3820
|
+
};
|
|
3821
|
+
})();
|
|
2175
3822
|
|
|
2176
3823
|
var __webpack_exports__ = {};
|
|
2177
3824
|
|
|
2178
3825
|
(() => {
|
|
2179
3826
|
"use strict";
|
|
3827
|
+
var exports = __webpack_exports__;
|
|
3828
|
+
var __webpack_unused_export__;
|
|
3829
|
+
__webpack_unused_export__ = {
|
|
3830
|
+
value: true
|
|
3831
|
+
};
|
|
2180
3832
|
__webpack_require__(9317);
|
|
2181
|
-
const child_process_1 = __webpack_require__(2081)
|
|
2182
|
-
|
|
3833
|
+
const child_process_1 = __webpack_require__(2081);
|
|
3834
|
+
const console_1 = __webpack_require__(6206);
|
|
3835
|
+
const os_1 = __webpack_require__(2037);
|
|
3836
|
+
const path_1 = __webpack_require__(4822);
|
|
3837
|
+
const child = (0, child_process_1.spawn)(process.execPath, [ ...process.execArgv, (0,
|
|
3838
|
+
path_1.resolve)(__dirname, "..", "lib", "program.js") ], {
|
|
2183
3839
|
stdio: [ "ignore", "pipe", "pipe", "pipe" ]
|
|
2184
3840
|
});
|
|
2185
3841
|
child.once("end", ((code, signal) => {
|
|
2186
3842
|
var _a;
|
|
2187
|
-
|
|
3843
|
+
if (signal != null) {
|
|
3844
|
+
process.exit(128 + ((_a = os_1.constants.signals[signal]) !== null && _a !== void 0 ? _a : 0));
|
|
3845
|
+
}
|
|
2188
3846
|
process.exit(code);
|
|
2189
|
-
})), child.once("error", (err => {
|
|
2190
|
-
console.error("Failed to spawn child process:", err.stack), process.exit(-1);
|
|
2191
3847
|
}));
|
|
2192
|
-
|
|
3848
|
+
child.once("error", (err => {
|
|
3849
|
+
console.error("Failed to spawn child process:", err.stack);
|
|
3850
|
+
process.exit(-1);
|
|
3851
|
+
}));
|
|
3852
|
+
for (const signal of Object.keys(os_1.constants.signals)) {
|
|
3853
|
+
if (signal === "SIGKILL" || signal === "SIGSTOP") {
|
|
3854
|
+
continue;
|
|
3855
|
+
}
|
|
3856
|
+
process.on(signal, (sig => child.kill(sig)));
|
|
3857
|
+
}
|
|
2193
3858
|
function makeHandler(tag) {
|
|
2194
3859
|
return chunk => {
|
|
2195
3860
|
const buffer = Buffer.from(chunk);
|
|
@@ -2198,8 +3863,10 @@ var __webpack_exports__ = {};
|
|
|
2198
3863
|
}));
|
|
2199
3864
|
};
|
|
2200
3865
|
}
|
|
2201
|
-
child.stdout.on("data", makeHandler("stdout"))
|
|
3866
|
+
child.stdout.on("data", makeHandler("stdout"));
|
|
3867
|
+
child.stderr.on("data", makeHandler("stderr"));
|
|
2202
3868
|
const commands = child.stdio[3];
|
|
2203
|
-
process.stdin.pipe(commands)
|
|
3869
|
+
process.stdin.pipe(commands);
|
|
3870
|
+
commands.pipe(process.stdout);
|
|
2204
3871
|
})();
|
|
2205
3872
|
//# sourceMappingURL=jsii-runtime.js.map
|