@keycloakify/angular 0.0.11 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/bin/108.index.js +242 -0
  2. package/bin/338.index.js +104 -54
  3. package/bin/402.index.js +1250 -0
  4. package/bin/758.index.js +777 -53
  5. package/bin/{925.index.js → 84.index.js} +124 -624
  6. package/bin/main.js +59 -4
  7. package/package.json +1 -1
  8. package/src/bin/add-story.ts +126 -0
  9. package/src/bin/eject-page.ts +49 -11
  10. package/src/bin/initialize-account-theme/boilerplate/KcContextMock.ts +47 -1
  11. package/src/bin/main.ts +2 -4
  12. package/src/bin/tools/nodeModulesBinDirPath.ts +38 -0
  13. package/src/bin/tools/runPrettier.ts +89 -0
  14. package/src/bin/tools/transformCodebase_async.ts +89 -0
  15. package/src/bin/update-kc-gen.ts +20 -15
  16. package/stories/account/pages/account.stories.ts +133 -0
  17. package/stories/account/pages/applications.stories.ts +196 -0
  18. package/stories/account/pages/federated-identity.stories.ts +78 -0
  19. package/stories/account/pages/log.stories.ts +147 -0
  20. package/stories/account/pages/password.stories.ts +104 -0
  21. package/stories/account/pages/sessions.stories.ts +143 -0
  22. package/stories/account/pages/totp.stories.ts +100 -0
  23. package/stories/login/pages/code.stories.ts +51 -0
  24. package/stories/login/pages/delete-account-confirm.stories.ts +43 -0
  25. package/stories/login/pages/delete-credential.stories.ts +56 -0
  26. package/stories/login/pages/error.stories.ts +56 -0
  27. package/stories/login/pages/frontchannel-logout.stories.ts +26 -0
  28. package/stories/login/pages/idp-review-user-profile.stories.ts +60 -0
  29. package/stories/login/pages/info.stories.ts +94 -0
  30. package/stories/login/pages/login-config-totp.stories.ts +57 -0
  31. package/stories/login/pages/login-device-verify-user-code.stories.ts +14 -0
  32. package/stories/login/pages/login-idp-link-confirm-override.stories.ts +17 -0
  33. package/stories/login/pages/login-idp-link-confirm.stories.ts +103 -0
  34. package/stories/login/pages/login-idp-link-email.stories.ts +102 -0
  35. package/stories/login/pages/login-oauth-grant.stories.ts +68 -0
  36. package/stories/login/pages/login-oauth2-device-verify-user-code.stories.ts +15 -0
  37. package/stories/login/pages/login-otp.stories.ts +94 -0
  38. package/stories/login/pages/login-page-expired.stories.ts +31 -0
  39. package/stories/login/pages/login-passkeys-conditional-authenticate.stories.ts +16 -0
  40. package/stories/login/pages/login-password.stories.ts +52 -0
  41. package/stories/login/pages/login-recovery-authn-code-config.stories.ts +31 -0
  42. package/stories/login/pages/login-recovery-authn-code-input.stories.ts +16 -0
  43. package/stories/login/pages/login-reset-otp.stories.ts +71 -0
  44. package/stories/login/pages/login-reset-password.stories.ts +50 -0
  45. package/stories/login/pages/login-update-password.stories.ts +46 -0
  46. package/stories/login/pages/login-update-profile.stories.ts +31 -0
  47. package/stories/login/pages/login-username.stories.ts +28 -0
  48. package/stories/login/pages/login-verify-email.stories.ts +98 -0
  49. package/stories/login/pages/login-x509-info.stories.ts +40 -0
  50. package/stories/login/pages/login.stories.ts +260 -0
  51. package/stories/login/pages/logout-confirm.stories.ts +44 -0
  52. package/stories/login/pages/register.stories.ts +230 -0
  53. package/stories/login/pages/saml-post-form.stories.ts +17 -0
  54. package/stories/login/pages/select-authenticator.stories.ts +95 -0
  55. package/stories/login/pages/terms.stories.ts +79 -0
  56. package/stories/login/pages/update-email.stories.ts +31 -0
  57. package/stories/login/pages/webauthn-authenticate.stories.ts +126 -0
  58. package/stories/login/pages/webauthn-error.stories.ts +62 -0
  59. package/stories/login/pages/webauthn-register.stories.ts +46 -0
  60. package/src/bin/tools/runFormat.ts +0 -71
  61. package/src/stories/login/pages/login/login.stories.ts +0 -146
