@cruglobal/godtools-shared 1.0.2-SNAPSHOT.1500 → 1.0.2-SNAPSHOT.1502
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/Kermit-kermit-core.js +50 -50
- package/Kermit-kermit.js +12 -12
- package/antlr-kotlin-antlr-kotlin-runtime.js +3000 -3000
- package/colormath-root-colormath.js +1473 -1018
- package/colormath-root-colormath.js.map +1 -1
- package/fluid-locale.js +157 -157
- package/kotlin-kotlin-stdlib.js +331 -283
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +426 -426
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +2054 -2054
- package/kotlin-mpp-godtools-tool-parser-module-state.js +18 -18
- package/kotlinx-atomicfu.js +8 -8
- package/kotlinx-coroutines-core.js +102 -102
- package/package.json +1 -1
|
@@ -14,76 +14,78 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
19
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
20
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
21
|
-
var
|
|
22
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.o6;
|
|
18
|
+
var objectMeta = kotlin_kotlin.$_$.n6;
|
|
19
|
+
var setMetadataFor = kotlin_kotlin.$_$.p6;
|
|
20
|
+
var interfaceMeta = kotlin_kotlin.$_$.d6;
|
|
21
|
+
var toString = kotlin_kotlin.$_$.s6;
|
|
22
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.z;
|
|
23
|
+
var classMeta = kotlin_kotlin.$_$.t5;
|
|
24
|
+
var emptyMap = kotlin_kotlin.$_$.k3;
|
|
25
|
+
var VOID = kotlin_kotlin.$_$.d;
|
|
26
|
+
var Companion_instance = kotlin_kotlin.$_$.l2;
|
|
27
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.x1;
|
|
28
|
+
var createFailure = kotlin_kotlin.$_$.i9;
|
|
29
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a2;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.c9;
|
|
31
|
+
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.z1;
|
|
32
|
+
var startsWith = kotlin_kotlin.$_$.b8;
|
|
33
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
34
|
+
var endsWith = kotlin_kotlin.$_$.m7;
|
|
35
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.z2;
|
|
36
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
37
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.y2;
|
|
38
|
+
var Unit_instance = kotlin_kotlin.$_$.n2;
|
|
39
|
+
var get_lastIndex = kotlin_kotlin.$_$.x3;
|
|
40
|
+
var get_lastIndex_0 = kotlin_kotlin.$_$.z3;
|
|
41
|
+
var dropLast = kotlin_kotlin.$_$.l7;
|
|
42
|
+
var toDouble = kotlin_kotlin.$_$.g8;
|
|
43
|
+
var charSequenceLength = kotlin_kotlin.$_$.s5;
|
|
44
|
+
var coerceIn = kotlin_kotlin.$_$.a7;
|
|
45
|
+
var FloatCompanionObject_instance = kotlin_kotlin.$_$.i2;
|
|
46
|
+
var Enum = kotlin_kotlin.$_$.s8;
|
|
47
|
+
var equals = kotlin_kotlin.$_$.w5;
|
|
48
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
49
|
+
var dropLast_0 = kotlin_kotlin.$_$.i3;
|
|
50
|
+
var joinTo = kotlin_kotlin.$_$.w3;
|
|
51
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.c2;
|
|
52
|
+
var numberToInt = kotlin_kotlin.$_$.l6;
|
|
53
|
+
var roundToInt = kotlin_kotlin.$_$.u6;
|
|
54
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.s1;
|
|
55
|
+
var padStart = kotlin_kotlin.$_$.v7;
|
|
56
|
+
var charArrayOf = kotlin_kotlin.$_$.q5;
|
|
57
|
+
var trimEnd = kotlin_kotlin.$_$.n8;
|
|
58
|
+
var isNaN_0 = kotlin_kotlin.$_$.k9;
|
|
59
|
+
var joinTo_0 = kotlin_kotlin.$_$.v3;
|
|
60
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.m9;
|
|
61
|
+
var numberToDouble = kotlin_kotlin.$_$.k6;
|
|
62
|
+
var getStringHashCode = kotlin_kotlin.$_$.b6;
|
|
63
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;
|
|
64
|
+
var charSequenceGet = kotlin_kotlin.$_$.r5;
|
|
65
|
+
var toString_0 = kotlin_kotlin.$_$.w1;
|
|
66
|
+
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
67
|
+
var listOf = kotlin_kotlin.$_$.d4;
|
|
68
|
+
var to = kotlin_kotlin.$_$.r9;
|
|
69
|
+
var mapOf = kotlin_kotlin.$_$.f4;
|
|
70
|
+
var withSign = kotlin_kotlin.$_$.v6;
|
|
71
|
+
var get_PI = kotlin_kotlin.$_$.t6;
|
|
32
72
|
var coerceAtLeast = kotlin_kotlin.$_$.w6;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.b2;
|
|
50
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r1;
|
|
51
|
-
var indexOf = kotlin_kotlin.$_$.o7;
|
|
52
|
-
var take = kotlin_kotlin.$_$.a8;
|
|
53
|
-
var charArrayOf = kotlin_kotlin.$_$.o5;
|
|
54
|
-
var trimEnd = kotlin_kotlin.$_$.l8;
|
|
55
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.k9;
|
|
56
|
-
var isNaN_0 = kotlin_kotlin.$_$.i9;
|
|
57
|
-
var joinTo_0 = kotlin_kotlin.$_$.t3;
|
|
58
|
-
var numberToDouble = kotlin_kotlin.$_$.i6;
|
|
59
|
-
var getStringHashCode = kotlin_kotlin.$_$.z5;
|
|
60
|
-
var charSequenceGet = kotlin_kotlin.$_$.p5;
|
|
61
|
-
var toString = kotlin_kotlin.$_$.v1;
|
|
62
|
-
var copyToArray = kotlin_kotlin.$_$.f3;
|
|
63
|
-
var plus = kotlin_kotlin.$_$.g4;
|
|
64
|
-
var asList = kotlin_kotlin.$_$.v2;
|
|
65
|
-
var to = kotlin_kotlin.$_$.p9;
|
|
66
|
-
var mapOf = kotlin_kotlin.$_$.d4;
|
|
67
|
-
var withSign = kotlin_kotlin.$_$.t6;
|
|
68
|
-
var get_PI = kotlin_kotlin.$_$.r6;
|
|
69
|
-
var coerceAtLeast_0 = kotlin_kotlin.$_$.u6;
|
|
70
|
-
var getNumberHashCode = kotlin_kotlin.$_$.x5;
|
|
71
|
-
var numberToInt = kotlin_kotlin.$_$.j6;
|
|
72
|
-
var FloatCompanionObject_instance = kotlin_kotlin.$_$.h2;
|
|
73
|
-
var hashCode = kotlin_kotlin.$_$.a6;
|
|
74
|
-
var isInterface = kotlin_kotlin.$_$.e6;
|
|
75
|
-
var toString_0 = kotlin_kotlin.$_$.q6;
|
|
76
|
-
var get_lastIndex_0 = kotlin_kotlin.$_$.x3;
|
|
77
|
-
var DoubleCompanionObject_instance = kotlin_kotlin.$_$.g2;
|
|
78
|
-
var Char = kotlin_kotlin.$_$.n8;
|
|
79
|
-
var toInt = kotlin_kotlin.$_$.i8;
|
|
80
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.f6;
|
|
81
|
-
var slice = kotlin_kotlin.$_$.u7;
|
|
82
|
-
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.c2;
|
|
83
|
-
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.d2;
|
|
84
|
-
var toByte = kotlin_kotlin.$_$.o6;
|
|
85
|
-
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.a2;
|
|
86
|
-
var objectCreate = kotlin_kotlin.$_$.k6;
|
|
73
|
+
var getNumberHashCode = kotlin_kotlin.$_$.z5;
|
|
74
|
+
var hashCode = kotlin_kotlin.$_$.c6;
|
|
75
|
+
var isInterface = kotlin_kotlin.$_$.g6;
|
|
76
|
+
var objectCreate = kotlin_kotlin.$_$.m6;
|
|
77
|
+
var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h2;
|
|
78
|
+
var Char = kotlin_kotlin.$_$.p8;
|
|
79
|
+
var toInt = kotlin_kotlin.$_$.k8;
|
|
80
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.h6;
|
|
81
|
+
var slice = kotlin_kotlin.$_$.x7;
|
|
82
|
+
var contentEquals = kotlin_kotlin.$_$.c3;
|
|
83
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.y6;
|
|
84
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.d2;
|
|
85
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.e2;
|
|
86
|
+
var coerceIn_0 = kotlin_kotlin.$_$.b7;
|
|
87
|
+
var toByte = kotlin_kotlin.$_$.q6;
|
|
88
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.b2;
|
|
87
89
|
//endregion
|
|
88
90
|
//region block: pre-declaration
|
|
89
91
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
@@ -102,9 +104,15 @@
|
|
|
102
104
|
function toHWB() {
|
|
103
105
|
return this.j1k().d1l();
|
|
104
106
|
}
|
|
107
|
+
function toOklab() {
|
|
108
|
+
return this.q1k().e1l();
|
|
109
|
+
}
|
|
110
|
+
function toOklch() {
|
|
111
|
+
return this.e1l().f1l();
|
|
112
|
+
}
|
|
105
113
|
setMetadataFor(Color, 'Color', interfaceMeta);
|
|
106
|
-
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
107
114
|
setMetadataFor(ColorComponentInfo, 'ColorComponentInfo', classMeta);
|
|
115
|
+
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
108
116
|
setMetadataFor(PATTERNS, 'PATTERNS', objectMeta);
|
|
109
117
|
setMetadataFor(RenderCondition, 'RenderCondition', classMeta, Enum);
|
|
110
118
|
setMetadataFor(AngleUnit, 'AngleUnit', classMeta, Enum);
|
|
@@ -118,28 +126,33 @@
|
|
|
118
126
|
setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
|
|
119
127
|
setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
|
|
120
128
|
function invoke(l, a, b, alpha) {
|
|
121
|
-
return this.
|
|
129
|
+
return this.l1m(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
122
130
|
}
|
|
123
131
|
setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
124
132
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [LABColorSpace]);
|
|
125
133
|
setMetadataFor(LAB, 'LAB', classMeta, VOID, [Color]);
|
|
126
134
|
setMetadataFor(LABColorSpaces, 'LABColorSpaces', objectMeta);
|
|
127
135
|
setMetadataFor(LABColorSpaceImpl, 'LABColorSpaceImpl', classMeta, VOID, [LABColorSpace]);
|
|
128
|
-
setMetadataFor(
|
|
136
|
+
setMetadataFor(LCHabColorSpace, 'LCHabColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
137
|
+
setMetadataFor(Companion_3, 'Companion', objectMeta, VOID, [LCHabColorSpace]);
|
|
129
138
|
setMetadataFor(LCHab, 'LCHab', classMeta, VOID, [Color]);
|
|
130
139
|
setMetadataFor(LCHabColorSpaces, 'LCHabColorSpaces', objectMeta);
|
|
131
|
-
setMetadataFor(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', classMeta, VOID, [
|
|
140
|
+
setMetadataFor(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', classMeta, VOID, [LCHabColorSpace]);
|
|
141
|
+
setMetadataFor(Companion_4, 'Companion', objectMeta);
|
|
142
|
+
setMetadataFor(Oklab, 'Oklab', classMeta, VOID, [Color]);
|
|
143
|
+
setMetadataFor(Companion_5, 'Companion', objectMeta);
|
|
144
|
+
setMetadataFor(Oklch, 'Oklch', classMeta, VOID, [Color]);
|
|
132
145
|
setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
|
|
133
146
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
134
147
|
function invoke_0(r, g, b, alpha) {
|
|
135
|
-
return this.
|
|
148
|
+
return this.l1m(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
136
149
|
}
|
|
137
150
|
function from255(r, g, b, alpha) {
|
|
138
|
-
return this.
|
|
151
|
+
return this.l1m(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
139
152
|
}
|
|
140
153
|
function from255$default(r, g, b, alpha, $super) {
|
|
141
154
|
alpha = alpha === VOID ? 255 : alpha;
|
|
142
|
-
return $super === VOID ? this.
|
|
155
|
+
return $super === VOID ? this.p1o(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
143
156
|
}
|
|
144
157
|
function invoke_1(hex) {
|
|
145
158
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -155,30 +168,29 @@
|
|
|
155
168
|
} else {
|
|
156
169
|
tmp_2 = 255;
|
|
157
170
|
}
|
|
158
|
-
return this.
|
|
171
|
+
return this.p1o(tmp, tmp_0, tmp_1, tmp_2);
|
|
159
172
|
}
|
|
160
173
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
161
|
-
setMetadataFor(
|
|
174
|
+
setMetadataFor(Companion_6, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
162
175
|
setMetadataFor(RGB, 'RGB', classMeta, VOID, [Color]);
|
|
163
176
|
setMetadataFor(RGBColorSpaces, 'RGBColorSpaces', objectMeta);
|
|
164
177
|
setMetadataFor(SRGB, 'SRGB', objectMeta, VOID, [RGBColorSpace]);
|
|
178
|
+
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
179
|
+
setMetadataFor(SRGBTransferFunctions, 'SRGBTransferFunctions', objectMeta);
|
|
165
180
|
setMetadataFor(ACESccTransferFunctions, 'ACESccTransferFunctions', objectMeta);
|
|
166
181
|
setMetadataFor(ACEScctTransferFunctions, 'ACEScctTransferFunctions', objectMeta);
|
|
167
|
-
setMetadataFor(
|
|
182
|
+
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
168
183
|
setMetadataFor(BT709TransferFunctions, 'BT709TransferFunctions', objectMeta);
|
|
169
|
-
setMetadataFor(SRGBTransferFunctions, 'SRGBTransferFunctions', objectMeta);
|
|
170
184
|
setMetadataFor(ROMMTransferFunctions, 'ROMMTransferFunctions', objectMeta);
|
|
171
|
-
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
172
|
-
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
173
185
|
function invoke_2(x, y, z, alpha) {
|
|
174
|
-
return this.
|
|
186
|
+
return this.l1m(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
175
187
|
}
|
|
176
188
|
function invoke$default(x, y, z, alpha, $super) {
|
|
177
189
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
178
|
-
return $super === VOID ? this.
|
|
190
|
+
return $super === VOID ? this.j1p(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
179
191
|
}
|
|
180
192
|
setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
181
|
-
setMetadataFor(
|
|
193
|
+
setMetadataFor(Companion_7, 'Companion', objectMeta, VOID, [XYZColorSpace]);
|
|
182
194
|
setMetadataFor(XYZ, 'XYZ', classMeta, VOID, [Color]);
|
|
183
195
|
setMetadataFor(XYZColorSpaces, 'XYZColorSpaces', objectMeta);
|
|
184
196
|
setMetadataFor(XYZColorSpaceImpl, 'XYZColorSpaceImpl', classMeta, VOID, [XYZColorSpace]);
|
|
@@ -193,16 +205,26 @@
|
|
|
193
205
|
function Color() {
|
|
194
206
|
}
|
|
195
207
|
function convertTo(_this__u8e3s4, space) {
|
|
196
|
-
return space.
|
|
208
|
+
return space.k1l(_this__u8e3s4);
|
|
197
209
|
}
|
|
198
|
-
function
|
|
210
|
+
function ColorComponentInfo(name, isPolar, min, max) {
|
|
211
|
+
this.l1l_1 = name;
|
|
212
|
+
this.m1l_1 = isPolar;
|
|
213
|
+
this.n1l_1 = min;
|
|
214
|
+
this.o1l_1 = max;
|
|
215
|
+
// Inline function 'kotlin.require' call
|
|
216
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
217
|
+
if (!(this.n1l_1 <= this.o1l_1)) {
|
|
218
|
+
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
219
|
+
var message = 'min must be less than or equal to max';
|
|
220
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
221
|
+
}
|
|
199
222
|
}
|
|
200
|
-
function
|
|
201
|
-
this.i1l_1 = name;
|
|
202
|
-
this.j1l_1 = isPolar;
|
|
223
|
+
function WhitePointColorSpace() {
|
|
203
224
|
}
|
|
204
|
-
function parse(_this__u8e3s4, color) {
|
|
205
|
-
|
|
225
|
+
function parse(_this__u8e3s4, color, customColorSpaces) {
|
|
226
|
+
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
227
|
+
var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color, customColorSpaces);
|
|
206
228
|
var tmp;
|
|
207
229
|
if (tmp0_elvis_lhs == null) {
|
|
208
230
|
throw IllegalArgumentException_init_$Create$('Invalid color: ' + color);
|
|
@@ -211,8 +233,9 @@
|
|
|
211
233
|
}
|
|
212
234
|
return tmp;
|
|
213
235
|
}
|
|
214
|
-
function parseOrNull(_this__u8e3s4, color_0) {
|
|
215
|
-
|
|
236
|
+
function parseOrNull(_this__u8e3s4, color_0, customColorSpaces) {
|
|
237
|
+
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
238
|
+
var keywordColor = CssColors_getInstance().s1l_1.q2(color_0);
|
|
216
239
|
var tmp;
|
|
217
240
|
if (!(keywordColor == null)) {
|
|
218
241
|
tmp = keywordColor;
|
|
@@ -223,7 +246,7 @@
|
|
|
223
246
|
try {
|
|
224
247
|
// Inline function 'kotlin.Companion.success' call
|
|
225
248
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
226
|
-
var value =
|
|
249
|
+
var value = Companion_getInstance_6().k1m(color_0);
|
|
227
250
|
tmp_0 = _Result___init__impl__xyqfz8(value);
|
|
228
251
|
} catch ($p) {
|
|
229
252
|
var tmp_1;
|
|
@@ -246,7 +269,7 @@
|
|
|
246
269
|
}
|
|
247
270
|
tmp = tmp_2;
|
|
248
271
|
} else {
|
|
249
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().
|
|
272
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().z1l_1.l8(color_0);
|
|
250
273
|
var tmp_4;
|
|
251
274
|
if (tmp0_safe_receiver == null) {
|
|
252
275
|
tmp_4 = null;
|
|
@@ -259,7 +282,7 @@
|
|
|
259
282
|
var tmp2_elvis_lhs = tmp_4;
|
|
260
283
|
var tmp_5;
|
|
261
284
|
if (tmp2_elvis_lhs == null) {
|
|
262
|
-
var tmp1_safe_receiver = PATTERNS_getInstance().
|
|
285
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().a1m_1.l8(color_0);
|
|
263
286
|
var tmp_6;
|
|
264
287
|
if (tmp1_safe_receiver == null) {
|
|
265
288
|
tmp_6 = null;
|
|
@@ -276,7 +299,7 @@
|
|
|
276
299
|
var tmp4_elvis_lhs = tmp_5;
|
|
277
300
|
var tmp_7;
|
|
278
301
|
if (tmp4_elvis_lhs == null) {
|
|
279
|
-
var tmp3_safe_receiver = PATTERNS_getInstance().
|
|
302
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().b1m_1.l8(color_0);
|
|
280
303
|
var tmp_8;
|
|
281
304
|
if (tmp3_safe_receiver == null) {
|
|
282
305
|
tmp_8 = null;
|
|
@@ -284,7 +307,7 @@
|
|
|
284
307
|
// Inline function 'kotlin.let' call
|
|
285
308
|
// Inline function 'kotlin.contracts.contract' call
|
|
286
309
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
287
|
-
tmp_8 =
|
|
310
|
+
tmp_8 = hsl(tmp3_safe_receiver);
|
|
288
311
|
}
|
|
289
312
|
tmp_7 = tmp_8;
|
|
290
313
|
} else {
|
|
@@ -293,7 +316,7 @@
|
|
|
293
316
|
var tmp6_elvis_lhs = tmp_7;
|
|
294
317
|
var tmp_9;
|
|
295
318
|
if (tmp6_elvis_lhs == null) {
|
|
296
|
-
var tmp5_safe_receiver = PATTERNS_getInstance().
|
|
319
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().c1m_1.l8(color_0);
|
|
297
320
|
var tmp_10;
|
|
298
321
|
if (tmp5_safe_receiver == null) {
|
|
299
322
|
tmp_10 = null;
|
|
@@ -301,7 +324,7 @@
|
|
|
301
324
|
// Inline function 'kotlin.let' call
|
|
302
325
|
// Inline function 'kotlin.contracts.contract' call
|
|
303
326
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
304
|
-
tmp_10 =
|
|
327
|
+
tmp_10 = hsl(tmp5_safe_receiver);
|
|
305
328
|
}
|
|
306
329
|
tmp_9 = tmp_10;
|
|
307
330
|
} else {
|
|
@@ -310,7 +333,7 @@
|
|
|
310
333
|
var tmp8_elvis_lhs = tmp_9;
|
|
311
334
|
var tmp_11;
|
|
312
335
|
if (tmp8_elvis_lhs == null) {
|
|
313
|
-
var tmp7_safe_receiver = PATTERNS_getInstance().
|
|
336
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().d1m_1.l8(color_0);
|
|
314
337
|
var tmp_12;
|
|
315
338
|
if (tmp7_safe_receiver == null) {
|
|
316
339
|
tmp_12 = null;
|
|
@@ -318,7 +341,7 @@
|
|
|
318
341
|
// Inline function 'kotlin.let' call
|
|
319
342
|
// Inline function 'kotlin.contracts.contract' call
|
|
320
343
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
321
|
-
tmp_12 =
|
|
344
|
+
tmp_12 = lab(tmp7_safe_receiver);
|
|
322
345
|
}
|
|
323
346
|
tmp_11 = tmp_12;
|
|
324
347
|
} else {
|
|
@@ -327,7 +350,7 @@
|
|
|
327
350
|
var tmp10_elvis_lhs = tmp_11;
|
|
328
351
|
var tmp_13;
|
|
329
352
|
if (tmp10_elvis_lhs == null) {
|
|
330
|
-
var tmp9_safe_receiver = PATTERNS_getInstance().
|
|
353
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().e1m_1.l8(color_0);
|
|
331
354
|
var tmp_14;
|
|
332
355
|
if (tmp9_safe_receiver == null) {
|
|
333
356
|
tmp_14 = null;
|
|
@@ -335,7 +358,7 @@
|
|
|
335
358
|
// Inline function 'kotlin.let' call
|
|
336
359
|
// Inline function 'kotlin.contracts.contract' call
|
|
337
360
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
338
|
-
tmp_14 =
|
|
361
|
+
tmp_14 = lch(tmp9_safe_receiver);
|
|
339
362
|
}
|
|
340
363
|
tmp_13 = tmp_14;
|
|
341
364
|
} else {
|
|
@@ -344,7 +367,7 @@
|
|
|
344
367
|
var tmp12_elvis_lhs = tmp_13;
|
|
345
368
|
var tmp_15;
|
|
346
369
|
if (tmp12_elvis_lhs == null) {
|
|
347
|
-
var tmp11_safe_receiver = PATTERNS_getInstance().
|
|
370
|
+
var tmp11_safe_receiver = PATTERNS_getInstance().f1m_1.l8(color_0);
|
|
348
371
|
var tmp_16;
|
|
349
372
|
if (tmp11_safe_receiver == null) {
|
|
350
373
|
tmp_16 = null;
|
|
@@ -352,7 +375,7 @@
|
|
|
352
375
|
// Inline function 'kotlin.let' call
|
|
353
376
|
// Inline function 'kotlin.contracts.contract' call
|
|
354
377
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
355
|
-
tmp_16 =
|
|
378
|
+
tmp_16 = hwb(tmp11_safe_receiver);
|
|
356
379
|
}
|
|
357
380
|
tmp_15 = tmp_16;
|
|
358
381
|
} else {
|
|
@@ -361,7 +384,7 @@
|
|
|
361
384
|
var tmp14_elvis_lhs = tmp_15;
|
|
362
385
|
var tmp_17;
|
|
363
386
|
if (tmp14_elvis_lhs == null) {
|
|
364
|
-
var tmp13_safe_receiver = PATTERNS_getInstance().
|
|
387
|
+
var tmp13_safe_receiver = PATTERNS_getInstance().g1m_1.l8(color_0);
|
|
365
388
|
var tmp_18;
|
|
366
389
|
if (tmp13_safe_receiver == null) {
|
|
367
390
|
tmp_18 = null;
|
|
@@ -369,7 +392,7 @@
|
|
|
369
392
|
// Inline function 'kotlin.let' call
|
|
370
393
|
// Inline function 'kotlin.contracts.contract' call
|
|
371
394
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
372
|
-
tmp_18 =
|
|
395
|
+
tmp_18 = oklab(tmp13_safe_receiver);
|
|
373
396
|
}
|
|
374
397
|
tmp_17 = tmp_18;
|
|
375
398
|
} else {
|
|
@@ -378,7 +401,7 @@
|
|
|
378
401
|
var tmp16_elvis_lhs = tmp_17;
|
|
379
402
|
var tmp_19;
|
|
380
403
|
if (tmp16_elvis_lhs == null) {
|
|
381
|
-
var tmp15_safe_receiver = PATTERNS_getInstance().
|
|
404
|
+
var tmp15_safe_receiver = PATTERNS_getInstance().h1m_1.l8(color_0);
|
|
382
405
|
var tmp_20;
|
|
383
406
|
if (tmp15_safe_receiver == null) {
|
|
384
407
|
tmp_20 = null;
|
|
@@ -386,7 +409,7 @@
|
|
|
386
409
|
// Inline function 'kotlin.let' call
|
|
387
410
|
// Inline function 'kotlin.contracts.contract' call
|
|
388
411
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
389
|
-
tmp_20 =
|
|
412
|
+
tmp_20 = oklch(tmp15_safe_receiver);
|
|
390
413
|
}
|
|
391
414
|
tmp_19 = tmp_20;
|
|
392
415
|
} else {
|
|
@@ -395,7 +418,7 @@
|
|
|
395
418
|
var tmp18_elvis_lhs = tmp_19;
|
|
396
419
|
var tmp_21;
|
|
397
420
|
if (tmp18_elvis_lhs == null) {
|
|
398
|
-
var tmp17_safe_receiver = PATTERNS_getInstance().
|
|
421
|
+
var tmp17_safe_receiver = PATTERNS_getInstance().i1m_1.l8(color_0);
|
|
399
422
|
var tmp_22;
|
|
400
423
|
if (tmp17_safe_receiver == null) {
|
|
401
424
|
tmp_22 = null;
|
|
@@ -403,7 +426,7 @@
|
|
|
403
426
|
// Inline function 'kotlin.let' call
|
|
404
427
|
// Inline function 'kotlin.contracts.contract' call
|
|
405
428
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
406
|
-
tmp_22 = color(tmp17_safe_receiver);
|
|
429
|
+
tmp_22 = color(tmp17_safe_receiver, customColorSpaces);
|
|
407
430
|
}
|
|
408
431
|
tmp_21 = tmp_22;
|
|
409
432
|
} else {
|
|
@@ -415,22 +438,22 @@
|
|
|
415
438
|
}
|
|
416
439
|
function PATTERNS() {
|
|
417
440
|
PATTERNS_instance = this;
|
|
418
|
-
this.
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
422
|
-
this.
|
|
423
|
-
this.
|
|
424
|
-
this.
|
|
425
|
-
this.
|
|
426
|
-
this.
|
|
427
|
-
this.
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
432
|
-
this.
|
|
433
|
-
this.
|
|
441
|
+
this.t1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
442
|
+
this.u1l_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)';
|
|
443
|
+
this.v1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
444
|
+
this.w1l_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
445
|
+
this.x1l_1 = '\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
446
|
+
this.y1l_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)';
|
|
447
|
+
this.z1l_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
448
|
+
this.a1m_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
449
|
+
this.b1m_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
450
|
+
this.c1m_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
451
|
+
this.d1m_1 = Regex_init_$Create$('lab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
452
|
+
this.e1m_1 = Regex_init_$Create$('lch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
453
|
+
this.f1m_1 = Regex_init_$Create$('hwb\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
454
|
+
this.g1m_1 = Regex_init_$Create$('oklab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
455
|
+
this.h1m_1 = Regex_init_$Create$('oklch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
456
|
+
this.i1m_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)(?:\\s+(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
434
457
|
}
|
|
435
458
|
var PATTERNS_instance;
|
|
436
459
|
function PATTERNS_getInstance() {
|
|
@@ -439,118 +462,167 @@
|
|
|
439
462
|
return PATTERNS_instance;
|
|
440
463
|
}
|
|
441
464
|
function rgb(match) {
|
|
442
|
-
var r = percentOrNumber(match.p9().b1(1));
|
|
443
|
-
var g = percentOrNumber(match.p9().b1(2));
|
|
444
|
-
var b = percentOrNumber(match.p9().b1(3));
|
|
465
|
+
var r = percentOrNumber(match.p9().b1(1), Companion_getInstance_6().q1l().b1(0).o1l_1);
|
|
466
|
+
var g = percentOrNumber(match.p9().b1(2), Companion_getInstance_6().q1l().b1(1).o1l_1);
|
|
467
|
+
var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_6().q1l().b1(2).o1l_1);
|
|
445
468
|
var a = alpha(match.p9().b1(4));
|
|
446
469
|
var tmp;
|
|
447
470
|
if (endsWith(match.p9().b1(1), '%')) {
|
|
448
|
-
tmp =
|
|
471
|
+
tmp = Companion_getInstance_6().l1m(r, g, b, a);
|
|
449
472
|
} else {
|
|
450
|
-
tmp =
|
|
473
|
+
tmp = Companion_getInstance_6().l1m(r / 255.0, g / 255.0, b / 255.0, a);
|
|
451
474
|
}
|
|
452
475
|
return tmp;
|
|
453
476
|
}
|
|
454
477
|
function hsl(match) {
|
|
455
478
|
var h = hue(match.p9().b1(1));
|
|
456
|
-
var s =
|
|
457
|
-
var l =
|
|
479
|
+
var s = percentOrNumber(match.p9().b1(2), Companion_getInstance_0().m1m_1.b1(1).o1l_1);
|
|
480
|
+
var l = percentOrNumber(match.p9().b1(3), Companion_getInstance_0().m1m_1.b1(2).o1l_1);
|
|
458
481
|
var a = alpha(match.p9().b1(4));
|
|
459
|
-
return new HSL(h,
|
|
482
|
+
return new HSL(h, s, l, a);
|
|
460
483
|
}
|
|
461
484
|
function lab(match) {
|
|
462
|
-
var l =
|
|
463
|
-
var a =
|
|
464
|
-
var b =
|
|
485
|
+
var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_2().q1l().b1(0).o1l_1);
|
|
486
|
+
var a = percentOrNumber(match.p9().b1(2), Companion_getInstance_2().q1l().b1(1).o1l_1);
|
|
487
|
+
var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_2().q1l().b1(2).o1l_1);
|
|
465
488
|
var alpha_0 = alpha(match.p9().b1(4));
|
|
466
|
-
return
|
|
489
|
+
return LABColorSpaces_getInstance().p1m_1.l1m(l, a, b, alpha_0);
|
|
467
490
|
}
|
|
468
491
|
function lch(match) {
|
|
469
|
-
var l =
|
|
470
|
-
var c =
|
|
492
|
+
var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_3().q1l().b1(0).o1l_1);
|
|
493
|
+
var c = percentOrNumber(match.p9().b1(2), Companion_getInstance_3().q1l().b1(1).o1l_1);
|
|
471
494
|
var h = hue(match.p9().b1(3));
|
|
472
495
|
var a = alpha(match.p9().b1(4));
|
|
473
|
-
return
|
|
496
|
+
return LCHabColorSpaces_getInstance().s1m_1.l1m(l, c, h, a);
|
|
474
497
|
}
|
|
475
498
|
function hwb(match) {
|
|
476
499
|
var h = hue(match.p9().b1(1));
|
|
477
|
-
var w =
|
|
478
|
-
var b =
|
|
500
|
+
var w = percentOrNumber(match.p9().b1(2), Companion_getInstance_1().t1m_1.b1(1).o1l_1);
|
|
501
|
+
var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_1().t1m_1.b1(2).o1l_1);
|
|
502
|
+
var a = alpha(match.p9().b1(4));
|
|
503
|
+
return new HWB(h, w, b, a);
|
|
504
|
+
}
|
|
505
|
+
function oklab(match) {
|
|
506
|
+
var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_4().u1m_1.b1(0).o1l_1);
|
|
507
|
+
var a = percentOrNumber(match.p9().b1(2), Companion_getInstance_4().u1m_1.b1(1).o1l_1);
|
|
508
|
+
var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_4().u1m_1.b1(2).o1l_1);
|
|
509
|
+
var alpha_0 = alpha(match.p9().b1(4));
|
|
510
|
+
return new Oklab(l, a, b, alpha_0);
|
|
511
|
+
}
|
|
512
|
+
function oklch(match) {
|
|
513
|
+
var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_5().v1m_1.b1(0).o1l_1);
|
|
514
|
+
var c = percentOrNumber(match.p9().b1(2), Companion_getInstance_5().v1m_1.b1(1).o1l_1);
|
|
515
|
+
var h = hue(match.p9().b1(3));
|
|
479
516
|
var a = alpha(match.p9().b1(4));
|
|
480
|
-
return new
|
|
517
|
+
return new Oklch(l, c, h, a);
|
|
481
518
|
}
|
|
482
|
-
function color(match) {
|
|
519
|
+
function color(match, customColorSpaces) {
|
|
520
|
+
var name = match.p9().b1(1);
|
|
483
521
|
var tmp;
|
|
484
|
-
switch (
|
|
522
|
+
switch (name) {
|
|
485
523
|
case 'srgb':
|
|
486
524
|
tmp = SRGB_getInstance();
|
|
487
525
|
break;
|
|
526
|
+
case 'srgb-linear':
|
|
527
|
+
tmp = RGBColorSpaces_getInstance().x1m_1;
|
|
528
|
+
break;
|
|
488
529
|
case 'display-p3':
|
|
489
|
-
tmp = RGBColorSpaces_getInstance().
|
|
530
|
+
tmp = RGBColorSpaces_getInstance().g1n_1;
|
|
490
531
|
break;
|
|
491
532
|
case 'a98-rgb':
|
|
492
|
-
tmp = RGBColorSpaces_getInstance().
|
|
533
|
+
tmp = RGBColorSpaces_getInstance().c1n_1;
|
|
493
534
|
break;
|
|
494
535
|
case 'prophoto-rgb':
|
|
495
|
-
tmp = RGBColorSpaces_getInstance().
|
|
536
|
+
tmp = RGBColorSpaces_getInstance().h1n_1;
|
|
496
537
|
break;
|
|
497
538
|
case 'rec2020':
|
|
498
|
-
tmp = RGBColorSpaces_getInstance().
|
|
539
|
+
tmp = RGBColorSpaces_getInstance().d1n_1;
|
|
499
540
|
break;
|
|
500
541
|
case 'xyz':
|
|
501
|
-
|
|
542
|
+
case 'xyz-d50':
|
|
543
|
+
tmp = XYZColorSpaces_getInstance().j1n_1;
|
|
544
|
+
break;
|
|
545
|
+
case 'xyz-d65':
|
|
546
|
+
tmp = XYZColorSpaces_getInstance().i1n_1;
|
|
502
547
|
break;
|
|
503
548
|
default:
|
|
504
|
-
|
|
549
|
+
var tmp$ret$1;
|
|
550
|
+
$l$block: {
|
|
551
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
552
|
+
var tmp0_iterator = customColorSpaces.i2().s();
|
|
553
|
+
while (tmp0_iterator.t()) {
|
|
554
|
+
var element = tmp0_iterator.u();
|
|
555
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
556
|
+
if (element.j2() === name) {
|
|
557
|
+
tmp$ret$1 = element;
|
|
558
|
+
break $l$block;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
tmp$ret$1 = null;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
565
|
+
tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k2();
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
var tmp1_elvis_lhs = tmp;
|
|
569
|
+
var tmp_0;
|
|
570
|
+
if (tmp1_elvis_lhs == null) {
|
|
571
|
+
return null;
|
|
572
|
+
} else {
|
|
573
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
505
574
|
}
|
|
506
|
-
var space =
|
|
507
|
-
// Inline function 'kotlin.collections.
|
|
575
|
+
var space = tmp_0;
|
|
576
|
+
// Inline function 'kotlin.collections.mapIndexed' call
|
|
508
577
|
// Inline function 'kotlin.text.split' call
|
|
509
578
|
var this_0 = match.p9().b1(2);
|
|
510
579
|
var this_1 = Regex_init_$Create$('\\s+').u8(this_0, 0);
|
|
511
|
-
// Inline function 'kotlin.collections.
|
|
580
|
+
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
512
581
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
513
|
-
var
|
|
514
|
-
|
|
515
|
-
|
|
582
|
+
var index = 0;
|
|
583
|
+
var tmp0_iterator_0 = this_1.s();
|
|
584
|
+
while (tmp0_iterator_0.t()) {
|
|
585
|
+
var item = tmp0_iterator_0.u();
|
|
516
586
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
517
|
-
var
|
|
518
|
-
|
|
587
|
+
var tmp1 = index;
|
|
588
|
+
index = tmp1 + 1 | 0;
|
|
589
|
+
var i = checkIndexOverflow(tmp1);
|
|
590
|
+
var tmp$ret$3 = percentOrNumber(item, space.q1l().b1(i).o1l_1);
|
|
591
|
+
destination.p(tmp$ret$3);
|
|
519
592
|
}
|
|
520
593
|
var values = destination;
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
var
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
537
|
-
tmp_2 = 0.0;
|
|
594
|
+
var tmp_1 = 0;
|
|
595
|
+
var tmp_2 = space.q1l().l();
|
|
596
|
+
var tmp_3 = new Float32Array(tmp_2);
|
|
597
|
+
while (tmp_1 < tmp_2) {
|
|
598
|
+
var tmp_4 = tmp_1;
|
|
599
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
600
|
+
var tmp_5;
|
|
601
|
+
if (tmp_4 >= 0 ? tmp_4 <= get_lastIndex(values) : false) {
|
|
602
|
+
tmp_5 = values.b1(tmp_4);
|
|
603
|
+
} else {
|
|
604
|
+
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
605
|
+
tmp_5 = 0.0;
|
|
606
|
+
}
|
|
607
|
+
tmp_3[tmp_4] = tmp_5;
|
|
608
|
+
tmp_1 = tmp_1 + 1 | 0;
|
|
538
609
|
}
|
|
539
|
-
var
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
610
|
+
var components = tmp_3;
|
|
611
|
+
components[get_lastIndex_0(components)] = alpha(match.p9().b1(3));
|
|
612
|
+
return space.r1l(components);
|
|
613
|
+
}
|
|
614
|
+
function percentOrNumber(str, max) {
|
|
615
|
+
var tmp;
|
|
616
|
+
if (endsWith(str, '%')) {
|
|
617
|
+
// Inline function 'kotlin.text.toFloat' call
|
|
618
|
+
var this_0 = dropLast(str, 1);
|
|
619
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
620
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
621
|
+
tmp = toDouble(this_0) * max / 100.0;
|
|
544
622
|
} else {
|
|
545
|
-
|
|
546
|
-
tmp_4 = 0.0;
|
|
623
|
+
tmp = number(str);
|
|
547
624
|
}
|
|
548
|
-
|
|
549
|
-
var tmp$ret$10 = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.p9().b1(3))]);
|
|
550
|
-
return space.h1l(tmp$ret$10);
|
|
551
|
-
}
|
|
552
|
-
function percentOrNumber(str) {
|
|
553
|
-
return endsWith(str, '%') ? percent(str) : number(str);
|
|
625
|
+
return tmp;
|
|
554
626
|
}
|
|
555
627
|
function alpha(str) {
|
|
556
628
|
var tmp;
|
|
@@ -558,21 +630,9 @@
|
|
|
558
630
|
if (charSequenceLength(str) === 0) {
|
|
559
631
|
tmp = 1.0;
|
|
560
632
|
} else {
|
|
561
|
-
tmp = percentOrNumber(str);
|
|
633
|
+
tmp = percentOrNumber(str, 1.0);
|
|
562
634
|
}
|
|
563
|
-
return
|
|
564
|
-
}
|
|
565
|
-
function clampF(_this__u8e3s4, min, max) {
|
|
566
|
-
min = min === VOID ? 0.0 : min;
|
|
567
|
-
max = max === VOID ? 1.0 : max;
|
|
568
|
-
return coerceIn(_this__u8e3s4, min, max);
|
|
569
|
-
}
|
|
570
|
-
function clampInt(_this__u8e3s4, min, max) {
|
|
571
|
-
min = min === VOID ? 0 : min;
|
|
572
|
-
max = max === VOID ? 255 : max;
|
|
573
|
-
// Inline function 'kotlin.math.roundToInt' call
|
|
574
|
-
var tmp$ret$0 = roundToInt(_this__u8e3s4);
|
|
575
|
-
return coerceIn_0(tmp$ret$0, min, max);
|
|
635
|
+
return coerceIn(tmp, 0.0, 1.0);
|
|
576
636
|
}
|
|
577
637
|
function hue(str) {
|
|
578
638
|
var tmp;
|
|
@@ -603,27 +663,22 @@
|
|
|
603
663
|
// Inline function 'kotlin.js.asDynamic' call
|
|
604
664
|
var tmp$ret$11 = toDouble(this_3);
|
|
605
665
|
tmp = turnToDeg(tmp$ret$11);
|
|
666
|
+
} else {
|
|
667
|
+
tmp = number(str);
|
|
668
|
+
}
|
|
669
|
+
return normalizeDeg_0(tmp);
|
|
670
|
+
}
|
|
671
|
+
function number(str) {
|
|
672
|
+
var tmp;
|
|
673
|
+
if (str === 'none') {
|
|
674
|
+
tmp = NaN;
|
|
606
675
|
} else {
|
|
607
676
|
// Inline function 'kotlin.text.toFloat' call
|
|
608
677
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
609
678
|
// Inline function 'kotlin.js.asDynamic' call
|
|
610
679
|
tmp = toDouble(str);
|
|
611
680
|
}
|
|
612
|
-
|
|
613
|
-
return normalizeDeg_0(deg);
|
|
614
|
-
}
|
|
615
|
-
function percent(str) {
|
|
616
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
617
|
-
var this_0 = dropLast(str, 1);
|
|
618
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
619
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
620
|
-
return toDouble(this_0) / 100.0;
|
|
621
|
-
}
|
|
622
|
-
function number(str) {
|
|
623
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
624
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
625
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
626
|
-
return toDouble(str);
|
|
681
|
+
return tmp;
|
|
627
682
|
}
|
|
628
683
|
var RenderCondition_ALWAYS_instance;
|
|
629
684
|
var RenderCondition_NEVER_instance;
|
|
@@ -640,15 +695,16 @@
|
|
|
640
695
|
function RenderCondition(name, ordinal) {
|
|
641
696
|
Enum.call(this, name, ordinal);
|
|
642
697
|
}
|
|
643
|
-
function formatCssString(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat) {
|
|
698
|
+
function formatCssString(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces) {
|
|
644
699
|
hueUnit = hueUnit === VOID ? AngleUnit_AUTO_getInstance() : hueUnit;
|
|
645
700
|
renderAlpha = renderAlpha === VOID ? RenderCondition_AUTO_getInstance() : renderAlpha;
|
|
646
701
|
unitsPercent = unitsPercent === VOID ? false : unitsPercent;
|
|
647
702
|
alphaPercent = alphaPercent === VOID ? false : alphaPercent;
|
|
648
703
|
legacyName = legacyName === VOID ? false : legacyName;
|
|
649
704
|
legacyFormat = legacyFormat === VOID ? false : legacyFormat;
|
|
650
|
-
|
|
651
|
-
|
|
705
|
+
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
706
|
+
var tmp0_elvis_lhs = formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces);
|
|
707
|
+
return tmp0_elvis_lhs == null ? renderFn(_this__u8e3s4, get_dashName(_this__u8e3s4), unitsPercent, alphaPercent, renderAlpha) : tmp0_elvis_lhs;
|
|
652
708
|
}
|
|
653
709
|
var AngleUnit_AUTO_instance;
|
|
654
710
|
var AngleUnit_DEGREES_instance;
|
|
@@ -669,52 +725,93 @@
|
|
|
669
725
|
function AngleUnit(name, ordinal) {
|
|
670
726
|
Enum.call(this, name, ordinal);
|
|
671
727
|
}
|
|
672
|
-
function formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat) {
|
|
728
|
+
function formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces) {
|
|
673
729
|
hueUnit = hueUnit === VOID ? AngleUnit_AUTO_getInstance() : hueUnit;
|
|
674
730
|
renderAlpha = renderAlpha === VOID ? RenderCondition_AUTO_getInstance() : renderAlpha;
|
|
675
731
|
unitsPercent = unitsPercent === VOID ? false : unitsPercent;
|
|
676
732
|
alphaPercent = alphaPercent === VOID ? false : alphaPercent;
|
|
677
733
|
legacyName = legacyName === VOID ? false : legacyName;
|
|
678
734
|
legacyFormat = legacyFormat === VOID ? false : legacyFormat;
|
|
735
|
+
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
736
|
+
var tmp$ret$1;
|
|
737
|
+
$l$block: {
|
|
738
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
739
|
+
var tmp0_iterator = customColorSpaces.i2().s();
|
|
740
|
+
while (tmp0_iterator.t()) {
|
|
741
|
+
var element = tmp0_iterator.u();
|
|
742
|
+
// Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
|
|
743
|
+
if (equals(element.k2(), _this__u8e3s4.i1k())) {
|
|
744
|
+
tmp$ret$1 = element;
|
|
745
|
+
break $l$block;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
tmp$ret$1 = null;
|
|
749
|
+
}
|
|
750
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
751
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j2();
|
|
679
752
|
var tmp;
|
|
680
|
-
if (
|
|
681
|
-
|
|
682
|
-
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().q1m_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().m1m_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().r1m_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().n1m_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
753
|
+
if (tmp1_safe_receiver == null) {
|
|
754
|
+
tmp = null;
|
|
683
755
|
} else {
|
|
684
|
-
|
|
685
|
-
|
|
756
|
+
// Inline function 'kotlin.let' call
|
|
757
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
758
|
+
// Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
|
|
759
|
+
tmp = renderFn(_this__u8e3s4, tmp1_safe_receiver, unitsPercent, alphaPercent, renderAlpha);
|
|
760
|
+
}
|
|
761
|
+
var tmp5_elvis_lhs = tmp;
|
|
762
|
+
var tmp_0;
|
|
763
|
+
if (tmp5_elvis_lhs == null) {
|
|
764
|
+
var tmp_1;
|
|
765
|
+
if (_this__u8e3s4 instanceof RGB) {
|
|
766
|
+
var tmp3_subject = _this__u8e3s4.p1k_1;
|
|
767
|
+
tmp_1 = equals(tmp3_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().g1n_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().c1n_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().h1n_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().d1n_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().x1m_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
686
768
|
} else {
|
|
687
|
-
if (_this__u8e3s4 instanceof
|
|
688
|
-
|
|
769
|
+
if (_this__u8e3s4 instanceof HSL) {
|
|
770
|
+
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
689
771
|
} else {
|
|
690
|
-
if (_this__u8e3s4 instanceof
|
|
691
|
-
|
|
772
|
+
if (_this__u8e3s4 instanceof LAB) {
|
|
773
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().p1m_1), alphaPercent, renderAlpha);
|
|
692
774
|
} else {
|
|
693
|
-
if (_this__u8e3s4 instanceof
|
|
694
|
-
|
|
775
|
+
if (_this__u8e3s4 instanceof LCHab) {
|
|
776
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().s1m_1), hueUnit, alphaPercent, renderAlpha);
|
|
695
777
|
} else {
|
|
696
|
-
if (_this__u8e3s4 instanceof
|
|
697
|
-
|
|
778
|
+
if (_this__u8e3s4 instanceof HWB) {
|
|
779
|
+
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
698
780
|
} else {
|
|
699
|
-
|
|
781
|
+
if (_this__u8e3s4 instanceof Oklab) {
|
|
782
|
+
tmp_1 = renderOklab(_this__u8e3s4, alphaPercent, renderAlpha);
|
|
783
|
+
} else {
|
|
784
|
+
if (_this__u8e3s4 instanceof Oklch) {
|
|
785
|
+
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
786
|
+
} else {
|
|
787
|
+
if (_this__u8e3s4 instanceof XYZ) {
|
|
788
|
+
tmp_1 = _this__u8e3s4.w1k_1.p1l().equals(Illuminant_getInstance().q1n_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.k1n(XYZColorSpaces_getInstance().j1n_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
789
|
+
} else {
|
|
790
|
+
tmp_1 = null;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
700
794
|
}
|
|
701
795
|
}
|
|
702
796
|
}
|
|
703
797
|
}
|
|
704
798
|
}
|
|
799
|
+
tmp_0 = tmp_1;
|
|
800
|
+
} else {
|
|
801
|
+
tmp_0 = tmp5_elvis_lhs;
|
|
705
802
|
}
|
|
706
|
-
return
|
|
803
|
+
return tmp_0;
|
|
707
804
|
}
|
|
708
|
-
function
|
|
805
|
+
function renderFn(_this__u8e3s4, name, unitsPercent, alphaPercent, renderAlpha_0) {
|
|
709
806
|
// Inline function 'kotlin.text.buildString' call
|
|
710
807
|
// Inline function 'kotlin.contracts.contract' call
|
|
711
808
|
// Inline function 'kotlin.apply' call
|
|
712
809
|
var this_0 = StringBuilder_init_$Create$();
|
|
713
810
|
// Inline function 'kotlin.contracts.contract' call
|
|
714
|
-
// Inline function 'com.github.ajalt.colormath.
|
|
811
|
+
// Inline function 'com.github.ajalt.colormath.renderFn.<anonymous>' call
|
|
715
812
|
this_0.m5('color(').m5(name).m5(' ');
|
|
716
813
|
var tmp = dropLast_0(_this__u8e3s4.z2(), 1);
|
|
717
|
-
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID,
|
|
814
|
+
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
|
|
718
815
|
this_0.m5(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
719
816
|
this_0.m5(')');
|
|
720
817
|
return this_0.toString();
|
|
@@ -727,52 +824,46 @@
|
|
|
727
824
|
return '--' + Regex_init_$Create$('\\W').m8(this_0, '-').toLowerCase();
|
|
728
825
|
}
|
|
729
826
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
730
|
-
return
|
|
827
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.l1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.t1n())), rgbPercent ? render(_this__u8e3s4.m1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.t1n())), rgbPercent ? render(_this__u8e3s4.n1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.t1n()))], alphaPercent, renderAlpha, commas);
|
|
731
828
|
}
|
|
732
829
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
733
|
-
return
|
|
830
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.v1n_1, true), render(_this__u8e3s4.w1n_1, true)], alphaPercent, renderAlpha, commas);
|
|
734
831
|
}
|
|
735
832
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
736
|
-
return
|
|
833
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.y1k_1 / 100, true), render(_this__u8e3s4.z1k_1), render(_this__u8e3s4.a1l_1)], alphaPercent, renderAlpha);
|
|
737
834
|
}
|
|
738
835
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
739
|
-
return
|
|
836
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.y1n_1 / 100, true), render(_this__u8e3s4.z1n_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
740
837
|
}
|
|
741
838
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
742
|
-
return
|
|
839
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.e1o_1, true), render(_this__u8e3s4.f1o_1, true)], alphaPercent, renderAlpha);
|
|
840
|
+
}
|
|
841
|
+
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
842
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.g1l_1, true), render(_this__u8e3s4.h1l_1), render(_this__u8e3s4.i1l_1)], alphaPercent, renderAlpha);
|
|
743
843
|
}
|
|
744
|
-
function
|
|
844
|
+
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
845
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.h1o_1, true), render(_this__u8e3s4.i1o_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
846
|
+
}
|
|
847
|
+
function render(_this__u8e3s4, percent, precision) {
|
|
745
848
|
percent = percent === VOID ? false : percent;
|
|
849
|
+
precision = precision === VOID ? 4 : precision;
|
|
746
850
|
var tmp;
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
default:
|
|
764
|
-
var str = _this__u8e3s4.toString();
|
|
765
|
-
var s = startsWith(str, '.') ? '0' + str : str;
|
|
766
|
-
var i = indexOf(s, _Char___init__impl__6a9atx(46));
|
|
767
|
-
tmp_0 = i < 0 ? s : trimEnd(trimEnd(take(s, i + 5 | 0), charArrayOf([_Char___init__impl__6a9atx(48)])), charArrayOf([_Char___init__impl__6a9atx(46)]));
|
|
768
|
-
break;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
tmp = tmp_0;
|
|
772
|
-
break;
|
|
773
|
-
default:
|
|
774
|
-
noWhenBranchMatchedException();
|
|
775
|
-
break;
|
|
851
|
+
if (isNaN_0(_this__u8e3s4)) {
|
|
852
|
+
tmp = 'none';
|
|
853
|
+
} else if (percent) {
|
|
854
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
855
|
+
var this_0 = _this__u8e3s4 * 100;
|
|
856
|
+
tmp = '' + roundToInt(this_0) + '%';
|
|
857
|
+
} else {
|
|
858
|
+
// Inline function 'kotlin.math.absoluteValue' call
|
|
859
|
+
var abs = Math.abs(_this__u8e3s4);
|
|
860
|
+
var i = numberToInt(abs);
|
|
861
|
+
var sgn = _this__u8e3s4 < 0.0 ? '-' : '';
|
|
862
|
+
var tmp_0 = abs - i;
|
|
863
|
+
// Inline function 'kotlin.math.pow' call
|
|
864
|
+
var tmp$ret$2 = Math.pow(10.0, precision);
|
|
865
|
+
var d = roundToInt(tmp_0 * tmp$ret$2);
|
|
866
|
+
tmp = d === 0 ? numberToInt(_this__u8e3s4).toString() : sgn + i + '.' + trimEnd(padStart(d.toString(), precision, _Char___init__impl__6a9atx(48)), charArrayOf([_Char___init__impl__6a9atx(48)]));
|
|
776
867
|
}
|
|
777
868
|
return tmp;
|
|
778
869
|
}
|
|
@@ -785,14 +876,14 @@
|
|
|
785
876
|
}
|
|
786
877
|
return tmp;
|
|
787
878
|
}
|
|
788
|
-
function
|
|
879
|
+
function renderColorFn(_this__u8e3s4, name, components, alphaPercent, renderAlpha_0, commas) {
|
|
789
880
|
commas = commas === VOID ? false : commas;
|
|
790
881
|
// Inline function 'kotlin.text.buildString' call
|
|
791
882
|
// Inline function 'kotlin.contracts.contract' call
|
|
792
883
|
// Inline function 'kotlin.apply' call
|
|
793
884
|
var this_0 = StringBuilder_init_$Create$();
|
|
794
885
|
// Inline function 'kotlin.contracts.contract' call
|
|
795
|
-
// Inline function 'com.github.ajalt.colormath.
|
|
886
|
+
// Inline function 'com.github.ajalt.colormath.renderColorFn.<anonymous>' call
|
|
796
887
|
var sep = commas ? ', ' : ' ';
|
|
797
888
|
this_0.m5(name).m5('(');
|
|
798
889
|
joinTo_0(components, this_0, sep);
|
|
@@ -802,29 +893,35 @@
|
|
|
802
893
|
}
|
|
803
894
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
804
895
|
var tmp;
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
896
|
+
if (isNaN_0(_this__u8e3s4.l1o())) {
|
|
897
|
+
tmp = 'none';
|
|
898
|
+
} else {
|
|
899
|
+
var tmp_0;
|
|
900
|
+
switch (hueUnit.a9_1) {
|
|
901
|
+
case 0:
|
|
902
|
+
tmp_0 = render(_this__u8e3s4.l1o());
|
|
903
|
+
break;
|
|
904
|
+
case 1:
|
|
905
|
+
tmp_0 = render(_this__u8e3s4.l1o()) + 'deg';
|
|
906
|
+
break;
|
|
907
|
+
case 2:
|
|
908
|
+
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
909
|
+
break;
|
|
910
|
+
case 3:
|
|
911
|
+
tmp_0 = render(hueAsGrad(_this__u8e3s4)) + 'grad';
|
|
912
|
+
break;
|
|
913
|
+
case 4:
|
|
914
|
+
tmp_0 = render(hueAsTurns(_this__u8e3s4)) + 'turn';
|
|
915
|
+
break;
|
|
916
|
+
default:
|
|
917
|
+
noWhenBranchMatchedException();
|
|
918
|
+
break;
|
|
919
|
+
}
|
|
920
|
+
tmp = tmp_0;
|
|
824
921
|
}
|
|
825
922
|
return tmp;
|
|
826
923
|
}
|
|
827
|
-
function
|
|
924
|
+
function renderFn$lambda($unitsPercent) {
|
|
828
925
|
return function (it) {
|
|
829
926
|
return render(it, $unitsPercent);
|
|
830
927
|
};
|
|
@@ -842,27 +939,27 @@
|
|
|
842
939
|
return AngleUnit_AUTO_instance;
|
|
843
940
|
}
|
|
844
941
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
845
|
-
return isNaN_0(_this__u8e3s4.
|
|
942
|
+
return isNaN_0(_this__u8e3s4.l1o()) ? numberToDouble(whenNaN) : _this__u8e3s4.l1o();
|
|
846
943
|
}
|
|
847
944
|
function hueAsRad(_this__u8e3s4) {
|
|
848
|
-
return degToRad(_this__u8e3s4.
|
|
945
|
+
return degToRad(_this__u8e3s4.l1o());
|
|
849
946
|
}
|
|
850
947
|
function hueAsGrad(_this__u8e3s4) {
|
|
851
|
-
return degToGrad(_this__u8e3s4.
|
|
948
|
+
return degToGrad(_this__u8e3s4.l1o());
|
|
852
949
|
}
|
|
853
950
|
function hueAsTurns(_this__u8e3s4) {
|
|
854
|
-
return degToTurns(_this__u8e3s4.
|
|
951
|
+
return degToTurns(_this__u8e3s4.l1o());
|
|
855
952
|
}
|
|
856
953
|
function WhitePoint(name, chromaticity) {
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
954
|
+
this.m1o_1 = name;
|
|
955
|
+
this.n1o_1 = chromaticity;
|
|
859
956
|
}
|
|
860
957
|
protoOf(WhitePoint).toString = function () {
|
|
861
|
-
return this.
|
|
958
|
+
return this.m1o_1;
|
|
862
959
|
};
|
|
863
960
|
protoOf(WhitePoint).hashCode = function () {
|
|
864
|
-
var result = getStringHashCode(this.
|
|
865
|
-
result = imul(result, 31) + this.
|
|
961
|
+
var result = getStringHashCode(this.m1o_1);
|
|
962
|
+
result = imul(result, 31) + this.n1o_1.hashCode() | 0;
|
|
866
963
|
return result;
|
|
867
964
|
};
|
|
868
965
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -871,22 +968,22 @@
|
|
|
871
968
|
if (!(other instanceof WhitePoint))
|
|
872
969
|
return false;
|
|
873
970
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
874
|
-
if (!(this.
|
|
971
|
+
if (!(this.m1o_1 === tmp0_other_with_cast.m1o_1))
|
|
875
972
|
return false;
|
|
876
|
-
if (!this.
|
|
973
|
+
if (!this.n1o_1.equals(tmp0_other_with_cast.n1o_1))
|
|
877
974
|
return false;
|
|
878
975
|
return true;
|
|
879
976
|
};
|
|
880
977
|
function Illuminant() {
|
|
881
978
|
Illuminant_instance = this;
|
|
882
|
-
this.
|
|
883
|
-
this.
|
|
884
|
-
this.
|
|
885
|
-
this.
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
889
|
-
this.
|
|
979
|
+
this.l1n_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
980
|
+
this.m1n_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
981
|
+
this.n1n_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
982
|
+
this.o1n_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
983
|
+
this.p1n_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
984
|
+
this.q1n_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
985
|
+
this.r1n_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
986
|
+
this.s1n_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
890
987
|
}
|
|
891
988
|
var Illuminant_instance;
|
|
892
989
|
function Illuminant_getInstance() {
|
|
@@ -894,49 +991,67 @@
|
|
|
894
991
|
new Illuminant();
|
|
895
992
|
return Illuminant_instance;
|
|
896
993
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
899
|
-
|
|
994
|
+
function get_alphaInfo() {
|
|
995
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
996
|
+
return alphaInfo;
|
|
997
|
+
}
|
|
998
|
+
var alphaInfo;
|
|
999
|
+
function zeroOneComponentInfo(name) {
|
|
1000
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
1001
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
1002
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1003
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1004
|
+
// Inline function 'kotlin.apply' call
|
|
1005
|
+
var this_0 = ArrayList_init_$Create$_0();
|
|
1006
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1007
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>' call
|
|
900
1008
|
// Inline function 'kotlin.text.mapTo' call
|
|
901
|
-
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
902
1009
|
var inductionVariable = 0;
|
|
903
1010
|
while (inductionVariable < charSequenceLength(name)) {
|
|
904
1011
|
var item = charSequenceGet(name, inductionVariable);
|
|
905
1012
|
inductionVariable = inductionVariable + 1 | 0;
|
|
906
|
-
// Inline function 'com.github.ajalt.colormath.internal.
|
|
907
|
-
var tmp$ret$0 =
|
|
908
|
-
|
|
1013
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
1014
|
+
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
1015
|
+
this_0.p(tmp$ret$0);
|
|
909
1016
|
}
|
|
910
|
-
|
|
911
|
-
return
|
|
1017
|
+
this_0.p(get_alphaInfo());
|
|
1018
|
+
return this_0.y2();
|
|
1019
|
+
}
|
|
1020
|
+
function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
|
|
1021
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
1022
|
+
return componentInfoList([new ColorComponentInfo(n1, false, l1, r1), new ColorComponentInfo(n2, false, l2, r2), new ColorComponentInfo(n3, false, l3, r3)]);
|
|
912
1023
|
}
|
|
913
|
-
function polarComponentInfo(name) {
|
|
914
|
-
|
|
1024
|
+
function polarComponentInfo(name, l, r) {
|
|
1025
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
1026
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
1027
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1028
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1029
|
+
// Inline function 'kotlin.apply' call
|
|
1030
|
+
var this_0 = ArrayList_init_$Create$_0();
|
|
1031
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1032
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
915
1033
|
// Inline function 'kotlin.text.mapTo' call
|
|
916
|
-
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
917
1034
|
var inductionVariable = 0;
|
|
918
1035
|
while (inductionVariable < charSequenceLength(name)) {
|
|
919
1036
|
var item = charSequenceGet(name, inductionVariable);
|
|
920
1037
|
inductionVariable = inductionVariable + 1 | 0;
|
|
921
|
-
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
922
|
-
var tmp$ret$0 = new ColorComponentInfo(
|
|
923
|
-
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
return destination;
|
|
1038
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
1039
|
+
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);
|
|
1040
|
+
this_0.p(tmp$ret$0);
|
|
1041
|
+
}
|
|
1042
|
+
this_0.p(get_alphaInfo());
|
|
1043
|
+
return this_0.y2();
|
|
1044
|
+
}
|
|
1045
|
+
function componentInfoList(c) {
|
|
1046
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
1047
|
+
return listOf(arrayConcat([c, [get_alphaInfo()]]));
|
|
1048
|
+
}
|
|
1049
|
+
var properties_initialized_ColorSpaceUtils_kt_kskdoe;
|
|
1050
|
+
function _init_properties_ColorSpaceUtils_kt__cnwylg() {
|
|
1051
|
+
if (!properties_initialized_ColorSpaceUtils_kt_kskdoe) {
|
|
1052
|
+
properties_initialized_ColorSpaceUtils_kt_kskdoe = true;
|
|
1053
|
+
alphaInfo = new ColorComponentInfo('alpha', false, 0.0, 1.0);
|
|
1054
|
+
}
|
|
940
1055
|
}
|
|
941
1056
|
function get_CAT02_XYZ_TO_LMS() {
|
|
942
1057
|
_init_properties_Constants_kt__atb1ur();
|
|
@@ -970,7 +1085,7 @@
|
|
|
970
1085
|
}
|
|
971
1086
|
function CssColors() {
|
|
972
1087
|
CssColors_instance = this;
|
|
973
|
-
this.
|
|
1088
|
+
this.s1l_1 = mapOf([to('black', Companion_getInstance_6().o1o(0, 0, 0)), to('silver', Companion_getInstance_6().o1o(192, 192, 192)), to('gray', Companion_getInstance_6().o1o(128, 128, 128)), to('white', Companion_getInstance_6().o1o(255, 255, 255)), to('maroon', Companion_getInstance_6().o1o(128, 0, 0)), to('red', Companion_getInstance_6().o1o(255, 0, 0)), to('purple', Companion_getInstance_6().o1o(128, 0, 128)), to('fuchsia', Companion_getInstance_6().o1o(255, 0, 255)), to('green', Companion_getInstance_6().o1o(0, 128, 0)), to('lime', Companion_getInstance_6().o1o(0, 255, 0)), to('olive', Companion_getInstance_6().o1o(128, 128, 0)), to('yellow', Companion_getInstance_6().o1o(255, 255, 0)), to('navy', Companion_getInstance_6().o1o(0, 0, 128)), to('blue', Companion_getInstance_6().o1o(0, 0, 255)), to('teal', Companion_getInstance_6().o1o(0, 128, 128)), to('aqua', Companion_getInstance_6().o1o(0, 255, 255)), to('orange', Companion_getInstance_6().o1o(255, 165, 0)), to('aliceblue', Companion_getInstance_6().o1o(240, 248, 255)), to('antiquewhite', Companion_getInstance_6().o1o(250, 235, 215)), to('aquamarine', Companion_getInstance_6().o1o(127, 255, 212)), to('azure', Companion_getInstance_6().o1o(240, 255, 255)), to('beige', Companion_getInstance_6().o1o(245, 245, 220)), to('bisque', Companion_getInstance_6().o1o(255, 228, 196)), to('blanchedalmond', Companion_getInstance_6().o1o(255, 235, 205)), to('blueviolet', Companion_getInstance_6().o1o(138, 43, 226)), to('brown', Companion_getInstance_6().o1o(165, 42, 42)), to('burlywood', Companion_getInstance_6().o1o(222, 184, 135)), to('cadetblue', Companion_getInstance_6().o1o(95, 158, 160)), to('chartreuse', Companion_getInstance_6().o1o(127, 255, 0)), to('chocolate', Companion_getInstance_6().o1o(210, 105, 30)), to('coral', Companion_getInstance_6().o1o(255, 127, 80)), to('cornflowerblue', Companion_getInstance_6().o1o(100, 149, 237)), to('cornsilk', Companion_getInstance_6().o1o(255, 248, 220)), to('crimson', Companion_getInstance_6().o1o(220, 20, 60)), to('cyan', Companion_getInstance_6().o1o(0, 255, 255)), to('darkblue', Companion_getInstance_6().o1o(0, 0, 139)), to('darkcyan', Companion_getInstance_6().o1o(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_6().o1o(184, 134, 11)), to('darkgray', Companion_getInstance_6().o1o(169, 169, 169)), to('darkgreen', Companion_getInstance_6().o1o(0, 100, 0)), to('darkgrey', Companion_getInstance_6().o1o(169, 169, 169)), to('darkkhaki', Companion_getInstance_6().o1o(189, 183, 107)), to('darkmagenta', Companion_getInstance_6().o1o(139, 0, 139)), to('darkolivegreen', Companion_getInstance_6().o1o(85, 107, 47)), to('darkorange', Companion_getInstance_6().o1o(255, 140, 0)), to('darkorchid', Companion_getInstance_6().o1o(153, 50, 204)), to('darkred', Companion_getInstance_6().o1o(139, 0, 0)), to('darksalmon', Companion_getInstance_6().o1o(233, 150, 122)), to('darkseagreen', Companion_getInstance_6().o1o(143, 188, 143)), to('darkslateblue', Companion_getInstance_6().o1o(72, 61, 139)), to('darkslategray', Companion_getInstance_6().o1o(47, 79, 79)), to('darkslategrey', Companion_getInstance_6().o1o(47, 79, 79)), to('darkturquoise', Companion_getInstance_6().o1o(0, 206, 209)), to('darkviolet', Companion_getInstance_6().o1o(148, 0, 211)), to('deeppink', Companion_getInstance_6().o1o(255, 20, 147)), to('deepskyblue', Companion_getInstance_6().o1o(0, 191, 255)), to('dimgray', Companion_getInstance_6().o1o(105, 105, 105)), to('dimgrey', Companion_getInstance_6().o1o(105, 105, 105)), to('dodgerblue', Companion_getInstance_6().o1o(30, 144, 255)), to('firebrick', Companion_getInstance_6().o1o(178, 34, 34)), to('floralwhite', Companion_getInstance_6().o1o(255, 250, 240)), to('forestgreen', Companion_getInstance_6().o1o(34, 139, 34)), to('gainsboro', Companion_getInstance_6().o1o(220, 220, 220)), to('ghostwhite', Companion_getInstance_6().o1o(248, 248, 255)), to('gold', Companion_getInstance_6().o1o(255, 215, 0)), to('goldenrod', Companion_getInstance_6().o1o(218, 165, 32)), to('greenyellow', Companion_getInstance_6().o1o(173, 255, 47)), to('grey', Companion_getInstance_6().o1o(128, 128, 128)), to('honeydew', Companion_getInstance_6().o1o(240, 255, 240)), to('hotpink', Companion_getInstance_6().o1o(255, 105, 180)), to('indianred', Companion_getInstance_6().o1o(205, 92, 92)), to('indigo', Companion_getInstance_6().o1o(75, 0, 130)), to('ivory', Companion_getInstance_6().o1o(255, 255, 240)), to('khaki', Companion_getInstance_6().o1o(240, 230, 140)), to('lavender', Companion_getInstance_6().o1o(230, 230, 250)), to('lavenderblush', Companion_getInstance_6().o1o(255, 240, 245)), to('lawngreen', Companion_getInstance_6().o1o(124, 252, 0)), to('lemonchiffon', Companion_getInstance_6().o1o(255, 250, 205)), to('lightblue', Companion_getInstance_6().o1o(173, 216, 230)), to('lightcoral', Companion_getInstance_6().o1o(240, 128, 128)), to('lightcyan', Companion_getInstance_6().o1o(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_6().o1o(250, 250, 210)), to('lightgray', Companion_getInstance_6().o1o(211, 211, 211)), to('lightgreen', Companion_getInstance_6().o1o(144, 238, 144)), to('lightgrey', Companion_getInstance_6().o1o(211, 211, 211)), to('lightpink', Companion_getInstance_6().o1o(255, 182, 193)), to('lightsalmon', Companion_getInstance_6().o1o(255, 160, 122)), to('lightseagreen', Companion_getInstance_6().o1o(32, 178, 170)), to('lightskyblue', Companion_getInstance_6().o1o(135, 206, 250)), to('lightslategray', Companion_getInstance_6().o1o(119, 136, 153)), to('lightslategrey', Companion_getInstance_6().o1o(119, 136, 153)), to('lightsteelblue', Companion_getInstance_6().o1o(176, 196, 222)), to('lightyellow', Companion_getInstance_6().o1o(255, 255, 224)), to('limegreen', Companion_getInstance_6().o1o(50, 205, 50)), to('linen', Companion_getInstance_6().o1o(250, 240, 230)), to('magenta', Companion_getInstance_6().o1o(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_6().o1o(102, 205, 170)), to('mediumblue', Companion_getInstance_6().o1o(0, 0, 205)), to('mediumorchid', Companion_getInstance_6().o1o(186, 85, 211)), to('mediumpurple', Companion_getInstance_6().o1o(147, 112, 219)), to('mediumseagreen', Companion_getInstance_6().o1o(60, 179, 113)), to('mediumslateblue', Companion_getInstance_6().o1o(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_6().o1o(0, 250, 154)), to('mediumturquoise', Companion_getInstance_6().o1o(72, 209, 204)), to('mediumvioletred', Companion_getInstance_6().o1o(199, 21, 133)), to('midnightblue', Companion_getInstance_6().o1o(25, 25, 112)), to('mintcream', Companion_getInstance_6().o1o(245, 255, 250)), to('mistyrose', Companion_getInstance_6().o1o(255, 228, 225)), to('moccasin', Companion_getInstance_6().o1o(255, 228, 181)), to('navajowhite', Companion_getInstance_6().o1o(255, 222, 173)), to('oldlace', Companion_getInstance_6().o1o(253, 245, 230)), to('olivedrab', Companion_getInstance_6().o1o(107, 142, 35)), to('orangered', Companion_getInstance_6().o1o(255, 69, 0)), to('orchid', Companion_getInstance_6().o1o(218, 112, 214)), to('palegoldenrod', Companion_getInstance_6().o1o(238, 232, 170)), to('palegreen', Companion_getInstance_6().o1o(152, 251, 152)), to('paleturquoise', Companion_getInstance_6().o1o(175, 238, 238)), to('palevioletred', Companion_getInstance_6().o1o(219, 112, 147)), to('papayawhip', Companion_getInstance_6().o1o(255, 239, 213)), to('peachpuff', Companion_getInstance_6().o1o(255, 218, 185)), to('peru', Companion_getInstance_6().o1o(205, 133, 63)), to('pink', Companion_getInstance_6().o1o(255, 192, 203)), to('plum', Companion_getInstance_6().o1o(221, 160, 221)), to('powderblue', Companion_getInstance_6().o1o(176, 224, 230)), to('rosybrown', Companion_getInstance_6().o1o(188, 143, 143)), to('royalblue', Companion_getInstance_6().o1o(65, 105, 225)), to('saddlebrown', Companion_getInstance_6().o1o(139, 69, 19)), to('salmon', Companion_getInstance_6().o1o(250, 128, 114)), to('sandybrown', Companion_getInstance_6().o1o(244, 164, 96)), to('seagreen', Companion_getInstance_6().o1o(46, 139, 87)), to('seashell', Companion_getInstance_6().o1o(255, 245, 238)), to('sienna', Companion_getInstance_6().o1o(160, 82, 45)), to('skyblue', Companion_getInstance_6().o1o(135, 206, 235)), to('slateblue', Companion_getInstance_6().o1o(106, 90, 205)), to('slategray', Companion_getInstance_6().o1o(112, 128, 144)), to('slategrey', Companion_getInstance_6().o1o(112, 128, 144)), to('snow', Companion_getInstance_6().o1o(255, 250, 250)), to('springgreen', Companion_getInstance_6().o1o(0, 255, 127)), to('steelblue', Companion_getInstance_6().o1o(70, 130, 180)), to('tan', Companion_getInstance_6().o1o(210, 180, 140)), to('thistle', Companion_getInstance_6().o1o(216, 191, 216)), to('tomato', Companion_getInstance_6().o1o(255, 99, 71)), to('turquoise', Companion_getInstance_6().o1o(64, 224, 208)), to('violet', Companion_getInstance_6().o1o(238, 130, 238)), to('wheat', Companion_getInstance_6().o1o(245, 222, 179)), to('whitesmoke', Companion_getInstance_6().o1o(245, 245, 245)), to('yellowgreen', Companion_getInstance_6().o1o(154, 205, 50)), to('rebeccapurple', Companion_getInstance_6().o1o(102, 51, 153)), to('transparent', Companion_getInstance_6().p1o(0, 0, 0, 0))]);
|
|
974
1089
|
}
|
|
975
1090
|
var CssColors_instance;
|
|
976
1091
|
function CssColors_getInstance() {
|
|
@@ -1123,17 +1238,45 @@
|
|
|
1123
1238
|
}
|
|
1124
1239
|
function Companion_0() {
|
|
1125
1240
|
Companion_instance_1 = this;
|
|
1126
|
-
this.
|
|
1241
|
+
this.m1m_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
1127
1242
|
}
|
|
1128
1243
|
protoOf(Companion_0).pa = function () {
|
|
1129
1244
|
return 'HSL';
|
|
1130
1245
|
};
|
|
1131
|
-
protoOf(Companion_0).
|
|
1132
|
-
return this.
|
|
1246
|
+
protoOf(Companion_0).q1l = function () {
|
|
1247
|
+
return this.m1m_1;
|
|
1133
1248
|
};
|
|
1134
|
-
protoOf(Companion_0).
|
|
1249
|
+
protoOf(Companion_0).k1l = function (color) {
|
|
1135
1250
|
return color.k1k();
|
|
1136
1251
|
};
|
|
1252
|
+
protoOf(Companion_0).r1l = function (components) {
|
|
1253
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1254
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1255
|
+
var size = this.q1l().l();
|
|
1256
|
+
// Inline function 'kotlin.require' call
|
|
1257
|
+
var containsLower = size - 1 | 0;
|
|
1258
|
+
var containsArg = components.length;
|
|
1259
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1260
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1261
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1262
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1263
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1264
|
+
}
|
|
1265
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1266
|
+
var tmp = components[0];
|
|
1267
|
+
var tmp_0 = components[1];
|
|
1268
|
+
var tmp_1 = components[2];
|
|
1269
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
1270
|
+
var tmp_2;
|
|
1271
|
+
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
1272
|
+
tmp_2 = components[3];
|
|
1273
|
+
} else {
|
|
1274
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1275
|
+
tmp_2 = 1.0;
|
|
1276
|
+
}
|
|
1277
|
+
var tmp$ret$2 = tmp_2;
|
|
1278
|
+
return new HSL(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1279
|
+
};
|
|
1137
1280
|
var Companion_instance_1;
|
|
1138
1281
|
function Companion_getInstance_0() {
|
|
1139
1282
|
if (Companion_instance_1 == null)
|
|
@@ -1149,58 +1292,58 @@
|
|
|
1149
1292
|
var a_0 = k - 3;
|
|
1150
1293
|
var b_0 = 9 - k;
|
|
1151
1294
|
var tmp$ret$1 = Math.min(a_0, b_0, 1.0);
|
|
1152
|
-
return l - a *
|
|
1295
|
+
return l - a * coerceAtLeast(tmp$ret$1, -1.0);
|
|
1153
1296
|
}
|
|
1154
1297
|
function HSL(h, s, l, alpha) {
|
|
1155
1298
|
Companion_getInstance_0();
|
|
1156
1299
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1157
|
-
this.
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1160
|
-
this.
|
|
1300
|
+
this.u1n_1 = h;
|
|
1301
|
+
this.v1n_1 = s;
|
|
1302
|
+
this.w1n_1 = l;
|
|
1303
|
+
this.x1n_1 = alpha;
|
|
1161
1304
|
}
|
|
1162
|
-
protoOf(HSL).
|
|
1163
|
-
return this.
|
|
1305
|
+
protoOf(HSL).l1o = function () {
|
|
1306
|
+
return this.u1n_1;
|
|
1164
1307
|
};
|
|
1165
1308
|
protoOf(HSL).h1k = function () {
|
|
1166
|
-
return this.
|
|
1309
|
+
return this.x1n_1;
|
|
1167
1310
|
};
|
|
1168
1311
|
protoOf(HSL).i1k = function () {
|
|
1169
1312
|
return Companion_getInstance_0();
|
|
1170
1313
|
};
|
|
1171
1314
|
protoOf(HSL).j1k = function () {
|
|
1172
|
-
if (this.
|
|
1173
|
-
return
|
|
1315
|
+
if (this.v1n_1 < 1.0E-7)
|
|
1316
|
+
return Companion_getInstance_6().l1m(this.w1n_1, this.w1n_1, this.w1n_1, this.x1n_1);
|
|
1174
1317
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1175
|
-
var s = this.
|
|
1176
|
-
var l = this.
|
|
1177
|
-
return SRGB_getInstance().
|
|
1318
|
+
var s = this.v1n_1;
|
|
1319
|
+
var l = this.w1n_1;
|
|
1320
|
+
return SRGB_getInstance().l1m(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.x1n_1);
|
|
1178
1321
|
};
|
|
1179
1322
|
protoOf(HSL).k1k = function () {
|
|
1180
1323
|
return this;
|
|
1181
1324
|
};
|
|
1182
1325
|
protoOf(HSL).z2 = function () {
|
|
1183
1326
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1184
|
-
return new Float32Array([this.
|
|
1327
|
+
return new Float32Array([this.u1n_1, this.v1n_1, this.w1n_1, this.x1n_1]);
|
|
1185
1328
|
};
|
|
1186
|
-
protoOf(HSL).
|
|
1329
|
+
protoOf(HSL).r1o = function (h, s, l, alpha) {
|
|
1187
1330
|
return new HSL(h, s, l, alpha);
|
|
1188
1331
|
};
|
|
1189
|
-
protoOf(HSL).
|
|
1190
|
-
h = h === VOID ? this.
|
|
1191
|
-
s = s === VOID ? this.
|
|
1192
|
-
l = l === VOID ? this.
|
|
1193
|
-
alpha = alpha === VOID ? this.
|
|
1194
|
-
return $super === VOID ? this.
|
|
1332
|
+
protoOf(HSL).s1o = function (h, s, l, alpha, $super) {
|
|
1333
|
+
h = h === VOID ? this.u1n_1 : h;
|
|
1334
|
+
s = s === VOID ? this.v1n_1 : s;
|
|
1335
|
+
l = l === VOID ? this.w1n_1 : l;
|
|
1336
|
+
alpha = alpha === VOID ? this.x1n_1 : alpha;
|
|
1337
|
+
return $super === VOID ? this.r1o(h, s, l, alpha) : $super.r1o.call(this, h, s, l, alpha);
|
|
1195
1338
|
};
|
|
1196
1339
|
protoOf(HSL).toString = function () {
|
|
1197
|
-
return 'HSL(h=' + this.
|
|
1340
|
+
return 'HSL(h=' + this.u1n_1 + ', s=' + this.v1n_1 + ', l=' + this.w1n_1 + ', alpha=' + this.x1n_1 + ')';
|
|
1198
1341
|
};
|
|
1199
1342
|
protoOf(HSL).hashCode = function () {
|
|
1200
|
-
var result = getNumberHashCode(this.
|
|
1201
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1202
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1203
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1343
|
+
var result = getNumberHashCode(this.u1n_1);
|
|
1344
|
+
result = imul(result, 31) + getNumberHashCode(this.v1n_1) | 0;
|
|
1345
|
+
result = imul(result, 31) + getNumberHashCode(this.w1n_1) | 0;
|
|
1346
|
+
result = imul(result, 31) + getNumberHashCode(this.x1n_1) | 0;
|
|
1204
1347
|
return result;
|
|
1205
1348
|
};
|
|
1206
1349
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1209,29 +1352,57 @@
|
|
|
1209
1352
|
if (!(other instanceof HSL))
|
|
1210
1353
|
return false;
|
|
1211
1354
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1212
|
-
if (!equals(this.
|
|
1355
|
+
if (!equals(this.u1n_1, tmp0_other_with_cast.u1n_1))
|
|
1213
1356
|
return false;
|
|
1214
|
-
if (!equals(this.
|
|
1357
|
+
if (!equals(this.v1n_1, tmp0_other_with_cast.v1n_1))
|
|
1215
1358
|
return false;
|
|
1216
|
-
if (!equals(this.
|
|
1359
|
+
if (!equals(this.w1n_1, tmp0_other_with_cast.w1n_1))
|
|
1217
1360
|
return false;
|
|
1218
|
-
if (!equals(this.
|
|
1361
|
+
if (!equals(this.x1n_1, tmp0_other_with_cast.x1n_1))
|
|
1219
1362
|
return false;
|
|
1220
1363
|
return true;
|
|
1221
1364
|
};
|
|
1222
1365
|
function Companion_1() {
|
|
1223
1366
|
Companion_instance_2 = this;
|
|
1224
|
-
this.
|
|
1367
|
+
this.t1m_1 = polarComponentInfo('HWB', 0.0, 1.0);
|
|
1225
1368
|
}
|
|
1226
1369
|
protoOf(Companion_1).pa = function () {
|
|
1227
1370
|
return 'HWB';
|
|
1228
1371
|
};
|
|
1229
|
-
protoOf(Companion_1).
|
|
1230
|
-
return this.
|
|
1372
|
+
protoOf(Companion_1).q1l = function () {
|
|
1373
|
+
return this.t1m_1;
|
|
1231
1374
|
};
|
|
1232
|
-
protoOf(Companion_1).
|
|
1375
|
+
protoOf(Companion_1).k1l = function (color) {
|
|
1233
1376
|
return color.d1l();
|
|
1234
1377
|
};
|
|
1378
|
+
protoOf(Companion_1).r1l = function (components) {
|
|
1379
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1380
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1381
|
+
var size = this.q1l().l();
|
|
1382
|
+
// Inline function 'kotlin.require' call
|
|
1383
|
+
var containsLower = size - 1 | 0;
|
|
1384
|
+
var containsArg = components.length;
|
|
1385
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1386
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1387
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1388
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1389
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1390
|
+
}
|
|
1391
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1392
|
+
var tmp = components[0];
|
|
1393
|
+
var tmp_0 = components[1];
|
|
1394
|
+
var tmp_1 = components[2];
|
|
1395
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
1396
|
+
var tmp_2;
|
|
1397
|
+
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
1398
|
+
tmp_2 = components[3];
|
|
1399
|
+
} else {
|
|
1400
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1401
|
+
tmp_2 = 1.0;
|
|
1402
|
+
}
|
|
1403
|
+
var tmp$ret$2 = tmp_2;
|
|
1404
|
+
return new HWB(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1405
|
+
};
|
|
1235
1406
|
var Companion_instance_2;
|
|
1236
1407
|
function Companion_getInstance_1() {
|
|
1237
1408
|
if (Companion_instance_2 == null)
|
|
@@ -1241,28 +1412,28 @@
|
|
|
1241
1412
|
function HWB(h, w, b, alpha) {
|
|
1242
1413
|
Companion_getInstance_1();
|
|
1243
1414
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1244
|
-
this.
|
|
1245
|
-
this.
|
|
1246
|
-
this.
|
|
1247
|
-
this.
|
|
1415
|
+
this.d1o_1 = h;
|
|
1416
|
+
this.e1o_1 = w;
|
|
1417
|
+
this.f1o_1 = b;
|
|
1418
|
+
this.g1o_1 = alpha;
|
|
1248
1419
|
}
|
|
1249
|
-
protoOf(HWB).
|
|
1250
|
-
return this.
|
|
1420
|
+
protoOf(HWB).l1o = function () {
|
|
1421
|
+
return this.d1o_1;
|
|
1251
1422
|
};
|
|
1252
1423
|
protoOf(HWB).h1k = function () {
|
|
1253
|
-
return this.
|
|
1424
|
+
return this.g1o_1;
|
|
1254
1425
|
};
|
|
1255
1426
|
protoOf(HWB).i1k = function () {
|
|
1256
1427
|
return Companion_getInstance_1();
|
|
1257
1428
|
};
|
|
1258
1429
|
protoOf(HWB).j1k = function () {
|
|
1259
|
-
var h = this.
|
|
1260
|
-
var w = this.
|
|
1261
|
-
var b = this.
|
|
1262
|
-
var a = this.
|
|
1430
|
+
var h = this.d1o_1 / 60.0;
|
|
1431
|
+
var w = this.e1o_1;
|
|
1432
|
+
var b = this.f1o_1;
|
|
1433
|
+
var a = this.g1o_1;
|
|
1263
1434
|
if (w + b >= 1.0) {
|
|
1264
1435
|
var gray = w / (w + b);
|
|
1265
|
-
return
|
|
1436
|
+
return Companion_getInstance_6().l1m(gray, gray, gray, a);
|
|
1266
1437
|
}
|
|
1267
1438
|
var v = 1 - b;
|
|
1268
1439
|
var i = numberToInt(h);
|
|
@@ -1270,17 +1441,17 @@
|
|
|
1270
1441
|
var n = w + f * (v - w);
|
|
1271
1442
|
switch (i) {
|
|
1272
1443
|
case 1:
|
|
1273
|
-
return
|
|
1444
|
+
return Companion_getInstance_6().l1m(n, v, w, a);
|
|
1274
1445
|
case 2:
|
|
1275
|
-
return
|
|
1446
|
+
return Companion_getInstance_6().l1m(w, v, n, a);
|
|
1276
1447
|
case 3:
|
|
1277
|
-
return
|
|
1448
|
+
return Companion_getInstance_6().l1m(w, n, v, a);
|
|
1278
1449
|
case 4:
|
|
1279
|
-
return
|
|
1450
|
+
return Companion_getInstance_6().l1m(n, w, v, a);
|
|
1280
1451
|
case 5:
|
|
1281
|
-
return
|
|
1452
|
+
return Companion_getInstance_6().l1m(v, w, n, a);
|
|
1282
1453
|
default:
|
|
1283
|
-
return
|
|
1454
|
+
return Companion_getInstance_6().l1m(v, n, w, a);
|
|
1284
1455
|
}
|
|
1285
1456
|
};
|
|
1286
1457
|
protoOf(HWB).d1l = function () {
|
|
@@ -1288,16 +1459,16 @@
|
|
|
1288
1459
|
};
|
|
1289
1460
|
protoOf(HWB).z2 = function () {
|
|
1290
1461
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1291
|
-
return new Float32Array([this.
|
|
1462
|
+
return new Float32Array([this.d1o_1, this.e1o_1, this.f1o_1, this.g1o_1]);
|
|
1292
1463
|
};
|
|
1293
1464
|
protoOf(HWB).toString = function () {
|
|
1294
|
-
return 'HWB(h=' + this.
|
|
1465
|
+
return 'HWB(h=' + this.d1o_1 + ', w=' + this.e1o_1 + ', b=' + this.f1o_1 + ', alpha=' + this.g1o_1 + ')';
|
|
1295
1466
|
};
|
|
1296
1467
|
protoOf(HWB).hashCode = function () {
|
|
1297
|
-
var result = getNumberHashCode(this.
|
|
1298
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1299
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1300
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1468
|
+
var result = getNumberHashCode(this.d1o_1);
|
|
1469
|
+
result = imul(result, 31) + getNumberHashCode(this.e1o_1) | 0;
|
|
1470
|
+
result = imul(result, 31) + getNumberHashCode(this.f1o_1) | 0;
|
|
1471
|
+
result = imul(result, 31) + getNumberHashCode(this.g1o_1) | 0;
|
|
1301
1472
|
return result;
|
|
1302
1473
|
};
|
|
1303
1474
|
protoOf(HWB).equals = function (other) {
|
|
@@ -1306,13 +1477,13 @@
|
|
|
1306
1477
|
if (!(other instanceof HWB))
|
|
1307
1478
|
return false;
|
|
1308
1479
|
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1309
|
-
if (!equals(this.
|
|
1480
|
+
if (!equals(this.d1o_1, tmp0_other_with_cast.d1o_1))
|
|
1310
1481
|
return false;
|
|
1311
|
-
if (!equals(this.
|
|
1482
|
+
if (!equals(this.e1o_1, tmp0_other_with_cast.e1o_1))
|
|
1312
1483
|
return false;
|
|
1313
|
-
if (!equals(this.
|
|
1484
|
+
if (!equals(this.f1o_1, tmp0_other_with_cast.f1o_1))
|
|
1314
1485
|
return false;
|
|
1315
|
-
if (!equals(this.
|
|
1486
|
+
if (!equals(this.g1o_1, tmp0_other_with_cast.g1o_1))
|
|
1316
1487
|
return false;
|
|
1317
1488
|
return true;
|
|
1318
1489
|
};
|
|
@@ -1354,45 +1525,45 @@
|
|
|
1354
1525
|
var ICTCP_LMS_TO_XYZ;
|
|
1355
1526
|
function ICtCp() {
|
|
1356
1527
|
}
|
|
1357
|
-
protoOf(ICtCp).
|
|
1358
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1528
|
+
protoOf(ICtCp).x1o = function () {
|
|
1529
|
+
var fo = RGBColorSpaces_getInstance().d1n_1.y1o();
|
|
1359
1530
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1360
1531
|
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
1361
|
-
var v0 = this.
|
|
1362
|
-
var v1 = this.
|
|
1363
|
-
var v2 = this.
|
|
1532
|
+
var v0 = this.t1o_1;
|
|
1533
|
+
var v1 = this.u1o_1;
|
|
1534
|
+
var v2 = this.v1o_1;
|
|
1364
1535
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
1365
1536
|
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;
|
|
1366
1537
|
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;
|
|
1367
1538
|
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;
|
|
1368
1539
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1369
1540
|
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
1370
|
-
var v0_0 = PqNonlinearity_instance.
|
|
1371
|
-
var v1_0 = PqNonlinearity_instance.
|
|
1372
|
-
var v2_0 = PqNonlinearity_instance.
|
|
1541
|
+
var v0_0 = PqNonlinearity_instance.h1p(l);
|
|
1542
|
+
var v1_0 = PqNonlinearity_instance.h1p(m);
|
|
1543
|
+
var v2_0 = PqNonlinearity_instance.h1p(s);
|
|
1373
1544
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
1374
1545
|
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;
|
|
1375
1546
|
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;
|
|
1376
1547
|
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;
|
|
1377
|
-
return RGBColorSpaces_getInstance().
|
|
1548
|
+
return RGBColorSpaces_getInstance().d1n_1.l1m(fo.i1p(r), fo.i1p(g), fo.i1p(b), this.w1o_1);
|
|
1378
1549
|
};
|
|
1379
1550
|
function PqNonlinearity() {
|
|
1380
|
-
this.
|
|
1381
|
-
this.
|
|
1382
|
-
this.
|
|
1383
|
-
this.
|
|
1384
|
-
this.
|
|
1385
|
-
this.
|
|
1386
|
-
this.
|
|
1387
|
-
this.
|
|
1388
|
-
}
|
|
1389
|
-
protoOf(PqNonlinearity).
|
|
1551
|
+
this.z1o_1 = 0.1593017578125;
|
|
1552
|
+
this.a1p_1 = 78.84375;
|
|
1553
|
+
this.b1p_1 = 0.8359375;
|
|
1554
|
+
this.c1p_1 = 18.8515625;
|
|
1555
|
+
this.d1p_1 = 18.6875;
|
|
1556
|
+
this.e1p_1 = 10000.0;
|
|
1557
|
+
this.f1p_1 = 6.277394636015326;
|
|
1558
|
+
this.g1p_1 = 0.012683313515655966;
|
|
1559
|
+
}
|
|
1560
|
+
protoOf(PqNonlinearity).h1p = function (x) {
|
|
1390
1561
|
var vp = spow(x, 0.012683313515655966);
|
|
1391
|
-
var n =
|
|
1562
|
+
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
1392
1563
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
1393
1564
|
return 10000.0 * l;
|
|
1394
1565
|
};
|
|
1395
|
-
protoOf(PqNonlinearity).
|
|
1566
|
+
protoOf(PqNonlinearity).i1p = function (x) {
|
|
1396
1567
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
1397
1568
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
1398
1569
|
};
|
|
@@ -1416,28 +1587,34 @@
|
|
|
1416
1587
|
}
|
|
1417
1588
|
function Companion_2() {
|
|
1418
1589
|
Companion_instance_3 = this;
|
|
1419
|
-
this.
|
|
1590
|
+
this.n1m_1 = LABColorSpaces_getInstance().o1m_1;
|
|
1420
1591
|
}
|
|
1421
|
-
protoOf(Companion_2).
|
|
1422
|
-
return this.
|
|
1592
|
+
protoOf(Companion_2).q1l = function () {
|
|
1593
|
+
return this.n1m_1.q1l();
|
|
1423
1594
|
};
|
|
1424
1595
|
protoOf(Companion_2).pa = function () {
|
|
1425
|
-
return this.
|
|
1596
|
+
return this.n1m_1.pa();
|
|
1597
|
+
};
|
|
1598
|
+
protoOf(Companion_2).p1l = function () {
|
|
1599
|
+
return this.n1m_1.p1l();
|
|
1426
1600
|
};
|
|
1427
|
-
protoOf(Companion_2).
|
|
1428
|
-
return this.
|
|
1601
|
+
protoOf(Companion_2).k1l = function (color) {
|
|
1602
|
+
return this.n1m_1.k1l(color);
|
|
1429
1603
|
};
|
|
1430
|
-
protoOf(Companion_2).
|
|
1431
|
-
return this.
|
|
1604
|
+
protoOf(Companion_2).r1l = function (components) {
|
|
1605
|
+
return this.n1m_1.r1l(components);
|
|
1432
1606
|
};
|
|
1433
|
-
protoOf(Companion_2).
|
|
1434
|
-
return this.
|
|
1607
|
+
protoOf(Companion_2).l1m = function (l, a, b, alpha) {
|
|
1608
|
+
return this.n1m_1.l1m(l, a, b, alpha);
|
|
1435
1609
|
};
|
|
1436
|
-
protoOf(Companion_2).
|
|
1437
|
-
return this.
|
|
1610
|
+
protoOf(Companion_2).j1p = function (l, a, b, alpha) {
|
|
1611
|
+
return this.n1m_1.j1p(l, a, b, alpha);
|
|
1438
1612
|
};
|
|
1439
|
-
protoOf(Companion_2).
|
|
1440
|
-
return
|
|
1613
|
+
protoOf(Companion_2).equals = function (other) {
|
|
1614
|
+
return equals(LABColorSpaces_getInstance().o1m_1, other);
|
|
1615
|
+
};
|
|
1616
|
+
protoOf(Companion_2).hashCode = function () {
|
|
1617
|
+
return hashCode(LABColorSpaces_getInstance().o1m_1);
|
|
1441
1618
|
};
|
|
1442
1619
|
var Companion_instance_3;
|
|
1443
1620
|
function Companion_getInstance_2() {
|
|
@@ -1460,12 +1637,12 @@
|
|
|
1460
1637
|
return this.c1l_1;
|
|
1461
1638
|
};
|
|
1462
1639
|
protoOf(LAB).j1k = function () {
|
|
1463
|
-
return this.y1k_1 === 0.0 ?
|
|
1640
|
+
return this.y1k_1 === 0.0 ? Companion_getInstance_6().l1m(0.0, 0.0, 0.0, this.b1l_1) : this.q1k().j1k();
|
|
1464
1641
|
};
|
|
1465
1642
|
protoOf(LAB).q1k = function () {
|
|
1466
|
-
var xyzSpace = XYZColorSpace_0(this.c1l_1.
|
|
1643
|
+
var xyzSpace = XYZColorSpace_0(this.c1l_1.p1l());
|
|
1467
1644
|
if (this.y1k_1 === 0.0)
|
|
1468
|
-
return xyzSpace.
|
|
1645
|
+
return xyzSpace.k1p(0.0, 0.0, 0.0);
|
|
1469
1646
|
var fy = (this.y1k_1 + 16) / 116.0;
|
|
1470
1647
|
var fz = fy - this.a1l_1 / 200.0;
|
|
1471
1648
|
var fx = this.z1k_1 / 500.0 + fy;
|
|
@@ -1489,8 +1666,8 @@
|
|
|
1489
1666
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1490
1667
|
var it_0 = Math.pow(fx, 3);
|
|
1491
1668
|
var xr = it_0 > get_CIE_E() ? it_0 : (116 * fx - 16) / get_CIE_K();
|
|
1492
|
-
var wp = this.c1l_1.
|
|
1493
|
-
return xyzSpace.
|
|
1669
|
+
var wp = this.c1l_1.p1l().n1o_1;
|
|
1670
|
+
return xyzSpace.j1p(xr * wp.o1p(), yr * wp.n1p_1, zr * wp.p1p(), this.b1l_1);
|
|
1494
1671
|
};
|
|
1495
1672
|
protoOf(LAB).x1k = function () {
|
|
1496
1673
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
@@ -1510,7 +1687,7 @@
|
|
|
1510
1687
|
var h = tmp;
|
|
1511
1688
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
1512
1689
|
var h_0 = normalizeDeg_0(h);
|
|
1513
|
-
return
|
|
1690
|
+
return LCHabColorSpace_0(this.c1l_1.p1l()).l1m(this.y1k_1, c, h_0, this.b1l_1);
|
|
1514
1691
|
};
|
|
1515
1692
|
protoOf(LAB).r1k = function () {
|
|
1516
1693
|
return this;
|
|
@@ -1551,12 +1728,12 @@
|
|
|
1551
1728
|
function LABColorSpace() {
|
|
1552
1729
|
}
|
|
1553
1730
|
function LABColorSpace_0(whitePoint) {
|
|
1554
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1731
|
+
return whitePoint.equals(Illuminant_getInstance().q1n_1) ? LABColorSpaces_getInstance().o1m_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? LABColorSpaces_getInstance().p1m_1 : new LABColorSpaceImpl(whitePoint);
|
|
1555
1732
|
}
|
|
1556
1733
|
function LABColorSpaces() {
|
|
1557
1734
|
LABColorSpaces_instance = this;
|
|
1558
|
-
this.
|
|
1559
|
-
this.
|
|
1735
|
+
this.o1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().q1n_1);
|
|
1736
|
+
this.p1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().o1n_1);
|
|
1560
1737
|
}
|
|
1561
1738
|
var LABColorSpaces_instance;
|
|
1562
1739
|
function LABColorSpaces_getInstance() {
|
|
@@ -1565,37 +1742,37 @@
|
|
|
1565
1742
|
return LABColorSpaces_instance;
|
|
1566
1743
|
}
|
|
1567
1744
|
function LABColorSpaceImpl(whitePoint) {
|
|
1568
|
-
this.
|
|
1569
|
-
this.
|
|
1745
|
+
this.q1p_1 = whitePoint;
|
|
1746
|
+
this.r1p_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1570
1747
|
}
|
|
1571
|
-
protoOf(LABColorSpaceImpl).
|
|
1572
|
-
return this.
|
|
1748
|
+
protoOf(LABColorSpaceImpl).p1l = function () {
|
|
1749
|
+
return this.q1p_1;
|
|
1573
1750
|
};
|
|
1574
1751
|
protoOf(LABColorSpaceImpl).pa = function () {
|
|
1575
1752
|
return 'LAB';
|
|
1576
1753
|
};
|
|
1577
|
-
protoOf(LABColorSpaceImpl).
|
|
1578
|
-
return this.
|
|
1754
|
+
protoOf(LABColorSpaceImpl).q1l = function () {
|
|
1755
|
+
return this.r1p_1;
|
|
1579
1756
|
};
|
|
1580
|
-
protoOf(LABColorSpaceImpl).
|
|
1757
|
+
protoOf(LABColorSpaceImpl).k1l = function (color) {
|
|
1581
1758
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1582
1759
|
var tmp;
|
|
1583
1760
|
var tmp_0 = color.i1k();
|
|
1584
1761
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1585
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1586
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1762
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1l();
|
|
1763
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().q1n_1 : tmp1_elvis_lhs).equals(this.p1l())) {
|
|
1587
1764
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1588
1765
|
tmp = color.r1k();
|
|
1589
1766
|
} else {
|
|
1590
1767
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1591
|
-
tmp = color.q1k().
|
|
1768
|
+
tmp = color.q1k().k1n(XYZColorSpace_0(this.p1l())).r1k();
|
|
1592
1769
|
}
|
|
1593
1770
|
return tmp;
|
|
1594
1771
|
};
|
|
1595
|
-
protoOf(LABColorSpaceImpl).
|
|
1772
|
+
protoOf(LABColorSpaceImpl).r1l = function (components) {
|
|
1596
1773
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1597
1774
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1598
|
-
var size = this.
|
|
1775
|
+
var size = this.q1l().l();
|
|
1599
1776
|
// Inline function 'kotlin.require' call
|
|
1600
1777
|
var containsLower = size - 1 | 0;
|
|
1601
1778
|
var containsArg = components.length;
|
|
@@ -1603,7 +1780,7 @@
|
|
|
1603
1780
|
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1604
1781
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1605
1782
|
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1606
|
-
throw IllegalArgumentException_init_$Create$(
|
|
1783
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1607
1784
|
}
|
|
1608
1785
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1609
1786
|
var tmp = components[0];
|
|
@@ -1618,48 +1795,53 @@
|
|
|
1618
1795
|
tmp_2 = 1.0;
|
|
1619
1796
|
}
|
|
1620
1797
|
var tmp$ret$2 = tmp_2;
|
|
1621
|
-
return this.
|
|
1798
|
+
return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1622
1799
|
};
|
|
1623
1800
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1624
|
-
return 'LABColorSpace(' + this.
|
|
1801
|
+
return 'LABColorSpace(' + this.q1p_1 + ')';
|
|
1625
1802
|
};
|
|
1626
|
-
protoOf(LABColorSpaceImpl).
|
|
1803
|
+
protoOf(LABColorSpaceImpl).l1m = function (l, a, b, alpha) {
|
|
1627
1804
|
return new LAB(l, a, b, alpha, this);
|
|
1628
1805
|
};
|
|
1629
1806
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1630
|
-
return this.
|
|
1807
|
+
return this.q1p_1.hashCode();
|
|
1631
1808
|
};
|
|
1632
1809
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
return true;
|
|
1810
|
+
var tmp;
|
|
1811
|
+
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1812
|
+
tmp = this.q1p_1.equals(other.p1l());
|
|
1813
|
+
} else {
|
|
1814
|
+
tmp = false;
|
|
1815
|
+
}
|
|
1816
|
+
return tmp;
|
|
1641
1817
|
};
|
|
1642
1818
|
function Companion_3() {
|
|
1643
1819
|
Companion_instance_4 = this;
|
|
1644
|
-
this.
|
|
1820
|
+
this.q1m_1 = LCHabColorSpaces_getInstance().r1m_1;
|
|
1645
1821
|
}
|
|
1646
|
-
protoOf(Companion_3).
|
|
1647
|
-
return this.
|
|
1822
|
+
protoOf(Companion_3).q1l = function () {
|
|
1823
|
+
return this.q1m_1.q1l();
|
|
1648
1824
|
};
|
|
1649
1825
|
protoOf(Companion_3).pa = function () {
|
|
1650
|
-
return this.
|
|
1826
|
+
return this.q1m_1.pa();
|
|
1651
1827
|
};
|
|
1652
|
-
protoOf(Companion_3).
|
|
1653
|
-
return this.
|
|
1828
|
+
protoOf(Companion_3).p1l = function () {
|
|
1829
|
+
return this.q1m_1.p1l();
|
|
1654
1830
|
};
|
|
1655
|
-
protoOf(Companion_3).
|
|
1656
|
-
return this.
|
|
1831
|
+
protoOf(Companion_3).k1l = function (color) {
|
|
1832
|
+
return this.q1m_1.k1l(color);
|
|
1657
1833
|
};
|
|
1658
|
-
protoOf(Companion_3).
|
|
1659
|
-
return this.
|
|
1834
|
+
protoOf(Companion_3).r1l = function (components) {
|
|
1835
|
+
return this.q1m_1.r1l(components);
|
|
1660
1836
|
};
|
|
1661
|
-
protoOf(Companion_3).
|
|
1662
|
-
return this.
|
|
1837
|
+
protoOf(Companion_3).l1m = function (l, c, h, alpha) {
|
|
1838
|
+
return this.q1m_1.l1m(l, c, h, alpha);
|
|
1839
|
+
};
|
|
1840
|
+
protoOf(Companion_3).equals = function (other) {
|
|
1841
|
+
return equals(LCHabColorSpaces_getInstance().r1m_1, other);
|
|
1842
|
+
};
|
|
1843
|
+
protoOf(Companion_3).hashCode = function () {
|
|
1844
|
+
return hashCode(LCHabColorSpaces_getInstance().r1m_1);
|
|
1663
1845
|
};
|
|
1664
1846
|
var Companion_instance_4;
|
|
1665
1847
|
function Companion_getInstance_3() {
|
|
@@ -1669,20 +1851,20 @@
|
|
|
1669
1851
|
}
|
|
1670
1852
|
function LCHab(l, c, h, alpha, space) {
|
|
1671
1853
|
Companion_getInstance_3();
|
|
1672
|
-
this.
|
|
1673
|
-
this.
|
|
1674
|
-
this.
|
|
1675
|
-
this.
|
|
1676
|
-
this.
|
|
1854
|
+
this.y1n_1 = l;
|
|
1855
|
+
this.z1n_1 = c;
|
|
1856
|
+
this.a1o_1 = h;
|
|
1857
|
+
this.b1o_1 = alpha;
|
|
1858
|
+
this.c1o_1 = space;
|
|
1677
1859
|
}
|
|
1678
|
-
protoOf(LCHab).
|
|
1679
|
-
return this.
|
|
1860
|
+
protoOf(LCHab).l1o = function () {
|
|
1861
|
+
return this.a1o_1;
|
|
1680
1862
|
};
|
|
1681
1863
|
protoOf(LCHab).h1k = function () {
|
|
1682
|
-
return this.
|
|
1864
|
+
return this.b1o_1;
|
|
1683
1865
|
};
|
|
1684
1866
|
protoOf(LCHab).i1k = function () {
|
|
1685
|
-
return this.
|
|
1867
|
+
return this.c1o_1;
|
|
1686
1868
|
};
|
|
1687
1869
|
protoOf(LCHab).j1k = function () {
|
|
1688
1870
|
return this.r1k().j1k();
|
|
@@ -1692,32 +1874,32 @@
|
|
|
1692
1874
|
};
|
|
1693
1875
|
protoOf(LCHab).r1k = function () {
|
|
1694
1876
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1695
|
-
var c = this.
|
|
1696
|
-
var h = this.
|
|
1877
|
+
var c = this.z1n_1;
|
|
1878
|
+
var h = this.a1o_1;
|
|
1697
1879
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1698
1880
|
// Inline function 'kotlin.math.cos' call
|
|
1699
1881
|
var a = c * Math.cos(hDegrees);
|
|
1700
1882
|
// Inline function 'kotlin.math.sin' call
|
|
1701
1883
|
var b = c * Math.sin(hDegrees);
|
|
1702
1884
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1703
|
-
return LABColorSpace_0(this.
|
|
1885
|
+
return LABColorSpace_0(this.c1o_1.p1l()).l1m(this.y1n_1, a, b, this.b1o_1);
|
|
1704
1886
|
};
|
|
1705
1887
|
protoOf(LCHab).x1k = function () {
|
|
1706
1888
|
return this;
|
|
1707
1889
|
};
|
|
1708
1890
|
protoOf(LCHab).z2 = function () {
|
|
1709
1891
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1710
|
-
return new Float32Array([this.
|
|
1892
|
+
return new Float32Array([this.y1n_1, this.z1n_1, this.a1o_1, this.b1o_1]);
|
|
1711
1893
|
};
|
|
1712
1894
|
protoOf(LCHab).toString = function () {
|
|
1713
|
-
return 'LCHab(l=' + this.
|
|
1895
|
+
return 'LCHab(l=' + this.y1n_1 + ', c=' + this.z1n_1 + ', h=' + this.a1o_1 + ', alpha=' + this.b1o_1 + ', space=' + this.c1o_1 + ')';
|
|
1714
1896
|
};
|
|
1715
1897
|
protoOf(LCHab).hashCode = function () {
|
|
1716
|
-
var result = getNumberHashCode(this.
|
|
1717
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1718
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1719
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1720
|
-
result = imul(result, 31) + hashCode(this.
|
|
1898
|
+
var result = getNumberHashCode(this.y1n_1);
|
|
1899
|
+
result = imul(result, 31) + getNumberHashCode(this.z1n_1) | 0;
|
|
1900
|
+
result = imul(result, 31) + getNumberHashCode(this.a1o_1) | 0;
|
|
1901
|
+
result = imul(result, 31) + getNumberHashCode(this.b1o_1) | 0;
|
|
1902
|
+
result = imul(result, 31) + hashCode(this.c1o_1) | 0;
|
|
1721
1903
|
return result;
|
|
1722
1904
|
};
|
|
1723
1905
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1726,25 +1908,27 @@
|
|
|
1726
1908
|
if (!(other instanceof LCHab))
|
|
1727
1909
|
return false;
|
|
1728
1910
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1729
|
-
if (!equals(this.
|
|
1911
|
+
if (!equals(this.y1n_1, tmp0_other_with_cast.y1n_1))
|
|
1730
1912
|
return false;
|
|
1731
|
-
if (!equals(this.
|
|
1913
|
+
if (!equals(this.z1n_1, tmp0_other_with_cast.z1n_1))
|
|
1732
1914
|
return false;
|
|
1733
|
-
if (!equals(this.
|
|
1915
|
+
if (!equals(this.a1o_1, tmp0_other_with_cast.a1o_1))
|
|
1734
1916
|
return false;
|
|
1735
|
-
if (!equals(this.
|
|
1917
|
+
if (!equals(this.b1o_1, tmp0_other_with_cast.b1o_1))
|
|
1736
1918
|
return false;
|
|
1737
|
-
if (!equals(this.
|
|
1919
|
+
if (!equals(this.c1o_1, tmp0_other_with_cast.c1o_1))
|
|
1738
1920
|
return false;
|
|
1739
1921
|
return true;
|
|
1740
1922
|
};
|
|
1741
|
-
function LCHabColorSpace(
|
|
1742
|
-
|
|
1923
|
+
function LCHabColorSpace() {
|
|
1924
|
+
}
|
|
1925
|
+
function LCHabColorSpace_0(whitePoint) {
|
|
1926
|
+
return whitePoint.equals(Illuminant_getInstance().q1n_1) ? LCHabColorSpaces_getInstance().r1m_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? LCHabColorSpaces_getInstance().s1m_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1743
1927
|
}
|
|
1744
1928
|
function LCHabColorSpaces() {
|
|
1745
1929
|
LCHabColorSpaces_instance = this;
|
|
1746
|
-
this.
|
|
1747
|
-
this.
|
|
1930
|
+
this.r1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().q1n_1);
|
|
1931
|
+
this.s1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().o1n_1);
|
|
1748
1932
|
}
|
|
1749
1933
|
var LCHabColorSpaces_instance;
|
|
1750
1934
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1753,37 +1937,37 @@
|
|
|
1753
1937
|
return LCHabColorSpaces_instance;
|
|
1754
1938
|
}
|
|
1755
1939
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1756
|
-
this.
|
|
1757
|
-
this.
|
|
1940
|
+
this.s1p_1 = whitePoint;
|
|
1941
|
+
this.t1p_1 = componentInfoList([new ColorComponentInfo('L', false, 0.0, 100.0), new ColorComponentInfo('C', false, 0.0, 150.0), new ColorComponentInfo('H', true, 0.0, 360.0)]);
|
|
1758
1942
|
}
|
|
1759
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1760
|
-
return this.
|
|
1943
|
+
protoOf(LCHabColorSpaceImpl).p1l = function () {
|
|
1944
|
+
return this.s1p_1;
|
|
1761
1945
|
};
|
|
1762
1946
|
protoOf(LCHabColorSpaceImpl).pa = function () {
|
|
1763
1947
|
return 'LCHab';
|
|
1764
1948
|
};
|
|
1765
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1766
|
-
return this.
|
|
1949
|
+
protoOf(LCHabColorSpaceImpl).q1l = function () {
|
|
1950
|
+
return this.t1p_1;
|
|
1767
1951
|
};
|
|
1768
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1952
|
+
protoOf(LCHabColorSpaceImpl).k1l = function (color) {
|
|
1769
1953
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1770
1954
|
var tmp;
|
|
1771
1955
|
var tmp_0 = color.i1k();
|
|
1772
1956
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1773
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1774
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1957
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1l();
|
|
1958
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().q1n_1 : tmp1_elvis_lhs).equals(this.p1l())) {
|
|
1775
1959
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1776
1960
|
tmp = color.x1k();
|
|
1777
1961
|
} else {
|
|
1778
1962
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1779
|
-
tmp = color.q1k().
|
|
1963
|
+
tmp = color.q1k().k1n(XYZColorSpace_0(this.p1l())).x1k();
|
|
1780
1964
|
}
|
|
1781
1965
|
return tmp;
|
|
1782
1966
|
};
|
|
1783
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1967
|
+
protoOf(LCHabColorSpaceImpl).r1l = function (components) {
|
|
1784
1968
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1785
1969
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1786
|
-
var size = this.
|
|
1970
|
+
var size = this.q1l().l();
|
|
1787
1971
|
// Inline function 'kotlin.require' call
|
|
1788
1972
|
var containsLower = size - 1 | 0;
|
|
1789
1973
|
var containsArg = components.length;
|
|
@@ -1791,7 +1975,7 @@
|
|
|
1791
1975
|
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1792
1976
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1793
1977
|
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1794
|
-
throw IllegalArgumentException_init_$Create$(
|
|
1978
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1795
1979
|
}
|
|
1796
1980
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1797
1981
|
var tmp = components[0];
|
|
@@ -1806,105 +1990,66 @@
|
|
|
1806
1990
|
tmp_2 = 1.0;
|
|
1807
1991
|
}
|
|
1808
1992
|
var tmp$ret$2 = tmp_2;
|
|
1809
|
-
return this.
|
|
1993
|
+
return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1810
1994
|
};
|
|
1811
1995
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1812
|
-
return 'LCHabColorSpace(' + this.
|
|
1996
|
+
return 'LCHabColorSpace(' + this.s1p_1 + ')';
|
|
1813
1997
|
};
|
|
1814
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1998
|
+
protoOf(LCHabColorSpaceImpl).l1m = function (l, c, h, alpha) {
|
|
1815
1999
|
return new LCHab(l, c, h, alpha, this);
|
|
1816
2000
|
};
|
|
1817
2001
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1818
|
-
return this.
|
|
2002
|
+
return this.s1p_1.hashCode();
|
|
1819
2003
|
};
|
|
1820
2004
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
return true;
|
|
1829
|
-
};
|
|
1830
|
-
function GammaTransferFunctions(gamma) {
|
|
1831
|
-
this.l1p_1 = gamma;
|
|
1832
|
-
}
|
|
1833
|
-
protoOf(GammaTransferFunctions).y1o = function (x) {
|
|
1834
|
-
return spow(x, this.l1p_1);
|
|
1835
|
-
};
|
|
1836
|
-
protoOf(GammaTransferFunctions).z1o = function (x) {
|
|
1837
|
-
return spow(x, 1.0 / this.l1p_1);
|
|
1838
|
-
};
|
|
1839
|
-
protoOf(GammaTransferFunctions).toString = function () {
|
|
1840
|
-
return 'GammaTransferFunctions(gamma=' + this.l1p_1 + ')';
|
|
1841
|
-
};
|
|
1842
|
-
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
1843
|
-
return getNumberHashCode(this.l1p_1);
|
|
1844
|
-
};
|
|
1845
|
-
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
1846
|
-
if (this === other)
|
|
1847
|
-
return true;
|
|
1848
|
-
if (!(other instanceof GammaTransferFunctions))
|
|
1849
|
-
return false;
|
|
1850
|
-
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
1851
|
-
if (!equals(this.l1p_1, tmp0_other_with_cast.l1p_1))
|
|
1852
|
-
return false;
|
|
1853
|
-
return true;
|
|
1854
|
-
};
|
|
1855
|
-
function LinearTransferFunctions() {
|
|
1856
|
-
}
|
|
1857
|
-
protoOf(LinearTransferFunctions).y1o = function (x) {
|
|
1858
|
-
return x;
|
|
1859
|
-
};
|
|
1860
|
-
protoOf(LinearTransferFunctions).z1o = function (x) {
|
|
1861
|
-
return x;
|
|
2005
|
+
var tmp;
|
|
2006
|
+
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
2007
|
+
tmp = this.s1p_1.equals(other.p1l());
|
|
2008
|
+
} else {
|
|
2009
|
+
tmp = false;
|
|
2010
|
+
}
|
|
2011
|
+
return tmp;
|
|
1862
2012
|
};
|
|
1863
|
-
var LinearTransferFunctions_instance;
|
|
1864
|
-
function LinearTransferFunctions_getInstance() {
|
|
1865
|
-
return LinearTransferFunctions_instance;
|
|
1866
|
-
}
|
|
1867
|
-
function RGBColorSpace() {
|
|
1868
|
-
}
|
|
1869
2013
|
function Companion_4() {
|
|
1870
2014
|
Companion_instance_5 = this;
|
|
1871
|
-
this.
|
|
2015
|
+
this.u1m_1 = threeComponentInfo('l', 0.0, 1.0, 'a', -0.4, 0.4, 'b', -0.4, 0.4);
|
|
1872
2016
|
}
|
|
1873
|
-
protoOf(Companion_4).g1l = function () {
|
|
1874
|
-
return this.b1m_1.g1l();
|
|
1875
|
-
};
|
|
1876
|
-
protoOf(Companion_4).n1p = function () {
|
|
1877
|
-
return this.b1m_1.n1p();
|
|
1878
|
-
};
|
|
1879
|
-
protoOf(Companion_4).m1p = function () {
|
|
1880
|
-
return this.b1m_1.m1p();
|
|
1881
|
-
};
|
|
1882
2017
|
protoOf(Companion_4).pa = function () {
|
|
1883
|
-
return
|
|
2018
|
+
return 'Oklab';
|
|
1884
2019
|
};
|
|
1885
|
-
protoOf(Companion_4).
|
|
1886
|
-
return this.
|
|
2020
|
+
protoOf(Companion_4).q1l = function () {
|
|
2021
|
+
return this.u1m_1;
|
|
1887
2022
|
};
|
|
1888
|
-
protoOf(Companion_4).
|
|
1889
|
-
return
|
|
2023
|
+
protoOf(Companion_4).k1l = function (color) {
|
|
2024
|
+
return color.e1l();
|
|
1890
2025
|
};
|
|
1891
|
-
protoOf(Companion_4).
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
2026
|
+
protoOf(Companion_4).r1l = function (components) {
|
|
2027
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2028
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2029
|
+
var size = this.q1l().l();
|
|
2030
|
+
// Inline function 'kotlin.require' call
|
|
2031
|
+
var containsLower = size - 1 | 0;
|
|
2032
|
+
var containsArg = components.length;
|
|
2033
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2034
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2035
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2036
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2037
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2038
|
+
}
|
|
2039
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2040
|
+
var tmp = components[0];
|
|
2041
|
+
var tmp_0 = components[1];
|
|
2042
|
+
var tmp_1 = components[2];
|
|
2043
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2044
|
+
var tmp_2;
|
|
2045
|
+
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
2046
|
+
tmp_2 = components[3];
|
|
2047
|
+
} else {
|
|
2048
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2049
|
+
tmp_2 = 1.0;
|
|
2050
|
+
}
|
|
2051
|
+
var tmp$ret$2 = tmp_2;
|
|
2052
|
+
return new Oklab(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1908
2053
|
};
|
|
1909
2054
|
var Companion_instance_5;
|
|
1910
2055
|
function Companion_getInstance_4() {
|
|
@@ -1912,10 +2057,315 @@
|
|
|
1912
2057
|
new Companion_4();
|
|
1913
2058
|
return Companion_instance_5;
|
|
1914
2059
|
}
|
|
1915
|
-
function
|
|
1916
|
-
|
|
1917
|
-
this
|
|
1918
|
-
this
|
|
2060
|
+
function Oklab_init_$Init$(l, a, b, alpha, $this) {
|
|
2061
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2062
|
+
Oklab.call($this, numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
2063
|
+
return $this;
|
|
2064
|
+
}
|
|
2065
|
+
function Oklab_init_$Create$(l, a, b, alpha) {
|
|
2066
|
+
return Oklab_init_$Init$(l, a, b, alpha, objectCreate(protoOf(Oklab)));
|
|
2067
|
+
}
|
|
2068
|
+
function Oklab(l, a, b, alpha) {
|
|
2069
|
+
Companion_getInstance_4();
|
|
2070
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2071
|
+
this.g1l_1 = l;
|
|
2072
|
+
this.h1l_1 = a;
|
|
2073
|
+
this.i1l_1 = b;
|
|
2074
|
+
this.j1l_1 = alpha;
|
|
2075
|
+
}
|
|
2076
|
+
protoOf(Oklab).h1k = function () {
|
|
2077
|
+
return this.j1l_1;
|
|
2078
|
+
};
|
|
2079
|
+
protoOf(Oklab).i1k = function () {
|
|
2080
|
+
return Companion_getInstance_4();
|
|
2081
|
+
};
|
|
2082
|
+
protoOf(Oklab).j1k = function () {
|
|
2083
|
+
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2084
|
+
var ll = this.g1l_1 + 0.3963377774 * this.h1l_1 + 0.2158037573 * this.i1l_1;
|
|
2085
|
+
var mm = this.g1l_1 - 0.1055613458 * this.h1l_1 - 0.0638541728 * this.i1l_1;
|
|
2086
|
+
var ss = this.g1l_1 - 0.0894841775 * this.h1l_1 - 1.291485548 * this.i1l_1;
|
|
2087
|
+
var l = ll * ll * ll;
|
|
2088
|
+
var m = mm * mm * mm;
|
|
2089
|
+
var s = ss * ss * ss;
|
|
2090
|
+
var r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
2091
|
+
var g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
2092
|
+
var b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
2093
|
+
var f = Companion_getInstance_6().y1o();
|
|
2094
|
+
return Companion_getInstance_6().l1m(f.i1p(r), f.i1p(g), f.i1p(b), this.j1l_1);
|
|
2095
|
+
};
|
|
2096
|
+
protoOf(Oklab).q1k = function () {
|
|
2097
|
+
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2098
|
+
var ll = this.g1l_1 + 0.3963377774 * this.h1l_1 + 0.2158037573 * this.i1l_1;
|
|
2099
|
+
var mm = this.g1l_1 - 0.1055613458 * this.h1l_1 - 0.0638541728 * this.i1l_1;
|
|
2100
|
+
var ss = this.g1l_1 - 0.0894841775 * this.h1l_1 - 1.291485548 * this.i1l_1;
|
|
2101
|
+
var l = ll * ll * ll;
|
|
2102
|
+
var m = mm * mm * mm;
|
|
2103
|
+
var s = ss * ss * ss;
|
|
2104
|
+
return Companion_getInstance_7().j1p(1.2270138511 * l - 0.5577999807 * m + 0.281256149 * s, -0.0405801784 * l + 1.1122568696 * m - 0.0716766787 * s, -0.0763812845 * l - 0.4214819784 * m + 1.5861632204 * s, this.j1l_1);
|
|
2105
|
+
};
|
|
2106
|
+
protoOf(Oklab).f1l = function () {
|
|
2107
|
+
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
2108
|
+
var a = this.h1l_1;
|
|
2109
|
+
var b = this.i1l_1;
|
|
2110
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
2111
|
+
var x = a * a + b * b;
|
|
2112
|
+
var c = Math.sqrt(x);
|
|
2113
|
+
var tmp;
|
|
2114
|
+
if (c > -1.0E-7 ? c < 1.0E-7 : false) {
|
|
2115
|
+
tmp = NaN;
|
|
2116
|
+
} else {
|
|
2117
|
+
// Inline function 'kotlin.math.atan2' call
|
|
2118
|
+
var tmp$ret$1 = Math.atan2(b, a);
|
|
2119
|
+
tmp = radToDeg(tmp$ret$1);
|
|
2120
|
+
}
|
|
2121
|
+
var h = tmp;
|
|
2122
|
+
// Inline function 'com.github.ajalt.colormath.model.Oklab.toOklch.<anonymous>' call
|
|
2123
|
+
var h_0 = normalizeDeg_0(h);
|
|
2124
|
+
return new Oklch(this.g1l_1, c, h_0, this.j1l_1);
|
|
2125
|
+
};
|
|
2126
|
+
protoOf(Oklab).e1l = function () {
|
|
2127
|
+
return this;
|
|
2128
|
+
};
|
|
2129
|
+
protoOf(Oklab).z2 = function () {
|
|
2130
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
2131
|
+
return new Float32Array([this.g1l_1, this.h1l_1, this.i1l_1, this.j1l_1]);
|
|
2132
|
+
};
|
|
2133
|
+
protoOf(Oklab).toString = function () {
|
|
2134
|
+
return 'Oklab(l=' + this.g1l_1 + ', a=' + this.h1l_1 + ', b=' + this.i1l_1 + ', alpha=' + this.j1l_1 + ')';
|
|
2135
|
+
};
|
|
2136
|
+
protoOf(Oklab).hashCode = function () {
|
|
2137
|
+
var result = getNumberHashCode(this.g1l_1);
|
|
2138
|
+
result = imul(result, 31) + getNumberHashCode(this.h1l_1) | 0;
|
|
2139
|
+
result = imul(result, 31) + getNumberHashCode(this.i1l_1) | 0;
|
|
2140
|
+
result = imul(result, 31) + getNumberHashCode(this.j1l_1) | 0;
|
|
2141
|
+
return result;
|
|
2142
|
+
};
|
|
2143
|
+
protoOf(Oklab).equals = function (other) {
|
|
2144
|
+
if (this === other)
|
|
2145
|
+
return true;
|
|
2146
|
+
if (!(other instanceof Oklab))
|
|
2147
|
+
return false;
|
|
2148
|
+
var tmp0_other_with_cast = other instanceof Oklab ? other : THROW_CCE();
|
|
2149
|
+
if (!equals(this.g1l_1, tmp0_other_with_cast.g1l_1))
|
|
2150
|
+
return false;
|
|
2151
|
+
if (!equals(this.h1l_1, tmp0_other_with_cast.h1l_1))
|
|
2152
|
+
return false;
|
|
2153
|
+
if (!equals(this.i1l_1, tmp0_other_with_cast.i1l_1))
|
|
2154
|
+
return false;
|
|
2155
|
+
if (!equals(this.j1l_1, tmp0_other_with_cast.j1l_1))
|
|
2156
|
+
return false;
|
|
2157
|
+
return true;
|
|
2158
|
+
};
|
|
2159
|
+
function Companion_5() {
|
|
2160
|
+
Companion_instance_6 = this;
|
|
2161
|
+
this.v1m_1 = componentInfoList([new ColorComponentInfo('l', false, 0.0, 1.0), new ColorComponentInfo('c', false, 0.0, 0.4), new ColorComponentInfo('h', true, 0.0, 360.0)]);
|
|
2162
|
+
}
|
|
2163
|
+
protoOf(Companion_5).pa = function () {
|
|
2164
|
+
return 'Oklch';
|
|
2165
|
+
};
|
|
2166
|
+
protoOf(Companion_5).q1l = function () {
|
|
2167
|
+
return this.v1m_1;
|
|
2168
|
+
};
|
|
2169
|
+
protoOf(Companion_5).k1l = function (color) {
|
|
2170
|
+
return color.f1l();
|
|
2171
|
+
};
|
|
2172
|
+
protoOf(Companion_5).r1l = function (components) {
|
|
2173
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2174
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2175
|
+
var size = this.q1l().l();
|
|
2176
|
+
// Inline function 'kotlin.require' call
|
|
2177
|
+
var containsLower = size - 1 | 0;
|
|
2178
|
+
var containsArg = components.length;
|
|
2179
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2180
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2181
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2182
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2183
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2184
|
+
}
|
|
2185
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2186
|
+
var tmp = components[0];
|
|
2187
|
+
var tmp_0 = components[1];
|
|
2188
|
+
var tmp_1 = components[2];
|
|
2189
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
2190
|
+
var tmp_2;
|
|
2191
|
+
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
2192
|
+
tmp_2 = components[3];
|
|
2193
|
+
} else {
|
|
2194
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2195
|
+
tmp_2 = 1.0;
|
|
2196
|
+
}
|
|
2197
|
+
var tmp$ret$2 = tmp_2;
|
|
2198
|
+
return new Oklch(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2199
|
+
};
|
|
2200
|
+
var Companion_instance_6;
|
|
2201
|
+
function Companion_getInstance_5() {
|
|
2202
|
+
if (Companion_instance_6 == null)
|
|
2203
|
+
new Companion_5();
|
|
2204
|
+
return Companion_instance_6;
|
|
2205
|
+
}
|
|
2206
|
+
function Oklch(l, c, h, alpha) {
|
|
2207
|
+
Companion_getInstance_5();
|
|
2208
|
+
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2209
|
+
this.h1o_1 = l;
|
|
2210
|
+
this.i1o_1 = c;
|
|
2211
|
+
this.j1o_1 = h;
|
|
2212
|
+
this.k1o_1 = alpha;
|
|
2213
|
+
}
|
|
2214
|
+
protoOf(Oklch).l1o = function () {
|
|
2215
|
+
return this.j1o_1;
|
|
2216
|
+
};
|
|
2217
|
+
protoOf(Oklch).h1k = function () {
|
|
2218
|
+
return this.k1o_1;
|
|
2219
|
+
};
|
|
2220
|
+
protoOf(Oklch).i1k = function () {
|
|
2221
|
+
return Companion_getInstance_5();
|
|
2222
|
+
};
|
|
2223
|
+
protoOf(Oklch).j1k = function () {
|
|
2224
|
+
return this.e1l().j1k();
|
|
2225
|
+
};
|
|
2226
|
+
protoOf(Oklch).q1k = function () {
|
|
2227
|
+
return this.e1l().q1k();
|
|
2228
|
+
};
|
|
2229
|
+
protoOf(Oklch).e1l = function () {
|
|
2230
|
+
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
2231
|
+
var c = this.i1o_1;
|
|
2232
|
+
var h = this.j1o_1;
|
|
2233
|
+
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
2234
|
+
// Inline function 'kotlin.math.cos' call
|
|
2235
|
+
var a = c * Math.cos(hDegrees);
|
|
2236
|
+
// Inline function 'kotlin.math.sin' call
|
|
2237
|
+
var b = c * Math.sin(hDegrees);
|
|
2238
|
+
// Inline function 'com.github.ajalt.colormath.model.Oklch.toOklab.<anonymous>' call
|
|
2239
|
+
return new Oklab(this.h1o_1, a, b, this.k1o_1);
|
|
2240
|
+
};
|
|
2241
|
+
protoOf(Oklch).f1l = function () {
|
|
2242
|
+
return this;
|
|
2243
|
+
};
|
|
2244
|
+
protoOf(Oklch).z2 = function () {
|
|
2245
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
2246
|
+
return new Float32Array([this.h1o_1, this.i1o_1, this.j1o_1, this.k1o_1]);
|
|
2247
|
+
};
|
|
2248
|
+
protoOf(Oklch).toString = function () {
|
|
2249
|
+
return 'Oklch(l=' + this.h1o_1 + ', c=' + this.i1o_1 + ', h=' + this.j1o_1 + ', alpha=' + this.k1o_1 + ')';
|
|
2250
|
+
};
|
|
2251
|
+
protoOf(Oklch).hashCode = function () {
|
|
2252
|
+
var result = getNumberHashCode(this.h1o_1);
|
|
2253
|
+
result = imul(result, 31) + getNumberHashCode(this.i1o_1) | 0;
|
|
2254
|
+
result = imul(result, 31) + getNumberHashCode(this.j1o_1) | 0;
|
|
2255
|
+
result = imul(result, 31) + getNumberHashCode(this.k1o_1) | 0;
|
|
2256
|
+
return result;
|
|
2257
|
+
};
|
|
2258
|
+
protoOf(Oklch).equals = function (other) {
|
|
2259
|
+
if (this === other)
|
|
2260
|
+
return true;
|
|
2261
|
+
if (!(other instanceof Oklch))
|
|
2262
|
+
return false;
|
|
2263
|
+
var tmp0_other_with_cast = other instanceof Oklch ? other : THROW_CCE();
|
|
2264
|
+
if (!equals(this.h1o_1, tmp0_other_with_cast.h1o_1))
|
|
2265
|
+
return false;
|
|
2266
|
+
if (!equals(this.i1o_1, tmp0_other_with_cast.i1o_1))
|
|
2267
|
+
return false;
|
|
2268
|
+
if (!equals(this.j1o_1, tmp0_other_with_cast.j1o_1))
|
|
2269
|
+
return false;
|
|
2270
|
+
if (!equals(this.k1o_1, tmp0_other_with_cast.k1o_1))
|
|
2271
|
+
return false;
|
|
2272
|
+
return true;
|
|
2273
|
+
};
|
|
2274
|
+
function GammaTransferFunctions(gamma) {
|
|
2275
|
+
this.v1p_1 = gamma;
|
|
2276
|
+
}
|
|
2277
|
+
protoOf(GammaTransferFunctions).h1p = function (x) {
|
|
2278
|
+
return spow(x, this.v1p_1);
|
|
2279
|
+
};
|
|
2280
|
+
protoOf(GammaTransferFunctions).i1p = function (x) {
|
|
2281
|
+
return spow(x, 1.0 / this.v1p_1);
|
|
2282
|
+
};
|
|
2283
|
+
protoOf(GammaTransferFunctions).toString = function () {
|
|
2284
|
+
return 'GammaTransferFunctions(gamma=' + this.v1p_1 + ')';
|
|
2285
|
+
};
|
|
2286
|
+
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2287
|
+
return getNumberHashCode(this.v1p_1);
|
|
2288
|
+
};
|
|
2289
|
+
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2290
|
+
if (this === other)
|
|
2291
|
+
return true;
|
|
2292
|
+
if (!(other instanceof GammaTransferFunctions))
|
|
2293
|
+
return false;
|
|
2294
|
+
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2295
|
+
if (!equals(this.v1p_1, tmp0_other_with_cast.v1p_1))
|
|
2296
|
+
return false;
|
|
2297
|
+
return true;
|
|
2298
|
+
};
|
|
2299
|
+
function LinearTransferFunctions() {
|
|
2300
|
+
}
|
|
2301
|
+
protoOf(LinearTransferFunctions).h1p = function (x) {
|
|
2302
|
+
return x;
|
|
2303
|
+
};
|
|
2304
|
+
protoOf(LinearTransferFunctions).i1p = function (x) {
|
|
2305
|
+
return x;
|
|
2306
|
+
};
|
|
2307
|
+
var LinearTransferFunctions_instance;
|
|
2308
|
+
function LinearTransferFunctions_getInstance() {
|
|
2309
|
+
return LinearTransferFunctions_instance;
|
|
2310
|
+
}
|
|
2311
|
+
function RGBColorSpace() {
|
|
2312
|
+
}
|
|
2313
|
+
function Companion_6() {
|
|
2314
|
+
Companion_instance_7 = this;
|
|
2315
|
+
this.j1m_1 = RGBColorSpaces_getInstance().w1m_1;
|
|
2316
|
+
}
|
|
2317
|
+
protoOf(Companion_6).q1l = function () {
|
|
2318
|
+
return this.j1m_1.q1l();
|
|
2319
|
+
};
|
|
2320
|
+
protoOf(Companion_6).x1p = function () {
|
|
2321
|
+
return this.j1m_1.x1p();
|
|
2322
|
+
};
|
|
2323
|
+
protoOf(Companion_6).w1p = function () {
|
|
2324
|
+
return this.j1m_1.w1p();
|
|
2325
|
+
};
|
|
2326
|
+
protoOf(Companion_6).pa = function () {
|
|
2327
|
+
return this.j1m_1.pa();
|
|
2328
|
+
};
|
|
2329
|
+
protoOf(Companion_6).y1o = function () {
|
|
2330
|
+
return this.j1m_1.y1o();
|
|
2331
|
+
};
|
|
2332
|
+
protoOf(Companion_6).p1l = function () {
|
|
2333
|
+
return this.j1m_1.p1l();
|
|
2334
|
+
};
|
|
2335
|
+
protoOf(Companion_6).k1l = function (color) {
|
|
2336
|
+
return this.j1m_1.k1l(color);
|
|
2337
|
+
};
|
|
2338
|
+
protoOf(Companion_6).r1l = function (components) {
|
|
2339
|
+
return this.j1m_1.r1l(components);
|
|
2340
|
+
};
|
|
2341
|
+
protoOf(Companion_6).p1o = function (r, g, b, alpha) {
|
|
2342
|
+
return this.j1m_1.p1o(r, g, b, alpha);
|
|
2343
|
+
};
|
|
2344
|
+
protoOf(Companion_6).l1m = function (r, g, b, alpha) {
|
|
2345
|
+
return this.j1m_1.l1m(r, g, b, alpha);
|
|
2346
|
+
};
|
|
2347
|
+
protoOf(Companion_6).j1p = function (r, g, b, alpha) {
|
|
2348
|
+
return this.j1m_1.j1p(r, g, b, alpha);
|
|
2349
|
+
};
|
|
2350
|
+
protoOf(Companion_6).k1m = function (hex) {
|
|
2351
|
+
return this.j1m_1.k1m(hex);
|
|
2352
|
+
};
|
|
2353
|
+
protoOf(Companion_6).equals = function (other) {
|
|
2354
|
+
return equals(RGBColorSpaces_getInstance().w1m_1, other);
|
|
2355
|
+
};
|
|
2356
|
+
protoOf(Companion_6).hashCode = function () {
|
|
2357
|
+
return hashCode(RGBColorSpaces_getInstance().w1m_1);
|
|
2358
|
+
};
|
|
2359
|
+
var Companion_instance_7;
|
|
2360
|
+
function Companion_getInstance_6() {
|
|
2361
|
+
if (Companion_instance_7 == null)
|
|
2362
|
+
new Companion_6();
|
|
2363
|
+
return Companion_instance_7;
|
|
2364
|
+
}
|
|
2365
|
+
function RGB(r, g, b, alpha, space) {
|
|
2366
|
+
Companion_getInstance_6();
|
|
2367
|
+
this.l1k_1 = r;
|
|
2368
|
+
this.m1k_1 = g;
|
|
1919
2369
|
this.n1k_1 = b;
|
|
1920
2370
|
this.o1k_1 = alpha;
|
|
1921
2371
|
this.p1k_1 = space;
|
|
@@ -1926,22 +2376,22 @@
|
|
|
1926
2376
|
protoOf(RGB).i1k = function () {
|
|
1927
2377
|
return this.p1k_1;
|
|
1928
2378
|
};
|
|
1929
|
-
protoOf(RGB).
|
|
2379
|
+
protoOf(RGB).t1n = function () {
|
|
1930
2380
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1931
2381
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
1932
|
-
var $this$toSRGB = this.
|
|
2382
|
+
var $this$toSRGB = this.y1p(SRGB_getInstance());
|
|
1933
2383
|
return _RGBInt___init__impl__lqova7_1($this$toSRGB.l1k_1, $this$toSRGB.m1k_1, $this$toSRGB.n1k_1, nanToOne($this$toSRGB.o1k_1));
|
|
1934
2384
|
};
|
|
1935
|
-
protoOf(RGB).
|
|
1936
|
-
var f = SRGB_getInstance().
|
|
1937
|
-
return equals(this.p1k_1, space) ? this : (equals(this.p1k_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().
|
|
2385
|
+
protoOf(RGB).y1p = function (space) {
|
|
2386
|
+
var f = SRGB_getInstance().y1o();
|
|
2387
|
+
return equals(this.p1k_1, space) ? this : (equals(this.p1k_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().x1m_1) : false) ? space.l1m(f.h1p(this.l1k_1), f.h1p(this.m1k_1), f.h1p(this.n1k_1), this.o1k_1) : (equals(this.p1k_1, RGBColorSpaces_getInstance().x1m_1) ? equals(space, SRGB_getInstance()) : false) ? space.l1m(f.i1p(this.l1k_1), f.i1p(this.m1k_1), f.i1p(this.n1k_1), this.o1k_1) : this.q1k().z1p(space);
|
|
1938
2388
|
};
|
|
1939
2389
|
protoOf(RGB).k1k = function () {
|
|
1940
2390
|
var tmp$ret$3;
|
|
1941
2391
|
$l$block: {
|
|
1942
2392
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
1943
2393
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1944
|
-
var $this$toSRGB = this.
|
|
2394
|
+
var $this$toSRGB = this.y1p(SRGB_getInstance());
|
|
1945
2395
|
var r = $this$toSRGB.l1k_1;
|
|
1946
2396
|
var g = $this$toSRGB.m1k_1;
|
|
1947
2397
|
var b = $this$toSRGB.n1k_1;
|
|
@@ -1973,24 +2423,24 @@
|
|
|
1973
2423
|
return tmp$ret$3;
|
|
1974
2424
|
};
|
|
1975
2425
|
protoOf(RGB).q1k = function () {
|
|
1976
|
-
var f = this.p1k_1.
|
|
2426
|
+
var f = this.p1k_1.y1o();
|
|
1977
2427
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1978
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.p1k_1.
|
|
1979
|
-
var v0 = f.
|
|
1980
|
-
var v1 = f.
|
|
1981
|
-
var v2 = f.
|
|
2428
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.p1k_1.w1p());
|
|
2429
|
+
var v0 = f.h1p(this.l1k_1);
|
|
2430
|
+
var v1 = f.h1p(this.m1k_1);
|
|
2431
|
+
var v2 = f.h1p(this.n1k_1);
|
|
1982
2432
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
1983
2433
|
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;
|
|
1984
2434
|
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;
|
|
1985
2435
|
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;
|
|
1986
|
-
return XYZColorSpace_0(this.p1k_1.
|
|
2436
|
+
return XYZColorSpace_0(this.p1k_1.p1l()).l1m(x, y, z, this.o1k_1);
|
|
1987
2437
|
};
|
|
1988
2438
|
protoOf(RGB).d1l = function () {
|
|
1989
2439
|
var tmp$ret$3;
|
|
1990
2440
|
$l$block: {
|
|
1991
2441
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
1992
2442
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1993
|
-
var $this$toSRGB = this.
|
|
2443
|
+
var $this$toSRGB = this.y1p(SRGB_getInstance());
|
|
1994
2444
|
var r = $this$toSRGB.l1k_1;
|
|
1995
2445
|
var g = $this$toSRGB.m1k_1;
|
|
1996
2446
|
var b = $this$toSRGB.n1k_1;
|
|
@@ -2019,8 +2469,25 @@
|
|
|
2019
2469
|
}
|
|
2020
2470
|
return tmp$ret$3;
|
|
2021
2471
|
};
|
|
2472
|
+
protoOf(RGB).e1l = function () {
|
|
2473
|
+
if (!equals(this.p1k_1, RGBColorSpaces_getInstance().w1m_1))
|
|
2474
|
+
return this.q1k().e1l();
|
|
2475
|
+
var r = this.p1k_1.y1o().h1p(this.l1k_1);
|
|
2476
|
+
var g = this.p1k_1.y1o().h1p(this.m1k_1);
|
|
2477
|
+
var b = this.p1k_1.y1o().h1p(this.n1k_1);
|
|
2478
|
+
var l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
|
|
2479
|
+
var m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
|
|
2480
|
+
var s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
|
|
2481
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
2482
|
+
var ll = Math.cbrt(l);
|
|
2483
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
2484
|
+
var mm = Math.cbrt(m);
|
|
2485
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
2486
|
+
var ss = Math.cbrt(s);
|
|
2487
|
+
return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.o1k_1);
|
|
2488
|
+
};
|
|
2022
2489
|
protoOf(RGB).j1k = function () {
|
|
2023
|
-
return this.
|
|
2490
|
+
return this.y1p(RGBColorSpaces_getInstance().w1m_1);
|
|
2024
2491
|
};
|
|
2025
2492
|
protoOf(RGB).z2 = function () {
|
|
2026
2493
|
// Inline function 'kotlin.floatArrayOf' call
|
|
@@ -2066,7 +2533,7 @@
|
|
|
2066
2533
|
// Inline function 'kotlin.contracts.contract' call
|
|
2067
2534
|
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
2068
2535
|
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
2069
|
-
var tmp$ret$1 =
|
|
2536
|
+
var tmp$ret$1 = toString_0(it) + toString_0(it);
|
|
2070
2537
|
tmp = toInt(tmp$ret$1, 16);
|
|
2071
2538
|
}
|
|
2072
2539
|
return tmp;
|
|
@@ -2094,7 +2561,7 @@
|
|
|
2094
2561
|
if (!tmp$ret$0) {
|
|
2095
2562
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
2096
2563
|
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
2097
|
-
throw IllegalArgumentException_init_$Create$(
|
|
2564
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2098
2565
|
}
|
|
2099
2566
|
return _this__u8e3s4;
|
|
2100
2567
|
}
|
|
@@ -2151,20 +2618,48 @@
|
|
|
2151
2618
|
return ACES_AP1_B;
|
|
2152
2619
|
}
|
|
2153
2620
|
var ACES_AP1_B;
|
|
2621
|
+
function RGBColorSpaces$SRGB$lambda($this$$receiver, it) {
|
|
2622
|
+
return it.j1k();
|
|
2623
|
+
}
|
|
2624
|
+
function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
2625
|
+
var tmp;
|
|
2626
|
+
if (color instanceof RGB) {
|
|
2627
|
+
tmp = color.y1p($this$$receiver);
|
|
2628
|
+
} else {
|
|
2629
|
+
if (color instanceof ICtCp) {
|
|
2630
|
+
tmp = color.x1o();
|
|
2631
|
+
} else {
|
|
2632
|
+
tmp = color.q1k().z1p($this$$receiver);
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
return tmp;
|
|
2636
|
+
}
|
|
2154
2637
|
function RGBColorSpaces() {
|
|
2155
2638
|
RGBColorSpaces_instance = this;
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
this.
|
|
2164
|
-
this.
|
|
2165
|
-
this.
|
|
2166
|
-
this.
|
|
2167
|
-
this.
|
|
2639
|
+
var tmp = this;
|
|
2640
|
+
var tmp_0 = Illuminant_getInstance().q1n_1;
|
|
2641
|
+
var tmp_1 = SRGBTransferFunctions_instance;
|
|
2642
|
+
var tmp_2 = get_SRGB_R();
|
|
2643
|
+
var tmp_3 = get_SRGB_G();
|
|
2644
|
+
var tmp_4 = get_SRGB_B();
|
|
2645
|
+
tmp.w1m_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
2646
|
+
this.x1m_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().q1n_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2647
|
+
this.y1m_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2648
|
+
this.z1m_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2649
|
+
this.a1n_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2650
|
+
this.b1n_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2651
|
+
this.c1n_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().q1n_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));
|
|
2652
|
+
var tmp_5 = this;
|
|
2653
|
+
var tmp_6 = Illuminant_getInstance().q1n_1;
|
|
2654
|
+
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
2655
|
+
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
2656
|
+
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
2657
|
+
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
2658
|
+
tmp_5.d1n_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
2659
|
+
this.e1n_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().q1n_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2660
|
+
this.f1n_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));
|
|
2661
|
+
this.g1n_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().q1n_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2662
|
+
this.h1n_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().o1n_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));
|
|
2168
2663
|
}
|
|
2169
2664
|
var RGBColorSpaces_instance;
|
|
2170
2665
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2174,38 +2669,90 @@
|
|
|
2174
2669
|
}
|
|
2175
2670
|
function SRGB() {
|
|
2176
2671
|
SRGB_instance = this;
|
|
2177
|
-
this.
|
|
2178
|
-
this.c1o_1 = rectangularComponentInfo('RGB');
|
|
2179
|
-
this.d1o_1 = Illuminant_getInstance().v1n_1;
|
|
2180
|
-
this.e1o_1 = SRGBTransferFunctions_instance;
|
|
2181
|
-
this.f1o_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.d1o_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
2182
|
-
this.g1o_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.f1o_1)));
|
|
2672
|
+
this.q1o_1 = RGBColorSpaces_getInstance().w1m_1;
|
|
2183
2673
|
}
|
|
2674
|
+
protoOf(SRGB).q1l = function () {
|
|
2675
|
+
return this.q1o_1.q1l();
|
|
2676
|
+
};
|
|
2677
|
+
protoOf(SRGB).x1p = function () {
|
|
2678
|
+
return this.q1o_1.x1p();
|
|
2679
|
+
};
|
|
2680
|
+
protoOf(SRGB).w1p = function () {
|
|
2681
|
+
return this.q1o_1.w1p();
|
|
2682
|
+
};
|
|
2184
2683
|
protoOf(SRGB).pa = function () {
|
|
2185
|
-
return this.
|
|
2684
|
+
return this.q1o_1.pa();
|
|
2186
2685
|
};
|
|
2187
|
-
protoOf(SRGB).
|
|
2188
|
-
return this.
|
|
2686
|
+
protoOf(SRGB).y1o = function () {
|
|
2687
|
+
return this.q1o_1.y1o();
|
|
2189
2688
|
};
|
|
2190
|
-
protoOf(SRGB).
|
|
2191
|
-
return this.
|
|
2689
|
+
protoOf(SRGB).p1l = function () {
|
|
2690
|
+
return this.q1o_1.p1l();
|
|
2192
2691
|
};
|
|
2193
|
-
protoOf(SRGB).
|
|
2194
|
-
return this.
|
|
2692
|
+
protoOf(SRGB).k1l = function (color) {
|
|
2693
|
+
return this.q1o_1.k1l(color);
|
|
2195
2694
|
};
|
|
2196
|
-
protoOf(SRGB).
|
|
2197
|
-
return this.
|
|
2695
|
+
protoOf(SRGB).r1l = function (components) {
|
|
2696
|
+
return this.q1o_1.r1l(components);
|
|
2198
2697
|
};
|
|
2199
|
-
protoOf(SRGB).
|
|
2200
|
-
return this.
|
|
2698
|
+
protoOf(SRGB).p1o = function (r, g, b, alpha) {
|
|
2699
|
+
return this.q1o_1.p1o(r, g, b, alpha);
|
|
2201
2700
|
};
|
|
2202
|
-
protoOf(SRGB).
|
|
2203
|
-
return
|
|
2701
|
+
protoOf(SRGB).l1m = function (r, g, b, alpha) {
|
|
2702
|
+
return this.q1o_1.l1m(r, g, b, alpha);
|
|
2204
2703
|
};
|
|
2205
|
-
protoOf(SRGB).
|
|
2704
|
+
protoOf(SRGB).j1p = function (r, g, b, alpha) {
|
|
2705
|
+
return this.q1o_1.j1p(r, g, b, alpha);
|
|
2706
|
+
};
|
|
2707
|
+
protoOf(SRGB).k1m = function (hex) {
|
|
2708
|
+
return this.q1o_1.k1m(hex);
|
|
2709
|
+
};
|
|
2710
|
+
protoOf(SRGB).equals = function (other) {
|
|
2711
|
+
return equals(RGBColorSpaces_getInstance().w1m_1, other);
|
|
2712
|
+
};
|
|
2713
|
+
protoOf(SRGB).hashCode = function () {
|
|
2714
|
+
return hashCode(RGBColorSpaces_getInstance().w1m_1);
|
|
2715
|
+
};
|
|
2716
|
+
protoOf(SRGB).toString = function () {
|
|
2717
|
+
return 'sRGB';
|
|
2718
|
+
};
|
|
2719
|
+
var SRGB_instance;
|
|
2720
|
+
function SRGB_getInstance() {
|
|
2721
|
+
if (SRGB_instance == null)
|
|
2722
|
+
new SRGB();
|
|
2723
|
+
return SRGB_instance;
|
|
2724
|
+
}
|
|
2725
|
+
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
2726
|
+
this.a1q_1 = name;
|
|
2727
|
+
this.b1q_1 = whitePoint;
|
|
2728
|
+
this.c1q_1 = transferFunctions;
|
|
2729
|
+
this.d1q_1 = r;
|
|
2730
|
+
this.e1q_1 = g;
|
|
2731
|
+
this.f1q_1 = b;
|
|
2732
|
+
this.g1q_1 = convertImpl;
|
|
2733
|
+
this.h1q_1 = zeroOneComponentInfo('RGB');
|
|
2734
|
+
this.i1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.b1q_1, this.d1q_1, this.e1q_1, this.f1q_1));
|
|
2735
|
+
this.j1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.i1q_1)));
|
|
2736
|
+
}
|
|
2737
|
+
protoOf(RGBColorSpaceImpl).pa = function () {
|
|
2738
|
+
return this.a1q_1;
|
|
2739
|
+
};
|
|
2740
|
+
protoOf(RGBColorSpaceImpl).p1l = function () {
|
|
2741
|
+
return this.b1q_1;
|
|
2742
|
+
};
|
|
2743
|
+
protoOf(RGBColorSpaceImpl).y1o = function () {
|
|
2744
|
+
return this.c1q_1;
|
|
2745
|
+
};
|
|
2746
|
+
protoOf(RGBColorSpaceImpl).q1l = function () {
|
|
2747
|
+
return this.h1q_1;
|
|
2748
|
+
};
|
|
2749
|
+
protoOf(RGBColorSpaceImpl).k1l = function (color) {
|
|
2750
|
+
return this.g1q_1(this, color);
|
|
2751
|
+
};
|
|
2752
|
+
protoOf(RGBColorSpaceImpl).r1l = function (components) {
|
|
2206
2753
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2207
2754
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2208
|
-
var size = this.
|
|
2755
|
+
var size = this.q1l().l();
|
|
2209
2756
|
// Inline function 'kotlin.require' call
|
|
2210
2757
|
var containsLower = size - 1 | 0;
|
|
2211
2758
|
var containsArg = components.length;
|
|
@@ -2213,7 +2760,7 @@
|
|
|
2213
2760
|
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2214
2761
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2215
2762
|
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2216
|
-
throw IllegalArgumentException_init_$Create$(
|
|
2763
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2217
2764
|
}
|
|
2218
2765
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2219
2766
|
var tmp = components[0];
|
|
@@ -2228,38 +2775,85 @@
|
|
|
2228
2775
|
tmp_2 = 1.0;
|
|
2229
2776
|
}
|
|
2230
2777
|
var tmp$ret$2 = tmp_2;
|
|
2231
|
-
return this.
|
|
2778
|
+
return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2232
2779
|
};
|
|
2233
|
-
protoOf(
|
|
2234
|
-
return this.
|
|
2780
|
+
protoOf(RGBColorSpaceImpl).w1p = function () {
|
|
2781
|
+
return this.i1q_1;
|
|
2235
2782
|
};
|
|
2236
|
-
protoOf(
|
|
2783
|
+
protoOf(RGBColorSpaceImpl).x1p = function () {
|
|
2784
|
+
return this.j1q_1;
|
|
2785
|
+
};
|
|
2786
|
+
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2787
|
+
return this.a1q_1;
|
|
2788
|
+
};
|
|
2789
|
+
protoOf(RGBColorSpaceImpl).l1m = function (r, g, b, alpha) {
|
|
2237
2790
|
return new RGB(r, g, b, alpha, this);
|
|
2238
2791
|
};
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2792
|
+
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
2793
|
+
if (this === other)
|
|
2794
|
+
return true;
|
|
2795
|
+
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
2796
|
+
return false;
|
|
2797
|
+
if (!(this.a1q_1 === other.pa()))
|
|
2798
|
+
return false;
|
|
2799
|
+
if (!this.b1q_1.equals(other.p1l()))
|
|
2800
|
+
return false;
|
|
2801
|
+
if (!equals(this.c1q_1, other.y1o()))
|
|
2802
|
+
return false;
|
|
2803
|
+
if (other instanceof RGBColorSpaceImpl) {
|
|
2804
|
+
if (!this.d1q_1.equals(other.d1q_1))
|
|
2805
|
+
return false;
|
|
2806
|
+
if (!this.e1q_1.equals(other.e1q_1))
|
|
2807
|
+
return false;
|
|
2808
|
+
if (!this.f1q_1.equals(other.f1q_1))
|
|
2809
|
+
return false;
|
|
2810
|
+
} else {
|
|
2811
|
+
if (!contentEquals(this.i1q_1, other.w1p()))
|
|
2812
|
+
return false;
|
|
2813
|
+
if (!contentEquals(this.j1q_1, other.x1p()))
|
|
2814
|
+
return false;
|
|
2815
|
+
}
|
|
2816
|
+
return true;
|
|
2817
|
+
};
|
|
2818
|
+
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2819
|
+
var result = getStringHashCode(this.a1q_1);
|
|
2820
|
+
result = imul(31, result) + this.b1q_1.hashCode() | 0;
|
|
2821
|
+
result = imul(31, result) + hashCode(this.c1q_1) | 0;
|
|
2822
|
+
result = imul(31, result) + this.d1q_1.hashCode() | 0;
|
|
2823
|
+
result = imul(31, result) + this.e1q_1.hashCode() | 0;
|
|
2824
|
+
result = imul(31, result) + this.f1q_1.hashCode() | 0;
|
|
2825
|
+
return result;
|
|
2826
|
+
};
|
|
2827
|
+
function SRGBTransferFunctions() {
|
|
2828
|
+
}
|
|
2829
|
+
protoOf(SRGBTransferFunctions).i1p = function (x) {
|
|
2830
|
+
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
2831
|
+
};
|
|
2832
|
+
protoOf(SRGBTransferFunctions).h1p = function (x) {
|
|
2833
|
+
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2834
|
+
};
|
|
2835
|
+
var SRGBTransferFunctions_instance;
|
|
2836
|
+
function SRGBTransferFunctions_getInstance() {
|
|
2837
|
+
return SRGBTransferFunctions_instance;
|
|
2244
2838
|
}
|
|
2245
2839
|
function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
|
|
2246
2840
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2247
|
-
return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b);
|
|
2841
|
+
return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, RGBColorSpace$lambda);
|
|
2248
2842
|
}
|
|
2249
2843
|
function ACESccTransferFunctions() {
|
|
2250
2844
|
ACESccTransferFunctions_instance = this;
|
|
2251
|
-
this.
|
|
2252
|
-
this.
|
|
2253
|
-
this.
|
|
2845
|
+
this.k1q_1 = 3.0517578125E-5;
|
|
2846
|
+
this.l1q_1 = 1.52587890625E-5;
|
|
2847
|
+
this.m1q_1 = -0.3013698630136986;
|
|
2254
2848
|
var tmp = this;
|
|
2255
2849
|
// Inline function 'kotlin.math.log2' call
|
|
2256
|
-
tmp.
|
|
2850
|
+
tmp.n1q_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2257
2851
|
}
|
|
2258
|
-
protoOf(ACESccTransferFunctions).
|
|
2852
|
+
protoOf(ACESccTransferFunctions).h1p = function (x) {
|
|
2259
2853
|
var tmp;
|
|
2260
2854
|
if (x <= -0.3013698630136986) {
|
|
2261
2855
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
2262
|
-
} else if (x < this.
|
|
2856
|
+
} else if (x < this.n1q_1) {
|
|
2263
2857
|
// Inline function 'kotlin.math.pow' call
|
|
2264
2858
|
var x_0 = x * 17.52 - 9.72;
|
|
2265
2859
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2268,11 +2862,11 @@
|
|
|
2268
2862
|
}
|
|
2269
2863
|
return tmp;
|
|
2270
2864
|
};
|
|
2271
|
-
protoOf(ACESccTransferFunctions).
|
|
2865
|
+
protoOf(ACESccTransferFunctions).i1p = function (x) {
|
|
2272
2866
|
var tmp;
|
|
2273
2867
|
if (x < 3.0517578125E-5) {
|
|
2274
2868
|
// Inline function 'kotlin.math.log2' call
|
|
2275
|
-
var x_0 = 1.52587890625E-5 +
|
|
2869
|
+
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
2276
2870
|
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
2277
2871
|
} else {
|
|
2278
2872
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -2288,17 +2882,17 @@
|
|
|
2288
2882
|
}
|
|
2289
2883
|
function ACEScctTransferFunctions() {
|
|
2290
2884
|
ACEScctTransferFunctions_instance = this;
|
|
2291
|
-
this.
|
|
2292
|
-
this.
|
|
2885
|
+
this.o1q_1 = 10.5402377416545;
|
|
2886
|
+
this.p1q_1 = 0.0729055341958355;
|
|
2293
2887
|
var tmp = this;
|
|
2294
2888
|
// Inline function 'kotlin.math.log2' call
|
|
2295
|
-
tmp.
|
|
2889
|
+
tmp.q1q_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2296
2890
|
}
|
|
2297
|
-
protoOf(ACEScctTransferFunctions).
|
|
2891
|
+
protoOf(ACEScctTransferFunctions).h1p = function (x) {
|
|
2298
2892
|
var tmp;
|
|
2299
2893
|
if (x <= 0.155251141552511) {
|
|
2300
2894
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
2301
|
-
} else if (x < this.
|
|
2895
|
+
} else if (x < this.q1q_1) {
|
|
2302
2896
|
// Inline function 'kotlin.math.pow' call
|
|
2303
2897
|
var x_0 = x * 17.52 - 9.72;
|
|
2304
2898
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2307,7 +2901,7 @@
|
|
|
2307
2901
|
}
|
|
2308
2902
|
return tmp;
|
|
2309
2903
|
};
|
|
2310
|
-
protoOf(ACEScctTransferFunctions).
|
|
2904
|
+
protoOf(ACEScctTransferFunctions).i1p = function (x) {
|
|
2311
2905
|
var tmp;
|
|
2312
2906
|
if (x < 0.0078125) {
|
|
2313
2907
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -2323,94 +2917,34 @@
|
|
|
2323
2917
|
new ACEScctTransferFunctions();
|
|
2324
2918
|
return ACEScctTransferFunctions_instance;
|
|
2325
2919
|
}
|
|
2326
|
-
function
|
|
2327
|
-
|
|
2328
|
-
this.
|
|
2329
|
-
this.
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
this.c1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.b1q_1)));
|
|
2920
|
+
function BT2020TransferFunctions() {
|
|
2921
|
+
BT2020TransferFunctions_instance = this;
|
|
2922
|
+
this.r1q_1 = 1.0993;
|
|
2923
|
+
this.s1q_1 = 0.0181;
|
|
2924
|
+
var tmp = this;
|
|
2925
|
+
// Inline function 'kotlin.math.pow' call
|
|
2926
|
+
tmp.t1q_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
2334
2927
|
}
|
|
2335
|
-
protoOf(
|
|
2336
|
-
return this.
|
|
2337
|
-
};
|
|
2338
|
-
protoOf(BT2020Space).g1l = function () {
|
|
2339
|
-
return this.y1p_1;
|
|
2340
|
-
};
|
|
2341
|
-
protoOf(BT2020Space).f1l = function () {
|
|
2342
|
-
return this.z1p_1;
|
|
2343
|
-
};
|
|
2344
|
-
protoOf(BT2020Space).p1o = function () {
|
|
2345
|
-
return this.a1q_1;
|
|
2346
|
-
};
|
|
2347
|
-
protoOf(BT2020Space).d1m = function (r, g, b, alpha) {
|
|
2348
|
-
return new RGB(r, g, b, alpha, this);
|
|
2349
|
-
};
|
|
2350
|
-
protoOf(BT2020Space).e1l = function (color) {
|
|
2351
|
-
var tmp;
|
|
2352
|
-
if (color instanceof RGB) {
|
|
2353
|
-
tmp = color.o1p(this);
|
|
2354
|
-
} else {
|
|
2355
|
-
if (color instanceof ICtCp) {
|
|
2356
|
-
tmp = color.o1o();
|
|
2357
|
-
} else {
|
|
2358
|
-
tmp = color.q1k().p1p(this);
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
return tmp;
|
|
2928
|
+
protoOf(BT2020TransferFunctions).h1p = function (x) {
|
|
2929
|
+
return numberToDouble(x < this.t1q_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
2362
2930
|
};
|
|
2363
|
-
protoOf(
|
|
2364
|
-
|
|
2365
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2366
|
-
var size = this.g1l().l();
|
|
2367
|
-
// Inline function 'kotlin.require' call
|
|
2368
|
-
var containsLower = size - 1 | 0;
|
|
2369
|
-
var containsArg = components.length;
|
|
2370
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2371
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2372
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2373
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2374
|
-
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2375
|
-
}
|
|
2376
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2377
|
-
var tmp = components[0];
|
|
2378
|
-
var tmp_0 = components[1];
|
|
2379
|
-
var tmp_1 = components[2];
|
|
2380
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
2381
|
-
var tmp_2;
|
|
2382
|
-
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
2383
|
-
tmp_2 = components[3];
|
|
2384
|
-
} else {
|
|
2385
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2386
|
-
tmp_2 = 1.0;
|
|
2387
|
-
}
|
|
2388
|
-
var tmp$ret$2 = tmp_2;
|
|
2389
|
-
return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2390
|
-
};
|
|
2391
|
-
protoOf(BT2020Space).m1p = function () {
|
|
2392
|
-
return this.b1q_1;
|
|
2393
|
-
};
|
|
2394
|
-
protoOf(BT2020Space).n1p = function () {
|
|
2395
|
-
return this.c1q_1;
|
|
2396
|
-
};
|
|
2397
|
-
protoOf(BT2020Space).toString = function () {
|
|
2398
|
-
return this.x1p_1;
|
|
2931
|
+
protoOf(BT2020TransferFunctions).i1p = function (x) {
|
|
2932
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
2399
2933
|
};
|
|
2400
|
-
var
|
|
2401
|
-
function
|
|
2402
|
-
if (
|
|
2403
|
-
new
|
|
2404
|
-
return
|
|
2934
|
+
var BT2020TransferFunctions_instance;
|
|
2935
|
+
function BT2020TransferFunctions_getInstance() {
|
|
2936
|
+
if (BT2020TransferFunctions_instance == null)
|
|
2937
|
+
new BT2020TransferFunctions();
|
|
2938
|
+
return BT2020TransferFunctions_instance;
|
|
2405
2939
|
}
|
|
2406
2940
|
function BT709TransferFunctions() {
|
|
2407
2941
|
BT709TransferFunctions_instance = this;
|
|
2408
|
-
this.
|
|
2942
|
+
this.u1q_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2409
2943
|
}
|
|
2410
|
-
protoOf(BT709TransferFunctions).
|
|
2411
|
-
return numberToDouble(x < this.
|
|
2944
|
+
protoOf(BT709TransferFunctions).h1p = function (x) {
|
|
2945
|
+
return numberToDouble(x < this.u1q_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
2412
2946
|
};
|
|
2413
|
-
protoOf(BT709TransferFunctions).
|
|
2947
|
+
protoOf(BT709TransferFunctions).i1p = function (x) {
|
|
2414
2948
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2415
2949
|
};
|
|
2416
2950
|
var BT709TransferFunctions_instance;
|
|
@@ -2419,25 +2953,13 @@
|
|
|
2419
2953
|
new BT709TransferFunctions();
|
|
2420
2954
|
return BT709TransferFunctions_instance;
|
|
2421
2955
|
}
|
|
2422
|
-
function SRGBTransferFunctions() {
|
|
2423
|
-
}
|
|
2424
|
-
protoOf(SRGBTransferFunctions).z1o = function (x) {
|
|
2425
|
-
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
2426
|
-
};
|
|
2427
|
-
protoOf(SRGBTransferFunctions).y1o = function (x) {
|
|
2428
|
-
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2429
|
-
};
|
|
2430
|
-
var SRGBTransferFunctions_instance;
|
|
2431
|
-
function SRGBTransferFunctions_getInstance() {
|
|
2432
|
-
return SRGBTransferFunctions_instance;
|
|
2433
|
-
}
|
|
2434
2956
|
function ROMMTransferFunctions() {
|
|
2435
|
-
this.
|
|
2957
|
+
this.v1q_1 = 0.001953;
|
|
2436
2958
|
}
|
|
2437
|
-
protoOf(ROMMTransferFunctions).
|
|
2959
|
+
protoOf(ROMMTransferFunctions).h1p = function (x) {
|
|
2438
2960
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
2439
2961
|
};
|
|
2440
|
-
protoOf(ROMMTransferFunctions).
|
|
2962
|
+
protoOf(ROMMTransferFunctions).i1p = function (x) {
|
|
2441
2963
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
2442
2964
|
};
|
|
2443
2965
|
var ROMMTransferFunctions_instance;
|
|
@@ -2446,139 +2968,28 @@
|
|
|
2446
2968
|
}
|
|
2447
2969
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2448
2970
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2449
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2450
|
-
var wp = whitePoint.
|
|
2971
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.l1p_1, g.l1p_1, b.l1p_1, r.m1p_1, g.m1p_1, b.m1p_1, r.w1q(), g.w1q(), b.w1q());
|
|
2972
|
+
var wp = whitePoint.n1o_1;
|
|
2451
2973
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2452
2974
|
var this_0 = inverse(primaries);
|
|
2453
|
-
var v0 = wp.
|
|
2454
|
-
var v1 = wp.
|
|
2455
|
-
var v2 = wp.
|
|
2975
|
+
var v0 = wp.o1p();
|
|
2976
|
+
var v1 = wp.n1p_1;
|
|
2977
|
+
var v2 = wp.p1p();
|
|
2456
2978
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
2457
2979
|
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;
|
|
2458
2980
|
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;
|
|
2459
2981
|
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;
|
|
2460
2982
|
return dotDiagonal(primaries, x, y, z);
|
|
2461
2983
|
}
|
|
2462
|
-
function
|
|
2463
|
-
|
|
2464
|
-
this.h1q_1 = whitePoint;
|
|
2465
|
-
this.i1q_1 = transferFunctions;
|
|
2466
|
-
this.j1q_1 = r;
|
|
2467
|
-
this.k1q_1 = g;
|
|
2468
|
-
this.l1q_1 = b;
|
|
2469
|
-
this.m1q_1 = rectangularComponentInfo('RGB');
|
|
2470
|
-
this.n1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.h1q_1, this.j1q_1, this.k1q_1, this.l1q_1));
|
|
2471
|
-
this.o1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.n1q_1)));
|
|
2472
|
-
}
|
|
2473
|
-
protoOf(RGBColorSpaceImpl).pa = function () {
|
|
2474
|
-
return this.g1q_1;
|
|
2475
|
-
};
|
|
2476
|
-
protoOf(RGBColorSpaceImpl).f1l = function () {
|
|
2477
|
-
return this.h1q_1;
|
|
2478
|
-
};
|
|
2479
|
-
protoOf(RGBColorSpaceImpl).p1o = function () {
|
|
2480
|
-
return this.i1q_1;
|
|
2481
|
-
};
|
|
2482
|
-
protoOf(RGBColorSpaceImpl).g1l = function () {
|
|
2483
|
-
return this.m1q_1;
|
|
2484
|
-
};
|
|
2485
|
-
protoOf(RGBColorSpaceImpl).e1l = function (color) {
|
|
2984
|
+
function RGBColorSpace$lambda($this$$receiver, color) {
|
|
2985
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2486
2986
|
var tmp;
|
|
2487
2987
|
if (color instanceof RGB) {
|
|
2488
|
-
tmp = color.
|
|
2988
|
+
tmp = color.y1p($this$$receiver);
|
|
2489
2989
|
} else {
|
|
2490
|
-
tmp = color.q1k().
|
|
2990
|
+
tmp = color.q1k().z1p($this$$receiver);
|
|
2491
2991
|
}
|
|
2492
2992
|
return tmp;
|
|
2493
|
-
};
|
|
2494
|
-
protoOf(RGBColorSpaceImpl).h1l = function (components) {
|
|
2495
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2496
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2497
|
-
var size = this.g1l().l();
|
|
2498
|
-
// Inline function 'kotlin.require' call
|
|
2499
|
-
var containsLower = size - 1 | 0;
|
|
2500
|
-
var containsArg = components.length;
|
|
2501
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2502
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2503
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2504
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2505
|
-
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2506
|
-
}
|
|
2507
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2508
|
-
var tmp = components[0];
|
|
2509
|
-
var tmp_0 = components[1];
|
|
2510
|
-
var tmp_1 = components[2];
|
|
2511
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
2512
|
-
var tmp_2;
|
|
2513
|
-
if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
|
|
2514
|
-
tmp_2 = components[3];
|
|
2515
|
-
} else {
|
|
2516
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2517
|
-
tmp_2 = 1.0;
|
|
2518
|
-
}
|
|
2519
|
-
var tmp$ret$2 = tmp_2;
|
|
2520
|
-
return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2521
|
-
};
|
|
2522
|
-
protoOf(RGBColorSpaceImpl).m1p = function () {
|
|
2523
|
-
return this.n1q_1;
|
|
2524
|
-
};
|
|
2525
|
-
protoOf(RGBColorSpaceImpl).n1p = function () {
|
|
2526
|
-
return this.o1q_1;
|
|
2527
|
-
};
|
|
2528
|
-
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2529
|
-
return this.g1q_1;
|
|
2530
|
-
};
|
|
2531
|
-
protoOf(RGBColorSpaceImpl).d1m = function (r, g, b, alpha) {
|
|
2532
|
-
return new RGB(r, g, b, alpha, this);
|
|
2533
|
-
};
|
|
2534
|
-
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2535
|
-
var result = getStringHashCode(this.g1q_1);
|
|
2536
|
-
result = imul(result, 31) + this.h1q_1.hashCode() | 0;
|
|
2537
|
-
result = imul(result, 31) + hashCode(this.i1q_1) | 0;
|
|
2538
|
-
result = imul(result, 31) + this.j1q_1.hashCode() | 0;
|
|
2539
|
-
result = imul(result, 31) + this.k1q_1.hashCode() | 0;
|
|
2540
|
-
result = imul(result, 31) + this.l1q_1.hashCode() | 0;
|
|
2541
|
-
return result;
|
|
2542
|
-
};
|
|
2543
|
-
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
2544
|
-
if (this === other)
|
|
2545
|
-
return true;
|
|
2546
|
-
if (!(other instanceof RGBColorSpaceImpl))
|
|
2547
|
-
return false;
|
|
2548
|
-
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
2549
|
-
if (!(this.g1q_1 === tmp0_other_with_cast.g1q_1))
|
|
2550
|
-
return false;
|
|
2551
|
-
if (!this.h1q_1.equals(tmp0_other_with_cast.h1q_1))
|
|
2552
|
-
return false;
|
|
2553
|
-
if (!equals(this.i1q_1, tmp0_other_with_cast.i1q_1))
|
|
2554
|
-
return false;
|
|
2555
|
-
if (!this.j1q_1.equals(tmp0_other_with_cast.j1q_1))
|
|
2556
|
-
return false;
|
|
2557
|
-
if (!this.k1q_1.equals(tmp0_other_with_cast.k1q_1))
|
|
2558
|
-
return false;
|
|
2559
|
-
if (!this.l1q_1.equals(tmp0_other_with_cast.l1q_1))
|
|
2560
|
-
return false;
|
|
2561
|
-
return true;
|
|
2562
|
-
};
|
|
2563
|
-
function BT2020TransferFunctions() {
|
|
2564
|
-
BT2020TransferFunctions_instance = this;
|
|
2565
|
-
this.p1q_1 = 1.0993;
|
|
2566
|
-
this.q1q_1 = 0.0181;
|
|
2567
|
-
var tmp = this;
|
|
2568
|
-
// Inline function 'kotlin.math.pow' call
|
|
2569
|
-
tmp.r1q_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
2570
|
-
}
|
|
2571
|
-
protoOf(BT2020TransferFunctions).y1o = function (x) {
|
|
2572
|
-
return numberToDouble(x < this.r1q_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
2573
|
-
};
|
|
2574
|
-
protoOf(BT2020TransferFunctions).z1o = function (x) {
|
|
2575
|
-
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
2576
|
-
};
|
|
2577
|
-
var BT2020TransferFunctions_instance;
|
|
2578
|
-
function BT2020TransferFunctions_getInstance() {
|
|
2579
|
-
if (BT2020TransferFunctions_instance == null)
|
|
2580
|
-
new BT2020TransferFunctions();
|
|
2581
|
-
return BT2020TransferFunctions_instance;
|
|
2582
2993
|
}
|
|
2583
2994
|
var properties_initialized_RGBColorSpaces_kt_fsnpad;
|
|
2584
2995
|
function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
@@ -2690,41 +3101,47 @@
|
|
|
2690
3101
|
var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
|
|
2691
3102
|
return _UByte___init__impl__g9hnc4(toByte(this_2));
|
|
2692
3103
|
}
|
|
2693
|
-
function
|
|
2694
|
-
|
|
2695
|
-
this.
|
|
3104
|
+
function Companion_7() {
|
|
3105
|
+
Companion_instance_8 = this;
|
|
3106
|
+
this.u1p_1 = XYZColorSpaces_getInstance().i1n_1;
|
|
2696
3107
|
}
|
|
2697
|
-
protoOf(
|
|
2698
|
-
return this.
|
|
3108
|
+
protoOf(Companion_7).q1l = function () {
|
|
3109
|
+
return this.u1p_1.q1l();
|
|
2699
3110
|
};
|
|
2700
|
-
protoOf(
|
|
2701
|
-
return this.
|
|
3111
|
+
protoOf(Companion_7).pa = function () {
|
|
3112
|
+
return this.u1p_1.pa();
|
|
2702
3113
|
};
|
|
2703
|
-
protoOf(
|
|
2704
|
-
return this.
|
|
3114
|
+
protoOf(Companion_7).p1l = function () {
|
|
3115
|
+
return this.u1p_1.p1l();
|
|
2705
3116
|
};
|
|
2706
|
-
protoOf(
|
|
2707
|
-
return this.
|
|
3117
|
+
protoOf(Companion_7).k1l = function (color) {
|
|
3118
|
+
return this.u1p_1.k1l(color);
|
|
2708
3119
|
};
|
|
2709
|
-
protoOf(
|
|
2710
|
-
return this.
|
|
3120
|
+
protoOf(Companion_7).r1l = function (components) {
|
|
3121
|
+
return this.u1p_1.r1l(components);
|
|
2711
3122
|
};
|
|
2712
|
-
protoOf(
|
|
2713
|
-
return this.
|
|
3123
|
+
protoOf(Companion_7).l1m = function (x, y, z, alpha) {
|
|
3124
|
+
return this.u1p_1.l1m(x, y, z, alpha);
|
|
2714
3125
|
};
|
|
2715
|
-
protoOf(
|
|
2716
|
-
return this.
|
|
3126
|
+
protoOf(Companion_7).j1p = function (x, y, z, alpha) {
|
|
3127
|
+
return this.u1p_1.j1p(x, y, z, alpha);
|
|
2717
3128
|
};
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
return
|
|
3129
|
+
protoOf(Companion_7).hashCode = function () {
|
|
3130
|
+
return hashCode(XYZColorSpaces_getInstance().i1n_1);
|
|
3131
|
+
};
|
|
3132
|
+
protoOf(Companion_7).equals = function (other) {
|
|
3133
|
+
return equals(XYZColorSpaces_getInstance().i1n_1, other);
|
|
3134
|
+
};
|
|
3135
|
+
var Companion_instance_8;
|
|
3136
|
+
function Companion_getInstance_7() {
|
|
3137
|
+
if (Companion_instance_8 == null)
|
|
3138
|
+
new Companion_7();
|
|
3139
|
+
return Companion_instance_8;
|
|
2723
3140
|
}
|
|
2724
3141
|
function adaptToM($this, space, m, mi) {
|
|
2725
|
-
if (space.
|
|
3142
|
+
if (space.p1l().equals($this.w1k_1.p1l()))
|
|
2726
3143
|
return $this;
|
|
2727
|
-
var transform = chromaticAdaptationMatrix(space, $this.w1k_1.
|
|
3144
|
+
var transform = chromaticAdaptationMatrix(space, $this.w1k_1.p1l().n1o_1, m, mi);
|
|
2728
3145
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2729
3146
|
var v0 = $this.s1k_1;
|
|
2730
3147
|
var v1 = $this.t1k_1;
|
|
@@ -2733,7 +3150,7 @@
|
|
|
2733
3150
|
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;
|
|
2734
3151
|
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;
|
|
2735
3152
|
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;
|
|
2736
|
-
return space.
|
|
3153
|
+
return space.l1m(xx, yy, zz, $this.v1k_1);
|
|
2737
3154
|
}
|
|
2738
3155
|
function toLAB$f(t) {
|
|
2739
3156
|
var tmp;
|
|
@@ -2746,7 +3163,7 @@
|
|
|
2746
3163
|
return tmp;
|
|
2747
3164
|
}
|
|
2748
3165
|
function XYZ(x, y, z, alpha, space) {
|
|
2749
|
-
|
|
3166
|
+
Companion_getInstance_7();
|
|
2750
3167
|
this.s1k_1 = x;
|
|
2751
3168
|
this.t1k_1 = y;
|
|
2752
3169
|
this.u1k_1 = z;
|
|
@@ -2759,34 +3176,62 @@
|
|
|
2759
3176
|
protoOf(XYZ).i1k = function () {
|
|
2760
3177
|
return this.w1k_1;
|
|
2761
3178
|
};
|
|
2762
|
-
protoOf(XYZ).
|
|
3179
|
+
protoOf(XYZ).k1n = function (space) {
|
|
2763
3180
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
2764
3181
|
};
|
|
2765
|
-
protoOf(XYZ).
|
|
2766
|
-
var tmp0_container = this.
|
|
3182
|
+
protoOf(XYZ).z1p = function (space) {
|
|
3183
|
+
var tmp0_container = this.k1n(XYZColorSpace_0(space.p1l()));
|
|
2767
3184
|
var x = tmp0_container.pe();
|
|
2768
3185
|
var y = tmp0_container.qe();
|
|
2769
|
-
var z = tmp0_container.
|
|
2770
|
-
var f = space.
|
|
3186
|
+
var z = tmp0_container.x1q();
|
|
3187
|
+
var f = space.y1o();
|
|
2771
3188
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2772
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
3189
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.x1p());
|
|
2773
3190
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
2774
3191
|
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;
|
|
2775
3192
|
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;
|
|
2776
3193
|
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;
|
|
2777
|
-
return space.
|
|
3194
|
+
return space.l1m(f.i1p(r), f.i1p(g), f.i1p(b), this.v1k_1);
|
|
2778
3195
|
};
|
|
2779
3196
|
protoOf(XYZ).j1k = function () {
|
|
2780
|
-
return this.
|
|
3197
|
+
return this.z1p(RGBColorSpaces_getInstance().w1m_1);
|
|
2781
3198
|
};
|
|
2782
3199
|
protoOf(XYZ).r1k = function () {
|
|
2783
|
-
var fx = toLAB$f(this.s1k_1 / this.w1k_1.
|
|
2784
|
-
var fy = toLAB$f(this.t1k_1 / this.w1k_1.
|
|
2785
|
-
var fz = toLAB$f(this.u1k_1 / this.w1k_1.
|
|
3200
|
+
var fx = toLAB$f(this.s1k_1 / this.w1k_1.p1l().n1o_1.o1p());
|
|
3201
|
+
var fy = toLAB$f(this.t1k_1 / this.w1k_1.p1l().n1o_1.n1p_1);
|
|
3202
|
+
var fz = toLAB$f(this.u1k_1 / this.w1k_1.p1l().n1o_1.p1p());
|
|
2786
3203
|
var l = 116 * fy - 16;
|
|
2787
3204
|
var a = 500 * (fx - fy);
|
|
2788
3205
|
var b = 200 * (fy - fz);
|
|
2789
|
-
return LABColorSpace_0(this.w1k_1.
|
|
3206
|
+
return LABColorSpace_0(this.w1k_1.p1l()).j1p(l, a, b, this.v1k_1);
|
|
3207
|
+
};
|
|
3208
|
+
protoOf(XYZ).e1l = function () {
|
|
3209
|
+
// Inline function 'com.github.ajalt.colormath.model.XYZ.toD65' call
|
|
3210
|
+
var tmp;
|
|
3211
|
+
if (equals(this.w1k_1, XYZColorSpaces_getInstance().i1n_1)) {
|
|
3212
|
+
var l = 0.8189330101 * this.s1k_1 + 0.3618667424 * this.t1k_1 - 0.1288597137 * this.u1k_1;
|
|
3213
|
+
var m = 0.0329845436 * this.s1k_1 + 0.9293118715 * this.t1k_1 + 0.0361456387 * this.u1k_1;
|
|
3214
|
+
var s = 0.0482003018 * this.s1k_1 + 0.2643662691 * this.t1k_1 + 0.633851707 * this.u1k_1;
|
|
3215
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3216
|
+
var ll = Math.cbrt(l);
|
|
3217
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3218
|
+
var mm = Math.cbrt(m);
|
|
3219
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3220
|
+
var ss = Math.cbrt(s);
|
|
3221
|
+
return Oklab_init_$Create$(0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, 1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, 0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.v1k_1);
|
|
3222
|
+
} else {
|
|
3223
|
+
var $this$toD65 = this.k1n(XYZColorSpaces_getInstance().i1n_1);
|
|
3224
|
+
var l_0 = 0.8189330101 * $this$toD65.s1k_1 + 0.3618667424 * $this$toD65.t1k_1 - 0.1288597137 * $this$toD65.u1k_1;
|
|
3225
|
+
var m_0 = 0.0329845436 * $this$toD65.s1k_1 + 0.9293118715 * $this$toD65.t1k_1 + 0.0361456387 * $this$toD65.u1k_1;
|
|
3226
|
+
var s_0 = 0.0482003018 * $this$toD65.s1k_1 + 0.2643662691 * $this$toD65.t1k_1 + 0.633851707 * $this$toD65.u1k_1;
|
|
3227
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3228
|
+
var ll_0 = Math.cbrt(l_0);
|
|
3229
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3230
|
+
var mm_0 = Math.cbrt(m_0);
|
|
3231
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
3232
|
+
var ss_0 = Math.cbrt(s_0);
|
|
3233
|
+
return Oklab_init_$Create$(0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, 1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, 0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.v1k_1);
|
|
3234
|
+
}
|
|
2790
3235
|
};
|
|
2791
3236
|
protoOf(XYZ).q1k = function () {
|
|
2792
3237
|
return this;
|
|
@@ -2801,7 +3246,7 @@
|
|
|
2801
3246
|
protoOf(XYZ).qe = function () {
|
|
2802
3247
|
return this.t1k_1;
|
|
2803
3248
|
};
|
|
2804
|
-
protoOf(XYZ).
|
|
3249
|
+
protoOf(XYZ).x1q = function () {
|
|
2805
3250
|
return this.u1k_1;
|
|
2806
3251
|
};
|
|
2807
3252
|
protoOf(XYZ).toString = function () {
|
|
@@ -2836,12 +3281,12 @@
|
|
|
2836
3281
|
function XYZColorSpace() {
|
|
2837
3282
|
}
|
|
2838
3283
|
function XYZColorSpace_0(whitePoint) {
|
|
2839
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
3284
|
+
return whitePoint.equals(Illuminant_getInstance().q1n_1) ? XYZColorSpaces_getInstance().i1n_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? XYZColorSpaces_getInstance().j1n_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2840
3285
|
}
|
|
2841
3286
|
function XYZColorSpaces() {
|
|
2842
3287
|
XYZColorSpaces_instance = this;
|
|
2843
|
-
this.
|
|
2844
|
-
this.
|
|
3288
|
+
this.i1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().q1n_1);
|
|
3289
|
+
this.j1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().o1n_1);
|
|
2845
3290
|
}
|
|
2846
3291
|
var XYZColorSpaces_instance;
|
|
2847
3292
|
function XYZColorSpaces_getInstance() {
|
|
@@ -2852,31 +3297,31 @@
|
|
|
2852
3297
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
2853
3298
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
2854
3299
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
2855
|
-
var dstWp = _this__u8e3s4.
|
|
2856
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
2857
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
3300
|
+
var dstWp = _this__u8e3s4.p1l().n1o_1;
|
|
3301
|
+
var src = dot_0(xyzToLms, srcWp.o1p(), srcWp.n1p_1, srcWp.p1p());
|
|
3302
|
+
var dst = dot_0(xyzToLms, dstWp.o1p(), dstWp.n1p_1, dstWp.p1p());
|
|
2858
3303
|
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);
|
|
2859
3304
|
}
|
|
2860
3305
|
function XYZColorSpaceImpl(whitePoint) {
|
|
2861
|
-
this.
|
|
2862
|
-
this.
|
|
3306
|
+
this.y1q_1 = whitePoint;
|
|
3307
|
+
this.z1q_1 = zeroOneComponentInfo('XYZ');
|
|
2863
3308
|
}
|
|
2864
|
-
protoOf(XYZColorSpaceImpl).
|
|
2865
|
-
return this.
|
|
3309
|
+
protoOf(XYZColorSpaceImpl).p1l = function () {
|
|
3310
|
+
return this.y1q_1;
|
|
2866
3311
|
};
|
|
2867
3312
|
protoOf(XYZColorSpaceImpl).pa = function () {
|
|
2868
3313
|
return 'XYZ';
|
|
2869
3314
|
};
|
|
2870
|
-
protoOf(XYZColorSpaceImpl).
|
|
2871
|
-
return this.
|
|
3315
|
+
protoOf(XYZColorSpaceImpl).q1l = function () {
|
|
3316
|
+
return this.z1q_1;
|
|
2872
3317
|
};
|
|
2873
|
-
protoOf(XYZColorSpaceImpl).
|
|
2874
|
-
return color.q1k().
|
|
3318
|
+
protoOf(XYZColorSpaceImpl).k1l = function (color) {
|
|
3319
|
+
return color.q1k().k1n(this);
|
|
2875
3320
|
};
|
|
2876
|
-
protoOf(XYZColorSpaceImpl).
|
|
3321
|
+
protoOf(XYZColorSpaceImpl).r1l = function (components) {
|
|
2877
3322
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2878
3323
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2879
|
-
var size = this.
|
|
3324
|
+
var size = this.q1l().l();
|
|
2880
3325
|
// Inline function 'kotlin.require' call
|
|
2881
3326
|
var containsLower = size - 1 | 0;
|
|
2882
3327
|
var containsArg = components.length;
|
|
@@ -2884,7 +3329,7 @@
|
|
|
2884
3329
|
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2885
3330
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2886
3331
|
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2887
|
-
throw IllegalArgumentException_init_$Create$(
|
|
3332
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2888
3333
|
}
|
|
2889
3334
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2890
3335
|
var tmp = components[0];
|
|
@@ -2899,26 +3344,25 @@
|
|
|
2899
3344
|
tmp_2 = 1.0;
|
|
2900
3345
|
}
|
|
2901
3346
|
var tmp$ret$2 = tmp_2;
|
|
2902
|
-
return this.
|
|
3347
|
+
return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2903
3348
|
};
|
|
2904
3349
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
2905
|
-
return 'XYZColorSpace(' + this.
|
|
3350
|
+
return 'XYZColorSpace(' + this.y1q_1 + ')';
|
|
2906
3351
|
};
|
|
2907
|
-
protoOf(XYZColorSpaceImpl).
|
|
3352
|
+
protoOf(XYZColorSpaceImpl).l1m = function (x, y, z, alpha) {
|
|
2908
3353
|
return new XYZ(x, y, z, alpha, this);
|
|
2909
3354
|
};
|
|
2910
3355
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
2911
|
-
return this.
|
|
3356
|
+
return this.y1q_1.hashCode();
|
|
2912
3357
|
};
|
|
2913
3358
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
return true;
|
|
3359
|
+
var tmp;
|
|
3360
|
+
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
3361
|
+
tmp = this.y1q_1.equals(other.p1l());
|
|
3362
|
+
} else {
|
|
3363
|
+
tmp = false;
|
|
3364
|
+
}
|
|
3365
|
+
return tmp;
|
|
2922
3366
|
};
|
|
2923
3367
|
function xyY_init_$Init$(x, y, Y, $this) {
|
|
2924
3368
|
Y = Y === VOID ? 1.0 : Y;
|
|
@@ -2930,26 +3374,26 @@
|
|
|
2930
3374
|
}
|
|
2931
3375
|
function xyY(x, y, Y) {
|
|
2932
3376
|
Y = Y === VOID ? 1.0 : Y;
|
|
2933
|
-
this.
|
|
2934
|
-
this.
|
|
2935
|
-
this.
|
|
3377
|
+
this.l1p_1 = x;
|
|
3378
|
+
this.m1p_1 = y;
|
|
3379
|
+
this.n1p_1 = Y;
|
|
2936
3380
|
}
|
|
2937
|
-
protoOf(xyY).
|
|
2938
|
-
return 1 - this.
|
|
3381
|
+
protoOf(xyY).w1q = function () {
|
|
3382
|
+
return 1 - this.l1p_1 - this.m1p_1;
|
|
2939
3383
|
};
|
|
2940
|
-
protoOf(xyY).
|
|
2941
|
-
return this.
|
|
3384
|
+
protoOf(xyY).o1p = function () {
|
|
3385
|
+
return this.l1p_1 * this.n1p_1 / this.m1p_1;
|
|
2942
3386
|
};
|
|
2943
|
-
protoOf(xyY).
|
|
2944
|
-
return (1 - this.
|
|
3387
|
+
protoOf(xyY).p1p = function () {
|
|
3388
|
+
return (1 - this.l1p_1 - this.m1p_1) * this.n1p_1 / this.m1p_1;
|
|
2945
3389
|
};
|
|
2946
3390
|
protoOf(xyY).toString = function () {
|
|
2947
|
-
return 'xyY(x=' + this.
|
|
3391
|
+
return 'xyY(x=' + this.l1p_1 + ', y=' + this.m1p_1 + ', Y=' + this.n1p_1 + ')';
|
|
2948
3392
|
};
|
|
2949
3393
|
protoOf(xyY).hashCode = function () {
|
|
2950
|
-
var result = getNumberHashCode(this.
|
|
2951
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2952
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3394
|
+
var result = getNumberHashCode(this.l1p_1);
|
|
3395
|
+
result = imul(result, 31) + getNumberHashCode(this.m1p_1) | 0;
|
|
3396
|
+
result = imul(result, 31) + getNumberHashCode(this.n1p_1) | 0;
|
|
2953
3397
|
return result;
|
|
2954
3398
|
};
|
|
2955
3399
|
protoOf(xyY).equals = function (other) {
|
|
@@ -2958,11 +3402,11 @@
|
|
|
2958
3402
|
if (!(other instanceof xyY))
|
|
2959
3403
|
return false;
|
|
2960
3404
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
2961
|
-
if (!equals(this.
|
|
3405
|
+
if (!equals(this.l1p_1, tmp0_other_with_cast.l1p_1))
|
|
2962
3406
|
return false;
|
|
2963
|
-
if (!equals(this.
|
|
3407
|
+
if (!equals(this.m1p_1, tmp0_other_with_cast.m1p_1))
|
|
2964
3408
|
return false;
|
|
2965
|
-
if (!equals(this.
|
|
3409
|
+
if (!equals(this.n1p_1, tmp0_other_with_cast.n1p_1))
|
|
2966
3410
|
return false;
|
|
2967
3411
|
return true;
|
|
2968
3412
|
};
|
|
@@ -2971,36 +3415,47 @@
|
|
|
2971
3415
|
protoOf(HSL).r1k = toLAB;
|
|
2972
3416
|
protoOf(HSL).x1k = toLCHab;
|
|
2973
3417
|
protoOf(HSL).d1l = toHWB;
|
|
3418
|
+
protoOf(HSL).e1l = toOklab;
|
|
3419
|
+
protoOf(HSL).f1l = toOklch;
|
|
2974
3420
|
protoOf(HWB).k1k = toHSL;
|
|
2975
3421
|
protoOf(HWB).q1k = toXYZ;
|
|
2976
3422
|
protoOf(HWB).r1k = toLAB;
|
|
2977
3423
|
protoOf(HWB).x1k = toLCHab;
|
|
3424
|
+
protoOf(HWB).e1l = toOklab;
|
|
3425
|
+
protoOf(HWB).f1l = toOklch;
|
|
2978
3426
|
protoOf(LAB).k1k = toHSL;
|
|
2979
3427
|
protoOf(LAB).d1l = toHWB;
|
|
2980
|
-
protoOf(
|
|
3428
|
+
protoOf(LAB).e1l = toOklab;
|
|
3429
|
+
protoOf(LAB).f1l = toOklch;
|
|
3430
|
+
protoOf(LABColorSpaceImpl).j1p = invoke;
|
|
2981
3431
|
protoOf(LCHab).k1k = toHSL;
|
|
2982
3432
|
protoOf(LCHab).d1l = toHWB;
|
|
2983
|
-
protoOf(
|
|
3433
|
+
protoOf(LCHab).e1l = toOklab;
|
|
3434
|
+
protoOf(LCHab).f1l = toOklch;
|
|
3435
|
+
protoOf(Oklab).k1k = toHSL;
|
|
3436
|
+
protoOf(Oklab).r1k = toLAB;
|
|
3437
|
+
protoOf(Oklab).x1k = toLCHab;
|
|
3438
|
+
protoOf(Oklab).d1l = toHWB;
|
|
3439
|
+
protoOf(Oklch).k1k = toHSL;
|
|
3440
|
+
protoOf(Oklch).r1k = toLAB;
|
|
3441
|
+
protoOf(Oklch).x1k = toLCHab;
|
|
3442
|
+
protoOf(Oklch).d1l = toHWB;
|
|
3443
|
+
protoOf(Companion_6).o1o = from255$default;
|
|
2984
3444
|
protoOf(RGB).r1k = toLAB;
|
|
2985
3445
|
protoOf(RGB).x1k = toLCHab;
|
|
2986
|
-
protoOf(
|
|
2987
|
-
protoOf(SRGB).
|
|
2988
|
-
protoOf(
|
|
2989
|
-
protoOf(
|
|
2990
|
-
protoOf(
|
|
2991
|
-
protoOf(
|
|
2992
|
-
protoOf(
|
|
2993
|
-
protoOf(BT2020Space).y1n = from255$default;
|
|
2994
|
-
protoOf(RGBColorSpaceImpl).a1p = invoke_0;
|
|
2995
|
-
protoOf(RGBColorSpaceImpl).c1m = invoke_1;
|
|
2996
|
-
protoOf(RGBColorSpaceImpl).z1n = from255;
|
|
2997
|
-
protoOf(RGBColorSpaceImpl).y1n = from255$default;
|
|
2998
|
-
protoOf(Companion_5).b1p = invoke$default;
|
|
3446
|
+
protoOf(RGB).f1l = toOklch;
|
|
3447
|
+
protoOf(SRGB).o1o = from255$default;
|
|
3448
|
+
protoOf(RGBColorSpaceImpl).j1p = invoke_0;
|
|
3449
|
+
protoOf(RGBColorSpaceImpl).k1m = invoke_1;
|
|
3450
|
+
protoOf(RGBColorSpaceImpl).p1o = from255;
|
|
3451
|
+
protoOf(RGBColorSpaceImpl).o1o = from255$default;
|
|
3452
|
+
protoOf(Companion_7).k1p = invoke$default;
|
|
2999
3453
|
protoOf(XYZ).k1k = toHSL;
|
|
3000
3454
|
protoOf(XYZ).x1k = toLCHab;
|
|
3001
3455
|
protoOf(XYZ).d1l = toHWB;
|
|
3002
|
-
protoOf(
|
|
3003
|
-
protoOf(XYZColorSpaceImpl).
|
|
3456
|
+
protoOf(XYZ).f1l = toOklch;
|
|
3457
|
+
protoOf(XYZColorSpaceImpl).j1p = invoke_2;
|
|
3458
|
+
protoOf(XYZColorSpaceImpl).k1p = invoke$default;
|
|
3004
3459
|
//endregion
|
|
3005
3460
|
//region block: init
|
|
3006
3461
|
Companion_instance_0 = new Companion();
|
|
@@ -3017,7 +3472,7 @@
|
|
|
3017
3472
|
_.$_$.a = formatCssString;
|
|
3018
3473
|
_.$_$.b = parse;
|
|
3019
3474
|
_.$_$.c = RenderCondition_ALWAYS_getInstance;
|
|
3020
|
-
_.$_$.d =
|
|
3475
|
+
_.$_$.d = Companion_getInstance_6;
|
|
3021
3476
|
_.$_$.e = Companion_instance_0;
|
|
3022
3477
|
//endregion
|
|
3023
3478
|
return _;
|