@nsshunt/stsconfig 1.27.56 → 1.27.58

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/dist/index.cjs CHANGED
@@ -6,7 +6,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
9
  var __copyProps = (to, from, except, desc) => {
11
10
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
11
  key = keys[i];
@@ -25,2055 +24,342 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
24
  let node_fs = require("node:fs");
26
25
  let dotenv = require("dotenv");
27
26
  dotenv = __toESM(dotenv);
28
- //#region node_modules/color-name/index.js
29
- var require_color_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
30
- module.exports = {
31
- "aliceblue": [
32
- 240,
33
- 248,
34
- 255
35
- ],
36
- "antiquewhite": [
37
- 250,
38
- 235,
39
- 215
40
- ],
41
- "aqua": [
42
- 0,
43
- 255,
44
- 255
45
- ],
46
- "aquamarine": [
47
- 127,
48
- 255,
49
- 212
50
- ],
51
- "azure": [
52
- 240,
53
- 255,
54
- 255
55
- ],
56
- "beige": [
57
- 245,
58
- 245,
59
- 220
60
- ],
61
- "bisque": [
62
- 255,
63
- 228,
64
- 196
65
- ],
66
- "black": [
67
- 0,
68
- 0,
69
- 0
70
- ],
71
- "blanchedalmond": [
72
- 255,
73
- 235,
74
- 205
75
- ],
76
- "blue": [
77
- 0,
78
- 0,
79
- 255
80
- ],
81
- "blueviolet": [
82
- 138,
83
- 43,
84
- 226
85
- ],
86
- "brown": [
87
- 165,
88
- 42,
89
- 42
90
- ],
91
- "burlywood": [
92
- 222,
93
- 184,
94
- 135
95
- ],
96
- "cadetblue": [
97
- 95,
98
- 158,
99
- 160
100
- ],
101
- "chartreuse": [
102
- 127,
103
- 255,
104
- 0
105
- ],
106
- "chocolate": [
107
- 210,
108
- 105,
109
- 30
110
- ],
111
- "coral": [
112
- 255,
113
- 127,
114
- 80
115
- ],
116
- "cornflowerblue": [
117
- 100,
118
- 149,
119
- 237
120
- ],
121
- "cornsilk": [
122
- 255,
123
- 248,
124
- 220
125
- ],
126
- "crimson": [
127
- 220,
128
- 20,
129
- 60
130
- ],
131
- "cyan": [
132
- 0,
133
- 255,
134
- 255
135
- ],
136
- "darkblue": [
137
- 0,
138
- 0,
139
- 139
140
- ],
141
- "darkcyan": [
142
- 0,
143
- 139,
144
- 139
145
- ],
146
- "darkgoldenrod": [
147
- 184,
148
- 134,
149
- 11
150
- ],
151
- "darkgray": [
152
- 169,
153
- 169,
154
- 169
155
- ],
156
- "darkgreen": [
157
- 0,
158
- 100,
159
- 0
160
- ],
161
- "darkgrey": [
162
- 169,
163
- 169,
164
- 169
165
- ],
166
- "darkkhaki": [
167
- 189,
168
- 183,
169
- 107
170
- ],
171
- "darkmagenta": [
172
- 139,
173
- 0,
174
- 139
175
- ],
176
- "darkolivegreen": [
177
- 85,
178
- 107,
179
- 47
180
- ],
181
- "darkorange": [
182
- 255,
183
- 140,
184
- 0
185
- ],
186
- "darkorchid": [
187
- 153,
188
- 50,
189
- 204
190
- ],
191
- "darkred": [
192
- 139,
193
- 0,
194
- 0
195
- ],
196
- "darksalmon": [
197
- 233,
198
- 150,
199
- 122
200
- ],
201
- "darkseagreen": [
202
- 143,
203
- 188,
204
- 143
205
- ],
206
- "darkslateblue": [
207
- 72,
208
- 61,
209
- 139
210
- ],
211
- "darkslategray": [
212
- 47,
213
- 79,
214
- 79
215
- ],
216
- "darkslategrey": [
217
- 47,
218
- 79,
219
- 79
220
- ],
221
- "darkturquoise": [
222
- 0,
223
- 206,
224
- 209
225
- ],
226
- "darkviolet": [
227
- 148,
228
- 0,
229
- 211
230
- ],
231
- "deeppink": [
232
- 255,
233
- 20,
234
- 147
235
- ],
236
- "deepskyblue": [
237
- 0,
238
- 191,
239
- 255
240
- ],
241
- "dimgray": [
242
- 105,
243
- 105,
244
- 105
245
- ],
246
- "dimgrey": [
247
- 105,
248
- 105,
249
- 105
250
- ],
251
- "dodgerblue": [
252
- 30,
253
- 144,
254
- 255
255
- ],
256
- "firebrick": [
257
- 178,
258
- 34,
259
- 34
260
- ],
261
- "floralwhite": [
262
- 255,
263
- 250,
264
- 240
265
- ],
266
- "forestgreen": [
267
- 34,
268
- 139,
269
- 34
270
- ],
271
- "fuchsia": [
272
- 255,
273
- 0,
274
- 255
275
- ],
276
- "gainsboro": [
277
- 220,
278
- 220,
279
- 220
280
- ],
281
- "ghostwhite": [
282
- 248,
283
- 248,
284
- 255
285
- ],
286
- "gold": [
287
- 255,
288
- 215,
289
- 0
290
- ],
291
- "goldenrod": [
292
- 218,
293
- 165,
294
- 32
295
- ],
296
- "gray": [
297
- 128,
298
- 128,
299
- 128
300
- ],
301
- "green": [
302
- 0,
303
- 128,
304
- 0
305
- ],
306
- "greenyellow": [
307
- 173,
308
- 255,
309
- 47
310
- ],
311
- "grey": [
312
- 128,
313
- 128,
314
- 128
315
- ],
316
- "honeydew": [
317
- 240,
318
- 255,
319
- 240
320
- ],
321
- "hotpink": [
322
- 255,
323
- 105,
324
- 180
325
- ],
326
- "indianred": [
327
- 205,
328
- 92,
329
- 92
330
- ],
331
- "indigo": [
332
- 75,
333
- 0,
334
- 130
335
- ],
336
- "ivory": [
337
- 255,
338
- 255,
339
- 240
340
- ],
341
- "khaki": [
342
- 240,
343
- 230,
344
- 140
345
- ],
346
- "lavender": [
347
- 230,
348
- 230,
349
- 250
350
- ],
351
- "lavenderblush": [
352
- 255,
353
- 240,
354
- 245
355
- ],
356
- "lawngreen": [
357
- 124,
358
- 252,
359
- 0
360
- ],
361
- "lemonchiffon": [
362
- 255,
363
- 250,
364
- 205
365
- ],
366
- "lightblue": [
367
- 173,
368
- 216,
369
- 230
370
- ],
371
- "lightcoral": [
372
- 240,
373
- 128,
374
- 128
375
- ],
376
- "lightcyan": [
377
- 224,
378
- 255,
379
- 255
380
- ],
381
- "lightgoldenrodyellow": [
382
- 250,
383
- 250,
384
- 210
385
- ],
386
- "lightgray": [
387
- 211,
388
- 211,
389
- 211
390
- ],
391
- "lightgreen": [
392
- 144,
393
- 238,
394
- 144
395
- ],
396
- "lightgrey": [
397
- 211,
398
- 211,
399
- 211
400
- ],
401
- "lightpink": [
402
- 255,
403
- 182,
404
- 193
405
- ],
406
- "lightsalmon": [
407
- 255,
408
- 160,
409
- 122
410
- ],
411
- "lightseagreen": [
412
- 32,
413
- 178,
414
- 170
415
- ],
416
- "lightskyblue": [
417
- 135,
418
- 206,
419
- 250
420
- ],
421
- "lightslategray": [
422
- 119,
423
- 136,
424
- 153
425
- ],
426
- "lightslategrey": [
427
- 119,
428
- 136,
429
- 153
430
- ],
431
- "lightsteelblue": [
432
- 176,
433
- 196,
434
- 222
435
- ],
436
- "lightyellow": [
437
- 255,
438
- 255,
439
- 224
440
- ],
441
- "lime": [
442
- 0,
443
- 255,
444
- 0
445
- ],
446
- "limegreen": [
447
- 50,
448
- 205,
449
- 50
450
- ],
451
- "linen": [
452
- 250,
453
- 240,
454
- 230
455
- ],
456
- "magenta": [
457
- 255,
458
- 0,
459
- 255
460
- ],
461
- "maroon": [
462
- 128,
463
- 0,
464
- 0
465
- ],
466
- "mediumaquamarine": [
467
- 102,
468
- 205,
469
- 170
470
- ],
471
- "mediumblue": [
472
- 0,
473
- 0,
474
- 205
475
- ],
476
- "mediumorchid": [
477
- 186,
478
- 85,
479
- 211
480
- ],
481
- "mediumpurple": [
482
- 147,
483
- 112,
484
- 219
485
- ],
486
- "mediumseagreen": [
487
- 60,
488
- 179,
489
- 113
490
- ],
491
- "mediumslateblue": [
492
- 123,
493
- 104,
494
- 238
495
- ],
496
- "mediumspringgreen": [
497
- 0,
498
- 250,
499
- 154
500
- ],
501
- "mediumturquoise": [
502
- 72,
503
- 209,
504
- 204
505
- ],
506
- "mediumvioletred": [
507
- 199,
508
- 21,
509
- 133
510
- ],
511
- "midnightblue": [
512
- 25,
513
- 25,
514
- 112
515
- ],
516
- "mintcream": [
517
- 245,
518
- 255,
519
- 250
520
- ],
521
- "mistyrose": [
522
- 255,
523
- 228,
524
- 225
525
- ],
526
- "moccasin": [
527
- 255,
528
- 228,
529
- 181
530
- ],
531
- "navajowhite": [
532
- 255,
533
- 222,
534
- 173
535
- ],
536
- "navy": [
537
- 0,
538
- 0,
539
- 128
540
- ],
541
- "oldlace": [
542
- 253,
543
- 245,
544
- 230
545
- ],
546
- "olive": [
547
- 128,
548
- 128,
549
- 0
550
- ],
551
- "olivedrab": [
552
- 107,
553
- 142,
554
- 35
555
- ],
556
- "orange": [
557
- 255,
558
- 165,
559
- 0
560
- ],
561
- "orangered": [
562
- 255,
563
- 69,
564
- 0
565
- ],
566
- "orchid": [
567
- 218,
568
- 112,
569
- 214
570
- ],
571
- "palegoldenrod": [
572
- 238,
573
- 232,
574
- 170
575
- ],
576
- "palegreen": [
577
- 152,
578
- 251,
579
- 152
580
- ],
581
- "paleturquoise": [
582
- 175,
583
- 238,
584
- 238
585
- ],
586
- "palevioletred": [
587
- 219,
588
- 112,
589
- 147
590
- ],
591
- "papayawhip": [
592
- 255,
593
- 239,
594
- 213
595
- ],
596
- "peachpuff": [
597
- 255,
598
- 218,
599
- 185
600
- ],
601
- "peru": [
602
- 205,
603
- 133,
604
- 63
605
- ],
606
- "pink": [
607
- 255,
608
- 192,
609
- 203
610
- ],
611
- "plum": [
612
- 221,
613
- 160,
614
- 221
615
- ],
616
- "powderblue": [
617
- 176,
618
- 224,
619
- 230
620
- ],
621
- "purple": [
622
- 128,
623
- 0,
624
- 128
625
- ],
626
- "rebeccapurple": [
627
- 102,
628
- 51,
629
- 153
630
- ],
631
- "red": [
632
- 255,
633
- 0,
634
- 0
635
- ],
636
- "rosybrown": [
637
- 188,
638
- 143,
639
- 143
640
- ],
641
- "royalblue": [
642
- 65,
643
- 105,
644
- 225
645
- ],
646
- "saddlebrown": [
647
- 139,
648
- 69,
649
- 19
650
- ],
651
- "salmon": [
652
- 250,
653
- 128,
654
- 114
655
- ],
656
- "sandybrown": [
657
- 244,
658
- 164,
659
- 96
660
- ],
661
- "seagreen": [
662
- 46,
663
- 139,
664
- 87
665
- ],
666
- "seashell": [
667
- 255,
668
- 245,
669
- 238
670
- ],
671
- "sienna": [
672
- 160,
673
- 82,
674
- 45
675
- ],
676
- "silver": [
677
- 192,
678
- 192,
679
- 192
680
- ],
681
- "skyblue": [
682
- 135,
683
- 206,
684
- 235
685
- ],
686
- "slateblue": [
687
- 106,
688
- 90,
689
- 205
690
- ],
691
- "slategray": [
692
- 112,
693
- 128,
694
- 144
695
- ],
696
- "slategrey": [
697
- 112,
698
- 128,
699
- 144
700
- ],
701
- "snow": [
702
- 255,
703
- 250,
704
- 250
705
- ],
706
- "springgreen": [
707
- 0,
708
- 255,
709
- 127
710
- ],
711
- "steelblue": [
712
- 70,
713
- 130,
714
- 180
715
- ],
716
- "tan": [
717
- 210,
718
- 180,
719
- 140
720
- ],
721
- "teal": [
722
- 0,
723
- 128,
724
- 128
725
- ],
726
- "thistle": [
727
- 216,
728
- 191,
729
- 216
730
- ],
731
- "tomato": [
732
- 255,
733
- 99,
734
- 71
735
- ],
736
- "turquoise": [
737
- 64,
738
- 224,
739
- 208
740
- ],
741
- "violet": [
742
- 238,
743
- 130,
744
- 238
745
- ],
746
- "wheat": [
747
- 245,
748
- 222,
749
- 179
750
- ],
751
- "white": [
752
- 255,
753
- 255,
754
- 255
755
- ],
756
- "whitesmoke": [
757
- 245,
758
- 245,
759
- 245
760
- ],
761
- "yellow": [
762
- 255,
763
- 255,
764
- 0
765
- ],
766
- "yellowgreen": [
767
- 154,
768
- 205,
769
- 50
770
- ]
771
- };
772
- }));
773
- //#endregion
774
- //#region node_modules/color-convert/conversions.js
775
- var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
776
- var cssKeywords = require_color_name();
777
- var reverseKeywords = {};
778
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
779
- var convert = {
780
- rgb: {
781
- channels: 3,
782
- labels: "rgb"
783
- },
784
- hsl: {
785
- channels: 3,
786
- labels: "hsl"
787
- },
788
- hsv: {
789
- channels: 3,
790
- labels: "hsv"
791
- },
792
- hwb: {
793
- channels: 3,
794
- labels: "hwb"
795
- },
796
- cmyk: {
797
- channels: 4,
798
- labels: "cmyk"
799
- },
800
- xyz: {
801
- channels: 3,
802
- labels: "xyz"
803
- },
804
- lab: {
805
- channels: 3,
806
- labels: "lab"
807
- },
808
- lch: {
809
- channels: 3,
810
- labels: "lch"
811
- },
812
- hex: {
813
- channels: 1,
814
- labels: ["hex"]
815
- },
816
- keyword: {
817
- channels: 1,
818
- labels: ["keyword"]
819
- },
820
- ansi16: {
821
- channels: 1,
822
- labels: ["ansi16"]
823
- },
824
- ansi256: {
825
- channels: 1,
826
- labels: ["ansi256"]
827
- },
828
- hcg: {
829
- channels: 3,
830
- labels: [
831
- "h",
832
- "c",
833
- "g"
834
- ]
835
- },
836
- apple: {
837
- channels: 3,
838
- labels: [
839
- "r16",
840
- "g16",
841
- "b16"
842
- ]
843
- },
844
- gray: {
845
- channels: 1,
846
- labels: ["gray"]
847
- }
848
- };
849
- module.exports = convert;
850
- for (const model of Object.keys(convert)) {
851
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
852
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
853
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
854
- const { channels, labels } = convert[model];
855
- delete convert[model].channels;
856
- delete convert[model].labels;
857
- Object.defineProperty(convert[model], "channels", { value: channels });
858
- Object.defineProperty(convert[model], "labels", { value: labels });
859
- }
860
- convert.rgb.hsl = function(rgb) {
861
- const r = rgb[0] / 255;
862
- const g = rgb[1] / 255;
863
- const b = rgb[2] / 255;
864
- const min = Math.min(r, g, b);
865
- const max = Math.max(r, g, b);
866
- const delta = max - min;
867
- let h;
868
- let s;
869
- if (max === min) h = 0;
870
- else if (r === max) h = (g - b) / delta;
871
- else if (g === max) h = 2 + (b - r) / delta;
872
- else if (b === max) h = 4 + (r - g) / delta;
873
- h = Math.min(h * 60, 360);
874
- if (h < 0) h += 360;
875
- const l = (min + max) / 2;
876
- if (max === min) s = 0;
877
- else if (l <= .5) s = delta / (max + min);
878
- else s = delta / (2 - max - min);
879
- return [
880
- h,
881
- s * 100,
882
- l * 100
883
- ];
884
- };
885
- convert.rgb.hsv = function(rgb) {
886
- let rdif;
887
- let gdif;
888
- let bdif;
889
- let h;
890
- let s;
891
- const r = rgb[0] / 255;
892
- const g = rgb[1] / 255;
893
- const b = rgb[2] / 255;
894
- const v = Math.max(r, g, b);
895
- const diff = v - Math.min(r, g, b);
896
- const diffc = function(c) {
897
- return (v - c) / 6 / diff + 1 / 2;
898
- };
899
- if (diff === 0) {
900
- h = 0;
901
- s = 0;
902
- } else {
903
- s = diff / v;
904
- rdif = diffc(r);
905
- gdif = diffc(g);
906
- bdif = diffc(b);
907
- if (r === v) h = bdif - gdif;
908
- else if (g === v) h = 1 / 3 + rdif - bdif;
909
- else if (b === v) h = 2 / 3 + gdif - rdif;
910
- if (h < 0) h += 1;
911
- else if (h > 1) h -= 1;
912
- }
913
- return [
914
- h * 360,
915
- s * 100,
916
- v * 100
917
- ];
918
- };
919
- convert.rgb.hwb = function(rgb) {
920
- const r = rgb[0];
921
- const g = rgb[1];
922
- let b = rgb[2];
923
- const h = convert.rgb.hsl(rgb)[0];
924
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
925
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
926
- return [
927
- h,
928
- w * 100,
929
- b * 100
930
- ];
931
- };
932
- convert.rgb.cmyk = function(rgb) {
933
- const r = rgb[0] / 255;
934
- const g = rgb[1] / 255;
935
- const b = rgb[2] / 255;
936
- const k = Math.min(1 - r, 1 - g, 1 - b);
937
- const c = (1 - r - k) / (1 - k) || 0;
938
- const m = (1 - g - k) / (1 - k) || 0;
939
- const y = (1 - b - k) / (1 - k) || 0;
940
- return [
941
- c * 100,
942
- m * 100,
943
- y * 100,
944
- k * 100
945
- ];
946
- };
947
- function comparativeDistance(x, y) {
948
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
949
- }
950
- convert.rgb.keyword = function(rgb) {
951
- const reversed = reverseKeywords[rgb];
952
- if (reversed) return reversed;
953
- let currentClosestDistance = Infinity;
954
- let currentClosestKeyword;
955
- for (const keyword of Object.keys(cssKeywords)) {
956
- const value = cssKeywords[keyword];
957
- const distance = comparativeDistance(rgb, value);
958
- if (distance < currentClosestDistance) {
959
- currentClosestDistance = distance;
960
- currentClosestKeyword = keyword;
961
- }
962
- }
963
- return currentClosestKeyword;
964
- };
965
- convert.keyword.rgb = function(keyword) {
966
- return cssKeywords[keyword];
967
- };
968
- convert.rgb.xyz = function(rgb) {
969
- let r = rgb[0] / 255;
970
- let g = rgb[1] / 255;
971
- let b = rgb[2] / 255;
972
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
973
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
974
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
975
- const x = r * .4124 + g * .3576 + b * .1805;
976
- const y = r * .2126 + g * .7152 + b * .0722;
977
- const z = r * .0193 + g * .1192 + b * .9505;
978
- return [
979
- x * 100,
980
- y * 100,
981
- z * 100
982
- ];
983
- };
984
- convert.rgb.lab = function(rgb) {
985
- const xyz = convert.rgb.xyz(rgb);
986
- let x = xyz[0];
987
- let y = xyz[1];
988
- let z = xyz[2];
989
- x /= 95.047;
990
- y /= 100;
991
- z /= 108.883;
992
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
993
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
994
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
995
- return [
996
- 116 * y - 16,
997
- 500 * (x - y),
998
- 200 * (y - z)
999
- ];
1000
- };
1001
- convert.hsl.rgb = function(hsl) {
1002
- const h = hsl[0] / 360;
1003
- const s = hsl[1] / 100;
1004
- const l = hsl[2] / 100;
1005
- let t2;
1006
- let t3;
1007
- let val;
1008
- if (s === 0) {
1009
- val = l * 255;
1010
- return [
1011
- val,
1012
- val,
1013
- val
1014
- ];
1015
- }
1016
- if (l < .5) t2 = l * (1 + s);
1017
- else t2 = l + s - l * s;
1018
- const t1 = 2 * l - t2;
1019
- const rgb = [
1020
- 0,
1021
- 0,
1022
- 0
1023
- ];
1024
- for (let i = 0; i < 3; i++) {
1025
- t3 = h + 1 / 3 * -(i - 1);
1026
- if (t3 < 0) t3++;
1027
- if (t3 > 1) t3--;
1028
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
1029
- else if (2 * t3 < 1) val = t2;
1030
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1031
- else val = t1;
1032
- rgb[i] = val * 255;
1033
- }
1034
- return rgb;
1035
- };
1036
- convert.hsl.hsv = function(hsl) {
1037
- const h = hsl[0];
1038
- let s = hsl[1] / 100;
1039
- let l = hsl[2] / 100;
1040
- let smin = s;
1041
- const lmin = Math.max(l, .01);
1042
- l *= 2;
1043
- s *= l <= 1 ? l : 2 - l;
1044
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1045
- const v = (l + s) / 2;
1046
- return [
1047
- h,
1048
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
1049
- v * 100
1050
- ];
1051
- };
1052
- convert.hsv.rgb = function(hsv) {
1053
- const h = hsv[0] / 60;
1054
- const s = hsv[1] / 100;
1055
- let v = hsv[2] / 100;
1056
- const hi = Math.floor(h) % 6;
1057
- const f = h - Math.floor(h);
1058
- const p = 255 * v * (1 - s);
1059
- const q = 255 * v * (1 - s * f);
1060
- const t = 255 * v * (1 - s * (1 - f));
1061
- v *= 255;
1062
- switch (hi) {
1063
- case 0: return [
1064
- v,
1065
- t,
1066
- p
1067
- ];
1068
- case 1: return [
1069
- q,
1070
- v,
1071
- p
1072
- ];
1073
- case 2: return [
1074
- p,
1075
- v,
1076
- t
1077
- ];
1078
- case 3: return [
1079
- p,
1080
- q,
1081
- v
1082
- ];
1083
- case 4: return [
1084
- t,
1085
- p,
1086
- v
1087
- ];
1088
- case 5: return [
1089
- v,
1090
- p,
1091
- q
1092
- ];
1093
- }
1094
- };
1095
- convert.hsv.hsl = function(hsv) {
1096
- const h = hsv[0];
1097
- const s = hsv[1] / 100;
1098
- const v = hsv[2] / 100;
1099
- const vmin = Math.max(v, .01);
1100
- let sl;
1101
- let l;
1102
- l = (2 - s) * v;
1103
- const lmin = (2 - s) * vmin;
1104
- sl = s * vmin;
1105
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1106
- sl = sl || 0;
1107
- l /= 2;
1108
- return [
1109
- h,
1110
- sl * 100,
1111
- l * 100
1112
- ];
1113
- };
1114
- convert.hwb.rgb = function(hwb) {
1115
- const h = hwb[0] / 360;
1116
- let wh = hwb[1] / 100;
1117
- let bl = hwb[2] / 100;
1118
- const ratio = wh + bl;
1119
- let f;
1120
- if (ratio > 1) {
1121
- wh /= ratio;
1122
- bl /= ratio;
1123
- }
1124
- const i = Math.floor(6 * h);
1125
- const v = 1 - bl;
1126
- f = 6 * h - i;
1127
- if ((i & 1) !== 0) f = 1 - f;
1128
- const n = wh + f * (v - wh);
1129
- let r;
1130
- let g;
1131
- let b;
1132
- switch (i) {
1133
- default:
1134
- case 6:
1135
- case 0:
1136
- r = v;
1137
- g = n;
1138
- b = wh;
1139
- break;
1140
- case 1:
1141
- r = n;
1142
- g = v;
1143
- b = wh;
1144
- break;
1145
- case 2:
1146
- r = wh;
1147
- g = v;
1148
- b = n;
1149
- break;
1150
- case 3:
1151
- r = wh;
1152
- g = n;
1153
- b = v;
1154
- break;
1155
- case 4:
1156
- r = n;
1157
- g = wh;
1158
- b = v;
1159
- break;
1160
- case 5:
1161
- r = v;
1162
- g = wh;
1163
- b = n;
1164
- break;
1165
- }
1166
- return [
1167
- r * 255,
1168
- g * 255,
1169
- b * 255
1170
- ];
1171
- };
1172
- convert.cmyk.rgb = function(cmyk) {
1173
- const c = cmyk[0] / 100;
1174
- const m = cmyk[1] / 100;
1175
- const y = cmyk[2] / 100;
1176
- const k = cmyk[3] / 100;
1177
- const r = 1 - Math.min(1, c * (1 - k) + k);
1178
- const g = 1 - Math.min(1, m * (1 - k) + k);
1179
- const b = 1 - Math.min(1, y * (1 - k) + k);
1180
- return [
1181
- r * 255,
1182
- g * 255,
1183
- b * 255
1184
- ];
1185
- };
1186
- convert.xyz.rgb = function(xyz) {
1187
- const x = xyz[0] / 100;
1188
- const y = xyz[1] / 100;
1189
- const z = xyz[2] / 100;
1190
- let r;
1191
- let g;
1192
- let b;
1193
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
1194
- g = x * -.9689 + y * 1.8758 + z * .0415;
1195
- b = x * .0557 + y * -.204 + z * 1.057;
1196
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
1197
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
1198
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
1199
- r = Math.min(Math.max(0, r), 1);
1200
- g = Math.min(Math.max(0, g), 1);
1201
- b = Math.min(Math.max(0, b), 1);
1202
- return [
1203
- r * 255,
1204
- g * 255,
1205
- b * 255
1206
- ];
1207
- };
1208
- convert.xyz.lab = function(xyz) {
1209
- let x = xyz[0];
1210
- let y = xyz[1];
1211
- let z = xyz[2];
1212
- x /= 95.047;
1213
- y /= 100;
1214
- z /= 108.883;
1215
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1216
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1217
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1218
- return [
1219
- 116 * y - 16,
1220
- 500 * (x - y),
1221
- 200 * (y - z)
1222
- ];
1223
- };
1224
- convert.lab.xyz = function(lab) {
1225
- const l = lab[0];
1226
- const a = lab[1];
1227
- const b = lab[2];
1228
- let x;
1229
- let y;
1230
- let z;
1231
- y = (l + 16) / 116;
1232
- x = a / 500 + y;
1233
- z = y - b / 200;
1234
- const y2 = y ** 3;
1235
- const x2 = x ** 3;
1236
- const z2 = z ** 3;
1237
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
1238
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
1239
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
1240
- x *= 95.047;
1241
- y *= 100;
1242
- z *= 108.883;
1243
- return [
1244
- x,
1245
- y,
1246
- z
1247
- ];
1248
- };
1249
- convert.lab.lch = function(lab) {
1250
- const l = lab[0];
1251
- const a = lab[1];
1252
- const b = lab[2];
1253
- let h;
1254
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
1255
- if (h < 0) h += 360;
1256
- return [
1257
- l,
1258
- Math.sqrt(a * a + b * b),
1259
- h
1260
- ];
1261
- };
1262
- convert.lch.lab = function(lch) {
1263
- const l = lch[0];
1264
- const c = lch[1];
1265
- const hr = lch[2] / 360 * 2 * Math.PI;
1266
- return [
1267
- l,
1268
- c * Math.cos(hr),
1269
- c * Math.sin(hr)
1270
- ];
1271
- };
1272
- convert.rgb.ansi16 = function(args, saturation = null) {
1273
- const [r, g, b] = args;
1274
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1275
- value = Math.round(value / 50);
1276
- if (value === 0) return 30;
1277
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1278
- if (value === 2) ansi += 60;
1279
- return ansi;
1280
- };
1281
- convert.hsv.ansi16 = function(args) {
1282
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1283
- };
1284
- convert.rgb.ansi256 = function(args) {
1285
- const r = args[0];
1286
- const g = args[1];
1287
- const b = args[2];
1288
- if (r === g && g === b) {
1289
- if (r < 8) return 16;
1290
- if (r > 248) return 231;
1291
- return Math.round((r - 8) / 247 * 24) + 232;
1292
- }
1293
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1294
- };
1295
- convert.ansi16.rgb = function(args) {
1296
- let color = args % 10;
1297
- if (color === 0 || color === 7) {
1298
- if (args > 50) color += 3.5;
1299
- color = color / 10.5 * 255;
1300
- return [
1301
- color,
1302
- color,
1303
- color
1304
- ];
1305
- }
1306
- const mult = (~~(args > 50) + 1) * .5;
1307
- return [
1308
- (color & 1) * mult * 255,
1309
- (color >> 1 & 1) * mult * 255,
1310
- (color >> 2 & 1) * mult * 255
1311
- ];
1312
- };
1313
- convert.ansi256.rgb = function(args) {
1314
- if (args >= 232) {
1315
- const c = (args - 232) * 10 + 8;
1316
- return [
1317
- c,
1318
- c,
1319
- c
1320
- ];
1321
- }
1322
- args -= 16;
1323
- let rem;
1324
- return [
1325
- Math.floor(args / 36) / 5 * 255,
1326
- Math.floor((rem = args % 36) / 6) / 5 * 255,
1327
- rem % 6 / 5 * 255
1328
- ];
1329
- };
1330
- convert.rgb.hex = function(args) {
1331
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
1332
- return "000000".substring(string.length) + string;
1333
- };
1334
- convert.hex.rgb = function(args) {
1335
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1336
- if (!match) return [
1337
- 0,
1338
- 0,
1339
- 0
1340
- ];
1341
- let colorString = match[0];
1342
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
1343
- return char + char;
1344
- }).join("");
1345
- const integer = parseInt(colorString, 16);
1346
- return [
1347
- integer >> 16 & 255,
1348
- integer >> 8 & 255,
1349
- integer & 255
1350
- ];
1351
- };
1352
- convert.rgb.hcg = function(rgb) {
1353
- const r = rgb[0] / 255;
1354
- const g = rgb[1] / 255;
1355
- const b = rgb[2] / 255;
1356
- const max = Math.max(Math.max(r, g), b);
1357
- const min = Math.min(Math.min(r, g), b);
1358
- const chroma = max - min;
1359
- let grayscale;
1360
- let hue;
1361
- if (chroma < 1) grayscale = min / (1 - chroma);
1362
- else grayscale = 0;
1363
- if (chroma <= 0) hue = 0;
1364
- else if (max === r) hue = (g - b) / chroma % 6;
1365
- else if (max === g) hue = 2 + (b - r) / chroma;
1366
- else hue = 4 + (r - g) / chroma;
1367
- hue /= 6;
1368
- hue %= 1;
1369
- return [
1370
- hue * 360,
1371
- chroma * 100,
1372
- grayscale * 100
1373
- ];
1374
- };
1375
- convert.hsl.hcg = function(hsl) {
1376
- const s = hsl[1] / 100;
1377
- const l = hsl[2] / 100;
1378
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
1379
- let f = 0;
1380
- if (c < 1) f = (l - .5 * c) / (1 - c);
1381
- return [
1382
- hsl[0],
1383
- c * 100,
1384
- f * 100
1385
- ];
1386
- };
1387
- convert.hsv.hcg = function(hsv) {
1388
- const s = hsv[1] / 100;
1389
- const v = hsv[2] / 100;
1390
- const c = s * v;
1391
- let f = 0;
1392
- if (c < 1) f = (v - c) / (1 - c);
1393
- return [
1394
- hsv[0],
1395
- c * 100,
1396
- f * 100
1397
- ];
1398
- };
1399
- convert.hcg.rgb = function(hcg) {
1400
- const h = hcg[0] / 360;
1401
- const c = hcg[1] / 100;
1402
- const g = hcg[2] / 100;
1403
- if (c === 0) return [
1404
- g * 255,
1405
- g * 255,
1406
- g * 255
1407
- ];
1408
- const pure = [
1409
- 0,
1410
- 0,
1411
- 0
1412
- ];
1413
- const hi = h % 1 * 6;
1414
- const v = hi % 1;
1415
- const w = 1 - v;
1416
- let mg = 0;
1417
- switch (Math.floor(hi)) {
1418
- case 0:
1419
- pure[0] = 1;
1420
- pure[1] = v;
1421
- pure[2] = 0;
1422
- break;
1423
- case 1:
1424
- pure[0] = w;
1425
- pure[1] = 1;
1426
- pure[2] = 0;
1427
- break;
1428
- case 2:
1429
- pure[0] = 0;
1430
- pure[1] = 1;
1431
- pure[2] = v;
1432
- break;
1433
- case 3:
1434
- pure[0] = 0;
1435
- pure[1] = w;
1436
- pure[2] = 1;
1437
- break;
1438
- case 4:
1439
- pure[0] = v;
1440
- pure[1] = 0;
1441
- pure[2] = 1;
1442
- break;
1443
- default:
1444
- pure[0] = 1;
1445
- pure[1] = 0;
1446
- pure[2] = w;
1447
- }
1448
- mg = (1 - c) * g;
1449
- return [
1450
- (c * pure[0] + mg) * 255,
1451
- (c * pure[1] + mg) * 255,
1452
- (c * pure[2] + mg) * 255
1453
- ];
1454
- };
1455
- convert.hcg.hsv = function(hcg) {
1456
- const c = hcg[1] / 100;
1457
- const v = c + hcg[2] / 100 * (1 - c);
1458
- let f = 0;
1459
- if (v > 0) f = c / v;
1460
- return [
1461
- hcg[0],
1462
- f * 100,
1463
- v * 100
1464
- ];
1465
- };
1466
- convert.hcg.hsl = function(hcg) {
1467
- const c = hcg[1] / 100;
1468
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
1469
- let s = 0;
1470
- if (l > 0 && l < .5) s = c / (2 * l);
1471
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
1472
- return [
1473
- hcg[0],
1474
- s * 100,
1475
- l * 100
1476
- ];
1477
- };
1478
- convert.hcg.hwb = function(hcg) {
1479
- const c = hcg[1] / 100;
1480
- const v = c + hcg[2] / 100 * (1 - c);
1481
- return [
1482
- hcg[0],
1483
- (v - c) * 100,
1484
- (1 - v) * 100
1485
- ];
1486
- };
1487
- convert.hwb.hcg = function(hwb) {
1488
- const w = hwb[1] / 100;
1489
- const v = 1 - hwb[2] / 100;
1490
- const c = v - w;
1491
- let g = 0;
1492
- if (c < 1) g = (v - c) / (1 - c);
1493
- return [
1494
- hwb[0],
1495
- c * 100,
1496
- g * 100
1497
- ];
1498
- };
1499
- convert.apple.rgb = function(apple) {
1500
- return [
1501
- apple[0] / 65535 * 255,
1502
- apple[1] / 65535 * 255,
1503
- apple[2] / 65535 * 255
1504
- ];
1505
- };
1506
- convert.rgb.apple = function(rgb) {
1507
- return [
1508
- rgb[0] / 255 * 65535,
1509
- rgb[1] / 255 * 65535,
1510
- rgb[2] / 255 * 65535
1511
- ];
1512
- };
1513
- convert.gray.rgb = function(args) {
1514
- return [
1515
- args[0] / 100 * 255,
1516
- args[0] / 100 * 255,
1517
- args[0] / 100 * 255
1518
- ];
1519
- };
1520
- convert.gray.hsl = function(args) {
1521
- return [
1522
- 0,
1523
- 0,
1524
- args[0]
1525
- ];
1526
- };
1527
- convert.gray.hsv = convert.gray.hsl;
1528
- convert.gray.hwb = function(gray) {
1529
- return [
1530
- 0,
1531
- 100,
1532
- gray[0]
1533
- ];
1534
- };
1535
- convert.gray.cmyk = function(gray) {
1536
- return [
1537
- 0,
1538
- 0,
1539
- 0,
1540
- gray[0]
1541
- ];
1542
- };
1543
- convert.gray.lab = function(gray) {
1544
- return [
1545
- gray[0],
1546
- 0,
1547
- 0
1548
- ];
1549
- };
1550
- convert.gray.hex = function(gray) {
1551
- const val = Math.round(gray[0] / 100 * 255) & 255;
1552
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1553
- return "000000".substring(string.length) + string;
1554
- };
1555
- convert.rgb.gray = function(rgb) {
1556
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
1557
- };
1558
- }));
1559
- //#endregion
1560
- //#region node_modules/color-convert/route.js
1561
- var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1562
- var conversions = require_conversions();
1563
- function buildGraph() {
1564
- const graph = {};
1565
- const models = Object.keys(conversions);
1566
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
1567
- distance: -1,
1568
- parent: null
1569
- };
1570
- return graph;
27
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
28
+ var ANSI_BACKGROUND_OFFSET = 10;
29
+ var wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
30
+ var wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
31
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
32
+ var styles$1 = {
33
+ modifier: {
34
+ reset: [0, 0],
35
+ bold: [1, 22],
36
+ dim: [2, 22],
37
+ italic: [3, 23],
38
+ underline: [4, 24],
39
+ overline: [53, 55],
40
+ inverse: [7, 27],
41
+ hidden: [8, 28],
42
+ strikethrough: [9, 29]
43
+ },
44
+ color: {
45
+ black: [30, 39],
46
+ red: [31, 39],
47
+ green: [32, 39],
48
+ yellow: [33, 39],
49
+ blue: [34, 39],
50
+ magenta: [35, 39],
51
+ cyan: [36, 39],
52
+ white: [37, 39],
53
+ blackBright: [90, 39],
54
+ gray: [90, 39],
55
+ grey: [90, 39],
56
+ redBright: [91, 39],
57
+ greenBright: [92, 39],
58
+ yellowBright: [93, 39],
59
+ blueBright: [94, 39],
60
+ magentaBright: [95, 39],
61
+ cyanBright: [96, 39],
62
+ whiteBright: [97, 39]
63
+ },
64
+ bgColor: {
65
+ bgBlack: [40, 49],
66
+ bgRed: [41, 49],
67
+ bgGreen: [42, 49],
68
+ bgYellow: [43, 49],
69
+ bgBlue: [44, 49],
70
+ bgMagenta: [45, 49],
71
+ bgCyan: [46, 49],
72
+ bgWhite: [47, 49],
73
+ bgBlackBright: [100, 49],
74
+ bgGray: [100, 49],
75
+ bgGrey: [100, 49],
76
+ bgRedBright: [101, 49],
77
+ bgGreenBright: [102, 49],
78
+ bgYellowBright: [103, 49],
79
+ bgBlueBright: [104, 49],
80
+ bgMagentaBright: [105, 49],
81
+ bgCyanBright: [106, 49],
82
+ bgWhiteBright: [107, 49]
1571
83
  }
1572
- function deriveBFS(fromModel) {
1573
- const graph = buildGraph();
1574
- const queue = [fromModel];
1575
- graph[fromModel].distance = 0;
1576
- while (queue.length) {
1577
- const current = queue.pop();
1578
- const adjacents = Object.keys(conversions[current]);
1579
- for (let len = adjacents.length, i = 0; i < len; i++) {
1580
- const adjacent = adjacents[i];
1581
- const node = graph[adjacent];
1582
- if (node.distance === -1) {
1583
- node.distance = graph[current].distance + 1;
1584
- node.parent = current;
1585
- queue.unshift(adjacent);
1586
- }
1587
- }
1588
- }
1589
- return graph;
1590
- }
1591
- function link(from, to) {
1592
- return function(args) {
1593
- return to(from(args));
1594
- };
1595
- }
1596
- function wrapConversion(toModel, graph) {
1597
- const path = [graph[toModel].parent, toModel];
1598
- let fn = conversions[graph[toModel].parent][toModel];
1599
- let cur = graph[toModel].parent;
1600
- while (graph[cur].parent) {
1601
- path.unshift(graph[cur].parent);
1602
- fn = link(conversions[graph[cur].parent][cur], fn);
1603
- cur = graph[cur].parent;
1604
- }
1605
- fn.conversion = path;
1606
- return fn;
1607
- }
1608
- module.exports = function(fromModel) {
1609
- const graph = deriveBFS(fromModel);
1610
- const conversion = {};
1611
- const models = Object.keys(graph);
1612
- for (let len = models.length, i = 0; i < len; i++) {
1613
- const toModel = models[i];
1614
- if (graph[toModel].parent === null) continue;
1615
- conversion[toModel] = wrapConversion(toModel, graph);
84
+ };
85
+ Object.keys(styles$1.modifier);
86
+ var foregroundColorNames = Object.keys(styles$1.color);
87
+ var backgroundColorNames = Object.keys(styles$1.bgColor);
88
+ [...foregroundColorNames, ...backgroundColorNames];
89
+ function assembleStyles() {
90
+ const codes = /* @__PURE__ */ new Map();
91
+ for (const [groupName, group] of Object.entries(styles$1)) {
92
+ for (const [styleName, style] of Object.entries(group)) {
93
+ styles$1[styleName] = {
94
+ open: `\u001B[${style[0]}m`,
95
+ close: `\u001B[${style[1]}m`
96
+ };
97
+ group[styleName] = styles$1[styleName];
98
+ codes.set(style[0], style[1]);
1616
99
  }
1617
- return conversion;
1618
- };
1619
- }));
1620
- //#endregion
1621
- //#region node_modules/color-convert/index.js
1622
- var require_color_convert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1623
- var conversions = require_conversions();
1624
- var route = require_route();
1625
- var convert = {};
1626
- var models = Object.keys(conversions);
1627
- function wrapRaw(fn) {
1628
- const wrappedFn = function(...args) {
1629
- const arg0 = args[0];
1630
- if (arg0 === void 0 || arg0 === null) return arg0;
1631
- if (arg0.length > 1) args = arg0;
1632
- return fn(args);
1633
- };
1634
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1635
- return wrappedFn;
1636
- }
1637
- function wrapRounded(fn) {
1638
- const wrappedFn = function(...args) {
1639
- const arg0 = args[0];
1640
- if (arg0 === void 0 || arg0 === null) return arg0;
1641
- if (arg0.length > 1) args = arg0;
1642
- const result = fn(args);
1643
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
1644
- return result;
1645
- };
1646
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1647
- return wrappedFn;
1648
- }
1649
- models.forEach((fromModel) => {
1650
- convert[fromModel] = {};
1651
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1652
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1653
- const routes = route(fromModel);
1654
- Object.keys(routes).forEach((toModel) => {
1655
- const fn = routes[toModel];
1656
- convert[fromModel][toModel] = wrapRounded(fn);
1657
- convert[fromModel][toModel].raw = wrapRaw(fn);
100
+ Object.defineProperty(styles$1, groupName, {
101
+ value: group,
102
+ enumerable: false
1658
103
  });
104
+ }
105
+ Object.defineProperty(styles$1, "codes", {
106
+ value: codes,
107
+ enumerable: false
1659
108
  });
1660
- module.exports = convert;
1661
- }));
1662
- //#endregion
1663
- //#region node_modules/ansi-styles/index.js
1664
- var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1665
- var wrapAnsi16 = (fn, offset) => (...args) => {
1666
- return `\u001B[${fn(...args) + offset}m`;
1667
- };
1668
- var wrapAnsi256 = (fn, offset) => (...args) => {
1669
- const code = fn(...args);
1670
- return `\u001B[${38 + offset};5;${code}m`;
1671
- };
1672
- var wrapAnsi16m = (fn, offset) => (...args) => {
1673
- const rgb = fn(...args);
1674
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1675
- };
1676
- var ansi2ansi = (n) => n;
1677
- var rgb2rgb = (r, g, b) => [
1678
- r,
1679
- g,
1680
- b
1681
- ];
1682
- var setLazyProperty = (object, property, get) => {
1683
- Object.defineProperty(object, property, {
1684
- get: () => {
1685
- const value = get();
1686
- Object.defineProperty(object, property, {
1687
- value,
1688
- enumerable: true,
1689
- configurable: true
1690
- });
1691
- return value;
109
+ styles$1.color.close = "\x1B[39m";
110
+ styles$1.bgColor.close = "\x1B[49m";
111
+ styles$1.color.ansi = wrapAnsi16();
112
+ styles$1.color.ansi256 = wrapAnsi256();
113
+ styles$1.color.ansi16m = wrapAnsi16m();
114
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
115
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
116
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
117
+ Object.defineProperties(styles$1, {
118
+ rgbToAnsi256: {
119
+ value(red, green, blue) {
120
+ if (red === green && green === blue) {
121
+ if (red < 8) return 16;
122
+ if (red > 248) return 231;
123
+ return Math.round((red - 8) / 247 * 24) + 232;
124
+ }
125
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1692
126
  },
1693
- enumerable: true,
1694
- configurable: true
1695
- });
1696
- };
1697
- /** @type {typeof import('color-convert')} */
1698
- var colorConvert;
1699
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1700
- if (colorConvert === void 0) colorConvert = require_color_convert();
1701
- const offset = isBackground ? 10 : 0;
1702
- const styles = {};
1703
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1704
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1705
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
1706
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
1707
- }
1708
- return styles;
1709
- };
1710
- function assembleStyles() {
1711
- const codes = /* @__PURE__ */ new Map();
1712
- const styles = {
1713
- modifier: {
1714
- reset: [0, 0],
1715
- bold: [1, 22],
1716
- dim: [2, 22],
1717
- italic: [3, 23],
1718
- underline: [4, 24],
1719
- inverse: [7, 27],
1720
- hidden: [8, 28],
1721
- strikethrough: [9, 29]
127
+ enumerable: false
128
+ },
129
+ hexToRgb: {
130
+ value(hex) {
131
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
132
+ if (!matches) return [
133
+ 0,
134
+ 0,
135
+ 0
136
+ ];
137
+ let [colorString] = matches;
138
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
139
+ const integer = Number.parseInt(colorString, 16);
140
+ return [
141
+ integer >> 16 & 255,
142
+ integer >> 8 & 255,
143
+ integer & 255
144
+ ];
1722
145
  },
1723
- color: {
1724
- black: [30, 39],
1725
- red: [31, 39],
1726
- green: [32, 39],
1727
- yellow: [33, 39],
1728
- blue: [34, 39],
1729
- magenta: [35, 39],
1730
- cyan: [36, 39],
1731
- white: [37, 39],
1732
- blackBright: [90, 39],
1733
- redBright: [91, 39],
1734
- greenBright: [92, 39],
1735
- yellowBright: [93, 39],
1736
- blueBright: [94, 39],
1737
- magentaBright: [95, 39],
1738
- cyanBright: [96, 39],
1739
- whiteBright: [97, 39]
146
+ enumerable: false
147
+ },
148
+ hexToAnsi256: {
149
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
150
+ enumerable: false
151
+ },
152
+ ansi256ToAnsi: {
153
+ value(code) {
154
+ if (code < 8) return 30 + code;
155
+ if (code < 16) return 90 + (code - 8);
156
+ let red;
157
+ let green;
158
+ let blue;
159
+ if (code >= 232) {
160
+ red = ((code - 232) * 10 + 8) / 255;
161
+ green = red;
162
+ blue = red;
163
+ } else {
164
+ code -= 16;
165
+ const remainder = code % 36;
166
+ red = Math.floor(code / 36) / 5;
167
+ green = Math.floor(remainder / 6) / 5;
168
+ blue = remainder % 6 / 5;
169
+ }
170
+ const value = Math.max(red, green, blue) * 2;
171
+ if (value === 0) return 30;
172
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
173
+ if (value === 2) result += 60;
174
+ return result;
1740
175
  },
1741
- bgColor: {
1742
- bgBlack: [40, 49],
1743
- bgRed: [41, 49],
1744
- bgGreen: [42, 49],
1745
- bgYellow: [43, 49],
1746
- bgBlue: [44, 49],
1747
- bgMagenta: [45, 49],
1748
- bgCyan: [46, 49],
1749
- bgWhite: [47, 49],
1750
- bgBlackBright: [100, 49],
1751
- bgRedBright: [101, 49],
1752
- bgGreenBright: [102, 49],
1753
- bgYellowBright: [103, 49],
1754
- bgBlueBright: [104, 49],
1755
- bgMagentaBright: [105, 49],
1756
- bgCyanBright: [106, 49],
1757
- bgWhiteBright: [107, 49]
1758
- }
1759
- };
1760
- styles.color.gray = styles.color.blackBright;
1761
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1762
- styles.color.grey = styles.color.blackBright;
1763
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1764
- for (const [groupName, group] of Object.entries(styles)) {
1765
- for (const [styleName, style] of Object.entries(group)) {
1766
- styles[styleName] = {
1767
- open: `\u001B[${style[0]}m`,
1768
- close: `\u001B[${style[1]}m`
1769
- };
1770
- group[styleName] = styles[styleName];
1771
- codes.set(style[0], style[1]);
1772
- }
1773
- Object.defineProperty(styles, groupName, {
1774
- value: group,
1775
- enumerable: false
1776
- });
1777
- }
1778
- Object.defineProperty(styles, "codes", {
1779
- value: codes,
1780
176
  enumerable: false
1781
- });
1782
- styles.color.close = "\x1B[39m";
1783
- styles.bgColor.close = "\x1B[49m";
1784
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1785
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1786
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1787
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1788
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1789
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1790
- return styles;
1791
- }
1792
- Object.defineProperty(module, "exports", {
1793
- enumerable: true,
1794
- get: assembleStyles
177
+ },
178
+ rgbToAnsi: {
179
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
180
+ enumerable: false
181
+ },
182
+ hexToAnsi: {
183
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
184
+ enumerable: false
185
+ }
1795
186
  });
1796
- }));
187
+ return styles$1;
188
+ }
189
+ var ansiStyles = assembleStyles();
1797
190
  //#endregion