@@ -0,0 +1,1250 @@
1
+ "use strict";
2
+ exports.id = 402;
3
+ exports.ids = [402];
4
+ exports.modules = {
5
+
6
+ /***/ 672:
7
+ /***/ ((__unused_webpack_module, exports) => {
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "__esModule", ({
12
+ value: true
13
+ }));
14
+ exports.withPromise = exports.withCallback = void 0;
15
+
16
+ /**
17
+ * Open the input with a normal callback function
18
+ *
19
+ * @param {Input} input - input object
20
+ * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
21
+ * @param {function} callback - callback function
22
+ */
23
+ const withCallback = (input, valueMapper, callback) => {
24
+ input.open();
25
+ input.onSelect((id, value) => callback(valueMapper(id, value)));
26
+ };
27
+ /**
28
+ * Open the input with a promise
29
+ *
30
+ * @param {Input} input - input object
31
+ * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
32
+ */
33
+
34
+
35
+ exports.withCallback = withCallback;
36
+
37
+ const withPromise = (input, valueMapper) => {
38
+ return new Promise((resolve, reject) => {
39
+ input.open();
40
+ input.onSelect((id, value) => {
41
+ if (id === null) {
42
+ reject();
43
+ } else {
44
+ resolve(valueMapper(id, value));
45
+ }
46
+ });
47
+ });
48
+ };
49
+
50
+ exports.withPromise = withPromise;
51
+
52
+ /***/ }),
53
+
54
+ /***/ 546:
55
+ /***/ ((module, exports, __webpack_require__) => {
56
+
57
+
58
+
59
+ Object.defineProperty(exports, "__esModule", ({
60
+ value: true
61
+ }));
62
+ exports["default"] = void 0;
63
+
64
+ var _input = _interopRequireDefault(__webpack_require__(938));
65
+
66
+ var _renderer = _interopRequireDefault(__webpack_require__(547));
67
+
68
+ var _callbackMappers = __webpack_require__(672);
69
+
70
+ var _valueMappers = __webpack_require__(348);
71
+
72
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73
+
74
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
75
+
76
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
77
+
78
+ /**
79
+ * Default options
80
+ */
81
+ const defaultOptions = {
82
+ outputStream: process.stdout,
83
+ inputStream: process.stdin,
84
+ values: [],
85
+ defaultValue: 0,
86
+ selected: '(x)',
87
+ unselected: '( )',
88
+ indentation: 0,
89
+ cleanup: true,
90
+ valueRenderer: value => value
91
+ };
92
+ /**
93
+ * Create an instance of cli-select with the given options
94
+ *
95
+ * @param {object} options - options for cli-select
96
+ * @param {function} callback - if specified, a callback will be used, otherwise a promise gets returned (optional)
97
+ */
98
+
99
+ const creator = (options, callback) => {
100
+ // merge options with default options
101
+ options = _objectSpread({}, defaultOptions, options); // create renderer and input instances
102
+
103
+ const renderer = new _renderer.default(options, options.outputStream);
104
+ const input = new _input.default(options.inputStream);
105
+ input.setDefaultValue(options.defaultValue);
106
+ input.attachRenderer(renderer); // handle array and object values
107
+
108
+ let valueMapper;
109
+
110
+ if (Array.isArray(options.values)) {
111
+ valueMapper = (0, _valueMappers.withArrayValues)(options);
112
+ } else {
113
+ valueMapper = (0, _valueMappers.withObjectValues)(options);
114
+ } // map values
115
+
116
+
117
+ options.values = valueMapper.input;
118
+ input.setValues(options.values); // handle different callback methods
119
+
120
+ if (typeof callback === 'function') {
121
+ return (0, _callbackMappers.withCallback)(input, valueMapper.output, callback);
122
+ } else {
123
+ return (0, _callbackMappers.withPromise)(input, valueMapper.output);
124
+ }
125
+ };
126
+
127
+ exports = module.exports = creator;
128
+ Object.defineProperty(exports, "__esModule", ({
129
+ value: true
130
+ }));
131
+ var _default = creator;
132
+ exports["default"] = _default;
133
+
134
+ /***/ }),
135
+
136
+ /***/ 938:
137
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
138
+
139
+
140
+
141
+ Object.defineProperty(exports, "__esModule", ({
142
+ value: true
143
+ }));
144
+ exports["default"] = void 0;
145
+
146
+ var _readline = _interopRequireDefault(__webpack_require__(785));
147
+
148
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
149
+
150
+ /**
151
+ * Handle cli input
152
+ */
153
+ class Input {
154
+ /**
155
+ * Input constructor
156
+ *
157
+ * @param {any} stream - stream to catch (optional)
158
+ */
159
+ constructor(stream = process.stdin) {
160
+ // set default values
161
+ this.stream = stream;
162
+ this.values = [];
163
+ this.selectedValue = 0;
164
+
165
+ this.onSelectListener = () => {};
166
+
167
+ this.onKeyPress = this.onKeyPress.bind(this);
168
+ }
169
+ /**
170
+ * Set the available values
171
+ *
172
+ * @param {array} values - all available values
173
+ */
174
+
175
+
176
+ setValues(values) {
177
+ this.values = values;
178
+
179
+ if (this.renderer) {
180
+ this.renderer.setValues(values);
181
+ }
182
+ }
183
+ /**
184
+ * Set the default value
185
+ *
186
+ * @param {number} defaultValue - default value id
187
+ */
188
+
189
+
190
+ setDefaultValue(defaultValue) {
191
+ this.selectedValue = defaultValue;
192
+ }
193
+ /**
194
+ * Attach a renderer to the input catcher
195
+ *
196
+ * @param {Renderer} renderer - renderer to use for rendering responses
197
+ */
198
+
199
+
200
+ attachRenderer(renderer) {
201
+ this.renderer = renderer;
202
+ this.renderer.setValues(this.values);
203
+ }
204
+ /**
205
+ * Register an on select listener
206
+ *
207
+ * @param {function} listener - listener function which receives two parameters: valueId and value
208
+ */
209
+
210
+
211
+ onSelect(listener) {
212
+ this.onSelectListener = listener;
213
+ }
214
+ /**
215
+ * Open the stream and listen for input
216
+ */
217
+
218
+
219
+ open() {
220
+ // register keypress event
221
+ _readline.default.emitKeypressEvents(this.stream); // handle keypress
222
+
223
+
224
+ this.stream.on('keypress', this.onKeyPress); // initially render the response
225
+
226
+ if (this.renderer) {
227
+ this.renderer.render(this.selectedValue);
228
+ } // hide pressed keys and start listening on input
229
+
230
+
231
+ this.stream.setRawMode(true);
232
+ this.stream.resume();
233
+ }
234
+ /**
235
+ * Close the stream
236
+ *
237
+ * @param {boolean} cancelled - true if no value was selected (optional)
238
+ */
239
+
240
+
241
+ close(cancelled = false) {
242
+ // reset stream properties
243
+ this.stream.setRawMode(false);
244
+ this.stream.pause(); // cleanup the output
245
+
246
+ if (this.renderer) {
247
+ this.renderer.cleanup();
248
+ } // call the on select listener
249
+
250
+
251
+ if (cancelled) {
252
+ this.onSelectListener(null);
253
+ } else {
254
+ this.onSelectListener(this.selectedValue, this.values[this.selectedValue]);
255
+ }
256
+
257
+ this.stream.removeListener('keypress', this.onKeyPress);
258
+ }
259
+ /**
260
+ * Render the response
261
+ */
262
+
263
+
264
+ render() {
265
+ if (!this.renderer) {
266
+ return;
267
+ }
268
+
269
+ this.renderer.render(this.selectedValue);
270
+ }
271
+ /**
272
+ * Handle key press event
273
+ *
274
+ * @param {string} string - input string
275
+ * @param {object} key - object containing information about the pressed key
276
+ */
277
+
278
+
279
+ onKeyPress(string, key) {
280
+ if (key) {
281
+ if (key.name === 'up' && this.selectedValue > 0) {
282
+ this.selectedValue--;
283
+ this.render();
284
+ } else if (key.name === 'down' && this.selectedValue + 1 < this.values.length) {
285
+ this.selectedValue++;
286
+ this.render();
287
+ } else if (key.name === 'return') {
288
+ this.close();
289
+ } else if (key.name === 'escape' || key.name === 'c' && key.ctrl) {
290
+ this.close(true);
291
+ }
292
+ }
293
+ }
294
+
295
+ }
296
+
297
+ exports["default"] = Input;
298
+
299
+ /***/ }),
300
+
301
+ /***/ 547:
302
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
303
+
304
+
305
+
306
+ Object.defineProperty(exports, "__esModule", ({
307
+ value: true
308
+ }));
309
+ exports["default"] = void 0;
310
+
311
+ var _readline = _interopRequireDefault(__webpack_require__(785));
312
+
313
+ var _ansiEscapes = __webpack_require__(719);
314
+
315
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
316
+
317
+ /**
318
+ * Response renderer
319
+ */
320
+ class Renderer {
321
+ /**
322
+ * Renderer constructor
323
+ *
324
+ * @param {object} options - renderer options
325
+ * @param {any} stream - stream to write to (optional)
326
+ */
327
+ constructor(options, stream = process.stdout) {
328
+ this.options = options;
329
+ this.stream = stream;
330
+ this.values = [];
331
+ this.initialRender = true;
332
+ }
333
+ /**
334
+ * Set the available values
335
+ *
336
+ * @param {array} values - all available values
337
+ */
338
+
339
+
340
+ setValues(values) {
341
+ this.values = values;
342
+ }
343
+ /**
344
+ * Render the values
345
+ *
346
+ * @param {number} selectedValue - selected value (optional)
347
+ */
348
+
349
+
350
+ render(selectedValue = 0) {
351
+ if (this.initialRender) {
352
+ // hide the cursor initially
353
+ this.initialRender = false;
354
+ this.stream.write(_ansiEscapes.cursorHide);
355
+ } else {
356
+ // remove previous lines and values
357
+ this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
358
+ } // output the current values
359
+
360
+
361
+ this.values.forEach((value, index) => {
362
+ const symbol = selectedValue === index ? this.options.selected : this.options.unselected;
363
+ const indentation = ' '.repeat(this.options.indentation);
364
+ const renderedValue = this.options.valueRenderer(value, selectedValue === index);
365
+ const end = index !== this.values.length - 1 ? '\n' : '';
366
+ this.stream.write(indentation + symbol + ' ' + renderedValue + end);
367
+ });
368
+ }
369
+ /**
370
+ * Cleanup the console at the end
371
+ */
372
+
373
+
374
+ cleanup() {
375
+ this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
376
+ this.stream.write(_ansiEscapes.cursorShow);
377
+ }
378
+
379
+ }
380
+
381
+ exports["default"] = Renderer;
382
+
383
+ /***/ }),
384
+
385
+ /***/ 348:
386
+ /***/ ((__unused_webpack_module, exports) => {
387
+
388
+
389
+
390
+ Object.defineProperty(exports, "__esModule", ({
391
+ value: true
392
+ }));
393
+ exports.withObjectValues = exports.withArrayValues = void 0;
394
+
395
+ /**
396
+ * Map incoming and outgoing values if the initial values are an array
397
+ *
398
+ * @param {object} options - cli-select options
399
+ */
400
+ const withArrayValues = options => {
401
+ return {
402
+ input: options.values,
403
+ output: (id, value) => {
404
+ return {
405
+ id,
406
+ value
407
+ };
408
+ }
409
+ };
410
+ };
411
+ /**
412
+ * Map incoming and outgoing values if the initial values are an object
413
+ *
414
+ * @param {object} options - cli-select options
415
+ */
416
+
417
+
418
+ exports.withArrayValues = withArrayValues;
419
+
420
+ const withObjectValues = options => {
421
+ const originalValues = options.values;
422
+ return {
423
+ input: Object.values(originalValues),
424
+ output: (id, value) => {
425
+ return {
426
+ id: Object.keys(originalValues)[id],
427
+ value
428
+ };
429
+ }
430
+ };
431
+ };
432
+
433
+ exports.withObjectValues = withObjectValues;
434
+
435
+ /***/ }),
436
+
437
+ /***/ 719:
438
+ /***/ ((module) => {
439
+
440
+
441
+ const x = module.exports;
442
+ const ESC = '\u001B[';
443
+ const OSC = '\u001B]';
444
+ const BEL = '\u0007';
445
+ const SEP = ';';
446
+ const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
447
+
448
+ x.cursorTo = (x, y) => {
449
+ if (typeof x !== 'number') {
450
+ throw new TypeError('The `x` argument is required');
451
+ }
452
+
453
+ if (typeof y !== 'number') {
454
+ return ESC + (x + 1) + 'G';
455
+ }
456
+
457
+ return ESC + (y + 1) + ';' + (x + 1) + 'H';
458
+ };
459
+
460
+ x.cursorMove = (x, y) => {
461
+ if (typeof x !== 'number') {
462
+ throw new TypeError('The `x` argument is required');
463
+ }
464
+
465
+ let ret = '';
466
+
467
+ if (x < 0) {
468
+ ret += ESC + (-x) + 'D';
469
+ } else if (x > 0) {
470
+ ret += ESC + x + 'C';
471
+ }
472
+
473
+ if (y < 0) {
474
+ ret += ESC + (-y) + 'A';
475
+ } else if (y > 0) {
476
+ ret += ESC + y + 'B';
477
+ }
478
+
479
+ return ret;
480
+ };
481
+
482
+ x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
483
+ x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
484
+ x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
485
+ x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
486
+
487
+ x.cursorLeft = ESC + 'G';
488
+ x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
489
+ x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
490
+ x.cursorGetPosition = ESC + '6n';
491
+ x.cursorNextLine = ESC + 'E';
492
+ x.cursorPrevLine = ESC + 'F';
493
+ x.cursorHide = ESC + '?25l';
494
+ x.cursorShow = ESC + '?25h';
495
+
496
+ x.eraseLines = count => {
497
+ let clear = '';
498
+
499
+ for (let i = 0; i < count; i++) {
500
+ clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
501
+ }
502
+
503
+ if (count) {
504
+ clear += x.cursorLeft;
505
+ }
506
+
507
+ return clear;
508
+ };
509
+
510
+ x.eraseEndLine = ESC + 'K';
511
+ x.eraseStartLine = ESC + '1K';
512
+ x.eraseLine = ESC + '2K';
513
+ x.eraseDown = ESC + 'J';
514
+ x.eraseUp = ESC + '1J';
515
+ x.eraseScreen = ESC + '2J';
516
+ x.scrollUp = ESC + 'S';
517
+ x.scrollDown = ESC + 'T';
518
+
519
+ x.clearScreen = '\u001Bc';
520
+
521
+ x.clearTerminal = process.platform === 'win32' ?
522
+ `${x.eraseScreen}${ESC}0f` :
523
+ // 1. Erases the screen (Only done in case `2` is not supported)
524
+ // 2. Erases the whole screen including scrollback buffer
525
+ // 3. Moves cursor to the top-left position
526
+ // More info: https://www.real-world-systems.com/docs/ANSIcode.html
527
+ `${x.eraseScreen}${ESC}3J${ESC}H`;
528
+
529
+ x.beep = BEL;
530
+
531
+ x.link = (text, url) => {
532
+ return [
533
+ OSC,
534
+ '8',
535
+ SEP,
536
+ SEP,
537
+ url,
538
+ BEL,
539
+ text,
540
+ OSC,
541
+ '8',
542
+ SEP,
543
+ SEP,
544
+ BEL
545
+ ].join('');
546
+ };
547
+
548
+ x.image = (buf, opts) => {
549
+ opts = opts || {};
550
+
551
+ let ret = OSC + '1337;File=inline=1';
552
+
553
+ if (opts.width) {
554
+ ret += `;width=${opts.width}`;
555
+ }
556
+
557
+ if (opts.height) {
558
+ ret += `;height=${opts.height}`;
559
+ }
560
+
561
+ if (opts.preserveAspectRatio === false) {
562
+ ret += ';preserveAspectRatio=0';
563
+ }
564
+
565
+ return ret + ':' + buf.toString('base64') + BEL;
566
+ };
567
+
568
+ x.iTerm = {};
569
+
570
+ x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
571
+
572
+
573
+ /***/ }),
574
+
575
+ /***/ 797:
576
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
577
+
578
+
579
+ // EXPORTS
580
+ __webpack_require__.d(__webpack_exports__, {
581
+ Ay: () => (/* binding */ source)
582
+ });
583
+
584
+ // UNUSED EXPORTS: Chalk, backgroundColorNames, backgroundColors, chalkStderr, colorNames, colors, foregroundColorNames, foregroundColors, modifierNames, modifiers, supportsColor, supportsColorStderr
585
+
586
+ ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/ansi-styles/index.js
587
+ const ANSI_BACKGROUND_OFFSET = 10;
588
+
589
+ const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
590
+
591
+ const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
592
+
593
+ const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
594
+
595
+ const styles = {
596
+ modifier: {
597
+ reset: [0, 0],
598
+ // 21 isn't widely supported and 22 does the same thing
599
+ bold: [1, 22],
600
+ dim: [2, 22],
601
+ italic: [3, 23],
602
+ underline: [4, 24],
603
+ overline: [53, 55],
604
+ inverse: [7, 27],
605
+ hidden: [8, 28],
606
+ strikethrough: [9, 29],
607
+ },
608
+ color: {
609
+ black: [30, 39],
610
+ red: [31, 39],
611
+ green: [32, 39],
612
+ yellow: [33, 39],
613
+ blue: [34, 39],
614
+ magenta: [35, 39],
615
+ cyan: [36, 39],
616
+ white: [37, 39],
617
+
618
+ // Bright color
619
+ blackBright: [90, 39],
620
+ gray: [90, 39], // Alias of `blackBright`
621
+ grey: [90, 39], // Alias of `blackBright`
622
+ redBright: [91, 39],
623
+ greenBright: [92, 39],
624
+ yellowBright: [93, 39],
625
+ blueBright: [94, 39],
626
+ magentaBright: [95, 39],
627
+ cyanBright: [96, 39],
628
+ whiteBright: [97, 39],
629
+ },
630
+ bgColor: {
631
+ bgBlack: [40, 49],
632
+ bgRed: [41, 49],
633
+ bgGreen: [42, 49],
634
+ bgYellow: [43, 49],
635
+ bgBlue: [44, 49],
636
+ bgMagenta: [45, 49],
637
+ bgCyan: [46, 49],
638
+ bgWhite: [47, 49],
639
+
640
+ // Bright color
641
+ bgBlackBright: [100, 49],
642
+ bgGray: [100, 49], // Alias of `bgBlackBright`
643
+ bgGrey: [100, 49], // Alias of `bgBlackBright`
644
+ bgRedBright: [101, 49],
645
+ bgGreenBright: [102, 49],
646
+ bgYellowBright: [103, 49],
647
+ bgBlueBright: [104, 49],
648
+ bgMagentaBright: [105, 49],
649
+ bgCyanBright: [106, 49],
650
+ bgWhiteBright: [107, 49],
651
+ },
652
+ };
653
+
654
+ const modifierNames = Object.keys(styles.modifier);
655
+ const foregroundColorNames = Object.keys(styles.color);
656
+ const backgroundColorNames = Object.keys(styles.bgColor);
657
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
658
+
659
+ function assembleStyles() {
660
+ const codes = new Map();
661
+
662
+ for (const [groupName, group] of Object.entries(styles)) {
663
+ for (const [styleName, style] of Object.entries(group)) {
664
+ styles[styleName] = {
665
+ open: `\u001B[${style[0]}m`,
666
+ close: `\u001B[${style[1]}m`,
667
+ };
668
+
669
+ group[styleName] = styles[styleName];
670
+
671
+ codes.set(style[0], style[1]);
672
+ }
673
+
674
+ Object.defineProperty(styles, groupName, {
675
+ value: group,
676
+ enumerable: false,
677
+ });
678
+ }
679
+
680
+ Object.defineProperty(styles, 'codes', {
681
+ value: codes,
682
+ enumerable: false,
683
+ });
684
+
685
+ styles.color.close = '\u001B[39m';
686
+ styles.bgColor.close = '\u001B[49m';
687
+
688
+ styles.color.ansi = wrapAnsi16();
689
+ styles.color.ansi256 = wrapAnsi256();
690
+ styles.color.ansi16m = wrapAnsi16m();
691
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
692
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
693
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
694
+
695
+ // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
696
+ Object.defineProperties(styles, {
697
+ rgbToAnsi256: {
698
+ value(red, green, blue) {
699
+ // We use the extended greyscale palette here, with the exception of
700
+ // black and white. normal palette only has 4 greyscale shades.
701
+ if (red === green && green === blue) {
702
+ if (red < 8) {
703
+ return 16;
704
+ }
705
+
706
+ if (red > 248) {
707
+ return 231;
708
+ }
709
+
710
+ return Math.round(((red - 8) / 247) * 24) + 232;
711
+ }
712
+
713
+ return 16
714
+ + (36 * Math.round(red / 255 * 5))
715
+ + (6 * Math.round(green / 255 * 5))
716
+ + Math.round(blue / 255 * 5);
717
+ },
718
+ enumerable: false,
719
+ },
720
+ hexToRgb: {
721
+ value(hex) {
722
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
723
+ if (!matches) {
724
+ return [0, 0, 0];
725
+ }
726
+
727
+ let [colorString] = matches;
728
+
729
+ if (colorString.length === 3) {
730
+ colorString = [...colorString].map(character => character + character).join('');
731
+ }
732
+
733
+ const integer = Number.parseInt(colorString, 16);
734
+
735
+ return [
736
+ /* eslint-disable no-bitwise */
737
+ (integer >> 16) & 0xFF,
738
+ (integer >> 8) & 0xFF,
739
+ integer & 0xFF,
740
+ /* eslint-enable no-bitwise */
741
+ ];
742
+ },
743
+ enumerable: false,
744
+ },
745
+ hexToAnsi256: {
746
+ value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
747
+ enumerable: false,
748
+ },
749
+ ansi256ToAnsi: {
750
+ value(code) {
751
+ if (code < 8) {
752
+ return 30 + code;
753
+ }
754
+
755
+ if (code < 16) {
756
+ return 90 + (code - 8);
757
+ }
758
+
759
+ let red;
760
+ let green;
761
+ let blue;
762
+
763
+ if (code >= 232) {
764
+ red = (((code - 232) * 10) + 8) / 255;
765
+ green = red;
766
+ blue = red;
767
+ } else {
768
+ code -= 16;
769
+
770
+ const remainder = code % 36;
771
+
772
+ red = Math.floor(code / 36) / 5;
773
+ green = Math.floor(remainder / 6) / 5;
774
+ blue = (remainder % 6) / 5;
775
+ }
776
+
777
+ const value = Math.max(red, green, blue) * 2;
778
+
779
+ if (value === 0) {
780
+ return 30;
781
+ }
782
+
783
+ // eslint-disable-next-line no-bitwise
784
+ let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
785
+
786
+ if (value === 2) {
787
+ result += 60;
788
+ }
789
+
790
+ return result;
791
+ },
792
+ enumerable: false,
793
+ },
794
+ rgbToAnsi: {
795
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
796
+ enumerable: false,
797
+ },
798
+ hexToAnsi: {
799
+ value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
800
+ enumerable: false,
801
+ },
802
+ });
803
+
804
+ return styles;
805
+ }
806
+
807
+ const ansiStyles = assembleStyles();
808
+
809
+ /* harmony default export */ const ansi_styles = (ansiStyles);
810
+
811
+ // EXTERNAL MODULE: external "node:process"
812
+ var external_node_process_ = __webpack_require__(708);
813
+ // EXTERNAL MODULE: external "node:os"
814
+ var external_node_os_ = __webpack_require__(161);
815
+ // EXTERNAL MODULE: external "node:tty"
816
+ var external_node_tty_ = __webpack_require__(66);
817
+ ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/supports-color/index.js
818
+
819
+
820
+
821
+
822
+ // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
823
+ /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
824
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_.argv) {
825
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
826
+ const position = argv.indexOf(prefix + flag);
827
+ const terminatorPosition = argv.indexOf('--');
828
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
829
+ }
830
+
831
+ const {env} = external_node_process_;
832
+
833
+ let flagForceColor;
834
+ if (
835
+ hasFlag('no-color')
836
+ || hasFlag('no-colors')
837
+ || hasFlag('color=false')
838
+ || hasFlag('color=never')
839
+ ) {
840
+ flagForceColor = 0;
841
+ } else if (
842
+ hasFlag('color')
843
+ || hasFlag('colors')
844
+ || hasFlag('color=true')
845
+ || hasFlag('color=always')
846
+ ) {
847
+ flagForceColor = 1;
848
+ }
849
+
850
+ function envForceColor() {
851
+ if ('FORCE_COLOR' in env) {
852
+ if (env.FORCE_COLOR === 'true') {
853
+ return 1;
854
+ }
855
+
856
+ if (env.FORCE_COLOR === 'false') {
857
+ return 0;
858
+ }
859
+
860
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
861
+ }
862
+ }
863
+
864
+ function translateLevel(level) {
865
+ if (level === 0) {
866
+ return false;
867
+ }
868
+
869
+ return {
870
+ level,
871
+ hasBasic: true,
872
+ has256: level >= 2,
873
+ has16m: level >= 3,
874
+ };
875
+ }
876
+
877
+ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
878
+ const noFlagForceColor = envForceColor();
879
+ if (noFlagForceColor !== undefined) {
880
+ flagForceColor = noFlagForceColor;
881
+ }
882
+
883
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
884
+
885
+ if (forceColor === 0) {
886
+ return 0;
887
+ }
888
+
889
+ if (sniffFlags) {
890
+ if (hasFlag('color=16m')
891
+ || hasFlag('color=full')
892
+ || hasFlag('color=truecolor')) {
893
+ return 3;
894
+ }
895
+
896
+ if (hasFlag('color=256')) {
897
+ return 2;
898
+ }
899
+ }
900
+
901
+ // Check for Azure DevOps pipelines.
902
+ // Has to be above the `!streamIsTTY` check.
903
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
904
+ return 1;
905
+ }
906
+
907
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
908
+ return 0;
909
+ }
910
+
911
+ const min = forceColor || 0;
912
+
913
+ if (env.TERM === 'dumb') {
914
+ return min;
915
+ }
916
+
917
+ if (external_node_process_.platform === 'win32') {
918
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
919
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
920
+ const osRelease = external_node_os_.release().split('.');
921
+ if (
922
+ Number(osRelease[0]) >= 10
923
+ && Number(osRelease[2]) >= 10_586
924
+ ) {
925
+ return Number(osRelease[2]) >= 14_931 ? 3 : 2;
926
+ }
927
+
928
+ return 1;
929
+ }
930
+
931
+ if ('CI' in env) {
932
+ if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
933
+ return 3;
934
+ }
935
+
936
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
937
+ return 1;
938
+ }
939
+
940
+ return min;
941
+ }
942
+
943
+ if ('TEAMCITY_VERSION' in env) {
944
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
945
+ }
946
+
947
+ if (env.COLORTERM === 'truecolor') {
948
+ return 3;
949
+ }
950
+
951
+ if (env.TERM === 'xterm-kitty') {
952
+ return 3;
953
+ }
954
+
955
+ if ('TERM_PROGRAM' in env) {
956
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
957
+
958
+ switch (env.TERM_PROGRAM) {
959
+ case 'iTerm.app': {
960
+ return version >= 3 ? 3 : 2;
961
+ }
962
+
963
+ case 'Apple_Terminal': {
964
+ return 2;
965
+ }
966
+ // No default
967
+ }
968
+ }
969
+
970
+ if (/-256(color)?$/i.test(env.TERM)) {
971
+ return 2;
972
+ }
973
+
974
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
975
+ return 1;
976
+ }
977
+
978
+ if ('COLORTERM' in env) {
979
+ return 1;
980
+ }
981
+
982
+ return min;
983
+ }
984
+
985
+ function createSupportsColor(stream, options = {}) {
986
+ const level = _supportsColor(stream, {
987
+ streamIsTTY: stream && stream.isTTY,
988
+ ...options,
989
+ });
990
+
991
+ return translateLevel(level);
992
+ }
993
+
994
+ const supportsColor = {
995
+ stdout: createSupportsColor({isTTY: external_node_tty_.isatty(1)}),
996
+ stderr: createSupportsColor({isTTY: external_node_tty_.isatty(2)}),
997
+ };
998
+
999
+ /* harmony default export */ const supports_color = (supportsColor);
1000
+
1001
+ ;// CONCATENATED MODULE: ./node_modules/chalk/source/utilities.js
1002
+ // TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
1003
+ function stringReplaceAll(string, substring, replacer) {
1004
+ let index = string.indexOf(substring);
1005
+ if (index === -1) {
1006
+ return string;
1007
+ }
1008
+
1009
+ const substringLength = substring.length;
1010
+ let endIndex = 0;
1011
+ let returnValue = '';
1012
+ do {
1013
+ returnValue += string.slice(endIndex, index) + substring + replacer;
1014
+ endIndex = index + substringLength;
1015
+ index = string.indexOf(substring, endIndex);
1016
+ } while (index !== -1);
1017
+
1018
+ returnValue += string.slice(endIndex);
1019
+ return returnValue;
1020
+ }
1021
+
1022
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1023
+ let endIndex = 0;
1024
+ let returnValue = '';
1025
+ do {
1026
+ const gotCR = string[index - 1] === '\r';
1027
+ returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
1028
+ endIndex = index + 1;
1029
+ index = string.indexOf('\n', endIndex);
1030
+ } while (index !== -1);
1031
+
1032
+ returnValue += string.slice(endIndex);
1033
+ return returnValue;
1034
+ }
1035
+
1036
+ ;// CONCATENATED MODULE: ./node_modules/chalk/source/index.js
1037
+
1038
+
1039
+
1040
+
1041
+ const {stdout: stdoutColor, stderr: stderrColor} = supports_color;
1042
+
1043
+ const GENERATOR = Symbol('GENERATOR');
1044
+ const STYLER = Symbol('STYLER');
1045
+ const IS_EMPTY = Symbol('IS_EMPTY');
1046
+
1047
+ // `supportsColor.level` → `ansiStyles.color[name]` mapping
1048
+ const levelMapping = [
1049
+ 'ansi',
1050
+ 'ansi',
1051
+ 'ansi256',
1052
+ 'ansi16m',
1053
+ ];
1054
+
1055
+ const source_styles = Object.create(null);
1056
+
1057
+ const applyOptions = (object, options = {}) => {
1058
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1059
+ throw new Error('The `level` option should be an integer from 0 to 3');
1060
+ }
1061
+
1062
+ // Detect level if not set manually
1063
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1064
+ object.level = options.level === undefined ? colorLevel : options.level;
1065
+ };
1066
+
1067
+ class Chalk {
1068
+ constructor(options) {
1069
+ // eslint-disable-next-line no-constructor-return
1070
+ return chalkFactory(options);
1071
+ }
1072
+ }
1073
+
1074
+ const chalkFactory = options => {
1075
+ const chalk = (...strings) => strings.join(' ');
1076
+ applyOptions(chalk, options);
1077
+
1078
+ Object.setPrototypeOf(chalk, createChalk.prototype);
1079
+
1080
+ return chalk;
1081
+ };
1082
+
1083
+ function createChalk(options) {
1084
+ return chalkFactory(options);
1085
+ }
1086
+
1087
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
1088
+
1089
+ for (const [styleName, style] of Object.entries(ansi_styles)) {
1090
+ source_styles[styleName] = {
1091
+ get() {
1092
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
1093
+ Object.defineProperty(this, styleName, {value: builder});
1094
+ return builder;
1095
+ },
1096
+ };
1097
+ }
1098
+
1099
+ source_styles.visible = {
1100
+ get() {
1101
+ const builder = createBuilder(this, this[STYLER], true);
1102
+ Object.defineProperty(this, 'visible', {value: builder});
1103
+ return builder;
1104
+ },
1105
+ };
1106
+
1107
+ const getModelAnsi = (model, level, type, ...arguments_) => {
1108
+ if (model === 'rgb') {
1109
+ if (level === 'ansi16m') {
1110
+ return ansi_styles[type].ansi16m(...arguments_);
1111
+ }
1112
+
1113
+ if (level === 'ansi256') {
1114
+ return ansi_styles[type].ansi256(ansi_styles.rgbToAnsi256(...arguments_));
1115
+ }
1116
+
1117
+ return ansi_styles[type].ansi(ansi_styles.rgbToAnsi(...arguments_));
1118
+ }
1119
+
1120
+ if (model === 'hex') {
1121
+ return getModelAnsi('rgb', level, type, ...ansi_styles.hexToRgb(...arguments_));
1122
+ }
1123
+
1124
+ return ansi_styles[type][model](...arguments_);
1125
+ };
1126
+
1127
+ const usedModels = ['rgb', 'hex', 'ansi256'];
1128
+
1129
+ for (const model of usedModels) {
1130
+ source_styles[model] = {
1131
+ get() {
1132
+ const {level} = this;
1133
+ return function (...arguments_) {
1134
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansi_styles.color.close, this[STYLER]);
1135
+ return createBuilder(this, styler, this[IS_EMPTY]);
1136
+ };
1137
+ },
1138
+ };
1139
+
1140
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
1141
+ source_styles[bgModel] = {
1142
+ get() {
1143
+ const {level} = this;
1144
+ return function (...arguments_) {
1145
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansi_styles.bgColor.close, this[STYLER]);
1146
+ return createBuilder(this, styler, this[IS_EMPTY]);
1147
+ };
1148
+ },
1149
+ };
1150
+ }
1151
+
1152
+ const proto = Object.defineProperties(() => {}, {
1153
+ ...source_styles,
1154
+ level: {
1155
+ enumerable: true,
1156
+ get() {
1157
+ return this[GENERATOR].level;
1158
+ },
1159
+ set(level) {
1160
+ this[GENERATOR].level = level;
1161
+ },
1162
+ },
1163
+ });
1164
+
1165
+ const createStyler = (open, close, parent) => {
1166
+ let openAll;
1167
+ let closeAll;
1168
+ if (parent === undefined) {
1169
+ openAll = open;
1170
+ closeAll = close;
1171
+ } else {
1172
+ openAll = parent.openAll + open;
1173
+ closeAll = close + parent.closeAll;
1174
+ }
1175
+
1176
+ return {
1177
+ open,
1178
+ close,
1179
+ openAll,
1180
+ closeAll,
1181
+ parent,
1182
+ };
1183
+ };
1184
+
1185
+ const createBuilder = (self, _styler, _isEmpty) => {
1186
+ // Single argument is hot path, implicit coercion is faster than anything
1187
+ // eslint-disable-next-line no-implicit-coercion
1188
+ const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
1189
+
1190
+ // We alter the prototype because we must return a function, but there is
1191
+ // no way to create a function with a different prototype
1192
+ Object.setPrototypeOf(builder, proto);
1193
+
1194
+ builder[GENERATOR] = self;
1195
+ builder[STYLER] = _styler;
1196
+ builder[IS_EMPTY] = _isEmpty;
1197
+
1198
+ return builder;
1199
+ };
1200
+
1201
+ const applyStyle = (self, string) => {
1202
+ if (self.level <= 0 || !string) {
1203
+ return self[IS_EMPTY] ? '' : string;
1204
+ }
1205
+
1206
+ let styler = self[STYLER];
1207
+
1208
+ if (styler === undefined) {
1209
+ return string;
1210
+ }
1211
+
1212
+ const {openAll, closeAll} = styler;
1213
+ if (string.includes('\u001B')) {
1214
+ while (styler !== undefined) {
1215
+ // Replace any instances already present with a re-opening code
1216
+ // otherwise only the part of the string until said closing code
1217
+ // will be colored, and the rest will simply be 'plain'.
1218
+ string = stringReplaceAll(string, styler.close, styler.open);
1219
+
1220
+ styler = styler.parent;
1221
+ }
1222
+ }
1223
+
1224
+ // We can move both next actions out of loop, because remaining actions in loop won't have
1225
+ // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
1226
+ // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
1227
+ const lfIndex = string.indexOf('\n');
1228
+ if (lfIndex !== -1) {
1229
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1230
+ }
1231
+
1232
+ return openAll + string + closeAll;
1233
+ };
1234
+
1235
+ Object.defineProperties(createChalk.prototype, source_styles);
1236
+
1237
+ const chalk = createChalk();
1238
+ const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ /* harmony default export */ const source = (chalk);
1245
+
1246
+
1247
+ /***/ })
1248
+
1249
+ };
1250
+ ;