@sentio/runtime 3.9.0-rc.7 → 3.9.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{chunk-4ZC4G6EI.js → chunk-VNWNJ423.js} +8 -3
- package/lib/{chunk-4ZC4G6EI.js.map → chunk-VNWNJ423.js.map} +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +1044 -1220
- package/lib/processor-runner.js.map +1 -1
- package/package.json +2 -2
- package/src/db-context.ts +4 -2
- package/src/full-service.ts +1 -1
- package/src/logger.ts +5 -5
- package/src/processor-runner.ts +1 -1
- package/src/provider.ts +1 -1
- package/src/service-v3.ts +1 -1
- package/src/service.ts +1 -1
- package/src/utils.ts +5 -2
package/lib/processor-runner.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
require_lib3,
|
|
21
21
|
require_src,
|
|
22
22
|
withAbort
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VNWNJ423.js";
|
|
24
24
|
import {
|
|
25
25
|
ExecutionConfig,
|
|
26
26
|
HandlerType,
|
|
@@ -57,9 +57,9 @@ import {
|
|
|
57
57
|
__toESM
|
|
58
58
|
} from "./chunk-KVSDPGUI.js";
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
60
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/format.js
|
|
61
61
|
var require_format = __commonJS({
|
|
62
|
-
"../../node_modules/.pnpm/logform@2.
|
|
62
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/format.js"(exports, module) {
|
|
63
63
|
"use strict";
|
|
64
64
|
var InvalidFormatError = class _InvalidFormatError extends Error {
|
|
65
65
|
constructor(formatFn) {
|
|
@@ -874,9 +874,9 @@ var require_triple_beam = __commonJS({
|
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
|
|
877
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
877
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/colorize.js
|
|
878
878
|
var require_colorize = __commonJS({
|
|
879
|
-
"../../node_modules/.pnpm/logform@2.
|
|
879
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/colorize.js"(exports, module) {
|
|
880
880
|
"use strict";
|
|
881
881
|
var colors = require_safe();
|
|
882
882
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
@@ -951,9 +951,9 @@ var require_colorize = __commonJS({
|
|
|
951
951
|
}
|
|
952
952
|
});
|
|
953
953
|
|
|
954
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
954
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/levels.js
|
|
955
955
|
var require_levels = __commonJS({
|
|
956
|
-
"../../node_modules/.pnpm/logform@2.
|
|
956
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/levels.js"(exports, module) {
|
|
957
957
|
"use strict";
|
|
958
958
|
var { Colorizer } = require_colorize();
|
|
959
959
|
module.exports = (config) => {
|
|
@@ -963,9 +963,9 @@ var require_levels = __commonJS({
|
|
|
963
963
|
}
|
|
964
964
|
});
|
|
965
965
|
|
|
966
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
966
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/align.js
|
|
967
967
|
var require_align = __commonJS({
|
|
968
|
-
"../../node_modules/.pnpm/logform@2.
|
|
968
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/align.js"(exports, module) {
|
|
969
969
|
"use strict";
|
|
970
970
|
var format3 = require_format();
|
|
971
971
|
module.exports = format3((info) => {
|
|
@@ -975,9 +975,9 @@ var require_align = __commonJS({
|
|
|
975
975
|
}
|
|
976
976
|
});
|
|
977
977
|
|
|
978
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
978
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/errors.js
|
|
979
979
|
var require_errors = __commonJS({
|
|
980
|
-
"../../node_modules/.pnpm/logform@2.
|
|
980
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/errors.js"(exports, module) {
|
|
981
981
|
"use strict";
|
|
982
982
|
var format3 = require_format();
|
|
983
983
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
@@ -1005,9 +1005,9 @@ var require_errors = __commonJS({
|
|
|
1005
1005
|
}
|
|
1006
1006
|
});
|
|
1007
1007
|
|
|
1008
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1008
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/pad-levels.js
|
|
1009
1009
|
var require_pad_levels = __commonJS({
|
|
1010
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1010
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/pad-levels.js"(exports, module) {
|
|
1011
1011
|
"use strict";
|
|
1012
1012
|
var { configs, LEVEL, MESSAGE } = require_triple_beam();
|
|
1013
1013
|
var Padder = class _Padder {
|
|
@@ -1076,9 +1076,9 @@ var require_pad_levels = __commonJS({
|
|
|
1076
1076
|
}
|
|
1077
1077
|
});
|
|
1078
1078
|
|
|
1079
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1079
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/cli.js
|
|
1080
1080
|
var require_cli2 = __commonJS({
|
|
1081
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1081
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/cli.js"(exports, module) {
|
|
1082
1082
|
"use strict";
|
|
1083
1083
|
var { Colorizer } = require_colorize();
|
|
1084
1084
|
var { Padder } = require_pad_levels();
|
|
@@ -1113,9 +1113,9 @@ var require_cli2 = __commonJS({
|
|
|
1113
1113
|
}
|
|
1114
1114
|
});
|
|
1115
1115
|
|
|
1116
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1116
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/combine.js
|
|
1117
1117
|
var require_combine = __commonJS({
|
|
1118
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1118
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/combine.js"(exports, module) {
|
|
1119
1119
|
"use strict";
|
|
1120
1120
|
var format3 = require_format();
|
|
1121
1121
|
function cascade(formats) {
|
|
@@ -1737,9 +1737,9 @@ ${originalIndentation}`;
|
|
|
1737
1737
|
}
|
|
1738
1738
|
});
|
|
1739
1739
|
|
|
1740
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1740
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/json.js
|
|
1741
1741
|
var require_json = __commonJS({
|
|
1742
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1742
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/json.js"(exports, module) {
|
|
1743
1743
|
"use strict";
|
|
1744
1744
|
var format3 = require_format();
|
|
1745
1745
|
var { MESSAGE } = require_triple_beam();
|
|
@@ -1757,9 +1757,9 @@ var require_json = __commonJS({
|
|
|
1757
1757
|
}
|
|
1758
1758
|
});
|
|
1759
1759
|
|
|
1760
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1760
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/label.js
|
|
1761
1761
|
var require_label = __commonJS({
|
|
1762
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1762
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/label.js"(exports, module) {
|
|
1763
1763
|
"use strict";
|
|
1764
1764
|
var format3 = require_format();
|
|
1765
1765
|
module.exports = format3((info, opts) => {
|
|
@@ -1773,9 +1773,9 @@ var require_label = __commonJS({
|
|
|
1773
1773
|
}
|
|
1774
1774
|
});
|
|
1775
1775
|
|
|
1776
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1776
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/logstash.js
|
|
1777
1777
|
var require_logstash = __commonJS({
|
|
1778
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1778
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/logstash.js"(exports, module) {
|
|
1779
1779
|
"use strict";
|
|
1780
1780
|
var format3 = require_format();
|
|
1781
1781
|
var { MESSAGE } = require_triple_beam();
|
|
@@ -1797,9 +1797,9 @@ var require_logstash = __commonJS({
|
|
|
1797
1797
|
}
|
|
1798
1798
|
});
|
|
1799
1799
|
|
|
1800
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1800
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/metadata.js
|
|
1801
1801
|
var require_metadata = __commonJS({
|
|
1802
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1802
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/metadata.js"(exports, module) {
|
|
1803
1803
|
"use strict";
|
|
1804
1804
|
var format3 = require_format();
|
|
1805
1805
|
function fillExcept(info, fillExceptKeys, metadataKey) {
|
|
@@ -1967,9 +1967,9 @@ var require_ms = __commonJS({
|
|
|
1967
1967
|
}
|
|
1968
1968
|
});
|
|
1969
1969
|
|
|
1970
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1970
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/ms.js
|
|
1971
1971
|
var require_ms2 = __commonJS({
|
|
1972
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1972
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/ms.js"(exports, module) {
|
|
1973
1973
|
"use strict";
|
|
1974
1974
|
var format3 = require_format();
|
|
1975
1975
|
var ms = require_ms();
|
|
@@ -1983,9 +1983,9 @@ var require_ms2 = __commonJS({
|
|
|
1983
1983
|
}
|
|
1984
1984
|
});
|
|
1985
1985
|
|
|
1986
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
1986
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/pretty-print.js
|
|
1987
1987
|
var require_pretty_print = __commonJS({
|
|
1988
|
-
"../../node_modules/.pnpm/logform@2.
|
|
1988
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/pretty-print.js"(exports, module) {
|
|
1989
1989
|
"use strict";
|
|
1990
1990
|
var inspect2 = __require("util").inspect;
|
|
1991
1991
|
var format3 = require_format();
|
|
@@ -2001,9 +2001,9 @@ var require_pretty_print = __commonJS({
|
|
|
2001
2001
|
}
|
|
2002
2002
|
});
|
|
2003
2003
|
|
|
2004
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2004
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/printf.js
|
|
2005
2005
|
var require_printf = __commonJS({
|
|
2006
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2006
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/printf.js"(exports, module) {
|
|
2007
2007
|
"use strict";
|
|
2008
2008
|
var { MESSAGE } = require_triple_beam();
|
|
2009
2009
|
var Printf = class {
|
|
@@ -2020,9 +2020,9 @@ var require_printf = __commonJS({
|
|
|
2020
2020
|
}
|
|
2021
2021
|
});
|
|
2022
2022
|
|
|
2023
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2023
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/simple.js
|
|
2024
2024
|
var require_simple = __commonJS({
|
|
2025
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2025
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/simple.js"(exports, module) {
|
|
2026
2026
|
"use strict";
|
|
2027
2027
|
var format3 = require_format();
|
|
2028
2028
|
var { MESSAGE } = require_triple_beam();
|
|
@@ -2044,9 +2044,9 @@ var require_simple = __commonJS({
|
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
2046
|
|
|
2047
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2047
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/splat.js
|
|
2048
2048
|
var require_splat = __commonJS({
|
|
2049
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2049
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/splat.js"(exports, module) {
|
|
2050
2050
|
"use strict";
|
|
2051
2051
|
var util = __require("util");
|
|
2052
2052
|
var { SPLAT } = require_triple_beam();
|
|
@@ -2532,9 +2532,9 @@ var init_fecha = __esm({
|
|
|
2532
2532
|
}
|
|
2533
2533
|
});
|
|
2534
2534
|
|
|
2535
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2535
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/timestamp.js
|
|
2536
2536
|
var require_timestamp = __commonJS({
|
|
2537
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2537
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/timestamp.js"(exports, module) {
|
|
2538
2538
|
"use strict";
|
|
2539
2539
|
var fecha2 = (init_fecha(), __toCommonJS(fecha_exports));
|
|
2540
2540
|
var format3 = require_format();
|
|
@@ -2553,9 +2553,9 @@ var require_timestamp = __commonJS({
|
|
|
2553
2553
|
}
|
|
2554
2554
|
});
|
|
2555
2555
|
|
|
2556
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2556
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/uncolorize.js
|
|
2557
2557
|
var require_uncolorize = __commonJS({
|
|
2558
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2558
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/uncolorize.js"(exports, module) {
|
|
2559
2559
|
"use strict";
|
|
2560
2560
|
var colors = require_safe();
|
|
2561
2561
|
var format3 = require_format();
|
|
@@ -2575,9 +2575,9 @@ var require_uncolorize = __commonJS({
|
|
|
2575
2575
|
}
|
|
2576
2576
|
});
|
|
2577
2577
|
|
|
2578
|
-
// ../../node_modules/.pnpm/logform@2.
|
|
2578
|
+
// ../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/index.js
|
|
2579
2579
|
var require_logform = __commonJS({
|
|
2580
|
-
"../../node_modules/.pnpm/logform@2.
|
|
2580
|
+
"../../node_modules/.pnpm/logform@2.7.0/node_modules/logform/index.js"(exports) {
|
|
2581
2581
|
"use strict";
|
|
2582
2582
|
var format3 = exports.format = require_format();
|
|
2583
2583
|
exports.levels = require_levels();
|
|
@@ -2643,9 +2643,9 @@ var require_logform = __commonJS({
|
|
|
2643
2643
|
}
|
|
2644
2644
|
});
|
|
2645
2645
|
|
|
2646
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
2646
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/common.js
|
|
2647
2647
|
var require_common = __commonJS({
|
|
2648
|
-
"../../node_modules/.pnpm/winston@3.
|
|
2648
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/common.js"(exports) {
|
|
2649
2649
|
"use strict";
|
|
2650
2650
|
var { format: format3 } = __require("util");
|
|
2651
2651
|
exports.warn = {
|
|
@@ -2680,13 +2680,13 @@ var require_common = __commonJS({
|
|
|
2680
2680
|
}
|
|
2681
2681
|
});
|
|
2682
2682
|
|
|
2683
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
2683
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/package.json
|
|
2684
2684
|
var require_package = __commonJS({
|
|
2685
|
-
"../../node_modules/.pnpm/winston@3.
|
|
2685
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/package.json"(exports, module) {
|
|
2686
2686
|
module.exports = {
|
|
2687
2687
|
name: "winston",
|
|
2688
2688
|
description: "A logger for just about everything.",
|
|
2689
|
-
version: "3.
|
|
2689
|
+
version: "3.19.0",
|
|
2690
2690
|
author: "Charlie Robbins <charlie.robbins@gmail.com>",
|
|
2691
2691
|
maintainers: [
|
|
2692
2692
|
"David Hyde <dabh@alumni.stanford.edu>"
|
|
@@ -2709,32 +2709,31 @@ var require_package = __commonJS({
|
|
|
2709
2709
|
"stream"
|
|
2710
2710
|
],
|
|
2711
2711
|
dependencies: {
|
|
2712
|
-
"@dabh/diagnostics": "^2.0.
|
|
2712
|
+
"@dabh/diagnostics": "^2.0.8",
|
|
2713
2713
|
"@colors/colors": "^1.6.0",
|
|
2714
2714
|
async: "^3.2.3",
|
|
2715
2715
|
"is-stream": "^2.0.0",
|
|
2716
|
-
logform: "^2.
|
|
2716
|
+
logform: "^2.7.0",
|
|
2717
2717
|
"one-time": "^1.0.0",
|
|
2718
2718
|
"readable-stream": "^3.4.0",
|
|
2719
2719
|
"safe-stable-stringify": "^2.3.1",
|
|
2720
2720
|
"stack-trace": "0.0.x",
|
|
2721
2721
|
"triple-beam": "^1.3.0",
|
|
2722
|
-
"winston-transport": "^4.
|
|
2722
|
+
"winston-transport": "^4.9.0"
|
|
2723
2723
|
},
|
|
2724
2724
|
devDependencies: {
|
|
2725
2725
|
"@babel/cli": "^7.23.9",
|
|
2726
2726
|
"@babel/core": "^7.24.0",
|
|
2727
2727
|
"@babel/preset-env": "^7.24.0",
|
|
2728
|
-
"@dabh/eslint-config-populist": "^
|
|
2728
|
+
"@dabh/eslint-config-populist": "^4.4.0",
|
|
2729
2729
|
"@types/node": "^20.11.24",
|
|
2730
2730
|
"abstract-winston-transport": "^0.5.1",
|
|
2731
2731
|
assume: "^2.2.0",
|
|
2732
2732
|
"cross-spawn-async": "^2.2.5",
|
|
2733
2733
|
eslint: "^8.57.0",
|
|
2734
2734
|
hock: "^1.4.1",
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
rimraf: "^5.0.5",
|
|
2735
|
+
jest: "^29.7.0",
|
|
2736
|
+
rimraf: "5.0.10",
|
|
2738
2737
|
split2: "^4.1.0",
|
|
2739
2738
|
"std-mocks": "^2.0.0",
|
|
2740
2739
|
through2: "^4.0.2",
|
|
@@ -2745,11 +2744,12 @@ var require_package = __commonJS({
|
|
|
2745
2744
|
types: "./index.d.ts",
|
|
2746
2745
|
scripts: {
|
|
2747
2746
|
lint: "eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",
|
|
2748
|
-
test: "
|
|
2749
|
-
"test:
|
|
2750
|
-
"test:
|
|
2751
|
-
"test:
|
|
2752
|
-
build: "
|
|
2747
|
+
test: "jest",
|
|
2748
|
+
"test:unit": "jest -c test/jest.config.unit.js",
|
|
2749
|
+
"test:integration": "jest -c test/jest.config.integration.js",
|
|
2750
|
+
"test:typescript": "npx --package typescript tsc --project test",
|
|
2751
|
+
build: "babel lib -d dist",
|
|
2752
|
+
prebuild: "rimraf dist",
|
|
2753
2753
|
prepublishOnly: "npm run build"
|
|
2754
2754
|
},
|
|
2755
2755
|
engines: {
|
|
@@ -5267,9 +5267,9 @@ var require_stream_writable = __commonJS({
|
|
|
5267
5267
|
}
|
|
5268
5268
|
});
|
|
5269
5269
|
|
|
5270
|
-
// ../../node_modules/.pnpm/winston-transport@4.
|
|
5270
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/modern.js
|
|
5271
5271
|
var require_modern = __commonJS({
|
|
5272
|
-
"../../node_modules/.pnpm/winston-transport@4.
|
|
5272
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/modern.js"(exports, module) {
|
|
5273
5273
|
"use strict";
|
|
5274
5274
|
var util = __require("util");
|
|
5275
5275
|
var Writable = require_stream_writable();
|
|
@@ -5379,9 +5379,9 @@ var require_modern = __commonJS({
|
|
|
5379
5379
|
}
|
|
5380
5380
|
});
|
|
5381
5381
|
|
|
5382
|
-
// ../../node_modules/.pnpm/winston-transport@4.
|
|
5382
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/legacy.js
|
|
5383
5383
|
var require_legacy = __commonJS({
|
|
5384
|
-
"../../node_modules/.pnpm/winston-transport@4.
|
|
5384
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/legacy.js"(exports, module) {
|
|
5385
5385
|
"use strict";
|
|
5386
5386
|
var util = __require("util");
|
|
5387
5387
|
var { LEVEL } = require_triple_beam();
|
|
@@ -5445,18 +5445,18 @@ var require_legacy = __commonJS({
|
|
|
5445
5445
|
}
|
|
5446
5446
|
});
|
|
5447
5447
|
|
|
5448
|
-
// ../../node_modules/.pnpm/winston-transport@4.
|
|
5448
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/index.js
|
|
5449
5449
|
var require_winston_transport = __commonJS({
|
|
5450
|
-
"../../node_modules/.pnpm/winston-transport@4.
|
|
5450
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/index.js"(exports, module) {
|
|
5451
5451
|
"use strict";
|
|
5452
5452
|
module.exports = require_modern();
|
|
5453
5453
|
module.exports.LegacyTransportStream = require_legacy();
|
|
5454
5454
|
}
|
|
5455
5455
|
});
|
|
5456
5456
|
|
|
5457
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
5457
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/console.js
|
|
5458
5458
|
var require_console = __commonJS({
|
|
5459
|
-
"../../node_modules/.pnpm/winston@3.
|
|
5459
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/console.js"(exports, module) {
|
|
5460
5460
|
"use strict";
|
|
5461
5461
|
var os2 = __require("os");
|
|
5462
5462
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
@@ -5473,6 +5473,10 @@ var require_console = __commonJS({
|
|
|
5473
5473
|
this.stderrLevels = this._stringArrayToSet(options2.stderrLevels);
|
|
5474
5474
|
this.consoleWarnLevels = this._stringArrayToSet(options2.consoleWarnLevels);
|
|
5475
5475
|
this.eol = typeof options2.eol === "string" ? options2.eol : os2.EOL;
|
|
5476
|
+
this.forceConsole = options2.forceConsole || false;
|
|
5477
|
+
this._consoleLog = console.log.bind(console);
|
|
5478
|
+
this._consoleWarn = console.warn.bind(console);
|
|
5479
|
+
this._consoleError = console.error.bind(console);
|
|
5476
5480
|
this.setMaxListeners(30);
|
|
5477
5481
|
}
|
|
5478
5482
|
/**
|
|
@@ -5484,30 +5488,30 @@ var require_console = __commonJS({
|
|
|
5484
5488
|
log(info, callback) {
|
|
5485
5489
|
setImmediate(() => this.emit("logged", info));
|
|
5486
5490
|
if (this.stderrLevels[info[LEVEL]]) {
|
|
5487
|
-
if (console._stderr) {
|
|
5491
|
+
if (console._stderr && !this.forceConsole) {
|
|
5488
5492
|
console._stderr.write(`${info[MESSAGE]}${this.eol}`);
|
|
5489
5493
|
} else {
|
|
5490
|
-
|
|
5494
|
+
this._consoleError(info[MESSAGE]);
|
|
5491
5495
|
}
|
|
5492
5496
|
if (callback) {
|
|
5493
5497
|
callback();
|
|
5494
5498
|
}
|
|
5495
5499
|
return;
|
|
5496
5500
|
} else if (this.consoleWarnLevels[info[LEVEL]]) {
|
|
5497
|
-
if (console._stderr) {
|
|
5501
|
+
if (console._stderr && !this.forceConsole) {
|
|
5498
5502
|
console._stderr.write(`${info[MESSAGE]}${this.eol}`);
|
|
5499
5503
|
} else {
|
|
5500
|
-
|
|
5504
|
+
this._consoleWarn(info[MESSAGE]);
|
|
5501
5505
|
}
|
|
5502
5506
|
if (callback) {
|
|
5503
5507
|
callback();
|
|
5504
5508
|
}
|
|
5505
5509
|
return;
|
|
5506
5510
|
}
|
|
5507
|
-
if (console._stdout) {
|
|
5511
|
+
if (console._stdout && !this.forceConsole) {
|
|
5508
5512
|
console._stdout.write(`${info[MESSAGE]}${this.eol}`);
|
|
5509
5513
|
} else {
|
|
5510
|
-
|
|
5514
|
+
this._consoleLog(info[MESSAGE]);
|
|
5511
5515
|
}
|
|
5512
5516
|
if (callback) {
|
|
5513
5517
|
callback();
|
|
@@ -5522,8 +5526,7 @@ var require_console = __commonJS({
|
|
|
5522
5526
|
* @private
|
|
5523
5527
|
*/
|
|
5524
5528
|
_stringArrayToSet(strArray, errMsg) {
|
|
5525
|
-
if (!strArray)
|
|
5526
|
-
return {};
|
|
5529
|
+
if (!strArray) return {};
|
|
5527
5530
|
errMsg = errMsg || "Cannot make set from type other than Array of string elements";
|
|
5528
5531
|
if (!Array.isArray(strArray)) {
|
|
5529
5532
|
throw new Error(errMsg);
|
|
@@ -6318,9 +6321,9 @@ var require_readable = __commonJS({
|
|
|
6318
6321
|
}
|
|
6319
6322
|
});
|
|
6320
6323
|
|
|
6321
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
6324
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/diagnostics.js
|
|
6322
6325
|
var require_diagnostics = __commonJS({
|
|
6323
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
6326
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/diagnostics.js"(exports, module) {
|
|
6324
6327
|
"use strict";
|
|
6325
6328
|
var adapters = [];
|
|
6326
6329
|
var modifiers = [];
|
|
@@ -6413,9 +6416,9 @@ var require_diagnostics = __commonJS({
|
|
|
6413
6416
|
}
|
|
6414
6417
|
});
|
|
6415
6418
|
|
|
6416
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
6419
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/production.js
|
|
6417
6420
|
var require_production = __commonJS({
|
|
6418
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
6421
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/production.js"(exports, module) {
|
|
6419
6422
|
"use strict";
|
|
6420
6423
|
var create = require_diagnostics();
|
|
6421
6424
|
var diagnostics = create(function prod(namespace, options2) {
|
|
@@ -6430,306 +6433,250 @@ var require_production = __commonJS({
|
|
|
6430
6433
|
}
|
|
6431
6434
|
});
|
|
6432
6435
|
|
|
6433
|
-
// ../../node_modules/.pnpm
|
|
6434
|
-
var
|
|
6435
|
-
"../../node_modules/.pnpm
|
|
6436
|
-
"use strict";
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
};
|
|
6587
|
-
}
|
|
6588
|
-
});
|
|
6589
|
-
|
|
6590
|
-
// ../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js
|
|
6591
|
-
var require_is_arrayish = __commonJS({
|
|
6592
|
-
"../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js"(exports, module) {
|
|
6593
|
-
"use strict";
|
|
6594
|
-
module.exports = function isArrayish(obj) {
|
|
6595
|
-
if (!obj || typeof obj === "string") {
|
|
6596
|
-
return false;
|
|
6597
|
-
}
|
|
6598
|
-
return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
|
|
6436
|
+
// ../../node_modules/.pnpm/@so-ric+colorspace@1.1.6/node_modules/@so-ric/colorspace/dist/index.cjs.js
|
|
6437
|
+
var require_index_cjs = __commonJS({
|
|
6438
|
+
"../../node_modules/.pnpm/@so-ric+colorspace@1.1.6/node_modules/@so-ric/colorspace/dist/index.cjs.js"(exports, module) {
|
|
6439
|
+
"use strict";
|
|
6440
|
+
var cssKeywords = {
|
|
6441
|
+
aliceblue: [240, 248, 255],
|
|
6442
|
+
antiquewhite: [250, 235, 215],
|
|
6443
|
+
aqua: [0, 255, 255],
|
|
6444
|
+
aquamarine: [127, 255, 212],
|
|
6445
|
+
azure: [240, 255, 255],
|
|
6446
|
+
beige: [245, 245, 220],
|
|
6447
|
+
bisque: [255, 228, 196],
|
|
6448
|
+
black: [0, 0, 0],
|
|
6449
|
+
blanchedalmond: [255, 235, 205],
|
|
6450
|
+
blue: [0, 0, 255],
|
|
6451
|
+
blueviolet: [138, 43, 226],
|
|
6452
|
+
brown: [165, 42, 42],
|
|
6453
|
+
burlywood: [222, 184, 135],
|
|
6454
|
+
cadetblue: [95, 158, 160],
|
|
6455
|
+
chartreuse: [127, 255, 0],
|
|
6456
|
+
chocolate: [210, 105, 30],
|
|
6457
|
+
coral: [255, 127, 80],
|
|
6458
|
+
cornflowerblue: [100, 149, 237],
|
|
6459
|
+
cornsilk: [255, 248, 220],
|
|
6460
|
+
crimson: [220, 20, 60],
|
|
6461
|
+
cyan: [0, 255, 255],
|
|
6462
|
+
darkblue: [0, 0, 139],
|
|
6463
|
+
darkcyan: [0, 139, 139],
|
|
6464
|
+
darkgoldenrod: [184, 134, 11],
|
|
6465
|
+
darkgray: [169, 169, 169],
|
|
6466
|
+
darkgreen: [0, 100, 0],
|
|
6467
|
+
darkgrey: [169, 169, 169],
|
|
6468
|
+
darkkhaki: [189, 183, 107],
|
|
6469
|
+
darkmagenta: [139, 0, 139],
|
|
6470
|
+
darkolivegreen: [85, 107, 47],
|
|
6471
|
+
darkorange: [255, 140, 0],
|
|
6472
|
+
darkorchid: [153, 50, 204],
|
|
6473
|
+
darkred: [139, 0, 0],
|
|
6474
|
+
darksalmon: [233, 150, 122],
|
|
6475
|
+
darkseagreen: [143, 188, 143],
|
|
6476
|
+
darkslateblue: [72, 61, 139],
|
|
6477
|
+
darkslategray: [47, 79, 79],
|
|
6478
|
+
darkslategrey: [47, 79, 79],
|
|
6479
|
+
darkturquoise: [0, 206, 209],
|
|
6480
|
+
darkviolet: [148, 0, 211],
|
|
6481
|
+
deeppink: [255, 20, 147],
|
|
6482
|
+
deepskyblue: [0, 191, 255],
|
|
6483
|
+
dimgray: [105, 105, 105],
|
|
6484
|
+
dimgrey: [105, 105, 105],
|
|
6485
|
+
dodgerblue: [30, 144, 255],
|
|
6486
|
+
firebrick: [178, 34, 34],
|
|
6487
|
+
floralwhite: [255, 250, 240],
|
|
6488
|
+
forestgreen: [34, 139, 34],
|
|
6489
|
+
fuchsia: [255, 0, 255],
|
|
6490
|
+
gainsboro: [220, 220, 220],
|
|
6491
|
+
ghostwhite: [248, 248, 255],
|
|
6492
|
+
gold: [255, 215, 0],
|
|
6493
|
+
goldenrod: [218, 165, 32],
|
|
6494
|
+
gray: [128, 128, 128],
|
|
6495
|
+
green: [0, 128, 0],
|
|
6496
|
+
greenyellow: [173, 255, 47],
|
|
6497
|
+
grey: [128, 128, 128],
|
|
6498
|
+
honeydew: [240, 255, 240],
|
|
6499
|
+
hotpink: [255, 105, 180],
|
|
6500
|
+
indianred: [205, 92, 92],
|
|
6501
|
+
indigo: [75, 0, 130],
|
|
6502
|
+
ivory: [255, 255, 240],
|
|
6503
|
+
khaki: [240, 230, 140],
|
|
6504
|
+
lavender: [230, 230, 250],
|
|
6505
|
+
lavenderblush: [255, 240, 245],
|
|
6506
|
+
lawngreen: [124, 252, 0],
|
|
6507
|
+
lemonchiffon: [255, 250, 205],
|
|
6508
|
+
lightblue: [173, 216, 230],
|
|
6509
|
+
lightcoral: [240, 128, 128],
|
|
6510
|
+
lightcyan: [224, 255, 255],
|
|
6511
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
6512
|
+
lightgray: [211, 211, 211],
|
|
6513
|
+
lightgreen: [144, 238, 144],
|
|
6514
|
+
lightgrey: [211, 211, 211],
|
|
6515
|
+
lightpink: [255, 182, 193],
|
|
6516
|
+
lightsalmon: [255, 160, 122],
|
|
6517
|
+
lightseagreen: [32, 178, 170],
|
|
6518
|
+
lightskyblue: [135, 206, 250],
|
|
6519
|
+
lightslategray: [119, 136, 153],
|
|
6520
|
+
lightslategrey: [119, 136, 153],
|
|
6521
|
+
lightsteelblue: [176, 196, 222],
|
|
6522
|
+
lightyellow: [255, 255, 224],
|
|
6523
|
+
lime: [0, 255, 0],
|
|
6524
|
+
limegreen: [50, 205, 50],
|
|
6525
|
+
linen: [250, 240, 230],
|
|
6526
|
+
magenta: [255, 0, 255],
|
|
6527
|
+
maroon: [128, 0, 0],
|
|
6528
|
+
mediumaquamarine: [102, 205, 170],
|
|
6529
|
+
mediumblue: [0, 0, 205],
|
|
6530
|
+
mediumorchid: [186, 85, 211],
|
|
6531
|
+
mediumpurple: [147, 112, 219],
|
|
6532
|
+
mediumseagreen: [60, 179, 113],
|
|
6533
|
+
mediumslateblue: [123, 104, 238],
|
|
6534
|
+
mediumspringgreen: [0, 250, 154],
|
|
6535
|
+
mediumturquoise: [72, 209, 204],
|
|
6536
|
+
mediumvioletred: [199, 21, 133],
|
|
6537
|
+
midnightblue: [25, 25, 112],
|
|
6538
|
+
mintcream: [245, 255, 250],
|
|
6539
|
+
mistyrose: [255, 228, 225],
|
|
6540
|
+
moccasin: [255, 228, 181],
|
|
6541
|
+
navajowhite: [255, 222, 173],
|
|
6542
|
+
navy: [0, 0, 128],
|
|
6543
|
+
oldlace: [253, 245, 230],
|
|
6544
|
+
olive: [128, 128, 0],
|
|
6545
|
+
olivedrab: [107, 142, 35],
|
|
6546
|
+
orange: [255, 165, 0],
|
|
6547
|
+
orangered: [255, 69, 0],
|
|
6548
|
+
orchid: [218, 112, 214],
|
|
6549
|
+
palegoldenrod: [238, 232, 170],
|
|
6550
|
+
palegreen: [152, 251, 152],
|
|
6551
|
+
paleturquoise: [175, 238, 238],
|
|
6552
|
+
palevioletred: [219, 112, 147],
|
|
6553
|
+
papayawhip: [255, 239, 213],
|
|
6554
|
+
peachpuff: [255, 218, 185],
|
|
6555
|
+
peru: [205, 133, 63],
|
|
6556
|
+
pink: [255, 192, 203],
|
|
6557
|
+
plum: [221, 160, 221],
|
|
6558
|
+
powderblue: [176, 224, 230],
|
|
6559
|
+
purple: [128, 0, 128],
|
|
6560
|
+
rebeccapurple: [102, 51, 153],
|
|
6561
|
+
red: [255, 0, 0],
|
|
6562
|
+
rosybrown: [188, 143, 143],
|
|
6563
|
+
royalblue: [65, 105, 225],
|
|
6564
|
+
saddlebrown: [139, 69, 19],
|
|
6565
|
+
salmon: [250, 128, 114],
|
|
6566
|
+
sandybrown: [244, 164, 96],
|
|
6567
|
+
seagreen: [46, 139, 87],
|
|
6568
|
+
seashell: [255, 245, 238],
|
|
6569
|
+
sienna: [160, 82, 45],
|
|
6570
|
+
silver: [192, 192, 192],
|
|
6571
|
+
skyblue: [135, 206, 235],
|
|
6572
|
+
slateblue: [106, 90, 205],
|
|
6573
|
+
slategray: [112, 128, 144],
|
|
6574
|
+
slategrey: [112, 128, 144],
|
|
6575
|
+
snow: [255, 250, 250],
|
|
6576
|
+
springgreen: [0, 255, 127],
|
|
6577
|
+
steelblue: [70, 130, 180],
|
|
6578
|
+
tan: [210, 180, 140],
|
|
6579
|
+
teal: [0, 128, 128],
|
|
6580
|
+
thistle: [216, 191, 216],
|
|
6581
|
+
tomato: [255, 99, 71],
|
|
6582
|
+
turquoise: [64, 224, 208],
|
|
6583
|
+
violet: [238, 130, 238],
|
|
6584
|
+
wheat: [245, 222, 179],
|
|
6585
|
+
white: [255, 255, 255],
|
|
6586
|
+
whitesmoke: [245, 245, 245],
|
|
6587
|
+
yellow: [255, 255, 0],
|
|
6588
|
+
yellowgreen: [154, 205, 50]
|
|
6599
6589
|
};
|
|
6600
|
-
}
|
|
6601
|
-
});
|
|
6602
|
-
|
|
6603
|
-
// ../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js
|
|
6604
|
-
var require_simple_swizzle = __commonJS({
|
|
6605
|
-
"../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js"(exports, module) {
|
|
6606
|
-
"use strict";
|
|
6607
|
-
var isArrayish = require_is_arrayish();
|
|
6608
|
-
var concat = Array.prototype.concat;
|
|
6609
|
-
var slice = Array.prototype.slice;
|
|
6610
|
-
var swizzle = module.exports = function swizzle2(args) {
|
|
6611
|
-
var results = [];
|
|
6612
|
-
for (var i = 0, len = args.length; i < len; i++) {
|
|
6613
|
-
var arg = args[i];
|
|
6614
|
-
if (isArrayish(arg)) {
|
|
6615
|
-
results = concat.call(results, slice.call(arg));
|
|
6616
|
-
} else {
|
|
6617
|
-
results.push(arg);
|
|
6618
|
-
}
|
|
6619
|
-
}
|
|
6620
|
-
return results;
|
|
6621
|
-
};
|
|
6622
|
-
swizzle.wrap = function(fn) {
|
|
6623
|
-
return function() {
|
|
6624
|
-
return fn(swizzle(arguments));
|
|
6625
|
-
};
|
|
6626
|
-
};
|
|
6627
|
-
}
|
|
6628
|
-
});
|
|
6629
|
-
|
|
6630
|
-
// ../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js
|
|
6631
|
-
var require_color_string = __commonJS({
|
|
6632
|
-
"../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(exports, module) {
|
|
6633
|
-
"use strict";
|
|
6634
|
-
var colorNames = require_color_name();
|
|
6635
|
-
var swizzle = require_simple_swizzle();
|
|
6636
|
-
var hasOwnProperty2 = Object.hasOwnProperty;
|
|
6637
6590
|
var reverseNames = /* @__PURE__ */ Object.create(null);
|
|
6638
|
-
for (name in
|
|
6639
|
-
if (
|
|
6640
|
-
reverseNames[
|
|
6591
|
+
for (const name in cssKeywords) {
|
|
6592
|
+
if (Object.hasOwn(cssKeywords, name)) {
|
|
6593
|
+
reverseNames[cssKeywords[name]] = name;
|
|
6641
6594
|
}
|
|
6642
6595
|
}
|
|
6643
|
-
var
|
|
6644
|
-
var cs = module.exports = {
|
|
6596
|
+
var cs = {
|
|
6645
6597
|
to: {},
|
|
6646
6598
|
get: {}
|
|
6647
6599
|
};
|
|
6648
6600
|
cs.get = function(string) {
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6601
|
+
const prefix = string.slice(0, 3).toLowerCase();
|
|
6602
|
+
let value;
|
|
6603
|
+
let model;
|
|
6652
6604
|
switch (prefix) {
|
|
6653
|
-
case "hsl":
|
|
6654
|
-
|
|
6605
|
+
case "hsl": {
|
|
6606
|
+
value = cs.get.hsl(string);
|
|
6655
6607
|
model = "hsl";
|
|
6656
6608
|
break;
|
|
6657
|
-
|
|
6658
|
-
|
|
6609
|
+
}
|
|
6610
|
+
case "hwb": {
|
|
6611
|
+
value = cs.get.hwb(string);
|
|
6659
6612
|
model = "hwb";
|
|
6660
6613
|
break;
|
|
6661
|
-
|
|
6662
|
-
|
|
6614
|
+
}
|
|
6615
|
+
default: {
|
|
6616
|
+
value = cs.get.rgb(string);
|
|
6663
6617
|
model = "rgb";
|
|
6664
6618
|
break;
|
|
6619
|
+
}
|
|
6665
6620
|
}
|
|
6666
|
-
if (!
|
|
6621
|
+
if (!value) {
|
|
6667
6622
|
return null;
|
|
6668
6623
|
}
|
|
6669
|
-
return { model, value
|
|
6624
|
+
return { model, value };
|
|
6670
6625
|
};
|
|
6671
6626
|
cs.get.rgb = function(string) {
|
|
6672
6627
|
if (!string) {
|
|
6673
6628
|
return null;
|
|
6674
6629
|
}
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
if (match = string.match(
|
|
6630
|
+
const abbr = /^#([a-f\d]{3,4})$/i;
|
|
6631
|
+
const hex2 = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
|
|
6632
|
+
const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
|
|
6633
|
+
const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
|
|
6634
|
+
const keyword = /^(\w+)$/;
|
|
6635
|
+
let rgb = [0, 0, 0, 1];
|
|
6636
|
+
let match;
|
|
6637
|
+
let i;
|
|
6638
|
+
let hexAlpha;
|
|
6639
|
+
if (match = string.match(hex2)) {
|
|
6685
6640
|
hexAlpha = match[2];
|
|
6686
6641
|
match = match[1];
|
|
6687
6642
|
for (i = 0; i < 3; i++) {
|
|
6688
|
-
|
|
6689
|
-
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
|
6643
|
+
const i2 = i * 2;
|
|
6644
|
+
rgb[i] = Number.parseInt(match.slice(i2, i2 + 2), 16);
|
|
6690
6645
|
}
|
|
6691
6646
|
if (hexAlpha) {
|
|
6692
|
-
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
|
6647
|
+
rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
|
|
6693
6648
|
}
|
|
6694
6649
|
} else if (match = string.match(abbr)) {
|
|
6695
6650
|
match = match[1];
|
|
6696
6651
|
hexAlpha = match[3];
|
|
6697
6652
|
for (i = 0; i < 3; i++) {
|
|
6698
|
-
rgb[i] = parseInt(match[i] + match[i], 16);
|
|
6653
|
+
rgb[i] = Number.parseInt(match[i] + match[i], 16);
|
|
6699
6654
|
}
|
|
6700
6655
|
if (hexAlpha) {
|
|
6701
|
-
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
6656
|
+
rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
6702
6657
|
}
|
|
6703
6658
|
} else if (match = string.match(rgba)) {
|
|
6704
6659
|
for (i = 0; i < 3; i++) {
|
|
6705
|
-
rgb[i] = parseInt(match[i + 1],
|
|
6660
|
+
rgb[i] = Number.parseInt(match[i + 1], 10);
|
|
6706
6661
|
}
|
|
6707
6662
|
if (match[4]) {
|
|
6708
|
-
|
|
6709
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6710
|
-
} else {
|
|
6711
|
-
rgb[3] = parseFloat(match[4]);
|
|
6712
|
-
}
|
|
6663
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
6713
6664
|
}
|
|
6714
6665
|
} else if (match = string.match(per)) {
|
|
6715
6666
|
for (i = 0; i < 3; i++) {
|
|
6716
|
-
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
|
6667
|
+
rgb[i] = Math.round(Number.parseFloat(match[i + 1]) * 2.55);
|
|
6717
6668
|
}
|
|
6718
6669
|
if (match[4]) {
|
|
6719
|
-
|
|
6720
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6721
|
-
} else {
|
|
6722
|
-
rgb[3] = parseFloat(match[4]);
|
|
6723
|
-
}
|
|
6670
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
6724
6671
|
}
|
|
6725
6672
|
} else if (match = string.match(keyword)) {
|
|
6726
6673
|
if (match[1] === "transparent") {
|
|
6727
6674
|
return [0, 0, 0, 0];
|
|
6728
6675
|
}
|
|
6729
|
-
if (!
|
|
6676
|
+
if (!Object.hasOwn(cssKeywords, match[1])) {
|
|
6730
6677
|
return null;
|
|
6731
6678
|
}
|
|
6732
|
-
rgb =
|
|
6679
|
+
rgb = cssKeywords[match[1]];
|
|
6733
6680
|
rgb[3] = 1;
|
|
6734
6681
|
return rgb;
|
|
6735
6682
|
} else {
|
|
@@ -6745,14 +6692,14 @@ var require_color_string = __commonJS({
|
|
|
6745
6692
|
if (!string) {
|
|
6746
6693
|
return null;
|
|
6747
6694
|
}
|
|
6748
|
-
|
|
6749
|
-
|
|
6695
|
+
const hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6696
|
+
const match = string.match(hsl);
|
|
6750
6697
|
if (match) {
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6698
|
+
const alpha = Number.parseFloat(match[4]);
|
|
6699
|
+
const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
6700
|
+
const s = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
6701
|
+
const l = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
6702
|
+
const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6756
6703
|
return [h, s, l, a];
|
|
6757
6704
|
}
|
|
6758
6705
|
return null;
|
|
@@ -6761,228 +6708,55 @@ var require_color_string = __commonJS({
|
|
|
6761
6708
|
if (!string) {
|
|
6762
6709
|
return null;
|
|
6763
6710
|
}
|
|
6764
|
-
|
|
6765
|
-
|
|
6711
|
+
const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6712
|
+
const match = string.match(hwb);
|
|
6766
6713
|
if (match) {
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6714
|
+
const alpha = Number.parseFloat(match[4]);
|
|
6715
|
+
const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
6716
|
+
const w = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
6717
|
+
const b = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
6718
|
+
const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6772
6719
|
return [h, w, b, a];
|
|
6773
6720
|
}
|
|
6774
6721
|
return null;
|
|
6775
6722
|
};
|
|
6776
|
-
cs.to.hex = function() {
|
|
6777
|
-
var rgba = swizzle(arguments);
|
|
6723
|
+
cs.to.hex = function(...rgba) {
|
|
6778
6724
|
return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
|
|
6779
6725
|
};
|
|
6780
|
-
cs.to.rgb = function() {
|
|
6781
|
-
var rgba = swizzle(arguments);
|
|
6726
|
+
cs.to.rgb = function(...rgba) {
|
|
6782
6727
|
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
|
|
6783
6728
|
};
|
|
6784
|
-
cs.to.rgb.percent = function() {
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
var b = Math.round(rgba[2] / 255 * 100);
|
|
6729
|
+
cs.to.rgb.percent = function(...rgba) {
|
|
6730
|
+
const r = Math.round(rgba[0] / 255 * 100);
|
|
6731
|
+
const g = Math.round(rgba[1] / 255 * 100);
|
|
6732
|
+
const b = Math.round(rgba[2] / 255 * 100);
|
|
6789
6733
|
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")";
|
|
6790
6734
|
};
|
|
6791
|
-
cs.to.hsl = function() {
|
|
6792
|
-
var hsla = swizzle(arguments);
|
|
6735
|
+
cs.to.hsl = function(...hsla) {
|
|
6793
6736
|
return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
|
|
6794
6737
|
};
|
|
6795
|
-
cs.to.hwb = function() {
|
|
6796
|
-
|
|
6797
|
-
var a = "";
|
|
6738
|
+
cs.to.hwb = function(...hwba) {
|
|
6739
|
+
let a = "";
|
|
6798
6740
|
if (hwba.length >= 4 && hwba[3] !== 1) {
|
|
6799
6741
|
a = ", " + hwba[3];
|
|
6800
6742
|
}
|
|
6801
6743
|
return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")";
|
|
6802
6744
|
};
|
|
6803
|
-
cs.to.keyword = function(rgb) {
|
|
6745
|
+
cs.to.keyword = function(...rgb) {
|
|
6804
6746
|
return reverseNames[rgb.slice(0, 3)];
|
|
6805
6747
|
};
|
|
6806
|
-
function clamp(
|
|
6807
|
-
return Math.min(Math.max(min,
|
|
6748
|
+
function clamp(number_, min, max) {
|
|
6749
|
+
return Math.min(Math.max(min, number_), max);
|
|
6808
6750
|
}
|
|
6809
|
-
function hexDouble(
|
|
6810
|
-
|
|
6811
|
-
return
|
|
6751
|
+
function hexDouble(number_) {
|
|
6752
|
+
const string_ = Math.round(number_).toString(16).toUpperCase();
|
|
6753
|
+
return string_.length < 2 ? "0" + string_ : string_;
|
|
6812
6754
|
}
|
|
6813
|
-
}
|
|
6814
|
-
});
|
|
6815
|
-
|
|
6816
|
-
// ../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js
|
|
6817
|
-
var require_color_name2 = __commonJS({
|
|
6818
|
-
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports, module) {
|
|
6819
|
-
"use strict";
|
|
6820
|
-
module.exports = {
|
|
6821
|
-
"aliceblue": [240, 248, 255],
|
|
6822
|
-
"antiquewhite": [250, 235, 215],
|
|
6823
|
-
"aqua": [0, 255, 255],
|
|
6824
|
-
"aquamarine": [127, 255, 212],
|
|
6825
|
-
"azure": [240, 255, 255],
|
|
6826
|
-
"beige": [245, 245, 220],
|
|
6827
|
-
"bisque": [255, 228, 196],
|
|
6828
|
-
"black": [0, 0, 0],
|
|
6829
|
-
"blanchedalmond": [255, 235, 205],
|
|
6830
|
-
"blue": [0, 0, 255],
|
|
6831
|
-
"blueviolet": [138, 43, 226],
|
|
6832
|
-
"brown": [165, 42, 42],
|
|
6833
|
-
"burlywood": [222, 184, 135],
|
|
6834
|
-
"cadetblue": [95, 158, 160],
|
|
6835
|
-
"chartreuse": [127, 255, 0],
|
|
6836
|
-
"chocolate": [210, 105, 30],
|
|
6837
|
-
"coral": [255, 127, 80],
|
|
6838
|
-
"cornflowerblue": [100, 149, 237],
|
|
6839
|
-
"cornsilk": [255, 248, 220],
|
|
6840
|
-
"crimson": [220, 20, 60],
|
|
6841
|
-
"cyan": [0, 255, 255],
|
|
6842
|
-
"darkblue": [0, 0, 139],
|
|
6843
|
-
"darkcyan": [0, 139, 139],
|
|
6844
|
-
"darkgoldenrod": [184, 134, 11],
|
|
6845
|
-
"darkgray": [169, 169, 169],
|
|
6846
|
-
"darkgreen": [0, 100, 0],
|
|
6847
|
-
"darkgrey": [169, 169, 169],
|
|
6848
|
-
"darkkhaki": [189, 183, 107],
|
|
6849
|
-
"darkmagenta": [139, 0, 139],
|
|
6850
|
-
"darkolivegreen": [85, 107, 47],
|
|
6851
|
-
"darkorange": [255, 140, 0],
|
|
6852
|
-
"darkorchid": [153, 50, 204],
|
|
6853
|
-
"darkred": [139, 0, 0],
|
|
6854
|
-
"darksalmon": [233, 150, 122],
|
|
6855
|
-
"darkseagreen": [143, 188, 143],
|
|
6856
|
-
"darkslateblue": [72, 61, 139],
|
|
6857
|
-
"darkslategray": [47, 79, 79],
|
|
6858
|
-
"darkslategrey": [47, 79, 79],
|
|
6859
|
-
"darkturquoise": [0, 206, 209],
|
|
6860
|
-
"darkviolet": [148, 0, 211],
|
|
6861
|
-
"deeppink": [255, 20, 147],
|
|
6862
|
-
"deepskyblue": [0, 191, 255],
|
|
6863
|
-
"dimgray": [105, 105, 105],
|
|
6864
|
-
"dimgrey": [105, 105, 105],
|
|
6865
|
-
"dodgerblue": [30, 144, 255],
|
|
6866
|
-
"firebrick": [178, 34, 34],
|
|
6867
|
-
"floralwhite": [255, 250, 240],
|
|
6868
|
-
"forestgreen": [34, 139, 34],
|
|
6869
|
-
"fuchsia": [255, 0, 255],
|
|
6870
|
-
"gainsboro": [220, 220, 220],
|
|
6871
|
-
"ghostwhite": [248, 248, 255],
|
|
6872
|
-
"gold": [255, 215, 0],
|
|
6873
|
-
"goldenrod": [218, 165, 32],
|
|
6874
|
-
"gray": [128, 128, 128],
|
|
6875
|
-
"green": [0, 128, 0],
|
|
6876
|
-
"greenyellow": [173, 255, 47],
|
|
6877
|
-
"grey": [128, 128, 128],
|
|
6878
|
-
"honeydew": [240, 255, 240],
|
|
6879
|
-
"hotpink": [255, 105, 180],
|
|
6880
|
-
"indianred": [205, 92, 92],
|
|
6881
|
-
"indigo": [75, 0, 130],
|
|
6882
|
-
"ivory": [255, 255, 240],
|
|
6883
|
-
"khaki": [240, 230, 140],
|
|
6884
|
-
"lavender": [230, 230, 250],
|
|
6885
|
-
"lavenderblush": [255, 240, 245],
|
|
6886
|
-
"lawngreen": [124, 252, 0],
|
|
6887
|
-
"lemonchiffon": [255, 250, 205],
|
|
6888
|
-
"lightblue": [173, 216, 230],
|
|
6889
|
-
"lightcoral": [240, 128, 128],
|
|
6890
|
-
"lightcyan": [224, 255, 255],
|
|
6891
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
6892
|
-
"lightgray": [211, 211, 211],
|
|
6893
|
-
"lightgreen": [144, 238, 144],
|
|
6894
|
-
"lightgrey": [211, 211, 211],
|
|
6895
|
-
"lightpink": [255, 182, 193],
|
|
6896
|
-
"lightsalmon": [255, 160, 122],
|
|
6897
|
-
"lightseagreen": [32, 178, 170],
|
|
6898
|
-
"lightskyblue": [135, 206, 250],
|
|
6899
|
-
"lightslategray": [119, 136, 153],
|
|
6900
|
-
"lightslategrey": [119, 136, 153],
|
|
6901
|
-
"lightsteelblue": [176, 196, 222],
|
|
6902
|
-
"lightyellow": [255, 255, 224],
|
|
6903
|
-
"lime": [0, 255, 0],
|
|
6904
|
-
"limegreen": [50, 205, 50],
|
|
6905
|
-
"linen": [250, 240, 230],
|
|
6906
|
-
"magenta": [255, 0, 255],
|
|
6907
|
-
"maroon": [128, 0, 0],
|
|
6908
|
-
"mediumaquamarine": [102, 205, 170],
|
|
6909
|
-
"mediumblue": [0, 0, 205],
|
|
6910
|
-
"mediumorchid": [186, 85, 211],
|
|
6911
|
-
"mediumpurple": [147, 112, 219],
|
|
6912
|
-
"mediumseagreen": [60, 179, 113],
|
|
6913
|
-
"mediumslateblue": [123, 104, 238],
|
|
6914
|
-
"mediumspringgreen": [0, 250, 154],
|
|
6915
|
-
"mediumturquoise": [72, 209, 204],
|
|
6916
|
-
"mediumvioletred": [199, 21, 133],
|
|
6917
|
-
"midnightblue": [25, 25, 112],
|
|
6918
|
-
"mintcream": [245, 255, 250],
|
|
6919
|
-
"mistyrose": [255, 228, 225],
|
|
6920
|
-
"moccasin": [255, 228, 181],
|
|
6921
|
-
"navajowhite": [255, 222, 173],
|
|
6922
|
-
"navy": [0, 0, 128],
|
|
6923
|
-
"oldlace": [253, 245, 230],
|
|
6924
|
-
"olive": [128, 128, 0],
|
|
6925
|
-
"olivedrab": [107, 142, 35],
|
|
6926
|
-
"orange": [255, 165, 0],
|
|
6927
|
-
"orangered": [255, 69, 0],
|
|
6928
|
-
"orchid": [218, 112, 214],
|
|
6929
|
-
"palegoldenrod": [238, 232, 170],
|
|
6930
|
-
"palegreen": [152, 251, 152],
|
|
6931
|
-
"paleturquoise": [175, 238, 238],
|
|
6932
|
-
"palevioletred": [219, 112, 147],
|
|
6933
|
-
"papayawhip": [255, 239, 213],
|
|
6934
|
-
"peachpuff": [255, 218, 185],
|
|
6935
|
-
"peru": [205, 133, 63],
|
|
6936
|
-
"pink": [255, 192, 203],
|
|
6937
|
-
"plum": [221, 160, 221],
|
|
6938
|
-
"powderblue": [176, 224, 230],
|
|
6939
|
-
"purple": [128, 0, 128],
|
|
6940
|
-
"rebeccapurple": [102, 51, 153],
|
|
6941
|
-
"red": [255, 0, 0],
|
|
6942
|
-
"rosybrown": [188, 143, 143],
|
|
6943
|
-
"royalblue": [65, 105, 225],
|
|
6944
|
-
"saddlebrown": [139, 69, 19],
|
|
6945
|
-
"salmon": [250, 128, 114],
|
|
6946
|
-
"sandybrown": [244, 164, 96],
|
|
6947
|
-
"seagreen": [46, 139, 87],
|
|
6948
|
-
"seashell": [255, 245, 238],
|
|
6949
|
-
"sienna": [160, 82, 45],
|
|
6950
|
-
"silver": [192, 192, 192],
|
|
6951
|
-
"skyblue": [135, 206, 235],
|
|
6952
|
-
"slateblue": [106, 90, 205],
|
|
6953
|
-
"slategray": [112, 128, 144],
|
|
6954
|
-
"slategrey": [112, 128, 144],
|
|
6955
|
-
"snow": [255, 250, 250],
|
|
6956
|
-
"springgreen": [0, 255, 127],
|
|
6957
|
-
"steelblue": [70, 130, 180],
|
|
6958
|
-
"tan": [210, 180, 140],
|
|
6959
|
-
"teal": [0, 128, 128],
|
|
6960
|
-
"thistle": [216, 191, 216],
|
|
6961
|
-
"tomato": [255, 99, 71],
|
|
6962
|
-
"turquoise": [64, 224, 208],
|
|
6963
|
-
"violet": [238, 130, 238],
|
|
6964
|
-
"wheat": [245, 222, 179],
|
|
6965
|
-
"white": [255, 255, 255],
|
|
6966
|
-
"whitesmoke": [245, 245, 245],
|
|
6967
|
-
"yellow": [255, 255, 0],
|
|
6968
|
-
"yellowgreen": [154, 205, 50]
|
|
6969
|
-
};
|
|
6970
|
-
}
|
|
6971
|
-
});
|
|
6972
|
-
|
|
6973
|
-
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js
|
|
6974
|
-
var require_conversions = __commonJS({
|
|
6975
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports, module) {
|
|
6976
|
-
"use strict";
|
|
6977
|
-
var cssKeywords = require_color_name2();
|
|
6978
6755
|
var reverseKeywords = {};
|
|
6979
|
-
for (key
|
|
6980
|
-
|
|
6981
|
-
reverseKeywords[cssKeywords[key]] = key;
|
|
6982
|
-
}
|
|
6756
|
+
for (const key of Object.keys(cssKeywords)) {
|
|
6757
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
6983
6758
|
}
|
|
6984
|
-
var
|
|
6985
|
-
var convert = module.exports = {
|
|
6759
|
+
var convert$1 = {
|
|
6986
6760
|
rgb: { channels: 3, labels: "rgb" },
|
|
6987
6761
|
hsl: { channels: 3, labels: "hsl" },
|
|
6988
6762
|
hsv: { channels: 3, labels: "hsv" },
|
|
@@ -6990,7 +6764,9 @@ var require_conversions = __commonJS({
|
|
|
6990
6764
|
cmyk: { channels: 4, labels: "cmyk" },
|
|
6991
6765
|
xyz: { channels: 3, labels: "xyz" },
|
|
6992
6766
|
lab: { channels: 3, labels: "lab" },
|
|
6767
|
+
oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
|
|
6993
6768
|
lch: { channels: 3, labels: "lch" },
|
|
6769
|
+
oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
|
|
6994
6770
|
hex: { channels: 1, labels: ["hex"] },
|
|
6995
6771
|
keyword: { channels: 1, labels: ["keyword"] },
|
|
6996
6772
|
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
@@ -6999,52 +6775,62 @@ var require_conversions = __commonJS({
|
|
|
6999
6775
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
7000
6776
|
gray: { channels: 1, labels: ["gray"] }
|
|
7001
6777
|
};
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
}
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
6778
|
+
var LAB_FT = (6 / 29) ** 3;
|
|
6779
|
+
function srgbNonlinearTransform(c) {
|
|
6780
|
+
const cc = c > 31308e-7 ? 1.055 * c ** (1 / 2.4) - 0.055 : c * 12.92;
|
|
6781
|
+
return Math.min(Math.max(0, cc), 1);
|
|
6782
|
+
}
|
|
6783
|
+
function srgbNonlinearTransformInv(c) {
|
|
6784
|
+
return c > 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92;
|
|
6785
|
+
}
|
|
6786
|
+
for (const model of Object.keys(convert$1)) {
|
|
6787
|
+
if (!("channels" in convert$1[model])) {
|
|
6788
|
+
throw new Error("missing channels property: " + model);
|
|
6789
|
+
}
|
|
6790
|
+
if (!("labels" in convert$1[model])) {
|
|
6791
|
+
throw new Error("missing channel labels property: " + model);
|
|
6792
|
+
}
|
|
6793
|
+
if (convert$1[model].labels.length !== convert$1[model].channels) {
|
|
6794
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
6795
|
+
}
|
|
6796
|
+
const { channels, labels } = convert$1[model];
|
|
6797
|
+
delete convert$1[model].channels;
|
|
6798
|
+
delete convert$1[model].labels;
|
|
6799
|
+
Object.defineProperty(convert$1[model], "channels", { value: channels });
|
|
6800
|
+
Object.defineProperty(convert$1[model], "labels", { value: labels });
|
|
6801
|
+
}
|
|
6802
|
+
convert$1.rgb.hsl = function(rgb) {
|
|
6803
|
+
const r = rgb[0] / 255;
|
|
6804
|
+
const g = rgb[1] / 255;
|
|
6805
|
+
const b = rgb[2] / 255;
|
|
6806
|
+
const min = Math.min(r, g, b);
|
|
6807
|
+
const max = Math.max(r, g, b);
|
|
6808
|
+
const delta = max - min;
|
|
6809
|
+
let h;
|
|
6810
|
+
let s;
|
|
6811
|
+
switch (max) {
|
|
6812
|
+
case min: {
|
|
6813
|
+
h = 0;
|
|
6814
|
+
break;
|
|
6815
|
+
}
|
|
6816
|
+
case r: {
|
|
6817
|
+
h = (g - b) / delta;
|
|
6818
|
+
break;
|
|
6819
|
+
}
|
|
6820
|
+
case g: {
|
|
6821
|
+
h = 2 + (b - r) / delta;
|
|
6822
|
+
break;
|
|
6823
|
+
}
|
|
6824
|
+
case b: {
|
|
6825
|
+
h = 4 + (r - g) / delta;
|
|
6826
|
+
break;
|
|
6827
|
+
}
|
|
7042
6828
|
}
|
|
7043
6829
|
h = Math.min(h * 60, 360);
|
|
7044
6830
|
if (h < 0) {
|
|
7045
6831
|
h += 360;
|
|
7046
6832
|
}
|
|
7047
|
-
l = (min + max) / 2;
|
|
6833
|
+
const l = (min + max) / 2;
|
|
7048
6834
|
if (max === min) {
|
|
7049
6835
|
s = 0;
|
|
7050
6836
|
} else if (l <= 0.5) {
|
|
@@ -7054,33 +6840,41 @@ var require_conversions = __commonJS({
|
|
|
7054
6840
|
}
|
|
7055
6841
|
return [h, s * 100, l * 100];
|
|
7056
6842
|
};
|
|
7057
|
-
convert.rgb.hsv = function(rgb) {
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
6843
|
+
convert$1.rgb.hsv = function(rgb) {
|
|
6844
|
+
let rdif;
|
|
6845
|
+
let gdif;
|
|
6846
|
+
let bdif;
|
|
6847
|
+
let h;
|
|
6848
|
+
let s;
|
|
6849
|
+
const r = rgb[0] / 255;
|
|
6850
|
+
const g = rgb[1] / 255;
|
|
6851
|
+
const b = rgb[2] / 255;
|
|
6852
|
+
const v = Math.max(r, g, b);
|
|
6853
|
+
const diff = v - Math.min(r, g, b);
|
|
6854
|
+
const diffc = function(c) {
|
|
7069
6855
|
return (v - c) / 6 / diff + 1 / 2;
|
|
7070
6856
|
};
|
|
7071
6857
|
if (diff === 0) {
|
|
7072
|
-
h =
|
|
6858
|
+
h = 0;
|
|
6859
|
+
s = 0;
|
|
7073
6860
|
} else {
|
|
7074
6861
|
s = diff / v;
|
|
7075
6862
|
rdif = diffc(r);
|
|
7076
6863
|
gdif = diffc(g);
|
|
7077
6864
|
bdif = diffc(b);
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
6865
|
+
switch (v) {
|
|
6866
|
+
case r: {
|
|
6867
|
+
h = bdif - gdif;
|
|
6868
|
+
break;
|
|
6869
|
+
}
|
|
6870
|
+
case g: {
|
|
6871
|
+
h = 1 / 3 + rdif - bdif;
|
|
6872
|
+
break;
|
|
6873
|
+
}
|
|
6874
|
+
case b: {
|
|
6875
|
+
h = 2 / 3 + gdif - rdif;
|
|
6876
|
+
break;
|
|
6877
|
+
}
|
|
7084
6878
|
}
|
|
7085
6879
|
if (h < 0) {
|
|
7086
6880
|
h += 1;
|
|
@@ -7094,106 +6888,99 @@ var require_conversions = __commonJS({
|
|
|
7094
6888
|
v * 100
|
|
7095
6889
|
];
|
|
7096
6890
|
};
|
|
7097
|
-
convert.rgb.hwb = function(rgb) {
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
6891
|
+
convert$1.rgb.hwb = function(rgb) {
|
|
6892
|
+
const r = rgb[0];
|
|
6893
|
+
const g = rgb[1];
|
|
6894
|
+
let b = rgb[2];
|
|
6895
|
+
const h = convert$1.rgb.hsl(rgb)[0];
|
|
6896
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
7103
6897
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
7104
6898
|
return [h, w * 100, b * 100];
|
|
7105
6899
|
};
|
|
7106
|
-
convert.rgb.
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
6900
|
+
convert$1.rgb.oklab = function(rgb) {
|
|
6901
|
+
const r = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
6902
|
+
const g = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
6903
|
+
const b = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
6904
|
+
const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
|
|
6905
|
+
const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
|
|
6906
|
+
const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
6907
|
+
const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
6908
|
+
const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
6909
|
+
const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
6910
|
+
return [l * 100, aa * 100, bb * 100];
|
|
6911
|
+
};
|
|
6912
|
+
convert$1.rgb.cmyk = function(rgb) {
|
|
6913
|
+
const r = rgb[0] / 255;
|
|
6914
|
+
const g = rgb[1] / 255;
|
|
6915
|
+
const b = rgb[2] / 255;
|
|
6916
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
6917
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
6918
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
6919
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
7118
6920
|
return [c * 100, m * 100, y * 100, k * 100];
|
|
7119
6921
|
};
|
|
7120
6922
|
function comparativeDistance(x, y) {
|
|
7121
|
-
return
|
|
6923
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
7122
6924
|
}
|
|
7123
|
-
convert.rgb.keyword = function(rgb) {
|
|
7124
|
-
|
|
6925
|
+
convert$1.rgb.keyword = function(rgb) {
|
|
6926
|
+
const reversed = reverseKeywords[rgb];
|
|
7125
6927
|
if (reversed) {
|
|
7126
6928
|
return reversed;
|
|
7127
6929
|
}
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
for (
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
currentClosestKeyword = keyword;
|
|
7137
|
-
}
|
|
6930
|
+
let currentClosestDistance = Number.POSITIVE_INFINITY;
|
|
6931
|
+
let currentClosestKeyword;
|
|
6932
|
+
for (const keyword of Object.keys(cssKeywords)) {
|
|
6933
|
+
const value = cssKeywords[keyword];
|
|
6934
|
+
const distance = comparativeDistance(rgb, value);
|
|
6935
|
+
if (distance < currentClosestDistance) {
|
|
6936
|
+
currentClosestDistance = distance;
|
|
6937
|
+
currentClosestKeyword = keyword;
|
|
7138
6938
|
}
|
|
7139
6939
|
}
|
|
7140
6940
|
return currentClosestKeyword;
|
|
7141
6941
|
};
|
|
7142
|
-
convert.keyword.rgb = function(keyword) {
|
|
6942
|
+
convert$1.keyword.rgb = function(keyword) {
|
|
7143
6943
|
return cssKeywords[keyword];
|
|
7144
6944
|
};
|
|
7145
|
-
convert.rgb.xyz = function(rgb) {
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
7153
|
-
var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
7154
|
-
var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
6945
|
+
convert$1.rgb.xyz = function(rgb) {
|
|
6946
|
+
const r = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
6947
|
+
const g = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
6948
|
+
const b = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
6949
|
+
const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;
|
|
6950
|
+
const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;
|
|
6951
|
+
const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;
|
|
7155
6952
|
return [x * 100, y * 100, z * 100];
|
|
7156
6953
|
};
|
|
7157
|
-
convert.rgb.lab = function(rgb) {
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
var l;
|
|
7163
|
-
var a;
|
|
7164
|
-
var b;
|
|
6954
|
+
convert$1.rgb.lab = function(rgb) {
|
|
6955
|
+
const xyz = convert$1.rgb.xyz(rgb);
|
|
6956
|
+
let x = xyz[0];
|
|
6957
|
+
let y = xyz[1];
|
|
6958
|
+
let z = xyz[2];
|
|
7165
6959
|
x /= 95.047;
|
|
7166
6960
|
y /= 100;
|
|
7167
6961
|
z /= 108.883;
|
|
7168
|
-
x = x >
|
|
7169
|
-
y = y >
|
|
7170
|
-
z = z >
|
|
7171
|
-
l = 116 * y - 16;
|
|
7172
|
-
a = 500 * (x - y);
|
|
7173
|
-
b = 200 * (y - z);
|
|
6962
|
+
x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
6963
|
+
y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
6964
|
+
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
6965
|
+
const l = 116 * y - 16;
|
|
6966
|
+
const a = 500 * (x - y);
|
|
6967
|
+
const b = 200 * (y - z);
|
|
7174
6968
|
return [l, a, b];
|
|
7175
6969
|
};
|
|
7176
|
-
convert.hsl.rgb = function(hsl) {
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
var t3;
|
|
7183
|
-
var rgb;
|
|
7184
|
-
var val;
|
|
6970
|
+
convert$1.hsl.rgb = function(hsl) {
|
|
6971
|
+
const h = hsl[0] / 360;
|
|
6972
|
+
const s = hsl[1] / 100;
|
|
6973
|
+
const l = hsl[2] / 100;
|
|
6974
|
+
let t3;
|
|
6975
|
+
let value;
|
|
7185
6976
|
if (s === 0) {
|
|
7186
|
-
|
|
7187
|
-
return [
|
|
7188
|
-
}
|
|
7189
|
-
if (l < 0.5) {
|
|
7190
|
-
t2 = l * (1 + s);
|
|
7191
|
-
} else {
|
|
7192
|
-
t2 = l + s - l * s;
|
|
6977
|
+
value = l * 255;
|
|
6978
|
+
return [value, value, value];
|
|
7193
6979
|
}
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
6980
|
+
const t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
6981
|
+
const t1 = 2 * l - t2;
|
|
6982
|
+
const rgb = [0, 0, 0];
|
|
6983
|
+
for (let i = 0; i < 3; i++) {
|
|
7197
6984
|
t3 = h + 1 / 3 * -(i - 1);
|
|
7198
6985
|
if (t3 < 0) {
|
|
7199
6986
|
t3++;
|
|
@@ -7202,253 +6989,285 @@ var require_conversions = __commonJS({
|
|
|
7202
6989
|
t3--;
|
|
7203
6990
|
}
|
|
7204
6991
|
if (6 * t3 < 1) {
|
|
7205
|
-
|
|
6992
|
+
value = t1 + (t2 - t1) * 6 * t3;
|
|
7206
6993
|
} else if (2 * t3 < 1) {
|
|
7207
|
-
|
|
6994
|
+
value = t2;
|
|
7208
6995
|
} else if (3 * t3 < 2) {
|
|
7209
|
-
|
|
6996
|
+
value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
7210
6997
|
} else {
|
|
7211
|
-
|
|
6998
|
+
value = t1;
|
|
7212
6999
|
}
|
|
7213
|
-
rgb[i] =
|
|
7000
|
+
rgb[i] = value * 255;
|
|
7214
7001
|
}
|
|
7215
7002
|
return rgb;
|
|
7216
7003
|
};
|
|
7217
|
-
convert.hsl.hsv = function(hsl) {
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
var sv;
|
|
7224
|
-
var v;
|
|
7004
|
+
convert$1.hsl.hsv = function(hsl) {
|
|
7005
|
+
const h = hsl[0];
|
|
7006
|
+
let s = hsl[1] / 100;
|
|
7007
|
+
let l = hsl[2] / 100;
|
|
7008
|
+
let smin = s;
|
|
7009
|
+
const lmin = Math.max(l, 0.01);
|
|
7225
7010
|
l *= 2;
|
|
7226
7011
|
s *= l <= 1 ? l : 2 - l;
|
|
7227
7012
|
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
7228
|
-
v = (l + s) / 2;
|
|
7229
|
-
sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
7013
|
+
const v = (l + s) / 2;
|
|
7014
|
+
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
7230
7015
|
return [h, sv * 100, v * 100];
|
|
7231
7016
|
};
|
|
7232
|
-
convert.hsv.rgb = function(hsv) {
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7017
|
+
convert$1.hsv.rgb = function(hsv) {
|
|
7018
|
+
const h = hsv[0] / 60;
|
|
7019
|
+
const s = hsv[1] / 100;
|
|
7020
|
+
let v = hsv[2] / 100;
|
|
7021
|
+
const hi = Math.floor(h) % 6;
|
|
7022
|
+
const f = h - Math.floor(h);
|
|
7023
|
+
const p = 255 * v * (1 - s);
|
|
7024
|
+
const q = 255 * v * (1 - s * f);
|
|
7025
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
7241
7026
|
v *= 255;
|
|
7242
7027
|
switch (hi) {
|
|
7243
|
-
case 0:
|
|
7028
|
+
case 0: {
|
|
7244
7029
|
return [v, t, p];
|
|
7245
|
-
|
|
7030
|
+
}
|
|
7031
|
+
case 1: {
|
|
7246
7032
|
return [q, v, p];
|
|
7247
|
-
|
|
7033
|
+
}
|
|
7034
|
+
case 2: {
|
|
7248
7035
|
return [p, v, t];
|
|
7249
|
-
|
|
7036
|
+
}
|
|
7037
|
+
case 3: {
|
|
7250
7038
|
return [p, q, v];
|
|
7251
|
-
|
|
7039
|
+
}
|
|
7040
|
+
case 4: {
|
|
7252
7041
|
return [t, p, v];
|
|
7253
|
-
|
|
7042
|
+
}
|
|
7043
|
+
case 5: {
|
|
7254
7044
|
return [v, p, q];
|
|
7045
|
+
}
|
|
7255
7046
|
}
|
|
7256
7047
|
};
|
|
7257
|
-
convert.hsv.hsl = function(hsv) {
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
var l;
|
|
7048
|
+
convert$1.hsv.hsl = function(hsv) {
|
|
7049
|
+
const h = hsv[0];
|
|
7050
|
+
const s = hsv[1] / 100;
|
|
7051
|
+
const v = hsv[2] / 100;
|
|
7052
|
+
const vmin = Math.max(v, 0.01);
|
|
7053
|
+
let sl;
|
|
7054
|
+
let l;
|
|
7265
7055
|
l = (2 - s) * v;
|
|
7266
|
-
lmin = (2 - s) * vmin;
|
|
7056
|
+
const lmin = (2 - s) * vmin;
|
|
7267
7057
|
sl = s * vmin;
|
|
7268
7058
|
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
7269
7059
|
sl = sl || 0;
|
|
7270
7060
|
l /= 2;
|
|
7271
7061
|
return [h, sl * 100, l * 100];
|
|
7272
7062
|
};
|
|
7273
|
-
convert.hwb.rgb = function(hwb) {
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
var v;
|
|
7280
|
-
var f;
|
|
7281
|
-
var n;
|
|
7063
|
+
convert$1.hwb.rgb = function(hwb) {
|
|
7064
|
+
const h = hwb[0] / 360;
|
|
7065
|
+
let wh = hwb[1] / 100;
|
|
7066
|
+
let bl = hwb[2] / 100;
|
|
7067
|
+
const ratio = wh + bl;
|
|
7068
|
+
let f;
|
|
7282
7069
|
if (ratio > 1) {
|
|
7283
7070
|
wh /= ratio;
|
|
7284
7071
|
bl /= ratio;
|
|
7285
7072
|
}
|
|
7286
|
-
i = Math.floor(6 * h);
|
|
7287
|
-
v = 1 - bl;
|
|
7073
|
+
const i = Math.floor(6 * h);
|
|
7074
|
+
const v = 1 - bl;
|
|
7288
7075
|
f = 6 * h - i;
|
|
7289
7076
|
if ((i & 1) !== 0) {
|
|
7290
7077
|
f = 1 - f;
|
|
7291
7078
|
}
|
|
7292
|
-
n = wh + f * (v - wh);
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7079
|
+
const n = wh + f * (v - wh);
|
|
7080
|
+
let r;
|
|
7081
|
+
let g;
|
|
7082
|
+
let b;
|
|
7296
7083
|
switch (i) {
|
|
7297
7084
|
default:
|
|
7298
7085
|
case 6:
|
|
7299
|
-
case 0:
|
|
7086
|
+
case 0: {
|
|
7300
7087
|
r = v;
|
|
7301
7088
|
g = n;
|
|
7302
7089
|
b = wh;
|
|
7303
7090
|
break;
|
|
7304
|
-
|
|
7091
|
+
}
|
|
7092
|
+
case 1: {
|
|
7305
7093
|
r = n;
|
|
7306
7094
|
g = v;
|
|
7307
7095
|
b = wh;
|
|
7308
7096
|
break;
|
|
7309
|
-
|
|
7097
|
+
}
|
|
7098
|
+
case 2: {
|
|
7310
7099
|
r = wh;
|
|
7311
7100
|
g = v;
|
|
7312
7101
|
b = n;
|
|
7313
7102
|
break;
|
|
7314
|
-
|
|
7103
|
+
}
|
|
7104
|
+
case 3: {
|
|
7315
7105
|
r = wh;
|
|
7316
7106
|
g = n;
|
|
7317
7107
|
b = v;
|
|
7318
7108
|
break;
|
|
7319
|
-
|
|
7109
|
+
}
|
|
7110
|
+
case 4: {
|
|
7320
7111
|
r = n;
|
|
7321
7112
|
g = wh;
|
|
7322
7113
|
b = v;
|
|
7323
7114
|
break;
|
|
7324
|
-
|
|
7115
|
+
}
|
|
7116
|
+
case 5: {
|
|
7325
7117
|
r = v;
|
|
7326
7118
|
g = wh;
|
|
7327
7119
|
b = n;
|
|
7328
7120
|
break;
|
|
7121
|
+
}
|
|
7329
7122
|
}
|
|
7330
7123
|
return [r * 255, g * 255, b * 255];
|
|
7331
7124
|
};
|
|
7332
|
-
convert.cmyk.rgb = function(cmyk) {
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
r = 1 - Math.min(1, c * (1 - k) + k);
|
|
7341
|
-
g = 1 - Math.min(1, m * (1 - k) + k);
|
|
7342
|
-
b = 1 - Math.min(1, y * (1 - k) + k);
|
|
7125
|
+
convert$1.cmyk.rgb = function(cmyk) {
|
|
7126
|
+
const c = cmyk[0] / 100;
|
|
7127
|
+
const m = cmyk[1] / 100;
|
|
7128
|
+
const y = cmyk[2] / 100;
|
|
7129
|
+
const k = cmyk[3] / 100;
|
|
7130
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
7131
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
7132
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
7343
7133
|
return [r * 255, g * 255, b * 255];
|
|
7344
7134
|
};
|
|
7345
|
-
convert.xyz.rgb = function(xyz) {
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
r = x * 3.
|
|
7353
|
-
g = x * -0.
|
|
7354
|
-
b = x * 0.
|
|
7355
|
-
r =
|
|
7356
|
-
g =
|
|
7357
|
-
b =
|
|
7358
|
-
r = Math.min(Math.max(0, r), 1);
|
|
7359
|
-
g = Math.min(Math.max(0, g), 1);
|
|
7360
|
-
b = Math.min(Math.max(0, b), 1);
|
|
7135
|
+
convert$1.xyz.rgb = function(xyz) {
|
|
7136
|
+
const x = xyz[0] / 100;
|
|
7137
|
+
const y = xyz[1] / 100;
|
|
7138
|
+
const z = xyz[2] / 100;
|
|
7139
|
+
let r;
|
|
7140
|
+
let g;
|
|
7141
|
+
let b;
|
|
7142
|
+
r = x * 3.2404542 + y * -1.5371385 + z * -0.4985314;
|
|
7143
|
+
g = x * -0.969266 + y * 1.8760108 + z * 0.041556;
|
|
7144
|
+
b = x * 0.0556434 + y * -0.2040259 + z * 1.0572252;
|
|
7145
|
+
r = srgbNonlinearTransform(r);
|
|
7146
|
+
g = srgbNonlinearTransform(g);
|
|
7147
|
+
b = srgbNonlinearTransform(b);
|
|
7361
7148
|
return [r * 255, g * 255, b * 255];
|
|
7362
7149
|
};
|
|
7363
|
-
convert.xyz.lab = function(xyz) {
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
var l;
|
|
7368
|
-
var a;
|
|
7369
|
-
var b;
|
|
7150
|
+
convert$1.xyz.lab = function(xyz) {
|
|
7151
|
+
let x = xyz[0];
|
|
7152
|
+
let y = xyz[1];
|
|
7153
|
+
let z = xyz[2];
|
|
7370
7154
|
x /= 95.047;
|
|
7371
7155
|
y /= 100;
|
|
7372
7156
|
z /= 108.883;
|
|
7373
|
-
x = x >
|
|
7374
|
-
y = y >
|
|
7375
|
-
z = z >
|
|
7376
|
-
l = 116 * y - 16;
|
|
7377
|
-
a = 500 * (x - y);
|
|
7378
|
-
b = 200 * (y - z);
|
|
7157
|
+
x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
7158
|
+
y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
7159
|
+
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
7160
|
+
const l = 116 * y - 16;
|
|
7161
|
+
const a = 500 * (x - y);
|
|
7162
|
+
const b = 200 * (y - z);
|
|
7379
7163
|
return [l, a, b];
|
|
7380
7164
|
};
|
|
7381
|
-
convert.
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7165
|
+
convert$1.xyz.oklab = function(xyz) {
|
|
7166
|
+
const x = xyz[0] / 100;
|
|
7167
|
+
const y = xyz[1] / 100;
|
|
7168
|
+
const z = xyz[2] / 100;
|
|
7169
|
+
const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z);
|
|
7170
|
+
const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z);
|
|
7171
|
+
const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z);
|
|
7172
|
+
const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
7173
|
+
const a = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
7174
|
+
const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
7175
|
+
return [l * 100, a * 100, b * 100];
|
|
7176
|
+
};
|
|
7177
|
+
convert$1.oklab.oklch = function(oklab) {
|
|
7178
|
+
return convert$1.lab.lch(oklab);
|
|
7179
|
+
};
|
|
7180
|
+
convert$1.oklab.xyz = function(oklab) {
|
|
7181
|
+
const ll = oklab[0] / 100;
|
|
7182
|
+
const a = oklab[1] / 100;
|
|
7183
|
+
const b = oklab[2] / 100;
|
|
7184
|
+
const l = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b) ** 3;
|
|
7185
|
+
const m = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b) ** 3;
|
|
7186
|
+
const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b) ** 3;
|
|
7187
|
+
const x = 1.227013851 * l - 0.55779998 * m + 0.281256149 * s;
|
|
7188
|
+
const y = -0.040580178 * l + 1.11225687 * m - 0.071676679 * s;
|
|
7189
|
+
const z = -0.076381285 * l - 0.421481978 * m + 1.58616322 * s;
|
|
7190
|
+
return [x * 100, y * 100, z * 100];
|
|
7191
|
+
};
|
|
7192
|
+
convert$1.oklab.rgb = function(oklab) {
|
|
7193
|
+
const ll = oklab[0] / 100;
|
|
7194
|
+
const aa = oklab[1] / 100;
|
|
7195
|
+
const bb = oklab[2] / 100;
|
|
7196
|
+
const l = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
|
|
7197
|
+
const m = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
|
|
7198
|
+
const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
|
|
7199
|
+
const r = srgbNonlinearTransform(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s);
|
|
7200
|
+
const g = srgbNonlinearTransform(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s);
|
|
7201
|
+
const b = srgbNonlinearTransform(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s);
|
|
7202
|
+
return [r * 255, g * 255, b * 255];
|
|
7203
|
+
};
|
|
7204
|
+
convert$1.oklch.oklab = function(oklch) {
|
|
7205
|
+
return convert$1.lch.lab(oklch);
|
|
7206
|
+
};
|
|
7207
|
+
convert$1.lab.xyz = function(lab) {
|
|
7208
|
+
const l = lab[0];
|
|
7209
|
+
const a = lab[1];
|
|
7210
|
+
const b = lab[2];
|
|
7211
|
+
let x;
|
|
7212
|
+
let y;
|
|
7213
|
+
let z;
|
|
7388
7214
|
y = (l + 16) / 116;
|
|
7389
7215
|
x = a / 500 + y;
|
|
7390
7216
|
z = y - b / 200;
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
y = y2 >
|
|
7395
|
-
x = x2 >
|
|
7396
|
-
z = z2 >
|
|
7217
|
+
const y2 = y ** 3;
|
|
7218
|
+
const x2 = x ** 3;
|
|
7219
|
+
const z2 = z ** 3;
|
|
7220
|
+
y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;
|
|
7221
|
+
x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;
|
|
7222
|
+
z = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787;
|
|
7397
7223
|
x *= 95.047;
|
|
7398
7224
|
y *= 100;
|
|
7399
7225
|
z *= 108.883;
|
|
7400
7226
|
return [x, y, z];
|
|
7401
7227
|
};
|
|
7402
|
-
convert.lab.lch = function(lab) {
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
var c;
|
|
7409
|
-
hr = Math.atan2(b, a);
|
|
7228
|
+
convert$1.lab.lch = function(lab) {
|
|
7229
|
+
const l = lab[0];
|
|
7230
|
+
const a = lab[1];
|
|
7231
|
+
const b = lab[2];
|
|
7232
|
+
let h;
|
|
7233
|
+
const hr = Math.atan2(b, a);
|
|
7410
7234
|
h = hr * 360 / 2 / Math.PI;
|
|
7411
7235
|
if (h < 0) {
|
|
7412
7236
|
h += 360;
|
|
7413
7237
|
}
|
|
7414
|
-
c = Math.sqrt(a * a + b * b);
|
|
7238
|
+
const c = Math.sqrt(a * a + b * b);
|
|
7415
7239
|
return [l, c, h];
|
|
7416
7240
|
};
|
|
7417
|
-
convert.lch.lab = function(lch) {
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
hr = h / 360 * 2 * Math.PI;
|
|
7425
|
-
a = c * Math.cos(hr);
|
|
7426
|
-
b = c * Math.sin(hr);
|
|
7241
|
+
convert$1.lch.lab = function(lch) {
|
|
7242
|
+
const l = lch[0];
|
|
7243
|
+
const c = lch[1];
|
|
7244
|
+
const h = lch[2];
|
|
7245
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
7246
|
+
const a = c * Math.cos(hr);
|
|
7247
|
+
const b = c * Math.sin(hr);
|
|
7427
7248
|
return [l, a, b];
|
|
7428
7249
|
};
|
|
7429
|
-
convert.rgb.ansi16 = function(args) {
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
var b = args[2];
|
|
7433
|
-
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
|
|
7250
|
+
convert$1.rgb.ansi16 = function(args, saturation = null) {
|
|
7251
|
+
const [r, g, b] = args;
|
|
7252
|
+
let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation;
|
|
7434
7253
|
value = Math.round(value / 50);
|
|
7435
7254
|
if (value === 0) {
|
|
7436
7255
|
return 30;
|
|
7437
7256
|
}
|
|
7438
|
-
|
|
7257
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
7439
7258
|
if (value === 2) {
|
|
7440
7259
|
ansi += 60;
|
|
7441
7260
|
}
|
|
7442
7261
|
return ansi;
|
|
7443
7262
|
};
|
|
7444
|
-
convert.hsv.ansi16 = function(args) {
|
|
7445
|
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
7263
|
+
convert$1.hsv.ansi16 = function(args) {
|
|
7264
|
+
return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
|
|
7446
7265
|
};
|
|
7447
|
-
convert.rgb.ansi256 = function(args) {
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
if (r === g && g === b) {
|
|
7266
|
+
convert$1.rgb.ansi256 = function(args) {
|
|
7267
|
+
const r = args[0];
|
|
7268
|
+
const g = args[1];
|
|
7269
|
+
const b = args[2];
|
|
7270
|
+
if (r >> 4 === g >> 4 && g >> 4 === b >> 4) {
|
|
7452
7271
|
if (r < 8) {
|
|
7453
7272
|
return 16;
|
|
7454
7273
|
}
|
|
@@ -7457,11 +7276,12 @@ var require_conversions = __commonJS({
|
|
|
7457
7276
|
}
|
|
7458
7277
|
return Math.round((r - 8) / 247 * 24) + 232;
|
|
7459
7278
|
}
|
|
7460
|
-
|
|
7279
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
7461
7280
|
return ansi;
|
|
7462
7281
|
};
|
|
7463
|
-
convert.ansi16.rgb = function(args) {
|
|
7464
|
-
|
|
7282
|
+
convert$1.ansi16.rgb = function(args) {
|
|
7283
|
+
args = args[0];
|
|
7284
|
+
let color = args % 10;
|
|
7465
7285
|
if (color === 0 || color === 7) {
|
|
7466
7286
|
if (args > 50) {
|
|
7467
7287
|
color += 3.5;
|
|
@@ -7469,60 +7289,54 @@ var require_conversions = __commonJS({
|
|
|
7469
7289
|
color = color / 10.5 * 255;
|
|
7470
7290
|
return [color, color, color];
|
|
7471
7291
|
}
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7292
|
+
const mult = (Math.trunc(args > 50) + 1) * 0.5;
|
|
7293
|
+
const r = (color & 1) * mult * 255;
|
|
7294
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
7295
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
7476
7296
|
return [r, g, b];
|
|
7477
7297
|
};
|
|
7478
|
-
convert.ansi256.rgb = function(args) {
|
|
7298
|
+
convert$1.ansi256.rgb = function(args) {
|
|
7299
|
+
args = args[0];
|
|
7479
7300
|
if (args >= 232) {
|
|
7480
|
-
|
|
7301
|
+
const c = (args - 232) * 10 + 8;
|
|
7481
7302
|
return [c, c, c];
|
|
7482
7303
|
}
|
|
7483
7304
|
args -= 16;
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7305
|
+
let rem;
|
|
7306
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
7307
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
7308
|
+
const b = rem % 6 / 5 * 255;
|
|
7488
7309
|
return [r, g, b];
|
|
7489
7310
|
};
|
|
7490
|
-
convert.rgb.hex = function(args) {
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
return "000000".
|
|
7311
|
+
convert$1.rgb.hex = function(args) {
|
|
7312
|
+
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
7313
|
+
const string = integer.toString(16).toUpperCase();
|
|
7314
|
+
return "000000".slice(string.length) + string;
|
|
7494
7315
|
};
|
|
7495
|
-
convert.hex.rgb = function(args) {
|
|
7496
|
-
|
|
7316
|
+
convert$1.hex.rgb = function(args) {
|
|
7317
|
+
const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
|
|
7497
7318
|
if (!match) {
|
|
7498
7319
|
return [0, 0, 0];
|
|
7499
7320
|
}
|
|
7500
|
-
|
|
7321
|
+
let colorString = match[0];
|
|
7501
7322
|
if (match[0].length === 3) {
|
|
7502
|
-
colorString = colorString.
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
var g = integer >> 8 & 255;
|
|
7509
|
-
var b = integer & 255;
|
|
7323
|
+
colorString = [...colorString].map((char) => char + char).join("");
|
|
7324
|
+
}
|
|
7325
|
+
const integer = Number.parseInt(colorString, 16);
|
|
7326
|
+
const r = integer >> 16 & 255;
|
|
7327
|
+
const g = integer >> 8 & 255;
|
|
7328
|
+
const b = integer & 255;
|
|
7510
7329
|
return [r, g, b];
|
|
7511
7330
|
};
|
|
7512
|
-
convert.rgb.hcg = function(rgb) {
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
if (chroma < 1) {
|
|
7522
|
-
grayscale = min / (1 - chroma);
|
|
7523
|
-
} else {
|
|
7524
|
-
grayscale = 0;
|
|
7525
|
-
}
|
|
7331
|
+
convert$1.rgb.hcg = function(rgb) {
|
|
7332
|
+
const r = rgb[0] / 255;
|
|
7333
|
+
const g = rgb[1] / 255;
|
|
7334
|
+
const b = rgb[2] / 255;
|
|
7335
|
+
const max = Math.max(Math.max(r, g), b);
|
|
7336
|
+
const min = Math.min(Math.min(r, g), b);
|
|
7337
|
+
const chroma = max - min;
|
|
7338
|
+
let hue;
|
|
7339
|
+
const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
|
|
7526
7340
|
if (chroma <= 0) {
|
|
7527
7341
|
hue = 0;
|
|
7528
7342
|
} else if (max === r) {
|
|
@@ -7530,79 +7344,80 @@ var require_conversions = __commonJS({
|
|
|
7530
7344
|
} else if (max === g) {
|
|
7531
7345
|
hue = 2 + (b - r) / chroma;
|
|
7532
7346
|
} else {
|
|
7533
|
-
hue = 4 + (r - g) / chroma
|
|
7347
|
+
hue = 4 + (r - g) / chroma;
|
|
7534
7348
|
}
|
|
7535
7349
|
hue /= 6;
|
|
7536
7350
|
hue %= 1;
|
|
7537
7351
|
return [hue * 360, chroma * 100, grayscale * 100];
|
|
7538
7352
|
};
|
|
7539
|
-
convert.hsl.hcg = function(hsl) {
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
if (l < 0.5) {
|
|
7545
|
-
c = 2 * s * l;
|
|
7546
|
-
} else {
|
|
7547
|
-
c = 2 * s * (1 - l);
|
|
7548
|
-
}
|
|
7353
|
+
convert$1.hsl.hcg = function(hsl) {
|
|
7354
|
+
const s = hsl[1] / 100;
|
|
7355
|
+
const l = hsl[2] / 100;
|
|
7356
|
+
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
7357
|
+
let f = 0;
|
|
7549
7358
|
if (c < 1) {
|
|
7550
7359
|
f = (l - 0.5 * c) / (1 - c);
|
|
7551
7360
|
}
|
|
7552
7361
|
return [hsl[0], c * 100, f * 100];
|
|
7553
7362
|
};
|
|
7554
|
-
convert.hsv.hcg = function(hsv) {
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7363
|
+
convert$1.hsv.hcg = function(hsv) {
|
|
7364
|
+
const s = hsv[1] / 100;
|
|
7365
|
+
const v = hsv[2] / 100;
|
|
7366
|
+
const c = s * v;
|
|
7367
|
+
let f = 0;
|
|
7559
7368
|
if (c < 1) {
|
|
7560
7369
|
f = (v - c) / (1 - c);
|
|
7561
7370
|
}
|
|
7562
7371
|
return [hsv[0], c * 100, f * 100];
|
|
7563
7372
|
};
|
|
7564
|
-
convert.hcg.rgb = function(hcg) {
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7373
|
+
convert$1.hcg.rgb = function(hcg) {
|
|
7374
|
+
const h = hcg[0] / 360;
|
|
7375
|
+
const c = hcg[1] / 100;
|
|
7376
|
+
const g = hcg[2] / 100;
|
|
7568
7377
|
if (c === 0) {
|
|
7569
7378
|
return [g * 255, g * 255, g * 255];
|
|
7570
7379
|
}
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7380
|
+
const pure = [0, 0, 0];
|
|
7381
|
+
const hi = h % 1 * 6;
|
|
7382
|
+
const v = hi % 1;
|
|
7383
|
+
const w = 1 - v;
|
|
7384
|
+
let mg = 0;
|
|
7576
7385
|
switch (Math.floor(hi)) {
|
|
7577
|
-
case 0:
|
|
7386
|
+
case 0: {
|
|
7578
7387
|
pure[0] = 1;
|
|
7579
7388
|
pure[1] = v;
|
|
7580
7389
|
pure[2] = 0;
|
|
7581
7390
|
break;
|
|
7582
|
-
|
|
7391
|
+
}
|
|
7392
|
+
case 1: {
|
|
7583
7393
|
pure[0] = w;
|
|
7584
7394
|
pure[1] = 1;
|
|
7585
7395
|
pure[2] = 0;
|
|
7586
7396
|
break;
|
|
7587
|
-
|
|
7397
|
+
}
|
|
7398
|
+
case 2: {
|
|
7588
7399
|
pure[0] = 0;
|
|
7589
7400
|
pure[1] = 1;
|
|
7590
7401
|
pure[2] = v;
|
|
7591
7402
|
break;
|
|
7592
|
-
|
|
7403
|
+
}
|
|
7404
|
+
case 3: {
|
|
7593
7405
|
pure[0] = 0;
|
|
7594
7406
|
pure[1] = w;
|
|
7595
7407
|
pure[2] = 1;
|
|
7596
7408
|
break;
|
|
7597
|
-
|
|
7409
|
+
}
|
|
7410
|
+
case 4: {
|
|
7598
7411
|
pure[0] = v;
|
|
7599
7412
|
pure[1] = 0;
|
|
7600
7413
|
pure[2] = 1;
|
|
7601
7414
|
break;
|
|
7602
|
-
|
|
7415
|
+
}
|
|
7416
|
+
default: {
|
|
7603
7417
|
pure[0] = 1;
|
|
7604
7418
|
pure[1] = 0;
|
|
7605
7419
|
pure[2] = w;
|
|
7420
|
+
}
|
|
7606
7421
|
}
|
|
7607
7422
|
mg = (1 - c) * g;
|
|
7608
7423
|
return [
|
|
@@ -7611,21 +7426,21 @@ var require_conversions = __commonJS({
|
|
|
7611
7426
|
(c * pure[2] + mg) * 255
|
|
7612
7427
|
];
|
|
7613
7428
|
};
|
|
7614
|
-
convert.hcg.hsv = function(hcg) {
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7429
|
+
convert$1.hcg.hsv = function(hcg) {
|
|
7430
|
+
const c = hcg[1] / 100;
|
|
7431
|
+
const g = hcg[2] / 100;
|
|
7432
|
+
const v = c + g * (1 - c);
|
|
7433
|
+
let f = 0;
|
|
7619
7434
|
if (v > 0) {
|
|
7620
7435
|
f = c / v;
|
|
7621
7436
|
}
|
|
7622
7437
|
return [hcg[0], f * 100, v * 100];
|
|
7623
7438
|
};
|
|
7624
|
-
convert.hcg.hsl = function(hcg) {
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7439
|
+
convert$1.hcg.hsl = function(hcg) {
|
|
7440
|
+
const c = hcg[1] / 100;
|
|
7441
|
+
const g = hcg[2] / 100;
|
|
7442
|
+
const l = g * (1 - c) + 0.5 * c;
|
|
7443
|
+
let s = 0;
|
|
7629
7444
|
if (l > 0 && l < 0.5) {
|
|
7630
7445
|
s = c / (2 * l);
|
|
7631
7446
|
} else if (l >= 0.5 && l < 1) {
|
|
@@ -7633,67 +7448,60 @@ var require_conversions = __commonJS({
|
|
|
7633
7448
|
}
|
|
7634
7449
|
return [hcg[0], s * 100, l * 100];
|
|
7635
7450
|
};
|
|
7636
|
-
convert.hcg.hwb = function(hcg) {
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7451
|
+
convert$1.hcg.hwb = function(hcg) {
|
|
7452
|
+
const c = hcg[1] / 100;
|
|
7453
|
+
const g = hcg[2] / 100;
|
|
7454
|
+
const v = c + g * (1 - c);
|
|
7640
7455
|
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
7641
7456
|
};
|
|
7642
|
-
convert.hwb.hcg = function(hwb) {
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7457
|
+
convert$1.hwb.hcg = function(hwb) {
|
|
7458
|
+
const w = hwb[1] / 100;
|
|
7459
|
+
const b = hwb[2] / 100;
|
|
7460
|
+
const v = 1 - b;
|
|
7461
|
+
const c = v - w;
|
|
7462
|
+
let g = 0;
|
|
7648
7463
|
if (c < 1) {
|
|
7649
7464
|
g = (v - c) / (1 - c);
|
|
7650
7465
|
}
|
|
7651
7466
|
return [hwb[0], c * 100, g * 100];
|
|
7652
7467
|
};
|
|
7653
|
-
convert.apple.rgb = function(apple) {
|
|
7468
|
+
convert$1.apple.rgb = function(apple) {
|
|
7654
7469
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
7655
7470
|
};
|
|
7656
|
-
convert.rgb.apple = function(rgb) {
|
|
7471
|
+
convert$1.rgb.apple = function(rgb) {
|
|
7657
7472
|
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
7658
7473
|
};
|
|
7659
|
-
convert.gray.rgb = function(args) {
|
|
7474
|
+
convert$1.gray.rgb = function(args) {
|
|
7660
7475
|
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
7661
7476
|
};
|
|
7662
|
-
convert.gray.hsl =
|
|
7477
|
+
convert$1.gray.hsl = function(args) {
|
|
7663
7478
|
return [0, 0, args[0]];
|
|
7664
7479
|
};
|
|
7665
|
-
convert.gray.
|
|
7480
|
+
convert$1.gray.hsv = convert$1.gray.hsl;
|
|
7481
|
+
convert$1.gray.hwb = function(gray) {
|
|
7666
7482
|
return [0, 100, gray[0]];
|
|
7667
7483
|
};
|
|
7668
|
-
convert.gray.cmyk = function(gray) {
|
|
7484
|
+
convert$1.gray.cmyk = function(gray) {
|
|
7669
7485
|
return [0, 0, 0, gray[0]];
|
|
7670
7486
|
};
|
|
7671
|
-
convert.gray.lab = function(gray) {
|
|
7487
|
+
convert$1.gray.lab = function(gray) {
|
|
7672
7488
|
return [gray[0], 0, 0];
|
|
7673
7489
|
};
|
|
7674
|
-
convert.gray.hex = function(gray) {
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
return "000000".
|
|
7490
|
+
convert$1.gray.hex = function(gray) {
|
|
7491
|
+
const value = Math.round(gray[0] / 100 * 255) & 255;
|
|
7492
|
+
const integer = (value << 16) + (value << 8) + value;
|
|
7493
|
+
const string = integer.toString(16).toUpperCase();
|
|
7494
|
+
return "000000".slice(string.length) + string;
|
|
7679
7495
|
};
|
|
7680
|
-
convert.rgb.gray = function(rgb) {
|
|
7681
|
-
|
|
7682
|
-
return [
|
|
7496
|
+
convert$1.rgb.gray = function(rgb) {
|
|
7497
|
+
const value = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
7498
|
+
return [value / 255 * 100];
|
|
7683
7499
|
};
|
|
7684
|
-
}
|
|
7685
|
-
});
|
|
7686
|
-
|
|
7687
|
-
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js
|
|
7688
|
-
var require_route = __commonJS({
|
|
7689
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports, module) {
|
|
7690
|
-
"use strict";
|
|
7691
|
-
var conversions = require_conversions();
|
|
7692
7500
|
function buildGraph() {
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
for (
|
|
7696
|
-
graph[
|
|
7501
|
+
const graph = {};
|
|
7502
|
+
const models2 = Object.keys(convert$1);
|
|
7503
|
+
for (let { length } = models2, i = 0; i < length; i++) {
|
|
7504
|
+
graph[models2[i]] = {
|
|
7697
7505
|
// http://jsperf.com/1-vs-infinity
|
|
7698
7506
|
// micro-opt, but this is simple.
|
|
7699
7507
|
distance: -1,
|
|
@@ -7703,15 +7511,15 @@ var require_route = __commonJS({
|
|
|
7703
7511
|
return graph;
|
|
7704
7512
|
}
|
|
7705
7513
|
function deriveBFS(fromModel) {
|
|
7706
|
-
|
|
7707
|
-
|
|
7514
|
+
const graph = buildGraph();
|
|
7515
|
+
const queue = [fromModel];
|
|
7708
7516
|
graph[fromModel].distance = 0;
|
|
7709
|
-
while (queue.length) {
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
for (
|
|
7713
|
-
|
|
7714
|
-
|
|
7517
|
+
while (queue.length > 0) {
|
|
7518
|
+
const current = queue.pop();
|
|
7519
|
+
const adjacents = Object.keys(convert$1[current]);
|
|
7520
|
+
for (let { length } = adjacents, i = 0; i < length; i++) {
|
|
7521
|
+
const adjacent = adjacents[i];
|
|
7522
|
+
const node = graph[adjacent];
|
|
7715
7523
|
if (node.distance === -1) {
|
|
7716
7524
|
node.distance = graph[current].distance + 1;
|
|
7717
7525
|
node.parent = current;
|
|
@@ -7727,49 +7535,41 @@ var require_route = __commonJS({
|
|
|
7727
7535
|
};
|
|
7728
7536
|
}
|
|
7729
7537
|
function wrapConversion(toModel, graph) {
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7538
|
+
const path = [graph[toModel].parent, toModel];
|
|
7539
|
+
let fn = convert$1[graph[toModel].parent][toModel];
|
|
7540
|
+
let cur = graph[toModel].parent;
|
|
7733
7541
|
while (graph[cur].parent) {
|
|
7734
7542
|
path.unshift(graph[cur].parent);
|
|
7735
|
-
fn = link(
|
|
7543
|
+
fn = link(convert$1[graph[cur].parent][cur], fn);
|
|
7736
7544
|
cur = graph[cur].parent;
|
|
7737
7545
|
}
|
|
7738
7546
|
fn.conversion = path;
|
|
7739
7547
|
return fn;
|
|
7740
7548
|
}
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
for (
|
|
7746
|
-
|
|
7747
|
-
|
|
7549
|
+
function route(fromModel) {
|
|
7550
|
+
const graph = deriveBFS(fromModel);
|
|
7551
|
+
const conversion = {};
|
|
7552
|
+
const models2 = Object.keys(graph);
|
|
7553
|
+
for (let { length } = models2, i = 0; i < length; i++) {
|
|
7554
|
+
const toModel = models2[i];
|
|
7555
|
+
const node = graph[toModel];
|
|
7748
7556
|
if (node.parent === null) {
|
|
7749
7557
|
continue;
|
|
7750
7558
|
}
|
|
7751
7559
|
conversion[toModel] = wrapConversion(toModel, graph);
|
|
7752
7560
|
}
|
|
7753
7561
|
return conversion;
|
|
7754
|
-
}
|
|
7755
|
-
}
|
|
7756
|
-
});
|
|
7757
|
-
|
|
7758
|
-
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js
|
|
7759
|
-
var require_color_convert = __commonJS({
|
|
7760
|
-
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports, module) {
|
|
7761
|
-
"use strict";
|
|
7762
|
-
var conversions = require_conversions();
|
|
7763
|
-
var route = require_route();
|
|
7562
|
+
}
|
|
7764
7563
|
var convert = {};
|
|
7765
|
-
var models = Object.keys(
|
|
7564
|
+
var models = Object.keys(convert$1);
|
|
7766
7565
|
function wrapRaw(fn) {
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7566
|
+
const wrappedFn = function(...args) {
|
|
7567
|
+
const arg0 = args[0];
|
|
7568
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
7569
|
+
return arg0;
|
|
7770
7570
|
}
|
|
7771
|
-
if (
|
|
7772
|
-
args =
|
|
7571
|
+
if (arg0.length > 1) {
|
|
7572
|
+
args = arg0;
|
|
7773
7573
|
}
|
|
7774
7574
|
return fn(args);
|
|
7775
7575
|
};
|
|
@@ -7779,16 +7579,17 @@ var require_color_convert = __commonJS({
|
|
|
7779
7579
|
return wrappedFn;
|
|
7780
7580
|
}
|
|
7781
7581
|
function wrapRounded(fn) {
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7582
|
+
const wrappedFn = function(...args) {
|
|
7583
|
+
const arg0 = args[0];
|
|
7584
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
7585
|
+
return arg0;
|
|
7785
7586
|
}
|
|
7786
|
-
if (
|
|
7787
|
-
args =
|
|
7587
|
+
if (arg0.length > 1) {
|
|
7588
|
+
args = arg0;
|
|
7788
7589
|
}
|
|
7789
|
-
|
|
7590
|
+
const result = fn(args);
|
|
7790
7591
|
if (typeof result === "object") {
|
|
7791
|
-
for (
|
|
7592
|
+
for (let { length } = result, i = 0; i < length; i++) {
|
|
7792
7593
|
result[i] = Math.round(result[i]);
|
|
7793
7594
|
}
|
|
7794
7595
|
}
|
|
@@ -7799,45 +7600,34 @@ var require_color_convert = __commonJS({
|
|
|
7799
7600
|
}
|
|
7800
7601
|
return wrappedFn;
|
|
7801
7602
|
}
|
|
7802
|
-
|
|
7603
|
+
for (const fromModel of models) {
|
|
7803
7604
|
convert[fromModel] = {};
|
|
7804
|
-
Object.defineProperty(convert[fromModel], "channels", { value:
|
|
7805
|
-
Object.defineProperty(convert[fromModel], "labels", { value:
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7605
|
+
Object.defineProperty(convert[fromModel], "channels", { value: convert$1[fromModel].channels });
|
|
7606
|
+
Object.defineProperty(convert[fromModel], "labels", { value: convert$1[fromModel].labels });
|
|
7607
|
+
const routes = route(fromModel);
|
|
7608
|
+
const routeModels = Object.keys(routes);
|
|
7609
|
+
for (const toModel of routeModels) {
|
|
7610
|
+
const fn = routes[toModel];
|
|
7810
7611
|
convert[fromModel][toModel] = wrapRounded(fn);
|
|
7811
7612
|
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
7812
|
-
}
|
|
7813
|
-
}
|
|
7814
|
-
module.exports = convert;
|
|
7815
|
-
}
|
|
7816
|
-
});
|
|
7817
|
-
|
|
7818
|
-
// ../../node_modules/.pnpm/color@3.2.1/node_modules/color/index.js
|
|
7819
|
-
var require_color = __commonJS({
|
|
7820
|
-
"../../node_modules/.pnpm/color@3.2.1/node_modules/color/index.js"(exports, module) {
|
|
7821
|
-
"use strict";
|
|
7822
|
-
var colorString = require_color_string();
|
|
7823
|
-
var convert = require_color_convert();
|
|
7824
|
-
var _slice = [].slice;
|
|
7613
|
+
}
|
|
7614
|
+
}
|
|
7825
7615
|
var skippedModels = [
|
|
7826
|
-
//
|
|
7616
|
+
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
|
7827
7617
|
"keyword",
|
|
7828
|
-
//
|
|
7618
|
+
// Gray conflicts with some method names, and has its own method defined.
|
|
7829
7619
|
"gray",
|
|
7830
|
-
//
|
|
7620
|
+
// Shouldn't really be in color-convert either...
|
|
7831
7621
|
"hex"
|
|
7832
7622
|
];
|
|
7833
7623
|
var hashedModelKeys = {};
|
|
7834
|
-
Object.keys(convert)
|
|
7835
|
-
hashedModelKeys[
|
|
7836
|
-
}
|
|
7624
|
+
for (const model of Object.keys(convert)) {
|
|
7625
|
+
hashedModelKeys[[...convert[model].labels].sort().join("")] = model;
|
|
7626
|
+
}
|
|
7837
7627
|
var limiters = {};
|
|
7838
|
-
function Color(
|
|
7628
|
+
function Color(object, model) {
|
|
7839
7629
|
if (!(this instanceof Color)) {
|
|
7840
|
-
return new Color(
|
|
7630
|
+
return new Color(object, model);
|
|
7841
7631
|
}
|
|
7842
7632
|
if (model && model in skippedModels) {
|
|
7843
7633
|
model = null;
|
|
@@ -7845,63 +7635,62 @@ var require_color = __commonJS({
|
|
|
7845
7635
|
if (model && !(model in convert)) {
|
|
7846
7636
|
throw new Error("Unknown model: " + model);
|
|
7847
7637
|
}
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
if (
|
|
7638
|
+
let i;
|
|
7639
|
+
let channels;
|
|
7640
|
+
if (object == null) {
|
|
7851
7641
|
this.model = "rgb";
|
|
7852
7642
|
this.color = [0, 0, 0];
|
|
7853
7643
|
this.valpha = 1;
|
|
7854
|
-
} else if (
|
|
7855
|
-
this.model =
|
|
7856
|
-
this.color =
|
|
7857
|
-
this.valpha =
|
|
7858
|
-
} else if (typeof
|
|
7859
|
-
|
|
7644
|
+
} else if (object instanceof Color) {
|
|
7645
|
+
this.model = object.model;
|
|
7646
|
+
this.color = [...object.color];
|
|
7647
|
+
this.valpha = object.valpha;
|
|
7648
|
+
} else if (typeof object === "string") {
|
|
7649
|
+
const result = cs.get(object);
|
|
7860
7650
|
if (result === null) {
|
|
7861
|
-
throw new Error("Unable to parse color from string: " +
|
|
7651
|
+
throw new Error("Unable to parse color from string: " + object);
|
|
7862
7652
|
}
|
|
7863
7653
|
this.model = result.model;
|
|
7864
7654
|
channels = convert[this.model].channels;
|
|
7865
7655
|
this.color = result.value.slice(0, channels);
|
|
7866
7656
|
this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
|
|
7867
|
-
} else if (
|
|
7657
|
+
} else if (object.length > 0) {
|
|
7868
7658
|
this.model = model || "rgb";
|
|
7869
7659
|
channels = convert[this.model].channels;
|
|
7870
|
-
|
|
7871
|
-
this.color = zeroArray(
|
|
7872
|
-
this.valpha = typeof
|
|
7873
|
-
} else if (typeof
|
|
7874
|
-
obj &= 16777215;
|
|
7660
|
+
const newArray = Array.prototype.slice.call(object, 0, channels);
|
|
7661
|
+
this.color = zeroArray(newArray, channels);
|
|
7662
|
+
this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
|
|
7663
|
+
} else if (typeof object === "number") {
|
|
7875
7664
|
this.model = "rgb";
|
|
7876
7665
|
this.color = [
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7666
|
+
object >> 16 & 255,
|
|
7667
|
+
object >> 8 & 255,
|
|
7668
|
+
object & 255
|
|
7880
7669
|
];
|
|
7881
7670
|
this.valpha = 1;
|
|
7882
7671
|
} else {
|
|
7883
7672
|
this.valpha = 1;
|
|
7884
|
-
|
|
7885
|
-
if ("alpha" in
|
|
7673
|
+
const keys = Object.keys(object);
|
|
7674
|
+
if ("alpha" in object) {
|
|
7886
7675
|
keys.splice(keys.indexOf("alpha"), 1);
|
|
7887
|
-
this.valpha = typeof
|
|
7676
|
+
this.valpha = typeof object.alpha === "number" ? object.alpha : 0;
|
|
7888
7677
|
}
|
|
7889
|
-
|
|
7678
|
+
const hashedKeys = keys.sort().join("");
|
|
7890
7679
|
if (!(hashedKeys in hashedModelKeys)) {
|
|
7891
|
-
throw new Error("Unable to parse color from object: " + JSON.stringify(
|
|
7680
|
+
throw new Error("Unable to parse color from object: " + JSON.stringify(object));
|
|
7892
7681
|
}
|
|
7893
7682
|
this.model = hashedModelKeys[hashedKeys];
|
|
7894
|
-
|
|
7895
|
-
|
|
7683
|
+
const { labels } = convert[this.model];
|
|
7684
|
+
const color = [];
|
|
7896
7685
|
for (i = 0; i < labels.length; i++) {
|
|
7897
|
-
color.push(
|
|
7686
|
+
color.push(object[labels[i]]);
|
|
7898
7687
|
}
|
|
7899
7688
|
this.color = zeroArray(color);
|
|
7900
7689
|
}
|
|
7901
7690
|
if (limiters[this.model]) {
|
|
7902
7691
|
channels = convert[this.model].channels;
|
|
7903
7692
|
for (i = 0; i < channels; i++) {
|
|
7904
|
-
|
|
7693
|
+
const limit = limiters[this.model][i];
|
|
7905
7694
|
if (limit) {
|
|
7906
7695
|
this.color[i] = limit(this.color[i]);
|
|
7907
7696
|
}
|
|
@@ -7913,31 +7702,31 @@ var require_color = __commonJS({
|
|
|
7913
7702
|
}
|
|
7914
7703
|
}
|
|
7915
7704
|
Color.prototype = {
|
|
7916
|
-
toString
|
|
7705
|
+
toString() {
|
|
7917
7706
|
return this.string();
|
|
7918
7707
|
},
|
|
7919
|
-
toJSON
|
|
7708
|
+
toJSON() {
|
|
7920
7709
|
return this[this.model]();
|
|
7921
7710
|
},
|
|
7922
|
-
string
|
|
7923
|
-
|
|
7711
|
+
string(places) {
|
|
7712
|
+
let self2 = this.model in cs.to ? this : this.rgb();
|
|
7924
7713
|
self2 = self2.round(typeof places === "number" ? places : 1);
|
|
7925
|
-
|
|
7926
|
-
return
|
|
7714
|
+
const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
|
|
7715
|
+
return cs.to[self2.model](...arguments_);
|
|
7927
7716
|
},
|
|
7928
|
-
percentString
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
return
|
|
7717
|
+
percentString(places) {
|
|
7718
|
+
const self2 = this.rgb().round(typeof places === "number" ? places : 1);
|
|
7719
|
+
const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
|
|
7720
|
+
return cs.to.rgb.percent(...arguments_);
|
|
7932
7721
|
},
|
|
7933
|
-
array
|
|
7934
|
-
return this.valpha === 1 ? this.color
|
|
7722
|
+
array() {
|
|
7723
|
+
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
7935
7724
|
},
|
|
7936
|
-
object
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
for (
|
|
7725
|
+
object() {
|
|
7726
|
+
const result = {};
|
|
7727
|
+
const { channels } = convert[this.model];
|
|
7728
|
+
const { labels } = convert[this.model];
|
|
7729
|
+
for (let i = 0; i < channels; i++) {
|
|
7941
7730
|
result[labels[i]] = this.color[i];
|
|
7942
7731
|
}
|
|
7943
7732
|
if (this.valpha !== 1) {
|
|
@@ -7945,8 +7734,8 @@ var require_color = __commonJS({
|
|
|
7945
7734
|
}
|
|
7946
7735
|
return result;
|
|
7947
7736
|
},
|
|
7948
|
-
unitArray
|
|
7949
|
-
|
|
7737
|
+
unitArray() {
|
|
7738
|
+
const rgb = this.rgb().color;
|
|
7950
7739
|
rgb[0] /= 255;
|
|
7951
7740
|
rgb[1] /= 255;
|
|
7952
7741
|
rgb[2] /= 255;
|
|
@@ -7955,8 +7744,8 @@ var require_color = __commonJS({
|
|
|
7955
7744
|
}
|
|
7956
7745
|
return rgb;
|
|
7957
7746
|
},
|
|
7958
|
-
unitObject
|
|
7959
|
-
|
|
7747
|
+
unitObject() {
|
|
7748
|
+
const rgb = this.rgb().object();
|
|
7960
7749
|
rgb.r /= 255;
|
|
7961
7750
|
rgb.g /= 255;
|
|
7962
7751
|
rgb.b /= 255;
|
|
@@ -7965,24 +7754,21 @@ var require_color = __commonJS({
|
|
|
7965
7754
|
}
|
|
7966
7755
|
return rgb;
|
|
7967
7756
|
},
|
|
7968
|
-
round
|
|
7757
|
+
round(places) {
|
|
7969
7758
|
places = Math.max(places || 0, 0);
|
|
7970
|
-
return new Color(this.color.map(roundToPlace(places))
|
|
7759
|
+
return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
|
|
7971
7760
|
},
|
|
7972
|
-
alpha
|
|
7973
|
-
if (
|
|
7974
|
-
return new Color(this.color
|
|
7761
|
+
alpha(value) {
|
|
7762
|
+
if (value !== void 0) {
|
|
7763
|
+
return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
|
|
7975
7764
|
}
|
|
7976
7765
|
return this.valpha;
|
|
7977
7766
|
},
|
|
7978
|
-
//
|
|
7767
|
+
// Rgb
|
|
7979
7768
|
red: getset("rgb", 0, maxfn(255)),
|
|
7980
7769
|
green: getset("rgb", 1, maxfn(255)),
|
|
7981
7770
|
blue: getset("rgb", 2, maxfn(255)),
|
|
7982
|
-
hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0,
|
|
7983
|
-
return (val % 360 + 360) % 360;
|
|
7984
|
-
}),
|
|
7985
|
-
// eslint-disable-line brace-style
|
|
7771
|
+
hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (value) => (value % 360 + 360) % 360),
|
|
7986
7772
|
saturationl: getset("hsl", 1, maxfn(100)),
|
|
7987
7773
|
lightness: getset("hsl", 2, maxfn(100)),
|
|
7988
7774
|
saturationv: getset("hsv", 1, maxfn(100)),
|
|
@@ -7995,127 +7781,138 @@ var require_color = __commonJS({
|
|
|
7995
7781
|
magenta: getset("cmyk", 1, maxfn(100)),
|
|
7996
7782
|
yellow: getset("cmyk", 2, maxfn(100)),
|
|
7997
7783
|
black: getset("cmyk", 3, maxfn(100)),
|
|
7998
|
-
x: getset("xyz", 0, maxfn(
|
|
7784
|
+
x: getset("xyz", 0, maxfn(95.047)),
|
|
7999
7785
|
y: getset("xyz", 1, maxfn(100)),
|
|
8000
|
-
z: getset("xyz", 2, maxfn(
|
|
7786
|
+
z: getset("xyz", 2, maxfn(108.833)),
|
|
8001
7787
|
l: getset("lab", 0, maxfn(100)),
|
|
8002
7788
|
a: getset("lab", 1),
|
|
8003
7789
|
b: getset("lab", 2),
|
|
8004
|
-
keyword
|
|
8005
|
-
if (
|
|
8006
|
-
return new Color(
|
|
7790
|
+
keyword(value) {
|
|
7791
|
+
if (value !== void 0) {
|
|
7792
|
+
return new Color(value);
|
|
8007
7793
|
}
|
|
8008
7794
|
return convert[this.model].keyword(this.color);
|
|
8009
7795
|
},
|
|
8010
|
-
hex
|
|
8011
|
-
if (
|
|
8012
|
-
return new Color(
|
|
7796
|
+
hex(value) {
|
|
7797
|
+
if (value !== void 0) {
|
|
7798
|
+
return new Color(value);
|
|
8013
7799
|
}
|
|
8014
|
-
return
|
|
7800
|
+
return cs.to.hex(...this.rgb().round().color);
|
|
8015
7801
|
},
|
|
8016
|
-
|
|
8017
|
-
|
|
7802
|
+
hexa(value) {
|
|
7803
|
+
if (value !== void 0) {
|
|
7804
|
+
return new Color(value);
|
|
7805
|
+
}
|
|
7806
|
+
const rgbArray = this.rgb().round().color;
|
|
7807
|
+
let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
|
7808
|
+
if (alphaHex.length === 1) {
|
|
7809
|
+
alphaHex = "0" + alphaHex;
|
|
7810
|
+
}
|
|
7811
|
+
return cs.to.hex(...rgbArray) + alphaHex;
|
|
7812
|
+
},
|
|
7813
|
+
rgbNumber() {
|
|
7814
|
+
const rgb = this.rgb().color;
|
|
8018
7815
|
return (rgb[0] & 255) << 16 | (rgb[1] & 255) << 8 | rgb[2] & 255;
|
|
8019
7816
|
},
|
|
8020
|
-
luminosity
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
for (
|
|
8024
|
-
|
|
8025
|
-
lum[i] = chan <= 0.
|
|
7817
|
+
luminosity() {
|
|
7818
|
+
const rgb = this.rgb().color;
|
|
7819
|
+
const lum = [];
|
|
7820
|
+
for (const [i, element] of rgb.entries()) {
|
|
7821
|
+
const chan = element / 255;
|
|
7822
|
+
lum[i] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
|
|
8026
7823
|
}
|
|
8027
7824
|
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
|
|
8028
7825
|
},
|
|
8029
|
-
contrast
|
|
8030
|
-
|
|
8031
|
-
|
|
7826
|
+
contrast(color2) {
|
|
7827
|
+
const lum1 = this.luminosity();
|
|
7828
|
+
const lum2 = color2.luminosity();
|
|
8032
7829
|
if (lum1 > lum2) {
|
|
8033
7830
|
return (lum1 + 0.05) / (lum2 + 0.05);
|
|
8034
7831
|
}
|
|
8035
7832
|
return (lum2 + 0.05) / (lum1 + 0.05);
|
|
8036
7833
|
},
|
|
8037
|
-
level
|
|
8038
|
-
|
|
8039
|
-
if (contrastRatio >= 7
|
|
7834
|
+
level(color2) {
|
|
7835
|
+
const contrastRatio = this.contrast(color2);
|
|
7836
|
+
if (contrastRatio >= 7) {
|
|
8040
7837
|
return "AAA";
|
|
8041
7838
|
}
|
|
8042
7839
|
return contrastRatio >= 4.5 ? "AA" : "";
|
|
8043
7840
|
},
|
|
8044
|
-
isDark
|
|
8045
|
-
|
|
8046
|
-
|
|
7841
|
+
isDark() {
|
|
7842
|
+
const rgb = this.rgb().color;
|
|
7843
|
+
const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 1e4;
|
|
8047
7844
|
return yiq < 128;
|
|
8048
7845
|
},
|
|
8049
|
-
isLight
|
|
7846
|
+
isLight() {
|
|
8050
7847
|
return !this.isDark();
|
|
8051
7848
|
},
|
|
8052
|
-
negate
|
|
8053
|
-
|
|
8054
|
-
for (
|
|
7849
|
+
negate() {
|
|
7850
|
+
const rgb = this.rgb();
|
|
7851
|
+
for (let i = 0; i < 3; i++) {
|
|
8055
7852
|
rgb.color[i] = 255 - rgb.color[i];
|
|
8056
7853
|
}
|
|
8057
7854
|
return rgb;
|
|
8058
7855
|
},
|
|
8059
|
-
lighten
|
|
8060
|
-
|
|
7856
|
+
lighten(ratio) {
|
|
7857
|
+
const hsl = this.hsl();
|
|
8061
7858
|
hsl.color[2] += hsl.color[2] * ratio;
|
|
8062
7859
|
return hsl;
|
|
8063
7860
|
},
|
|
8064
|
-
darken
|
|
8065
|
-
|
|
7861
|
+
darken(ratio) {
|
|
7862
|
+
const hsl = this.hsl();
|
|
8066
7863
|
hsl.color[2] -= hsl.color[2] * ratio;
|
|
8067
7864
|
return hsl;
|
|
8068
7865
|
},
|
|
8069
|
-
saturate
|
|
8070
|
-
|
|
7866
|
+
saturate(ratio) {
|
|
7867
|
+
const hsl = this.hsl();
|
|
8071
7868
|
hsl.color[1] += hsl.color[1] * ratio;
|
|
8072
7869
|
return hsl;
|
|
8073
7870
|
},
|
|
8074
|
-
desaturate
|
|
8075
|
-
|
|
7871
|
+
desaturate(ratio) {
|
|
7872
|
+
const hsl = this.hsl();
|
|
8076
7873
|
hsl.color[1] -= hsl.color[1] * ratio;
|
|
8077
7874
|
return hsl;
|
|
8078
7875
|
},
|
|
8079
|
-
whiten
|
|
8080
|
-
|
|
7876
|
+
whiten(ratio) {
|
|
7877
|
+
const hwb = this.hwb();
|
|
8081
7878
|
hwb.color[1] += hwb.color[1] * ratio;
|
|
8082
7879
|
return hwb;
|
|
8083
7880
|
},
|
|
8084
|
-
blacken
|
|
8085
|
-
|
|
7881
|
+
blacken(ratio) {
|
|
7882
|
+
const hwb = this.hwb();
|
|
8086
7883
|
hwb.color[2] += hwb.color[2] * ratio;
|
|
8087
7884
|
return hwb;
|
|
8088
7885
|
},
|
|
8089
|
-
grayscale
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
return Color.rgb(
|
|
7886
|
+
grayscale() {
|
|
7887
|
+
const rgb = this.rgb().color;
|
|
7888
|
+
const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
|
|
7889
|
+
return Color.rgb(value, value, value);
|
|
8093
7890
|
},
|
|
8094
|
-
fade
|
|
7891
|
+
fade(ratio) {
|
|
8095
7892
|
return this.alpha(this.valpha - this.valpha * ratio);
|
|
8096
7893
|
},
|
|
8097
|
-
opaquer
|
|
7894
|
+
opaquer(ratio) {
|
|
8098
7895
|
return this.alpha(this.valpha + this.valpha * ratio);
|
|
8099
7896
|
},
|
|
8100
|
-
rotate
|
|
8101
|
-
|
|
8102
|
-
|
|
7897
|
+
rotate(degrees) {
|
|
7898
|
+
const hsl = this.hsl();
|
|
7899
|
+
let hue = hsl.color[0];
|
|
8103
7900
|
hue = (hue + degrees) % 360;
|
|
8104
7901
|
hue = hue < 0 ? 360 + hue : hue;
|
|
8105
7902
|
hsl.color[0] = hue;
|
|
8106
7903
|
return hsl;
|
|
8107
7904
|
},
|
|
8108
|
-
mix
|
|
7905
|
+
mix(mixinColor, weight) {
|
|
8109
7906
|
if (!mixinColor || !mixinColor.rgb) {
|
|
8110
7907
|
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
|
|
8111
7908
|
}
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
7909
|
+
const color1 = mixinColor.rgb();
|
|
7910
|
+
const color2 = this.rgb();
|
|
7911
|
+
const p = weight === void 0 ? 0.5 : weight;
|
|
7912
|
+
const w = 2 * p - 1;
|
|
7913
|
+
const a = color1.alpha() - color2.alpha();
|
|
7914
|
+
const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;
|
|
7915
|
+
const w2 = 1 - w1;
|
|
8119
7916
|
return Color.rgb(
|
|
8120
7917
|
w1 * color1.red() + w2 * color2.red(),
|
|
8121
7918
|
w1 * color1.green() + w2 * color2.green(),
|
|
@@ -8124,50 +7921,50 @@ var require_color = __commonJS({
|
|
|
8124
7921
|
);
|
|
8125
7922
|
}
|
|
8126
7923
|
};
|
|
8127
|
-
Object.keys(convert)
|
|
8128
|
-
if (skippedModels.
|
|
8129
|
-
|
|
7924
|
+
for (const model of Object.keys(convert)) {
|
|
7925
|
+
if (skippedModels.includes(model)) {
|
|
7926
|
+
continue;
|
|
8130
7927
|
}
|
|
8131
|
-
|
|
8132
|
-
Color.prototype[model] = function() {
|
|
7928
|
+
const { channels } = convert[model];
|
|
7929
|
+
Color.prototype[model] = function(...arguments_) {
|
|
8133
7930
|
if (this.model === model) {
|
|
8134
7931
|
return new Color(this);
|
|
8135
7932
|
}
|
|
8136
|
-
if (
|
|
8137
|
-
return new Color(
|
|
7933
|
+
if (arguments_.length > 0) {
|
|
7934
|
+
return new Color(arguments_, model);
|
|
8138
7935
|
}
|
|
8139
|
-
|
|
8140
|
-
return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);
|
|
7936
|
+
return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);
|
|
8141
7937
|
};
|
|
8142
|
-
Color[model] = function(
|
|
7938
|
+
Color[model] = function(...arguments_) {
|
|
7939
|
+
let color = arguments_[0];
|
|
8143
7940
|
if (typeof color === "number") {
|
|
8144
|
-
color = zeroArray(
|
|
7941
|
+
color = zeroArray(arguments_, channels);
|
|
8145
7942
|
}
|
|
8146
7943
|
return new Color(color, model);
|
|
8147
7944
|
};
|
|
8148
|
-
}
|
|
8149
|
-
function roundTo(
|
|
8150
|
-
return Number(
|
|
7945
|
+
}
|
|
7946
|
+
function roundTo(number, places) {
|
|
7947
|
+
return Number(number.toFixed(places));
|
|
8151
7948
|
}
|
|
8152
7949
|
function roundToPlace(places) {
|
|
8153
|
-
return function(
|
|
8154
|
-
return roundTo(
|
|
7950
|
+
return function(number) {
|
|
7951
|
+
return roundTo(number, places);
|
|
8155
7952
|
};
|
|
8156
7953
|
}
|
|
8157
7954
|
function getset(model, channel, modifier) {
|
|
8158
7955
|
model = Array.isArray(model) ? model : [model];
|
|
8159
|
-
|
|
8160
|
-
(limiters[m]
|
|
8161
|
-
}
|
|
7956
|
+
for (const m of model) {
|
|
7957
|
+
(limiters[m] ||= [])[channel] = modifier;
|
|
7958
|
+
}
|
|
8162
7959
|
model = model[0];
|
|
8163
|
-
return function(
|
|
8164
|
-
|
|
8165
|
-
if (
|
|
7960
|
+
return function(value) {
|
|
7961
|
+
let result;
|
|
7962
|
+
if (value !== void 0) {
|
|
8166
7963
|
if (modifier) {
|
|
8167
|
-
|
|
7964
|
+
value = modifier(value);
|
|
8168
7965
|
}
|
|
8169
7966
|
result = this[model]();
|
|
8170
|
-
result.color[channel] =
|
|
7967
|
+
result.color[channel] = value;
|
|
8171
7968
|
return result;
|
|
8172
7969
|
}
|
|
8173
7970
|
result = this[model]().color[channel];
|
|
@@ -8182,26 +7979,21 @@ var require_color = __commonJS({
|
|
|
8182
7979
|
return Math.max(0, Math.min(max, v));
|
|
8183
7980
|
};
|
|
8184
7981
|
}
|
|
8185
|
-
function assertArray(
|
|
8186
|
-
return Array.isArray(
|
|
7982
|
+
function assertArray(value) {
|
|
7983
|
+
return Array.isArray(value) ? value : [value];
|
|
8187
7984
|
}
|
|
8188
|
-
function zeroArray(
|
|
8189
|
-
for (
|
|
8190
|
-
if (typeof
|
|
8191
|
-
|
|
7985
|
+
function zeroArray(array, length) {
|
|
7986
|
+
for (let i = 0; i < length; i++) {
|
|
7987
|
+
if (typeof array[i] !== "number") {
|
|
7988
|
+
array[i] = 0;
|
|
8192
7989
|
}
|
|
8193
7990
|
}
|
|
8194
|
-
return
|
|
7991
|
+
return array;
|
|
8195
7992
|
}
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
}
|
|
8199
|
-
|
|
8200
|
-
// ../../node_modules/.pnpm/text-hex@1.0.0/node_modules/text-hex/index.js
|
|
8201
|
-
var require_text_hex = __commonJS({
|
|
8202
|
-
"../../node_modules/.pnpm/text-hex@1.0.0/node_modules/text-hex/index.js"(exports, module) {
|
|
8203
|
-
"use strict";
|
|
8204
|
-
module.exports = function hex(str) {
|
|
7993
|
+
function getDefaultExportFromCjs(x) {
|
|
7994
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
7995
|
+
}
|
|
7996
|
+
var textHex = function hex2(str) {
|
|
8205
7997
|
for (var i = 0, hash = 0; i < str.length; hash = str.charCodeAt(i++) + ((hash << 5) - hash)) ;
|
|
8206
7998
|
var color = Math.floor(
|
|
8207
7999
|
Math.abs(
|
|
@@ -8210,24 +8002,17 @@ var require_text_hex = __commonJS({
|
|
|
8210
8002
|
).toString(16);
|
|
8211
8003
|
return "#" + Array(6 - color.length + 1).join("0") + color;
|
|
8212
8004
|
};
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
var require_colorspace = __commonJS({
|
|
8218
|
-
"../../node_modules/.pnpm/colorspace@1.1.4/node_modules/colorspace/index.js"(exports, module) {
|
|
8219
|
-
"use strict";
|
|
8220
|
-
var color = require_color();
|
|
8221
|
-
var hex = require_text_hex();
|
|
8222
|
-
module.exports = function colorspace(namespace, delimiter) {
|
|
8223
|
-
var split = namespace.split(delimiter || ":");
|
|
8224
|
-
var base = hex(split[0]);
|
|
8005
|
+
var hex = /* @__PURE__ */ getDefaultExportFromCjs(textHex);
|
|
8006
|
+
function colorspace(namespace, delimiter) {
|
|
8007
|
+
const split = namespace.split(delimiter || ":");
|
|
8008
|
+
let base = hex(split[0]);
|
|
8225
8009
|
if (!split.length) return base;
|
|
8226
|
-
for (
|
|
8227
|
-
base =
|
|
8010
|
+
for (let i = 0, l = split.length - 1; i < l; i++) {
|
|
8011
|
+
base = Color(base).mix(Color(hex(split[i + 1]))).saturate(1).hex();
|
|
8228
8012
|
}
|
|
8229
8013
|
return base;
|
|
8230
|
-
}
|
|
8014
|
+
}
|
|
8015
|
+
module.exports = colorspace;
|
|
8231
8016
|
}
|
|
8232
8017
|
});
|
|
8233
8018
|
|
|
@@ -8274,11 +8059,11 @@ var require_kuler = __commonJS({
|
|
|
8274
8059
|
}
|
|
8275
8060
|
});
|
|
8276
8061
|
|
|
8277
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8062
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js
|
|
8278
8063
|
var require_namespace_ansi = __commonJS({
|
|
8279
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8064
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js"(exports, module) {
|
|
8280
8065
|
"use strict";
|
|
8281
|
-
var colorspace =
|
|
8066
|
+
var colorspace = require_index_cjs();
|
|
8282
8067
|
var kuler = require_kuler();
|
|
8283
8068
|
module.exports = function ansiModifier(args, options2) {
|
|
8284
8069
|
var namespace = options2.namespace;
|
|
@@ -8313,9 +8098,9 @@ var require_enabled = __commonJS({
|
|
|
8313
8098
|
}
|
|
8314
8099
|
});
|
|
8315
8100
|
|
|
8316
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8101
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/adapters/index.js
|
|
8317
8102
|
var require_adapters = __commonJS({
|
|
8318
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8103
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/adapters/index.js"(exports, module) {
|
|
8319
8104
|
"use strict";
|
|
8320
8105
|
var enabled = require_enabled();
|
|
8321
8106
|
module.exports = function create(fn) {
|
|
@@ -8330,9 +8115,9 @@ var require_adapters = __commonJS({
|
|
|
8330
8115
|
}
|
|
8331
8116
|
});
|
|
8332
8117
|
|
|
8333
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8118
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/adapters/process.env.js
|
|
8334
8119
|
var require_process_env = __commonJS({
|
|
8335
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8120
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/adapters/process.env.js"(exports, module) {
|
|
8336
8121
|
"use strict";
|
|
8337
8122
|
var adapter = require_adapters();
|
|
8338
8123
|
module.exports = adapter(function processenv() {
|
|
@@ -8341,9 +8126,9 @@ var require_process_env = __commonJS({
|
|
|
8341
8126
|
}
|
|
8342
8127
|
});
|
|
8343
8128
|
|
|
8344
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8129
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/logger/console.js
|
|
8345
8130
|
var require_console2 = __commonJS({
|
|
8346
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8131
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/logger/console.js"(exports, module) {
|
|
8347
8132
|
"use strict";
|
|
8348
8133
|
module.exports = function(meta, messages) {
|
|
8349
8134
|
try {
|
|
@@ -8354,9 +8139,9 @@ var require_console2 = __commonJS({
|
|
|
8354
8139
|
}
|
|
8355
8140
|
});
|
|
8356
8141
|
|
|
8357
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8142
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/development.js
|
|
8358
8143
|
var require_development = __commonJS({
|
|
8359
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8144
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/development.js"(exports, module) {
|
|
8360
8145
|
"use strict";
|
|
8361
8146
|
var create = require_diagnostics();
|
|
8362
8147
|
var tty = __require("tty").isatty(1);
|
|
@@ -8378,9 +8163,9 @@ var require_development = __commonJS({
|
|
|
8378
8163
|
}
|
|
8379
8164
|
});
|
|
8380
8165
|
|
|
8381
|
-
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8166
|
+
// ../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/index.js
|
|
8382
8167
|
var require_node2 = __commonJS({
|
|
8383
|
-
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.
|
|
8168
|
+
"../../node_modules/.pnpm/@dabh+diagnostics@2.0.8/node_modules/@dabh/diagnostics/node/index.js"(exports, module) {
|
|
8384
8169
|
"use strict";
|
|
8385
8170
|
if (process.env.NODE_ENV === "production") {
|
|
8386
8171
|
module.exports = require_production();
|
|
@@ -8390,9 +8175,9 @@ var require_node2 = __commonJS({
|
|
|
8390
8175
|
}
|
|
8391
8176
|
});
|
|
8392
8177
|
|
|
8393
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
8178
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/tail-file.js
|
|
8394
8179
|
var require_tail_file = __commonJS({
|
|
8395
|
-
"../../node_modules/.pnpm/winston@3.
|
|
8180
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/tail-file.js"(exports, module) {
|
|
8396
8181
|
"use strict";
|
|
8397
8182
|
var fs2 = __require("fs");
|
|
8398
8183
|
var { StringDecoder } = __require("string_decoder");
|
|
@@ -8485,9 +8270,9 @@ var require_tail_file = __commonJS({
|
|
|
8485
8270
|
}
|
|
8486
8271
|
});
|
|
8487
8272
|
|
|
8488
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
8273
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/file.js
|
|
8489
8274
|
var require_file = __commonJS({
|
|
8490
|
-
"../../node_modules/.pnpm/winston@3.
|
|
8275
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/file.js"(exports, module) {
|
|
8491
8276
|
"use strict";
|
|
8492
8277
|
var fs2 = __require("fs");
|
|
8493
8278
|
var path = __require("path");
|
|
@@ -8561,6 +8346,28 @@ var require_file = __commonJS({
|
|
|
8561
8346
|
}
|
|
8562
8347
|
}
|
|
8563
8348
|
}
|
|
8349
|
+
/**
|
|
8350
|
+
* Called by Node.js Writable stream before emitting 'finish'.
|
|
8351
|
+
* Ensures all buffered data is flushed to the underlying file stream
|
|
8352
|
+
* before the transport signals completion.
|
|
8353
|
+
* @param {Function} callback - Callback to signal completion.
|
|
8354
|
+
* @private
|
|
8355
|
+
*/
|
|
8356
|
+
_final(callback) {
|
|
8357
|
+
if (this._opening) {
|
|
8358
|
+
this.once("open", () => this._final(callback));
|
|
8359
|
+
return;
|
|
8360
|
+
}
|
|
8361
|
+
this._stream.end();
|
|
8362
|
+
if (!this._dest) {
|
|
8363
|
+
return callback();
|
|
8364
|
+
}
|
|
8365
|
+
if (this._dest.writableFinished) {
|
|
8366
|
+
return callback();
|
|
8367
|
+
}
|
|
8368
|
+
this._dest.once("finish", callback);
|
|
8369
|
+
this._dest.once("error", callback);
|
|
8370
|
+
}
|
|
8564
8371
|
/**
|
|
8565
8372
|
* Core logging method exposed to Winston. Metadata is optional.
|
|
8566
8373
|
* @param {Object} info - TODO: add param description.
|
|
@@ -8810,9 +8617,7 @@ var require_file = __commonJS({
|
|
|
8810
8617
|
this._dest = this._createStream(this._stream);
|
|
8811
8618
|
this._opening = false;
|
|
8812
8619
|
this.once("open", () => {
|
|
8813
|
-
if (this._stream.
|
|
8814
|
-
this._stream.emit("rotate");
|
|
8815
|
-
} else {
|
|
8620
|
+
if (!this._stream.emit("rotate")) {
|
|
8816
8621
|
this._rotate = false;
|
|
8817
8622
|
}
|
|
8818
8623
|
});
|
|
@@ -9081,9 +8886,9 @@ var require_file = __commonJS({
|
|
|
9081
8886
|
}
|
|
9082
8887
|
});
|
|
9083
8888
|
|
|
9084
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
8889
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/http.js
|
|
9085
8890
|
var require_http = __commonJS({
|
|
9086
|
-
"../../node_modules/.pnpm/winston@3.
|
|
8891
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/http.js"(exports, module) {
|
|
9087
8892
|
"use strict";
|
|
9088
8893
|
var http2 = __require("http");
|
|
9089
8894
|
var https = __require("https");
|
|
@@ -9312,9 +9117,9 @@ var require_is_stream = __commonJS({
|
|
|
9312
9117
|
}
|
|
9313
9118
|
});
|
|
9314
9119
|
|
|
9315
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9120
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/stream.js
|
|
9316
9121
|
var require_stream2 = __commonJS({
|
|
9317
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9122
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/stream.js"(exports, module) {
|
|
9318
9123
|
"use strict";
|
|
9319
9124
|
var isStream = require_is_stream();
|
|
9320
9125
|
var { MESSAGE } = require_triple_beam();
|
|
@@ -9361,9 +9166,9 @@ var require_stream2 = __commonJS({
|
|
|
9361
9166
|
}
|
|
9362
9167
|
});
|
|
9363
9168
|
|
|
9364
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9169
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/index.js
|
|
9365
9170
|
var require_transports = __commonJS({
|
|
9366
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9171
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/transports/index.js"(exports) {
|
|
9367
9172
|
"use strict";
|
|
9368
9173
|
Object.defineProperty(exports, "Console", {
|
|
9369
9174
|
configurable: true,
|
|
@@ -9396,9 +9201,9 @@ var require_transports = __commonJS({
|
|
|
9396
9201
|
}
|
|
9397
9202
|
});
|
|
9398
9203
|
|
|
9399
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9204
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/config/index.js
|
|
9400
9205
|
var require_config2 = __commonJS({
|
|
9401
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9206
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/config/index.js"(exports) {
|
|
9402
9207
|
"use strict";
|
|
9403
9208
|
var logform = require_logform();
|
|
9404
9209
|
var { configs } = require_triple_beam();
|
|
@@ -9674,9 +9479,9 @@ var require_stack_trace = __commonJS({
|
|
|
9674
9479
|
}
|
|
9675
9480
|
});
|
|
9676
9481
|
|
|
9677
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9482
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/exception-stream.js
|
|
9678
9483
|
var require_exception_stream = __commonJS({
|
|
9679
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9484
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/exception-stream.js"(exports, module) {
|
|
9680
9485
|
"use strict";
|
|
9681
9486
|
var { Writable } = require_readable();
|
|
9682
9487
|
module.exports = class ExceptionStream extends Writable {
|
|
@@ -9714,9 +9519,9 @@ var require_exception_stream = __commonJS({
|
|
|
9714
9519
|
}
|
|
9715
9520
|
});
|
|
9716
9521
|
|
|
9717
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9522
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/exception-handler.js
|
|
9718
9523
|
var require_exception_handler = __commonJS({
|
|
9719
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9524
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/exception-handler.js"(exports, module) {
|
|
9720
9525
|
"use strict";
|
|
9721
9526
|
var os2 = __require("os");
|
|
9722
9527
|
var asyncForEach = require_forEach();
|
|
@@ -9912,9 +9717,9 @@ var require_exception_handler = __commonJS({
|
|
|
9912
9717
|
}
|
|
9913
9718
|
});
|
|
9914
9719
|
|
|
9915
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9720
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/rejection-stream.js
|
|
9916
9721
|
var require_rejection_stream = __commonJS({
|
|
9917
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9722
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/rejection-stream.js"(exports, module) {
|
|
9918
9723
|
"use strict";
|
|
9919
9724
|
var { Writable } = require_readable();
|
|
9920
9725
|
module.exports = class RejectionStream extends Writable {
|
|
@@ -9952,9 +9757,9 @@ var require_rejection_stream = __commonJS({
|
|
|
9952
9757
|
}
|
|
9953
9758
|
});
|
|
9954
9759
|
|
|
9955
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9760
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/rejection-handler.js
|
|
9956
9761
|
var require_rejection_handler = __commonJS({
|
|
9957
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9762
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/rejection-handler.js"(exports, module) {
|
|
9958
9763
|
"use strict";
|
|
9959
9764
|
var os2 = __require("os");
|
|
9960
9765
|
var asyncForEach = require_forEach();
|
|
@@ -10156,9 +9961,9 @@ var require_rejection_handler = __commonJS({
|
|
|
10156
9961
|
}
|
|
10157
9962
|
});
|
|
10158
9963
|
|
|
10159
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
9964
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/profiler.js
|
|
10160
9965
|
var require_profiler = __commonJS({
|
|
10161
|
-
"../../node_modules/.pnpm/winston@3.
|
|
9966
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/profiler.js"(exports, module) {
|
|
10162
9967
|
"use strict";
|
|
10163
9968
|
var Profiler = class {
|
|
10164
9969
|
/**
|
|
@@ -10198,9 +10003,9 @@ var require_profiler = __commonJS({
|
|
|
10198
10003
|
}
|
|
10199
10004
|
});
|
|
10200
10005
|
|
|
10201
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
10006
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/logger.js
|
|
10202
10007
|
var require_logger = __commonJS({
|
|
10203
|
-
"../../node_modules/.pnpm/winston@3.
|
|
10008
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/logger.js"(exports, module) {
|
|
10204
10009
|
"use strict";
|
|
10205
10010
|
var { Stream, Transform } = require_readable();
|
|
10206
10011
|
var asyncForEach = require_forEach();
|
|
@@ -10236,6 +10041,7 @@ var require_logger = __commonJS({
|
|
|
10236
10041
|
if (info instanceof Error) {
|
|
10237
10042
|
infoClone.stack = info.stack;
|
|
10238
10043
|
infoClone.message = info.message;
|
|
10044
|
+
infoClone.cause = info.cause;
|
|
10239
10045
|
}
|
|
10240
10046
|
logger.write(infoClone);
|
|
10241
10047
|
}
|
|
@@ -10305,6 +10111,23 @@ var require_logger = __commonJS({
|
|
|
10305
10111
|
this.rejections.handle(rejectionHandlers);
|
|
10306
10112
|
}
|
|
10307
10113
|
}
|
|
10114
|
+
/* eslint-disable valid-jsdoc */
|
|
10115
|
+
/**
|
|
10116
|
+
* Helper method to get the highest logging level associated with a logger
|
|
10117
|
+
*
|
|
10118
|
+
* @returns { number | null } - The highest configured logging level, null
|
|
10119
|
+
* for invalid configuration
|
|
10120
|
+
*/
|
|
10121
|
+
getHighestLogLevel() {
|
|
10122
|
+
const configuredLevelValue = getLevelValue(this.levels, this.level);
|
|
10123
|
+
if (!this.transports || this.transports.length === 0) {
|
|
10124
|
+
return configuredLevelValue;
|
|
10125
|
+
}
|
|
10126
|
+
return this.transports.reduce((max, transport) => {
|
|
10127
|
+
const levelValue = getLevelValue(this.levels, transport.level);
|
|
10128
|
+
return levelValue !== null && levelValue > max ? levelValue : max;
|
|
10129
|
+
}, configuredLevelValue);
|
|
10130
|
+
}
|
|
10308
10131
|
isLevelEnabled(level) {
|
|
10309
10132
|
const givenLevelValue = getLevelValue(this.levels, level);
|
|
10310
10133
|
if (givenLevelValue === null) {
|
|
@@ -10387,6 +10210,7 @@ var require_logger = __commonJS({
|
|
|
10387
10210
|
});
|
|
10388
10211
|
if (meta.message) info.message = `${info.message} ${meta.message}`;
|
|
10389
10212
|
if (meta.stack) info.stack = meta.stack;
|
|
10213
|
+
if (meta.cause) info.cause = meta.cause;
|
|
10390
10214
|
this.write(info);
|
|
10391
10215
|
return this;
|
|
10392
10216
|
}
|
|
@@ -10717,9 +10541,9 @@ var require_logger = __commonJS({
|
|
|
10717
10541
|
}
|
|
10718
10542
|
});
|
|
10719
10543
|
|
|
10720
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
10544
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/create-logger.js
|
|
10721
10545
|
var require_create_logger = __commonJS({
|
|
10722
|
-
"../../node_modules/.pnpm/winston@3.
|
|
10546
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/create-logger.js"(exports, module) {
|
|
10723
10547
|
"use strict";
|
|
10724
10548
|
var { LEVEL } = require_triple_beam();
|
|
10725
10549
|
var config = require_config2();
|
|
@@ -10773,9 +10597,9 @@ var require_create_logger = __commonJS({
|
|
|
10773
10597
|
}
|
|
10774
10598
|
});
|
|
10775
10599
|
|
|
10776
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
10600
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/container.js
|
|
10777
10601
|
var require_container = __commonJS({
|
|
10778
|
-
"../../node_modules/.pnpm/winston@3.
|
|
10602
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston/container.js"(exports, module) {
|
|
10779
10603
|
"use strict";
|
|
10780
10604
|
var createLogger2 = require_create_logger();
|
|
10781
10605
|
module.exports = class Container {
|
|
@@ -10869,9 +10693,9 @@ var require_container = __commonJS({
|
|
|
10869
10693
|
}
|
|
10870
10694
|
});
|
|
10871
10695
|
|
|
10872
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
10696
|
+
// ../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston.js
|
|
10873
10697
|
var require_winston = __commonJS({
|
|
10874
|
-
"../../node_modules/.pnpm/winston@3.
|
|
10698
|
+
"../../node_modules/.pnpm/winston@3.19.0/node_modules/winston/lib/winston.js"(exports) {
|
|
10875
10699
|
"use strict";
|
|
10876
10700
|
var logform = require_logform();
|
|
10877
10701
|
var { warn } = require_common();
|