1798
- //#region node_modules/supports-color/browser.js
1799
- var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1800
- module.exports = {
1801
- stdout: false,
1802
- stderr: false
1803
- };
1804
- }));
191
+ //#region node_modules/chalk/source/vendor/supports-color/browser.js
192
+ var level = (() => {
193
+ if (!("navigator" in globalThis)) return 0;
194
+ if (globalThis.navigator.userAgentData) {
195
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
196
+ if (brand && brand.version > 93) return 3;
197
+ }
198
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
199
+ return 0;
200
+ })();
201
+ var colorSupport = level !== 0 && {
202
+ level,
203
+ hasBasic: true,
204
+ has256: level >= 2,
205
+ has16m: level >= 3
206
+ };
207
+ var supportsColor = {
208
+ stdout: colorSupport,
209
+ stderr: colorSupport
210
+ };
1805
211
  //#endregion
1806
- //#region node_modules/chalk/source/util.js
1807
- var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1808
- var stringReplaceAll = (string, substring, replacer) => {
1809
- let index = string.indexOf(substring);
1810
- if (index === -1) return string;
1811
- const substringLength = substring.length;
1812
- let endIndex = 0;
1813
- let returnValue = "";
1814
- do {
1815
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1816
- endIndex = index + substringLength;
1817
- index = string.indexOf(substring, endIndex);
1818
- } while (index !== -1);
1819
- returnValue += string.substr(endIndex);
1820
- return returnValue;
1821
- };
1822
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1823
- let endIndex = 0;
1824
- let returnValue = "";
1825
- do {
1826
- const gotCR = string[index - 1] === "\r";
1827
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1828
- endIndex = index + 1;
1829
- index = string.indexOf("\n", endIndex);
1830
- } while (index !== -1);
1831
- returnValue += string.substr(endIndex);
1832
- return returnValue;
1833
- };
1834
- module.exports = {
1835
- stringReplaceAll,
1836
- stringEncaseCRLFWithFirstIndex
1837
- };
1838
- }));
212
+ //#region node_modules/chalk/source/utilities.js
213
+ function stringReplaceAll(string, substring, replacer) {
214
+ let index = string.indexOf(substring);
215
+ if (index === -1) return string;
216
+ const substringLength = substring.length;
217
+ let endIndex = 0;
218
+ let returnValue = "";
219
+ do {
220
+ returnValue += string.slice(endIndex, index) + substring + replacer;
221
+ endIndex = index + substringLength;
222
+ index = string.indexOf(substring, endIndex);
223
+ } while (index !== -1);
224
+ returnValue += string.slice(endIndex);
225
+ return returnValue;
226
+ }
227
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
228
+ let endIndex = 0;
229
+ let returnValue = "";
230
+ do {
231
+ const gotCR = string[index - 1] === "\r";
232
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
233
+ endIndex = index + 1;
234
+ index = string.indexOf("\n", endIndex);
235
+ } while (index !== -1);
236
+ returnValue += string.slice(endIndex);
237
+ return returnValue;
238
+ }
1839
239
  //#endregion
