mrs-toolbox-cli 0.0.1 → 0.0.11
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/88b0986a7186d029-atomicfu-js-ir.js +53 -72
- package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -1
- package/{Kotlin-DateTime-library-kotlinx-datetime-js-ir.js → Kotlin-DateTime-library-kotlinx-datetime.js} +1 -1
- package/app.properties +1 -0
- package/clikt-clikt-mordant.js +245 -0
- package/clikt-clikt-mordant.js.map +1 -0
- package/clikt-clikt.js +6653 -0
- package/clikt-clikt.js.map +1 -0
- package/colormath-root-colormath.js +1670 -0
- package/colormath-root-colormath.js.map +1 -0
- package/com.mrs.platform.configuration.dto.js +11391 -9555
- package/com.mrs.platform.configuration.dto.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +16354 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-logging-js-ir.js +88 -111
- package/kotlin-logging-js-ir.js.map +1 -1
- package/kotlin-node.js +14 -5
- package/kotlin-node.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlinx-html.js +8 -0
- package/kotlinx-html.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js +6098 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +5116 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +3931 -3753
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +293 -302
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +3108 -3459
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-events.js +21 -27
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http.js +1241 -1722
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2222 -3125
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +12 -13
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +365 -396
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +154 -150
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +749 -943
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +102 -116
- package/ktor-ktor-websockets.js.map +1 -1
- package/mordant-mordant-omnibus.js +8 -0
- package/mordant-mordant-omnibus.js.map +1 -0
- package/mordant-mordant.js +7129 -0
- package/mordant-mordant.js.map +1 -0
- package/mrs-toolbox-cli.d.ts +801 -829
- package/mrs-toolbox-cli.js +1055 -264
- package/mrs-toolbox-cli.js.map +1 -1
- package/package.json +3 -2
- package/static/demo.test.ts.txt +1 -1
- package/static/init/hooks.webpack.config.js +35 -0
- package/static/init/webpackRoot.config.js +35 -0
- package/static/mrscconfig.json +0 -1
- package/toolbox.js +14903 -12592
- package/toolbox.js.map +1 -1
- package/88b0986a7186d029-atomicfu-js-ir.js.hash +0 -1
- package/88b0986a7186d029-atomicfu-js-ir.js.map.hash +0 -1
- package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.hash +0 -1
- package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.map.hash +0 -1
- package/clikt-clikt-js-ir.js +0 -7044
- package/clikt-clikt-js-ir.js.hash +0 -1
- package/clikt-clikt-js-ir.js.map +0 -1
- package/clikt-clikt-js-ir.js.map.hash +0 -1
- package/com.mrs.platform.configuration.dto.js.hash +0 -1
- package/com.mrs.platform.configuration.dto.js.map.hash +0 -1
- package/kotlin-js.js.hash +0 -1
- package/kotlin-js.js.map.hash +0 -1
- package/kotlin-kotlin-stdlib-js-ir.js +0 -15789
- package/kotlin-kotlin-stdlib-js-ir.js.hash +0 -1
- package/kotlin-kotlin-stdlib-js-ir.js.map +0 -1
- package/kotlin-kotlin-stdlib-js-ir.js.map.hash +0 -1
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.hash +0 -1
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map.hash +0 -1
- package/kotlin-logging-js-ir.js.hash +0 -1
- package/kotlin-logging-js-ir.js.map.hash +0 -1
- package/kotlin-node.js.hash +0 -1
- package/kotlin-node.js.map.hash +0 -1
- package/kotlin-web.js.hash +0 -1
- package/kotlin-web.js.map.hash +0 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +0 -6431
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.hash +0 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map.hash +0 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +0 -5102
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.hash +0 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +0 -1
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.hash +0 -1
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map.hash +0 -1
- package/ktor-ktor-client-content-negotiation.js.hash +0 -1
- package/ktor-ktor-client-content-negotiation.js.map.hash +0 -1
- package/ktor-ktor-client-core.js.hash +0 -1
- package/ktor-ktor-client-core.js.map.hash +0 -1
- package/ktor-ktor-events.js.hash +0 -1
- package/ktor-ktor-events.js.map.hash +0 -1
- package/ktor-ktor-http.js.hash +0 -1
- package/ktor-ktor-http.js.map.hash +0 -1
- package/ktor-ktor-io.js.hash +0 -1
- package/ktor-ktor-io.js.map.hash +0 -1
- package/ktor-ktor-serialization-kotlinx-json.js.hash +0 -1
- package/ktor-ktor-serialization-kotlinx-json.js.map.hash +0 -1
- package/ktor-ktor-serialization-kotlinx.js.hash +0 -1
- package/ktor-ktor-serialization-kotlinx.js.map.hash +0 -1
- package/ktor-ktor-serialization.js.hash +0 -1
- package/ktor-ktor-serialization.js.map.hash +0 -1
- package/ktor-ktor-utils.js.hash +0 -1
- package/ktor-ktor-utils.js.map.hash +0 -1
- package/ktor-ktor-websocket-serialization.js.hash +0 -1
- package/ktor-ktor-websocket-serialization.js.map.hash +0 -1
- package/ktor-ktor-websockets.js.hash +0 -1
- package/ktor-ktor-websockets.js.map.hash +0 -1
- package/mrs-toolbox-cli.d.ts.hash +0 -1
- package/mrs-toolbox-cli.js.hash +0 -1
- package/mrs-toolbox-cli.js.map.hash +0 -1
- package/static/access.query.txt.hash +0 -1
- package/static/demo.test.ts.txt.hash +0 -1
- package/static/git.ignore.hash +0 -1
- package/static/graph.query.txt.hash +0 -1
- package/static/hook.ts.txt.hash +0 -1
- package/static/mrscconfig.json.hash +0 -1
- package/static/readme.md.hash +0 -1
- package/static/tsconfig.json.txt.hash +0 -1
- package/toolbox.js.hash +0 -1
- package/toolbox.js.map.hash +0 -1
- /package/{Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.map → Kotlin-DateTime-library-kotlinx-datetime.js.map} +0 -0
|
@@ -0,0 +1,1670 @@
|
|
|
1
|
+
(function (_, kotlin_kotlin) {
|
|
2
|
+
'use strict';
|
|
3
|
+
//region block: imports
|
|
4
|
+
var imul = Math.imul;
|
|
5
|
+
var log2 = Math.log2;
|
|
6
|
+
var protoOf = kotlin_kotlin.$_$.dc;
|
|
7
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.hb;
|
|
8
|
+
var toString = kotlin_kotlin.$_$.ic;
|
|
9
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
10
|
+
var initMetadataForClass = kotlin_kotlin.$_$.db;
|
|
11
|
+
var getStringHashCode = kotlin_kotlin.$_$.bb;
|
|
12
|
+
var THROW_CCE = kotlin_kotlin.$_$.rg;
|
|
13
|
+
var initMetadataForObject = kotlin_kotlin.$_$.jb;
|
|
14
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
|
|
15
|
+
var charSequenceLength = kotlin_kotlin.$_$.ra;
|
|
16
|
+
var charSequenceGet = kotlin_kotlin.$_$.qa;
|
|
17
|
+
var toString_0 = kotlin_kotlin.$_$.v2;
|
|
18
|
+
var Unit_instance = kotlin_kotlin.$_$.g5;
|
|
19
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o2;
|
|
20
|
+
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
21
|
+
var listOf = kotlin_kotlin.$_$.x7;
|
|
22
|
+
var withSign = kotlin_kotlin.$_$.kc;
|
|
23
|
+
var trimMargin = kotlin_kotlin.$_$.xf;
|
|
24
|
+
var hashCode = kotlin_kotlin.$_$.cb;
|
|
25
|
+
var equals = kotlin_kotlin.$_$.va;
|
|
26
|
+
var VOID = kotlin_kotlin.$_$.g;
|
|
27
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.eb;
|
|
28
|
+
var coerceAtLeast = kotlin_kotlin.$_$.mc;
|
|
29
|
+
var getNumberHashCode = kotlin_kotlin.$_$.za;
|
|
30
|
+
var numberToDouble = kotlin_kotlin.$_$.ac;
|
|
31
|
+
var roundToInt = kotlin_kotlin.$_$.jc;
|
|
32
|
+
var coerceIn = kotlin_kotlin.$_$.rc;
|
|
33
|
+
var Char = kotlin_kotlin.$_$.cg;
|
|
34
|
+
var toInt = kotlin_kotlin.$_$.nf;
|
|
35
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.yb;
|
|
36
|
+
var slice = kotlin_kotlin.$_$.xe;
|
|
37
|
+
var startsWith = kotlin_kotlin.$_$.af;
|
|
38
|
+
var isInterface = kotlin_kotlin.$_$.sb;
|
|
39
|
+
var contentEquals = kotlin_kotlin.$_$.g6;
|
|
40
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.oc;
|
|
41
|
+
var objectCreate = kotlin_kotlin.$_$.cc;
|
|
42
|
+
//endregion
|
|
43
|
+
//region block: pre-declaration
|
|
44
|
+
function toXYZ() {
|
|
45
|
+
return this.p79().q79();
|
|
46
|
+
}
|
|
47
|
+
initMetadataForInterface(Color, 'Color');
|
|
48
|
+
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
49
|
+
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
50
|
+
initMetadataForObject(Illuminant, 'Illuminant');
|
|
51
|
+
initMetadataForClass(Matrix, 'Matrix');
|
|
52
|
+
initMetadataForClass(Vector, 'Vector');
|
|
53
|
+
initMetadataForCompanion(Companion);
|
|
54
|
+
initMetadataForClass(Ansi16, 'Ansi16', VOID, VOID, [Color]);
|
|
55
|
+
initMetadataForCompanion(Companion_0);
|
|
56
|
+
initMetadataForClass(Ansi256, 'Ansi256', VOID, VOID, [Color]);
|
|
57
|
+
initMetadataForCompanion(Companion_1);
|
|
58
|
+
initMetadataForClass(HSV, 'HSV', VOID, VOID, [Color]);
|
|
59
|
+
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
60
|
+
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
61
|
+
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
62
|
+
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
63
|
+
function invoke$default(r, g, b, alpha, $super) {
|
|
64
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
65
|
+
return $super === VOID ? this.b7b(r, g, b, alpha) : $super.b7b.call(this, r, g, b, alpha);
|
|
66
|
+
}
|
|
67
|
+
function invoke(r, g, b, alpha) {
|
|
68
|
+
return this.b7b(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
69
|
+
}
|
|
70
|
+
function invoke$default_0(r, g, b, alpha, $super) {
|
|
71
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
72
|
+
return $super === VOID ? this.g7c(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
73
|
+
}
|
|
74
|
+
function from255(r, g, b, alpha) {
|
|
75
|
+
return this.b7b(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
76
|
+
}
|
|
77
|
+
function from255$default(r, g, b, alpha, $super) {
|
|
78
|
+
alpha = alpha === VOID ? 255 : alpha;
|
|
79
|
+
return $super === VOID ? this.h7c(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
80
|
+
}
|
|
81
|
+
function invoke_0(hex) {
|
|
82
|
+
var tmp = parseHex(validateHex(hex), 0);
|
|
83
|
+
var tmp_0 = parseHex(hex, 1);
|
|
84
|
+
var tmp_1 = parseHex(hex, 2);
|
|
85
|
+
var tmp_2;
|
|
86
|
+
// Inline function 'kotlin.let' call
|
|
87
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
88
|
+
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
89
|
+
var it = get_hexLength(hex);
|
|
90
|
+
if (it === 4 || it === 8) {
|
|
91
|
+
tmp_2 = parseHex(hex, 3);
|
|
92
|
+
} else {
|
|
93
|
+
tmp_2 = 255;
|
|
94
|
+
}
|
|
95
|
+
return this.h7c(tmp, tmp_0, tmp_1, tmp_2);
|
|
96
|
+
}
|
|
97
|
+
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace');
|
|
98
|
+
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
99
|
+
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
100
|
+
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
101
|
+
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
102
|
+
initMetadataForClass(RGBColorSpaceImpl, 'RGBColorSpaceImpl', VOID, VOID, [RGBColorSpace]);
|
|
103
|
+
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
104
|
+
initMetadataForObject(ACESccTransferFunctions, 'ACESccTransferFunctions');
|
|
105
|
+
initMetadataForObject(ACEScctTransferFunctions, 'ACEScctTransferFunctions');
|
|
106
|
+
initMetadataForObject(BT2020TransferFunctions, 'BT2020TransferFunctions');
|
|
107
|
+
initMetadataForObject(BT709TransferFunctions, 'BT709TransferFunctions');
|
|
108
|
+
initMetadataForObject(ROMMTransferFunctions, 'ROMMTransferFunctions');
|
|
109
|
+
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace');
|
|
110
|
+
initMetadataForCompanion(Companion_3, VOID, [XYZColorSpace]);
|
|
111
|
+
initMetadataForClass(XYZ, 'XYZ', VOID, VOID, [Color]);
|
|
112
|
+
initMetadataForObject(XYZColorSpaces, 'XYZColorSpaces');
|
|
113
|
+
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl', VOID, VOID, [XYZColorSpace]);
|
|
114
|
+
initMetadataForClass(xyY, 'xyY');
|
|
115
|
+
//endregion
|
|
116
|
+
function Color() {
|
|
117
|
+
}
|
|
118
|
+
function ColorComponentInfo(name, isPolar, min, max) {
|
|
119
|
+
this.w79_1 = name;
|
|
120
|
+
this.x79_1 = isPolar;
|
|
121
|
+
this.y79_1 = min;
|
|
122
|
+
this.z79_1 = max;
|
|
123
|
+
// Inline function 'kotlin.require' call
|
|
124
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
125
|
+
if (!(this.y79_1 <= this.z79_1)) {
|
|
126
|
+
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
127
|
+
var message = 'min must be less than or equal to max';
|
|
128
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function WhitePoint(name, chromaticity) {
|
|
132
|
+
this.a7a_1 = name;
|
|
133
|
+
this.b7a_1 = chromaticity;
|
|
134
|
+
}
|
|
135
|
+
protoOf(WhitePoint).toString = function () {
|
|
136
|
+
return this.a7a_1;
|
|
137
|
+
};
|
|
138
|
+
protoOf(WhitePoint).hashCode = function () {
|
|
139
|
+
var result = getStringHashCode(this.a7a_1);
|
|
140
|
+
result = imul(result, 31) + this.b7a_1.hashCode() | 0;
|
|
141
|
+
return result;
|
|
142
|
+
};
|
|
143
|
+
protoOf(WhitePoint).equals = function (other) {
|
|
144
|
+
if (this === other)
|
|
145
|
+
return true;
|
|
146
|
+
if (!(other instanceof WhitePoint))
|
|
147
|
+
return false;
|
|
148
|
+
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
149
|
+
if (!(this.a7a_1 === tmp0_other_with_cast.a7a_1))
|
|
150
|
+
return false;
|
|
151
|
+
if (!this.b7a_1.equals(tmp0_other_with_cast.b7a_1))
|
|
152
|
+
return false;
|
|
153
|
+
return true;
|
|
154
|
+
};
|
|
155
|
+
function Illuminant() {
|
|
156
|
+
Illuminant_instance = this;
|
|
157
|
+
this.c7a_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
158
|
+
this.d7a_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
159
|
+
this.e7a_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
160
|
+
this.f7a_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
161
|
+
this.g7a_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
162
|
+
this.h7a_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
163
|
+
this.i7a_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
164
|
+
this.j7a_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
165
|
+
}
|
|
166
|
+
var Illuminant_instance;
|
|
167
|
+
function Illuminant_getInstance() {
|
|
168
|
+
if (Illuminant_instance == null)
|
|
169
|
+
new Illuminant();
|
|
170
|
+
return Illuminant_instance;
|
|
171
|
+
}
|
|
172
|
+
function get_alphaInfo() {
|
|
173
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
174
|
+
return alphaInfo;
|
|
175
|
+
}
|
|
176
|
+
var alphaInfo;
|
|
177
|
+
function zeroOneComponentInfo(name) {
|
|
178
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
179
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
180
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
181
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
182
|
+
// Inline function 'kotlin.apply' call
|
|
183
|
+
var this_0 = ArrayList_init_$Create$();
|
|
184
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
185
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>' call
|
|
186
|
+
// Inline function 'kotlin.text.mapTo' call
|
|
187
|
+
var inductionVariable = 0;
|
|
188
|
+
while (inductionVariable < charSequenceLength(name)) {
|
|
189
|
+
var item = charSequenceGet(name, inductionVariable);
|
|
190
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
191
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
192
|
+
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
193
|
+
this_0.e(tmp$ret$0);
|
|
194
|
+
}
|
|
195
|
+
this_0.e(get_alphaInfo());
|
|
196
|
+
return this_0.v5();
|
|
197
|
+
}
|
|
198
|
+
function polarComponentInfo(name, l, r) {
|
|
199
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
200
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
201
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
202
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
203
|
+
// Inline function 'kotlin.apply' call
|
|
204
|
+
var this_0 = ArrayList_init_$Create$();
|
|
205
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
206
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
207
|
+
// Inline function 'kotlin.text.mapTo' call
|
|
208
|
+
var inductionVariable = 0;
|
|
209
|
+
while (inductionVariable < charSequenceLength(name)) {
|
|
210
|
+
var item = charSequenceGet(name, inductionVariable);
|
|
211
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
212
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
213
|
+
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), item === _Char___init__impl__6a9atx(72), item === _Char___init__impl__6a9atx(72) ? 0.0 : l, item === _Char___init__impl__6a9atx(72) ? 360.0 : r);
|
|
214
|
+
this_0.e(tmp$ret$0);
|
|
215
|
+
}
|
|
216
|
+
this_0.e(get_alphaInfo());
|
|
217
|
+
return this_0.v5();
|
|
218
|
+
}
|
|
219
|
+
function componentInfoList(c) {
|
|
220
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
221
|
+
return listOf(arrayConcat([c, [get_alphaInfo()]]));
|
|
222
|
+
}
|
|
223
|
+
var properties_initialized_ColorSpaceUtils_kt_kskdoe;
|
|
224
|
+
function _init_properties_ColorSpaceUtils_kt__cnwylg() {
|
|
225
|
+
if (!properties_initialized_ColorSpaceUtils_kt_kskdoe) {
|
|
226
|
+
properties_initialized_ColorSpaceUtils_kt_kskdoe = true;
|
|
227
|
+
alphaInfo = new ColorComponentInfo('alpha', false, 0.0, 1.0);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function get_CAT02_XYZ_TO_LMS() {
|
|
231
|
+
_init_properties_Constants_kt__atb1ur();
|
|
232
|
+
return CAT02_XYZ_TO_LMS;
|
|
233
|
+
}
|
|
234
|
+
var CAT02_XYZ_TO_LMS;
|
|
235
|
+
function get_CAT02_LMS_TO_XYZ() {
|
|
236
|
+
_init_properties_Constants_kt__atb1ur();
|
|
237
|
+
return CAT02_LMS_TO_XYZ;
|
|
238
|
+
}
|
|
239
|
+
var CAT02_LMS_TO_XYZ;
|
|
240
|
+
var properties_initialized_Constants_kt_w4w61t;
|
|
241
|
+
function _init_properties_Constants_kt__atb1ur() {
|
|
242
|
+
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
243
|
+
properties_initialized_Constants_kt_w4w61t = true;
|
|
244
|
+
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(+0.7328, +0.4296, -0.1624, -0.7036, +1.6975, +0.0061, +0.003, +0.0136, +0.9834);
|
|
245
|
+
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function spow(_this__u8e3s4, p) {
|
|
249
|
+
return spow_0(_this__u8e3s4, p);
|
|
250
|
+
}
|
|
251
|
+
function normalizeDeg(_this__u8e3s4) {
|
|
252
|
+
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
253
|
+
}
|
|
254
|
+
function spow_0(_this__u8e3s4, p) {
|
|
255
|
+
// Inline function 'kotlin.math.pow' call
|
|
256
|
+
// Inline function 'kotlin.math.absoluteValue' call
|
|
257
|
+
var this_0 = Math.abs(_this__u8e3s4);
|
|
258
|
+
var tmp$ret$1 = Math.pow(this_0, p);
|
|
259
|
+
return withSign(tmp$ret$1, _this__u8e3s4);
|
|
260
|
+
}
|
|
261
|
+
function normalizeDeg_0(_this__u8e3s4) {
|
|
262
|
+
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
263
|
+
}
|
|
264
|
+
function _Matrix___init__impl__q3kp4w(rowMajor) {
|
|
265
|
+
return rowMajor;
|
|
266
|
+
}
|
|
267
|
+
function _Matrix___get_rowMajor__impl__vmgxkq($this) {
|
|
268
|
+
return $this;
|
|
269
|
+
}
|
|
270
|
+
function _Matrix___init__impl__q3kp4w_0(v00, v10, v20, v01, v11, v21, v02, v12, v22) {
|
|
271
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
272
|
+
var tmp$ret$0 = new Float32Array([v00, v10, v20, v01, v11, v21, v02, v12, v22]);
|
|
273
|
+
return _Matrix___init__impl__q3kp4w(tmp$ret$0);
|
|
274
|
+
}
|
|
275
|
+
function Matrix__copy_impl_kmkvzd($this) {
|
|
276
|
+
// Inline function 'kotlin.collections.copyOf' call
|
|
277
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
278
|
+
var tmp$ret$1 = _Matrix___get_rowMajor__impl__vmgxkq($this).slice();
|
|
279
|
+
return _Matrix___init__impl__q3kp4w(tmp$ret$1);
|
|
280
|
+
}
|
|
281
|
+
function Matrix__get_impl_xogbpk($this, x, y) {
|
|
282
|
+
return _Matrix___get_rowMajor__impl__vmgxkq($this)[imul(y, 3) + x | 0];
|
|
283
|
+
}
|
|
284
|
+
function Matrix__set_impl_s2l54c($this, x, y, value) {
|
|
285
|
+
_Matrix___get_rowMajor__impl__vmgxkq($this)[imul(y, 3) + x | 0] = value;
|
|
286
|
+
}
|
|
287
|
+
function Matrix__set_impl_s2l54c_0($this, x, y, value) {
|
|
288
|
+
return Matrix__set_impl_s2l54c($this, x, y, value);
|
|
289
|
+
}
|
|
290
|
+
function Matrix__toString_impl_l0abk0($this) {
|
|
291
|
+
return trimMargin('Mat3(\n | ' + Matrix__get_impl_xogbpk($this, 0, 0) + ', ' + Matrix__get_impl_xogbpk($this, 1, 0) + ', ' + Matrix__get_impl_xogbpk($this, 2, 0) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 1) + ', ' + Matrix__get_impl_xogbpk($this, 1, 1) + ', ' + Matrix__get_impl_xogbpk($this, 2, 1) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 2) + ', ' + Matrix__get_impl_xogbpk($this, 1, 2) + ', ' + Matrix__get_impl_xogbpk($this, 2, 2) + ', \n |)\n ');
|
|
292
|
+
}
|
|
293
|
+
function Matrix__hashCode_impl_s9ntm9($this) {
|
|
294
|
+
return hashCode($this);
|
|
295
|
+
}
|
|
296
|
+
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
297
|
+
if (!(other instanceof Matrix))
|
|
298
|
+
return false;
|
|
299
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.k7a_1 : THROW_CCE();
|
|
300
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
301
|
+
return false;
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
function Matrix(rowMajor) {
|
|
305
|
+
this.k7a_1 = rowMajor;
|
|
306
|
+
}
|
|
307
|
+
protoOf(Matrix).toString = function () {
|
|
308
|
+
return Matrix__toString_impl_l0abk0(this.k7a_1);
|
|
309
|
+
};
|
|
310
|
+
protoOf(Matrix).hashCode = function () {
|
|
311
|
+
return Matrix__hashCode_impl_s9ntm9(this.k7a_1);
|
|
312
|
+
};
|
|
313
|
+
protoOf(Matrix).equals = function (other) {
|
|
314
|
+
return Matrix__equals_impl_g5p8p9(this.k7a_1, other);
|
|
315
|
+
};
|
|
316
|
+
function inverse(_this__u8e3s4, inPlace) {
|
|
317
|
+
inPlace = inPlace === VOID ? false : inPlace;
|
|
318
|
+
var a = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0);
|
|
319
|
+
var b = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0);
|
|
320
|
+
var c = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0);
|
|
321
|
+
var d = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1);
|
|
322
|
+
var e = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1);
|
|
323
|
+
var f = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1);
|
|
324
|
+
var g = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2);
|
|
325
|
+
var h = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2);
|
|
326
|
+
var i = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2);
|
|
327
|
+
var A = e * i - h * f;
|
|
328
|
+
var B = h * c - b * i;
|
|
329
|
+
var C = b * f - e * c;
|
|
330
|
+
var det = a * A + d * B + g * C;
|
|
331
|
+
var out = inPlace ? _this__u8e3s4 : Matrix__copy_impl_kmkvzd(_this__u8e3s4);
|
|
332
|
+
Matrix__set_impl_s2l54c_0(out, 0, 0, A / det);
|
|
333
|
+
Matrix__set_impl_s2l54c_0(out, 0, 1, (g * f - d * i) / det);
|
|
334
|
+
Matrix__set_impl_s2l54c_0(out, 0, 2, (d * h - g * e) / det);
|
|
335
|
+
Matrix__set_impl_s2l54c_0(out, 1, 0, B / det);
|
|
336
|
+
Matrix__set_impl_s2l54c_0(out, 1, 1, (a * i - g * c) / det);
|
|
337
|
+
Matrix__set_impl_s2l54c_0(out, 1, 2, (g * b - a * h) / det);
|
|
338
|
+
Matrix__set_impl_s2l54c_0(out, 2, 0, C / det);
|
|
339
|
+
Matrix__set_impl_s2l54c_0(out, 2, 1, (d * c - a * f) / det);
|
|
340
|
+
Matrix__set_impl_s2l54c_0(out, 2, 2, (a * e - d * b) / det);
|
|
341
|
+
return out;
|
|
342
|
+
}
|
|
343
|
+
function scalarDiv(_this__u8e3s4, x, inPlace) {
|
|
344
|
+
inPlace = inPlace === VOID ? false : inPlace;
|
|
345
|
+
var out = _Matrix___get_rowMajor__impl__vmgxkq(inPlace ? _this__u8e3s4 : Matrix__copy_impl_kmkvzd(_this__u8e3s4));
|
|
346
|
+
var inductionVariable = 0;
|
|
347
|
+
var last = out.length - 1 | 0;
|
|
348
|
+
if (inductionVariable <= last)
|
|
349
|
+
do {
|
|
350
|
+
var i = inductionVariable;
|
|
351
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
352
|
+
out[i] = out[i] / x;
|
|
353
|
+
}
|
|
354
|
+
while (inductionVariable <= last);
|
|
355
|
+
return _Matrix___init__impl__q3kp4w(out);
|
|
356
|
+
}
|
|
357
|
+
function dot(_this__u8e3s4, other) {
|
|
358
|
+
return _Matrix___init__impl__q3kp4w_0(dot$f(_this__u8e3s4, other, 0, 0), dot$f(_this__u8e3s4, other, 1, 0), dot$f(_this__u8e3s4, other, 2, 0), dot$f(_this__u8e3s4, other, 0, 1), dot$f(_this__u8e3s4, other, 1, 1), dot$f(_this__u8e3s4, other, 2, 1), dot$f(_this__u8e3s4, other, 0, 2), dot$f(_this__u8e3s4, other, 1, 2), dot$f(_this__u8e3s4, other, 2, 2));
|
|
359
|
+
}
|
|
360
|
+
function dotDiagonal(_this__u8e3s4, v0, v1, v2) {
|
|
361
|
+
return _Matrix___init__impl__q3kp4w_0(Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0, Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1, Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0, Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1, Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0, Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1, Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2);
|
|
362
|
+
}
|
|
363
|
+
function _Vector___init__impl__y7x4qq(values) {
|
|
364
|
+
return values;
|
|
365
|
+
}
|
|
366
|
+
function _Vector___get_values__impl__3gdbp5($this) {
|
|
367
|
+
return $this;
|
|
368
|
+
}
|
|
369
|
+
function _Vector___init__impl__y7x4qq_0(v0, v1, v2) {
|
|
370
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
371
|
+
var tmp$ret$0 = new Float32Array([v0, v1, v2]);
|
|
372
|
+
return _Vector___init__impl__y7x4qq(tmp$ret$0);
|
|
373
|
+
}
|
|
374
|
+
function _Vector___get_l__impl__envr1l($this) {
|
|
375
|
+
return _Vector___get_values__impl__3gdbp5($this)[0];
|
|
376
|
+
}
|
|
377
|
+
function _Vector___get_m__impl__e5qq0m($this) {
|
|
378
|
+
return _Vector___get_values__impl__3gdbp5($this)[1];
|
|
379
|
+
}
|
|
380
|
+
function _Vector___get_s__impl__pzuljk($this) {
|
|
381
|
+
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
382
|
+
}
|
|
383
|
+
function Vector__toString_impl_hn2ybi($this) {
|
|
384
|
+
return 'Vector(values=' + toString($this) + ')';
|
|
385
|
+
}
|
|
386
|
+
function Vector__hashCode_impl_442yhd($this) {
|
|
387
|
+
return hashCode($this);
|
|
388
|
+
}
|
|
389
|
+
function Vector__equals_impl_hy6igl($this, other) {
|
|
390
|
+
if (!(other instanceof Vector))
|
|
391
|
+
return false;
|
|
392
|
+
var tmp0_other_with_cast = other instanceof Vector ? other.l7a_1 : THROW_CCE();
|
|
393
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
394
|
+
return false;
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
function Vector(values) {
|
|
398
|
+
this.l7a_1 = values;
|
|
399
|
+
}
|
|
400
|
+
protoOf(Vector).toString = function () {
|
|
401
|
+
return Vector__toString_impl_hn2ybi(this.l7a_1);
|
|
402
|
+
};
|
|
403
|
+
protoOf(Vector).hashCode = function () {
|
|
404
|
+
return Vector__hashCode_impl_442yhd(this.l7a_1);
|
|
405
|
+
};
|
|
406
|
+
protoOf(Vector).equals = function (other) {
|
|
407
|
+
return Vector__equals_impl_hy6igl(this.l7a_1, other);
|
|
408
|
+
};
|
|
409
|
+
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
410
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
411
|
+
return _Vector___init__impl__y7x4qq_0(Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2);
|
|
412
|
+
}
|
|
413
|
+
function dot$f($this_dot, $other, x, y) {
|
|
414
|
+
return Matrix__get_impl_xogbpk($this_dot, 0, y) * Matrix__get_impl_xogbpk($other, x, 0) + Matrix__get_impl_xogbpk($this_dot, 1, y) * Matrix__get_impl_xogbpk($other, x, 1) + Matrix__get_impl_xogbpk($this_dot, 2, y) * Matrix__get_impl_xogbpk($other, x, 2);
|
|
415
|
+
}
|
|
416
|
+
function Companion() {
|
|
417
|
+
Companion_instance = this;
|
|
418
|
+
this.m7a_1 = componentInfoList([new ColorComponentInfo('code', false, 30.0, 107.0)]);
|
|
419
|
+
}
|
|
420
|
+
protoOf(Companion).n7a = function () {
|
|
421
|
+
return this.m7a_1;
|
|
422
|
+
};
|
|
423
|
+
var Companion_instance;
|
|
424
|
+
function Companion_getInstance() {
|
|
425
|
+
if (Companion_instance == null)
|
|
426
|
+
new Companion();
|
|
427
|
+
return Companion_instance;
|
|
428
|
+
}
|
|
429
|
+
function Ansi16(code) {
|
|
430
|
+
Companion_getInstance();
|
|
431
|
+
this.o7a_1 = code;
|
|
432
|
+
}
|
|
433
|
+
protoOf(Ansi16).o79 = function () {
|
|
434
|
+
return Companion_getInstance();
|
|
435
|
+
};
|
|
436
|
+
protoOf(Ansi16).p79 = function () {
|
|
437
|
+
switch (this.o7a_1) {
|
|
438
|
+
case 30:
|
|
439
|
+
case 40:
|
|
440
|
+
return Companion_getInstance_2().p7a(0.0, 0.0, 0.0);
|
|
441
|
+
case 90:
|
|
442
|
+
case 100:
|
|
443
|
+
return Companion_getInstance_2().q7a(128, 128, 128);
|
|
444
|
+
case 37:
|
|
445
|
+
case 47:
|
|
446
|
+
return Companion_getInstance_2().q7a(192, 192, 192);
|
|
447
|
+
case 97:
|
|
448
|
+
case 107:
|
|
449
|
+
return Companion_getInstance_2().p7a(1.0, 1.0, 1.0);
|
|
450
|
+
}
|
|
451
|
+
var color = this.o7a_1 % 10 | 0;
|
|
452
|
+
var mul = this.o7a_1 > 50 ? 1.0 : 0.5;
|
|
453
|
+
var r = (color % 2 | 0) * mul;
|
|
454
|
+
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
455
|
+
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
456
|
+
return Companion_getInstance_2().p7a(r, g, b);
|
|
457
|
+
};
|
|
458
|
+
protoOf(Ansi16).toString = function () {
|
|
459
|
+
return 'Ansi16(code=' + this.o7a_1 + ')';
|
|
460
|
+
};
|
|
461
|
+
protoOf(Ansi16).hashCode = function () {
|
|
462
|
+
return this.o7a_1;
|
|
463
|
+
};
|
|
464
|
+
protoOf(Ansi16).equals = function (other) {
|
|
465
|
+
if (this === other)
|
|
466
|
+
return true;
|
|
467
|
+
if (!(other instanceof Ansi16))
|
|
468
|
+
return false;
|
|
469
|
+
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
470
|
+
if (!(this.o7a_1 === tmp0_other_with_cast.o7a_1))
|
|
471
|
+
return false;
|
|
472
|
+
return true;
|
|
473
|
+
};
|
|
474
|
+
function Companion_0() {
|
|
475
|
+
Companion_instance_0 = this;
|
|
476
|
+
this.r7a_1 = componentInfoList([new ColorComponentInfo('code', false, 0.0, 255.0)]);
|
|
477
|
+
}
|
|
478
|
+
protoOf(Companion_0).n7a = function () {
|
|
479
|
+
return this.r7a_1;
|
|
480
|
+
};
|
|
481
|
+
var Companion_instance_0;
|
|
482
|
+
function Companion_getInstance_0() {
|
|
483
|
+
if (Companion_instance_0 == null)
|
|
484
|
+
new Companion_0();
|
|
485
|
+
return Companion_instance_0;
|
|
486
|
+
}
|
|
487
|
+
function Ansi256(code) {
|
|
488
|
+
Companion_getInstance_0();
|
|
489
|
+
this.s7a_1 = code;
|
|
490
|
+
}
|
|
491
|
+
protoOf(Ansi256).o79 = function () {
|
|
492
|
+
return Companion_getInstance_0();
|
|
493
|
+
};
|
|
494
|
+
protoOf(Ansi256).p79 = function () {
|
|
495
|
+
if (this.s7a_1 < 16)
|
|
496
|
+
return this.t7a().p79();
|
|
497
|
+
if (this.s7a_1 >= 232) {
|
|
498
|
+
var c = imul(this.s7a_1 - 232 | 0, 10) + 8 | 0;
|
|
499
|
+
return Companion_getInstance_2().q7a(c, c, c);
|
|
500
|
+
}
|
|
501
|
+
var c_0 = this.s7a_1 - 16 | 0;
|
|
502
|
+
var rem = c_0 % 36 | 0;
|
|
503
|
+
// Inline function 'kotlin.math.floor' call
|
|
504
|
+
var x = c_0 / 36.0;
|
|
505
|
+
var r = Math.floor(x) / 5.0;
|
|
506
|
+
// Inline function 'kotlin.math.floor' call
|
|
507
|
+
var x_0 = rem / 6.0;
|
|
508
|
+
var g = Math.floor(x_0) / 5.0;
|
|
509
|
+
var b = (rem % 6 | 0) / 5.0;
|
|
510
|
+
return Companion_getInstance_2().u7a(r, g, b);
|
|
511
|
+
};
|
|
512
|
+
protoOf(Ansi256).t7a = function () {
|
|
513
|
+
return this.s7a_1 < 8 ? new Ansi16(this.s7a_1 + 30 | 0) : this.s7a_1 < 16 ? new Ansi16((this.s7a_1 - 8 | 0) + 90 | 0) : this.p79().t7a();
|
|
514
|
+
};
|
|
515
|
+
protoOf(Ansi256).toString = function () {
|
|
516
|
+
return 'Ansi256(code=' + this.s7a_1 + ')';
|
|
517
|
+
};
|
|
518
|
+
protoOf(Ansi256).hashCode = function () {
|
|
519
|
+
return this.s7a_1;
|
|
520
|
+
};
|
|
521
|
+
protoOf(Ansi256).equals = function (other) {
|
|
522
|
+
if (this === other)
|
|
523
|
+
return true;
|
|
524
|
+
if (!(other instanceof Ansi256))
|
|
525
|
+
return false;
|
|
526
|
+
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
527
|
+
if (!(this.s7a_1 === tmp0_other_with_cast.s7a_1))
|
|
528
|
+
return false;
|
|
529
|
+
return true;
|
|
530
|
+
};
|
|
531
|
+
function Companion_1() {
|
|
532
|
+
Companion_instance_1 = this;
|
|
533
|
+
this.v7a_1 = polarComponentInfo('HSV', 0.0, 1.0);
|
|
534
|
+
}
|
|
535
|
+
protoOf(Companion_1).n7a = function () {
|
|
536
|
+
return this.v7a_1;
|
|
537
|
+
};
|
|
538
|
+
var Companion_instance_1;
|
|
539
|
+
function Companion_getInstance_1() {
|
|
540
|
+
if (Companion_instance_1 == null)
|
|
541
|
+
new Companion_1();
|
|
542
|
+
return Companion_instance_1;
|
|
543
|
+
}
|
|
544
|
+
function toSRGB$f(h, v, s, n) {
|
|
545
|
+
var k = (n + h) % 6;
|
|
546
|
+
var tmp = v * s;
|
|
547
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
548
|
+
var b = 4 - k;
|
|
549
|
+
var tmp$ret$0 = Math.min(k, b, 1.0);
|
|
550
|
+
return v - tmp * coerceAtLeast(tmp$ret$0, 0.0);
|
|
551
|
+
}
|
|
552
|
+
function HSV(h, s, v, alpha) {
|
|
553
|
+
Companion_getInstance_1();
|
|
554
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
555
|
+
this.w7a_1 = h;
|
|
556
|
+
this.x7a_1 = s;
|
|
557
|
+
this.y7a_1 = v;
|
|
558
|
+
this.z7a_1 = alpha;
|
|
559
|
+
}
|
|
560
|
+
protoOf(HSV).o79 = function () {
|
|
561
|
+
return Companion_getInstance_1();
|
|
562
|
+
};
|
|
563
|
+
protoOf(HSV).p79 = function () {
|
|
564
|
+
if (this.x7a_1 < 1.0E-7)
|
|
565
|
+
return Companion_getInstance_2().b7b(this.y7a_1, this.y7a_1, this.y7a_1, this.z7a_1);
|
|
566
|
+
var v = this.y7a_1;
|
|
567
|
+
var h = normalizeDeg_0(this.w7a_1) / 60.0;
|
|
568
|
+
var s = this.x7a_1;
|
|
569
|
+
return SRGB_getInstance().b7b(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.z7a_1);
|
|
570
|
+
};
|
|
571
|
+
protoOf(HSV).toString = function () {
|
|
572
|
+
return 'HSV(h=' + this.w7a_1 + ', s=' + this.x7a_1 + ', v=' + this.y7a_1 + ', alpha=' + this.z7a_1 + ')';
|
|
573
|
+
};
|
|
574
|
+
protoOf(HSV).hashCode = function () {
|
|
575
|
+
var result = getNumberHashCode(this.w7a_1);
|
|
576
|
+
result = imul(result, 31) + getNumberHashCode(this.x7a_1) | 0;
|
|
577
|
+
result = imul(result, 31) + getNumberHashCode(this.y7a_1) | 0;
|
|
578
|
+
result = imul(result, 31) + getNumberHashCode(this.z7a_1) | 0;
|
|
579
|
+
return result;
|
|
580
|
+
};
|
|
581
|
+
protoOf(HSV).equals = function (other) {
|
|
582
|
+
if (this === other)
|
|
583
|
+
return true;
|
|
584
|
+
if (!(other instanceof HSV))
|
|
585
|
+
return false;
|
|
586
|
+
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
587
|
+
if (!equals(this.w7a_1, tmp0_other_with_cast.w7a_1))
|
|
588
|
+
return false;
|
|
589
|
+
if (!equals(this.x7a_1, tmp0_other_with_cast.x7a_1))
|
|
590
|
+
return false;
|
|
591
|
+
if (!equals(this.y7a_1, tmp0_other_with_cast.y7a_1))
|
|
592
|
+
return false;
|
|
593
|
+
if (!equals(this.z7a_1, tmp0_other_with_cast.z7a_1))
|
|
594
|
+
return false;
|
|
595
|
+
return true;
|
|
596
|
+
};
|
|
597
|
+
function get_ICTCP_RGB_TO_LMS() {
|
|
598
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
599
|
+
return ICTCP_RGB_TO_LMS;
|
|
600
|
+
}
|
|
601
|
+
var ICTCP_RGB_TO_LMS;
|
|
602
|
+
function get_ICTCP_LMS_TO_ICTCP() {
|
|
603
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
604
|
+
return ICTCP_LMS_TO_ICTCP;
|
|
605
|
+
}
|
|
606
|
+
var ICTCP_LMS_TO_ICTCP;
|
|
607
|
+
function get_ICTCP_LMS_to_RGB() {
|
|
608
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
609
|
+
return ICTCP_LMS_to_RGB;
|
|
610
|
+
}
|
|
611
|
+
var ICTCP_LMS_to_RGB;
|
|
612
|
+
function get_ICTCP_ICTCP_to_LMS() {
|
|
613
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
614
|
+
return ICTCP_ICTCP_to_LMS;
|
|
615
|
+
}
|
|
616
|
+
var ICTCP_ICTCP_to_LMS;
|
|
617
|
+
function get_ICTCP_CROSSTALK() {
|
|
618
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
619
|
+
return ICTCP_CROSSTALK;
|
|
620
|
+
}
|
|
621
|
+
var ICTCP_CROSSTALK;
|
|
622
|
+
function get_HPE_XYZ_TO_LMS() {
|
|
623
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
624
|
+
return HPE_XYZ_TO_LMS;
|
|
625
|
+
}
|
|
626
|
+
var HPE_XYZ_TO_LMS;
|
|
627
|
+
function get_ICTCP_XYZ_TO_LMS() {
|
|
628
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
629
|
+
return ICTCP_XYZ_TO_LMS;
|
|
630
|
+
}
|
|
631
|
+
var ICTCP_XYZ_TO_LMS;
|
|
632
|
+
var ICTCP_LMS_TO_XYZ;
|
|
633
|
+
function ICtCp() {
|
|
634
|
+
}
|
|
635
|
+
protoOf(ICtCp).h7b = function () {
|
|
636
|
+
var fo = RGBColorSpaces_getInstance().p7b_1.u7b();
|
|
637
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
638
|
+
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
639
|
+
var v0 = this.d7b_1;
|
|
640
|
+
var v1 = this.e7b_1;
|
|
641
|
+
var v2 = this.f7b_1;
|
|
642
|
+
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
643
|
+
var l = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
644
|
+
var m = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
645
|
+
var s = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
646
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
647
|
+
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
648
|
+
var v0_0 = PqNonlinearity_instance.d7c(l);
|
|
649
|
+
var v1_0 = PqNonlinearity_instance.d7c(m);
|
|
650
|
+
var v2_0 = PqNonlinearity_instance.d7c(s);
|
|
651
|
+
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
652
|
+
var r = Matrix__get_impl_xogbpk(this_1, 0, 0) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 0) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 0) * v2_0;
|
|
653
|
+
var g = Matrix__get_impl_xogbpk(this_1, 0, 1) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 1) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 1) * v2_0;
|
|
654
|
+
var b = Matrix__get_impl_xogbpk(this_1, 0, 2) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 2) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 2) * v2_0;
|
|
655
|
+
return RGBColorSpaces_getInstance().p7b_1.b7b(fo.e7c(r), fo.e7c(g), fo.e7c(b), this.g7b_1);
|
|
656
|
+
};
|
|
657
|
+
function PqNonlinearity() {
|
|
658
|
+
this.v7b_1 = 0.1593017578125;
|
|
659
|
+
this.w7b_1 = 78.84375;
|
|
660
|
+
this.x7b_1 = 0.8359375;
|
|
661
|
+
this.y7b_1 = 18.8515625;
|
|
662
|
+
this.z7b_1 = 18.6875;
|
|
663
|
+
this.a7c_1 = 10000.0;
|
|
664
|
+
this.b7c_1 = 6.277394636015326;
|
|
665
|
+
this.c7c_1 = 0.012683313515655966;
|
|
666
|
+
}
|
|
667
|
+
protoOf(PqNonlinearity).d7c = function (x) {
|
|
668
|
+
var vp = spow(x, 0.012683313515655966);
|
|
669
|
+
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
670
|
+
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
671
|
+
return 10000.0 * l;
|
|
672
|
+
};
|
|
673
|
+
protoOf(PqNonlinearity).e7c = function (x) {
|
|
674
|
+
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
675
|
+
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
676
|
+
};
|
|
677
|
+
var PqNonlinearity_instance;
|
|
678
|
+
function PqNonlinearity_getInstance() {
|
|
679
|
+
return PqNonlinearity_instance;
|
|
680
|
+
}
|
|
681
|
+
var properties_initialized_ICtCp_kt_w6y8uv;
|
|
682
|
+
function _init_properties_ICtCp_kt__7vx7or() {
|
|
683
|
+
if (!properties_initialized_ICtCp_kt_w6y8uv) {
|
|
684
|
+
properties_initialized_ICtCp_kt_w6y8uv = true;
|
|
685
|
+
ICTCP_RGB_TO_LMS = scalarDiv(_Matrix___init__impl__q3kp4w_0(1688.0, 2146.0, 262.0, 683.0, 2951.0, 462.0, 99.0, 309.0, 3688.0), 4096.0, true);
|
|
686
|
+
ICTCP_LMS_TO_ICTCP = scalarDiv(_Matrix___init__impl__q3kp4w_0(2048.0, 2048.0, 0.0, 6610.0, -13613.0, 7003.0, 17933.0, -17390.0, -543.0), 4096.0, true);
|
|
687
|
+
ICTCP_LMS_to_RGB = inverse(get_ICTCP_RGB_TO_LMS());
|
|
688
|
+
ICTCP_ICTCP_to_LMS = inverse(get_ICTCP_LMS_TO_ICTCP());
|
|
689
|
+
ICTCP_CROSSTALK = _Matrix___init__impl__q3kp4w_0(0.92, 0.04, 0.04, 0.04, 0.92, 0.04, 0.04, 0.04, 0.92);
|
|
690
|
+
HPE_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(0.4002, 0.7076, -0.0808, -0.2263, 1.1653, 0.0457, 0.0, 0.0, 0.9182);
|
|
691
|
+
ICTCP_XYZ_TO_LMS = dot(get_ICTCP_CROSSTALK(), get_HPE_XYZ_TO_LMS());
|
|
692
|
+
ICTCP_LMS_TO_XYZ = inverse(get_ICTCP_XYZ_TO_LMS());
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function GammaTransferFunctions(gamma) {
|
|
696
|
+
this.f7c_1 = gamma;
|
|
697
|
+
}
|
|
698
|
+
protoOf(GammaTransferFunctions).d7c = function (x) {
|
|
699
|
+
return spow(x, this.f7c_1);
|
|
700
|
+
};
|
|
701
|
+
protoOf(GammaTransferFunctions).e7c = function (x) {
|
|
702
|
+
return spow(x, 1.0 / this.f7c_1);
|
|
703
|
+
};
|
|
704
|
+
protoOf(GammaTransferFunctions).toString = function () {
|
|
705
|
+
return 'GammaTransferFunctions(gamma=' + this.f7c_1 + ')';
|
|
706
|
+
};
|
|
707
|
+
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
708
|
+
return getNumberHashCode(this.f7c_1);
|
|
709
|
+
};
|
|
710
|
+
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
711
|
+
if (this === other)
|
|
712
|
+
return true;
|
|
713
|
+
if (!(other instanceof GammaTransferFunctions))
|
|
714
|
+
return false;
|
|
715
|
+
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
716
|
+
if (!equals(this.f7c_1, tmp0_other_with_cast.f7c_1))
|
|
717
|
+
return false;
|
|
718
|
+
return true;
|
|
719
|
+
};
|
|
720
|
+
function LinearTransferFunctions() {
|
|
721
|
+
}
|
|
722
|
+
protoOf(LinearTransferFunctions).d7c = function (x) {
|
|
723
|
+
return x;
|
|
724
|
+
};
|
|
725
|
+
protoOf(LinearTransferFunctions).e7c = function (x) {
|
|
726
|
+
return x;
|
|
727
|
+
};
|
|
728
|
+
var LinearTransferFunctions_instance;
|
|
729
|
+
function LinearTransferFunctions_getInstance() {
|
|
730
|
+
return LinearTransferFunctions_instance;
|
|
731
|
+
}
|
|
732
|
+
function RGBColorSpace() {
|
|
733
|
+
}
|
|
734
|
+
function Companion_2() {
|
|
735
|
+
Companion_instance_2 = this;
|
|
736
|
+
this.a7b_1 = RGBColorSpaces_getInstance().i7b_1;
|
|
737
|
+
}
|
|
738
|
+
protoOf(Companion_2).b7b = function (r, g, b, alpha) {
|
|
739
|
+
return this.a7b_1.b7b(r, g, b, alpha);
|
|
740
|
+
};
|
|
741
|
+
protoOf(Companion_2).g7c = function (r, g, b, alpha) {
|
|
742
|
+
return this.a7b_1.g7c(r, g, b, alpha);
|
|
743
|
+
};
|
|
744
|
+
protoOf(Companion_2).i7c = function (hex) {
|
|
745
|
+
return this.a7b_1.i7c(hex);
|
|
746
|
+
};
|
|
747
|
+
protoOf(Companion_2).h7c = function (r, g, b, alpha) {
|
|
748
|
+
return this.a7b_1.h7c(r, g, b, alpha);
|
|
749
|
+
};
|
|
750
|
+
protoOf(Companion_2).u7b = function () {
|
|
751
|
+
return this.a7b_1.u7b();
|
|
752
|
+
};
|
|
753
|
+
protoOf(Companion_2).j7c = function () {
|
|
754
|
+
return this.a7b_1.j7c();
|
|
755
|
+
};
|
|
756
|
+
protoOf(Companion_2).k7c = function () {
|
|
757
|
+
return this.a7b_1.k7c();
|
|
758
|
+
};
|
|
759
|
+
protoOf(Companion_2).l7c = function () {
|
|
760
|
+
return this.a7b_1.l7c();
|
|
761
|
+
};
|
|
762
|
+
protoOf(Companion_2).t2 = function () {
|
|
763
|
+
return this.a7b_1.t2();
|
|
764
|
+
};
|
|
765
|
+
protoOf(Companion_2).n7a = function () {
|
|
766
|
+
return this.a7b_1.n7a();
|
|
767
|
+
};
|
|
768
|
+
protoOf(Companion_2).equals = function (other) {
|
|
769
|
+
return equals(RGBColorSpaces_getInstance().i7b_1, other);
|
|
770
|
+
};
|
|
771
|
+
protoOf(Companion_2).hashCode = function () {
|
|
772
|
+
return hashCode(RGBColorSpaces_getInstance().i7b_1);
|
|
773
|
+
};
|
|
774
|
+
var Companion_instance_2;
|
|
775
|
+
function Companion_getInstance_2() {
|
|
776
|
+
if (Companion_instance_2 == null)
|
|
777
|
+
new Companion_2();
|
|
778
|
+
return Companion_instance_2;
|
|
779
|
+
}
|
|
780
|
+
function clamp$copy(receiver, p0, p1, p2, p3) {
|
|
781
|
+
return receiver.m7c(p0, p1, p2, p3);
|
|
782
|
+
}
|
|
783
|
+
function RGB(r, g, b, alpha, space) {
|
|
784
|
+
Companion_getInstance_2();
|
|
785
|
+
this.r79_1 = r;
|
|
786
|
+
this.s79_1 = g;
|
|
787
|
+
this.t79_1 = b;
|
|
788
|
+
this.u79_1 = alpha;
|
|
789
|
+
this.v79_1 = space;
|
|
790
|
+
}
|
|
791
|
+
protoOf(RGB).o79 = function () {
|
|
792
|
+
return this.v79_1;
|
|
793
|
+
};
|
|
794
|
+
protoOf(RGB).n7c = function () {
|
|
795
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
796
|
+
var this_0 = this.r79_1 * 255;
|
|
797
|
+
return roundToInt(this_0);
|
|
798
|
+
};
|
|
799
|
+
protoOf(RGB).o7c = function () {
|
|
800
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
801
|
+
var this_0 = this.s79_1 * 255;
|
|
802
|
+
return roundToInt(this_0);
|
|
803
|
+
};
|
|
804
|
+
protoOf(RGB).p7c = function () {
|
|
805
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
806
|
+
var this_0 = this.t79_1 * 255;
|
|
807
|
+
return roundToInt(this_0);
|
|
808
|
+
};
|
|
809
|
+
protoOf(RGB).q7c = function (space) {
|
|
810
|
+
var f = SRGB_getInstance().u7b();
|
|
811
|
+
return equals(this.v79_1, space) ? this : equals(this.v79_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().j7b_1) ? space.b7b(f.d7c(this.r79_1), f.d7c(this.s79_1), f.d7c(this.t79_1), this.u79_1) : equals(this.v79_1, RGBColorSpaces_getInstance().j7b_1) && equals(space, SRGB_getInstance()) ? space.b7b(f.e7c(this.r79_1), f.e7c(this.s79_1), f.e7c(this.t79_1), this.u79_1) : this.q79().w7c(space);
|
|
812
|
+
};
|
|
813
|
+
protoOf(RGB).x7c = function () {
|
|
814
|
+
var tmp$ret$3;
|
|
815
|
+
$l$block: {
|
|
816
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
817
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
818
|
+
var $this$toSRGB = this.q7c(SRGB_getInstance());
|
|
819
|
+
var r = $this$toSRGB.r79_1;
|
|
820
|
+
var g = $this$toSRGB.s79_1;
|
|
821
|
+
var b = $this$toSRGB.t79_1;
|
|
822
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
823
|
+
var min = Math.min(r, g, b);
|
|
824
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
825
|
+
var max = Math.max(r, g, b);
|
|
826
|
+
var chroma = max - min;
|
|
827
|
+
var h = (chroma < 1.0E-7 ? NaN : r === max ? (g - b) / chroma : g === max ? 2 + (b - r) / chroma : b === max ? 4 + (r - g) / chroma : 0.0) * 60;
|
|
828
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
829
|
+
var h_0 = normalizeDeg(h);
|
|
830
|
+
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
831
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.u79_1);
|
|
832
|
+
break $l$block;
|
|
833
|
+
}
|
|
834
|
+
return tmp$ret$3;
|
|
835
|
+
};
|
|
836
|
+
protoOf(RGB).q79 = function () {
|
|
837
|
+
var f = this.v79_1.u7b();
|
|
838
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
839
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.v79_1.j7c());
|
|
840
|
+
var v0 = f.d7c(this.r79_1);
|
|
841
|
+
var v1 = f.d7c(this.s79_1);
|
|
842
|
+
var v2 = f.d7c(this.t79_1);
|
|
843
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
844
|
+
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
845
|
+
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
846
|
+
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
847
|
+
return XYZColorSpace_0(this.v79_1.l7c()).b7b(x, y, z, this.u79_1);
|
|
848
|
+
};
|
|
849
|
+
protoOf(RGB).t7a = function () {
|
|
850
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
851
|
+
var $this$toSRGB = this.q7c(SRGB_getInstance());
|
|
852
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
853
|
+
var this_0 = $this$toSRGB.x7c().y7a_1 * 100;
|
|
854
|
+
var value = roundToInt(this_0);
|
|
855
|
+
if (value === 30)
|
|
856
|
+
return new Ansi16(30);
|
|
857
|
+
var v = value / 50 | 0;
|
|
858
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
859
|
+
var this_1 = $this$toSRGB.t79_1;
|
|
860
|
+
var tmp$ret$1 = roundToInt(this_1);
|
|
861
|
+
var tmp = imul(tmp$ret$1, 4);
|
|
862
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
863
|
+
var this_2 = $this$toSRGB.s79_1;
|
|
864
|
+
var tmp$ret$2 = roundToInt(this_2);
|
|
865
|
+
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
866
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
867
|
+
var this_3 = $this$toSRGB.r79_1;
|
|
868
|
+
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
869
|
+
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
870
|
+
};
|
|
871
|
+
protoOf(RGB).y7c = function () {
|
|
872
|
+
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
873
|
+
var $this$toSRGB = this.q7c(SRGB_getInstance());
|
|
874
|
+
var ri = $this$toSRGB.n7c();
|
|
875
|
+
var gi = $this$toSRGB.o7c();
|
|
876
|
+
var bi = $this$toSRGB.p7c();
|
|
877
|
+
var tmp;
|
|
878
|
+
if (ri === gi && gi === bi) {
|
|
879
|
+
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
880
|
+
} else {
|
|
881
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
882
|
+
var this_0 = $this$toSRGB.r79_1 * 5;
|
|
883
|
+
var tmp$ret$0 = roundToInt(this_0);
|
|
884
|
+
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
885
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
886
|
+
var this_1 = $this$toSRGB.s79_1 * 5;
|
|
887
|
+
var tmp$ret$1 = roundToInt(this_1);
|
|
888
|
+
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
889
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
890
|
+
var this_2 = $this$toSRGB.t79_1 * 5;
|
|
891
|
+
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
892
|
+
}
|
|
893
|
+
var code = tmp;
|
|
894
|
+
return new Ansi256(code);
|
|
895
|
+
};
|
|
896
|
+
protoOf(RGB).p79 = function () {
|
|
897
|
+
return this.q7c(RGBColorSpaces_getInstance().i7b_1);
|
|
898
|
+
};
|
|
899
|
+
protoOf(RGB).z7c = function () {
|
|
900
|
+
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
901
|
+
var v1 = this.r79_1;
|
|
902
|
+
var v2 = this.s79_1;
|
|
903
|
+
var v3 = this.t79_1;
|
|
904
|
+
var alpha = this.u79_1;
|
|
905
|
+
var _destruct__k2r9zo = this.o79().n7a();
|
|
906
|
+
// Inline function 'kotlin.collections.component1' call
|
|
907
|
+
var c1 = _destruct__k2r9zo.p(0);
|
|
908
|
+
// Inline function 'kotlin.collections.component2' call
|
|
909
|
+
var c2 = _destruct__k2r9zo.p(1);
|
|
910
|
+
// Inline function 'kotlin.collections.component3' call
|
|
911
|
+
var c3 = _destruct__k2r9zo.p(2);
|
|
912
|
+
var tmp;
|
|
913
|
+
var tmp_0;
|
|
914
|
+
var tmp_1;
|
|
915
|
+
var tmp_2;
|
|
916
|
+
var containsLower = c1.y79_1;
|
|
917
|
+
if (v1 <= c1.z79_1 ? containsLower <= v1 : false) {
|
|
918
|
+
var containsLower_0 = c2.y79_1;
|
|
919
|
+
tmp_2 = v2 <= c2.z79_1 ? containsLower_0 <= v2 : false;
|
|
920
|
+
} else {
|
|
921
|
+
tmp_2 = false;
|
|
922
|
+
}
|
|
923
|
+
if (tmp_2) {
|
|
924
|
+
var containsLower_1 = c3.y79_1;
|
|
925
|
+
tmp_1 = v3 <= c3.z79_1 ? containsLower_1 <= v3 : false;
|
|
926
|
+
} else {
|
|
927
|
+
tmp_1 = false;
|
|
928
|
+
}
|
|
929
|
+
if (tmp_1) {
|
|
930
|
+
tmp_0 = 0.0 <= alpha ? alpha <= 1.0 : false;
|
|
931
|
+
} else {
|
|
932
|
+
tmp_0 = false;
|
|
933
|
+
}
|
|
934
|
+
if (tmp_0) {
|
|
935
|
+
tmp = this;
|
|
936
|
+
} else {
|
|
937
|
+
tmp = clamp$copy(this, coerceIn(v1, c1.y79_1, c1.z79_1), coerceIn(v2, c2.y79_1, c2.z79_1), coerceIn(v3, c3.y79_1, c3.z79_1), coerceIn(alpha, 0.0, 1.0));
|
|
938
|
+
}
|
|
939
|
+
return tmp;
|
|
940
|
+
};
|
|
941
|
+
protoOf(RGB).a7d = function (r, g, b, alpha, space) {
|
|
942
|
+
return new RGB(r, g, b, alpha, space);
|
|
943
|
+
};
|
|
944
|
+
protoOf(RGB).m7c = function (r, g, b, alpha, space, $super) {
|
|
945
|
+
r = r === VOID ? this.r79_1 : r;
|
|
946
|
+
g = g === VOID ? this.s79_1 : g;
|
|
947
|
+
b = b === VOID ? this.t79_1 : b;
|
|
948
|
+
alpha = alpha === VOID ? this.u79_1 : alpha;
|
|
949
|
+
space = space === VOID ? this.v79_1 : space;
|
|
950
|
+
return $super === VOID ? this.a7d(r, g, b, alpha, space) : $super.a7d.call(this, r, g, b, alpha, space);
|
|
951
|
+
};
|
|
952
|
+
protoOf(RGB).toString = function () {
|
|
953
|
+
return 'RGB(r=' + this.r79_1 + ', g=' + this.s79_1 + ', b=' + this.t79_1 + ', alpha=' + this.u79_1 + ', space=' + toString(this.v79_1) + ')';
|
|
954
|
+
};
|
|
955
|
+
protoOf(RGB).hashCode = function () {
|
|
956
|
+
var result = getNumberHashCode(this.r79_1);
|
|
957
|
+
result = imul(result, 31) + getNumberHashCode(this.s79_1) | 0;
|
|
958
|
+
result = imul(result, 31) + getNumberHashCode(this.t79_1) | 0;
|
|
959
|
+
result = imul(result, 31) + getNumberHashCode(this.u79_1) | 0;
|
|
960
|
+
result = imul(result, 31) + hashCode(this.v79_1) | 0;
|
|
961
|
+
return result;
|
|
962
|
+
};
|
|
963
|
+
protoOf(RGB).equals = function (other) {
|
|
964
|
+
if (this === other)
|
|
965
|
+
return true;
|
|
966
|
+
if (!(other instanceof RGB))
|
|
967
|
+
return false;
|
|
968
|
+
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
969
|
+
if (!equals(this.r79_1, tmp0_other_with_cast.r79_1))
|
|
970
|
+
return false;
|
|
971
|
+
if (!equals(this.s79_1, tmp0_other_with_cast.s79_1))
|
|
972
|
+
return false;
|
|
973
|
+
if (!equals(this.t79_1, tmp0_other_with_cast.t79_1))
|
|
974
|
+
return false;
|
|
975
|
+
if (!equals(this.u79_1, tmp0_other_with_cast.u79_1))
|
|
976
|
+
return false;
|
|
977
|
+
if (!equals(this.v79_1, tmp0_other_with_cast.v79_1))
|
|
978
|
+
return false;
|
|
979
|
+
return true;
|
|
980
|
+
};
|
|
981
|
+
function parseHex(_this__u8e3s4, startIndex) {
|
|
982
|
+
var tmp;
|
|
983
|
+
if (get_hexLength(_this__u8e3s4) > 4) {
|
|
984
|
+
var i = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
|
|
985
|
+
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
986
|
+
} else {
|
|
987
|
+
var i_0 = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
|
|
988
|
+
// Inline function 'kotlin.let' call
|
|
989
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
990
|
+
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
991
|
+
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
992
|
+
var tmp$ret$1 = toString_0(it) + toString_0(it);
|
|
993
|
+
tmp = toInt(tmp$ret$1, 16);
|
|
994
|
+
}
|
|
995
|
+
return tmp;
|
|
996
|
+
}
|
|
997
|
+
function validateHex(_this__u8e3s4) {
|
|
998
|
+
// Inline function 'kotlin.apply' call
|
|
999
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1000
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
|
|
1001
|
+
// Inline function 'kotlin.require' call
|
|
1002
|
+
// Inline function 'kotlin.let' call
|
|
1003
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1004
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
1005
|
+
var it = get_hexLength(_this__u8e3s4);
|
|
1006
|
+
switch (it) {
|
|
1007
|
+
case 3:
|
|
1008
|
+
case 4:
|
|
1009
|
+
case 6:
|
|
1010
|
+
var tmp$ret$0 = true;
|
|
1011
|
+
break;
|
|
1012
|
+
default:
|
|
1013
|
+
tmp$ret$0 = it === 8;
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1017
|
+
if (!tmp$ret$0) {
|
|
1018
|
+
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
1019
|
+
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
1020
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1021
|
+
}
|
|
1022
|
+
return _this__u8e3s4;
|
|
1023
|
+
}
|
|
1024
|
+
function get_hexLength(_this__u8e3s4) {
|
|
1025
|
+
return startsWith(_this__u8e3s4, '#') ? _this__u8e3s4.length - 1 | 0 : _this__u8e3s4.length;
|
|
1026
|
+
}
|
|
1027
|
+
function get_SRGB_R() {
|
|
1028
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1029
|
+
return SRGB_R;
|
|
1030
|
+
}
|
|
1031
|
+
var SRGB_R;
|
|
1032
|
+
function get_SRGB_G() {
|
|
1033
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1034
|
+
return SRGB_G;
|
|
1035
|
+
}
|
|
1036
|
+
var SRGB_G;
|
|
1037
|
+
function get_SRGB_B() {
|
|
1038
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1039
|
+
return SRGB_B;
|
|
1040
|
+
}
|
|
1041
|
+
var SRGB_B;
|
|
1042
|
+
function get_ACES_WHITE_POINT() {
|
|
1043
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1044
|
+
return ACES_WHITE_POINT;
|
|
1045
|
+
}
|
|
1046
|
+
var ACES_WHITE_POINT;
|
|
1047
|
+
function get_ACES_AP0_R() {
|
|
1048
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1049
|
+
return ACES_AP0_R;
|
|
1050
|
+
}
|
|
1051
|
+
var ACES_AP0_R;
|
|
1052
|
+
function get_ACES_AP0_G() {
|
|
1053
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1054
|
+
return ACES_AP0_G;
|
|
1055
|
+
}
|
|
1056
|
+
var ACES_AP0_G;
|
|
1057
|
+
function get_ACES_AP0_B() {
|
|
1058
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1059
|
+
return ACES_AP0_B;
|
|
1060
|
+
}
|
|
1061
|
+
var ACES_AP0_B;
|
|
1062
|
+
function get_ACES_AP1_R() {
|
|
1063
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1064
|
+
return ACES_AP1_R;
|
|
1065
|
+
}
|
|
1066
|
+
var ACES_AP1_R;
|
|
1067
|
+
function get_ACES_AP1_G() {
|
|
1068
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1069
|
+
return ACES_AP1_G;
|
|
1070
|
+
}
|
|
1071
|
+
var ACES_AP1_G;
|
|
1072
|
+
function get_ACES_AP1_B() {
|
|
1073
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1074
|
+
return ACES_AP1_B;
|
|
1075
|
+
}
|
|
1076
|
+
var ACES_AP1_B;
|
|
1077
|
+
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1078
|
+
return it.p79();
|
|
1079
|
+
}
|
|
1080
|
+
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1081
|
+
var tmp;
|
|
1082
|
+
if (color instanceof RGB) {
|
|
1083
|
+
tmp = color.q7c($this$RGBColorSpaceImpl);
|
|
1084
|
+
} else {
|
|
1085
|
+
if (color instanceof ICtCp) {
|
|
1086
|
+
tmp = color.h7b();
|
|
1087
|
+
} else {
|
|
1088
|
+
tmp = color.q79().w7c($this$RGBColorSpaceImpl);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
return tmp;
|
|
1092
|
+
}
|
|
1093
|
+
function RGBColorSpaces() {
|
|
1094
|
+
RGBColorSpaces_instance = this;
|
|
1095
|
+
var tmp = this;
|
|
1096
|
+
var tmp_0 = Illuminant_getInstance().h7a_1;
|
|
1097
|
+
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1098
|
+
var tmp_2 = get_SRGB_R();
|
|
1099
|
+
var tmp_3 = get_SRGB_G();
|
|
1100
|
+
var tmp_4 = get_SRGB_B();
|
|
1101
|
+
tmp.i7b_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1102
|
+
this.j7b_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().h7a_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1103
|
+
this.k7b_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1104
|
+
this.l7b_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1105
|
+
this.m7b_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1106
|
+
this.n7b_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1107
|
+
this.o7b_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().h7a_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
|
|
1108
|
+
var tmp_5 = this;
|
|
1109
|
+
var tmp_6 = Illuminant_getInstance().h7a_1;
|
|
1110
|
+
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1111
|
+
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1112
|
+
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1113
|
+
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1114
|
+
tmp_5.p7b_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1115
|
+
this.q7b_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().h7a_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1116
|
+
this.r7b_1 = RGBColorSpace_0('DCI P3', new WhitePoint('DCI P3', xyY_init_$Create$(0.314, 0.351)), new GammaTransferFunctions(2.6), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1117
|
+
this.s7b_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().h7a_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1118
|
+
this.t7b_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().f7a_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1119
|
+
}
|
|
1120
|
+
var RGBColorSpaces_instance;
|
|
1121
|
+
function RGBColorSpaces_getInstance() {
|
|
1122
|
+
if (RGBColorSpaces_instance == null)
|
|
1123
|
+
new RGBColorSpaces();
|
|
1124
|
+
return RGBColorSpaces_instance;
|
|
1125
|
+
}
|
|
1126
|
+
function SRGB() {
|
|
1127
|
+
SRGB_instance = this;
|
|
1128
|
+
this.c7b_1 = RGBColorSpaces_getInstance().i7b_1;
|
|
1129
|
+
}
|
|
1130
|
+
protoOf(SRGB).b7b = function (r, g, b, alpha) {
|
|
1131
|
+
return this.c7b_1.b7b(r, g, b, alpha);
|
|
1132
|
+
};
|
|
1133
|
+
protoOf(SRGB).g7c = function (r, g, b, alpha) {
|
|
1134
|
+
return this.c7b_1.g7c(r, g, b, alpha);
|
|
1135
|
+
};
|
|
1136
|
+
protoOf(SRGB).i7c = function (hex) {
|
|
1137
|
+
return this.c7b_1.i7c(hex);
|
|
1138
|
+
};
|
|
1139
|
+
protoOf(SRGB).h7c = function (r, g, b, alpha) {
|
|
1140
|
+
return this.c7b_1.h7c(r, g, b, alpha);
|
|
1141
|
+
};
|
|
1142
|
+
protoOf(SRGB).u7b = function () {
|
|
1143
|
+
return this.c7b_1.u7b();
|
|
1144
|
+
};
|
|
1145
|
+
protoOf(SRGB).j7c = function () {
|
|
1146
|
+
return this.c7b_1.j7c();
|
|
1147
|
+
};
|
|
1148
|
+
protoOf(SRGB).k7c = function () {
|
|
1149
|
+
return this.c7b_1.k7c();
|
|
1150
|
+
};
|
|
1151
|
+
protoOf(SRGB).l7c = function () {
|
|
1152
|
+
return this.c7b_1.l7c();
|
|
1153
|
+
};
|
|
1154
|
+
protoOf(SRGB).t2 = function () {
|
|
1155
|
+
return this.c7b_1.t2();
|
|
1156
|
+
};
|
|
1157
|
+
protoOf(SRGB).n7a = function () {
|
|
1158
|
+
return this.c7b_1.n7a();
|
|
1159
|
+
};
|
|
1160
|
+
protoOf(SRGB).equals = function (other) {
|
|
1161
|
+
return equals(RGBColorSpaces_getInstance().i7b_1, other);
|
|
1162
|
+
};
|
|
1163
|
+
protoOf(SRGB).hashCode = function () {
|
|
1164
|
+
return hashCode(RGBColorSpaces_getInstance().i7b_1);
|
|
1165
|
+
};
|
|
1166
|
+
protoOf(SRGB).toString = function () {
|
|
1167
|
+
return 'sRGB';
|
|
1168
|
+
};
|
|
1169
|
+
var SRGB_instance;
|
|
1170
|
+
function SRGB_getInstance() {
|
|
1171
|
+
if (SRGB_instance == null)
|
|
1172
|
+
new SRGB();
|
|
1173
|
+
return SRGB_instance;
|
|
1174
|
+
}
|
|
1175
|
+
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1176
|
+
this.b7d_1 = name;
|
|
1177
|
+
this.c7d_1 = whitePoint;
|
|
1178
|
+
this.d7d_1 = transferFunctions;
|
|
1179
|
+
this.e7d_1 = r;
|
|
1180
|
+
this.f7d_1 = g;
|
|
1181
|
+
this.g7d_1 = b;
|
|
1182
|
+
this.h7d_1 = convertImpl;
|
|
1183
|
+
this.i7d_1 = zeroOneComponentInfo('RGB');
|
|
1184
|
+
this.j7d_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.c7d_1, this.e7d_1, this.f7d_1, this.g7d_1));
|
|
1185
|
+
this.k7d_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.j7d_1)));
|
|
1186
|
+
}
|
|
1187
|
+
protoOf(RGBColorSpaceImpl).t2 = function () {
|
|
1188
|
+
return this.b7d_1;
|
|
1189
|
+
};
|
|
1190
|
+
protoOf(RGBColorSpaceImpl).l7c = function () {
|
|
1191
|
+
return this.c7d_1;
|
|
1192
|
+
};
|
|
1193
|
+
protoOf(RGBColorSpaceImpl).u7b = function () {
|
|
1194
|
+
return this.d7d_1;
|
|
1195
|
+
};
|
|
1196
|
+
protoOf(RGBColorSpaceImpl).n7a = function () {
|
|
1197
|
+
return this.i7d_1;
|
|
1198
|
+
};
|
|
1199
|
+
protoOf(RGBColorSpaceImpl).j7c = function () {
|
|
1200
|
+
return this.j7d_1;
|
|
1201
|
+
};
|
|
1202
|
+
protoOf(RGBColorSpaceImpl).k7c = function () {
|
|
1203
|
+
return this.k7d_1;
|
|
1204
|
+
};
|
|
1205
|
+
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1206
|
+
return this.b7d_1;
|
|
1207
|
+
};
|
|
1208
|
+
protoOf(RGBColorSpaceImpl).b7b = function (r, g, b, alpha) {
|
|
1209
|
+
return new RGB(r, g, b, alpha, this);
|
|
1210
|
+
};
|
|
1211
|
+
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
1212
|
+
if (this === other)
|
|
1213
|
+
return true;
|
|
1214
|
+
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1215
|
+
return false;
|
|
1216
|
+
if (!(this.b7d_1 === other.t2()))
|
|
1217
|
+
return false;
|
|
1218
|
+
if (!this.c7d_1.equals(other.l7c()))
|
|
1219
|
+
return false;
|
|
1220
|
+
if (!equals(this.d7d_1, other.u7b()))
|
|
1221
|
+
return false;
|
|
1222
|
+
if (other instanceof RGBColorSpaceImpl) {
|
|
1223
|
+
if (!this.e7d_1.equals(other.e7d_1))
|
|
1224
|
+
return false;
|
|
1225
|
+
if (!this.f7d_1.equals(other.f7d_1))
|
|
1226
|
+
return false;
|
|
1227
|
+
if (!this.g7d_1.equals(other.g7d_1))
|
|
1228
|
+
return false;
|
|
1229
|
+
} else {
|
|
1230
|
+
if (!contentEquals(this.j7d_1, other.j7c()))
|
|
1231
|
+
return false;
|
|
1232
|
+
if (!contentEquals(this.k7d_1, other.k7c()))
|
|
1233
|
+
return false;
|
|
1234
|
+
}
|
|
1235
|
+
return true;
|
|
1236
|
+
};
|
|
1237
|
+
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1238
|
+
var result = getStringHashCode(this.b7d_1);
|
|
1239
|
+
result = imul(31, result) + this.c7d_1.hashCode() | 0;
|
|
1240
|
+
result = imul(31, result) + hashCode(this.d7d_1) | 0;
|
|
1241
|
+
result = imul(31, result) + this.e7d_1.hashCode() | 0;
|
|
1242
|
+
result = imul(31, result) + this.f7d_1.hashCode() | 0;
|
|
1243
|
+
result = imul(31, result) + this.g7d_1.hashCode() | 0;
|
|
1244
|
+
return result;
|
|
1245
|
+
};
|
|
1246
|
+
function SRGBTransferFunctions() {
|
|
1247
|
+
}
|
|
1248
|
+
protoOf(SRGBTransferFunctions).e7c = function (x) {
|
|
1249
|
+
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1250
|
+
};
|
|
1251
|
+
protoOf(SRGBTransferFunctions).d7c = function (x) {
|
|
1252
|
+
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1253
|
+
};
|
|
1254
|
+
var SRGBTransferFunctions_instance;
|
|
1255
|
+
function SRGBTransferFunctions_getInstance() {
|
|
1256
|
+
return SRGBTransferFunctions_instance;
|
|
1257
|
+
}
|
|
1258
|
+
function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
|
|
1259
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1260
|
+
return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, RGBColorSpace$lambda);
|
|
1261
|
+
}
|
|
1262
|
+
function ACESccTransferFunctions() {
|
|
1263
|
+
ACESccTransferFunctions_instance = this;
|
|
1264
|
+
this.l7d_1 = 3.0517578125E-5;
|
|
1265
|
+
this.m7d_1 = 1.52587890625E-5;
|
|
1266
|
+
this.n7d_1 = -0.3013698630136986;
|
|
1267
|
+
var tmp = this;
|
|
1268
|
+
// Inline function 'kotlin.math.log2' call
|
|
1269
|
+
tmp.o7d_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1270
|
+
}
|
|
1271
|
+
protoOf(ACESccTransferFunctions).d7c = function (x) {
|
|
1272
|
+
var tmp;
|
|
1273
|
+
if (x <= -0.3013698630136986) {
|
|
1274
|
+
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1275
|
+
} else if (x < this.o7d_1) {
|
|
1276
|
+
// Inline function 'kotlin.math.pow' call
|
|
1277
|
+
var x_0 = x * 17.52 - 9.72;
|
|
1278
|
+
tmp = Math.pow(2.0, x_0);
|
|
1279
|
+
} else {
|
|
1280
|
+
tmp = 65504.0;
|
|
1281
|
+
}
|
|
1282
|
+
return tmp;
|
|
1283
|
+
};
|
|
1284
|
+
protoOf(ACESccTransferFunctions).e7c = function (x) {
|
|
1285
|
+
var tmp;
|
|
1286
|
+
if (x < 3.0517578125E-5) {
|
|
1287
|
+
// Inline function 'kotlin.math.log2' call
|
|
1288
|
+
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
1289
|
+
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
1290
|
+
} else {
|
|
1291
|
+
// Inline function 'kotlin.math.log2' call
|
|
1292
|
+
tmp = (log2(x) + 9.72) / 17.52;
|
|
1293
|
+
}
|
|
1294
|
+
return tmp;
|
|
1295
|
+
};
|
|
1296
|
+
var ACESccTransferFunctions_instance;
|
|
1297
|
+
function ACESccTransferFunctions_getInstance() {
|
|
1298
|
+
if (ACESccTransferFunctions_instance == null)
|
|
1299
|
+
new ACESccTransferFunctions();
|
|
1300
|
+
return ACESccTransferFunctions_instance;
|
|
1301
|
+
}
|
|
1302
|
+
function ACEScctTransferFunctions() {
|
|
1303
|
+
ACEScctTransferFunctions_instance = this;
|
|
1304
|
+
this.p7d_1 = 10.5402377416545;
|
|
1305
|
+
this.q7d_1 = 0.0729055341958355;
|
|
1306
|
+
var tmp = this;
|
|
1307
|
+
// Inline function 'kotlin.math.log2' call
|
|
1308
|
+
tmp.r7d_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1309
|
+
}
|
|
1310
|
+
protoOf(ACEScctTransferFunctions).d7c = function (x) {
|
|
1311
|
+
var tmp;
|
|
1312
|
+
if (x <= 0.155251141552511) {
|
|
1313
|
+
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1314
|
+
} else if (x < this.r7d_1) {
|
|
1315
|
+
// Inline function 'kotlin.math.pow' call
|
|
1316
|
+
var x_0 = x * 17.52 - 9.72;
|
|
1317
|
+
tmp = Math.pow(2.0, x_0);
|
|
1318
|
+
} else {
|
|
1319
|
+
tmp = 65504.0;
|
|
1320
|
+
}
|
|
1321
|
+
return tmp;
|
|
1322
|
+
};
|
|
1323
|
+
protoOf(ACEScctTransferFunctions).e7c = function (x) {
|
|
1324
|
+
var tmp;
|
|
1325
|
+
if (x < 0.0078125) {
|
|
1326
|
+
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
1327
|
+
} else {
|
|
1328
|
+
// Inline function 'kotlin.math.log2' call
|
|
1329
|
+
tmp = (log2(x) + 9.72) / 17.52;
|
|
1330
|
+
}
|
|
1331
|
+
return tmp;
|
|
1332
|
+
};
|
|
1333
|
+
var ACEScctTransferFunctions_instance;
|
|
1334
|
+
function ACEScctTransferFunctions_getInstance() {
|
|
1335
|
+
if (ACEScctTransferFunctions_instance == null)
|
|
1336
|
+
new ACEScctTransferFunctions();
|
|
1337
|
+
return ACEScctTransferFunctions_instance;
|
|
1338
|
+
}
|
|
1339
|
+
function BT2020TransferFunctions() {
|
|
1340
|
+
BT2020TransferFunctions_instance = this;
|
|
1341
|
+
this.s7d_1 = 1.0993;
|
|
1342
|
+
this.t7d_1 = 0.0181;
|
|
1343
|
+
var tmp = this;
|
|
1344
|
+
// Inline function 'kotlin.math.pow' call
|
|
1345
|
+
tmp.u7d_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1346
|
+
}
|
|
1347
|
+
protoOf(BT2020TransferFunctions).d7c = function (x) {
|
|
1348
|
+
return numberToDouble(x < this.u7d_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1349
|
+
};
|
|
1350
|
+
protoOf(BT2020TransferFunctions).e7c = function (x) {
|
|
1351
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1352
|
+
};
|
|
1353
|
+
var BT2020TransferFunctions_instance;
|
|
1354
|
+
function BT2020TransferFunctions_getInstance() {
|
|
1355
|
+
if (BT2020TransferFunctions_instance == null)
|
|
1356
|
+
new BT2020TransferFunctions();
|
|
1357
|
+
return BT2020TransferFunctions_instance;
|
|
1358
|
+
}
|
|
1359
|
+
function BT709TransferFunctions() {
|
|
1360
|
+
BT709TransferFunctions_instance = this;
|
|
1361
|
+
this.v7d_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1362
|
+
}
|
|
1363
|
+
protoOf(BT709TransferFunctions).d7c = function (x) {
|
|
1364
|
+
return numberToDouble(x < this.v7d_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1365
|
+
};
|
|
1366
|
+
protoOf(BT709TransferFunctions).e7c = function (x) {
|
|
1367
|
+
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1368
|
+
};
|
|
1369
|
+
var BT709TransferFunctions_instance;
|
|
1370
|
+
function BT709TransferFunctions_getInstance() {
|
|
1371
|
+
if (BT709TransferFunctions_instance == null)
|
|
1372
|
+
new BT709TransferFunctions();
|
|
1373
|
+
return BT709TransferFunctions_instance;
|
|
1374
|
+
}
|
|
1375
|
+
function ROMMTransferFunctions() {
|
|
1376
|
+
this.w7d_1 = 0.001953;
|
|
1377
|
+
}
|
|
1378
|
+
protoOf(ROMMTransferFunctions).d7c = function (x) {
|
|
1379
|
+
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1380
|
+
};
|
|
1381
|
+
protoOf(ROMMTransferFunctions).e7c = function (x) {
|
|
1382
|
+
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1383
|
+
};
|
|
1384
|
+
var ROMMTransferFunctions_instance;
|
|
1385
|
+
function ROMMTransferFunctions_getInstance() {
|
|
1386
|
+
return ROMMTransferFunctions_instance;
|
|
1387
|
+
}
|
|
1388
|
+
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1389
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1390
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.x7d_1, g.x7d_1, b.x7d_1, r.y7d_1, g.y7d_1, b.y7d_1, r.a7e(), g.a7e(), b.a7e());
|
|
1391
|
+
var wp = whitePoint.b7a_1;
|
|
1392
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1393
|
+
var this_0 = inverse(primaries);
|
|
1394
|
+
var v0 = wp.b7e();
|
|
1395
|
+
var v1 = wp.z7d_1;
|
|
1396
|
+
var v2 = wp.c7e();
|
|
1397
|
+
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1398
|
+
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1399
|
+
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
1400
|
+
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
1401
|
+
return dotDiagonal(primaries, x, y, z);
|
|
1402
|
+
}
|
|
1403
|
+
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
1404
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1405
|
+
var tmp;
|
|
1406
|
+
if (color instanceof RGB) {
|
|
1407
|
+
tmp = color.q7c($this$RGBColorSpaceImpl);
|
|
1408
|
+
} else {
|
|
1409
|
+
tmp = color.q79().w7c($this$RGBColorSpaceImpl);
|
|
1410
|
+
}
|
|
1411
|
+
return tmp;
|
|
1412
|
+
}
|
|
1413
|
+
var properties_initialized_RGBColorSpaces_kt_fsnpad;
|
|
1414
|
+
function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
1415
|
+
if (!properties_initialized_RGBColorSpaces_kt_fsnpad) {
|
|
1416
|
+
properties_initialized_RGBColorSpaces_kt_fsnpad = true;
|
|
1417
|
+
SRGB_R = xyY_init_$Create$(0.64, 0.33);
|
|
1418
|
+
SRGB_G = xyY_init_$Create$(0.3, 0.6);
|
|
1419
|
+
SRGB_B = xyY_init_$Create$(0.15, 0.06);
|
|
1420
|
+
ACES_WHITE_POINT = new WhitePoint('ACES', xyY_init_$Create$(0.32168, 0.33767));
|
|
1421
|
+
ACES_AP0_R = xyY_init_$Create$(0.7347, 0.2653);
|
|
1422
|
+
ACES_AP0_G = xyY_init_$Create$(0.0, 1.0);
|
|
1423
|
+
ACES_AP0_B = xyY_init_$Create$(1.0E-4, -0.077);
|
|
1424
|
+
ACES_AP1_R = xyY_init_$Create$(0.713, 0.293);
|
|
1425
|
+
ACES_AP1_G = xyY_init_$Create$(0.165, 0.83);
|
|
1426
|
+
ACES_AP1_B = xyY_init_$Create$(0.128, 0.044);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
function Companion_3() {
|
|
1430
|
+
Companion_instance_3 = this;
|
|
1431
|
+
this.d7e_1 = XYZColorSpaces_getInstance().e7e_1;
|
|
1432
|
+
}
|
|
1433
|
+
protoOf(Companion_3).b7b = function (x, y, z, alpha) {
|
|
1434
|
+
return this.d7e_1.b7b(x, y, z, alpha);
|
|
1435
|
+
};
|
|
1436
|
+
protoOf(Companion_3).l7c = function () {
|
|
1437
|
+
return this.d7e_1.l7c();
|
|
1438
|
+
};
|
|
1439
|
+
protoOf(Companion_3).n7a = function () {
|
|
1440
|
+
return this.d7e_1.n7a();
|
|
1441
|
+
};
|
|
1442
|
+
protoOf(Companion_3).hashCode = function () {
|
|
1443
|
+
return hashCode(XYZColorSpaces_getInstance().e7e_1);
|
|
1444
|
+
};
|
|
1445
|
+
protoOf(Companion_3).equals = function (other) {
|
|
1446
|
+
return equals(XYZColorSpaces_getInstance().e7e_1, other);
|
|
1447
|
+
};
|
|
1448
|
+
var Companion_instance_3;
|
|
1449
|
+
function Companion_getInstance_3() {
|
|
1450
|
+
if (Companion_instance_3 == null)
|
|
1451
|
+
new Companion_3();
|
|
1452
|
+
return Companion_instance_3;
|
|
1453
|
+
}
|
|
1454
|
+
function adaptToM($this, space, m, mi) {
|
|
1455
|
+
if (space.l7c().equals($this.v7c_1.l7c()))
|
|
1456
|
+
return $this;
|
|
1457
|
+
var transform = chromaticAdaptationMatrix(space, $this.v7c_1.l7c().b7a_1, m, mi);
|
|
1458
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1459
|
+
var v0 = $this.r7c_1;
|
|
1460
|
+
var v1 = $this.s7c_1;
|
|
1461
|
+
var v2 = $this.t7c_1;
|
|
1462
|
+
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1463
|
+
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1464
|
+
var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
1465
|
+
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
1466
|
+
return space.b7b(xx, yy, zz, $this.u7c_1);
|
|
1467
|
+
}
|
|
1468
|
+
function XYZ(x, y, z, alpha, space) {
|
|
1469
|
+
Companion_getInstance_3();
|
|
1470
|
+
this.r7c_1 = x;
|
|
1471
|
+
this.s7c_1 = y;
|
|
1472
|
+
this.t7c_1 = z;
|
|
1473
|
+
this.u7c_1 = alpha;
|
|
1474
|
+
this.v7c_1 = space;
|
|
1475
|
+
}
|
|
1476
|
+
protoOf(XYZ).o79 = function () {
|
|
1477
|
+
return this.v7c_1;
|
|
1478
|
+
};
|
|
1479
|
+
protoOf(XYZ).g7e = function (space) {
|
|
1480
|
+
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1481
|
+
};
|
|
1482
|
+
protoOf(XYZ).w7c = function (space) {
|
|
1483
|
+
var _destruct__k2r9zo = this.g7e(XYZColorSpace_0(space.l7c()));
|
|
1484
|
+
var x = _destruct__k2r9zo.qg();
|
|
1485
|
+
var y = _destruct__k2r9zo.rg();
|
|
1486
|
+
var z = _destruct__k2r9zo.dm();
|
|
1487
|
+
var f = space.u7b();
|
|
1488
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1489
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.k7c());
|
|
1490
|
+
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1491
|
+
var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
1492
|
+
var g = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
1493
|
+
var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
|
|
1494
|
+
return space.b7b(f.e7c(r), f.e7c(g), f.e7c(b), this.u7c_1);
|
|
1495
|
+
};
|
|
1496
|
+
protoOf(XYZ).p79 = function () {
|
|
1497
|
+
return this.w7c(RGBColorSpaces_getInstance().i7b_1);
|
|
1498
|
+
};
|
|
1499
|
+
protoOf(XYZ).q79 = function () {
|
|
1500
|
+
return this;
|
|
1501
|
+
};
|
|
1502
|
+
protoOf(XYZ).qg = function () {
|
|
1503
|
+
return this.r7c_1;
|
|
1504
|
+
};
|
|
1505
|
+
protoOf(XYZ).rg = function () {
|
|
1506
|
+
return this.s7c_1;
|
|
1507
|
+
};
|
|
1508
|
+
protoOf(XYZ).dm = function () {
|
|
1509
|
+
return this.t7c_1;
|
|
1510
|
+
};
|
|
1511
|
+
protoOf(XYZ).toString = function () {
|
|
1512
|
+
return 'XYZ(x=' + this.r7c_1 + ', y=' + this.s7c_1 + ', z=' + this.t7c_1 + ', alpha=' + this.u7c_1 + ', space=' + toString(this.v7c_1) + ')';
|
|
1513
|
+
};
|
|
1514
|
+
protoOf(XYZ).hashCode = function () {
|
|
1515
|
+
var result = getNumberHashCode(this.r7c_1);
|
|
1516
|
+
result = imul(result, 31) + getNumberHashCode(this.s7c_1) | 0;
|
|
1517
|
+
result = imul(result, 31) + getNumberHashCode(this.t7c_1) | 0;
|
|
1518
|
+
result = imul(result, 31) + getNumberHashCode(this.u7c_1) | 0;
|
|
1519
|
+
result = imul(result, 31) + hashCode(this.v7c_1) | 0;
|
|
1520
|
+
return result;
|
|
1521
|
+
};
|
|
1522
|
+
protoOf(XYZ).equals = function (other) {
|
|
1523
|
+
if (this === other)
|
|
1524
|
+
return true;
|
|
1525
|
+
if (!(other instanceof XYZ))
|
|
1526
|
+
return false;
|
|
1527
|
+
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1528
|
+
if (!equals(this.r7c_1, tmp0_other_with_cast.r7c_1))
|
|
1529
|
+
return false;
|
|
1530
|
+
if (!equals(this.s7c_1, tmp0_other_with_cast.s7c_1))
|
|
1531
|
+
return false;
|
|
1532
|
+
if (!equals(this.t7c_1, tmp0_other_with_cast.t7c_1))
|
|
1533
|
+
return false;
|
|
1534
|
+
if (!equals(this.u7c_1, tmp0_other_with_cast.u7c_1))
|
|
1535
|
+
return false;
|
|
1536
|
+
if (!equals(this.v7c_1, tmp0_other_with_cast.v7c_1))
|
|
1537
|
+
return false;
|
|
1538
|
+
return true;
|
|
1539
|
+
};
|
|
1540
|
+
function XYZColorSpace() {
|
|
1541
|
+
}
|
|
1542
|
+
function XYZColorSpace_0(whitePoint) {
|
|
1543
|
+
return whitePoint.equals(Illuminant_getInstance().h7a_1) ? XYZColorSpaces_getInstance().e7e_1 : whitePoint.equals(Illuminant_getInstance().f7a_1) ? XYZColorSpaces_getInstance().f7e_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1544
|
+
}
|
|
1545
|
+
function XYZColorSpaces() {
|
|
1546
|
+
XYZColorSpaces_instance = this;
|
|
1547
|
+
this.e7e_1 = new XYZColorSpaceImpl(Illuminant_getInstance().h7a_1);
|
|
1548
|
+
this.f7e_1 = new XYZColorSpaceImpl(Illuminant_getInstance().f7a_1);
|
|
1549
|
+
}
|
|
1550
|
+
var XYZColorSpaces_instance;
|
|
1551
|
+
function XYZColorSpaces_getInstance() {
|
|
1552
|
+
if (XYZColorSpaces_instance == null)
|
|
1553
|
+
new XYZColorSpaces();
|
|
1554
|
+
return XYZColorSpaces_instance;
|
|
1555
|
+
}
|
|
1556
|
+
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1557
|
+
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1558
|
+
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1559
|
+
var dstWp = _this__u8e3s4.l7c().b7a_1;
|
|
1560
|
+
var src = dot_0(xyzToLms, srcWp.b7e(), srcWp.z7d_1, srcWp.c7e());
|
|
1561
|
+
var dst = dot_0(xyzToLms, dstWp.b7e(), dstWp.z7d_1, dstWp.c7e());
|
|
1562
|
+
return dot(dotDiagonal(lmsToXyz, _Vector___get_l__impl__envr1l(dst) / _Vector___get_l__impl__envr1l(src), _Vector___get_m__impl__e5qq0m(dst) / _Vector___get_m__impl__e5qq0m(src), _Vector___get_s__impl__pzuljk(dst) / _Vector___get_s__impl__pzuljk(src)), xyzToLms);
|
|
1563
|
+
}
|
|
1564
|
+
function XYZColorSpaceImpl(whitePoint) {
|
|
1565
|
+
this.h7e_1 = whitePoint;
|
|
1566
|
+
this.i7e_1 = zeroOneComponentInfo('XYZ');
|
|
1567
|
+
}
|
|
1568
|
+
protoOf(XYZColorSpaceImpl).l7c = function () {
|
|
1569
|
+
return this.h7e_1;
|
|
1570
|
+
};
|
|
1571
|
+
protoOf(XYZColorSpaceImpl).n7a = function () {
|
|
1572
|
+
return this.i7e_1;
|
|
1573
|
+
};
|
|
1574
|
+
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1575
|
+
return 'XYZColorSpace(' + this.h7e_1.toString() + ')';
|
|
1576
|
+
};
|
|
1577
|
+
protoOf(XYZColorSpaceImpl).b7b = function (x, y, z, alpha) {
|
|
1578
|
+
return new XYZ(x, y, z, alpha, this);
|
|
1579
|
+
};
|
|
1580
|
+
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1581
|
+
return this.h7e_1.hashCode();
|
|
1582
|
+
};
|
|
1583
|
+
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1584
|
+
var tmp;
|
|
1585
|
+
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
1586
|
+
tmp = this.h7e_1.equals(other.l7c());
|
|
1587
|
+
} else {
|
|
1588
|
+
tmp = false;
|
|
1589
|
+
}
|
|
1590
|
+
return tmp;
|
|
1591
|
+
};
|
|
1592
|
+
function xyY_init_$Init$(x, y, Y, $this) {
|
|
1593
|
+
Y = Y === VOID ? 1.0 : Y;
|
|
1594
|
+
xyY.call($this, numberToDouble(x), numberToDouble(y), numberToDouble(Y));
|
|
1595
|
+
return $this;
|
|
1596
|
+
}
|
|
1597
|
+
function xyY_init_$Create$(x, y, Y) {
|
|
1598
|
+
return xyY_init_$Init$(x, y, Y, objectCreate(protoOf(xyY)));
|
|
1599
|
+
}
|
|
1600
|
+
function xyY(x, y, Y) {
|
|
1601
|
+
Y = Y === VOID ? 1.0 : Y;
|
|
1602
|
+
this.x7d_1 = x;
|
|
1603
|
+
this.y7d_1 = y;
|
|
1604
|
+
this.z7d_1 = Y;
|
|
1605
|
+
}
|
|
1606
|
+
protoOf(xyY).a7e = function () {
|
|
1607
|
+
return 1 - this.x7d_1 - this.y7d_1;
|
|
1608
|
+
};
|
|
1609
|
+
protoOf(xyY).b7e = function () {
|
|
1610
|
+
return this.x7d_1 * this.z7d_1 / this.y7d_1;
|
|
1611
|
+
};
|
|
1612
|
+
protoOf(xyY).c7e = function () {
|
|
1613
|
+
return (1 - this.x7d_1 - this.y7d_1) * this.z7d_1 / this.y7d_1;
|
|
1614
|
+
};
|
|
1615
|
+
protoOf(xyY).toString = function () {
|
|
1616
|
+
return 'xyY(x=' + this.x7d_1 + ', y=' + this.y7d_1 + ', Y=' + this.z7d_1 + ')';
|
|
1617
|
+
};
|
|
1618
|
+
protoOf(xyY).hashCode = function () {
|
|
1619
|
+
var result = getNumberHashCode(this.x7d_1);
|
|
1620
|
+
result = imul(result, 31) + getNumberHashCode(this.y7d_1) | 0;
|
|
1621
|
+
result = imul(result, 31) + getNumberHashCode(this.z7d_1) | 0;
|
|
1622
|
+
return result;
|
|
1623
|
+
};
|
|
1624
|
+
protoOf(xyY).equals = function (other) {
|
|
1625
|
+
if (this === other)
|
|
1626
|
+
return true;
|
|
1627
|
+
if (!(other instanceof xyY))
|
|
1628
|
+
return false;
|
|
1629
|
+
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1630
|
+
if (!equals(this.x7d_1, tmp0_other_with_cast.x7d_1))
|
|
1631
|
+
return false;
|
|
1632
|
+
if (!equals(this.y7d_1, tmp0_other_with_cast.y7d_1))
|
|
1633
|
+
return false;
|
|
1634
|
+
if (!equals(this.z7d_1, tmp0_other_with_cast.z7d_1))
|
|
1635
|
+
return false;
|
|
1636
|
+
return true;
|
|
1637
|
+
};
|
|
1638
|
+
//region block: post-declaration
|
|
1639
|
+
protoOf(Ansi16).q79 = toXYZ;
|
|
1640
|
+
protoOf(Ansi256).q79 = toXYZ;
|
|
1641
|
+
protoOf(HSV).q79 = toXYZ;
|
|
1642
|
+
protoOf(Companion_2).p7a = invoke$default;
|
|
1643
|
+
protoOf(Companion_2).u7a = invoke$default_0;
|
|
1644
|
+
protoOf(Companion_2).q7a = from255$default;
|
|
1645
|
+
protoOf(SRGB).p7a = invoke$default;
|
|
1646
|
+
protoOf(SRGB).u7a = invoke$default_0;
|
|
1647
|
+
protoOf(SRGB).q7a = from255$default;
|
|
1648
|
+
protoOf(RGBColorSpaceImpl).p7a = invoke$default;
|
|
1649
|
+
protoOf(RGBColorSpaceImpl).g7c = invoke;
|
|
1650
|
+
protoOf(RGBColorSpaceImpl).u7a = invoke$default_0;
|
|
1651
|
+
protoOf(RGBColorSpaceImpl).i7c = invoke_0;
|
|
1652
|
+
protoOf(RGBColorSpaceImpl).h7c = from255;
|
|
1653
|
+
protoOf(RGBColorSpaceImpl).q7a = from255$default;
|
|
1654
|
+
//endregion
|
|
1655
|
+
//region block: init
|
|
1656
|
+
PqNonlinearity_instance = new PqNonlinearity();
|
|
1657
|
+
LinearTransferFunctions_instance = new LinearTransferFunctions();
|
|
1658
|
+
SRGBTransferFunctions_instance = new SRGBTransferFunctions();
|
|
1659
|
+
ROMMTransferFunctions_instance = new ROMMTransferFunctions();
|
|
1660
|
+
//endregion
|
|
1661
|
+
//region block: exports
|
|
1662
|
+
_.$_$ = _.$_$ || {};
|
|
1663
|
+
_.$_$.a = Ansi16;
|
|
1664
|
+
_.$_$.b = Ansi256;
|
|
1665
|
+
_.$_$.c = Companion_getInstance_2;
|
|
1666
|
+
//endregion
|
|
1667
|
+
return _;
|
|
1668
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js')));
|
|
1669
|
+
|
|
1670
|
+
//# sourceMappingURL=colormath-root-colormath.js.map
|