@cruglobal/godtools-shared 1.2.0-PR799-SNAPSHOT.1777 → 1.2.0-PR799-SNAPSHOT.1778
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 +10 -10
- package/antlr-kotlin-antlr-kotlin-runtime.js +3156 -3156
- package/colormath-root-colormath.js +709 -1926
- package/colormath-root-colormath.js.map +1 -1
- package/fluid-locale.js +159 -159
- package/kotlin-js.js +39 -39
- package/kotlin-kotlin-stdlib.js +1948 -2077
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-common.js +3 -3
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +408 -408
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +2881 -2888
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-state.js +233 -233
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts +1 -2
- package/kotlinx-atomicfu.js +24 -24
- package/kotlinx-coroutines-core.js +2839 -2839
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,164 +14,108 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var toString = kotlin_kotlin.$_$.z6;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.t6;
|
|
18
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.h6;
|
|
19
|
+
var toString = kotlin_kotlin.$_$.w6;
|
|
21
20
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
22
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
23
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
24
|
-
var
|
|
21
|
+
var Unit_instance = kotlin_kotlin.$_$.k2;
|
|
22
|
+
var initMetadataForClass = kotlin_kotlin.$_$.e6;
|
|
23
|
+
var Enum = kotlin_kotlin.$_$.t8;
|
|
25
24
|
var VOID = kotlin_kotlin.$_$.d;
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var createFailure = kotlin_kotlin.$_$.u9;
|
|
29
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.b2;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.n9;
|
|
31
|
-
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.a2;
|
|
32
|
-
var startsWith = kotlin_kotlin.$_$.k8;
|
|
33
|
-
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
34
|
-
var initMetadataForObject = kotlin_kotlin.$_$.m6;
|
|
35
|
-
var endsWith = kotlin_kotlin.$_$.w7;
|
|
36
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.c3;
|
|
37
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
38
|
-
var checkIndexOverflow = kotlin_kotlin.$_$.b3;
|
|
39
|
-
var get_lastIndex = kotlin_kotlin.$_$.c4;
|
|
40
|
-
var dropLast = kotlin_kotlin.$_$.v7;
|
|
41
|
-
var toDouble = kotlin_kotlin.$_$.q8;
|
|
42
|
-
var charSequenceLength = kotlin_kotlin.$_$.x5;
|
|
43
|
-
var coerceIn = kotlin_kotlin.$_$.g7;
|
|
44
|
-
var Enum = kotlin_kotlin.$_$.d9;
|
|
45
|
-
var equals = kotlin_kotlin.$_$.a6;
|
|
25
|
+
var emptyMap = kotlin_kotlin.$_$.m3;
|
|
26
|
+
var equals = kotlin_kotlin.$_$.x5;
|
|
46
27
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
47
|
-
var
|
|
48
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
28
|
+
var dropLast = kotlin_kotlin.$_$.k3;
|
|
29
|
+
var joinTo = kotlin_kotlin.$_$.z3;
|
|
30
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
31
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.d2;
|
|
32
|
+
var numberToInt = kotlin_kotlin.$_$.r6;
|
|
33
|
+
var roundToInt = kotlin_kotlin.$_$.x6;
|
|
52
34
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
|
|
53
|
-
var padStart = kotlin_kotlin.$_$.
|
|
54
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
55
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
56
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
57
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
58
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
59
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
60
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
61
|
-
var
|
|
62
|
-
var
|
|
35
|
+
var padStart = kotlin_kotlin.$_$.y7;
|
|
36
|
+
var charArrayOf = kotlin_kotlin.$_$.s5;
|
|
37
|
+
var trimEnd = kotlin_kotlin.$_$.o8;
|
|
38
|
+
var isNaN_0 = kotlin_kotlin.$_$.m9;
|
|
39
|
+
var joinTo_0 = kotlin_kotlin.$_$.y3;
|
|
40
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.o9;
|
|
41
|
+
var numberToDouble = kotlin_kotlin.$_$.q6;
|
|
42
|
+
var getStringHashCode = kotlin_kotlin.$_$.c6;
|
|
43
|
+
var THROW_CCE = kotlin_kotlin.$_$.d9;
|
|
44
|
+
var initMetadataForObject = kotlin_kotlin.$_$.j6;
|
|
45
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
46
|
+
var charSequenceLength = kotlin_kotlin.$_$.u5;
|
|
47
|
+
var charSequenceGet = kotlin_kotlin.$_$.t5;
|
|
63
48
|
var toString_0 = kotlin_kotlin.$_$.x1;
|
|
64
49
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
65
|
-
var listOf = kotlin_kotlin.$_$.
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var uintToDouble = kotlin_kotlin.$_$.fa;
|
|
86
|
-
var toByte = kotlin_kotlin.$_$.x6;
|
|
87
|
-
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.c2;
|
|
88
|
-
var UInt = kotlin_kotlin.$_$.q9;
|
|
89
|
-
var UInt__hashCode_impl_z2mhuw = kotlin_kotlin.$_$.h2;
|
|
50
|
+
var listOf = kotlin_kotlin.$_$.e4;
|
|
51
|
+
var withSign = kotlin_kotlin.$_$.y6;
|
|
52
|
+
var trimMargin = kotlin_kotlin.$_$.p8;
|
|
53
|
+
var hashCode = kotlin_kotlin.$_$.d6;
|
|
54
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.f6;
|
|
55
|
+
var coerceAtLeast = kotlin_kotlin.$_$.z6;
|
|
56
|
+
var getNumberHashCode = kotlin_kotlin.$_$.a6;
|
|
57
|
+
var isInterface = kotlin_kotlin.$_$.m6;
|
|
58
|
+
var contentEquals = kotlin_kotlin.$_$.e3;
|
|
59
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.b7;
|
|
60
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.e2;
|
|
61
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.f2;
|
|
62
|
+
var coerceIn = kotlin_kotlin.$_$.d7;
|
|
63
|
+
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.c2;
|
|
64
|
+
var uintToDouble = kotlin_kotlin.$_$.v9;
|
|
65
|
+
var toByte = kotlin_kotlin.$_$.u6;
|
|
66
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.b2;
|
|
67
|
+
var UInt = kotlin_kotlin.$_$.g9;
|
|
68
|
+
var UInt__hashCode_impl_z2mhuw = kotlin_kotlin.$_$.g2;
|
|
69
|
+
var objectCreate = kotlin_kotlin.$_$.s6;
|
|
90
70
|
//endregion
|
|
91
71
|
//region block: pre-declaration
|
|
92
|
-
initMetadataForCompanion(Companion);
|
|
93
72
|
function toHSL() {
|
|
94
|
-
return this.
|
|
73
|
+
return this.u1m().v1m();
|
|
95
74
|
}
|
|
96
75
|
function toXYZ() {
|
|
97
|
-
return this.
|
|
76
|
+
return this.u1m().b1n();
|
|
98
77
|
}
|
|
99
78
|
function toLAB() {
|
|
100
|
-
return this.
|
|
79
|
+
return this.b1n().c1n();
|
|
101
80
|
}
|
|
102
81
|
function toLCHab() {
|
|
103
|
-
return this.
|
|
104
|
-
}
|
|
105
|
-
function toHWB() {
|
|
106
|
-
return this.f1n().z1n();
|
|
107
|
-
}
|
|
108
|
-
function toOklab() {
|
|
109
|
-
return this.m1n().a1o();
|
|
110
|
-
}
|
|
111
|
-
function toOklch() {
|
|
112
|
-
return this.a1o().b1o();
|
|
82
|
+
return this.c1n().i1n();
|
|
113
83
|
}
|
|
114
84
|
initMetadataForInterface(Color, 'Color');
|
|
115
85
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
116
86
|
initMetadataForInterface(WhitePointColorSpace, 'WhitePointColorSpace');
|
|
117
|
-
initMetadataForObject(PATTERNS, 'PATTERNS');
|
|
118
87
|
initMetadataForClass(RenderCondition, 'RenderCondition', VOID, Enum);
|
|
119
88
|
initMetadataForClass(AngleUnit, 'AngleUnit', VOID, Enum);
|
|
120
89
|
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
121
90
|
initMetadataForObject(Illuminant, 'Illuminant');
|
|
122
|
-
initMetadataForObject(CssColors, 'CssColors');
|
|
123
91
|
initMetadataForClass(Matrix, 'Matrix');
|
|
124
|
-
initMetadataForCompanion(
|
|
92
|
+
initMetadataForCompanion(Companion);
|
|
125
93
|
initMetadataForClass(HSL, 'HSL', VOID, VOID, [Color]);
|
|
126
|
-
initMetadataForCompanion(Companion_1);
|
|
127
94
|
initMetadataForClass(HWB, 'HWB', VOID, VOID, [Color]);
|
|
128
95
|
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
129
96
|
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
130
97
|
function invoke(l, a, b, alpha) {
|
|
131
|
-
return this.
|
|
98
|
+
return this.s1p(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
132
99
|
}
|
|
133
100
|
initMetadataForInterface(LABColorSpace, 'LABColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
134
|
-
initMetadataForCompanion(
|
|
101
|
+
initMetadataForCompanion(Companion_0, VOID, [LABColorSpace]);
|
|
135
102
|
initMetadataForClass(LAB, 'LAB', VOID, VOID, [Color]);
|
|
136
103
|
initMetadataForObject(LABColorSpaces, 'LABColorSpaces');
|
|
137
104
|
initMetadataForClass(LABColorSpaceImpl, 'LABColorSpaceImpl', VOID, VOID, [LABColorSpace]);
|
|
138
105
|
initMetadataForInterface(LCHabColorSpace, 'LCHabColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
139
|
-
initMetadataForCompanion(
|
|
106
|
+
initMetadataForCompanion(Companion_1, VOID, [LCHabColorSpace]);
|
|
140
107
|
initMetadataForClass(LCHab, 'LCHab', VOID, VOID, [Color]);
|
|
141
108
|
initMetadataForObject(LCHabColorSpaces, 'LCHabColorSpaces');
|
|
142
109
|
initMetadataForClass(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', VOID, VOID, [LCHabColorSpace]);
|
|
143
|
-
initMetadataForCompanion(Companion_4);
|
|
144
110
|
initMetadataForClass(Oklab, 'Oklab', VOID, VOID, [Color]);
|
|
145
|
-
initMetadataForCompanion(Companion_5);
|
|
146
111
|
initMetadataForClass(Oklch, 'Oklch', VOID, VOID, [Color]);
|
|
147
112
|
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
148
113
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
149
114
|
function invoke_0(r, g, b, alpha) {
|
|
150
|
-
return this.
|
|
151
|
-
}
|
|
152
|
-
function from255(r, g, b, alpha) {
|
|
153
|
-
return this.h1p(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
154
|
-
}
|
|
155
|
-
function from255$default(r, g, b, alpha, $super) {
|
|
156
|
-
alpha = alpha === VOID ? 255 : alpha;
|
|
157
|
-
return $super === VOID ? this.l1r(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
158
|
-
}
|
|
159
|
-
function invoke_1(hex) {
|
|
160
|
-
var tmp = parseHex(validateHex(hex), 0);
|
|
161
|
-
var tmp_0 = parseHex(hex, 1);
|
|
162
|
-
var tmp_1 = parseHex(hex, 2);
|
|
163
|
-
var tmp_2;
|
|
164
|
-
// Inline function 'kotlin.let' call
|
|
165
|
-
var it = get_hexLength(hex);
|
|
166
|
-
if (it === 4 || it === 8) {
|
|
167
|
-
tmp_2 = parseHex(hex, 3);
|
|
168
|
-
} else {
|
|
169
|
-
tmp_2 = 255;
|
|
170
|
-
}
|
|
171
|
-
return this.l1r(tmp, tmp_0, tmp_1, tmp_2);
|
|
115
|
+
return this.s1p(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
172
116
|
}
|
|
173
117
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
174
|
-
initMetadataForCompanion(
|
|
118
|
+
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
175
119
|
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
176
120
|
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
177
121
|
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
@@ -182,481 +126,40 @@
|
|
|
182
126
|
initMetadataForObject(BT2020TransferFunctions, 'BT2020TransferFunctions');
|
|
183
127
|
initMetadataForObject(BT709TransferFunctions, 'BT709TransferFunctions');
|
|
184
128
|
initMetadataForObject(ROMMTransferFunctions, 'ROMMTransferFunctions');
|
|
185
|
-
initMetadataForCompanion(
|
|
129
|
+
initMetadataForCompanion(Companion_3);
|
|
186
130
|
initMetadataForClass(RGBInt, 'RGBInt', VOID, VOID, [Color]);
|
|
187
|
-
function
|
|
188
|
-
return this.
|
|
131
|
+
function invoke_1(x, y, z, alpha) {
|
|
132
|
+
return this.s1p(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
189
133
|
}
|
|
190
134
|
function invoke$default(x, y, z, alpha, $super) {
|
|
191
135
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
192
|
-
return $super === VOID ? this.
|
|
136
|
+
return $super === VOID ? this.n1q(x, y, z, alpha) : invoke_1(x, y, z, alpha);
|
|
193
137
|
}
|
|
194
138
|
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
195
|
-
initMetadataForCompanion(
|
|
139
|
+
initMetadataForCompanion(Companion_4, VOID, [XYZColorSpace]);
|
|
196
140
|
initMetadataForClass(XYZ, 'XYZ', VOID, VOID, [Color]);
|
|
197
141
|
initMetadataForObject(XYZColorSpaces, 'XYZColorSpaces');
|
|
198
142
|
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl', VOID, VOID, [XYZColorSpace]);
|
|
199
143
|
initMetadataForClass(xyY, 'xyY');
|
|
200
144
|
//endregion
|
|
201
|
-
function Companion() {
|
|
202
|
-
}
|
|
203
|
-
var Companion_instance_0;
|
|
204
|
-
function Companion_getInstance() {
|
|
205
|
-
return Companion_instance_0;
|
|
206
|
-
}
|
|
207
145
|
function Color() {
|
|
208
146
|
}
|
|
209
147
|
function convertTo(_this__u8e3s4, space) {
|
|
210
|
-
return space.
|
|
148
|
+
return space.o1n(_this__u8e3s4);
|
|
211
149
|
}
|
|
212
150
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
213
|
-
this.
|
|
214
|
-
this.
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
151
|
+
this.p1n_1 = name;
|
|
152
|
+
this.q1n_1 = isPolar;
|
|
153
|
+
this.r1n_1 = min;
|
|
154
|
+
this.s1n_1 = max;
|
|
217
155
|
// Inline function 'kotlin.require' call
|
|
218
|
-
if (!(this.
|
|
156
|
+
if (!(this.r1n_1 <= this.s1n_1)) {
|
|
219
157
|
var message = 'min must be less than or equal to max';
|
|
220
158
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
221
159
|
}
|
|
222
160
|
}
|
|
223
161
|
function WhitePointColorSpace() {
|
|
224
162
|
}
|
|
225
|
-
function parse(_this__u8e3s4, color, customColorSpaces) {
|
|
226
|
-
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
227
|
-
var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color, customColorSpaces);
|
|
228
|
-
var tmp;
|
|
229
|
-
if (tmp0_elvis_lhs == null) {
|
|
230
|
-
throw IllegalArgumentException_init_$Create$('Invalid color: ' + color);
|
|
231
|
-
} else {
|
|
232
|
-
tmp = tmp0_elvis_lhs;
|
|
233
|
-
}
|
|
234
|
-
return tmp;
|
|
235
|
-
}
|
|
236
|
-
function parseOrNull(_this__u8e3s4, color_0, customColorSpaces) {
|
|
237
|
-
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
238
|
-
var keywordColor = CssColors_getInstance().o1o_1.f2(color_0);
|
|
239
|
-
var tmp;
|
|
240
|
-
if (!(keywordColor == null)) {
|
|
241
|
-
tmp = keywordColor;
|
|
242
|
-
} else if (startsWith(color_0, '#')) {
|
|
243
|
-
// Inline function 'kotlin.runCatching' call
|
|
244
|
-
var tmp_0;
|
|
245
|
-
try {
|
|
246
|
-
// Inline function 'kotlin.Companion.success' call
|
|
247
|
-
var value = Companion_getInstance_6().g1p(color_0);
|
|
248
|
-
tmp_0 = _Result___init__impl__xyqfz8(value);
|
|
249
|
-
} catch ($p) {
|
|
250
|
-
var tmp_1;
|
|
251
|
-
if ($p instanceof Error) {
|
|
252
|
-
var e = $p;
|
|
253
|
-
// Inline function 'kotlin.Companion.failure' call
|
|
254
|
-
tmp_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
255
|
-
} else {
|
|
256
|
-
throw $p;
|
|
257
|
-
}
|
|
258
|
-
tmp_0 = tmp_1;
|
|
259
|
-
}
|
|
260
|
-
// Inline function 'kotlin.Result.getOrNull' call
|
|
261
|
-
var this_0 = tmp_0;
|
|
262
|
-
var tmp_2;
|
|
263
|
-
if (_Result___get_isFailure__impl__jpiriv(this_0)) {
|
|
264
|
-
tmp_2 = null;
|
|
265
|
-
} else {
|
|
266
|
-
var tmp_3 = _Result___get_value__impl__bjfvqg(this_0);
|
|
267
|
-
tmp_2 = (tmp_3 == null ? true : !(tmp_3 == null)) ? tmp_3 : THROW_CCE();
|
|
268
|
-
}
|
|
269
|
-
tmp = tmp_2;
|
|
270
|
-
} else {
|
|
271
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().v1o_1.fc(color_0);
|
|
272
|
-
var tmp_4;
|
|
273
|
-
if (tmp0_safe_receiver == null) {
|
|
274
|
-
tmp_4 = null;
|
|
275
|
-
} else {
|
|
276
|
-
// Inline function 'kotlin.let' call
|
|
277
|
-
tmp_4 = rgb(tmp0_safe_receiver);
|
|
278
|
-
}
|
|
279
|
-
var tmp1_elvis_lhs = tmp_4;
|
|
280
|
-
var tmp_5;
|
|
281
|
-
if (tmp1_elvis_lhs == null) {
|
|
282
|
-
var tmp2_safe_receiver = PATTERNS_getInstance().w1o_1.fc(color_0);
|
|
283
|
-
var tmp_6;
|
|
284
|
-
if (tmp2_safe_receiver == null) {
|
|
285
|
-
tmp_6 = null;
|
|
286
|
-
} else {
|
|
287
|
-
// Inline function 'kotlin.let' call
|
|
288
|
-
tmp_6 = rgb(tmp2_safe_receiver);
|
|
289
|
-
}
|
|
290
|
-
tmp_5 = tmp_6;
|
|
291
|
-
} else {
|
|
292
|
-
tmp_5 = tmp1_elvis_lhs;
|
|
293
|
-
}
|
|
294
|
-
var tmp3_elvis_lhs = tmp_5;
|
|
295
|
-
var tmp_7;
|
|
296
|
-
if (tmp3_elvis_lhs == null) {
|
|
297
|
-
var tmp4_safe_receiver = PATTERNS_getInstance().x1o_1.fc(color_0);
|
|
298
|
-
var tmp_8;
|
|
299
|
-
if (tmp4_safe_receiver == null) {
|
|
300
|
-
tmp_8 = null;
|
|
301
|
-
} else {
|
|
302
|
-
// Inline function 'kotlin.let' call
|
|
303
|
-
tmp_8 = hsl(tmp4_safe_receiver);
|
|
304
|
-
}
|
|
305
|
-
tmp_7 = tmp_8;
|
|
306
|
-
} else {
|
|
307
|
-
tmp_7 = tmp3_elvis_lhs;
|
|
308
|
-
}
|
|
309
|
-
var tmp5_elvis_lhs = tmp_7;
|
|
310
|
-
var tmp_9;
|
|
311
|
-
if (tmp5_elvis_lhs == null) {
|
|
312
|
-
var tmp6_safe_receiver = PATTERNS_getInstance().y1o_1.fc(color_0);
|
|
313
|
-
var tmp_10;
|
|
314
|
-
if (tmp6_safe_receiver == null) {
|
|
315
|
-
tmp_10 = null;
|
|
316
|
-
} else {
|
|
317
|
-
// Inline function 'kotlin.let' call
|
|
318
|
-
tmp_10 = hsl(tmp6_safe_receiver);
|
|
319
|
-
}
|
|
320
|
-
tmp_9 = tmp_10;
|
|
321
|
-
} else {
|
|
322
|
-
tmp_9 = tmp5_elvis_lhs;
|
|
323
|
-
}
|
|
324
|
-
var tmp7_elvis_lhs = tmp_9;
|
|
325
|
-
var tmp_11;
|
|
326
|
-
if (tmp7_elvis_lhs == null) {
|
|
327
|
-
var tmp8_safe_receiver = PATTERNS_getInstance().z1o_1.fc(color_0);
|
|
328
|
-
var tmp_12;
|
|
329
|
-
if (tmp8_safe_receiver == null) {
|
|
330
|
-
tmp_12 = null;
|
|
331
|
-
} else {
|
|
332
|
-
// Inline function 'kotlin.let' call
|
|
333
|
-
tmp_12 = lab(tmp8_safe_receiver);
|
|
334
|
-
}
|
|
335
|
-
tmp_11 = tmp_12;
|
|
336
|
-
} else {
|
|
337
|
-
tmp_11 = tmp7_elvis_lhs;
|
|
338
|
-
}
|
|
339
|
-
var tmp9_elvis_lhs = tmp_11;
|
|
340
|
-
var tmp_13;
|
|
341
|
-
if (tmp9_elvis_lhs == null) {
|
|
342
|
-
var tmp10_safe_receiver = PATTERNS_getInstance().a1p_1.fc(color_0);
|
|
343
|
-
var tmp_14;
|
|
344
|
-
if (tmp10_safe_receiver == null) {
|
|
345
|
-
tmp_14 = null;
|
|
346
|
-
} else {
|
|
347
|
-
// Inline function 'kotlin.let' call
|
|
348
|
-
tmp_14 = lch(tmp10_safe_receiver);
|
|
349
|
-
}
|
|
350
|
-
tmp_13 = tmp_14;
|
|
351
|
-
} else {
|
|
352
|
-
tmp_13 = tmp9_elvis_lhs;
|
|
353
|
-
}
|
|
354
|
-
var tmp11_elvis_lhs = tmp_13;
|
|
355
|
-
var tmp_15;
|
|
356
|
-
if (tmp11_elvis_lhs == null) {
|
|
357
|
-
var tmp12_safe_receiver = PATTERNS_getInstance().b1p_1.fc(color_0);
|
|
358
|
-
var tmp_16;
|
|
359
|
-
if (tmp12_safe_receiver == null) {
|
|
360
|
-
tmp_16 = null;
|
|
361
|
-
} else {
|
|
362
|
-
// Inline function 'kotlin.let' call
|
|
363
|
-
tmp_16 = hwb(tmp12_safe_receiver);
|
|
364
|
-
}
|
|
365
|
-
tmp_15 = tmp_16;
|
|
366
|
-
} else {
|
|
367
|
-
tmp_15 = tmp11_elvis_lhs;
|
|
368
|
-
}
|
|
369
|
-
var tmp13_elvis_lhs = tmp_15;
|
|
370
|
-
var tmp_17;
|
|
371
|
-
if (tmp13_elvis_lhs == null) {
|
|
372
|
-
var tmp14_safe_receiver = PATTERNS_getInstance().c1p_1.fc(color_0);
|
|
373
|
-
var tmp_18;
|
|
374
|
-
if (tmp14_safe_receiver == null) {
|
|
375
|
-
tmp_18 = null;
|
|
376
|
-
} else {
|
|
377
|
-
// Inline function 'kotlin.let' call
|
|
378
|
-
tmp_18 = oklab(tmp14_safe_receiver);
|
|
379
|
-
}
|
|
380
|
-
tmp_17 = tmp_18;
|
|
381
|
-
} else {
|
|
382
|
-
tmp_17 = tmp13_elvis_lhs;
|
|
383
|
-
}
|
|
384
|
-
var tmp15_elvis_lhs = tmp_17;
|
|
385
|
-
var tmp_19;
|
|
386
|
-
if (tmp15_elvis_lhs == null) {
|
|
387
|
-
var tmp16_safe_receiver = PATTERNS_getInstance().d1p_1.fc(color_0);
|
|
388
|
-
var tmp_20;
|
|
389
|
-
if (tmp16_safe_receiver == null) {
|
|
390
|
-
tmp_20 = null;
|
|
391
|
-
} else {
|
|
392
|
-
// Inline function 'kotlin.let' call
|
|
393
|
-
tmp_20 = oklch(tmp16_safe_receiver);
|
|
394
|
-
}
|
|
395
|
-
tmp_19 = tmp_20;
|
|
396
|
-
} else {
|
|
397
|
-
tmp_19 = tmp15_elvis_lhs;
|
|
398
|
-
}
|
|
399
|
-
var tmp17_elvis_lhs = tmp_19;
|
|
400
|
-
var tmp_21;
|
|
401
|
-
if (tmp17_elvis_lhs == null) {
|
|
402
|
-
var tmp18_safe_receiver = PATTERNS_getInstance().e1p_1.fc(color_0);
|
|
403
|
-
var tmp_22;
|
|
404
|
-
if (tmp18_safe_receiver == null) {
|
|
405
|
-
tmp_22 = null;
|
|
406
|
-
} else {
|
|
407
|
-
// Inline function 'kotlin.let' call
|
|
408
|
-
tmp_22 = color(tmp18_safe_receiver, customColorSpaces);
|
|
409
|
-
}
|
|
410
|
-
tmp_21 = tmp_22;
|
|
411
|
-
} else {
|
|
412
|
-
tmp_21 = tmp17_elvis_lhs;
|
|
413
|
-
}
|
|
414
|
-
tmp = tmp_21;
|
|
415
|
-
}
|
|
416
|
-
return tmp;
|
|
417
|
-
}
|
|
418
|
-
function PATTERNS() {
|
|
419
|
-
PATTERNS_instance = this;
|
|
420
|
-
this.p1o_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
421
|
-
this.q1o_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)';
|
|
422
|
-
this.r1o_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
423
|
-
this.s1o_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
424
|
-
this.t1o_1 = '\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
425
|
-
this.u1o_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)';
|
|
426
|
-
this.v1o_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*\\)');
|
|
427
|
-
this.w1o_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*\\)');
|
|
428
|
-
this.x1o_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*\\)');
|
|
429
|
-
this.y1o_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*\\)');
|
|
430
|
-
this.z1o_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*\\)');
|
|
431
|
-
this.a1p_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*\\)');
|
|
432
|
-
this.b1p_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*\\)');
|
|
433
|
-
this.c1p_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*\\)');
|
|
434
|
-
this.d1p_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*\\)');
|
|
435
|
-
this.e1p_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*\\)');
|
|
436
|
-
}
|
|
437
|
-
var PATTERNS_instance;
|
|
438
|
-
function PATTERNS_getInstance() {
|
|
439
|
-
if (PATTERNS_instance == null)
|
|
440
|
-
new PATTERNS();
|
|
441
|
-
return PATTERNS_instance;
|
|
442
|
-
}
|
|
443
|
-
function rgb(match) {
|
|
444
|
-
var r = percentOrNumber(match.bd().o(1), Companion_getInstance_6().m1o().o(0).k1o_1);
|
|
445
|
-
var g = percentOrNumber(match.bd().o(2), Companion_getInstance_6().m1o().o(1).k1o_1);
|
|
446
|
-
var b = percentOrNumber(match.bd().o(3), Companion_getInstance_6().m1o().o(2).k1o_1);
|
|
447
|
-
var a = alpha(match.bd().o(4));
|
|
448
|
-
var tmp;
|
|
449
|
-
if (endsWith(match.bd().o(1), '%')) {
|
|
450
|
-
tmp = Companion_getInstance_6().h1p(r, g, b, a);
|
|
451
|
-
} else {
|
|
452
|
-
tmp = Companion_getInstance_6().h1p(r / 255.0, g / 255.0, b / 255.0, a);
|
|
453
|
-
}
|
|
454
|
-
return tmp;
|
|
455
|
-
}
|
|
456
|
-
function hsl(match) {
|
|
457
|
-
var h = hue(match.bd().o(1));
|
|
458
|
-
var s = percentOrNumber(match.bd().o(2), Companion_getInstance_0().i1p_1.o(1).k1o_1);
|
|
459
|
-
var l = percentOrNumber(match.bd().o(3), Companion_getInstance_0().i1p_1.o(2).k1o_1);
|
|
460
|
-
var a = alpha(match.bd().o(4));
|
|
461
|
-
return new HSL(h, s, l, a);
|
|
462
|
-
}
|
|
463
|
-
function lab(match) {
|
|
464
|
-
var l = percentOrNumber(match.bd().o(1), Companion_getInstance_2().m1o().o(0).k1o_1);
|
|
465
|
-
var a = percentOrNumber(match.bd().o(2), Companion_getInstance_2().m1o().o(1).k1o_1);
|
|
466
|
-
var b = percentOrNumber(match.bd().o(3), Companion_getInstance_2().m1o().o(2).k1o_1);
|
|
467
|
-
var alpha_0 = alpha(match.bd().o(4));
|
|
468
|
-
return LABColorSpaces_getInstance().l1p_1.h1p(l, a, b, alpha_0);
|
|
469
|
-
}
|
|
470
|
-
function lch(match) {
|
|
471
|
-
var l = percentOrNumber(match.bd().o(1), Companion_getInstance_3().m1o().o(0).k1o_1);
|
|
472
|
-
var c = percentOrNumber(match.bd().o(2), Companion_getInstance_3().m1o().o(1).k1o_1);
|
|
473
|
-
var h = hue(match.bd().o(3));
|
|
474
|
-
var a = alpha(match.bd().o(4));
|
|
475
|
-
return LCHabColorSpaces_getInstance().o1p_1.h1p(l, c, h, a);
|
|
476
|
-
}
|
|
477
|
-
function hwb(match) {
|
|
478
|
-
var h = hue(match.bd().o(1));
|
|
479
|
-
var w = percentOrNumber(match.bd().o(2), Companion_getInstance_1().p1p_1.o(1).k1o_1);
|
|
480
|
-
var b = percentOrNumber(match.bd().o(3), Companion_getInstance_1().p1p_1.o(2).k1o_1);
|
|
481
|
-
var a = alpha(match.bd().o(4));
|
|
482
|
-
return new HWB(h, w, b, a);
|
|
483
|
-
}
|
|
484
|
-
function oklab(match) {
|
|
485
|
-
var l = percentOrNumber(match.bd().o(1), Companion_getInstance_4().q1p_1.o(0).k1o_1);
|
|
486
|
-
var a = percentOrNumber(match.bd().o(2), Companion_getInstance_4().q1p_1.o(1).k1o_1);
|
|
487
|
-
var b = percentOrNumber(match.bd().o(3), Companion_getInstance_4().q1p_1.o(2).k1o_1);
|
|
488
|
-
var alpha_0 = alpha(match.bd().o(4));
|
|
489
|
-
return new Oklab(l, a, b, alpha_0);
|
|
490
|
-
}
|
|
491
|
-
function oklch(match) {
|
|
492
|
-
var l = percentOrNumber(match.bd().o(1), Companion_getInstance_5().r1p_1.o(0).k1o_1);
|
|
493
|
-
var c = percentOrNumber(match.bd().o(2), Companion_getInstance_5().r1p_1.o(1).k1o_1);
|
|
494
|
-
var h = hue(match.bd().o(3));
|
|
495
|
-
var a = alpha(match.bd().o(4));
|
|
496
|
-
return new Oklch(l, c, h, a);
|
|
497
|
-
}
|
|
498
|
-
function color(match, customColorSpaces) {
|
|
499
|
-
var name = match.bd().o(1);
|
|
500
|
-
var tmp;
|
|
501
|
-
switch (name) {
|
|
502
|
-
case 'srgb':
|
|
503
|
-
tmp = SRGB_getInstance();
|
|
504
|
-
break;
|
|
505
|
-
case 'srgb-linear':
|
|
506
|
-
tmp = RGBColorSpaces_getInstance().t1p_1;
|
|
507
|
-
break;
|
|
508
|
-
case 'display-p3':
|
|
509
|
-
tmp = RGBColorSpaces_getInstance().c1q_1;
|
|
510
|
-
break;
|
|
511
|
-
case 'a98-rgb':
|
|
512
|
-
tmp = RGBColorSpaces_getInstance().y1p_1;
|
|
513
|
-
break;
|
|
514
|
-
case 'prophoto-rgb':
|
|
515
|
-
tmp = RGBColorSpaces_getInstance().d1q_1;
|
|
516
|
-
break;
|
|
517
|
-
case 'rec2020':
|
|
518
|
-
tmp = RGBColorSpaces_getInstance().z1p_1;
|
|
519
|
-
break;
|
|
520
|
-
case 'xyz':
|
|
521
|
-
case 'xyz-d50':
|
|
522
|
-
tmp = XYZColorSpaces_getInstance().f1q_1;
|
|
523
|
-
break;
|
|
524
|
-
case 'xyz-d65':
|
|
525
|
-
tmp = XYZColorSpaces_getInstance().e1q_1;
|
|
526
|
-
break;
|
|
527
|
-
default:
|
|
528
|
-
var tmp0 = customColorSpaces.i2();
|
|
529
|
-
var tmp$ret$1;
|
|
530
|
-
$l$block: {
|
|
531
|
-
// Inline function 'kotlin.collections.firstOrNull' call
|
|
532
|
-
var _iterator__ex2g4s = tmp0.j();
|
|
533
|
-
while (_iterator__ex2g4s.k()) {
|
|
534
|
-
var element = _iterator__ex2g4s.l();
|
|
535
|
-
if (element.b2() === name) {
|
|
536
|
-
tmp$ret$1 = element;
|
|
537
|
-
break $l$block;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
tmp$ret$1 = null;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
var tmp0_safe_receiver = tmp$ret$1;
|
|
544
|
-
tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c2();
|
|
545
|
-
break;
|
|
546
|
-
}
|
|
547
|
-
var tmp1_elvis_lhs = tmp;
|
|
548
|
-
var tmp_0;
|
|
549
|
-
if (tmp1_elvis_lhs == null) {
|
|
550
|
-
return null;
|
|
551
|
-
} else {
|
|
552
|
-
tmp_0 = tmp1_elvis_lhs;
|
|
553
|
-
}
|
|
554
|
-
var space = tmp_0;
|
|
555
|
-
var tmp2 = match.bd().o(2);
|
|
556
|
-
// Inline function 'kotlin.text.split' call
|
|
557
|
-
// Inline function 'kotlin.collections.mapIndexed' call
|
|
558
|
-
var this_0 = Regex_init_$Create$('\\s+').jc(tmp2, 0);
|
|
559
|
-
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
560
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
561
|
-
var index = 0;
|
|
562
|
-
var _iterator__ex2g4s_0 = this_0.j();
|
|
563
|
-
while (_iterator__ex2g4s_0.k()) {
|
|
564
|
-
var item = _iterator__ex2g4s_0.l();
|
|
565
|
-
var _unary__edvuaz = index;
|
|
566
|
-
index = _unary__edvuaz + 1 | 0;
|
|
567
|
-
var i = checkIndexOverflow(_unary__edvuaz);
|
|
568
|
-
var tmp$ret$3 = percentOrNumber(item, space.m1o().o(i).k1o_1);
|
|
569
|
-
destination.e(tmp$ret$3);
|
|
570
|
-
}
|
|
571
|
-
var values = destination;
|
|
572
|
-
var tmp_1 = 0;
|
|
573
|
-
var tmp_2 = space.m1o().m();
|
|
574
|
-
var tmp_3 = new Float32Array(tmp_2);
|
|
575
|
-
while (tmp_1 < tmp_2) {
|
|
576
|
-
var tmp_4 = tmp_1;
|
|
577
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
578
|
-
var tmp_5;
|
|
579
|
-
if (0 <= tmp_4 ? tmp_4 < values.m() : false) {
|
|
580
|
-
tmp_5 = values.o(tmp_4);
|
|
581
|
-
} else {
|
|
582
|
-
tmp_5 = 0.0;
|
|
583
|
-
}
|
|
584
|
-
tmp_3[tmp_4] = tmp_5;
|
|
585
|
-
tmp_1 = tmp_1 + 1 | 0;
|
|
586
|
-
}
|
|
587
|
-
var components = tmp_3;
|
|
588
|
-
components[get_lastIndex(components)] = alpha(match.bd().o(3));
|
|
589
|
-
return space.n1o(components);
|
|
590
|
-
}
|
|
591
|
-
function percentOrNumber(str, max) {
|
|
592
|
-
var tmp;
|
|
593
|
-
if (endsWith(str, '%')) {
|
|
594
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
595
|
-
var this_0 = dropLast(str, 1);
|
|
596
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
597
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
598
|
-
tmp = toDouble(this_0) * max / 100.0;
|
|
599
|
-
} else {
|
|
600
|
-
tmp = number(str);
|
|
601
|
-
}
|
|
602
|
-
return tmp;
|
|
603
|
-
}
|
|
604
|
-
function alpha(str) {
|
|
605
|
-
var tmp;
|
|
606
|
-
// Inline function 'kotlin.text.isEmpty' call
|
|
607
|
-
if (charSequenceLength(str) === 0) {
|
|
608
|
-
tmp = 1.0;
|
|
609
|
-
} else {
|
|
610
|
-
tmp = percentOrNumber(str, 1.0);
|
|
611
|
-
}
|
|
612
|
-
return coerceIn(tmp, 0.0, 1.0);
|
|
613
|
-
}
|
|
614
|
-
function hue(str) {
|
|
615
|
-
var tmp;
|
|
616
|
-
if (endsWith(str, 'deg')) {
|
|
617
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
618
|
-
var this_0 = dropLast(str, 3);
|
|
619
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
620
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
621
|
-
tmp = toDouble(this_0);
|
|
622
|
-
} else if (endsWith(str, 'grad')) {
|
|
623
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
624
|
-
var this_1 = dropLast(str, 4);
|
|
625
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
626
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
627
|
-
var tmp$ret$5 = toDouble(this_1);
|
|
628
|
-
tmp = gradToDeg(tmp$ret$5);
|
|
629
|
-
} else if (endsWith(str, 'rad')) {
|
|
630
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
631
|
-
var this_2 = dropLast(str, 3);
|
|
632
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
633
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
634
|
-
var tmp$ret$8 = toDouble(this_2);
|
|
635
|
-
tmp = radToDeg(tmp$ret$8);
|
|
636
|
-
} else if (endsWith(str, 'turn')) {
|
|
637
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
638
|
-
var this_3 = dropLast(str, 4);
|
|
639
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
640
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
641
|
-
var tmp$ret$11 = toDouble(this_3);
|
|
642
|
-
tmp = turnToDeg(tmp$ret$11);
|
|
643
|
-
} else {
|
|
644
|
-
tmp = number(str);
|
|
645
|
-
}
|
|
646
|
-
return normalizeDeg_0(tmp);
|
|
647
|
-
}
|
|
648
|
-
function number(str) {
|
|
649
|
-
var tmp;
|
|
650
|
-
if (str === 'none') {
|
|
651
|
-
tmp = NaN;
|
|
652
|
-
} else {
|
|
653
|
-
// Inline function 'kotlin.text.toFloat' call
|
|
654
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
655
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
656
|
-
tmp = toDouble(str);
|
|
657
|
-
}
|
|
658
|
-
return tmp;
|
|
659
|
-
}
|
|
660
163
|
var RenderCondition_ALWAYS_instance;
|
|
661
164
|
var RenderCondition_NEVER_instance;
|
|
662
165
|
var RenderCondition_AUTO_instance;
|
|
@@ -710,14 +213,14 @@
|
|
|
710
213
|
legacyName = legacyName === VOID ? false : legacyName;
|
|
711
214
|
legacyFormat = legacyFormat === VOID ? false : legacyFormat;
|
|
712
215
|
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
713
|
-
var tmp0 = customColorSpaces.
|
|
216
|
+
var tmp0 = customColorSpaces.t1();
|
|
714
217
|
var tmp$ret$1;
|
|
715
218
|
$l$block: {
|
|
716
219
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
717
220
|
var _iterator__ex2g4s = tmp0.j();
|
|
718
221
|
while (_iterator__ex2g4s.k()) {
|
|
719
222
|
var element = _iterator__ex2g4s.l();
|
|
720
|
-
if (equals(element.
|
|
223
|
+
if (equals(element.n1(), _this__u8e3s4.t1m())) {
|
|
721
224
|
tmp$ret$1 = element;
|
|
722
225
|
break $l$block;
|
|
723
226
|
}
|
|
@@ -725,7 +228,7 @@
|
|
|
725
228
|
tmp$ret$1 = null;
|
|
726
229
|
}
|
|
727
230
|
var tmp0_safe_receiver = tmp$ret$1;
|
|
728
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
231
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m1();
|
|
729
232
|
var tmp;
|
|
730
233
|
if (tmp1_safe_receiver == null) {
|
|
731
234
|
tmp = null;
|
|
@@ -738,17 +241,17 @@
|
|
|
738
241
|
if (tmp2_elvis_lhs == null) {
|
|
739
242
|
var tmp_1;
|
|
740
243
|
if (_this__u8e3s4 instanceof RGB) {
|
|
741
|
-
var tmp4_subject = _this__u8e3s4.
|
|
742
|
-
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().
|
|
244
|
+
var tmp4_subject = _this__u8e3s4.a1n_1;
|
|
245
|
+
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().t1o_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().p1o_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().u1o_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().q1o_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().k1o_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
743
246
|
} else {
|
|
744
247
|
if (_this__u8e3s4 instanceof HSL) {
|
|
745
248
|
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
746
249
|
} else {
|
|
747
250
|
if (_this__u8e3s4 instanceof LAB) {
|
|
748
|
-
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
251
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().i1o_1), alphaPercent, renderAlpha);
|
|
749
252
|
} else {
|
|
750
253
|
if (_this__u8e3s4 instanceof LCHab) {
|
|
751
|
-
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
254
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().g1o_1), hueUnit, alphaPercent, renderAlpha);
|
|
752
255
|
} else {
|
|
753
256
|
if (_this__u8e3s4 instanceof HWB) {
|
|
754
257
|
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
@@ -760,7 +263,7 @@
|
|
|
760
263
|
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
761
264
|
} else {
|
|
762
265
|
if (_this__u8e3s4 instanceof XYZ) {
|
|
763
|
-
tmp_1 = _this__u8e3s4.
|
|
266
|
+
tmp_1 = _this__u8e3s4.h1n_1.t1n().equals(Illuminant_getInstance().c1o_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.w1n(XYZColorSpaces_getInstance().v1n_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
764
267
|
} else {
|
|
765
268
|
tmp_1 = null;
|
|
766
269
|
}
|
|
@@ -781,40 +284,40 @@
|
|
|
781
284
|
// Inline function 'kotlin.text.buildString' call
|
|
782
285
|
// Inline function 'kotlin.apply' call
|
|
783
286
|
var this_0 = StringBuilder_init_$Create$();
|
|
784
|
-
this_0.
|
|
785
|
-
var tmp =
|
|
287
|
+
this_0.r7('color(').r7(name).r7(' ');
|
|
288
|
+
var tmp = dropLast(_this__u8e3s4.a5(), 1);
|
|
786
289
|
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
|
|
787
|
-
this_0.
|
|
788
|
-
this_0.
|
|
290
|
+
this_0.r7(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
291
|
+
this_0.r7(')');
|
|
789
292
|
return this_0.toString();
|
|
790
293
|
}
|
|
791
294
|
function get_dashName(_this__u8e3s4) {
|
|
792
|
-
var tmp0 = _this__u8e3s4.
|
|
295
|
+
var tmp0 = _this__u8e3s4.t1m().w1();
|
|
793
296
|
// Inline function 'kotlin.text.replace' call
|
|
794
297
|
// Inline function 'kotlin.text.lowercase' call
|
|
795
298
|
// Inline function 'kotlin.js.asDynamic' call
|
|
796
|
-
return '--' + Regex_init_$Create$('\\W').
|
|
299
|
+
return '--' + Regex_init_$Create$('\\W').rb(tmp0, '-').toLowerCase();
|
|
797
300
|
}
|
|
798
301
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
799
|
-
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
302
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.w1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.v1o())), rgbPercent ? render(_this__u8e3s4.x1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.v1o())), rgbPercent ? render(_this__u8e3s4.y1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.v1o()))], alphaPercent, renderAlpha, commas);
|
|
800
303
|
}
|
|
801
304
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
802
|
-
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
305
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.x1o_1, true), render(_this__u8e3s4.y1o_1, true)], alphaPercent, renderAlpha, commas);
|
|
803
306
|
}
|
|
804
307
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
805
|
-
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
308
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.j1n_1 / 100, true), render(_this__u8e3s4.k1n_1), render(_this__u8e3s4.l1n_1)], alphaPercent, renderAlpha);
|
|
806
309
|
}
|
|
807
310
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
808
|
-
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
311
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.a1p_1 / 100, true), render(_this__u8e3s4.b1p_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
809
312
|
}
|
|
810
313
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
811
|
-
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
314
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.f1p_1, true), render(_this__u8e3s4.g1p_1, true)], alphaPercent, renderAlpha);
|
|
812
315
|
}
|
|
813
316
|
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
814
|
-
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.
|
|
317
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.h1p_1, true), render(_this__u8e3s4.i1p_1), render(_this__u8e3s4.j1p_1)], alphaPercent, renderAlpha);
|
|
815
318
|
}
|
|
816
319
|
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
817
|
-
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.
|
|
320
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.k1p_1, true), render(_this__u8e3s4.l1p_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
818
321
|
}
|
|
819
322
|
function render(_this__u8e3s4, percent, precision) {
|
|
820
323
|
percent = percent === VOID ? false : percent;
|
|
@@ -841,8 +344,8 @@
|
|
|
841
344
|
}
|
|
842
345
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
843
346
|
var tmp;
|
|
844
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.
|
|
845
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
347
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.s1m()) && !(_this__u8e3s4.s1m() === 1.0))) {
|
|
348
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.s1m()), alphaPercent);
|
|
846
349
|
} else {
|
|
847
350
|
tmp = '';
|
|
848
351
|
}
|
|
@@ -854,24 +357,24 @@
|
|
|
854
357
|
// Inline function 'kotlin.apply' call
|
|
855
358
|
var this_0 = StringBuilder_init_$Create$();
|
|
856
359
|
var sep = commas ? ', ' : ' ';
|
|
857
|
-
this_0.
|
|
360
|
+
this_0.r7(name).r7('(');
|
|
858
361
|
joinTo_0(components, this_0, sep);
|
|
859
|
-
this_0.
|
|
860
|
-
this_0.
|
|
362
|
+
this_0.r7(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
363
|
+
this_0.r7(')');
|
|
861
364
|
return this_0.toString();
|
|
862
365
|
}
|
|
863
366
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
864
367
|
var tmp;
|
|
865
|
-
if (isNaN_0(_this__u8e3s4.
|
|
368
|
+
if (isNaN_0(_this__u8e3s4.m1p())) {
|
|
866
369
|
tmp = 'none';
|
|
867
370
|
} else {
|
|
868
371
|
var tmp_0;
|
|
869
|
-
switch (hueUnit.
|
|
372
|
+
switch (hueUnit.v1_1) {
|
|
870
373
|
case 0:
|
|
871
|
-
tmp_0 = render(_this__u8e3s4.
|
|
374
|
+
tmp_0 = render(_this__u8e3s4.m1p());
|
|
872
375
|
break;
|
|
873
376
|
case 1:
|
|
874
|
-
tmp_0 = render(_this__u8e3s4.
|
|
377
|
+
tmp_0 = render(_this__u8e3s4.m1p()) + 'deg';
|
|
875
378
|
break;
|
|
876
379
|
case 2:
|
|
877
380
|
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -908,27 +411,27 @@
|
|
|
908
411
|
return AngleUnit_AUTO_instance;
|
|
909
412
|
}
|
|
910
413
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
911
|
-
return isNaN_0(_this__u8e3s4.
|
|
414
|
+
return isNaN_0(_this__u8e3s4.m1p()) ? numberToDouble(whenNaN) : _this__u8e3s4.m1p();
|
|
912
415
|
}
|
|
913
416
|
function hueAsRad(_this__u8e3s4) {
|
|
914
|
-
return degToRad(_this__u8e3s4.
|
|
417
|
+
return degToRad(_this__u8e3s4.m1p());
|
|
915
418
|
}
|
|
916
419
|
function hueAsGrad(_this__u8e3s4) {
|
|
917
|
-
return degToGrad(_this__u8e3s4.
|
|
420
|
+
return degToGrad(_this__u8e3s4.m1p());
|
|
918
421
|
}
|
|
919
422
|
function hueAsTurns(_this__u8e3s4) {
|
|
920
|
-
return degToTurns(_this__u8e3s4.
|
|
423
|
+
return degToTurns(_this__u8e3s4.m1p());
|
|
921
424
|
}
|
|
922
425
|
function WhitePoint(name, chromaticity) {
|
|
923
|
-
this.
|
|
924
|
-
this.
|
|
426
|
+
this.n1p_1 = name;
|
|
427
|
+
this.o1p_1 = chromaticity;
|
|
925
428
|
}
|
|
926
429
|
protoOf(WhitePoint).toString = function () {
|
|
927
|
-
return this.
|
|
430
|
+
return this.n1p_1;
|
|
928
431
|
};
|
|
929
432
|
protoOf(WhitePoint).hashCode = function () {
|
|
930
|
-
var result = getStringHashCode(this.
|
|
931
|
-
result = imul(result, 31) + this.
|
|
433
|
+
var result = getStringHashCode(this.n1p_1);
|
|
434
|
+
result = imul(result, 31) + this.o1p_1.hashCode() | 0;
|
|
932
435
|
return result;
|
|
933
436
|
};
|
|
934
437
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -937,22 +440,22 @@
|
|
|
937
440
|
if (!(other instanceof WhitePoint))
|
|
938
441
|
return false;
|
|
939
442
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
940
|
-
if (!(this.
|
|
443
|
+
if (!(this.n1p_1 === tmp0_other_with_cast.n1p_1))
|
|
941
444
|
return false;
|
|
942
|
-
if (!this.
|
|
445
|
+
if (!this.o1p_1.equals(tmp0_other_with_cast.o1p_1))
|
|
943
446
|
return false;
|
|
944
447
|
return true;
|
|
945
448
|
};
|
|
946
449
|
function Illuminant() {
|
|
947
450
|
Illuminant_instance = this;
|
|
948
|
-
this.
|
|
949
|
-
this.
|
|
950
|
-
this.
|
|
951
|
-
this.
|
|
952
|
-
this.
|
|
953
|
-
this.
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
451
|
+
this.x1n_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
452
|
+
this.y1n_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
453
|
+
this.z1n_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
454
|
+
this.a1o_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
455
|
+
this.b1o_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
456
|
+
this.c1o_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
457
|
+
this.d1o_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
458
|
+
this.e1o_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
956
459
|
}
|
|
957
460
|
var Illuminant_instance;
|
|
958
461
|
function Illuminant_getInstance() {
|
|
@@ -970,7 +473,7 @@
|
|
|
970
473
|
// Inline function 'kotlin.collections.buildList' call
|
|
971
474
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
972
475
|
// Inline function 'kotlin.apply' call
|
|
973
|
-
var this_0 = ArrayList_init_$Create$
|
|
476
|
+
var this_0 = ArrayList_init_$Create$();
|
|
974
477
|
// Inline function 'kotlin.text.mapTo' call
|
|
975
478
|
var inductionVariable = 0;
|
|
976
479
|
while (inductionVariable < charSequenceLength(name)) {
|
|
@@ -980,7 +483,7 @@
|
|
|
980
483
|
this_0.e(tmp$ret$0);
|
|
981
484
|
}
|
|
982
485
|
this_0.e(get_alphaInfo());
|
|
983
|
-
return this_0.
|
|
486
|
+
return this_0.v2();
|
|
984
487
|
}
|
|
985
488
|
function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
|
|
986
489
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -991,7 +494,7 @@
|
|
|
991
494
|
// Inline function 'kotlin.collections.buildList' call
|
|
992
495
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
993
496
|
// Inline function 'kotlin.apply' call
|
|
994
|
-
var this_0 = ArrayList_init_$Create$
|
|
497
|
+
var this_0 = ArrayList_init_$Create$();
|
|
995
498
|
// Inline function 'kotlin.text.mapTo' call
|
|
996
499
|
var inductionVariable = 0;
|
|
997
500
|
while (inductionVariable < charSequenceLength(name)) {
|
|
@@ -1001,7 +504,7 @@
|
|
|
1001
504
|
this_0.e(tmp$ret$0);
|
|
1002
505
|
}
|
|
1003
506
|
this_0.e(get_alphaInfo());
|
|
1004
|
-
return this_0.
|
|
507
|
+
return this_0.v2();
|
|
1005
508
|
}
|
|
1006
509
|
function componentInfoList(c) {
|
|
1007
510
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -1032,16 +535,6 @@
|
|
|
1032
535
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
1033
536
|
}
|
|
1034
537
|
}
|
|
1035
|
-
function CssColors() {
|
|
1036
|
-
CssColors_instance = this;
|
|
1037
|
-
this.o1o_1 = mapOf([to('black', Companion_getInstance_6().k1r(0, 0, 0)), to('silver', Companion_getInstance_6().k1r(192, 192, 192)), to('gray', Companion_getInstance_6().k1r(128, 128, 128)), to('white', Companion_getInstance_6().k1r(255, 255, 255)), to('maroon', Companion_getInstance_6().k1r(128, 0, 0)), to('red', Companion_getInstance_6().k1r(255, 0, 0)), to('purple', Companion_getInstance_6().k1r(128, 0, 128)), to('fuchsia', Companion_getInstance_6().k1r(255, 0, 255)), to('green', Companion_getInstance_6().k1r(0, 128, 0)), to('lime', Companion_getInstance_6().k1r(0, 255, 0)), to('olive', Companion_getInstance_6().k1r(128, 128, 0)), to('yellow', Companion_getInstance_6().k1r(255, 255, 0)), to('navy', Companion_getInstance_6().k1r(0, 0, 128)), to('blue', Companion_getInstance_6().k1r(0, 0, 255)), to('teal', Companion_getInstance_6().k1r(0, 128, 128)), to('aqua', Companion_getInstance_6().k1r(0, 255, 255)), to('orange', Companion_getInstance_6().k1r(255, 165, 0)), to('aliceblue', Companion_getInstance_6().k1r(240, 248, 255)), to('antiquewhite', Companion_getInstance_6().k1r(250, 235, 215)), to('aquamarine', Companion_getInstance_6().k1r(127, 255, 212)), to('azure', Companion_getInstance_6().k1r(240, 255, 255)), to('beige', Companion_getInstance_6().k1r(245, 245, 220)), to('bisque', Companion_getInstance_6().k1r(255, 228, 196)), to('blanchedalmond', Companion_getInstance_6().k1r(255, 235, 205)), to('blueviolet', Companion_getInstance_6().k1r(138, 43, 226)), to('brown', Companion_getInstance_6().k1r(165, 42, 42)), to('burlywood', Companion_getInstance_6().k1r(222, 184, 135)), to('cadetblue', Companion_getInstance_6().k1r(95, 158, 160)), to('chartreuse', Companion_getInstance_6().k1r(127, 255, 0)), to('chocolate', Companion_getInstance_6().k1r(210, 105, 30)), to('coral', Companion_getInstance_6().k1r(255, 127, 80)), to('cornflowerblue', Companion_getInstance_6().k1r(100, 149, 237)), to('cornsilk', Companion_getInstance_6().k1r(255, 248, 220)), to('crimson', Companion_getInstance_6().k1r(220, 20, 60)), to('cyan', Companion_getInstance_6().k1r(0, 255, 255)), to('darkblue', Companion_getInstance_6().k1r(0, 0, 139)), to('darkcyan', Companion_getInstance_6().k1r(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_6().k1r(184, 134, 11)), to('darkgray', Companion_getInstance_6().k1r(169, 169, 169)), to('darkgreen', Companion_getInstance_6().k1r(0, 100, 0)), to('darkgrey', Companion_getInstance_6().k1r(169, 169, 169)), to('darkkhaki', Companion_getInstance_6().k1r(189, 183, 107)), to('darkmagenta', Companion_getInstance_6().k1r(139, 0, 139)), to('darkolivegreen', Companion_getInstance_6().k1r(85, 107, 47)), to('darkorange', Companion_getInstance_6().k1r(255, 140, 0)), to('darkorchid', Companion_getInstance_6().k1r(153, 50, 204)), to('darkred', Companion_getInstance_6().k1r(139, 0, 0)), to('darksalmon', Companion_getInstance_6().k1r(233, 150, 122)), to('darkseagreen', Companion_getInstance_6().k1r(143, 188, 143)), to('darkslateblue', Companion_getInstance_6().k1r(72, 61, 139)), to('darkslategray', Companion_getInstance_6().k1r(47, 79, 79)), to('darkslategrey', Companion_getInstance_6().k1r(47, 79, 79)), to('darkturquoise', Companion_getInstance_6().k1r(0, 206, 209)), to('darkviolet', Companion_getInstance_6().k1r(148, 0, 211)), to('deeppink', Companion_getInstance_6().k1r(255, 20, 147)), to('deepskyblue', Companion_getInstance_6().k1r(0, 191, 255)), to('dimgray', Companion_getInstance_6().k1r(105, 105, 105)), to('dimgrey', Companion_getInstance_6().k1r(105, 105, 105)), to('dodgerblue', Companion_getInstance_6().k1r(30, 144, 255)), to('firebrick', Companion_getInstance_6().k1r(178, 34, 34)), to('floralwhite', Companion_getInstance_6().k1r(255, 250, 240)), to('forestgreen', Companion_getInstance_6().k1r(34, 139, 34)), to('gainsboro', Companion_getInstance_6().k1r(220, 220, 220)), to('ghostwhite', Companion_getInstance_6().k1r(248, 248, 255)), to('gold', Companion_getInstance_6().k1r(255, 215, 0)), to('goldenrod', Companion_getInstance_6().k1r(218, 165, 32)), to('greenyellow', Companion_getInstance_6().k1r(173, 255, 47)), to('grey', Companion_getInstance_6().k1r(128, 128, 128)), to('honeydew', Companion_getInstance_6().k1r(240, 255, 240)), to('hotpink', Companion_getInstance_6().k1r(255, 105, 180)), to('indianred', Companion_getInstance_6().k1r(205, 92, 92)), to('indigo', Companion_getInstance_6().k1r(75, 0, 130)), to('ivory', Companion_getInstance_6().k1r(255, 255, 240)), to('khaki', Companion_getInstance_6().k1r(240, 230, 140)), to('lavender', Companion_getInstance_6().k1r(230, 230, 250)), to('lavenderblush', Companion_getInstance_6().k1r(255, 240, 245)), to('lawngreen', Companion_getInstance_6().k1r(124, 252, 0)), to('lemonchiffon', Companion_getInstance_6().k1r(255, 250, 205)), to('lightblue', Companion_getInstance_6().k1r(173, 216, 230)), to('lightcoral', Companion_getInstance_6().k1r(240, 128, 128)), to('lightcyan', Companion_getInstance_6().k1r(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_6().k1r(250, 250, 210)), to('lightgray', Companion_getInstance_6().k1r(211, 211, 211)), to('lightgreen', Companion_getInstance_6().k1r(144, 238, 144)), to('lightgrey', Companion_getInstance_6().k1r(211, 211, 211)), to('lightpink', Companion_getInstance_6().k1r(255, 182, 193)), to('lightsalmon', Companion_getInstance_6().k1r(255, 160, 122)), to('lightseagreen', Companion_getInstance_6().k1r(32, 178, 170)), to('lightskyblue', Companion_getInstance_6().k1r(135, 206, 250)), to('lightslategray', Companion_getInstance_6().k1r(119, 136, 153)), to('lightslategrey', Companion_getInstance_6().k1r(119, 136, 153)), to('lightsteelblue', Companion_getInstance_6().k1r(176, 196, 222)), to('lightyellow', Companion_getInstance_6().k1r(255, 255, 224)), to('limegreen', Companion_getInstance_6().k1r(50, 205, 50)), to('linen', Companion_getInstance_6().k1r(250, 240, 230)), to('magenta', Companion_getInstance_6().k1r(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_6().k1r(102, 205, 170)), to('mediumblue', Companion_getInstance_6().k1r(0, 0, 205)), to('mediumorchid', Companion_getInstance_6().k1r(186, 85, 211)), to('mediumpurple', Companion_getInstance_6().k1r(147, 112, 219)), to('mediumseagreen', Companion_getInstance_6().k1r(60, 179, 113)), to('mediumslateblue', Companion_getInstance_6().k1r(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_6().k1r(0, 250, 154)), to('mediumturquoise', Companion_getInstance_6().k1r(72, 209, 204)), to('mediumvioletred', Companion_getInstance_6().k1r(199, 21, 133)), to('midnightblue', Companion_getInstance_6().k1r(25, 25, 112)), to('mintcream', Companion_getInstance_6().k1r(245, 255, 250)), to('mistyrose', Companion_getInstance_6().k1r(255, 228, 225)), to('moccasin', Companion_getInstance_6().k1r(255, 228, 181)), to('navajowhite', Companion_getInstance_6().k1r(255, 222, 173)), to('oldlace', Companion_getInstance_6().k1r(253, 245, 230)), to('olivedrab', Companion_getInstance_6().k1r(107, 142, 35)), to('orangered', Companion_getInstance_6().k1r(255, 69, 0)), to('orchid', Companion_getInstance_6().k1r(218, 112, 214)), to('palegoldenrod', Companion_getInstance_6().k1r(238, 232, 170)), to('palegreen', Companion_getInstance_6().k1r(152, 251, 152)), to('paleturquoise', Companion_getInstance_6().k1r(175, 238, 238)), to('palevioletred', Companion_getInstance_6().k1r(219, 112, 147)), to('papayawhip', Companion_getInstance_6().k1r(255, 239, 213)), to('peachpuff', Companion_getInstance_6().k1r(255, 218, 185)), to('peru', Companion_getInstance_6().k1r(205, 133, 63)), to('pink', Companion_getInstance_6().k1r(255, 192, 203)), to('plum', Companion_getInstance_6().k1r(221, 160, 221)), to('powderblue', Companion_getInstance_6().k1r(176, 224, 230)), to('rosybrown', Companion_getInstance_6().k1r(188, 143, 143)), to('royalblue', Companion_getInstance_6().k1r(65, 105, 225)), to('saddlebrown', Companion_getInstance_6().k1r(139, 69, 19)), to('salmon', Companion_getInstance_6().k1r(250, 128, 114)), to('sandybrown', Companion_getInstance_6().k1r(244, 164, 96)), to('seagreen', Companion_getInstance_6().k1r(46, 139, 87)), to('seashell', Companion_getInstance_6().k1r(255, 245, 238)), to('sienna', Companion_getInstance_6().k1r(160, 82, 45)), to('skyblue', Companion_getInstance_6().k1r(135, 206, 235)), to('slateblue', Companion_getInstance_6().k1r(106, 90, 205)), to('slategray', Companion_getInstance_6().k1r(112, 128, 144)), to('slategrey', Companion_getInstance_6().k1r(112, 128, 144)), to('snow', Companion_getInstance_6().k1r(255, 250, 250)), to('springgreen', Companion_getInstance_6().k1r(0, 255, 127)), to('steelblue', Companion_getInstance_6().k1r(70, 130, 180)), to('tan', Companion_getInstance_6().k1r(210, 180, 140)), to('thistle', Companion_getInstance_6().k1r(216, 191, 216)), to('tomato', Companion_getInstance_6().k1r(255, 99, 71)), to('turquoise', Companion_getInstance_6().k1r(64, 224, 208)), to('violet', Companion_getInstance_6().k1r(238, 130, 238)), to('wheat', Companion_getInstance_6().k1r(245, 222, 179)), to('whitesmoke', Companion_getInstance_6().k1r(245, 245, 245)), to('yellowgreen', Companion_getInstance_6().k1r(154, 205, 50)), to('rebeccapurple', Companion_getInstance_6().k1r(102, 51, 153)), to('transparent', Companion_getInstance_6().l1r(0, 0, 0, 0))]);
|
|
1038
|
-
}
|
|
1039
|
-
var CssColors_instance;
|
|
1040
|
-
function CssColors_getInstance() {
|
|
1041
|
-
if (CssColors_instance == null)
|
|
1042
|
-
new CssColors();
|
|
1043
|
-
return CssColors_instance;
|
|
1044
|
-
}
|
|
1045
538
|
function spow(_this__u8e3s4, p) {
|
|
1046
539
|
return spow_0(_this__u8e3s4, p);
|
|
1047
540
|
}
|
|
@@ -1073,12 +566,6 @@
|
|
|
1073
566
|
function degToRad_0(_this__u8e3s4) {
|
|
1074
567
|
return _this__u8e3s4 * 3.141592653589793 / 180.0;
|
|
1075
568
|
}
|
|
1076
|
-
function gradToDeg(_this__u8e3s4) {
|
|
1077
|
-
return _this__u8e3s4 * 0.9;
|
|
1078
|
-
}
|
|
1079
|
-
function turnToDeg(_this__u8e3s4) {
|
|
1080
|
-
return _this__u8e3s4 * 360.0;
|
|
1081
|
-
}
|
|
1082
569
|
function degToGrad(_this__u8e3s4) {
|
|
1083
570
|
return _this__u8e3s4 * 200.0 / 180.0;
|
|
1084
571
|
}
|
|
@@ -1120,22 +607,22 @@
|
|
|
1120
607
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
1121
608
|
if (!(other instanceof Matrix))
|
|
1122
609
|
return false;
|
|
1123
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
610
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.p1p_1 : THROW_CCE();
|
|
1124
611
|
if (!equals($this, tmp0_other_with_cast))
|
|
1125
612
|
return false;
|
|
1126
613
|
return true;
|
|
1127
614
|
}
|
|
1128
615
|
function Matrix(rowMajor) {
|
|
1129
|
-
this.
|
|
616
|
+
this.p1p_1 = rowMajor;
|
|
1130
617
|
}
|
|
1131
618
|
protoOf(Matrix).toString = function () {
|
|
1132
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
619
|
+
return Matrix__toString_impl_l0abk0(this.p1p_1);
|
|
1133
620
|
};
|
|
1134
621
|
protoOf(Matrix).hashCode = function () {
|
|
1135
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
622
|
+
return Matrix__hashCode_impl_s9ntm9(this.p1p_1);
|
|
1136
623
|
};
|
|
1137
624
|
protoOf(Matrix).equals = function (other) {
|
|
1138
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
625
|
+
return Matrix__equals_impl_g5p8p9(this.p1p_1, other);
|
|
1139
626
|
};
|
|
1140
627
|
function inverse(_this__u8e3s4, inPlace) {
|
|
1141
628
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -1214,48 +701,21 @@
|
|
|
1214
701
|
function dot$f($this_dot, $other, x, y) {
|
|
1215
702
|
return Matrix__get_impl_xogbpk($this_dot, 0, y) * Matrix__get_impl_xogbpk($other, x, 0) + Matrix__get_impl_xogbpk($this_dot, 1, y) * Matrix__get_impl_xogbpk($other, x, 1) + Matrix__get_impl_xogbpk($this_dot, 2, y) * Matrix__get_impl_xogbpk($other, x, 2);
|
|
1216
703
|
}
|
|
1217
|
-
function
|
|
1218
|
-
|
|
1219
|
-
this.
|
|
704
|
+
function Companion() {
|
|
705
|
+
Companion_instance = this;
|
|
706
|
+
this.q1p_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
1220
707
|
}
|
|
1221
|
-
protoOf(
|
|
708
|
+
protoOf(Companion).w1 = function () {
|
|
1222
709
|
return 'HSL';
|
|
1223
710
|
};
|
|
1224
|
-
protoOf(
|
|
1225
|
-
return
|
|
1226
|
-
};
|
|
1227
|
-
protoOf(Companion_0).g1o = function (color) {
|
|
1228
|
-
return color.g1n();
|
|
1229
|
-
};
|
|
1230
|
-
protoOf(Companion_0).n1o = function (components) {
|
|
1231
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1232
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1233
|
-
var size = this.m1o().m();
|
|
1234
|
-
var containsLower = size - 1 | 0;
|
|
1235
|
-
var containsArg = components.length;
|
|
1236
|
-
// Inline function 'kotlin.require' call
|
|
1237
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1238
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1239
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1240
|
-
}
|
|
1241
|
-
var tmp2 = components[0];
|
|
1242
|
-
var tmp3 = components[1];
|
|
1243
|
-
var tmp4 = components[2];
|
|
1244
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
1245
|
-
var tmp;
|
|
1246
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1247
|
-
tmp = components[3];
|
|
1248
|
-
} else {
|
|
1249
|
-
tmp = 1.0;
|
|
1250
|
-
}
|
|
1251
|
-
var p3 = tmp;
|
|
1252
|
-
return new HSL(tmp2, tmp3, tmp4, p3);
|
|
711
|
+
protoOf(Companion).o1n = function (color) {
|
|
712
|
+
return color.v1m();
|
|
1253
713
|
};
|
|
1254
|
-
var
|
|
1255
|
-
function
|
|
1256
|
-
if (
|
|
1257
|
-
new
|
|
1258
|
-
return
|
|
714
|
+
var Companion_instance;
|
|
715
|
+
function Companion_getInstance() {
|
|
716
|
+
if (Companion_instance == null)
|
|
717
|
+
new Companion();
|
|
718
|
+
return Companion_instance;
|
|
1259
719
|
}
|
|
1260
720
|
function toSRGB$f(h, s, l, n) {
|
|
1261
721
|
var k = (n + h) % 12.0;
|
|
@@ -1269,55 +729,55 @@
|
|
|
1269
729
|
return l - a * coerceAtLeast(tmp$ret$1, -1.0);
|
|
1270
730
|
}
|
|
1271
731
|
function HSL(h, s, l, alpha) {
|
|
1272
|
-
|
|
732
|
+
Companion_getInstance();
|
|
1273
733
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1274
|
-
this.
|
|
1275
|
-
this.
|
|
1276
|
-
this.
|
|
1277
|
-
this.
|
|
734
|
+
this.w1o_1 = h;
|
|
735
|
+
this.x1o_1 = s;
|
|
736
|
+
this.y1o_1 = l;
|
|
737
|
+
this.z1o_1 = alpha;
|
|
1278
738
|
}
|
|
1279
|
-
protoOf(HSL).
|
|
1280
|
-
return this.
|
|
739
|
+
protoOf(HSL).m1p = function () {
|
|
740
|
+
return this.w1o_1;
|
|
1281
741
|
};
|
|
1282
|
-
protoOf(HSL).
|
|
1283
|
-
return this.
|
|
742
|
+
protoOf(HSL).s1m = function () {
|
|
743
|
+
return this.z1o_1;
|
|
1284
744
|
};
|
|
1285
|
-
protoOf(HSL).
|
|
1286
|
-
return
|
|
745
|
+
protoOf(HSL).t1m = function () {
|
|
746
|
+
return Companion_getInstance();
|
|
1287
747
|
};
|
|
1288
|
-
protoOf(HSL).
|
|
1289
|
-
if (this.
|
|
1290
|
-
return
|
|
748
|
+
protoOf(HSL).u1m = function () {
|
|
749
|
+
if (this.x1o_1 < 1.0E-7)
|
|
750
|
+
return Companion_getInstance_2().s1p(this.y1o_1, this.y1o_1, this.y1o_1, this.z1o_1);
|
|
1291
751
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1292
|
-
var s = this.
|
|
1293
|
-
var l = this.
|
|
1294
|
-
return SRGB_getInstance().
|
|
752
|
+
var s = this.x1o_1;
|
|
753
|
+
var l = this.y1o_1;
|
|
754
|
+
return SRGB_getInstance().s1p(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.z1o_1);
|
|
1295
755
|
};
|
|
1296
|
-
protoOf(HSL).
|
|
756
|
+
protoOf(HSL).v1m = function () {
|
|
1297
757
|
return this;
|
|
1298
758
|
};
|
|
1299
|
-
protoOf(HSL).
|
|
759
|
+
protoOf(HSL).a5 = function () {
|
|
1300
760
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1301
|
-
return new Float32Array([this.
|
|
761
|
+
return new Float32Array([this.w1o_1, this.x1o_1, this.y1o_1, this.z1o_1]);
|
|
1302
762
|
};
|
|
1303
|
-
protoOf(HSL).
|
|
763
|
+
protoOf(HSL).u1p = function (h, s, l, alpha) {
|
|
1304
764
|
return new HSL(h, s, l, alpha);
|
|
1305
765
|
};
|
|
1306
|
-
protoOf(HSL).
|
|
1307
|
-
h = h === VOID ? this.
|
|
1308
|
-
s = s === VOID ? this.
|
|
1309
|
-
l = l === VOID ? this.
|
|
1310
|
-
alpha = alpha === VOID ? this.
|
|
1311
|
-
return $super === VOID ? this.
|
|
766
|
+
protoOf(HSL).v1p = function (h, s, l, alpha, $super) {
|
|
767
|
+
h = h === VOID ? this.w1o_1 : h;
|
|
768
|
+
s = s === VOID ? this.x1o_1 : s;
|
|
769
|
+
l = l === VOID ? this.y1o_1 : l;
|
|
770
|
+
alpha = alpha === VOID ? this.z1o_1 : alpha;
|
|
771
|
+
return $super === VOID ? this.u1p(h, s, l, alpha) : $super.u1p.call(this, h, s, l, alpha);
|
|
1312
772
|
};
|
|
1313
773
|
protoOf(HSL).toString = function () {
|
|
1314
|
-
return 'HSL(h=' + this.
|
|
774
|
+
return 'HSL(h=' + this.w1o_1 + ', s=' + this.x1o_1 + ', l=' + this.y1o_1 + ', alpha=' + this.z1o_1 + ')';
|
|
1315
775
|
};
|
|
1316
776
|
protoOf(HSL).hashCode = function () {
|
|
1317
|
-
var result = getNumberHashCode(this.
|
|
1318
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1319
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1320
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
777
|
+
var result = getNumberHashCode(this.w1o_1);
|
|
778
|
+
result = imul(result, 31) + getNumberHashCode(this.x1o_1) | 0;
|
|
779
|
+
result = imul(result, 31) + getNumberHashCode(this.y1o_1) | 0;
|
|
780
|
+
result = imul(result, 31) + getNumberHashCode(this.z1o_1) | 0;
|
|
1321
781
|
return result;
|
|
1322
782
|
};
|
|
1323
783
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1326,137 +786,18 @@
|
|
|
1326
786
|
if (!(other instanceof HSL))
|
|
1327
787
|
return false;
|
|
1328
788
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1329
|
-
if (!equals(this.
|
|
789
|
+
if (!equals(this.w1o_1, tmp0_other_with_cast.w1o_1))
|
|
1330
790
|
return false;
|
|
1331
|
-
if (!equals(this.
|
|
791
|
+
if (!equals(this.x1o_1, tmp0_other_with_cast.x1o_1))
|
|
1332
792
|
return false;
|
|
1333
|
-
if (!equals(this.
|
|
793
|
+
if (!equals(this.y1o_1, tmp0_other_with_cast.y1o_1))
|
|
1334
794
|
return false;
|
|
1335
|
-
if (!equals(this.
|
|
795
|
+
if (!equals(this.z1o_1, tmp0_other_with_cast.z1o_1))
|
|
1336
796
|
return false;
|
|
1337
797
|
return true;
|
|
1338
798
|
};
|
|
1339
|
-
function
|
|
1340
|
-
Companion_instance_2 = this;
|
|
1341
|
-
this.p1p_1 = polarComponentInfo('HWB', 0.0, 1.0);
|
|
799
|
+
function HWB() {
|
|
1342
800
|
}
|
|
1343
|
-
protoOf(Companion_1).l2 = function () {
|
|
1344
|
-
return 'HWB';
|
|
1345
|
-
};
|
|
1346
|
-
protoOf(Companion_1).m1o = function () {
|
|
1347
|
-
return this.p1p_1;
|
|
1348
|
-
};
|
|
1349
|
-
protoOf(Companion_1).g1o = function (color) {
|
|
1350
|
-
return color.z1n();
|
|
1351
|
-
};
|
|
1352
|
-
protoOf(Companion_1).n1o = function (components) {
|
|
1353
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1354
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1355
|
-
var size = this.m1o().m();
|
|
1356
|
-
var containsLower = size - 1 | 0;
|
|
1357
|
-
var containsArg = components.length;
|
|
1358
|
-
// Inline function 'kotlin.require' call
|
|
1359
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1360
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1361
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1362
|
-
}
|
|
1363
|
-
var tmp2 = components[0];
|
|
1364
|
-
var tmp3 = components[1];
|
|
1365
|
-
var tmp4 = components[2];
|
|
1366
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
1367
|
-
var tmp;
|
|
1368
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1369
|
-
tmp = components[3];
|
|
1370
|
-
} else {
|
|
1371
|
-
tmp = 1.0;
|
|
1372
|
-
}
|
|
1373
|
-
var p3 = tmp;
|
|
1374
|
-
return new HWB(tmp2, tmp3, tmp4, p3);
|
|
1375
|
-
};
|
|
1376
|
-
var Companion_instance_2;
|
|
1377
|
-
function Companion_getInstance_1() {
|
|
1378
|
-
if (Companion_instance_2 == null)
|
|
1379
|
-
new Companion_1();
|
|
1380
|
-
return Companion_instance_2;
|
|
1381
|
-
}
|
|
1382
|
-
function HWB(h, w, b, alpha) {
|
|
1383
|
-
Companion_getInstance_1();
|
|
1384
|
-
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1385
|
-
this.z1q_1 = h;
|
|
1386
|
-
this.a1r_1 = w;
|
|
1387
|
-
this.b1r_1 = b;
|
|
1388
|
-
this.c1r_1 = alpha;
|
|
1389
|
-
}
|
|
1390
|
-
protoOf(HWB).h1r = function () {
|
|
1391
|
-
return this.z1q_1;
|
|
1392
|
-
};
|
|
1393
|
-
protoOf(HWB).d1n = function () {
|
|
1394
|
-
return this.c1r_1;
|
|
1395
|
-
};
|
|
1396
|
-
protoOf(HWB).e1n = function () {
|
|
1397
|
-
return Companion_getInstance_1();
|
|
1398
|
-
};
|
|
1399
|
-
protoOf(HWB).f1n = function () {
|
|
1400
|
-
var h = this.z1q_1 / 60.0;
|
|
1401
|
-
var w = this.a1r_1;
|
|
1402
|
-
var b = this.b1r_1;
|
|
1403
|
-
var a = this.c1r_1;
|
|
1404
|
-
if (w + b >= 1) {
|
|
1405
|
-
var gray = w / (w + b);
|
|
1406
|
-
return Companion_getInstance_6().h1p(gray, gray, gray, a);
|
|
1407
|
-
}
|
|
1408
|
-
var v = 1 - b;
|
|
1409
|
-
var i = numberToInt(h);
|
|
1410
|
-
var f = (i % 2 | 0) === 1 ? 1 - (h - i) : h - i;
|
|
1411
|
-
var n = w + f * (v - w);
|
|
1412
|
-
switch (i) {
|
|
1413
|
-
case 1:
|
|
1414
|
-
return Companion_getInstance_6().h1p(n, v, w, a);
|
|
1415
|
-
case 2:
|
|
1416
|
-
return Companion_getInstance_6().h1p(w, v, n, a);
|
|
1417
|
-
case 3:
|
|
1418
|
-
return Companion_getInstance_6().h1p(w, n, v, a);
|
|
1419
|
-
case 4:
|
|
1420
|
-
return Companion_getInstance_6().h1p(n, w, v, a);
|
|
1421
|
-
case 5:
|
|
1422
|
-
return Companion_getInstance_6().h1p(v, w, n, a);
|
|
1423
|
-
default:
|
|
1424
|
-
return Companion_getInstance_6().h1p(v, n, w, a);
|
|
1425
|
-
}
|
|
1426
|
-
};
|
|
1427
|
-
protoOf(HWB).z1n = function () {
|
|
1428
|
-
return this;
|
|
1429
|
-
};
|
|
1430
|
-
protoOf(HWB).p5 = function () {
|
|
1431
|
-
// Inline function 'kotlin.floatArrayOf' call
|
|
1432
|
-
return new Float32Array([this.z1q_1, this.a1r_1, this.b1r_1, this.c1r_1]);
|
|
1433
|
-
};
|
|
1434
|
-
protoOf(HWB).toString = function () {
|
|
1435
|
-
return 'HWB(h=' + this.z1q_1 + ', w=' + this.a1r_1 + ', b=' + this.b1r_1 + ', alpha=' + this.c1r_1 + ')';
|
|
1436
|
-
};
|
|
1437
|
-
protoOf(HWB).hashCode = function () {
|
|
1438
|
-
var result = getNumberHashCode(this.z1q_1);
|
|
1439
|
-
result = imul(result, 31) + getNumberHashCode(this.a1r_1) | 0;
|
|
1440
|
-
result = imul(result, 31) + getNumberHashCode(this.b1r_1) | 0;
|
|
1441
|
-
result = imul(result, 31) + getNumberHashCode(this.c1r_1) | 0;
|
|
1442
|
-
return result;
|
|
1443
|
-
};
|
|
1444
|
-
protoOf(HWB).equals = function (other) {
|
|
1445
|
-
if (this === other)
|
|
1446
|
-
return true;
|
|
1447
|
-
if (!(other instanceof HWB))
|
|
1448
|
-
return false;
|
|
1449
|
-
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1450
|
-
if (!equals(this.z1q_1, tmp0_other_with_cast.z1q_1))
|
|
1451
|
-
return false;
|
|
1452
|
-
if (!equals(this.a1r_1, tmp0_other_with_cast.a1r_1))
|
|
1453
|
-
return false;
|
|
1454
|
-
if (!equals(this.b1r_1, tmp0_other_with_cast.b1r_1))
|
|
1455
|
-
return false;
|
|
1456
|
-
if (!equals(this.c1r_1, tmp0_other_with_cast.c1r_1))
|
|
1457
|
-
return false;
|
|
1458
|
-
return true;
|
|
1459
|
-
};
|
|
1460
801
|
function get_ICTCP_RGB_TO_LMS() {
|
|
1461
802
|
_init_properties_ICtCp_kt__7vx7or();
|
|
1462
803
|
return ICTCP_RGB_TO_LMS;
|
|
@@ -1495,43 +836,43 @@
|
|
|
1495
836
|
var ICTCP_LMS_TO_XYZ;
|
|
1496
837
|
function ICtCp() {
|
|
1497
838
|
}
|
|
1498
|
-
protoOf(ICtCp).
|
|
1499
|
-
var fo = RGBColorSpaces_getInstance().
|
|
839
|
+
protoOf(ICtCp).a1q = function () {
|
|
840
|
+
var fo = RGBColorSpaces_getInstance().q1o_1.b1q();
|
|
1500
841
|
var tmp0 = get_ICTCP_ICTCP_to_LMS();
|
|
1501
|
-
var tmp1 = this.
|
|
1502
|
-
var tmp2 = this.
|
|
842
|
+
var tmp1 = this.w1p_1;
|
|
843
|
+
var tmp2 = this.x1p_1;
|
|
1503
844
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1504
|
-
var v2 = this.
|
|
845
|
+
var v2 = this.y1p_1;
|
|
1505
846
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1506
847
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1507
848
|
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
1508
849
|
var tmp0_0 = get_ICTCP_LMS_to_RGB();
|
|
1509
|
-
var tmp1_0 = PqNonlinearity_instance.
|
|
1510
|
-
var tmp2_0 = PqNonlinearity_instance.
|
|
850
|
+
var tmp1_0 = PqNonlinearity_instance.k1q(tmp4);
|
|
851
|
+
var tmp2_0 = PqNonlinearity_instance.k1q(tmp5);
|
|
1511
852
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1512
|
-
var v2_0 = PqNonlinearity_instance.
|
|
853
|
+
var v2_0 = PqNonlinearity_instance.k1q(s);
|
|
1513
854
|
var tmp4_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 0) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 0) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 0) * v2_0;
|
|
1514
855
|
var tmp5_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 1) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 1) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 1) * v2_0;
|
|
1515
856
|
var b = Matrix__get_impl_xogbpk(tmp0_0, 0, 2) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 2) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 2) * v2_0;
|
|
1516
|
-
return RGBColorSpaces_getInstance().
|
|
857
|
+
return RGBColorSpaces_getInstance().q1o_1.s1p(fo.l1q(tmp4_0), fo.l1q(tmp5_0), fo.l1q(b), this.z1p_1);
|
|
1517
858
|
};
|
|
1518
859
|
function PqNonlinearity() {
|
|
1519
|
-
this.
|
|
1520
|
-
this.
|
|
1521
|
-
this.
|
|
1522
|
-
this.
|
|
1523
|
-
this.
|
|
1524
|
-
this.
|
|
1525
|
-
this.
|
|
1526
|
-
this.
|
|
1527
|
-
}
|
|
1528
|
-
protoOf(PqNonlinearity).
|
|
860
|
+
this.c1q_1 = 0.1593017578125;
|
|
861
|
+
this.d1q_1 = 78.84375;
|
|
862
|
+
this.e1q_1 = 0.8359375;
|
|
863
|
+
this.f1q_1 = 18.8515625;
|
|
864
|
+
this.g1q_1 = 18.6875;
|
|
865
|
+
this.h1q_1 = 10000.0;
|
|
866
|
+
this.i1q_1 = 6.277394636015326;
|
|
867
|
+
this.j1q_1 = 0.012683313515655966;
|
|
868
|
+
}
|
|
869
|
+
protoOf(PqNonlinearity).k1q = function (x) {
|
|
1529
870
|
var vp = spow(x, 0.012683313515655966);
|
|
1530
871
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
1531
872
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
1532
873
|
return 10000.0 * l;
|
|
1533
874
|
};
|
|
1534
|
-
protoOf(PqNonlinearity).
|
|
875
|
+
protoOf(PqNonlinearity).l1q = function (x) {
|
|
1535
876
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
1536
877
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
1537
878
|
};
|
|
@@ -1553,73 +894,67 @@
|
|
|
1553
894
|
ICTCP_LMS_TO_XYZ = inverse(get_ICTCP_XYZ_TO_LMS());
|
|
1554
895
|
}
|
|
1555
896
|
}
|
|
1556
|
-
function
|
|
1557
|
-
|
|
1558
|
-
this.
|
|
897
|
+
function Companion_0() {
|
|
898
|
+
Companion_instance_0 = this;
|
|
899
|
+
this.m1q_1 = LABColorSpaces_getInstance().h1o_1;
|
|
1559
900
|
}
|
|
1560
|
-
protoOf(
|
|
1561
|
-
return equals(LABColorSpaces_getInstance().
|
|
901
|
+
protoOf(Companion_0).equals = function (other) {
|
|
902
|
+
return equals(LABColorSpaces_getInstance().h1o_1, other);
|
|
1562
903
|
};
|
|
1563
|
-
protoOf(
|
|
1564
|
-
return hashCode(LABColorSpaces_getInstance().
|
|
904
|
+
protoOf(Companion_0).hashCode = function () {
|
|
905
|
+
return hashCode(LABColorSpaces_getInstance().h1o_1);
|
|
1565
906
|
};
|
|
1566
|
-
protoOf(
|
|
1567
|
-
return this.
|
|
907
|
+
protoOf(Companion_0).s1p = function (l, a, b, alpha) {
|
|
908
|
+
return this.m1q_1.s1p(l, a, b, alpha);
|
|
1568
909
|
};
|
|
1569
|
-
protoOf(
|
|
1570
|
-
return this.
|
|
910
|
+
protoOf(Companion_0).n1q = function (l, a, b, alpha) {
|
|
911
|
+
return this.m1q_1.n1q(l, a, b, alpha);
|
|
1571
912
|
};
|
|
1572
|
-
protoOf(
|
|
1573
|
-
return this.
|
|
913
|
+
protoOf(Companion_0).t1n = function () {
|
|
914
|
+
return this.m1q_1.t1n();
|
|
1574
915
|
};
|
|
1575
|
-
protoOf(
|
|
1576
|
-
return this.
|
|
916
|
+
protoOf(Companion_0).w1 = function () {
|
|
917
|
+
return this.m1q_1.w1();
|
|
1577
918
|
};
|
|
1578
|
-
protoOf(
|
|
1579
|
-
return this.
|
|
919
|
+
protoOf(Companion_0).o1n = function (color) {
|
|
920
|
+
return this.m1q_1.o1n(color);
|
|
1580
921
|
};
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
return
|
|
1586
|
-
};
|
|
1587
|
-
var Companion_instance_3;
|
|
1588
|
-
function Companion_getInstance_2() {
|
|
1589
|
-
if (Companion_instance_3 == null)
|
|
1590
|
-
new Companion_2();
|
|
1591
|
-
return Companion_instance_3;
|
|
922
|
+
var Companion_instance_0;
|
|
923
|
+
function Companion_getInstance_0() {
|
|
924
|
+
if (Companion_instance_0 == null)
|
|
925
|
+
new Companion_0();
|
|
926
|
+
return Companion_instance_0;
|
|
1592
927
|
}
|
|
1593
928
|
function LAB(l, a, b, alpha, space) {
|
|
1594
|
-
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
this.
|
|
1598
|
-
this.
|
|
1599
|
-
this.
|
|
1600
|
-
}
|
|
1601
|
-
protoOf(LAB).
|
|
1602
|
-
return this.
|
|
1603
|
-
};
|
|
1604
|
-
protoOf(LAB).
|
|
1605
|
-
return this.
|
|
1606
|
-
};
|
|
1607
|
-
protoOf(LAB).
|
|
1608
|
-
return this.
|
|
1609
|
-
};
|
|
1610
|
-
protoOf(LAB).
|
|
1611
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
1612
|
-
if (this.
|
|
1613
|
-
return xyzSpace.
|
|
1614
|
-
var fy = (this.
|
|
1615
|
-
var fz = fy - this.
|
|
1616
|
-
var fx = this.
|
|
929
|
+
Companion_getInstance_0();
|
|
930
|
+
this.j1n_1 = l;
|
|
931
|
+
this.k1n_1 = a;
|
|
932
|
+
this.l1n_1 = b;
|
|
933
|
+
this.m1n_1 = alpha;
|
|
934
|
+
this.n1n_1 = space;
|
|
935
|
+
}
|
|
936
|
+
protoOf(LAB).s1m = function () {
|
|
937
|
+
return this.m1n_1;
|
|
938
|
+
};
|
|
939
|
+
protoOf(LAB).t1m = function () {
|
|
940
|
+
return this.n1n_1;
|
|
941
|
+
};
|
|
942
|
+
protoOf(LAB).u1m = function () {
|
|
943
|
+
return this.j1n_1 === 0.0 ? Companion_getInstance_2().s1p(0.0, 0.0, 0.0, this.m1n_1) : this.b1n().u1m();
|
|
944
|
+
};
|
|
945
|
+
protoOf(LAB).b1n = function () {
|
|
946
|
+
var xyzSpace = XYZColorSpace_0(this.n1n_1.t1n());
|
|
947
|
+
if (this.j1n_1 === 0.0)
|
|
948
|
+
return xyzSpace.o1q(0.0, 0.0, 0.0);
|
|
949
|
+
var fy = (this.j1n_1 + 16) / 116.0;
|
|
950
|
+
var fz = fy - this.l1n_1 / 200.0;
|
|
951
|
+
var fx = this.k1n_1 / 500.0 + fy;
|
|
1617
952
|
var tmp;
|
|
1618
|
-
if (this.
|
|
953
|
+
if (this.j1n_1 > 8.0) {
|
|
1619
954
|
// Inline function 'kotlin.math.pow' call
|
|
1620
955
|
tmp = Math.pow(fy, 3);
|
|
1621
956
|
} else {
|
|
1622
|
-
tmp = this.
|
|
957
|
+
tmp = this.j1n_1 / 903.2962962962963;
|
|
1623
958
|
}
|
|
1624
959
|
var yr = tmp;
|
|
1625
960
|
// Inline function 'kotlin.math.pow' call
|
|
@@ -1630,13 +965,13 @@
|
|
|
1630
965
|
// Inline function 'kotlin.let' call
|
|
1631
966
|
var it_0 = Math.pow(fx, 3);
|
|
1632
967
|
var xr = it_0 > 0.008856451679035631 ? it_0 : (116 * fx - 16) / 903.2962962962963;
|
|
1633
|
-
var wp = this.
|
|
1634
|
-
return xyzSpace.
|
|
968
|
+
var wp = this.n1n_1.t1n().o1p_1;
|
|
969
|
+
return xyzSpace.n1q(xr * wp.s1q(), yr * wp.r1q_1, zr * wp.t1q(), this.m1n_1);
|
|
1635
970
|
};
|
|
1636
|
-
protoOf(LAB).
|
|
1637
|
-
var tmp0 = this.
|
|
971
|
+
protoOf(LAB).i1n = function () {
|
|
972
|
+
var tmp0 = this.k1n_1;
|
|
1638
973
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
1639
|
-
var b = this.
|
|
974
|
+
var b = this.l1n_1;
|
|
1640
975
|
// Inline function 'kotlin.math.sqrt' call
|
|
1641
976
|
var x = tmp0 * tmp0 + b * b;
|
|
1642
977
|
var c = Math.sqrt(x);
|
|
@@ -1650,24 +985,24 @@
|
|
|
1650
985
|
}
|
|
1651
986
|
var h = tmp;
|
|
1652
987
|
var h_0 = normalizeDeg_0(h);
|
|
1653
|
-
return LCHabColorSpace_0(this.
|
|
988
|
+
return LCHabColorSpace_0(this.n1n_1.t1n()).s1p(this.j1n_1, c, h_0, this.m1n_1);
|
|
1654
989
|
};
|
|
1655
|
-
protoOf(LAB).
|
|
990
|
+
protoOf(LAB).c1n = function () {
|
|
1656
991
|
return this;
|
|
1657
992
|
};
|
|
1658
|
-
protoOf(LAB).
|
|
993
|
+
protoOf(LAB).a5 = function () {
|
|
1659
994
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1660
|
-
return new Float32Array([this.
|
|
995
|
+
return new Float32Array([this.j1n_1, this.k1n_1, this.l1n_1, this.m1n_1]);
|
|
1661
996
|
};
|
|
1662
997
|
protoOf(LAB).toString = function () {
|
|
1663
|
-
return 'LAB(l=' + this.
|
|
998
|
+
return 'LAB(l=' + this.j1n_1 + ', a=' + this.k1n_1 + ', b=' + this.l1n_1 + ', alpha=' + this.m1n_1 + ', space=' + toString(this.n1n_1) + ')';
|
|
1664
999
|
};
|
|
1665
1000
|
protoOf(LAB).hashCode = function () {
|
|
1666
|
-
var result = getNumberHashCode(this.
|
|
1667
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1668
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1669
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1670
|
-
result = imul(result, 31) + hashCode(this.
|
|
1001
|
+
var result = getNumberHashCode(this.j1n_1);
|
|
1002
|
+
result = imul(result, 31) + getNumberHashCode(this.k1n_1) | 0;
|
|
1003
|
+
result = imul(result, 31) + getNumberHashCode(this.l1n_1) | 0;
|
|
1004
|
+
result = imul(result, 31) + getNumberHashCode(this.m1n_1) | 0;
|
|
1005
|
+
result = imul(result, 31) + hashCode(this.n1n_1) | 0;
|
|
1671
1006
|
return result;
|
|
1672
1007
|
};
|
|
1673
1008
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1676,27 +1011,27 @@
|
|
|
1676
1011
|
if (!(other instanceof LAB))
|
|
1677
1012
|
return false;
|
|
1678
1013
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1679
|
-
if (!equals(this.
|
|
1014
|
+
if (!equals(this.j1n_1, tmp0_other_with_cast.j1n_1))
|
|
1680
1015
|
return false;
|
|
1681
|
-
if (!equals(this.
|
|
1016
|
+
if (!equals(this.k1n_1, tmp0_other_with_cast.k1n_1))
|
|
1682
1017
|
return false;
|
|
1683
|
-
if (!equals(this.
|
|
1018
|
+
if (!equals(this.l1n_1, tmp0_other_with_cast.l1n_1))
|
|
1684
1019
|
return false;
|
|
1685
|
-
if (!equals(this.
|
|
1020
|
+
if (!equals(this.m1n_1, tmp0_other_with_cast.m1n_1))
|
|
1686
1021
|
return false;
|
|
1687
|
-
if (!equals(this.
|
|
1022
|
+
if (!equals(this.n1n_1, tmp0_other_with_cast.n1n_1))
|
|
1688
1023
|
return false;
|
|
1689
1024
|
return true;
|
|
1690
1025
|
};
|
|
1691
1026
|
function LABColorSpace() {
|
|
1692
1027
|
}
|
|
1693
1028
|
function LABColorSpace_0(whitePoint) {
|
|
1694
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1029
|
+
return whitePoint.equals(Illuminant_getInstance().c1o_1) ? LABColorSpaces_getInstance().h1o_1 : whitePoint.equals(Illuminant_getInstance().a1o_1) ? LABColorSpaces_getInstance().i1o_1 : new LABColorSpaceImpl(whitePoint);
|
|
1695
1030
|
}
|
|
1696
1031
|
function LABColorSpaces() {
|
|
1697
1032
|
LABColorSpaces_instance = this;
|
|
1698
|
-
this.
|
|
1699
|
-
this.
|
|
1033
|
+
this.h1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().c1o_1);
|
|
1034
|
+
this.i1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().a1o_1);
|
|
1700
1035
|
}
|
|
1701
1036
|
var LABColorSpaces_instance;
|
|
1702
1037
|
function LABColorSpaces_getInstance() {
|
|
@@ -1705,157 +1040,124 @@
|
|
|
1705
1040
|
return LABColorSpaces_instance;
|
|
1706
1041
|
}
|
|
1707
1042
|
function LABColorSpaceImpl(whitePoint) {
|
|
1708
|
-
this.
|
|
1709
|
-
this.
|
|
1043
|
+
this.u1q_1 = whitePoint;
|
|
1044
|
+
this.v1q_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1710
1045
|
}
|
|
1711
|
-
protoOf(LABColorSpaceImpl).
|
|
1712
|
-
return this.
|
|
1046
|
+
protoOf(LABColorSpaceImpl).t1n = function () {
|
|
1047
|
+
return this.u1q_1;
|
|
1713
1048
|
};
|
|
1714
|
-
protoOf(LABColorSpaceImpl).
|
|
1049
|
+
protoOf(LABColorSpaceImpl).w1 = function () {
|
|
1715
1050
|
return 'LAB';
|
|
1716
1051
|
};
|
|
1717
|
-
protoOf(LABColorSpaceImpl).
|
|
1718
|
-
return this.o1s_1;
|
|
1719
|
-
};
|
|
1720
|
-
protoOf(LABColorSpaceImpl).g1o = function (color) {
|
|
1052
|
+
protoOf(LABColorSpaceImpl).o1n = function (color) {
|
|
1721
1053
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1722
1054
|
var tmp;
|
|
1723
|
-
var tmp_0 = color.
|
|
1055
|
+
var tmp_0 = color.t1m();
|
|
1724
1056
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1725
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1726
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1727
|
-
tmp = color.
|
|
1057
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1n();
|
|
1058
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().c1o_1 : tmp1_elvis_lhs).equals(this.t1n())) {
|
|
1059
|
+
tmp = color.c1n();
|
|
1728
1060
|
} else {
|
|
1729
|
-
tmp = color.
|
|
1061
|
+
tmp = color.b1n().w1n(XYZColorSpace_0(this.t1n())).c1n();
|
|
1730
1062
|
}
|
|
1731
1063
|
return tmp;
|
|
1732
1064
|
};
|
|
1733
|
-
protoOf(LABColorSpaceImpl).n1o = function (components) {
|
|
1734
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1735
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1736
|
-
var size = this.m1o().m();
|
|
1737
|
-
var containsLower = size - 1 | 0;
|
|
1738
|
-
var containsArg = components.length;
|
|
1739
|
-
// Inline function 'kotlin.require' call
|
|
1740
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1741
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1742
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1743
|
-
}
|
|
1744
|
-
var tmp3 = components[0];
|
|
1745
|
-
var tmp4 = components[1];
|
|
1746
|
-
var tmp5 = components[2];
|
|
1747
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
1748
|
-
var tmp;
|
|
1749
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1750
|
-
tmp = components[3];
|
|
1751
|
-
} else {
|
|
1752
|
-
tmp = 1.0;
|
|
1753
|
-
}
|
|
1754
|
-
var p3 = tmp;
|
|
1755
|
-
return this.h1p(tmp3, tmp4, tmp5, p3);
|
|
1756
|
-
};
|
|
1757
1065
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1758
|
-
return 'LABColorSpace(' + this.
|
|
1066
|
+
return 'LABColorSpace(' + this.u1q_1.toString() + ')';
|
|
1759
1067
|
};
|
|
1760
|
-
protoOf(LABColorSpaceImpl).
|
|
1068
|
+
protoOf(LABColorSpaceImpl).s1p = function (l, a, b, alpha) {
|
|
1761
1069
|
return new LAB(l, a, b, alpha, this);
|
|
1762
1070
|
};
|
|
1763
1071
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1764
|
-
return this.
|
|
1072
|
+
return this.u1q_1.hashCode();
|
|
1765
1073
|
};
|
|
1766
1074
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1767
1075
|
var tmp;
|
|
1768
1076
|
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1769
|
-
tmp = this.
|
|
1077
|
+
tmp = this.u1q_1.equals(other.t1n());
|
|
1770
1078
|
} else {
|
|
1771
1079
|
tmp = false;
|
|
1772
1080
|
}
|
|
1773
1081
|
return tmp;
|
|
1774
1082
|
};
|
|
1775
|
-
function
|
|
1776
|
-
|
|
1777
|
-
this.
|
|
1083
|
+
function Companion_1() {
|
|
1084
|
+
Companion_instance_1 = this;
|
|
1085
|
+
this.w1q_1 = LCHabColorSpaces_getInstance().f1o_1;
|
|
1778
1086
|
}
|
|
1779
|
-
protoOf(
|
|
1780
|
-
return equals(LCHabColorSpaces_getInstance().
|
|
1781
|
-
};
|
|
1782
|
-
protoOf(Companion_3).hashCode = function () {
|
|
1783
|
-
return hashCode(LCHabColorSpaces_getInstance().n1p_1);
|
|
1784
|
-
};
|
|
1785
|
-
protoOf(Companion_3).h1p = function (l, c, h, alpha) {
|
|
1786
|
-
return this.m1p_1.h1p(l, c, h, alpha);
|
|
1087
|
+
protoOf(Companion_1).equals = function (other) {
|
|
1088
|
+
return equals(LCHabColorSpaces_getInstance().f1o_1, other);
|
|
1787
1089
|
};
|
|
1788
|
-
protoOf(
|
|
1789
|
-
return
|
|
1090
|
+
protoOf(Companion_1).hashCode = function () {
|
|
1091
|
+
return hashCode(LCHabColorSpaces_getInstance().f1o_1);
|
|
1790
1092
|
};
|
|
1791
|
-
protoOf(
|
|
1792
|
-
return this.
|
|
1093
|
+
protoOf(Companion_1).s1p = function (l, c, h, alpha) {
|
|
1094
|
+
return this.w1q_1.s1p(l, c, h, alpha);
|
|
1793
1095
|
};
|
|
1794
|
-
protoOf(
|
|
1795
|
-
return this.
|
|
1096
|
+
protoOf(Companion_1).t1n = function () {
|
|
1097
|
+
return this.w1q_1.t1n();
|
|
1796
1098
|
};
|
|
1797
|
-
protoOf(
|
|
1798
|
-
return this.
|
|
1099
|
+
protoOf(Companion_1).w1 = function () {
|
|
1100
|
+
return this.w1q_1.w1();
|
|
1799
1101
|
};
|
|
1800
|
-
protoOf(
|
|
1801
|
-
return this.
|
|
1102
|
+
protoOf(Companion_1).o1n = function (color) {
|
|
1103
|
+
return this.w1q_1.o1n(color);
|
|
1802
1104
|
};
|
|
1803
|
-
var
|
|
1804
|
-
function
|
|
1805
|
-
if (
|
|
1806
|
-
new
|
|
1807
|
-
return
|
|
1105
|
+
var Companion_instance_1;
|
|
1106
|
+
function Companion_getInstance_1() {
|
|
1107
|
+
if (Companion_instance_1 == null)
|
|
1108
|
+
new Companion_1();
|
|
1109
|
+
return Companion_instance_1;
|
|
1808
1110
|
}
|
|
1809
1111
|
function LCHab(l, c, h, alpha, space) {
|
|
1810
|
-
|
|
1811
|
-
this.
|
|
1812
|
-
this.
|
|
1813
|
-
this.
|
|
1814
|
-
this.
|
|
1815
|
-
this.
|
|
1112
|
+
Companion_getInstance_1();
|
|
1113
|
+
this.a1p_1 = l;
|
|
1114
|
+
this.b1p_1 = c;
|
|
1115
|
+
this.c1p_1 = h;
|
|
1116
|
+
this.d1p_1 = alpha;
|
|
1117
|
+
this.e1p_1 = space;
|
|
1816
1118
|
}
|
|
1817
|
-
protoOf(LCHab).
|
|
1818
|
-
return this.
|
|
1119
|
+
protoOf(LCHab).m1p = function () {
|
|
1120
|
+
return this.c1p_1;
|
|
1819
1121
|
};
|
|
1820
|
-
protoOf(LCHab).
|
|
1821
|
-
return this.
|
|
1122
|
+
protoOf(LCHab).s1m = function () {
|
|
1123
|
+
return this.d1p_1;
|
|
1822
1124
|
};
|
|
1823
|
-
protoOf(LCHab).
|
|
1824
|
-
return this.
|
|
1125
|
+
protoOf(LCHab).t1m = function () {
|
|
1126
|
+
return this.e1p_1;
|
|
1825
1127
|
};
|
|
1826
|
-
protoOf(LCHab).
|
|
1827
|
-
return this.
|
|
1128
|
+
protoOf(LCHab).u1m = function () {
|
|
1129
|
+
return this.c1n().u1m();
|
|
1828
1130
|
};
|
|
1829
|
-
protoOf(LCHab).
|
|
1830
|
-
return this.
|
|
1131
|
+
protoOf(LCHab).b1n = function () {
|
|
1132
|
+
return this.c1n().b1n();
|
|
1831
1133
|
};
|
|
1832
|
-
protoOf(LCHab).
|
|
1833
|
-
var tmp0 = this.
|
|
1134
|
+
protoOf(LCHab).c1n = function () {
|
|
1135
|
+
var tmp0 = this.b1p_1;
|
|
1834
1136
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1835
|
-
var h = this.
|
|
1137
|
+
var h = this.c1p_1;
|
|
1836
1138
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1837
1139
|
// Inline function 'kotlin.math.cos' call
|
|
1838
1140
|
var a = tmp0 * Math.cos(hDegrees);
|
|
1839
1141
|
// Inline function 'kotlin.math.sin' call
|
|
1840
1142
|
var b = tmp0 * Math.sin(hDegrees);
|
|
1841
|
-
return LABColorSpace_0(this.
|
|
1143
|
+
return LABColorSpace_0(this.e1p_1.t1n()).s1p(this.a1p_1, a, b, this.d1p_1);
|
|
1842
1144
|
};
|
|
1843
|
-
protoOf(LCHab).
|
|
1145
|
+
protoOf(LCHab).i1n = function () {
|
|
1844
1146
|
return this;
|
|
1845
1147
|
};
|
|
1846
|
-
protoOf(LCHab).
|
|
1148
|
+
protoOf(LCHab).a5 = function () {
|
|
1847
1149
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1848
|
-
return new Float32Array([this.
|
|
1150
|
+
return new Float32Array([this.a1p_1, this.b1p_1, this.c1p_1, this.d1p_1]);
|
|
1849
1151
|
};
|
|
1850
1152
|
protoOf(LCHab).toString = function () {
|
|
1851
|
-
return 'LCHab(l=' + this.
|
|
1153
|
+
return 'LCHab(l=' + this.a1p_1 + ', c=' + this.b1p_1 + ', h=' + this.c1p_1 + ', alpha=' + this.d1p_1 + ', space=' + toString(this.e1p_1) + ')';
|
|
1852
1154
|
};
|
|
1853
1155
|
protoOf(LCHab).hashCode = function () {
|
|
1854
|
-
var result = getNumberHashCode(this.
|
|
1855
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1856
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1857
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1858
|
-
result = imul(result, 31) + hashCode(this.
|
|
1156
|
+
var result = getNumberHashCode(this.a1p_1);
|
|
1157
|
+
result = imul(result, 31) + getNumberHashCode(this.b1p_1) | 0;
|
|
1158
|
+
result = imul(result, 31) + getNumberHashCode(this.c1p_1) | 0;
|
|
1159
|
+
result = imul(result, 31) + getNumberHashCode(this.d1p_1) | 0;
|
|
1160
|
+
result = imul(result, 31) + hashCode(this.e1p_1) | 0;
|
|
1859
1161
|
return result;
|
|
1860
1162
|
};
|
|
1861
1163
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1864,27 +1166,27 @@
|
|
|
1864
1166
|
if (!(other instanceof LCHab))
|
|
1865
1167
|
return false;
|
|
1866
1168
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1867
|
-
if (!equals(this.
|
|
1169
|
+
if (!equals(this.a1p_1, tmp0_other_with_cast.a1p_1))
|
|
1868
1170
|
return false;
|
|
1869
|
-
if (!equals(this.
|
|
1171
|
+
if (!equals(this.b1p_1, tmp0_other_with_cast.b1p_1))
|
|
1870
1172
|
return false;
|
|
1871
|
-
if (!equals(this.
|
|
1173
|
+
if (!equals(this.c1p_1, tmp0_other_with_cast.c1p_1))
|
|
1872
1174
|
return false;
|
|
1873
|
-
if (!equals(this.
|
|
1175
|
+
if (!equals(this.d1p_1, tmp0_other_with_cast.d1p_1))
|
|
1874
1176
|
return false;
|
|
1875
|
-
if (!equals(this.
|
|
1177
|
+
if (!equals(this.e1p_1, tmp0_other_with_cast.e1p_1))
|
|
1876
1178
|
return false;
|
|
1877
1179
|
return true;
|
|
1878
1180
|
};
|
|
1879
1181
|
function LCHabColorSpace() {
|
|
1880
1182
|
}
|
|
1881
1183
|
function LCHabColorSpace_0(whitePoint) {
|
|
1882
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1184
|
+
return whitePoint.equals(Illuminant_getInstance().c1o_1) ? LCHabColorSpaces_getInstance().f1o_1 : whitePoint.equals(Illuminant_getInstance().a1o_1) ? LCHabColorSpaces_getInstance().g1o_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1883
1185
|
}
|
|
1884
1186
|
function LCHabColorSpaces() {
|
|
1885
1187
|
LCHabColorSpaces_instance = this;
|
|
1886
|
-
this.
|
|
1887
|
-
this.
|
|
1188
|
+
this.f1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().c1o_1);
|
|
1189
|
+
this.g1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().a1o_1);
|
|
1888
1190
|
}
|
|
1889
1191
|
var LCHabColorSpaces_instance;
|
|
1890
1192
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1893,338 +1195,64 @@
|
|
|
1893
1195
|
return LCHabColorSpaces_instance;
|
|
1894
1196
|
}
|
|
1895
1197
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1896
|
-
this.
|
|
1897
|
-
this.
|
|
1198
|
+
this.x1q_1 = whitePoint;
|
|
1199
|
+
this.y1q_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)]);
|
|
1898
1200
|
}
|
|
1899
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1900
|
-
return this.
|
|
1201
|
+
protoOf(LCHabColorSpaceImpl).t1n = function () {
|
|
1202
|
+
return this.x1q_1;
|
|
1901
1203
|
};
|
|
1902
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1204
|
+
protoOf(LCHabColorSpaceImpl).w1 = function () {
|
|
1903
1205
|
return 'LCHab';
|
|
1904
1206
|
};
|
|
1905
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1906
|
-
return this.q1s_1;
|
|
1907
|
-
};
|
|
1908
|
-
protoOf(LCHabColorSpaceImpl).g1o = function (color) {
|
|
1207
|
+
protoOf(LCHabColorSpaceImpl).o1n = function (color) {
|
|
1909
1208
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1910
1209
|
var tmp;
|
|
1911
|
-
var tmp_0 = color.
|
|
1210
|
+
var tmp_0 = color.t1m();
|
|
1912
1211
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1913
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1914
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1915
|
-
tmp = color.
|
|
1212
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1n();
|
|
1213
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().c1o_1 : tmp1_elvis_lhs).equals(this.t1n())) {
|
|
1214
|
+
tmp = color.i1n();
|
|
1916
1215
|
} else {
|
|
1917
|
-
tmp = color.
|
|
1216
|
+
tmp = color.b1n().w1n(XYZColorSpace_0(this.t1n())).i1n();
|
|
1918
1217
|
}
|
|
1919
1218
|
return tmp;
|
|
1920
1219
|
};
|
|
1921
|
-
protoOf(LCHabColorSpaceImpl).n1o = function (components) {
|
|
1922
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1923
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1924
|
-
var size = this.m1o().m();
|
|
1925
|
-
var containsLower = size - 1 | 0;
|
|
1926
|
-
var containsArg = components.length;
|
|
1927
|
-
// Inline function 'kotlin.require' call
|
|
1928
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1929
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1930
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1931
|
-
}
|
|
1932
|
-
var tmp3 = components[0];
|
|
1933
|
-
var tmp4 = components[1];
|
|
1934
|
-
var tmp5 = components[2];
|
|
1935
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
1936
|
-
var tmp;
|
|
1937
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1938
|
-
tmp = components[3];
|
|
1939
|
-
} else {
|
|
1940
|
-
tmp = 1.0;
|
|
1941
|
-
}
|
|
1942
|
-
var p3 = tmp;
|
|
1943
|
-
return this.h1p(tmp3, tmp4, tmp5, p3);
|
|
1944
|
-
};
|
|
1945
1220
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1946
|
-
return 'LCHabColorSpace(' + this.
|
|
1221
|
+
return 'LCHabColorSpace(' + this.x1q_1.toString() + ')';
|
|
1947
1222
|
};
|
|
1948
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1223
|
+
protoOf(LCHabColorSpaceImpl).s1p = function (l, c, h, alpha) {
|
|
1949
1224
|
return new LCHab(l, c, h, alpha, this);
|
|
1950
1225
|
};
|
|
1951
1226
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1952
|
-
return this.
|
|
1227
|
+
return this.x1q_1.hashCode();
|
|
1953
1228
|
};
|
|
1954
1229
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1955
1230
|
var tmp;
|
|
1956
1231
|
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
1957
|
-
tmp = this.
|
|
1232
|
+
tmp = this.x1q_1.equals(other.t1n());
|
|
1958
1233
|
} else {
|
|
1959
1234
|
tmp = false;
|
|
1960
1235
|
}
|
|
1961
1236
|
return tmp;
|
|
1962
1237
|
};
|
|
1963
|
-
function
|
|
1964
|
-
Companion_instance_5 = this;
|
|
1965
|
-
this.q1p_1 = threeComponentInfo('l', 0.0, 1.0, 'a', -0.4, 0.4, 'b', -0.4, 0.4);
|
|
1966
|
-
}
|
|
1967
|
-
protoOf(Companion_4).l2 = function () {
|
|
1968
|
-
return 'Oklab';
|
|
1969
|
-
};
|
|
1970
|
-
protoOf(Companion_4).m1o = function () {
|
|
1971
|
-
return this.q1p_1;
|
|
1972
|
-
};
|
|
1973
|
-
protoOf(Companion_4).g1o = function (color) {
|
|
1974
|
-
return color.a1o();
|
|
1975
|
-
};
|
|
1976
|
-
protoOf(Companion_4).n1o = function (components) {
|
|
1977
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1978
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1979
|
-
var size = this.m1o().m();
|
|
1980
|
-
var containsLower = size - 1 | 0;
|
|
1981
|
-
var containsArg = components.length;
|
|
1982
|
-
// Inline function 'kotlin.require' call
|
|
1983
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1984
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1985
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1986
|
-
}
|
|
1987
|
-
var tmp2 = components[0];
|
|
1988
|
-
var tmp3 = components[1];
|
|
1989
|
-
var tmp4 = components[2];
|
|
1990
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
1991
|
-
var tmp;
|
|
1992
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1993
|
-
tmp = components[3];
|
|
1994
|
-
} else {
|
|
1995
|
-
tmp = 1.0;
|
|
1996
|
-
}
|
|
1997
|
-
var p3 = tmp;
|
|
1998
|
-
return new Oklab(tmp2, tmp3, tmp4, p3);
|
|
1999
|
-
};
|
|
2000
|
-
var Companion_instance_5;
|
|
2001
|
-
function Companion_getInstance_4() {
|
|
2002
|
-
if (Companion_instance_5 == null)
|
|
2003
|
-
new Companion_4();
|
|
2004
|
-
return Companion_instance_5;
|
|
1238
|
+
function Oklab() {
|
|
2005
1239
|
}
|
|
2006
|
-
function
|
|
2007
|
-
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2008
|
-
Oklab.call($this, numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
2009
|
-
return $this;
|
|
1240
|
+
function Oklch() {
|
|
2010
1241
|
}
|
|
2011
|
-
function Oklab_init_$Create$(l, a, b, alpha) {
|
|
2012
|
-
return Oklab_init_$Init$(l, a, b, alpha, objectCreate(protoOf(Oklab)));
|
|
2013
|
-
}
|
|
2014
|
-
function Oklab(l, a, b, alpha) {
|
|
2015
|
-
Companion_getInstance_4();
|
|
2016
|
-
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2017
|
-
this.c1o_1 = l;
|
|
2018
|
-
this.d1o_1 = a;
|
|
2019
|
-
this.e1o_1 = b;
|
|
2020
|
-
this.f1o_1 = alpha;
|
|
2021
|
-
}
|
|
2022
|
-
protoOf(Oklab).d1n = function () {
|
|
2023
|
-
return this.f1o_1;
|
|
2024
|
-
};
|
|
2025
|
-
protoOf(Oklab).e1n = function () {
|
|
2026
|
-
return Companion_getInstance_4();
|
|
2027
|
-
};
|
|
2028
|
-
protoOf(Oklab).f1n = function () {
|
|
2029
|
-
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2030
|
-
var ll = this.c1o_1 + 0.3963377774 * this.d1o_1 + 0.2158037573 * this.e1o_1;
|
|
2031
|
-
var mm = this.c1o_1 - 0.1055613458 * this.d1o_1 - 0.0638541728 * this.e1o_1;
|
|
2032
|
-
var ss = this.c1o_1 - 0.0894841775 * this.d1o_1 - 1.291485548 * this.e1o_1;
|
|
2033
|
-
var l = ll * ll * ll;
|
|
2034
|
-
var m = mm * mm * mm;
|
|
2035
|
-
var s = ss * ss * ss;
|
|
2036
|
-
var r = +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
2037
|
-
var g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
2038
|
-
var b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
2039
|
-
var f = Companion_getInstance_6().v1r();
|
|
2040
|
-
return Companion_getInstance_6().h1p(f.f1s(r), f.f1s(g), f.f1s(b), this.f1o_1);
|
|
2041
|
-
};
|
|
2042
|
-
protoOf(Oklab).m1n = function () {
|
|
2043
|
-
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2044
|
-
var ll = this.c1o_1 + 0.3963377774 * this.d1o_1 + 0.2158037573 * this.e1o_1;
|
|
2045
|
-
var mm = this.c1o_1 - 0.1055613458 * this.d1o_1 - 0.0638541728 * this.e1o_1;
|
|
2046
|
-
var ss = this.c1o_1 - 0.0894841775 * this.d1o_1 - 1.291485548 * this.e1o_1;
|
|
2047
|
-
var l = ll * ll * ll;
|
|
2048
|
-
var m = mm * mm * mm;
|
|
2049
|
-
var s = ss * ss * ss;
|
|
2050
|
-
return Companion_getInstance_8().g1s(+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.f1o_1);
|
|
2051
|
-
};
|
|
2052
|
-
protoOf(Oklab).b1o = function () {
|
|
2053
|
-
var tmp0 = this.d1o_1;
|
|
2054
|
-
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
2055
|
-
var b = this.e1o_1;
|
|
2056
|
-
// Inline function 'kotlin.math.sqrt' call
|
|
2057
|
-
var x = tmp0 * tmp0 + b * b;
|
|
2058
|
-
var c = Math.sqrt(x);
|
|
2059
|
-
var tmp;
|
|
2060
|
-
if (c > -1.0E-7 && c < 1.0E-7) {
|
|
2061
|
-
tmp = NaN;
|
|
2062
|
-
} else {
|
|
2063
|
-
// Inline function 'kotlin.math.atan2' call
|
|
2064
|
-
var tmp$ret$1 = Math.atan2(b, tmp0);
|
|
2065
|
-
tmp = radToDeg(tmp$ret$1);
|
|
2066
|
-
}
|
|
2067
|
-
var h = tmp;
|
|
2068
|
-
var h_0 = normalizeDeg_0(h);
|
|
2069
|
-
return new Oklch(this.c1o_1, c, h_0, this.f1o_1);
|
|
2070
|
-
};
|
|
2071
|
-
protoOf(Oklab).a1o = function () {
|
|
2072
|
-
return this;
|
|
2073
|
-
};
|
|
2074
|
-
protoOf(Oklab).p5 = function () {
|
|
2075
|
-
// Inline function 'kotlin.floatArrayOf' call
|
|
2076
|
-
return new Float32Array([this.c1o_1, this.d1o_1, this.e1o_1, this.f1o_1]);
|
|
2077
|
-
};
|
|
2078
|
-
protoOf(Oklab).toString = function () {
|
|
2079
|
-
return 'Oklab(l=' + this.c1o_1 + ', a=' + this.d1o_1 + ', b=' + this.e1o_1 + ', alpha=' + this.f1o_1 + ')';
|
|
2080
|
-
};
|
|
2081
|
-
protoOf(Oklab).hashCode = function () {
|
|
2082
|
-
var result = getNumberHashCode(this.c1o_1);
|
|
2083
|
-
result = imul(result, 31) + getNumberHashCode(this.d1o_1) | 0;
|
|
2084
|
-
result = imul(result, 31) + getNumberHashCode(this.e1o_1) | 0;
|
|
2085
|
-
result = imul(result, 31) + getNumberHashCode(this.f1o_1) | 0;
|
|
2086
|
-
return result;
|
|
2087
|
-
};
|
|
2088
|
-
protoOf(Oklab).equals = function (other) {
|
|
2089
|
-
if (this === other)
|
|
2090
|
-
return true;
|
|
2091
|
-
if (!(other instanceof Oklab))
|
|
2092
|
-
return false;
|
|
2093
|
-
var tmp0_other_with_cast = other instanceof Oklab ? other : THROW_CCE();
|
|
2094
|
-
if (!equals(this.c1o_1, tmp0_other_with_cast.c1o_1))
|
|
2095
|
-
return false;
|
|
2096
|
-
if (!equals(this.d1o_1, tmp0_other_with_cast.d1o_1))
|
|
2097
|
-
return false;
|
|
2098
|
-
if (!equals(this.e1o_1, tmp0_other_with_cast.e1o_1))
|
|
2099
|
-
return false;
|
|
2100
|
-
if (!equals(this.f1o_1, tmp0_other_with_cast.f1o_1))
|
|
2101
|
-
return false;
|
|
2102
|
-
return true;
|
|
2103
|
-
};
|
|
2104
|
-
function Companion_5() {
|
|
2105
|
-
Companion_instance_6 = this;
|
|
2106
|
-
this.r1p_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)]);
|
|
2107
|
-
}
|
|
2108
|
-
protoOf(Companion_5).l2 = function () {
|
|
2109
|
-
return 'Oklch';
|
|
2110
|
-
};
|
|
2111
|
-
protoOf(Companion_5).m1o = function () {
|
|
2112
|
-
return this.r1p_1;
|
|
2113
|
-
};
|
|
2114
|
-
protoOf(Companion_5).g1o = function (color) {
|
|
2115
|
-
return color.b1o();
|
|
2116
|
-
};
|
|
2117
|
-
protoOf(Companion_5).n1o = function (components) {
|
|
2118
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2119
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2120
|
-
var size = this.m1o().m();
|
|
2121
|
-
var containsLower = size - 1 | 0;
|
|
2122
|
-
var containsArg = components.length;
|
|
2123
|
-
// Inline function 'kotlin.require' call
|
|
2124
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2125
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2126
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2127
|
-
}
|
|
2128
|
-
var tmp2 = components[0];
|
|
2129
|
-
var tmp3 = components[1];
|
|
2130
|
-
var tmp4 = components[2];
|
|
2131
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
2132
|
-
var tmp;
|
|
2133
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2134
|
-
tmp = components[3];
|
|
2135
|
-
} else {
|
|
2136
|
-
tmp = 1.0;
|
|
2137
|
-
}
|
|
2138
|
-
var p3 = tmp;
|
|
2139
|
-
return new Oklch(tmp2, tmp3, tmp4, p3);
|
|
2140
|
-
};
|
|
2141
|
-
var Companion_instance_6;
|
|
2142
|
-
function Companion_getInstance_5() {
|
|
2143
|
-
if (Companion_instance_6 == null)
|
|
2144
|
-
new Companion_5();
|
|
2145
|
-
return Companion_instance_6;
|
|
2146
|
-
}
|
|
2147
|
-
function Oklch(l, c, h, alpha) {
|
|
2148
|
-
Companion_getInstance_5();
|
|
2149
|
-
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2150
|
-
this.d1r_1 = l;
|
|
2151
|
-
this.e1r_1 = c;
|
|
2152
|
-
this.f1r_1 = h;
|
|
2153
|
-
this.g1r_1 = alpha;
|
|
2154
|
-
}
|
|
2155
|
-
protoOf(Oklch).h1r = function () {
|
|
2156
|
-
return this.f1r_1;
|
|
2157
|
-
};
|
|
2158
|
-
protoOf(Oklch).d1n = function () {
|
|
2159
|
-
return this.g1r_1;
|
|
2160
|
-
};
|
|
2161
|
-
protoOf(Oklch).e1n = function () {
|
|
2162
|
-
return Companion_getInstance_5();
|
|
2163
|
-
};
|
|
2164
|
-
protoOf(Oklch).f1n = function () {
|
|
2165
|
-
return this.a1o().f1n();
|
|
2166
|
-
};
|
|
2167
|
-
protoOf(Oklch).m1n = function () {
|
|
2168
|
-
return this.a1o().m1n();
|
|
2169
|
-
};
|
|
2170
|
-
protoOf(Oklch).a1o = function () {
|
|
2171
|
-
var tmp0 = this.e1r_1;
|
|
2172
|
-
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
2173
|
-
var h = this.f1r_1;
|
|
2174
|
-
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
2175
|
-
// Inline function 'kotlin.math.cos' call
|
|
2176
|
-
var a = tmp0 * Math.cos(hDegrees);
|
|
2177
|
-
// Inline function 'kotlin.math.sin' call
|
|
2178
|
-
var b = tmp0 * Math.sin(hDegrees);
|
|
2179
|
-
return new Oklab(this.d1r_1, a, b, this.g1r_1);
|
|
2180
|
-
};
|
|
2181
|
-
protoOf(Oklch).b1o = function () {
|
|
2182
|
-
return this;
|
|
2183
|
-
};
|
|
2184
|
-
protoOf(Oklch).p5 = function () {
|
|
2185
|
-
// Inline function 'kotlin.floatArrayOf' call
|
|
2186
|
-
return new Float32Array([this.d1r_1, this.e1r_1, this.f1r_1, this.g1r_1]);
|
|
2187
|
-
};
|
|
2188
|
-
protoOf(Oklch).toString = function () {
|
|
2189
|
-
return 'Oklch(l=' + this.d1r_1 + ', c=' + this.e1r_1 + ', h=' + this.f1r_1 + ', alpha=' + this.g1r_1 + ')';
|
|
2190
|
-
};
|
|
2191
|
-
protoOf(Oklch).hashCode = function () {
|
|
2192
|
-
var result = getNumberHashCode(this.d1r_1);
|
|
2193
|
-
result = imul(result, 31) + getNumberHashCode(this.e1r_1) | 0;
|
|
2194
|
-
result = imul(result, 31) + getNumberHashCode(this.f1r_1) | 0;
|
|
2195
|
-
result = imul(result, 31) + getNumberHashCode(this.g1r_1) | 0;
|
|
2196
|
-
return result;
|
|
2197
|
-
};
|
|
2198
|
-
protoOf(Oklch).equals = function (other) {
|
|
2199
|
-
if (this === other)
|
|
2200
|
-
return true;
|
|
2201
|
-
if (!(other instanceof Oklch))
|
|
2202
|
-
return false;
|
|
2203
|
-
var tmp0_other_with_cast = other instanceof Oklch ? other : THROW_CCE();
|
|
2204
|
-
if (!equals(this.d1r_1, tmp0_other_with_cast.d1r_1))
|
|
2205
|
-
return false;
|
|
2206
|
-
if (!equals(this.e1r_1, tmp0_other_with_cast.e1r_1))
|
|
2207
|
-
return false;
|
|
2208
|
-
if (!equals(this.f1r_1, tmp0_other_with_cast.f1r_1))
|
|
2209
|
-
return false;
|
|
2210
|
-
if (!equals(this.g1r_1, tmp0_other_with_cast.g1r_1))
|
|
2211
|
-
return false;
|
|
2212
|
-
return true;
|
|
2213
|
-
};
|
|
2214
1242
|
function GammaTransferFunctions(gamma) {
|
|
2215
|
-
this.
|
|
1243
|
+
this.z1q_1 = gamma;
|
|
2216
1244
|
}
|
|
2217
|
-
protoOf(GammaTransferFunctions).
|
|
2218
|
-
return spow(x, this.
|
|
1245
|
+
protoOf(GammaTransferFunctions).k1q = function (x) {
|
|
1246
|
+
return spow(x, this.z1q_1);
|
|
2219
1247
|
};
|
|
2220
|
-
protoOf(GammaTransferFunctions).
|
|
2221
|
-
return spow(x, 1.0 / this.
|
|
1248
|
+
protoOf(GammaTransferFunctions).l1q = function (x) {
|
|
1249
|
+
return spow(x, 1.0 / this.z1q_1);
|
|
2222
1250
|
};
|
|
2223
1251
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
2224
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
1252
|
+
return 'GammaTransferFunctions(gamma=' + this.z1q_1 + ')';
|
|
2225
1253
|
};
|
|
2226
1254
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2227
|
-
return getNumberHashCode(this.
|
|
1255
|
+
return getNumberHashCode(this.z1q_1);
|
|
2228
1256
|
};
|
|
2229
1257
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2230
1258
|
if (this === other)
|
|
@@ -2232,16 +1260,16 @@
|
|
|
2232
1260
|
if (!(other instanceof GammaTransferFunctions))
|
|
2233
1261
|
return false;
|
|
2234
1262
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2235
|
-
if (!equals(this.
|
|
1263
|
+
if (!equals(this.z1q_1, tmp0_other_with_cast.z1q_1))
|
|
2236
1264
|
return false;
|
|
2237
1265
|
return true;
|
|
2238
1266
|
};
|
|
2239
1267
|
function LinearTransferFunctions() {
|
|
2240
1268
|
}
|
|
2241
|
-
protoOf(LinearTransferFunctions).
|
|
1269
|
+
protoOf(LinearTransferFunctions).k1q = function (x) {
|
|
2242
1270
|
return x;
|
|
2243
1271
|
};
|
|
2244
|
-
protoOf(LinearTransferFunctions).
|
|
1272
|
+
protoOf(LinearTransferFunctions).l1q = function (x) {
|
|
2245
1273
|
return x;
|
|
2246
1274
|
};
|
|
2247
1275
|
var LinearTransferFunctions_instance;
|
|
@@ -2250,90 +1278,78 @@
|
|
|
2250
1278
|
}
|
|
2251
1279
|
function RGBColorSpace() {
|
|
2252
1280
|
}
|
|
2253
|
-
function
|
|
2254
|
-
|
|
2255
|
-
this.
|
|
1281
|
+
function Companion_2() {
|
|
1282
|
+
Companion_instance_2 = this;
|
|
1283
|
+
this.r1p_1 = RGBColorSpaces_getInstance().j1o_1;
|
|
2256
1284
|
}
|
|
2257
|
-
protoOf(
|
|
2258
|
-
return equals(RGBColorSpaces_getInstance().
|
|
2259
|
-
};
|
|
2260
|
-
protoOf(Companion_6).hashCode = function () {
|
|
2261
|
-
return hashCode(RGBColorSpaces_getInstance().s1p_1);
|
|
2262
|
-
};
|
|
2263
|
-
protoOf(Companion_6).h1p = function (r, g, b, alpha) {
|
|
2264
|
-
return this.f1p_1.h1p(r, g, b, alpha);
|
|
2265
|
-
};
|
|
2266
|
-
protoOf(Companion_6).g1s = function (r, g, b, alpha) {
|
|
2267
|
-
return this.f1p_1.g1s(r, g, b, alpha);
|
|
2268
|
-
};
|
|
2269
|
-
protoOf(Companion_6).g1p = function (hex) {
|
|
2270
|
-
return this.f1p_1.g1p(hex);
|
|
1285
|
+
protoOf(Companion_2).equals = function (other) {
|
|
1286
|
+
return equals(RGBColorSpaces_getInstance().j1o_1, other);
|
|
2271
1287
|
};
|
|
2272
|
-
protoOf(
|
|
2273
|
-
return
|
|
1288
|
+
protoOf(Companion_2).hashCode = function () {
|
|
1289
|
+
return hashCode(RGBColorSpaces_getInstance().j1o_1);
|
|
2274
1290
|
};
|
|
2275
|
-
protoOf(
|
|
2276
|
-
return this.
|
|
1291
|
+
protoOf(Companion_2).s1p = function (r, g, b, alpha) {
|
|
1292
|
+
return this.r1p_1.s1p(r, g, b, alpha);
|
|
2277
1293
|
};
|
|
2278
|
-
protoOf(
|
|
2279
|
-
return this.
|
|
1294
|
+
protoOf(Companion_2).n1q = function (r, g, b, alpha) {
|
|
1295
|
+
return this.r1p_1.n1q(r, g, b, alpha);
|
|
2280
1296
|
};
|
|
2281
|
-
protoOf(
|
|
2282
|
-
return this.
|
|
1297
|
+
protoOf(Companion_2).b1q = function () {
|
|
1298
|
+
return this.r1p_1.b1q();
|
|
2283
1299
|
};
|
|
2284
|
-
protoOf(
|
|
2285
|
-
return this.
|
|
1300
|
+
protoOf(Companion_2).a1r = function () {
|
|
1301
|
+
return this.r1p_1.a1r();
|
|
2286
1302
|
};
|
|
2287
|
-
protoOf(
|
|
2288
|
-
return this.
|
|
1303
|
+
protoOf(Companion_2).b1r = function () {
|
|
1304
|
+
return this.r1p_1.b1r();
|
|
2289
1305
|
};
|
|
2290
|
-
protoOf(
|
|
2291
|
-
return this.
|
|
1306
|
+
protoOf(Companion_2).t1n = function () {
|
|
1307
|
+
return this.r1p_1.t1n();
|
|
2292
1308
|
};
|
|
2293
|
-
protoOf(
|
|
2294
|
-
return this.
|
|
1309
|
+
protoOf(Companion_2).w1 = function () {
|
|
1310
|
+
return this.r1p_1.w1();
|
|
2295
1311
|
};
|
|
2296
|
-
protoOf(
|
|
2297
|
-
return this.
|
|
1312
|
+
protoOf(Companion_2).o1n = function (color) {
|
|
1313
|
+
return this.r1p_1.o1n(color);
|
|
2298
1314
|
};
|
|
2299
|
-
var
|
|
2300
|
-
function
|
|
2301
|
-
if (
|
|
2302
|
-
new
|
|
2303
|
-
return
|
|
1315
|
+
var Companion_instance_2;
|
|
1316
|
+
function Companion_getInstance_2() {
|
|
1317
|
+
if (Companion_instance_2 == null)
|
|
1318
|
+
new Companion_2();
|
|
1319
|
+
return Companion_instance_2;
|
|
2304
1320
|
}
|
|
2305
1321
|
function RGB(r, g, b, alpha, space) {
|
|
2306
|
-
|
|
2307
|
-
this.
|
|
2308
|
-
this.
|
|
2309
|
-
this.
|
|
2310
|
-
this.
|
|
2311
|
-
this.
|
|
1322
|
+
Companion_getInstance_2();
|
|
1323
|
+
this.w1m_1 = r;
|
|
1324
|
+
this.x1m_1 = g;
|
|
1325
|
+
this.y1m_1 = b;
|
|
1326
|
+
this.z1m_1 = alpha;
|
|
1327
|
+
this.a1n_1 = space;
|
|
2312
1328
|
}
|
|
2313
|
-
protoOf(RGB).
|
|
2314
|
-
return this.
|
|
1329
|
+
protoOf(RGB).s1m = function () {
|
|
1330
|
+
return this.z1m_1;
|
|
2315
1331
|
};
|
|
2316
|
-
protoOf(RGB).
|
|
2317
|
-
return this.
|
|
1332
|
+
protoOf(RGB).t1m = function () {
|
|
1333
|
+
return this.a1n_1;
|
|
2318
1334
|
};
|
|
2319
|
-
protoOf(RGB).
|
|
1335
|
+
protoOf(RGB).v1o = function () {
|
|
2320
1336
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2321
|
-
var $this$toSRGB = this.
|
|
2322
|
-
return _RGBInt___init__impl__lqova7_1($this$toSRGB.
|
|
1337
|
+
var $this$toSRGB = this.c1r(SRGB_getInstance());
|
|
1338
|
+
return _RGBInt___init__impl__lqova7_1($this$toSRGB.w1m_1, $this$toSRGB.x1m_1, $this$toSRGB.y1m_1, nanToOne($this$toSRGB.z1m_1));
|
|
2323
1339
|
};
|
|
2324
|
-
protoOf(RGB).
|
|
2325
|
-
var f = SRGB_getInstance().
|
|
2326
|
-
return equals(this.
|
|
1340
|
+
protoOf(RGB).c1r = function (space) {
|
|
1341
|
+
var f = SRGB_getInstance().b1q();
|
|
1342
|
+
return equals(this.a1n_1, space) ? this : equals(this.a1n_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().k1o_1) ? space.s1p(f.k1q(this.w1m_1), f.k1q(this.x1m_1), f.k1q(this.y1m_1), this.z1m_1) : equals(this.a1n_1, RGBColorSpaces_getInstance().k1o_1) && equals(space, SRGB_getInstance()) ? space.s1p(f.l1q(this.w1m_1), f.l1q(this.x1m_1), f.l1q(this.y1m_1), this.z1m_1) : this.b1n().e1r(space);
|
|
2327
1343
|
};
|
|
2328
|
-
protoOf(RGB).
|
|
1344
|
+
protoOf(RGB).v1m = function () {
|
|
2329
1345
|
var tmp$ret$3;
|
|
2330
1346
|
$l$block: {
|
|
2331
1347
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2332
1348
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2333
|
-
var $this$toSRGB = this.
|
|
2334
|
-
var r = $this$toSRGB.
|
|
2335
|
-
var g = $this$toSRGB.
|
|
2336
|
-
var b = $this$toSRGB.
|
|
1349
|
+
var $this$toSRGB = this.c1r(SRGB_getInstance());
|
|
1350
|
+
var r = $this$toSRGB.w1m_1;
|
|
1351
|
+
var g = $this$toSRGB.x1m_1;
|
|
1352
|
+
var b = $this$toSRGB.y1m_1;
|
|
2337
1353
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2338
1354
|
var min = Math.min(r, g, b);
|
|
2339
1355
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -2343,77 +1359,39 @@
|
|
|
2343
1359
|
var h_0 = normalizeDeg(h);
|
|
2344
1360
|
var l = (min + max) / 2.0;
|
|
2345
1361
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2346
|
-
tmp$ret$3 = new HSL(h_0, s, l, this.
|
|
1362
|
+
tmp$ret$3 = new HSL(h_0, s, l, this.z1m_1);
|
|
2347
1363
|
break $l$block;
|
|
2348
1364
|
}
|
|
2349
1365
|
return tmp$ret$3;
|
|
2350
1366
|
};
|
|
2351
|
-
protoOf(RGB).
|
|
2352
|
-
var f = this.
|
|
2353
|
-
var tmp0 = _Matrix___init__impl__q3kp4w(this.
|
|
2354
|
-
var tmp1 = f.
|
|
2355
|
-
var tmp2 = f.
|
|
1367
|
+
protoOf(RGB).b1n = function () {
|
|
1368
|
+
var f = this.a1n_1.b1q();
|
|
1369
|
+
var tmp0 = _Matrix___init__impl__q3kp4w(this.a1n_1.a1r());
|
|
1370
|
+
var tmp1 = f.k1q(this.w1m_1);
|
|
1371
|
+
var tmp2 = f.k1q(this.x1m_1);
|
|
2356
1372
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2357
|
-
var v2 = f.
|
|
1373
|
+
var v2 = f.k1q(this.y1m_1);
|
|
2358
1374
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
2359
1375
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
2360
1376
|
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
2361
|
-
return XYZColorSpace_0(this.
|
|
1377
|
+
return XYZColorSpace_0(this.a1n_1.t1n()).s1p(tmp4, tmp5, z, this.z1m_1);
|
|
2362
1378
|
};
|
|
2363
|
-
protoOf(RGB).
|
|
2364
|
-
|
|
2365
|
-
$l$block: {
|
|
2366
|
-
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2367
|
-
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2368
|
-
var $this$toSRGB = this.v1s(SRGB_getInstance());
|
|
2369
|
-
var r = $this$toSRGB.h1n_1;
|
|
2370
|
-
var g = $this$toSRGB.i1n_1;
|
|
2371
|
-
var b = $this$toSRGB.j1n_1;
|
|
2372
|
-
// Inline function 'kotlin.comparisons.minOf' call
|
|
2373
|
-
var min = Math.min(r, g, b);
|
|
2374
|
-
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2375
|
-
var max = Math.max(r, g, b);
|
|
2376
|
-
var chroma = max - min;
|
|
2377
|
-
var h = (chroma < 1.0E-7 ? NaN : r === max ? (g - b) / chroma : g === max ? 2 + (b - r) / chroma : b === max ? 4 + (r - g) / chroma : 0.0) * 60;
|
|
2378
|
-
var hue = normalizeDeg(h);
|
|
2379
|
-
tmp$ret$3 = new HWB(hue, min, 1.0 - max, this.k1n_1);
|
|
2380
|
-
break $l$block;
|
|
2381
|
-
}
|
|
2382
|
-
return tmp$ret$3;
|
|
1379
|
+
protoOf(RGB).u1m = function () {
|
|
1380
|
+
return this.c1r(RGBColorSpaces_getInstance().j1o_1);
|
|
2383
1381
|
};
|
|
2384
|
-
protoOf(RGB).
|
|
2385
|
-
if (!equals(this.l1n_1, RGBColorSpaces_getInstance().s1p_1))
|
|
2386
|
-
return this.m1n().a1o();
|
|
2387
|
-
var r = this.l1n_1.v1r().e1s(this.h1n_1);
|
|
2388
|
-
var g = this.l1n_1.v1r().e1s(this.i1n_1);
|
|
2389
|
-
var b = this.l1n_1.v1r().e1s(this.j1n_1);
|
|
2390
|
-
var l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
|
|
2391
|
-
var m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
|
|
2392
|
-
var s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
|
|
2393
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
2394
|
-
var ll = Math.cbrt(l);
|
|
2395
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
2396
|
-
var mm = Math.cbrt(m);
|
|
2397
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
2398
|
-
var ss = Math.cbrt(s);
|
|
2399
|
-
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.k1n_1);
|
|
2400
|
-
};
|
|
2401
|
-
protoOf(RGB).f1n = function () {
|
|
2402
|
-
return this.v1s(RGBColorSpaces_getInstance().s1p_1);
|
|
2403
|
-
};
|
|
2404
|
-
protoOf(RGB).p5 = function () {
|
|
1382
|
+
protoOf(RGB).a5 = function () {
|
|
2405
1383
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2406
|
-
return new Float32Array([this.
|
|
1384
|
+
return new Float32Array([this.w1m_1, this.x1m_1, this.y1m_1, this.z1m_1]);
|
|
2407
1385
|
};
|
|
2408
1386
|
protoOf(RGB).toString = function () {
|
|
2409
|
-
return 'RGB(r=' + this.
|
|
1387
|
+
return 'RGB(r=' + this.w1m_1 + ', g=' + this.x1m_1 + ', b=' + this.y1m_1 + ', alpha=' + this.z1m_1 + ', space=' + toString(this.a1n_1) + ')';
|
|
2410
1388
|
};
|
|
2411
1389
|
protoOf(RGB).hashCode = function () {
|
|
2412
|
-
var result = getNumberHashCode(this.
|
|
2413
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2414
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2415
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2416
|
-
result = imul(result, 31) + hashCode(this.
|
|
1390
|
+
var result = getNumberHashCode(this.w1m_1);
|
|
1391
|
+
result = imul(result, 31) + getNumberHashCode(this.x1m_1) | 0;
|
|
1392
|
+
result = imul(result, 31) + getNumberHashCode(this.y1m_1) | 0;
|
|
1393
|
+
result = imul(result, 31) + getNumberHashCode(this.z1m_1) | 0;
|
|
1394
|
+
result = imul(result, 31) + hashCode(this.a1n_1) | 0;
|
|
2417
1395
|
return result;
|
|
2418
1396
|
};
|
|
2419
1397
|
protoOf(RGB).equals = function (other) {
|
|
@@ -2422,46 +1400,18 @@
|
|
|
2422
1400
|
if (!(other instanceof RGB))
|
|
2423
1401
|
return false;
|
|
2424
1402
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
2425
|
-
if (!equals(this.
|
|
1403
|
+
if (!equals(this.w1m_1, tmp0_other_with_cast.w1m_1))
|
|
2426
1404
|
return false;
|
|
2427
|
-
if (!equals(this.
|
|
1405
|
+
if (!equals(this.x1m_1, tmp0_other_with_cast.x1m_1))
|
|
2428
1406
|
return false;
|
|
2429
|
-
if (!equals(this.
|
|
1407
|
+
if (!equals(this.y1m_1, tmp0_other_with_cast.y1m_1))
|
|
2430
1408
|
return false;
|
|
2431
|
-
if (!equals(this.
|
|
1409
|
+
if (!equals(this.z1m_1, tmp0_other_with_cast.z1m_1))
|
|
2432
1410
|
return false;
|
|
2433
|
-
if (!equals(this.
|
|
1411
|
+
if (!equals(this.a1n_1, tmp0_other_with_cast.a1n_1))
|
|
2434
1412
|
return false;
|
|
2435
1413
|
return true;
|
|
2436
1414
|
};
|
|
2437
|
-
function parseHex(_this__u8e3s4, startIndex) {
|
|
2438
|
-
var tmp;
|
|
2439
|
-
if (get_hexLength(_this__u8e3s4) > 4) {
|
|
2440
|
-
var i = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
|
|
2441
|
-
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
2442
|
-
} else {
|
|
2443
|
-
var i_0 = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
|
|
2444
|
-
// Inline function 'kotlin.let' call
|
|
2445
|
-
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
2446
|
-
var tmp$ret$1 = toString_0(it) + toString_0(it);
|
|
2447
|
-
tmp = toInt(tmp$ret$1, 16);
|
|
2448
|
-
}
|
|
2449
|
-
return tmp;
|
|
2450
|
-
}
|
|
2451
|
-
function validateHex(_this__u8e3s4) {
|
|
2452
|
-
// Inline function 'kotlin.apply' call
|
|
2453
|
-
// Inline function 'kotlin.let' call
|
|
2454
|
-
var it = get_hexLength(_this__u8e3s4);
|
|
2455
|
-
// Inline function 'kotlin.require' call
|
|
2456
|
-
if (!(it === 3 || it === 4 || it === 6 || it === 8)) {
|
|
2457
|
-
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
2458
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2459
|
-
}
|
|
2460
|
-
return _this__u8e3s4;
|
|
2461
|
-
}
|
|
2462
|
-
function get_hexLength(_this__u8e3s4) {
|
|
2463
|
-
return startsWith(_this__u8e3s4, '#') ? _this__u8e3s4.length - 1 | 0 : _this__u8e3s4.length;
|
|
2464
|
-
}
|
|
2465
1415
|
function get_SRGB_R() {
|
|
2466
1416
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2467
1417
|
return SRGB_R;
|
|
@@ -2513,17 +1463,17 @@
|
|
|
2513
1463
|
}
|
|
2514
1464
|
var ACES_AP1_B;
|
|
2515
1465
|
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
2516
|
-
return it.
|
|
1466
|
+
return it.u1m();
|
|
2517
1467
|
}
|
|
2518
1468
|
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
2519
1469
|
var tmp;
|
|
2520
1470
|
if (color instanceof RGB) {
|
|
2521
|
-
tmp = color.
|
|
1471
|
+
tmp = color.c1r($this$RGBColorSpaceImpl);
|
|
2522
1472
|
} else {
|
|
2523
1473
|
if (color instanceof ICtCp) {
|
|
2524
|
-
tmp = color.
|
|
1474
|
+
tmp = color.a1q();
|
|
2525
1475
|
} else {
|
|
2526
|
-
tmp = color.
|
|
1476
|
+
tmp = color.b1n().e1r($this$RGBColorSpaceImpl);
|
|
2527
1477
|
}
|
|
2528
1478
|
}
|
|
2529
1479
|
return tmp;
|
|
@@ -2531,29 +1481,29 @@
|
|
|
2531
1481
|
function RGBColorSpaces() {
|
|
2532
1482
|
RGBColorSpaces_instance = this;
|
|
2533
1483
|
var tmp = this;
|
|
2534
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1484
|
+
var tmp_0 = Illuminant_getInstance().c1o_1;
|
|
2535
1485
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
2536
1486
|
var tmp_2 = get_SRGB_R();
|
|
2537
1487
|
var tmp_3 = get_SRGB_G();
|
|
2538
1488
|
var tmp_4 = get_SRGB_B();
|
|
2539
|
-
tmp.
|
|
2540
|
-
this.
|
|
2541
|
-
this.
|
|
2542
|
-
this.
|
|
2543
|
-
this.
|
|
2544
|
-
this.
|
|
2545
|
-
this.
|
|
1489
|
+
tmp.j1o_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1490
|
+
this.k1o_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().c1o_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1491
|
+
this.l1o_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1492
|
+
this.m1o_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1493
|
+
this.n1o_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1494
|
+
this.o1o_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1495
|
+
this.p1o_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().c1o_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));
|
|
2546
1496
|
var tmp_5 = this;
|
|
2547
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1497
|
+
var tmp_6 = Illuminant_getInstance().c1o_1;
|
|
2548
1498
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
2549
1499
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
2550
1500
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
2551
1501
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
2552
|
-
tmp_5.
|
|
2553
|
-
this.
|
|
2554
|
-
this.
|
|
2555
|
-
this.
|
|
2556
|
-
this.
|
|
1502
|
+
tmp_5.q1o_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1503
|
+
this.r1o_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().c1o_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1504
|
+
this.s1o_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));
|
|
1505
|
+
this.t1o_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().c1o_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1506
|
+
this.u1o_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().a1o_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));
|
|
2557
1507
|
}
|
|
2558
1508
|
var RGBColorSpaces_instance;
|
|
2559
1509
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2563,52 +1513,40 @@
|
|
|
2563
1513
|
}
|
|
2564
1514
|
function SRGB() {
|
|
2565
1515
|
SRGB_instance = this;
|
|
2566
|
-
this.
|
|
1516
|
+
this.t1p_1 = RGBColorSpaces_getInstance().j1o_1;
|
|
2567
1517
|
}
|
|
2568
1518
|
protoOf(SRGB).equals = function (other) {
|
|
2569
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1519
|
+
return equals(RGBColorSpaces_getInstance().j1o_1, other);
|
|
2570
1520
|
};
|
|
2571
1521
|
protoOf(SRGB).hashCode = function () {
|
|
2572
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1522
|
+
return hashCode(RGBColorSpaces_getInstance().j1o_1);
|
|
2573
1523
|
};
|
|
2574
1524
|
protoOf(SRGB).toString = function () {
|
|
2575
1525
|
return 'sRGB';
|
|
2576
1526
|
};
|
|
2577
|
-
protoOf(SRGB).
|
|
2578
|
-
return this.
|
|
2579
|
-
};
|
|
2580
|
-
protoOf(SRGB).g1s = function (r, g, b, alpha) {
|
|
2581
|
-
return this.n1r_1.g1s(r, g, b, alpha);
|
|
2582
|
-
};
|
|
2583
|
-
protoOf(SRGB).g1p = function (hex) {
|
|
2584
|
-
return this.n1r_1.g1p(hex);
|
|
2585
|
-
};
|
|
2586
|
-
protoOf(SRGB).l1r = function (r, g, b, alpha) {
|
|
2587
|
-
return this.n1r_1.l1r(r, g, b, alpha);
|
|
2588
|
-
};
|
|
2589
|
-
protoOf(SRGB).v1r = function () {
|
|
2590
|
-
return this.n1r_1.v1r();
|
|
1527
|
+
protoOf(SRGB).s1p = function (r, g, b, alpha) {
|
|
1528
|
+
return this.t1p_1.s1p(r, g, b, alpha);
|
|
2591
1529
|
};
|
|
2592
|
-
protoOf(SRGB).
|
|
2593
|
-
return this.
|
|
1530
|
+
protoOf(SRGB).n1q = function (r, g, b, alpha) {
|
|
1531
|
+
return this.t1p_1.n1q(r, g, b, alpha);
|
|
2594
1532
|
};
|
|
2595
|
-
protoOf(SRGB).
|
|
2596
|
-
return this.
|
|
1533
|
+
protoOf(SRGB).b1q = function () {
|
|
1534
|
+
return this.t1p_1.b1q();
|
|
2597
1535
|
};
|
|
2598
|
-
protoOf(SRGB).
|
|
2599
|
-
return this.
|
|
1536
|
+
protoOf(SRGB).a1r = function () {
|
|
1537
|
+
return this.t1p_1.a1r();
|
|
2600
1538
|
};
|
|
2601
|
-
protoOf(SRGB).
|
|
2602
|
-
return this.
|
|
1539
|
+
protoOf(SRGB).b1r = function () {
|
|
1540
|
+
return this.t1p_1.b1r();
|
|
2603
1541
|
};
|
|
2604
|
-
protoOf(SRGB).
|
|
2605
|
-
return this.
|
|
1542
|
+
protoOf(SRGB).t1n = function () {
|
|
1543
|
+
return this.t1p_1.t1n();
|
|
2606
1544
|
};
|
|
2607
|
-
protoOf(SRGB).
|
|
2608
|
-
return this.
|
|
1545
|
+
protoOf(SRGB).w1 = function () {
|
|
1546
|
+
return this.t1p_1.w1();
|
|
2609
1547
|
};
|
|
2610
|
-
protoOf(SRGB).
|
|
2611
|
-
return this.
|
|
1548
|
+
protoOf(SRGB).o1n = function (color) {
|
|
1549
|
+
return this.t1p_1.o1n(color);
|
|
2612
1550
|
};
|
|
2613
1551
|
var SRGB_instance;
|
|
2614
1552
|
function SRGB_getInstance() {
|
|
@@ -2617,66 +1555,39 @@
|
|
|
2617
1555
|
return SRGB_instance;
|
|
2618
1556
|
}
|
|
2619
1557
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
2620
|
-
this.
|
|
2621
|
-
this.
|
|
2622
|
-
this.
|
|
2623
|
-
this.
|
|
2624
|
-
this.
|
|
2625
|
-
this.
|
|
2626
|
-
this.
|
|
2627
|
-
this.
|
|
2628
|
-
this.
|
|
2629
|
-
this.
|
|
2630
|
-
}
|
|
2631
|
-
protoOf(RGBColorSpaceImpl).
|
|
2632
|
-
return this.
|
|
2633
|
-
};
|
|
2634
|
-
protoOf(RGBColorSpaceImpl).
|
|
2635
|
-
return this.
|
|
2636
|
-
};
|
|
2637
|
-
protoOf(RGBColorSpaceImpl).
|
|
2638
|
-
return this.
|
|
2639
|
-
};
|
|
2640
|
-
protoOf(RGBColorSpaceImpl).m1o = function () {
|
|
2641
|
-
return this.f1t_1;
|
|
2642
|
-
};
|
|
2643
|
-
protoOf(RGBColorSpaceImpl).g1o = function (color) {
|
|
2644
|
-
return this.e1t_1(this, color);
|
|
2645
|
-
};
|
|
2646
|
-
protoOf(RGBColorSpaceImpl).n1o = function (components) {
|
|
2647
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2648
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2649
|
-
var size = this.m1o().m();
|
|
2650
|
-
var containsLower = size - 1 | 0;
|
|
2651
|
-
var containsArg = components.length;
|
|
2652
|
-
// Inline function 'kotlin.require' call
|
|
2653
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2654
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2655
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2656
|
-
}
|
|
2657
|
-
var tmp3 = components[0];
|
|
2658
|
-
var tmp4 = components[1];
|
|
2659
|
-
var tmp5 = components[2];
|
|
2660
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
2661
|
-
var tmp;
|
|
2662
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2663
|
-
tmp = components[3];
|
|
2664
|
-
} else {
|
|
2665
|
-
tmp = 1.0;
|
|
2666
|
-
}
|
|
2667
|
-
var p3 = tmp;
|
|
2668
|
-
return this.h1p(tmp3, tmp4, tmp5, p3);
|
|
1558
|
+
this.f1r_1 = name;
|
|
1559
|
+
this.g1r_1 = whitePoint;
|
|
1560
|
+
this.h1r_1 = transferFunctions;
|
|
1561
|
+
this.i1r_1 = r;
|
|
1562
|
+
this.j1r_1 = g;
|
|
1563
|
+
this.k1r_1 = b;
|
|
1564
|
+
this.l1r_1 = convertImpl;
|
|
1565
|
+
this.m1r_1 = zeroOneComponentInfo('RGB');
|
|
1566
|
+
this.n1r_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.g1r_1, this.i1r_1, this.j1r_1, this.k1r_1));
|
|
1567
|
+
this.o1r_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.n1r_1)));
|
|
1568
|
+
}
|
|
1569
|
+
protoOf(RGBColorSpaceImpl).w1 = function () {
|
|
1570
|
+
return this.f1r_1;
|
|
1571
|
+
};
|
|
1572
|
+
protoOf(RGBColorSpaceImpl).t1n = function () {
|
|
1573
|
+
return this.g1r_1;
|
|
1574
|
+
};
|
|
1575
|
+
protoOf(RGBColorSpaceImpl).b1q = function () {
|
|
1576
|
+
return this.h1r_1;
|
|
2669
1577
|
};
|
|
2670
|
-
protoOf(RGBColorSpaceImpl).
|
|
2671
|
-
return this.
|
|
1578
|
+
protoOf(RGBColorSpaceImpl).o1n = function (color) {
|
|
1579
|
+
return this.l1r_1(this, color);
|
|
2672
1580
|
};
|
|
2673
|
-
protoOf(RGBColorSpaceImpl).
|
|
2674
|
-
return this.
|
|
1581
|
+
protoOf(RGBColorSpaceImpl).a1r = function () {
|
|
1582
|
+
return this.n1r_1;
|
|
1583
|
+
};
|
|
1584
|
+
protoOf(RGBColorSpaceImpl).b1r = function () {
|
|
1585
|
+
return this.o1r_1;
|
|
2675
1586
|
};
|
|
2676
1587
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2677
|
-
return this.
|
|
1588
|
+
return this.f1r_1;
|
|
2678
1589
|
};
|
|
2679
|
-
protoOf(RGBColorSpaceImpl).
|
|
1590
|
+
protoOf(RGBColorSpaceImpl).s1p = function (r, g, b, alpha) {
|
|
2680
1591
|
return new RGB(r, g, b, alpha, this);
|
|
2681
1592
|
};
|
|
2682
1593
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -2684,42 +1595,42 @@
|
|
|
2684
1595
|
return true;
|
|
2685
1596
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
2686
1597
|
return false;
|
|
2687
|
-
if (!(this.
|
|
1598
|
+
if (!(this.f1r_1 === other.w1()))
|
|
2688
1599
|
return false;
|
|
2689
|
-
if (!this.
|
|
1600
|
+
if (!this.g1r_1.equals(other.t1n()))
|
|
2690
1601
|
return false;
|
|
2691
|
-
if (!equals(this.
|
|
1602
|
+
if (!equals(this.h1r_1, other.b1q()))
|
|
2692
1603
|
return false;
|
|
2693
1604
|
if (other instanceof RGBColorSpaceImpl) {
|
|
2694
|
-
if (!this.
|
|
1605
|
+
if (!this.i1r_1.equals(other.i1r_1))
|
|
2695
1606
|
return false;
|
|
2696
|
-
if (!this.
|
|
1607
|
+
if (!this.j1r_1.equals(other.j1r_1))
|
|
2697
1608
|
return false;
|
|
2698
|
-
if (!this.
|
|
1609
|
+
if (!this.k1r_1.equals(other.k1r_1))
|
|
2699
1610
|
return false;
|
|
2700
1611
|
} else {
|
|
2701
|
-
if (!contentEquals(this.
|
|
1612
|
+
if (!contentEquals(this.n1r_1, other.a1r()))
|
|
2702
1613
|
return false;
|
|
2703
|
-
if (!contentEquals(this.
|
|
1614
|
+
if (!contentEquals(this.o1r_1, other.b1r()))
|
|
2704
1615
|
return false;
|
|
2705
1616
|
}
|
|
2706
1617
|
return true;
|
|
2707
1618
|
};
|
|
2708
1619
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2709
|
-
var result = getStringHashCode(this.
|
|
2710
|
-
result = imul(31, result) + this.
|
|
2711
|
-
result = imul(31, result) + hashCode(this.
|
|
2712
|
-
result = imul(31, result) + this.
|
|
2713
|
-
result = imul(31, result) + this.
|
|
2714
|
-
result = imul(31, result) + this.
|
|
1620
|
+
var result = getStringHashCode(this.f1r_1);
|
|
1621
|
+
result = imul(31, result) + this.g1r_1.hashCode() | 0;
|
|
1622
|
+
result = imul(31, result) + hashCode(this.h1r_1) | 0;
|
|
1623
|
+
result = imul(31, result) + this.i1r_1.hashCode() | 0;
|
|
1624
|
+
result = imul(31, result) + this.j1r_1.hashCode() | 0;
|
|
1625
|
+
result = imul(31, result) + this.k1r_1.hashCode() | 0;
|
|
2715
1626
|
return result;
|
|
2716
1627
|
};
|
|
2717
1628
|
function SRGBTransferFunctions() {
|
|
2718
1629
|
}
|
|
2719
|
-
protoOf(SRGBTransferFunctions).
|
|
1630
|
+
protoOf(SRGBTransferFunctions).l1q = function (x) {
|
|
2720
1631
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
2721
1632
|
};
|
|
2722
|
-
protoOf(SRGBTransferFunctions).
|
|
1633
|
+
protoOf(SRGBTransferFunctions).k1q = function (x) {
|
|
2723
1634
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2724
1635
|
};
|
|
2725
1636
|
var SRGBTransferFunctions_instance;
|
|
@@ -2732,18 +1643,18 @@
|
|
|
2732
1643
|
}
|
|
2733
1644
|
function ACESccTransferFunctions() {
|
|
2734
1645
|
ACESccTransferFunctions_instance = this;
|
|
2735
|
-
this.
|
|
2736
|
-
this.
|
|
2737
|
-
this.
|
|
1646
|
+
this.p1r_1 = 3.0517578125E-5;
|
|
1647
|
+
this.q1r_1 = 1.52587890625E-5;
|
|
1648
|
+
this.r1r_1 = -0.3013698630136986;
|
|
2738
1649
|
var tmp = this;
|
|
2739
1650
|
// Inline function 'kotlin.math.log2' call
|
|
2740
|
-
tmp.
|
|
1651
|
+
tmp.s1r_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2741
1652
|
}
|
|
2742
|
-
protoOf(ACESccTransferFunctions).
|
|
1653
|
+
protoOf(ACESccTransferFunctions).k1q = function (x) {
|
|
2743
1654
|
var tmp;
|
|
2744
1655
|
if (x <= -0.3013698630136986) {
|
|
2745
1656
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
2746
|
-
} else if (x < this.
|
|
1657
|
+
} else if (x < this.s1r_1) {
|
|
2747
1658
|
// Inline function 'kotlin.math.pow' call
|
|
2748
1659
|
var x_0 = x * 17.52 - 9.72;
|
|
2749
1660
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2752,7 +1663,7 @@
|
|
|
2752
1663
|
}
|
|
2753
1664
|
return tmp;
|
|
2754
1665
|
};
|
|
2755
|
-
protoOf(ACESccTransferFunctions).
|
|
1666
|
+
protoOf(ACESccTransferFunctions).l1q = function (x) {
|
|
2756
1667
|
var tmp;
|
|
2757
1668
|
if (x < 3.0517578125E-5) {
|
|
2758
1669
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -2772,17 +1683,17 @@
|
|
|
2772
1683
|
}
|
|
2773
1684
|
function ACEScctTransferFunctions() {
|
|
2774
1685
|
ACEScctTransferFunctions_instance = this;
|
|
2775
|
-
this.
|
|
2776
|
-
this.
|
|
1686
|
+
this.t1r_1 = 10.5402377416545;
|
|
1687
|
+
this.u1r_1 = 0.0729055341958355;
|
|
2777
1688
|
var tmp = this;
|
|
2778
1689
|
// Inline function 'kotlin.math.log2' call
|
|
2779
|
-
tmp.
|
|
1690
|
+
tmp.v1r_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2780
1691
|
}
|
|
2781
|
-
protoOf(ACEScctTransferFunctions).
|
|
1692
|
+
protoOf(ACEScctTransferFunctions).k1q = function (x) {
|
|
2782
1693
|
var tmp;
|
|
2783
1694
|
if (x <= 0.155251141552511) {
|
|
2784
1695
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
2785
|
-
} else if (x < this.
|
|
1696
|
+
} else if (x < this.v1r_1) {
|
|
2786
1697
|
// Inline function 'kotlin.math.pow' call
|
|
2787
1698
|
var x_0 = x * 17.52 - 9.72;
|
|
2788
1699
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2791,7 +1702,7 @@
|
|
|
2791
1702
|
}
|
|
2792
1703
|
return tmp;
|
|
2793
1704
|
};
|
|
2794
|
-
protoOf(ACEScctTransferFunctions).
|
|
1705
|
+
protoOf(ACEScctTransferFunctions).l1q = function (x) {
|
|
2795
1706
|
var tmp;
|
|
2796
1707
|
if (x < 0.0078125) {
|
|
2797
1708
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -2809,16 +1720,16 @@
|
|
|
2809
1720
|
}
|
|
2810
1721
|
function BT2020TransferFunctions() {
|
|
2811
1722
|
BT2020TransferFunctions_instance = this;
|
|
2812
|
-
this.
|
|
2813
|
-
this.
|
|
1723
|
+
this.w1r_1 = 1.0993;
|
|
1724
|
+
this.x1r_1 = 0.0181;
|
|
2814
1725
|
var tmp = this;
|
|
2815
1726
|
// Inline function 'kotlin.math.pow' call
|
|
2816
|
-
tmp.
|
|
1727
|
+
tmp.y1r_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
2817
1728
|
}
|
|
2818
|
-
protoOf(BT2020TransferFunctions).
|
|
2819
|
-
return numberToDouble(x < this.
|
|
1729
|
+
protoOf(BT2020TransferFunctions).k1q = function (x) {
|
|
1730
|
+
return numberToDouble(x < this.y1r_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
2820
1731
|
};
|
|
2821
|
-
protoOf(BT2020TransferFunctions).
|
|
1732
|
+
protoOf(BT2020TransferFunctions).l1q = function (x) {
|
|
2822
1733
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
2823
1734
|
};
|
|
2824
1735
|
var BT2020TransferFunctions_instance;
|
|
@@ -2829,12 +1740,12 @@
|
|
|
2829
1740
|
}
|
|
2830
1741
|
function BT709TransferFunctions() {
|
|
2831
1742
|
BT709TransferFunctions_instance = this;
|
|
2832
|
-
this.
|
|
1743
|
+
this.z1r_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2833
1744
|
}
|
|
2834
|
-
protoOf(BT709TransferFunctions).
|
|
2835
|
-
return numberToDouble(x < this.
|
|
1745
|
+
protoOf(BT709TransferFunctions).k1q = function (x) {
|
|
1746
|
+
return numberToDouble(x < this.z1r_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
2836
1747
|
};
|
|
2837
|
-
protoOf(BT709TransferFunctions).
|
|
1748
|
+
protoOf(BT709TransferFunctions).l1q = function (x) {
|
|
2838
1749
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2839
1750
|
};
|
|
2840
1751
|
var BT709TransferFunctions_instance;
|
|
@@ -2844,12 +1755,12 @@
|
|
|
2844
1755
|
return BT709TransferFunctions_instance;
|
|
2845
1756
|
}
|
|
2846
1757
|
function ROMMTransferFunctions() {
|
|
2847
|
-
this.
|
|
1758
|
+
this.a1s_1 = 0.001953;
|
|
2848
1759
|
}
|
|
2849
|
-
protoOf(ROMMTransferFunctions).
|
|
1760
|
+
protoOf(ROMMTransferFunctions).k1q = function (x) {
|
|
2850
1761
|
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
2851
1762
|
};
|
|
2852
|
-
protoOf(ROMMTransferFunctions).
|
|
1763
|
+
protoOf(ROMMTransferFunctions).l1q = function (x) {
|
|
2853
1764
|
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
2854
1765
|
};
|
|
2855
1766
|
var ROMMTransferFunctions_instance;
|
|
@@ -2858,13 +1769,13 @@
|
|
|
2858
1769
|
}
|
|
2859
1770
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2860
1771
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2861
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2862
|
-
var wp = whitePoint.
|
|
1772
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.p1q_1, g.p1q_1, b.p1q_1, r.q1q_1, g.q1q_1, b.q1q_1, r.b1s(), g.b1s(), b.b1s());
|
|
1773
|
+
var wp = whitePoint.o1p_1;
|
|
2863
1774
|
var tmp0 = inverse(primaries);
|
|
2864
|
-
var tmp1 = wp.
|
|
2865
|
-
var tmp2 = wp.
|
|
1775
|
+
var tmp1 = wp.s1q();
|
|
1776
|
+
var tmp2 = wp.r1q_1;
|
|
2866
1777
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2867
|
-
var v2 = wp.
|
|
1778
|
+
var v2 = wp.t1q();
|
|
2868
1779
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
2869
1780
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
2870
1781
|
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
@@ -2874,9 +1785,9 @@
|
|
|
2874
1785
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2875
1786
|
var tmp;
|
|
2876
1787
|
if (color instanceof RGB) {
|
|
2877
|
-
tmp = color.
|
|
1788
|
+
tmp = color.c1r($this$RGBColorSpaceImpl);
|
|
2878
1789
|
} else {
|
|
2879
|
-
tmp = color.
|
|
1790
|
+
tmp = color.b1n().e1r($this$RGBColorSpaceImpl);
|
|
2880
1791
|
}
|
|
2881
1792
|
return tmp;
|
|
2882
1793
|
}
|
|
@@ -2902,54 +1813,24 @@
|
|
|
2902
1813
|
function _RGBInt___get_argb__impl__xiee7i($this) {
|
|
2903
1814
|
return $this;
|
|
2904
1815
|
}
|
|
2905
|
-
function
|
|
2906
|
-
|
|
2907
|
-
this.
|
|
1816
|
+
function Companion_3() {
|
|
1817
|
+
Companion_instance_3 = this;
|
|
1818
|
+
this.c1s_1 = threeComponentInfo('R', 0.0, 255.0, 'G', 0.0, 255.0, 'B', 0.0, 255.0);
|
|
2908
1819
|
}
|
|
2909
|
-
protoOf(
|
|
1820
|
+
protoOf(Companion_3).w1 = function () {
|
|
2910
1821
|
return 'RGBInt';
|
|
2911
1822
|
};
|
|
2912
|
-
protoOf(
|
|
2913
|
-
return
|
|
2914
|
-
};
|
|
2915
|
-
protoOf(Companion_7).w1t = function (color) {
|
|
2916
|
-
return color.f1n().p1q();
|
|
2917
|
-
};
|
|
2918
|
-
protoOf(Companion_7).g1o = function (color) {
|
|
2919
|
-
return new RGBInt(this.w1t(color));
|
|
2920
|
-
};
|
|
2921
|
-
protoOf(Companion_7).x1t = function (components) {
|
|
2922
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2923
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2924
|
-
var size = this.m1o().m();
|
|
2925
|
-
var containsLower = size - 1 | 0;
|
|
2926
|
-
var containsArg = components.length;
|
|
2927
|
-
// Inline function 'kotlin.require' call
|
|
2928
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2929
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2930
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2931
|
-
}
|
|
2932
|
-
var tmp2 = components[0];
|
|
2933
|
-
var tmp3 = components[1];
|
|
2934
|
-
var tmp4 = components[2];
|
|
2935
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
2936
|
-
var tmp;
|
|
2937
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2938
|
-
tmp = components[3];
|
|
2939
|
-
} else {
|
|
2940
|
-
tmp = 1.0;
|
|
2941
|
-
}
|
|
2942
|
-
var a = tmp;
|
|
2943
|
-
return _RGBInt___init__impl__lqova7_0(numberToInt(tmp2), numberToInt(tmp3), numberToInt(tmp4), numberToInt(a));
|
|
1823
|
+
protoOf(Companion_3).d1s = function (color) {
|
|
1824
|
+
return color.u1m().v1o();
|
|
2944
1825
|
};
|
|
2945
|
-
protoOf(
|
|
2946
|
-
return new RGBInt(this.
|
|
1826
|
+
protoOf(Companion_3).o1n = function (color) {
|
|
1827
|
+
return new RGBInt(this.d1s(color));
|
|
2947
1828
|
};
|
|
2948
|
-
var
|
|
2949
|
-
function
|
|
2950
|
-
if (
|
|
2951
|
-
new
|
|
2952
|
-
return
|
|
1829
|
+
var Companion_instance_3;
|
|
1830
|
+
function Companion_getInstance_3() {
|
|
1831
|
+
if (Companion_instance_3 == null)
|
|
1832
|
+
new Companion_3();
|
|
1833
|
+
return Companion_instance_3;
|
|
2953
1834
|
}
|
|
2954
1835
|
function _RGBInt___init__impl__lqova7_0(r, g, b, alpha) {
|
|
2955
1836
|
alpha = alpha === VOID ? 255 : alpha;
|
|
@@ -2984,7 +1865,7 @@
|
|
|
2984
1865
|
// Inline function 'kotlin.math.roundToInt' call
|
|
2985
1866
|
var this_0 = r * 255;
|
|
2986
1867
|
var tmp$ret$0 = roundToInt(this_0);
|
|
2987
|
-
tmp =
|
|
1868
|
+
tmp = coerceIn(tmp$ret$0, 0, 255);
|
|
2988
1869
|
}
|
|
2989
1870
|
var tmp_0 = tmp;
|
|
2990
1871
|
var tmp_1;
|
|
@@ -2994,7 +1875,7 @@
|
|
|
2994
1875
|
// Inline function 'kotlin.math.roundToInt' call
|
|
2995
1876
|
var this_1 = g * 255;
|
|
2996
1877
|
var tmp$ret$1 = roundToInt(this_1);
|
|
2997
|
-
tmp_1 =
|
|
1878
|
+
tmp_1 = coerceIn(tmp$ret$1, 0, 255);
|
|
2998
1879
|
}
|
|
2999
1880
|
var tmp_2 = tmp_1;
|
|
3000
1881
|
var tmp_3;
|
|
@@ -3004,13 +1885,13 @@
|
|
|
3004
1885
|
// Inline function 'kotlin.math.roundToInt' call
|
|
3005
1886
|
var this_2 = b * 255;
|
|
3006
1887
|
var tmp$ret$2 = roundToInt(this_2);
|
|
3007
|
-
tmp_3 =
|
|
1888
|
+
tmp_3 = coerceIn(tmp$ret$2, 0, 255);
|
|
3008
1889
|
}
|
|
3009
1890
|
var tmp_4 = tmp_3;
|
|
3010
1891
|
// Inline function 'kotlin.math.roundToInt' call
|
|
3011
1892
|
var this_3 = alpha * 255;
|
|
3012
1893
|
var tmp$ret$3 = roundToInt(this_3);
|
|
3013
|
-
return _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4,
|
|
1894
|
+
return _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4, coerceIn(tmp$ret$3, 0, 255));
|
|
3014
1895
|
}
|
|
3015
1896
|
function _RGBInt___get_alpha__impl__yl2tay($this) {
|
|
3016
1897
|
// Inline function 'kotlin.UByte.toFloat' call
|
|
@@ -3021,7 +1902,7 @@
|
|
|
3021
1902
|
return uintToDouble(value) / 255.0;
|
|
3022
1903
|
}
|
|
3023
1904
|
function _RGBInt___get_space__impl__emgnsy($this) {
|
|
3024
|
-
return
|
|
1905
|
+
return Companion_getInstance_3();
|
|
3025
1906
|
}
|
|
3026
1907
|
function _RGBInt___get_r__impl__dulq0e($this) {
|
|
3027
1908
|
// Inline function 'kotlin.UInt.shr' call
|
|
@@ -3075,7 +1956,7 @@
|
|
|
3075
1956
|
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3076
1957
|
}
|
|
3077
1958
|
function RGBInt__toSRGB_impl_m0acyy($this) {
|
|
3078
|
-
return
|
|
1959
|
+
return Companion_getInstance_2().s1p(_RGBInt___get_redFloat__impl__lnt6cx($this), _RGBInt___get_greenFloat__impl__opq1mn($this), _RGBInt___get_blueFloat__impl__jt6mw2($this), _RGBInt___get_alpha__impl__yl2tay($this));
|
|
3079
1960
|
}
|
|
3080
1961
|
function RGBInt__toArray_impl_73rlu9($this) {
|
|
3081
1962
|
// Inline function 'kotlin.UByte.toFloat' call
|
|
@@ -3114,84 +1995,78 @@
|
|
|
3114
1995
|
function RGBInt__equals_impl_qmmpmc($this, other) {
|
|
3115
1996
|
if (!(other instanceof RGBInt))
|
|
3116
1997
|
return false;
|
|
3117
|
-
if (!($this === (other instanceof RGBInt ? other.
|
|
1998
|
+
if (!($this === (other instanceof RGBInt ? other.d1r_1 : THROW_CCE())))
|
|
3118
1999
|
return false;
|
|
3119
2000
|
return true;
|
|
3120
2001
|
}
|
|
3121
2002
|
function RGBInt(argb) {
|
|
3122
|
-
|
|
3123
|
-
this.
|
|
2003
|
+
Companion_getInstance_3();
|
|
2004
|
+
this.d1r_1 = argb;
|
|
3124
2005
|
}
|
|
3125
|
-
protoOf(RGBInt).
|
|
3126
|
-
return _RGBInt___get_alpha__impl__yl2tay(this.
|
|
2006
|
+
protoOf(RGBInt).s1m = function () {
|
|
2007
|
+
return _RGBInt___get_alpha__impl__yl2tay(this.d1r_1);
|
|
3127
2008
|
};
|
|
3128
|
-
protoOf(RGBInt).
|
|
3129
|
-
return _RGBInt___get_space__impl__emgnsy(this.
|
|
2009
|
+
protoOf(RGBInt).t1m = function () {
|
|
2010
|
+
return _RGBInt___get_space__impl__emgnsy(this.d1r_1);
|
|
3130
2011
|
};
|
|
3131
|
-
protoOf(RGBInt).
|
|
3132
|
-
return RGBInt__toSRGB_impl_m0acyy(this.
|
|
2012
|
+
protoOf(RGBInt).u1m = function () {
|
|
2013
|
+
return RGBInt__toSRGB_impl_m0acyy(this.d1r_1);
|
|
3133
2014
|
};
|
|
3134
|
-
protoOf(RGBInt).
|
|
3135
|
-
return RGBInt__toArray_impl_73rlu9(this.
|
|
2015
|
+
protoOf(RGBInt).a5 = function () {
|
|
2016
|
+
return RGBInt__toArray_impl_73rlu9(this.d1r_1);
|
|
3136
2017
|
};
|
|
3137
2018
|
protoOf(RGBInt).toString = function () {
|
|
3138
|
-
return RGBInt__toString_impl_cf5r29(this.
|
|
2019
|
+
return RGBInt__toString_impl_cf5r29(this.d1r_1);
|
|
3139
2020
|
};
|
|
3140
2021
|
protoOf(RGBInt).hashCode = function () {
|
|
3141
|
-
return RGBInt__hashCode_impl_y6bnv4(this.
|
|
2022
|
+
return RGBInt__hashCode_impl_y6bnv4(this.d1r_1);
|
|
3142
2023
|
};
|
|
3143
2024
|
protoOf(RGBInt).equals = function (other) {
|
|
3144
|
-
return RGBInt__equals_impl_qmmpmc(this.
|
|
2025
|
+
return RGBInt__equals_impl_qmmpmc(this.d1r_1, other);
|
|
3145
2026
|
};
|
|
3146
|
-
function
|
|
3147
|
-
|
|
3148
|
-
this.
|
|
2027
|
+
function Companion_4() {
|
|
2028
|
+
Companion_instance_4 = this;
|
|
2029
|
+
this.e1s_1 = XYZColorSpaces_getInstance().u1n_1;
|
|
3149
2030
|
}
|
|
3150
|
-
protoOf(
|
|
3151
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
2031
|
+
protoOf(Companion_4).hashCode = function () {
|
|
2032
|
+
return hashCode(XYZColorSpaces_getInstance().u1n_1);
|
|
3152
2033
|
};
|
|
3153
|
-
protoOf(
|
|
3154
|
-
return equals(XYZColorSpaces_getInstance().
|
|
2034
|
+
protoOf(Companion_4).equals = function (other) {
|
|
2035
|
+
return equals(XYZColorSpaces_getInstance().u1n_1, other);
|
|
3155
2036
|
};
|
|
3156
|
-
protoOf(
|
|
3157
|
-
return this.
|
|
2037
|
+
protoOf(Companion_4).s1p = function (x, y, z, alpha) {
|
|
2038
|
+
return this.e1s_1.s1p(x, y, z, alpha);
|
|
3158
2039
|
};
|
|
3159
|
-
protoOf(
|
|
3160
|
-
return this.
|
|
2040
|
+
protoOf(Companion_4).n1q = function (x, y, z, alpha) {
|
|
2041
|
+
return this.e1s_1.n1q(x, y, z, alpha);
|
|
3161
2042
|
};
|
|
3162
|
-
protoOf(
|
|
3163
|
-
return this.
|
|
2043
|
+
protoOf(Companion_4).t1n = function () {
|
|
2044
|
+
return this.e1s_1.t1n();
|
|
3164
2045
|
};
|
|
3165
|
-
protoOf(
|
|
3166
|
-
return this.
|
|
2046
|
+
protoOf(Companion_4).w1 = function () {
|
|
2047
|
+
return this.e1s_1.w1();
|
|
3167
2048
|
};
|
|
3168
|
-
protoOf(
|
|
3169
|
-
return this.
|
|
2049
|
+
protoOf(Companion_4).o1n = function (color) {
|
|
2050
|
+
return this.e1s_1.o1n(color);
|
|
3170
2051
|
};
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
return
|
|
3176
|
-
};
|
|
3177
|
-
var Companion_instance_9;
|
|
3178
|
-
function Companion_getInstance_8() {
|
|
3179
|
-
if (Companion_instance_9 == null)
|
|
3180
|
-
new Companion_8();
|
|
3181
|
-
return Companion_instance_9;
|
|
2052
|
+
var Companion_instance_4;
|
|
2053
|
+
function Companion_getInstance_4() {
|
|
2054
|
+
if (Companion_instance_4 == null)
|
|
2055
|
+
new Companion_4();
|
|
2056
|
+
return Companion_instance_4;
|
|
3182
2057
|
}
|
|
3183
2058
|
function adaptToM($this, space, m, mi) {
|
|
3184
|
-
if (space.
|
|
2059
|
+
if (space.t1n().equals($this.h1n_1.t1n()))
|
|
3185
2060
|
return $this;
|
|
3186
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3187
|
-
var tmp1 = $this.
|
|
3188
|
-
var tmp2 = $this.
|
|
2061
|
+
var transform = chromaticAdaptationMatrix(space, $this.h1n_1.t1n().o1p_1, m, mi);
|
|
2062
|
+
var tmp1 = $this.d1n_1;
|
|
2063
|
+
var tmp2 = $this.e1n_1;
|
|
3189
2064
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3190
|
-
var v2 = $this.
|
|
2065
|
+
var v2 = $this.f1n_1;
|
|
3191
2066
|
var tmp4 = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
3192
2067
|
var tmp5 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
3193
2068
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
3194
|
-
return space.
|
|
2069
|
+
return space.s1p(tmp4, tmp5, zz, $this.g1n_1);
|
|
3195
2070
|
}
|
|
3196
2071
|
function toLAB$f(t) {
|
|
3197
2072
|
var tmp;
|
|
@@ -3204,100 +2079,72 @@
|
|
|
3204
2079
|
return tmp;
|
|
3205
2080
|
}
|
|
3206
2081
|
function XYZ(x, y, z, alpha, space) {
|
|
3207
|
-
|
|
3208
|
-
this.
|
|
3209
|
-
this.
|
|
3210
|
-
this.
|
|
3211
|
-
this.
|
|
3212
|
-
this.
|
|
2082
|
+
Companion_getInstance_4();
|
|
2083
|
+
this.d1n_1 = x;
|
|
2084
|
+
this.e1n_1 = y;
|
|
2085
|
+
this.f1n_1 = z;
|
|
2086
|
+
this.g1n_1 = alpha;
|
|
2087
|
+
this.h1n_1 = space;
|
|
3213
2088
|
}
|
|
3214
|
-
protoOf(XYZ).
|
|
3215
|
-
return this.
|
|
2089
|
+
protoOf(XYZ).s1m = function () {
|
|
2090
|
+
return this.g1n_1;
|
|
3216
2091
|
};
|
|
3217
|
-
protoOf(XYZ).
|
|
3218
|
-
return this.
|
|
2092
|
+
protoOf(XYZ).t1m = function () {
|
|
2093
|
+
return this.h1n_1;
|
|
3219
2094
|
};
|
|
3220
|
-
protoOf(XYZ).
|
|
2095
|
+
protoOf(XYZ).w1n = function (space) {
|
|
3221
2096
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
3222
2097
|
};
|
|
3223
|
-
protoOf(XYZ).
|
|
3224
|
-
var _destruct__k2r9zo = this.
|
|
3225
|
-
var x = _destruct__k2r9zo.
|
|
3226
|
-
var y = _destruct__k2r9zo.
|
|
3227
|
-
var z = _destruct__k2r9zo.
|
|
3228
|
-
var f = space.
|
|
2098
|
+
protoOf(XYZ).e1r = function (space) {
|
|
2099
|
+
var _destruct__k2r9zo = this.w1n(XYZColorSpace_0(space.t1n()));
|
|
2100
|
+
var x = _destruct__k2r9zo.me();
|
|
2101
|
+
var y = _destruct__k2r9zo.ne();
|
|
2102
|
+
var z = _destruct__k2r9zo.f1s();
|
|
2103
|
+
var f = space.b1q();
|
|
3229
2104
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3230
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
2105
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.b1r());
|
|
3231
2106
|
var tmp4 = 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;
|
|
3232
2107
|
var tmp5 = 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;
|
|
3233
2108
|
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;
|
|
3234
|
-
return space.
|
|
2109
|
+
return space.s1p(f.l1q(tmp4), f.l1q(tmp5), f.l1q(b), this.g1n_1);
|
|
3235
2110
|
};
|
|
3236
|
-
protoOf(XYZ).
|
|
3237
|
-
return this.
|
|
2111
|
+
protoOf(XYZ).u1m = function () {
|
|
2112
|
+
return this.e1r(RGBColorSpaces_getInstance().j1o_1);
|
|
3238
2113
|
};
|
|
3239
|
-
protoOf(XYZ).
|
|
3240
|
-
var fx = toLAB$f(this.
|
|
3241
|
-
var fy = toLAB$f(this.
|
|
3242
|
-
var fz = toLAB$f(this.
|
|
2114
|
+
protoOf(XYZ).c1n = function () {
|
|
2115
|
+
var fx = toLAB$f(this.d1n_1 / this.h1n_1.t1n().o1p_1.s1q());
|
|
2116
|
+
var fy = toLAB$f(this.e1n_1 / this.h1n_1.t1n().o1p_1.r1q_1);
|
|
2117
|
+
var fz = toLAB$f(this.f1n_1 / this.h1n_1.t1n().o1p_1.t1q());
|
|
3243
2118
|
var l = 116 * fy - 16;
|
|
3244
2119
|
var a = 500 * (fx - fy);
|
|
3245
2120
|
var b = 200 * (fy - fz);
|
|
3246
|
-
return LABColorSpace_0(this.
|
|
2121
|
+
return LABColorSpace_0(this.h1n_1.t1n()).n1q(l, a, b, this.g1n_1);
|
|
3247
2122
|
};
|
|
3248
|
-
protoOf(XYZ).
|
|
3249
|
-
// Inline function 'com.github.ajalt.colormath.model.XYZ.toD65' call
|
|
3250
|
-
var tmp;
|
|
3251
|
-
if (equals(this.s1n_1, XYZColorSpaces_getInstance().e1q_1)) {
|
|
3252
|
-
var l = +0.8189330101 * this.o1n_1 + 0.3618667424 * this.p1n_1 - 0.1288597137 * this.q1n_1;
|
|
3253
|
-
var m = +0.0329845436 * this.o1n_1 + 0.9293118715 * this.p1n_1 + 0.0361456387 * this.q1n_1;
|
|
3254
|
-
var s = +0.0482003018 * this.o1n_1 + 0.2643662691 * this.p1n_1 + 0.633851707 * this.q1n_1;
|
|
3255
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3256
|
-
var ll = Math.cbrt(l);
|
|
3257
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3258
|
-
var mm = Math.cbrt(m);
|
|
3259
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3260
|
-
var ss = Math.cbrt(s);
|
|
3261
|
-
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.r1n_1);
|
|
3262
|
-
} else {
|
|
3263
|
-
var $this$toD65 = this.g1q(XYZColorSpaces_getInstance().e1q_1);
|
|
3264
|
-
var l_0 = +0.8189330101 * $this$toD65.o1n_1 + 0.3618667424 * $this$toD65.p1n_1 - 0.1288597137 * $this$toD65.q1n_1;
|
|
3265
|
-
var m_0 = +0.0329845436 * $this$toD65.o1n_1 + 0.9293118715 * $this$toD65.p1n_1 + 0.0361456387 * $this$toD65.q1n_1;
|
|
3266
|
-
var s_0 = +0.0482003018 * $this$toD65.o1n_1 + 0.2643662691 * $this$toD65.p1n_1 + 0.633851707 * $this$toD65.q1n_1;
|
|
3267
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3268
|
-
var ll_0 = Math.cbrt(l_0);
|
|
3269
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3270
|
-
var mm_0 = Math.cbrt(m_0);
|
|
3271
|
-
// Inline function 'kotlin.math.cbrt' call
|
|
3272
|
-
var ss_0 = Math.cbrt(s_0);
|
|
3273
|
-
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.r1n_1);
|
|
3274
|
-
}
|
|
3275
|
-
};
|
|
3276
|
-
protoOf(XYZ).m1n = function () {
|
|
2123
|
+
protoOf(XYZ).b1n = function () {
|
|
3277
2124
|
return this;
|
|
3278
2125
|
};
|
|
3279
|
-
protoOf(XYZ).
|
|
2126
|
+
protoOf(XYZ).a5 = function () {
|
|
3280
2127
|
// Inline function 'kotlin.floatArrayOf' call
|
|
3281
|
-
return new Float32Array([this.
|
|
2128
|
+
return new Float32Array([this.d1n_1, this.e1n_1, this.f1n_1, this.g1n_1]);
|
|
3282
2129
|
};
|
|
3283
|
-
protoOf(XYZ).
|
|
3284
|
-
return this.
|
|
2130
|
+
protoOf(XYZ).me = function () {
|
|
2131
|
+
return this.d1n_1;
|
|
3285
2132
|
};
|
|
3286
|
-
protoOf(XYZ).
|
|
3287
|
-
return this.
|
|
2133
|
+
protoOf(XYZ).ne = function () {
|
|
2134
|
+
return this.e1n_1;
|
|
3288
2135
|
};
|
|
3289
|
-
protoOf(XYZ).
|
|
3290
|
-
return this.
|
|
2136
|
+
protoOf(XYZ).f1s = function () {
|
|
2137
|
+
return this.f1n_1;
|
|
3291
2138
|
};
|
|
3292
2139
|
protoOf(XYZ).toString = function () {
|
|
3293
|
-
return 'XYZ(x=' + this.
|
|
2140
|
+
return 'XYZ(x=' + this.d1n_1 + ', y=' + this.e1n_1 + ', z=' + this.f1n_1 + ', alpha=' + this.g1n_1 + ', space=' + toString(this.h1n_1) + ')';
|
|
3294
2141
|
};
|
|
3295
2142
|
protoOf(XYZ).hashCode = function () {
|
|
3296
|
-
var result = getNumberHashCode(this.
|
|
3297
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3298
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3299
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3300
|
-
result = imul(result, 31) + hashCode(this.
|
|
2143
|
+
var result = getNumberHashCode(this.d1n_1);
|
|
2144
|
+
result = imul(result, 31) + getNumberHashCode(this.e1n_1) | 0;
|
|
2145
|
+
result = imul(result, 31) + getNumberHashCode(this.f1n_1) | 0;
|
|
2146
|
+
result = imul(result, 31) + getNumberHashCode(this.g1n_1) | 0;
|
|
2147
|
+
result = imul(result, 31) + hashCode(this.h1n_1) | 0;
|
|
3301
2148
|
return result;
|
|
3302
2149
|
};
|
|
3303
2150
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -3306,27 +2153,27 @@
|
|
|
3306
2153
|
if (!(other instanceof XYZ))
|
|
3307
2154
|
return false;
|
|
3308
2155
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
3309
|
-
if (!equals(this.
|
|
2156
|
+
if (!equals(this.d1n_1, tmp0_other_with_cast.d1n_1))
|
|
3310
2157
|
return false;
|
|
3311
|
-
if (!equals(this.
|
|
2158
|
+
if (!equals(this.e1n_1, tmp0_other_with_cast.e1n_1))
|
|
3312
2159
|
return false;
|
|
3313
|
-
if (!equals(this.
|
|
2160
|
+
if (!equals(this.f1n_1, tmp0_other_with_cast.f1n_1))
|
|
3314
2161
|
return false;
|
|
3315
|
-
if (!equals(this.
|
|
2162
|
+
if (!equals(this.g1n_1, tmp0_other_with_cast.g1n_1))
|
|
3316
2163
|
return false;
|
|
3317
|
-
if (!equals(this.
|
|
2164
|
+
if (!equals(this.h1n_1, tmp0_other_with_cast.h1n_1))
|
|
3318
2165
|
return false;
|
|
3319
2166
|
return true;
|
|
3320
2167
|
};
|
|
3321
2168
|
function XYZColorSpace() {
|
|
3322
2169
|
}
|
|
3323
2170
|
function XYZColorSpace_0(whitePoint) {
|
|
3324
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
2171
|
+
return whitePoint.equals(Illuminant_getInstance().c1o_1) ? XYZColorSpaces_getInstance().u1n_1 : whitePoint.equals(Illuminant_getInstance().a1o_1) ? XYZColorSpaces_getInstance().v1n_1 : new XYZColorSpaceImpl(whitePoint);
|
|
3325
2172
|
}
|
|
3326
2173
|
function XYZColorSpaces() {
|
|
3327
2174
|
XYZColorSpaces_instance = this;
|
|
3328
|
-
this.
|
|
3329
|
-
this.
|
|
2175
|
+
this.u1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().c1o_1);
|
|
2176
|
+
this.v1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().a1o_1);
|
|
3330
2177
|
}
|
|
3331
2178
|
var XYZColorSpaces_instance;
|
|
3332
2179
|
function XYZColorSpaces_getInstance() {
|
|
@@ -3337,64 +2184,37 @@
|
|
|
3337
2184
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
3338
2185
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
3339
2186
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
3340
|
-
var dstWp = _this__u8e3s4.
|
|
3341
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
3342
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
2187
|
+
var dstWp = _this__u8e3s4.t1n().o1p_1;
|
|
2188
|
+
var src = dot_0(xyzToLms, srcWp.s1q(), srcWp.r1q_1, srcWp.t1q());
|
|
2189
|
+
var dst = dot_0(xyzToLms, dstWp.s1q(), dstWp.r1q_1, dstWp.t1q());
|
|
3343
2190
|
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);
|
|
3344
2191
|
}
|
|
3345
2192
|
function XYZColorSpaceImpl(whitePoint) {
|
|
3346
|
-
this.
|
|
3347
|
-
this.
|
|
2193
|
+
this.g1s_1 = whitePoint;
|
|
2194
|
+
this.h1s_1 = zeroOneComponentInfo('XYZ');
|
|
3348
2195
|
}
|
|
3349
|
-
protoOf(XYZColorSpaceImpl).
|
|
3350
|
-
return this.
|
|
2196
|
+
protoOf(XYZColorSpaceImpl).t1n = function () {
|
|
2197
|
+
return this.g1s_1;
|
|
3351
2198
|
};
|
|
3352
|
-
protoOf(XYZColorSpaceImpl).
|
|
2199
|
+
protoOf(XYZColorSpaceImpl).w1 = function () {
|
|
3353
2200
|
return 'XYZ';
|
|
3354
2201
|
};
|
|
3355
|
-
protoOf(XYZColorSpaceImpl).
|
|
3356
|
-
return this
|
|
3357
|
-
};
|
|
3358
|
-
protoOf(XYZColorSpaceImpl).g1o = function (color) {
|
|
3359
|
-
return color.m1n().g1q(this);
|
|
3360
|
-
};
|
|
3361
|
-
protoOf(XYZColorSpaceImpl).n1o = function (components) {
|
|
3362
|
-
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3363
|
-
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3364
|
-
var size = this.m1o().m();
|
|
3365
|
-
var containsLower = size - 1 | 0;
|
|
3366
|
-
var containsArg = components.length;
|
|
3367
|
-
// Inline function 'kotlin.require' call
|
|
3368
|
-
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
3369
|
-
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
3370
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3371
|
-
}
|
|
3372
|
-
var tmp3 = components[0];
|
|
3373
|
-
var tmp4 = components[1];
|
|
3374
|
-
var tmp5 = components[2];
|
|
3375
|
-
// Inline function 'kotlin.collections.getOrElse' call
|
|
3376
|
-
var tmp;
|
|
3377
|
-
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
3378
|
-
tmp = components[3];
|
|
3379
|
-
} else {
|
|
3380
|
-
tmp = 1.0;
|
|
3381
|
-
}
|
|
3382
|
-
var p3 = tmp;
|
|
3383
|
-
return this.h1p(tmp3, tmp4, tmp5, p3);
|
|
2202
|
+
protoOf(XYZColorSpaceImpl).o1n = function (color) {
|
|
2203
|
+
return color.b1n().w1n(this);
|
|
3384
2204
|
};
|
|
3385
2205
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
3386
|
-
return 'XYZColorSpace(' + this.
|
|
2206
|
+
return 'XYZColorSpace(' + this.g1s_1.toString() + ')';
|
|
3387
2207
|
};
|
|
3388
|
-
protoOf(XYZColorSpaceImpl).
|
|
2208
|
+
protoOf(XYZColorSpaceImpl).s1p = function (x, y, z, alpha) {
|
|
3389
2209
|
return new XYZ(x, y, z, alpha, this);
|
|
3390
2210
|
};
|
|
3391
2211
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
3392
|
-
return this.
|
|
2212
|
+
return this.g1s_1.hashCode();
|
|
3393
2213
|
};
|
|
3394
2214
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
3395
2215
|
var tmp;
|
|
3396
2216
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
3397
|
-
tmp = this.
|
|
2217
|
+
tmp = this.g1s_1.equals(other.t1n());
|
|
3398
2218
|
} else {
|
|
3399
2219
|
tmp = false;
|
|
3400
2220
|
}
|
|
@@ -3410,26 +2230,26 @@
|
|
|
3410
2230
|
}
|
|
3411
2231
|
function xyY(x, y, Y) {
|
|
3412
2232
|
Y = Y === VOID ? 1.0 : Y;
|
|
3413
|
-
this.
|
|
3414
|
-
this.
|
|
3415
|
-
this.
|
|
2233
|
+
this.p1q_1 = x;
|
|
2234
|
+
this.q1q_1 = y;
|
|
2235
|
+
this.r1q_1 = Y;
|
|
3416
2236
|
}
|
|
3417
|
-
protoOf(xyY).
|
|
3418
|
-
return 1 - this.
|
|
2237
|
+
protoOf(xyY).b1s = function () {
|
|
2238
|
+
return 1 - this.p1q_1 - this.q1q_1;
|
|
3419
2239
|
};
|
|
3420
|
-
protoOf(xyY).
|
|
3421
|
-
return this.
|
|
2240
|
+
protoOf(xyY).s1q = function () {
|
|
2241
|
+
return this.p1q_1 * this.r1q_1 / this.q1q_1;
|
|
3422
2242
|
};
|
|
3423
|
-
protoOf(xyY).
|
|
3424
|
-
return (1 - this.
|
|
2243
|
+
protoOf(xyY).t1q = function () {
|
|
2244
|
+
return (1 - this.p1q_1 - this.q1q_1) * this.r1q_1 / this.q1q_1;
|
|
3425
2245
|
};
|
|
3426
2246
|
protoOf(xyY).toString = function () {
|
|
3427
|
-
return 'xyY(x=' + this.
|
|
2247
|
+
return 'xyY(x=' + this.p1q_1 + ', y=' + this.q1q_1 + ', Y=' + this.r1q_1 + ')';
|
|
3428
2248
|
};
|
|
3429
2249
|
protoOf(xyY).hashCode = function () {
|
|
3430
|
-
var result = getNumberHashCode(this.
|
|
3431
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3432
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2250
|
+
var result = getNumberHashCode(this.p1q_1);
|
|
2251
|
+
result = imul(result, 31) + getNumberHashCode(this.q1q_1) | 0;
|
|
2252
|
+
result = imul(result, 31) + getNumberHashCode(this.r1q_1) | 0;
|
|
3433
2253
|
return result;
|
|
3434
2254
|
};
|
|
3435
2255
|
protoOf(xyY).equals = function (other) {
|
|
@@ -3438,70 +2258,35 @@
|
|
|
3438
2258
|
if (!(other instanceof xyY))
|
|
3439
2259
|
return false;
|
|
3440
2260
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
3441
|
-
if (!equals(this.
|
|
2261
|
+
if (!equals(this.p1q_1, tmp0_other_with_cast.p1q_1))
|
|
3442
2262
|
return false;
|
|
3443
|
-
if (!equals(this.
|
|
2263
|
+
if (!equals(this.q1q_1, tmp0_other_with_cast.q1q_1))
|
|
3444
2264
|
return false;
|
|
3445
|
-
if (!equals(this.
|
|
2265
|
+
if (!equals(this.r1q_1, tmp0_other_with_cast.r1q_1))
|
|
3446
2266
|
return false;
|
|
3447
2267
|
return true;
|
|
3448
2268
|
};
|
|
3449
2269
|
//region block: post-declaration
|
|
3450
|
-
protoOf(HSL).
|
|
3451
|
-
protoOf(HSL).
|
|
3452
|
-
protoOf(HSL).
|
|
3453
|
-
protoOf(
|
|
3454
|
-
protoOf(
|
|
3455
|
-
protoOf(
|
|
3456
|
-
protoOf(
|
|
3457
|
-
protoOf(
|
|
3458
|
-
protoOf(
|
|
3459
|
-
protoOf(
|
|
3460
|
-
protoOf(
|
|
3461
|
-
protoOf(
|
|
3462
|
-
protoOf(
|
|
3463
|
-
protoOf(
|
|
3464
|
-
protoOf(
|
|
3465
|
-
protoOf(
|
|
3466
|
-
protoOf(
|
|
3467
|
-
protoOf(
|
|
3468
|
-
protoOf(LCHab).z1n = toHWB;
|
|
3469
|
-
protoOf(LCHab).a1o = toOklab;
|
|
3470
|
-
protoOf(LCHab).b1o = toOklch;
|
|
3471
|
-
protoOf(Oklab).g1n = toHSL;
|
|
3472
|
-
protoOf(Oklab).n1n = toLAB;
|
|
3473
|
-
protoOf(Oklab).t1n = toLCHab;
|
|
3474
|
-
protoOf(Oklab).z1n = toHWB;
|
|
3475
|
-
protoOf(Oklch).g1n = toHSL;
|
|
3476
|
-
protoOf(Oklch).n1n = toLAB;
|
|
3477
|
-
protoOf(Oklch).t1n = toLCHab;
|
|
3478
|
-
protoOf(Oklch).z1n = toHWB;
|
|
3479
|
-
protoOf(Companion_6).k1r = from255$default;
|
|
3480
|
-
protoOf(RGB).n1n = toLAB;
|
|
3481
|
-
protoOf(RGB).t1n = toLCHab;
|
|
3482
|
-
protoOf(RGB).b1o = toOklch;
|
|
3483
|
-
protoOf(SRGB).k1r = from255$default;
|
|
3484
|
-
protoOf(RGBColorSpaceImpl).g1s = invoke_0;
|
|
3485
|
-
protoOf(RGBColorSpaceImpl).g1p = invoke_1;
|
|
3486
|
-
protoOf(RGBColorSpaceImpl).l1r = from255;
|
|
3487
|
-
protoOf(RGBColorSpaceImpl).k1r = from255$default;
|
|
3488
|
-
protoOf(RGBInt).g1n = toHSL;
|
|
3489
|
-
protoOf(RGBInt).m1n = toXYZ;
|
|
3490
|
-
protoOf(RGBInt).n1n = toLAB;
|
|
3491
|
-
protoOf(RGBInt).t1n = toLCHab;
|
|
3492
|
-
protoOf(RGBInt).z1n = toHWB;
|
|
3493
|
-
protoOf(RGBInt).a1o = toOklab;
|
|
3494
|
-
protoOf(RGBInt).b1o = toOklch;
|
|
3495
|
-
protoOf(Companion_8).h1s = invoke$default;
|
|
3496
|
-
protoOf(XYZ).g1n = toHSL;
|
|
3497
|
-
protoOf(XYZ).t1n = toLCHab;
|
|
3498
|
-
protoOf(XYZ).z1n = toHWB;
|
|
3499
|
-
protoOf(XYZ).b1o = toOklch;
|
|
3500
|
-
protoOf(XYZColorSpaceImpl).g1s = invoke_2;
|
|
3501
|
-
protoOf(XYZColorSpaceImpl).h1s = invoke$default;
|
|
2270
|
+
protoOf(HSL).b1n = toXYZ;
|
|
2271
|
+
protoOf(HSL).c1n = toLAB;
|
|
2272
|
+
protoOf(HSL).i1n = toLCHab;
|
|
2273
|
+
protoOf(LAB).v1m = toHSL;
|
|
2274
|
+
protoOf(LABColorSpaceImpl).n1q = invoke;
|
|
2275
|
+
protoOf(LCHab).v1m = toHSL;
|
|
2276
|
+
protoOf(RGB).c1n = toLAB;
|
|
2277
|
+
protoOf(RGB).i1n = toLCHab;
|
|
2278
|
+
protoOf(RGBColorSpaceImpl).n1q = invoke_0;
|
|
2279
|
+
protoOf(RGBInt).v1m = toHSL;
|
|
2280
|
+
protoOf(RGBInt).b1n = toXYZ;
|
|
2281
|
+
protoOf(RGBInt).c1n = toLAB;
|
|
2282
|
+
protoOf(RGBInt).i1n = toLCHab;
|
|
2283
|
+
protoOf(Companion_4).o1q = invoke$default;
|
|
2284
|
+
protoOf(XYZ).v1m = toHSL;
|
|
2285
|
+
protoOf(XYZ).i1n = toLCHab;
|
|
2286
|
+
protoOf(XYZColorSpaceImpl).n1q = invoke_1;
|
|
2287
|
+
protoOf(XYZColorSpaceImpl).o1q = invoke$default;
|
|
3502
2288
|
//endregion
|
|
3503
2289
|
//region block: init
|
|
3504
|
-
Companion_instance_0 = new Companion();
|
|
3505
2290
|
PqNonlinearity_instance = new PqNonlinearity();
|
|
3506
2291
|
LinearTransferFunctions_instance = new LinearTransferFunctions();
|
|
3507
2292
|
SRGBTransferFunctions_instance = new SRGBTransferFunctions();
|
|
@@ -3510,10 +2295,8 @@
|
|
|
3510
2295
|
//region block: exports
|
|
3511
2296
|
_.$_$ = _.$_$ || {};
|
|
3512
2297
|
_.$_$.a = formatCssString;
|
|
3513
|
-
_.$_$.b =
|
|
3514
|
-
_.$_$.c =
|
|
3515
|
-
_.$_$.d = Companion_getInstance_6;
|
|
3516
|
-
_.$_$.e = Companion_instance_0;
|
|
2298
|
+
_.$_$.b = RenderCondition_ALWAYS_getInstance;
|
|
2299
|
+
_.$_$.c = Companion_getInstance_2;
|
|
3517
2300
|
//endregion
|
|
3518
2301
|
return _;
|
|
3519
2302
|
}));
|