1840
- //#region node_modules/chalk/source/templates.js
1841
- var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1842
- var 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;
1843
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1844
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1845
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1846
- var ESCAPES = new Map([
1847
- ["n", "\n"],
1848
- ["r", "\r"],
1849
- ["t", " "],
1850
- ["b", "\b"],
1851
- ["f", "\f"],
1852
- ["v", "\v"],
1853
- ["0", "\0"],
1854
- ["\\", "\\"],
1855
- ["e", "\x1B"],
1856
- ["a", "\x07"]
1857
- ]);
1858
- function unescape(c) {
1859
- const u = c[0] === "u";
1860
- const bracket = c[1] === "{";
1861
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
1862
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1863
- return ESCAPES.get(c) || c;
1864
- }
1865
- function parseArguments(name, arguments_) {
1866
- const results = [];
1867
- const chunks = arguments_.trim().split(/\s*,\s*/g);
1868
- let matches;
1869
- for (const chunk of chunks) {
1870
- const number = Number(chunk);
1871
- if (!Number.isNaN(number)) results.push(number);
1872
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1873
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1874
- }
1875
- return results;
1876
- }
1877
- function parseStyle(style) {
1878
- STYLE_REGEX.lastIndex = 0;
1879
- const results = [];
1880
- let matches;
1881
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
1882
- const name = matches[1];
1883
- if (matches[2]) {
1884
- const args = parseArguments(name, matches[2]);
1885
- results.push([name].concat(args));
1886
- } else results.push([name]);
1887
- }
1888
- return results;
1889
- }
1890
- function buildStyle(chalk, styles) {
1891
- const enabled = {};
1892
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
1893
- let current = chalk;
1894
- for (const [styleName, styles] of Object.entries(enabled)) {
1895
- if (!Array.isArray(styles)) continue;
1896
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
1897
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
1898
- }
1899
- return current;
240
+ //#region node_modules/chalk/source/index.js
241
+ var { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
242
+ var GENERATOR = Symbol("GENERATOR");
243
+ var STYLER = Symbol("STYLER");
244
+ var IS_EMPTY = Symbol("IS_EMPTY");
245
+ var levelMapping = [
246
+ "ansi",
247
+ "ansi",
248
+ "ansi256",
249
+ "ansi16m"
250
+ ];
251
+ var styles = Object.create(null);
252
+ var applyOptions = (object, options = {}) => {
253
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
254
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
255
+ object.level = options.level === void 0 ? colorLevel : options.level;
256
+ };
257
+ var chalkFactory = (options) => {
258
+ const chalk = (...strings) => strings.join(" ");
259
+ applyOptions(chalk, options);
260
+ Object.setPrototypeOf(chalk, createChalk.prototype);
261
+ return chalk;
262
+ };
263
+ function createChalk(options) {
264
+ return chalkFactory(options);
265
+ }
266
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
267
+ for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
268
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
269
+ Object.defineProperty(this, styleName, { value: builder });
270
+ return builder;
271
+ } };
272
+ styles.visible = { get() {
273
+ const builder = createBuilder(this, this[STYLER], true);
274
+ Object.defineProperty(this, "visible", { value: builder });
275
+ return builder;
276
+ } };
277
+ var getModelAnsi = (model, level, type, ...arguments_) => {
278
+ if (model === "rgb") {
279
+ if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
280
+ if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
281
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
1900
282
  }
1901
- module.exports = (chalk, temporary) => {
1902
- const styles = [];
1903
- const chunks = [];
1904
- let chunk = [];
1905
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1906
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
1907
- else if (style) {
1908
- const string = chunk.join("");
1909
- chunk = [];
1910
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
1911
- styles.push({
1912
- inverse,
1913
- styles: parseStyle(style)
1914
- });
1915
- } else if (close) {
1916
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
1917
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
1918
- chunk = [];
1919
- styles.pop();
1920
- } else chunk.push(character);
1921
- });
1922
- chunks.push(chunk.join(""));
1923
- if (styles.length > 0) {
1924
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1925
- throw new Error(errMessage);
1926
- }
1927
- return chunks.join("");
1928
- };
1929
- }));
1930
- //#endregion
1931
- //#region src/stsconfig.ts
1932
- var import_source = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1933
- var ansiStyles = require_ansi_styles();
1934
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser();
1935
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
1936
- var { isArray } = Array;
1937
- var levelMapping = [
1938
- "ansi",
1939
- "ansi",
1940
- "ansi256",
1941
- "ansi16m"
1942
- ];
1943
- var styles = Object.create(null);
1944
- var applyOptions = (object, options = {}) => {
1945
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
1946
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1947
- object.level = options.level === void 0 ? colorLevel : options.level;
1948
- };
1949
- var ChalkClass = class {
1950
- constructor(options) {
1951
- return chalkFactory(options);
1952
- }
1953
- };
1954
- var chalkFactory = (options) => {
1955
- const chalk = {};
1956
- applyOptions(chalk, options);
1957
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
1958
- Object.setPrototypeOf(chalk, Chalk.prototype);
1959
- Object.setPrototypeOf(chalk.template, chalk);
1960
- chalk.template.constructor = () => {
1961
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
283
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
284
+ return ansiStyles[type][model](...arguments_);
285
+ };
286
+ for (const model of [
287
+ "rgb",
288
+ "hex",
289
+ "ansi256"
290
+ ]) {
291
+ styles[model] = { get() {
292
+ const { level } = this;
293
+ return function(...arguments_) {
294
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
295
+ return createBuilder(this, styler, this[IS_EMPTY]);
1962
296
  };
1963
- chalk.template.Instance = ChalkClass;
1964
- return chalk.template;
1965
- };
1966
- function Chalk(options) {
1967
- return chalkFactory(options);
1968
- }
1969
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
1970
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1971
- Object.defineProperty(this, styleName, { value: builder });
1972
- return builder;
1973
297
  } };
1974
- styles.visible = { get() {
1975
- const builder = createBuilder(this, this._styler, true);
1976
- Object.defineProperty(this, "visible", { value: builder });
1977
- return builder;
1978
- } };
1979
- var usedModels = [
1980
- "rgb",
1981
- "hex",
1982
- "keyword",
1983
- "hsl",
1984
- "hsv",
1985
- "hwb",
1986
- "ansi",
1987
- "ansi256"
1988
- ];
1989
- for (const model of usedModels) styles[model] = { get() {
298
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
299
+ styles[bgModel] = { get() {
1990
300
  const { level } = this;
1991
301
  return function(...arguments_) {
1992
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1993
- return createBuilder(this, styler, this._isEmpty);
302
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
303
+ return createBuilder(this, styler, this[IS_EMPTY]);
1994
304
  };
1995
305
  } };
1996
- for (const model of usedModels) {
1997
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1998
- styles[bgModel] = { get() {
1999
- const { level } = this;
2000
- return function(...arguments_) {
2001
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
2002
- return createBuilder(this, styler, this._isEmpty);
2003
- };
2004
- } };
2005
- }
2006
- var proto = Object.defineProperties(() => {}, {
2007
- ...styles,
2008
- level: {
2009
- enumerable: true,
2010
- get() {
2011
- return this._generator.level;
2012
- },
2013
- set(level) {
2014
- this._generator.level = level;
2015
- }
2016
- }
2017
- });
2018
- var createStyler = (open, close, parent) => {
2019
- let openAll;
2020
- let closeAll;
2021
- if (parent === void 0) {
2022
- openAll = open;
2023
- closeAll = close;
2024
- } else {
2025
- openAll = parent.openAll + open;
2026
- closeAll = close + parent.closeAll;
2027
- }
2028
- return {
2029
- open,
2030
- close,
2031
- openAll,
2032
- closeAll,
2033
- parent
2034
- };
2035
- };
2036
- var createBuilder = (self, _styler, _isEmpty) => {
2037
- const builder = (...arguments_) => {
2038
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
2039
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2040
- };
2041
- Object.setPrototypeOf(builder, proto);
2042
- builder._generator = self;
2043
- builder._styler = _styler;
2044
- builder._isEmpty = _isEmpty;
2045
- return builder;
2046
- };
2047
- var applyStyle = (self, string) => {
2048
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
2049
- let styler = self._styler;
2050
- if (styler === void 0) return string;
2051
- const { openAll, closeAll } = styler;
2052
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
2053
- string = stringReplaceAll(string, styler.close, styler.open);
2054
- styler = styler.parent;
306
+ }
307
+ var proto = Object.defineProperties(() => {}, {
308
+ ...styles,
309
+ level: {
310
+ enumerable: true,
311
+ get() {
312
+ return this[GENERATOR].level;
313
+ },
314
+ set(level) {
315
+ this[GENERATOR].level = level;
2055
316
  }
2056
- const lfIndex = string.indexOf("\n");
2057
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2058
- return openAll + string + closeAll;
2059
- };
2060
- var template;
2061
- var chalkTag = (chalk, ...strings) => {
2062
- const [firstString] = strings;
2063
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
2064
- const arguments_ = strings.slice(1);
2065
- const parts = [firstString.raw[0]];
2066
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
2067
- if (template === void 0) template = require_templates();
2068
- return template(chalk, parts.join(""));
317
+ }
318
+ });
319
+ var createStyler = (open, close, parent) => {
320
+ let openAll;
321
+ let closeAll;
322
+ if (parent === void 0) {
323
+ openAll = open;
324
+ closeAll = close;
325
+ } else {
326
+ openAll = parent.openAll + open;
327
+ closeAll = close + parent.closeAll;
328
+ }
329
+ return {
330
+ open,
331
+ close,
332
+ openAll,
333
+ closeAll,
334
+ parent
2069
335
  };
2070
- Object.defineProperties(Chalk.prototype, styles);
2071
- var chalk = Chalk();
2072
- chalk.supportsColor = stdoutColor;
2073
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
2074
- chalk.stderr.supportsColor = stderrColor;
2075
- module.exports = chalk;
2076
- })))());
336
+ };
337
+ var createBuilder = (self, _styler, _isEmpty) => {
338
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
339
+ Object.setPrototypeOf(builder, proto);
340
+ builder[GENERATOR] = self;
341
+ builder[STYLER] = _styler;
342
+ builder[IS_EMPTY] = _isEmpty;
343
+ return builder;
344
+ };
345
+ var applyStyle = (self, string) => {
346
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
347
+ let styler = self[STYLER];
348
+ if (styler === void 0) return string;
349
+ const { openAll, closeAll } = styler;
350
+ if (string.includes("\x1B")) while (styler !== void 0) {
351
+ string = stringReplaceAll(string, styler.close, styler.open);
352
+ styler = styler.parent;
353
+ }
354
+ const lfIndex = string.indexOf("\n");
355
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
356
+ return openAll + string + closeAll;
357
+ };
358
+ Object.defineProperties(createChalk.prototype, styles);
359
+ var chalk = createChalk();
360
+ createChalk({ level: stderrColor ? stderrColor.level : 0 });
361
+ //#endregion
362
+ //#region src/stsconfig.ts
2077
363
  var envOptions = {};
2078
364
  function SetupConfig(envOptions, logger) {
2079
365
  const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
@@ -2247,10 +533,10 @@ function SetupConfig(envOptions, logger) {
2247
533
  try {
2248
534
  (0, node_fs.accessSync)(passwordFile, node_fs.constants.R_OK);
2249
535
  const data = (0, node_fs.readFileSync)(passwordFile, "utf8");
2250
- if (logger) logger.debug(import_source.default.green(`Successfully loaded password file: [${passwordFile}]`));
536
+ if (logger) logger.debug(chalk.green(`Successfully loaded password file: [${passwordFile}]`));
2251
537
  return data;
2252
538
  } catch (err) {
2253
- if (logger) logger.debug(import_source.default.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
539
+ if (logger) logger.debug(chalk.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
2254
540
  return "";
2255
541
  }
2256
542
  };