@cruglobal/godtools-shared 0.9.1 → 0.9.2-PR482-SNAPSHOT.1329
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/88b0986a7186d029-atomicfu-js-ir.js +109 -31
- package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -1
- package/Napier-napier-js-ir.js +43 -46
- package/Napier-napier-js-ir.js.map +1 -1
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js +3314 -3631
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js.map +1 -1
- package/{colormath-root-colormath-js-ir.js → colormath-root-colormath.js} +985 -1391
- package/colormath-root-colormath.js.map +1 -0
- package/{fluid-locale-js-ir.js → fluid-locale.js} +325 -539
- package/fluid-locale.js.map +1 -0
- package/kotlin-kotlin-stdlib-js-ir.js +2461 -2841
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/{kotlin-mpp-godtools-tool-parser-common.js → kotlin-mpp-godtools-tool-parser-module-common.js} +2 -2
- package/{kotlin-mpp-godtools-tool-parser-parser-expressions.js → kotlin-mpp-godtools-tool-parser-module-parser-expressions.js} +547 -687
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js.map +1 -0
- package/{kotlin-mpp-godtools-tool-parser-parser.js → kotlin-mpp-godtools-tool-parser-module-parser.js} +3032 -4185
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -0
- package/{kotlin-mpp-godtools-tool-parser-state.js → kotlin-mpp-godtools-tool-parser-module-state.js} +253 -291
- package/kotlin-mpp-godtools-tool-parser-module-state.js.map +1 -0
- package/{kotlin-mpp-godtools-tool-parser-npm.d.ts → kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts} +2 -1
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js +26 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +6462 -4814
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/package.json +5 -4
- package/colormath-root-colormath-js-ir.js.map +0 -1
- package/fluid-locale-js-ir.js.map +0 -1
- package/kotlin-mpp-godtools-tool-parser-npm.js +0 -26
- package/kotlin-mpp-godtools-tool-parser-parser-expressions.js.map +0 -1
- package/kotlin-mpp-godtools-tool-parser-parser.js.map +0 -1
- package/kotlin-mpp-godtools-tool-parser-state.js.map +0 -1
- /package/{kotlin-mpp-godtools-tool-parser-common.js.map → kotlin-mpp-godtools-tool-parser-module-common.js.map} +0 -0
- /package/{kotlin-mpp-godtools-tool-parser-npm.js.map → kotlin-mpp-godtools-tool-parser-publishing-npm.js.map} +0 -0
|
@@ -5,104 +5,103 @@
|
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module 'colormath-root-colormath
|
|
8
|
+
throw new Error("Error loading module 'colormath-root-colormath'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'colormath-root-colormath'.");
|
|
9
9
|
}
|
|
10
|
-
root['colormath-root-colormath
|
|
10
|
+
root['colormath-root-colormath'] = factory(typeof this['colormath-root-colormath'] === 'undefined' ? {} : this['colormath-root-colormath'], this['kotlin-kotlin-stdlib-js-ir']);
|
|
11
11
|
}
|
|
12
12
|
}(this, function (_, kotlin_kotlin) {
|
|
13
13
|
'use strict';
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
19
|
-
var VOID = kotlin_kotlin.$_$.
|
|
20
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
21
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
22
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
23
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var Enum = kotlin_kotlin.$_$.
|
|
46
|
-
var equals = kotlin_kotlin.$_$.
|
|
47
|
-
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.
|
|
48
|
-
var dropLast_0 = kotlin_kotlin.$_$.
|
|
49
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
50
|
-
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.
|
|
51
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
52
|
-
var indexOf = kotlin_kotlin.$_$.
|
|
53
|
-
var take = kotlin_kotlin.$_$.
|
|
54
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
55
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
56
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
57
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
58
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
59
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
60
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
61
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
62
|
-
var toString = kotlin_kotlin.$_$.
|
|
63
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
64
|
-
var
|
|
65
|
-
var
|
|
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 toInt = kotlin_kotlin.$_$.
|
|
81
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
82
|
-
var slice = kotlin_kotlin.$_$.
|
|
83
|
-
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.
|
|
84
|
-
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.
|
|
85
|
-
var toByte = kotlin_kotlin.$_$.
|
|
86
|
-
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.
|
|
87
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
88
|
-
var isNumber = kotlin_kotlin.$_$.g6;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.s6;
|
|
18
|
+
var objectMeta = kotlin_kotlin.$_$.r6;
|
|
19
|
+
var VOID = kotlin_kotlin.$_$.w9;
|
|
20
|
+
var setMetadataFor = kotlin_kotlin.$_$.t6;
|
|
21
|
+
var interfaceMeta = kotlin_kotlin.$_$.g6;
|
|
22
|
+
var classMeta = kotlin_kotlin.$_$.x5;
|
|
23
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
24
|
+
var Companion_getInstance = kotlin_kotlin.$_$.k2;
|
|
25
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.v1;
|
|
26
|
+
var createFailure = kotlin_kotlin.$_$.m9;
|
|
27
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.y1;
|
|
28
|
+
var THROW_CCE = kotlin_kotlin.$_$.g9;
|
|
29
|
+
var isObject = kotlin_kotlin.$_$.k6;
|
|
30
|
+
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.x1;
|
|
31
|
+
var startsWith = kotlin_kotlin.$_$.d8;
|
|
32
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
33
|
+
var endsWith = kotlin_kotlin.$_$.q7;
|
|
34
|
+
var coerceAtLeast = kotlin_kotlin.$_$.c7;
|
|
35
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.y2;
|
|
36
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.e;
|
|
37
|
+
var get_lastIndex = kotlin_kotlin.$_$.v3;
|
|
38
|
+
var charSequenceLength = kotlin_kotlin.$_$.w5;
|
|
39
|
+
var coerceIn = kotlin_kotlin.$_$.e7;
|
|
40
|
+
var roundToInt = kotlin_kotlin.$_$.y6;
|
|
41
|
+
var coerceIn_0 = kotlin_kotlin.$_$.f7;
|
|
42
|
+
var toDouble = kotlin_kotlin.$_$.j8;
|
|
43
|
+
var dropLast = kotlin_kotlin.$_$.p7;
|
|
44
|
+
var Unit_getInstance = kotlin_kotlin.$_$.m2;
|
|
45
|
+
var Enum = kotlin_kotlin.$_$.v8;
|
|
46
|
+
var equals = kotlin_kotlin.$_$.a6;
|
|
47
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
48
|
+
var dropLast_0 = kotlin_kotlin.$_$.g3;
|
|
49
|
+
var joinTo = kotlin_kotlin.$_$.u3;
|
|
50
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.a2;
|
|
51
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.q1;
|
|
52
|
+
var indexOf = kotlin_kotlin.$_$.u7;
|
|
53
|
+
var take = kotlin_kotlin.$_$.f8;
|
|
54
|
+
var charArrayOf = kotlin_kotlin.$_$.u5;
|
|
55
|
+
var trimEnd = kotlin_kotlin.$_$.q8;
|
|
56
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.q9;
|
|
57
|
+
var isNaN_0 = kotlin_kotlin.$_$.o9;
|
|
58
|
+
var joinTo_0 = kotlin_kotlin.$_$.t3;
|
|
59
|
+
var numberToDouble = kotlin_kotlin.$_$.o6;
|
|
60
|
+
var getStringHashCode = kotlin_kotlin.$_$.e6;
|
|
61
|
+
var charSequenceGet = kotlin_kotlin.$_$.v5;
|
|
62
|
+
var toString = kotlin_kotlin.$_$.u1;
|
|
63
|
+
var copyToArray = kotlin_kotlin.$_$.f3;
|
|
64
|
+
var plus = kotlin_kotlin.$_$.g4;
|
|
65
|
+
var asList = kotlin_kotlin.$_$.w2;
|
|
66
|
+
var to = kotlin_kotlin.$_$.u9;
|
|
67
|
+
var mapOf = kotlin_kotlin.$_$.d4;
|
|
68
|
+
var withSign = kotlin_kotlin.$_$.z6;
|
|
69
|
+
var get_PI = kotlin_kotlin.$_$.x6;
|
|
70
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.a7;
|
|
71
|
+
var getNumberHashCode = kotlin_kotlin.$_$.c6;
|
|
72
|
+
var numberToInt = kotlin_kotlin.$_$.p6;
|
|
73
|
+
var FloatCompanionObject_getInstance = kotlin_kotlin.$_$.g2;
|
|
74
|
+
var hashCode = kotlin_kotlin.$_$.f6;
|
|
75
|
+
var isInterface = kotlin_kotlin.$_$.j6;
|
|
76
|
+
var toString_0 = kotlin_kotlin.$_$.w6;
|
|
77
|
+
var get_lastIndex_0 = kotlin_kotlin.$_$.x3;
|
|
78
|
+
var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.f2;
|
|
79
|
+
var Char = kotlin_kotlin.$_$.s8;
|
|
80
|
+
var toInt = kotlin_kotlin.$_$.m8;
|
|
81
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.l6;
|
|
82
|
+
var slice = kotlin_kotlin.$_$.z7;
|
|
83
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.b2;
|
|
84
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.c2;
|
|
85
|
+
var toByte = kotlin_kotlin.$_$.u6;
|
|
86
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.z1;
|
|
87
|
+
var objectCreate = kotlin_kotlin.$_$.q6;
|
|
89
88
|
//endregion
|
|
90
89
|
//region block: pre-declaration
|
|
91
90
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
92
91
|
function toHSL() {
|
|
93
|
-
return this.
|
|
92
|
+
return this.y1g().z1g();
|
|
94
93
|
}
|
|
95
94
|
function toXYZ() {
|
|
96
|
-
return this.
|
|
95
|
+
return this.y1g().f1h();
|
|
97
96
|
}
|
|
98
97
|
function toLAB() {
|
|
99
|
-
return this.
|
|
98
|
+
return this.f1h().g1h();
|
|
100
99
|
}
|
|
101
100
|
function toLCHab() {
|
|
102
|
-
return this.
|
|
101
|
+
return this.g1h().m1h();
|
|
103
102
|
}
|
|
104
103
|
function toHWB() {
|
|
105
|
-
return this.
|
|
104
|
+
return this.y1g().s1h();
|
|
106
105
|
}
|
|
107
106
|
setMetadataFor(Color, 'Color', interfaceMeta);
|
|
108
107
|
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
@@ -120,7 +119,7 @@
|
|
|
120
119
|
setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
|
|
121
120
|
setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
|
|
122
121
|
function invoke(l, a, b, alpha) {
|
|
123
|
-
return this.
|
|
122
|
+
return this.r1i(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
124
123
|
}
|
|
125
124
|
setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
126
125
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [LABColorSpace]);
|
|
@@ -134,14 +133,14 @@
|
|
|
134
133
|
setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
|
|
135
134
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
136
135
|
function invoke_0(r, g, b, alpha) {
|
|
137
|
-
return this.
|
|
136
|
+
return this.r1i(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
138
137
|
}
|
|
139
138
|
function from255(r, g, b, alpha) {
|
|
140
|
-
return this.
|
|
139
|
+
return this.r1i(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
141
140
|
}
|
|
142
141
|
function from255$default(r, g, b, alpha, $super) {
|
|
143
142
|
alpha = alpha === VOID ? 255 : alpha;
|
|
144
|
-
return $super === VOID ? this.
|
|
143
|
+
return $super === VOID ? this.n1k(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
145
144
|
}
|
|
146
145
|
function invoke_1(hex) {
|
|
147
146
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -161,7 +160,7 @@
|
|
|
161
160
|
} else {
|
|
162
161
|
tmp_2 = 255;
|
|
163
162
|
}
|
|
164
|
-
return this.
|
|
163
|
+
return this.n1k(tmp, tmp_0, tmp_1, tmp_2);
|
|
165
164
|
}
|
|
166
165
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
167
166
|
setMetadataFor(Companion_4, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -177,11 +176,11 @@
|
|
|
177
176
|
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
178
177
|
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
179
178
|
function invoke_2(x, y, z, alpha) {
|
|
180
|
-
return this.
|
|
179
|
+
return this.r1i(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
181
180
|
}
|
|
182
181
|
function invoke$default(x, y, z, alpha, $super) {
|
|
183
182
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
184
|
-
return $super === VOID ? this.
|
|
183
|
+
return $super === VOID ? this.p1l(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
185
184
|
}
|
|
186
185
|
setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
187
186
|
setMetadataFor(Companion_5, 'Companion', objectMeta, VOID, [XYZColorSpace]);
|
|
@@ -202,13 +201,13 @@
|
|
|
202
201
|
function Color() {
|
|
203
202
|
}
|
|
204
203
|
function convertTo(_this__u8e3s4, space) {
|
|
205
|
-
return space.
|
|
204
|
+
return space.t1h(_this__u8e3s4);
|
|
206
205
|
}
|
|
207
206
|
function WhitePointColorSpace() {
|
|
208
207
|
}
|
|
209
208
|
function ColorComponentInfo(name, isPolar) {
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
209
|
+
this.w1h_1 = name;
|
|
210
|
+
this.x1h_1 = isPolar;
|
|
212
211
|
}
|
|
213
212
|
function parse(_this__u8e3s4, color) {
|
|
214
213
|
var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color);
|
|
@@ -221,82 +220,64 @@
|
|
|
221
220
|
return tmp;
|
|
222
221
|
}
|
|
223
222
|
function parseOrNull(_this__u8e3s4, color_0) {
|
|
224
|
-
var keywordColor = CssColors_getInstance().
|
|
223
|
+
var keywordColor = CssColors_getInstance().y1h_1.f2(color_0);
|
|
225
224
|
var tmp;
|
|
226
225
|
if (!(keywordColor == null)) {
|
|
227
226
|
tmp = keywordColor;
|
|
228
227
|
} else if (startsWith(color_0, '#')) {
|
|
229
|
-
var tmp$ret$4;
|
|
230
228
|
// Inline function 'kotlin.Result.getOrNull' call
|
|
231
|
-
var tmp$ret$3;
|
|
232
229
|
// Inline function 'kotlin.runCatching' call
|
|
233
230
|
var tmp_0;
|
|
234
231
|
try {
|
|
235
|
-
var tmp$ret$1;
|
|
236
232
|
// Inline function 'kotlin.Companion.success' call
|
|
237
|
-
|
|
238
|
-
var tmp$ret$0;
|
|
233
|
+
Companion_getInstance();
|
|
239
234
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
tmp$ret$1 = _Result___init__impl__xyqfz8(tmp1_success);
|
|
243
|
-
tmp_0 = tmp$ret$1;
|
|
235
|
+
var tmp1_success = Companion_getInstance_5().q1i(color_0);
|
|
236
|
+
tmp_0 = _Result___init__impl__xyqfz8(tmp1_success);
|
|
244
237
|
} catch ($p) {
|
|
245
238
|
var tmp_1;
|
|
246
239
|
if ($p instanceof Error) {
|
|
247
240
|
var e = $p;
|
|
248
|
-
var tmp$ret$2;
|
|
249
241
|
// Inline function 'kotlin.Companion.failure' call
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
tmp_1 = tmp$ret$2;
|
|
242
|
+
Companion_getInstance();
|
|
243
|
+
tmp_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
253
244
|
} else {
|
|
254
245
|
throw $p;
|
|
255
246
|
}
|
|
256
247
|
tmp_0 = tmp_1;
|
|
257
248
|
}
|
|
258
|
-
|
|
259
|
-
var tmp3_getOrNull = tmp$ret$3;
|
|
249
|
+
var tmp0_getOrNull = tmp_0;
|
|
260
250
|
var tmp_2;
|
|
261
|
-
if (_Result___get_isFailure__impl__jpiriv(
|
|
251
|
+
if (_Result___get_isFailure__impl__jpiriv(tmp0_getOrNull)) {
|
|
262
252
|
tmp_2 = null;
|
|
263
253
|
} else {
|
|
264
|
-
var tmp_3 = _Result___get_value__impl__bjfvqg(
|
|
254
|
+
var tmp_3 = _Result___get_value__impl__bjfvqg(tmp0_getOrNull);
|
|
265
255
|
tmp_2 = (tmp_3 == null ? true : isObject(tmp_3)) ? tmp_3 : THROW_CCE();
|
|
266
256
|
}
|
|
267
|
-
tmp
|
|
268
|
-
tmp = tmp$ret$4;
|
|
257
|
+
tmp = tmp_2;
|
|
269
258
|
} else {
|
|
270
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().
|
|
259
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().f1i_1.vc(color_0);
|
|
271
260
|
var tmp_4;
|
|
272
261
|
if (tmp0_safe_receiver == null) {
|
|
273
262
|
tmp_4 = null;
|
|
274
263
|
} else {
|
|
275
|
-
var tmp$ret$6;
|
|
276
264
|
// Inline function 'kotlin.let' call
|
|
277
265
|
// Inline function 'kotlin.contracts.contract' call
|
|
278
|
-
var tmp$ret$5;
|
|
279
266
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
280
|
-
|
|
281
|
-
tmp$ret$6 = tmp$ret$5;
|
|
282
|
-
tmp_4 = tmp$ret$6;
|
|
267
|
+
tmp_4 = rgb(tmp0_safe_receiver);
|
|
283
268
|
}
|
|
284
269
|
var tmp2_elvis_lhs = tmp_4;
|
|
285
270
|
var tmp_5;
|
|
286
271
|
if (tmp2_elvis_lhs == null) {
|
|
287
|
-
var tmp1_safe_receiver = PATTERNS_getInstance().
|
|
272
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().g1i_1.vc(color_0);
|
|
288
273
|
var tmp_6;
|
|
289
274
|
if (tmp1_safe_receiver == null) {
|
|
290
275
|
tmp_6 = null;
|
|
291
276
|
} else {
|
|
292
|
-
var tmp$ret$8;
|
|
293
277
|
// Inline function 'kotlin.let' call
|
|
294
278
|
// Inline function 'kotlin.contracts.contract' call
|
|
295
|
-
var tmp$ret$7;
|
|
296
279
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
297
|
-
|
|
298
|
-
tmp$ret$8 = tmp$ret$7;
|
|
299
|
-
tmp_6 = tmp$ret$8;
|
|
280
|
+
tmp_6 = rgb(tmp1_safe_receiver);
|
|
300
281
|
}
|
|
301
282
|
tmp_5 = tmp_6;
|
|
302
283
|
} else {
|
|
@@ -305,19 +286,15 @@
|
|
|
305
286
|
var tmp4_elvis_lhs = tmp_5;
|
|
306
287
|
var tmp_7;
|
|
307
288
|
if (tmp4_elvis_lhs == null) {
|
|
308
|
-
var tmp3_safe_receiver = PATTERNS_getInstance().
|
|
289
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().h1i_1.vc(color_0);
|
|
309
290
|
var tmp_8;
|
|
310
291
|
if (tmp3_safe_receiver == null) {
|
|
311
292
|
tmp_8 = null;
|
|
312
293
|
} else {
|
|
313
|
-
var tmp$ret$10;
|
|
314
294
|
// Inline function 'kotlin.let' call
|
|
315
295
|
// Inline function 'kotlin.contracts.contract' call
|
|
316
|
-
var tmp$ret$9;
|
|
317
296
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
318
|
-
|
|
319
|
-
tmp$ret$10 = tmp$ret$9;
|
|
320
|
-
tmp_8 = tmp$ret$10;
|
|
297
|
+
tmp_8 = rgb(tmp3_safe_receiver);
|
|
321
298
|
}
|
|
322
299
|
tmp_7 = tmp_8;
|
|
323
300
|
} else {
|
|
@@ -326,19 +303,15 @@
|
|
|
326
303
|
var tmp6_elvis_lhs = tmp_7;
|
|
327
304
|
var tmp_9;
|
|
328
305
|
if (tmp6_elvis_lhs == null) {
|
|
329
|
-
var tmp5_safe_receiver = PATTERNS_getInstance().
|
|
306
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().i1i_1.vc(color_0);
|
|
330
307
|
var tmp_10;
|
|
331
308
|
if (tmp5_safe_receiver == null) {
|
|
332
309
|
tmp_10 = null;
|
|
333
310
|
} else {
|
|
334
|
-
var tmp$ret$12;
|
|
335
311
|
// Inline function 'kotlin.let' call
|
|
336
312
|
// Inline function 'kotlin.contracts.contract' call
|
|
337
|
-
var tmp$ret$11;
|
|
338
313
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
339
|
-
|
|
340
|
-
tmp$ret$12 = tmp$ret$11;
|
|
341
|
-
tmp_10 = tmp$ret$12;
|
|
314
|
+
tmp_10 = rgb(tmp5_safe_receiver);
|
|
342
315
|
}
|
|
343
316
|
tmp_9 = tmp_10;
|
|
344
317
|
} else {
|
|
@@ -347,19 +320,15 @@
|
|
|
347
320
|
var tmp8_elvis_lhs = tmp_9;
|
|
348
321
|
var tmp_11;
|
|
349
322
|
if (tmp8_elvis_lhs == null) {
|
|
350
|
-
var tmp7_safe_receiver = PATTERNS_getInstance().
|
|
323
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().j1i_1.vc(color_0);
|
|
351
324
|
var tmp_12;
|
|
352
325
|
if (tmp7_safe_receiver == null) {
|
|
353
326
|
tmp_12 = null;
|
|
354
327
|
} else {
|
|
355
|
-
var tmp$ret$14;
|
|
356
328
|
// Inline function 'kotlin.let' call
|
|
357
329
|
// Inline function 'kotlin.contracts.contract' call
|
|
358
|
-
var tmp$ret$13;
|
|
359
330
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
360
|
-
|
|
361
|
-
tmp$ret$14 = tmp$ret$13;
|
|
362
|
-
tmp_12 = tmp$ret$14;
|
|
331
|
+
tmp_12 = hsl(tmp7_safe_receiver);
|
|
363
332
|
}
|
|
364
333
|
tmp_11 = tmp_12;
|
|
365
334
|
} else {
|
|
@@ -368,19 +337,15 @@
|
|
|
368
337
|
var tmp10_elvis_lhs = tmp_11;
|
|
369
338
|
var tmp_13;
|
|
370
339
|
if (tmp10_elvis_lhs == null) {
|
|
371
|
-
var tmp9_safe_receiver = PATTERNS_getInstance().
|
|
340
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().k1i_1.vc(color_0);
|
|
372
341
|
var tmp_14;
|
|
373
342
|
if (tmp9_safe_receiver == null) {
|
|
374
343
|
tmp_14 = null;
|
|
375
344
|
} else {
|
|
376
|
-
var tmp$ret$16;
|
|
377
345
|
// Inline function 'kotlin.let' call
|
|
378
346
|
// Inline function 'kotlin.contracts.contract' call
|
|
379
|
-
var tmp$ret$15;
|
|
380
347
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
381
|
-
|
|
382
|
-
tmp$ret$16 = tmp$ret$15;
|
|
383
|
-
tmp_14 = tmp$ret$16;
|
|
348
|
+
tmp_14 = hsl(tmp9_safe_receiver);
|
|
384
349
|
}
|
|
385
350
|
tmp_13 = tmp_14;
|
|
386
351
|
} else {
|
|
@@ -389,19 +354,15 @@
|
|
|
389
354
|
var tmp12_elvis_lhs = tmp_13;
|
|
390
355
|
var tmp_15;
|
|
391
356
|
if (tmp12_elvis_lhs == null) {
|
|
392
|
-
var tmp11_safe_receiver = PATTERNS_getInstance().
|
|
357
|
+
var tmp11_safe_receiver = PATTERNS_getInstance().l1i_1.vc(color_0);
|
|
393
358
|
var tmp_16;
|
|
394
359
|
if (tmp11_safe_receiver == null) {
|
|
395
360
|
tmp_16 = null;
|
|
396
361
|
} else {
|
|
397
|
-
var tmp$ret$18;
|
|
398
362
|
// Inline function 'kotlin.let' call
|
|
399
363
|
// Inline function 'kotlin.contracts.contract' call
|
|
400
|
-
var tmp$ret$17;
|
|
401
364
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
402
|
-
|
|
403
|
-
tmp$ret$18 = tmp$ret$17;
|
|
404
|
-
tmp_16 = tmp$ret$18;
|
|
365
|
+
tmp_16 = lab(tmp11_safe_receiver);
|
|
405
366
|
}
|
|
406
367
|
tmp_15 = tmp_16;
|
|
407
368
|
} else {
|
|
@@ -410,19 +371,15 @@
|
|
|
410
371
|
var tmp14_elvis_lhs = tmp_15;
|
|
411
372
|
var tmp_17;
|
|
412
373
|
if (tmp14_elvis_lhs == null) {
|
|
413
|
-
var tmp13_safe_receiver = PATTERNS_getInstance().
|
|
374
|
+
var tmp13_safe_receiver = PATTERNS_getInstance().m1i_1.vc(color_0);
|
|
414
375
|
var tmp_18;
|
|
415
376
|
if (tmp13_safe_receiver == null) {
|
|
416
377
|
tmp_18 = null;
|
|
417
378
|
} else {
|
|
418
|
-
var tmp$ret$20;
|
|
419
379
|
// Inline function 'kotlin.let' call
|
|
420
380
|
// Inline function 'kotlin.contracts.contract' call
|
|
421
|
-
var tmp$ret$19;
|
|
422
381
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
423
|
-
|
|
424
|
-
tmp$ret$20 = tmp$ret$19;
|
|
425
|
-
tmp_18 = tmp$ret$20;
|
|
382
|
+
tmp_18 = lch(tmp13_safe_receiver);
|
|
426
383
|
}
|
|
427
384
|
tmp_17 = tmp_18;
|
|
428
385
|
} else {
|
|
@@ -431,19 +388,15 @@
|
|
|
431
388
|
var tmp16_elvis_lhs = tmp_17;
|
|
432
389
|
var tmp_19;
|
|
433
390
|
if (tmp16_elvis_lhs == null) {
|
|
434
|
-
var tmp15_safe_receiver = PATTERNS_getInstance().
|
|
391
|
+
var tmp15_safe_receiver = PATTERNS_getInstance().n1i_1.vc(color_0);
|
|
435
392
|
var tmp_20;
|
|
436
393
|
if (tmp15_safe_receiver == null) {
|
|
437
394
|
tmp_20 = null;
|
|
438
395
|
} else {
|
|
439
|
-
var tmp$ret$22;
|
|
440
396
|
// Inline function 'kotlin.let' call
|
|
441
397
|
// Inline function 'kotlin.contracts.contract' call
|
|
442
|
-
var tmp$ret$21;
|
|
443
398
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
444
|
-
|
|
445
|
-
tmp$ret$22 = tmp$ret$21;
|
|
446
|
-
tmp_20 = tmp$ret$22;
|
|
399
|
+
tmp_20 = hwb(tmp15_safe_receiver);
|
|
447
400
|
}
|
|
448
401
|
tmp_19 = tmp_20;
|
|
449
402
|
} else {
|
|
@@ -452,19 +405,15 @@
|
|
|
452
405
|
var tmp18_elvis_lhs = tmp_19;
|
|
453
406
|
var tmp_21;
|
|
454
407
|
if (tmp18_elvis_lhs == null) {
|
|
455
|
-
var tmp17_safe_receiver = PATTERNS_getInstance().
|
|
408
|
+
var tmp17_safe_receiver = PATTERNS_getInstance().o1i_1.vc(color_0);
|
|
456
409
|
var tmp_22;
|
|
457
410
|
if (tmp17_safe_receiver == null) {
|
|
458
411
|
tmp_22 = null;
|
|
459
412
|
} else {
|
|
460
|
-
var tmp$ret$24;
|
|
461
413
|
// Inline function 'kotlin.let' call
|
|
462
414
|
// Inline function 'kotlin.contracts.contract' call
|
|
463
|
-
var tmp$ret$23;
|
|
464
415
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
465
|
-
|
|
466
|
-
tmp$ret$24 = tmp$ret$23;
|
|
467
|
-
tmp_22 = tmp$ret$24;
|
|
416
|
+
tmp_22 = color(tmp17_safe_receiver);
|
|
468
417
|
}
|
|
469
418
|
tmp_21 = tmp_22;
|
|
470
419
|
} else {
|
|
@@ -476,22 +425,22 @@
|
|
|
476
425
|
}
|
|
477
426
|
function PATTERNS() {
|
|
478
427
|
PATTERNS_instance = this;
|
|
479
|
-
this.
|
|
480
|
-
this.
|
|
481
|
-
this.
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
487
|
-
this.
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
490
|
-
this.
|
|
491
|
-
this.
|
|
492
|
-
this.
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
428
|
+
this.z1h_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
429
|
+
this.a1i_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%';
|
|
430
|
+
this.b1i_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
431
|
+
this.c1i_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
432
|
+
this.d1i_1 = '(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
433
|
+
this.e1i_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?';
|
|
434
|
+
this.f1i_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
435
|
+
this.g1i_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
436
|
+
this.h1i_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
437
|
+
this.i1i_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
438
|
+
this.j1i_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
439
|
+
this.k1i_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
440
|
+
this.l1i_1 = Regex_init_$Create$('lab\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
441
|
+
this.m1i_1 = Regex_init_$Create$('lch\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
442
|
+
this.n1i_1 = Regex_init_$Create$('hwb\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
443
|
+
this.o1i_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?(?:\\s+[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
495
444
|
}
|
|
496
445
|
var PATTERNS_instance;
|
|
497
446
|
function PATTERNS_getInstance() {
|
|
@@ -500,147 +449,126 @@
|
|
|
500
449
|
return PATTERNS_instance;
|
|
501
450
|
}
|
|
502
451
|
function rgb(match) {
|
|
503
|
-
var r = percentOrNumber(match.
|
|
504
|
-
var g = percentOrNumber(match.
|
|
505
|
-
var b = percentOrNumber(match.
|
|
506
|
-
var a = alpha(match.
|
|
452
|
+
var r = percentOrNumber(match.qd().k(1));
|
|
453
|
+
var g = percentOrNumber(match.qd().k(2));
|
|
454
|
+
var b = percentOrNumber(match.qd().k(3));
|
|
455
|
+
var a = alpha(match.qd().k(4));
|
|
507
456
|
var tmp;
|
|
508
|
-
if (endsWith(match.
|
|
509
|
-
tmp = Companion_getInstance_5().
|
|
457
|
+
if (endsWith(match.qd().k(1), '%')) {
|
|
458
|
+
tmp = Companion_getInstance_5().r1i(clampF(r), clampF(g), clampF(b), a);
|
|
510
459
|
} else {
|
|
511
|
-
tmp = Companion_getInstance_5().
|
|
460
|
+
tmp = Companion_getInstance_5().r1i(clampInt(r) / 255.0, clampInt(g) / 255.0, clampInt(b) / 255.0, a);
|
|
512
461
|
}
|
|
513
462
|
return tmp;
|
|
514
463
|
}
|
|
515
464
|
function hsl(match) {
|
|
516
|
-
var h = hue(match.
|
|
517
|
-
var s = percent(match.
|
|
518
|
-
var l = percent(match.
|
|
519
|
-
var a = alpha(match.
|
|
465
|
+
var h = hue(match.qd().k(1));
|
|
466
|
+
var s = percent(match.qd().k(2));
|
|
467
|
+
var l = percent(match.qd().k(3));
|
|
468
|
+
var a = alpha(match.qd().k(4));
|
|
520
469
|
return new HSL(h, clampF(s), clampF(l), clampF(a));
|
|
521
470
|
}
|
|
522
471
|
function lab(match) {
|
|
523
|
-
var l = percent(match.
|
|
524
|
-
var a = number(match.
|
|
525
|
-
var b = number(match.
|
|
526
|
-
var alpha_0 = alpha(match.
|
|
527
|
-
return Companion_getInstance_3().
|
|
472
|
+
var l = percent(match.qd().k(1));
|
|
473
|
+
var a = number(match.qd().k(2));
|
|
474
|
+
var b = number(match.qd().k(3));
|
|
475
|
+
var alpha_0 = alpha(match.qd().k(4));
|
|
476
|
+
return Companion_getInstance_3().r1i(coerceAtLeast(l, 0.0) * 100.0, a, b, alpha_0);
|
|
528
477
|
}
|
|
529
478
|
function lch(match) {
|
|
530
|
-
var l = percent(match.
|
|
531
|
-
var c = number(match.
|
|
532
|
-
var h = hue(match.
|
|
533
|
-
var a = alpha(match.
|
|
534
|
-
return Companion_getInstance_4().
|
|
479
|
+
var l = percent(match.qd().k(1));
|
|
480
|
+
var c = number(match.qd().k(2));
|
|
481
|
+
var h = hue(match.qd().k(3));
|
|
482
|
+
var a = alpha(match.qd().k(4));
|
|
483
|
+
return Companion_getInstance_4().r1i(coerceAtLeast(l, 0.0) * 100.0, coerceAtLeast(c, 0.0), h, a);
|
|
535
484
|
}
|
|
536
485
|
function hwb(match) {
|
|
537
|
-
var h = hue(match.
|
|
538
|
-
var w = percent(match.
|
|
539
|
-
var b = percent(match.
|
|
540
|
-
var a = alpha(match.
|
|
486
|
+
var h = hue(match.qd().k(1));
|
|
487
|
+
var w = percent(match.qd().k(2));
|
|
488
|
+
var b = percent(match.qd().k(3));
|
|
489
|
+
var a = alpha(match.qd().k(4));
|
|
541
490
|
return new HWB(h, clampF(w), clampF(b), a);
|
|
542
491
|
}
|
|
543
492
|
function color(match) {
|
|
544
|
-
var tmp0_subject = match.wc().j(1);
|
|
545
493
|
var tmp;
|
|
546
|
-
switch (
|
|
494
|
+
switch (match.qd().k(1)) {
|
|
547
495
|
case 'srgb':
|
|
548
496
|
tmp = SRGB_getInstance();
|
|
549
497
|
break;
|
|
550
498
|
case 'display-p3':
|
|
551
|
-
tmp = RGBColorSpaces_getInstance().
|
|
499
|
+
tmp = RGBColorSpaces_getInstance().e1j_1;
|
|
552
500
|
break;
|
|
553
501
|
case 'a98-rgb':
|
|
554
|
-
tmp = RGBColorSpaces_getInstance().
|
|
502
|
+
tmp = RGBColorSpaces_getInstance().a1j_1;
|
|
555
503
|
break;
|
|
556
504
|
case 'prophoto-rgb':
|
|
557
|
-
tmp = RGBColorSpaces_getInstance().
|
|
505
|
+
tmp = RGBColorSpaces_getInstance().f1j_1;
|
|
558
506
|
break;
|
|
559
507
|
case 'rec2020':
|
|
560
|
-
tmp = RGBColorSpaces_getInstance().
|
|
508
|
+
tmp = RGBColorSpaces_getInstance().b1j_1;
|
|
561
509
|
break;
|
|
562
510
|
case 'xyz':
|
|
563
|
-
tmp = XYZColorSpaces_getInstance().
|
|
511
|
+
tmp = XYZColorSpaces_getInstance().h1j_1;
|
|
564
512
|
break;
|
|
565
513
|
default:
|
|
566
514
|
return null;
|
|
567
515
|
}
|
|
568
516
|
var space = tmp;
|
|
569
|
-
var tmp$ret$3;
|
|
570
517
|
// Inline function 'kotlin.collections.map' call
|
|
571
|
-
var tmp$ret$0;
|
|
572
518
|
// Inline function 'kotlin.text.split' call
|
|
573
|
-
var tmp0_split = match.
|
|
574
|
-
var
|
|
575
|
-
tmp$ret$0 = tmp1_split.fc(tmp0_split, 0);
|
|
576
|
-
var tmp3_map = tmp$ret$0;
|
|
577
|
-
var tmp$ret$2;
|
|
519
|
+
var tmp0_split = match.qd().k(2);
|
|
520
|
+
var tmp2_map = Regex_init_$Create$('\\s+').zc(tmp0_split, 0);
|
|
578
521
|
// Inline function 'kotlin.collections.mapTo' call
|
|
579
|
-
var
|
|
580
|
-
var tmp0_iterator =
|
|
522
|
+
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp2_map, 10));
|
|
523
|
+
var tmp0_iterator = tmp2_map.f();
|
|
581
524
|
while (tmp0_iterator.g()) {
|
|
582
525
|
var item = tmp0_iterator.h();
|
|
583
526
|
var tmp$ret$1;
|
|
584
527
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
585
528
|
tmp$ret$1 = clampF(percentOrNumber(item));
|
|
586
|
-
|
|
529
|
+
tmp0_mapTo.a(tmp$ret$1);
|
|
587
530
|
}
|
|
588
|
-
|
|
589
|
-
tmp$ret$3 = tmp$ret$2;
|
|
590
|
-
var values = tmp$ret$3;
|
|
531
|
+
var values = tmp0_mapTo;
|
|
591
532
|
var tmp$ret$10;
|
|
592
533
|
// Inline function 'kotlin.floatArrayOf' call
|
|
593
|
-
var tmp$ret$5;
|
|
594
534
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
595
535
|
var tmp_0;
|
|
596
536
|
if (0 <= get_lastIndex(values)) {
|
|
597
|
-
tmp_0 = values.
|
|
537
|
+
tmp_0 = values.k(0);
|
|
598
538
|
} else {
|
|
599
|
-
var tmp$ret$4;
|
|
600
539
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
601
|
-
|
|
602
|
-
tmp_0 = tmp$ret$4;
|
|
540
|
+
tmp_0 = 0.0;
|
|
603
541
|
}
|
|
604
|
-
|
|
605
|
-
var tmp_1 = tmp$ret$5;
|
|
606
|
-
var tmp$ret$7;
|
|
542
|
+
var tmp_1 = tmp_0;
|
|
607
543
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
608
544
|
var tmp_2;
|
|
609
545
|
if (1 <= get_lastIndex(values)) {
|
|
610
|
-
tmp_2 = values.
|
|
546
|
+
tmp_2 = values.k(1);
|
|
611
547
|
} else {
|
|
612
|
-
var tmp$ret$6;
|
|
613
548
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
614
|
-
|
|
615
|
-
tmp_2 = tmp$ret$6;
|
|
549
|
+
tmp_2 = 0.0;
|
|
616
550
|
}
|
|
617
|
-
|
|
618
|
-
var tmp_3 = tmp$ret$7;
|
|
551
|
+
var tmp_3 = tmp_2;
|
|
619
552
|
var tmp$ret$9;
|
|
620
553
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
621
554
|
var tmp_4;
|
|
622
555
|
if (2 <= get_lastIndex(values)) {
|
|
623
|
-
tmp_4 = values.
|
|
556
|
+
tmp_4 = values.k(2);
|
|
624
557
|
} else {
|
|
625
|
-
var tmp$ret$8;
|
|
626
558
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
627
|
-
|
|
628
|
-
tmp_4 = tmp$ret$8;
|
|
559
|
+
tmp_4 = 0.0;
|
|
629
560
|
}
|
|
630
561
|
tmp$ret$9 = tmp_4;
|
|
631
|
-
|
|
632
|
-
tmp$ret$10
|
|
633
|
-
return space.d2m(tmp$ret$10);
|
|
562
|
+
tmp$ret$10 = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.qd().k(3))]);
|
|
563
|
+
return space.v1h(tmp$ret$10);
|
|
634
564
|
}
|
|
635
565
|
function percentOrNumber(str) {
|
|
636
566
|
return endsWith(str, '%') ? percent(str) : number(str);
|
|
637
567
|
}
|
|
638
568
|
function alpha(str) {
|
|
639
569
|
var tmp;
|
|
640
|
-
var tmp$ret$0;
|
|
641
570
|
// Inline function 'kotlin.text.isEmpty' call
|
|
642
|
-
|
|
643
|
-
if (tmp$ret$0) {
|
|
571
|
+
if (charSequenceLength(str) === 0) {
|
|
644
572
|
tmp = 1.0;
|
|
645
573
|
} else {
|
|
646
574
|
tmp = percentOrNumber(str);
|
|
@@ -663,99 +591,56 @@
|
|
|
663
591
|
function hue(str) {
|
|
664
592
|
var tmp;
|
|
665
593
|
if (endsWith(str, 'deg')) {
|
|
666
|
-
var tmp$ret$2;
|
|
667
594
|
// Inline function 'kotlin.text.toFloat' call
|
|
668
|
-
var
|
|
669
|
-
var tmp$ret$1;
|
|
595
|
+
var tmp0_toFloat = dropLast(str, 3);
|
|
670
596
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
671
|
-
var tmp0_unsafeCast = toDouble(tmp1_toFloat);
|
|
672
|
-
var tmp$ret$0;
|
|
673
597
|
// Inline function 'kotlin.js.asDynamic' call
|
|
674
|
-
tmp
|
|
675
|
-
tmp$ret$1 = tmp$ret$0;
|
|
676
|
-
tmp$ret$2 = tmp$ret$1;
|
|
677
|
-
tmp = tmp$ret$2;
|
|
598
|
+
tmp = toDouble(tmp0_toFloat);
|
|
678
599
|
} else if (endsWith(str, 'grad')) {
|
|
679
600
|
var tmp$ret$5;
|
|
680
601
|
// Inline function 'kotlin.text.toFloat' call
|
|
681
|
-
var
|
|
682
|
-
var tmp$ret$4;
|
|
602
|
+
var tmp1_toFloat = dropLast(str, 4);
|
|
683
603
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
684
|
-
var tmp2_unsafeCast = toDouble(tmp3_toFloat);
|
|
685
|
-
var tmp$ret$3;
|
|
686
604
|
// Inline function 'kotlin.js.asDynamic' call
|
|
687
|
-
tmp$ret$
|
|
688
|
-
tmp$ret$4 = tmp$ret$3;
|
|
689
|
-
tmp$ret$5 = tmp$ret$4;
|
|
605
|
+
tmp$ret$5 = toDouble(tmp1_toFloat);
|
|
690
606
|
tmp = gradToDeg(tmp$ret$5);
|
|
691
607
|
} else if (endsWith(str, 'rad')) {
|
|
692
608
|
var tmp$ret$8;
|
|
693
609
|
// Inline function 'kotlin.text.toFloat' call
|
|
694
|
-
var
|
|
695
|
-
var tmp$ret$7;
|
|
610
|
+
var tmp2_toFloat = dropLast(str, 3);
|
|
696
611
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
697
|
-
var tmp4_unsafeCast = toDouble(tmp5_toFloat);
|
|
698
|
-
var tmp$ret$6;
|
|
699
612
|
// Inline function 'kotlin.js.asDynamic' call
|
|
700
|
-
tmp$ret$
|
|
701
|
-
tmp$ret$7 = tmp$ret$6;
|
|
702
|
-
tmp$ret$8 = tmp$ret$7;
|
|
613
|
+
tmp$ret$8 = toDouble(tmp2_toFloat);
|
|
703
614
|
tmp = radToDeg(tmp$ret$8);
|
|
704
615
|
} else if (endsWith(str, 'turn')) {
|
|
705
616
|
var tmp$ret$11;
|
|
706
617
|
// Inline function 'kotlin.text.toFloat' call
|
|
707
|
-
var
|
|
708
|
-
var tmp$ret$10;
|
|
618
|
+
var tmp3_toFloat = dropLast(str, 4);
|
|
709
619
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
710
|
-
var tmp6_unsafeCast = toDouble(tmp7_toFloat);
|
|
711
|
-
var tmp$ret$9;
|
|
712
620
|
// Inline function 'kotlin.js.asDynamic' call
|
|
713
|
-
tmp$ret$
|
|
714
|
-
tmp$ret$10 = tmp$ret$9;
|
|
715
|
-
tmp$ret$11 = tmp$ret$10;
|
|
621
|
+
tmp$ret$11 = toDouble(tmp3_toFloat);
|
|
716
622
|
tmp = turnToDeg(tmp$ret$11);
|
|
717
623
|
} else {
|
|
718
|
-
var tmp$ret$14;
|
|
719
624
|
// Inline function 'kotlin.text.toFloat' call
|
|
720
|
-
var tmp$ret$13;
|
|
721
625
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
722
|
-
var tmp8_unsafeCast = toDouble(str);
|
|
723
|
-
var tmp$ret$12;
|
|
724
626
|
// Inline function 'kotlin.js.asDynamic' call
|
|
725
|
-
tmp
|
|
726
|
-
tmp$ret$13 = tmp$ret$12;
|
|
727
|
-
tmp$ret$14 = tmp$ret$13;
|
|
728
|
-
tmp = tmp$ret$14;
|
|
627
|
+
tmp = toDouble(str);
|
|
729
628
|
}
|
|
730
629
|
var deg = tmp;
|
|
731
630
|
return normalizeDeg_0(deg);
|
|
732
631
|
}
|
|
733
632
|
function percent(str) {
|
|
734
|
-
var tmp$ret$2;
|
|
735
633
|
// Inline function 'kotlin.text.toFloat' call
|
|
736
|
-
var
|
|
737
|
-
var tmp$ret$1;
|
|
634
|
+
var tmp0_toFloat = dropLast(str, 1);
|
|
738
635
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
739
|
-
var tmp0_unsafeCast = toDouble(tmp1_toFloat);
|
|
740
|
-
var tmp$ret$0;
|
|
741
636
|
// Inline function 'kotlin.js.asDynamic' call
|
|
742
|
-
|
|
743
|
-
tmp$ret$1 = tmp$ret$0;
|
|
744
|
-
tmp$ret$2 = tmp$ret$1;
|
|
745
|
-
return tmp$ret$2 / 100.0;
|
|
637
|
+
return toDouble(tmp0_toFloat) / 100.0;
|
|
746
638
|
}
|
|
747
639
|
function number(str) {
|
|
748
|
-
var tmp$ret$2;
|
|
749
640
|
// Inline function 'kotlin.text.toFloat' call
|
|
750
|
-
var tmp$ret$1;
|
|
751
641
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
752
|
-
var tmp0_unsafeCast = toDouble(str);
|
|
753
|
-
var tmp$ret$0;
|
|
754
642
|
// Inline function 'kotlin.js.asDynamic' call
|
|
755
|
-
|
|
756
|
-
tmp$ret$1 = tmp$ret$0;
|
|
757
|
-
tmp$ret$2 = tmp$ret$1;
|
|
758
|
-
return tmp$ret$2;
|
|
643
|
+
return toDouble(str);
|
|
759
644
|
}
|
|
760
645
|
var RenderCondition_ALWAYS_instance;
|
|
761
646
|
var RenderCondition_NEVER_instance;
|
|
@@ -808,26 +693,25 @@
|
|
|
808
693
|
alphaPercent = alphaPercent === VOID ? false : alphaPercent;
|
|
809
694
|
legacyName = legacyName === VOID ? false : legacyName;
|
|
810
695
|
legacyFormat = legacyFormat === VOID ? false : legacyFormat;
|
|
811
|
-
var tmp0_subject = _this__u8e3s4;
|
|
812
696
|
var tmp;
|
|
813
|
-
if (
|
|
814
|
-
var tmp1_subject = _this__u8e3s4.
|
|
815
|
-
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().
|
|
697
|
+
if (_this__u8e3s4 instanceof RGB) {
|
|
698
|
+
var tmp1_subject = _this__u8e3s4.e1h_1;
|
|
699
|
+
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().e1j_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().a1j_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().f1j_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().b1j_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
816
700
|
} else {
|
|
817
|
-
if (
|
|
701
|
+
if (_this__u8e3s4 instanceof HSL) {
|
|
818
702
|
tmp = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
819
703
|
} else {
|
|
820
|
-
if (
|
|
821
|
-
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
704
|
+
if (_this__u8e3s4 instanceof LAB) {
|
|
705
|
+
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().m1j_1), alphaPercent, renderAlpha);
|
|
822
706
|
} else {
|
|
823
|
-
if (
|
|
824
|
-
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
707
|
+
if (_this__u8e3s4 instanceof LCHab) {
|
|
708
|
+
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().k1j_1), hueUnit, alphaPercent, renderAlpha);
|
|
825
709
|
} else {
|
|
826
|
-
if (
|
|
710
|
+
if (_this__u8e3s4 instanceof HWB) {
|
|
827
711
|
tmp = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
828
712
|
} else {
|
|
829
|
-
if (
|
|
830
|
-
tmp = renderColorFunction(_this__u8e3s4.
|
|
713
|
+
if (_this__u8e3s4 instanceof XYZ) {
|
|
714
|
+
tmp = renderColorFunction(_this__u8e3s4.i1j(XYZColorSpaces_getInstance().h1j_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
831
715
|
} else {
|
|
832
716
|
tmp = null;
|
|
833
717
|
}
|
|
@@ -839,70 +723,54 @@
|
|
|
839
723
|
return tmp;
|
|
840
724
|
}
|
|
841
725
|
function renderColorFunction(_this__u8e3s4, name, unitsPercent, alphaPercent, renderAlpha_0) {
|
|
842
|
-
var tmp$ret$1;
|
|
843
726
|
// Inline function 'kotlin.text.buildString' call
|
|
844
727
|
// Inline function 'kotlin.contracts.contract' call
|
|
845
|
-
var tmp$ret$0;
|
|
846
728
|
// Inline function 'kotlin.apply' call
|
|
847
729
|
var tmp0_apply = StringBuilder_init_$Create$();
|
|
848
730
|
// Inline function 'kotlin.contracts.contract' call
|
|
849
731
|
// Inline function 'com.github.ajalt.colormath.renderColorFunction.<anonymous>' call
|
|
850
|
-
tmp0_apply.
|
|
851
|
-
var tmp = dropLast_0(_this__u8e3s4.
|
|
732
|
+
tmp0_apply.dc('color(').dc(name).dc(' ');
|
|
733
|
+
var tmp = dropLast_0(_this__u8e3s4.a3(), 1);
|
|
852
734
|
joinTo(tmp, tmp0_apply, ' ', VOID, VOID, VOID, VOID, renderColorFunction$lambda(unitsPercent));
|
|
853
|
-
tmp0_apply.
|
|
854
|
-
tmp0_apply.
|
|
855
|
-
|
|
856
|
-
tmp$ret$1 = tmp$ret$0.toString();
|
|
857
|
-
return tmp$ret$1;
|
|
735
|
+
tmp0_apply.dc(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
736
|
+
tmp0_apply.dc(')');
|
|
737
|
+
return tmp0_apply.toString();
|
|
858
738
|
}
|
|
859
739
|
function get_dashName(_this__u8e3s4) {
|
|
860
|
-
var tmp$ret$2;
|
|
861
740
|
// Inline function 'kotlin.text.lowercase' call
|
|
862
|
-
var tmp$ret$0;
|
|
863
741
|
// Inline function 'kotlin.text.replace' call
|
|
864
|
-
var tmp0_replace = _this__u8e3s4.
|
|
865
|
-
var tmp1_replace = Regex_init_$Create$('\\W');
|
|
866
|
-
tmp$ret$0 = tmp1_replace.cc(tmp0_replace, '-');
|
|
867
|
-
var tmp2_lowercase = tmp$ret$0;
|
|
868
|
-
var tmp$ret$1;
|
|
742
|
+
var tmp0_replace = _this__u8e3s4.x1g().ee();
|
|
869
743
|
// Inline function 'kotlin.js.asDynamic' call
|
|
870
|
-
|
|
871
|
-
tmp$ret$2 = tmp$ret$1.toLowerCase();
|
|
872
|
-
return '--' + tmp$ret$2;
|
|
744
|
+
return '--' + Regex_init_$Create$('\\W').wc(tmp0_replace, '-').toLowerCase();
|
|
873
745
|
}
|
|
874
746
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
875
|
-
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
747
|
+
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.a1h_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.n1j())), rgbPercent ? render(_this__u8e3s4.b1h_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.n1j())), rgbPercent ? render(_this__u8e3s4.c1h_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.n1j()))], alphaPercent, renderAlpha, commas);
|
|
876
748
|
}
|
|
877
749
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
878
|
-
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
750
|
+
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.p1j_1, true), render(_this__u8e3s4.q1j_1, true)], alphaPercent, renderAlpha, commas);
|
|
879
751
|
}
|
|
880
752
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
881
|
-
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
753
|
+
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.n1h_1 / 100, true), render(_this__u8e3s4.o1h_1), render(_this__u8e3s4.p1h_1)], alphaPercent, renderAlpha);
|
|
882
754
|
}
|
|
883
755
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
884
|
-
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
756
|
+
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.s1j_1 / 100, true), render(_this__u8e3s4.t1j_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
885
757
|
}
|
|
886
758
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
887
|
-
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
759
|
+
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.y1j_1, true), render(_this__u8e3s4.z1j_1, true)], alphaPercent, renderAlpha);
|
|
888
760
|
}
|
|
889
761
|
function render(_this__u8e3s4, percent) {
|
|
890
762
|
percent = percent === VOID ? false : percent;
|
|
891
|
-
var tmp0_subject = percent;
|
|
892
763
|
var tmp;
|
|
893
|
-
switch (
|
|
764
|
+
switch (percent) {
|
|
894
765
|
case true:
|
|
895
|
-
var tmp$ret$0;
|
|
896
766
|
// Inline function 'kotlin.math.roundToInt' call
|
|
897
|
-
var tmp0_roundToInt = _this__u8e3s4 * 100;
|
|
898
|
-
tmp$ret$0 = roundToInt(tmp0_roundToInt);
|
|
899
767
|
|
|
900
|
-
|
|
768
|
+
var tmp0_roundToInt = _this__u8e3s4 * 100;
|
|
769
|
+
tmp = '' + roundToInt(tmp0_roundToInt) + '%';
|
|
901
770
|
break;
|
|
902
771
|
case false:
|
|
903
|
-
var tmp1_subject = _this__u8e3s4;
|
|
904
772
|
var tmp_0;
|
|
905
|
-
switch (
|
|
773
|
+
switch (_this__u8e3s4) {
|
|
906
774
|
case 0.0:
|
|
907
775
|
tmp_0 = '0';
|
|
908
776
|
break;
|
|
@@ -927,8 +795,8 @@
|
|
|
927
795
|
}
|
|
928
796
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
929
797
|
var tmp;
|
|
930
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.
|
|
931
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
798
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.w1g()) : false) ? !(_this__u8e3s4.w1g() === 1.0) : false) {
|
|
799
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.w1g()), alphaPercent);
|
|
932
800
|
} else {
|
|
933
801
|
tmp = '';
|
|
934
802
|
}
|
|
@@ -936,33 +804,27 @@
|
|
|
936
804
|
}
|
|
937
805
|
function renderFunction(_this__u8e3s4, name, components, alphaPercent, renderAlpha_0, commas) {
|
|
938
806
|
commas = commas === VOID ? false : commas;
|
|
939
|
-
var tmp$ret$1;
|
|
940
807
|
// Inline function 'kotlin.text.buildString' call
|
|
941
808
|
// Inline function 'kotlin.contracts.contract' call
|
|
942
|
-
var tmp$ret$0;
|
|
943
809
|
// Inline function 'kotlin.apply' call
|
|
944
810
|
var tmp0_apply = StringBuilder_init_$Create$();
|
|
945
811
|
// Inline function 'kotlin.contracts.contract' call
|
|
946
812
|
// Inline function 'com.github.ajalt.colormath.renderFunction.<anonymous>' call
|
|
947
813
|
var sep = commas ? ', ' : ' ';
|
|
948
|
-
tmp0_apply.
|
|
814
|
+
tmp0_apply.dc(name).dc('(');
|
|
949
815
|
joinTo_0(components, tmp0_apply, sep);
|
|
950
|
-
tmp0_apply.
|
|
951
|
-
tmp0_apply.
|
|
952
|
-
|
|
953
|
-
tmp$ret$1 = tmp$ret$0.toString();
|
|
954
|
-
return tmp$ret$1;
|
|
816
|
+
tmp0_apply.dc(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
817
|
+
tmp0_apply.dc(')');
|
|
818
|
+
return tmp0_apply.toString();
|
|
955
819
|
}
|
|
956
820
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
957
|
-
var tmp0_subject = hueUnit;
|
|
958
|
-
var tmp0 = tmp0_subject.i4_1;
|
|
959
821
|
var tmp;
|
|
960
|
-
switch (
|
|
822
|
+
switch (hueUnit.c5_1) {
|
|
961
823
|
case 0:
|
|
962
|
-
tmp = render(_this__u8e3s4.
|
|
824
|
+
tmp = render(_this__u8e3s4.b1k());
|
|
963
825
|
break;
|
|
964
826
|
case 1:
|
|
965
|
-
tmp = render(_this__u8e3s4.
|
|
827
|
+
tmp = render(_this__u8e3s4.b1k()) + 'deg';
|
|
966
828
|
break;
|
|
967
829
|
case 2:
|
|
968
830
|
tmp = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -997,27 +859,27 @@
|
|
|
997
859
|
return AngleUnit_AUTO_instance;
|
|
998
860
|
}
|
|
999
861
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
1000
|
-
return isNaN_0(_this__u8e3s4.
|
|
862
|
+
return isNaN_0(_this__u8e3s4.b1k()) ? numberToDouble(whenNaN) : _this__u8e3s4.b1k();
|
|
1001
863
|
}
|
|
1002
864
|
function hueAsRad(_this__u8e3s4) {
|
|
1003
|
-
return degToRad(_this__u8e3s4.
|
|
865
|
+
return degToRad(_this__u8e3s4.b1k());
|
|
1004
866
|
}
|
|
1005
867
|
function hueAsGrad(_this__u8e3s4) {
|
|
1006
|
-
return degToGrad(_this__u8e3s4.
|
|
868
|
+
return degToGrad(_this__u8e3s4.b1k());
|
|
1007
869
|
}
|
|
1008
870
|
function hueAsTurns(_this__u8e3s4) {
|
|
1009
|
-
return degToTurns(_this__u8e3s4.
|
|
871
|
+
return degToTurns(_this__u8e3s4.b1k());
|
|
1010
872
|
}
|
|
1011
873
|
function WhitePoint(name, chromaticity) {
|
|
1012
|
-
this.
|
|
1013
|
-
this.
|
|
874
|
+
this.c1k_1 = name;
|
|
875
|
+
this.d1k_1 = chromaticity;
|
|
1014
876
|
}
|
|
1015
877
|
protoOf(WhitePoint).toString = function () {
|
|
1016
|
-
return this.
|
|
878
|
+
return this.c1k_1;
|
|
1017
879
|
};
|
|
1018
880
|
protoOf(WhitePoint).hashCode = function () {
|
|
1019
|
-
var result = getStringHashCode(this.
|
|
1020
|
-
result = imul(result, 31) + this.
|
|
881
|
+
var result = getStringHashCode(this.c1k_1);
|
|
882
|
+
result = imul(result, 31) + this.d1k_1.hashCode() | 0;
|
|
1021
883
|
return result;
|
|
1022
884
|
};
|
|
1023
885
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -1026,22 +888,22 @@
|
|
|
1026
888
|
if (!(other instanceof WhitePoint))
|
|
1027
889
|
return false;
|
|
1028
890
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
1029
|
-
if (!(this.
|
|
891
|
+
if (!(this.c1k_1 === tmp0_other_with_cast.c1k_1))
|
|
1030
892
|
return false;
|
|
1031
|
-
if (!this.
|
|
893
|
+
if (!this.d1k_1.equals(tmp0_other_with_cast.d1k_1))
|
|
1032
894
|
return false;
|
|
1033
895
|
return true;
|
|
1034
896
|
};
|
|
1035
897
|
function Illuminant() {
|
|
1036
898
|
Illuminant_instance = this;
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
899
|
+
this.e1k_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
900
|
+
this.f1k_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
901
|
+
this.g1k_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
902
|
+
this.h1k_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
903
|
+
this.i1k_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
904
|
+
this.j1k_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
905
|
+
this.k1k_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
906
|
+
this.l1k_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
1045
907
|
}
|
|
1046
908
|
var Illuminant_instance;
|
|
1047
909
|
function Illuminant_getInstance() {
|
|
@@ -1052,67 +914,52 @@
|
|
|
1052
914
|
function rectangularComponentInfo(name) {
|
|
1053
915
|
var tmp$ret$3;
|
|
1054
916
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1055
|
-
var tmp$ret$2;
|
|
1056
917
|
// Inline function 'kotlin.text.map' call
|
|
1057
|
-
var tmp$ret$1;
|
|
1058
918
|
// Inline function 'kotlin.text.mapTo' call
|
|
1059
919
|
var tmp0_mapTo = ArrayList_init_$Create$(charSequenceLength(name));
|
|
1060
|
-
var indexedObject = name;
|
|
1061
920
|
var inductionVariable = 0;
|
|
1062
|
-
var last =
|
|
921
|
+
var last = name.length;
|
|
1063
922
|
while (inductionVariable < last) {
|
|
1064
|
-
var item = charSequenceGet(
|
|
923
|
+
var item = charSequenceGet(name, inductionVariable);
|
|
1065
924
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1066
925
|
var tmp$ret$0;
|
|
1067
926
|
// Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
|
|
1068
927
|
tmp$ret$0 = toString(item);
|
|
1069
|
-
tmp0_mapTo.
|
|
928
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
1070
929
|
}
|
|
1071
|
-
tmp$ret$
|
|
1072
|
-
tmp$ret$2 = tmp$ret$1;
|
|
1073
|
-
var tmp1_toTypedArray = tmp$ret$2;
|
|
1074
|
-
tmp$ret$3 = copyToArray(tmp1_toTypedArray);
|
|
930
|
+
tmp$ret$3 = copyToArray(tmp0_mapTo);
|
|
1075
931
|
return rectangularComponentInfo_0(tmp$ret$3.slice());
|
|
1076
932
|
}
|
|
1077
933
|
function polarComponentInfo(name) {
|
|
1078
|
-
var tmp$ret$2;
|
|
1079
934
|
// Inline function 'kotlin.text.map' call
|
|
1080
|
-
var tmp$ret$1;
|
|
1081
935
|
// Inline function 'kotlin.text.mapTo' call
|
|
1082
936
|
var tmp0_mapTo = ArrayList_init_$Create$(charSequenceLength(name));
|
|
1083
|
-
var indexedObject = name;
|
|
1084
937
|
var inductionVariable = 0;
|
|
1085
|
-
var last =
|
|
938
|
+
var last = name.length;
|
|
1086
939
|
while (inductionVariable < last) {
|
|
1087
|
-
var item = charSequenceGet(
|
|
940
|
+
var item = charSequenceGet(name, inductionVariable);
|
|
1088
941
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1089
942
|
var tmp$ret$0;
|
|
1090
943
|
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
1091
|
-
tmp$ret$0 = new ColorComponentInfo(toString(item),
|
|
1092
|
-
tmp0_mapTo.
|
|
944
|
+
tmp$ret$0 = new ColorComponentInfo(toString(item), item === _Char___init__impl__6a9atx(72));
|
|
945
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
1093
946
|
}
|
|
1094
|
-
|
|
1095
|
-
tmp$ret$2 = tmp$ret$1;
|
|
1096
|
-
return plus(tmp$ret$2, new ColorComponentInfo('alpha', false));
|
|
947
|
+
return plus(tmp0_mapTo, new ColorComponentInfo('alpha', false));
|
|
1097
948
|
}
|
|
1098
949
|
function rectangularComponentInfo_0(names) {
|
|
1099
|
-
var tmp$ret$2;
|
|
1100
950
|
// Inline function 'kotlin.collections.map' call
|
|
1101
|
-
var
|
|
1102
|
-
var tmp$ret$1;
|
|
951
|
+
var tmp0_map = plus(asList(names), 'alpha');
|
|
1103
952
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1104
|
-
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(
|
|
1105
|
-
var tmp0_iterator =
|
|
953
|
+
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
|
|
954
|
+
var tmp0_iterator = tmp0_map.f();
|
|
1106
955
|
while (tmp0_iterator.g()) {
|
|
1107
956
|
var item = tmp0_iterator.h();
|
|
1108
957
|
var tmp$ret$0;
|
|
1109
958
|
// Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
|
|
1110
959
|
tmp$ret$0 = new ColorComponentInfo(item, false);
|
|
1111
|
-
tmp0_mapTo.
|
|
960
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
1112
961
|
}
|
|
1113
|
-
|
|
1114
|
-
tmp$ret$2 = tmp$ret$1;
|
|
1115
|
-
return tmp$ret$2;
|
|
962
|
+
return tmp0_mapTo;
|
|
1116
963
|
}
|
|
1117
964
|
function get_CAT02_XYZ_TO_LMS() {
|
|
1118
965
|
_init_properties_Constants_kt__atb1ur();
|
|
@@ -1138,8 +985,7 @@
|
|
|
1138
985
|
var CIE_E_times_K;
|
|
1139
986
|
var properties_initialized_Constants_kt_w4w61t;
|
|
1140
987
|
function _init_properties_Constants_kt__atb1ur() {
|
|
1141
|
-
if (properties_initialized_Constants_kt_w4w61t) {
|
|
1142
|
-
} else {
|
|
988
|
+
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
1143
989
|
properties_initialized_Constants_kt_w4w61t = true;
|
|
1144
990
|
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(0.7328, 0.4296, -0.1624, -0.7036, 1.6975, 0.0061, 0.003, 0.0136, 0.9834);
|
|
1145
991
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
@@ -1147,7 +993,7 @@
|
|
|
1147
993
|
}
|
|
1148
994
|
function CssColors() {
|
|
1149
995
|
CssColors_instance = this;
|
|
1150
|
-
this.
|
|
996
|
+
this.y1h_1 = mapOf([to('black', Companion_getInstance_5().m1k(0, 0, 0)), to('silver', Companion_getInstance_5().m1k(192, 192, 192)), to('gray', Companion_getInstance_5().m1k(128, 128, 128)), to('white', Companion_getInstance_5().m1k(255, 255, 255)), to('maroon', Companion_getInstance_5().m1k(128, 0, 0)), to('red', Companion_getInstance_5().m1k(255, 0, 0)), to('purple', Companion_getInstance_5().m1k(128, 0, 128)), to('fuchsia', Companion_getInstance_5().m1k(255, 0, 255)), to('green', Companion_getInstance_5().m1k(0, 128, 0)), to('lime', Companion_getInstance_5().m1k(0, 255, 0)), to('olive', Companion_getInstance_5().m1k(128, 128, 0)), to('yellow', Companion_getInstance_5().m1k(255, 255, 0)), to('navy', Companion_getInstance_5().m1k(0, 0, 128)), to('blue', Companion_getInstance_5().m1k(0, 0, 255)), to('teal', Companion_getInstance_5().m1k(0, 128, 128)), to('aqua', Companion_getInstance_5().m1k(0, 255, 255)), to('orange', Companion_getInstance_5().m1k(255, 165, 0)), to('aliceblue', Companion_getInstance_5().m1k(240, 248, 255)), to('antiquewhite', Companion_getInstance_5().m1k(250, 235, 215)), to('aquamarine', Companion_getInstance_5().m1k(127, 255, 212)), to('azure', Companion_getInstance_5().m1k(240, 255, 255)), to('beige', Companion_getInstance_5().m1k(245, 245, 220)), to('bisque', Companion_getInstance_5().m1k(255, 228, 196)), to('blanchedalmond', Companion_getInstance_5().m1k(255, 235, 205)), to('blueviolet', Companion_getInstance_5().m1k(138, 43, 226)), to('brown', Companion_getInstance_5().m1k(165, 42, 42)), to('burlywood', Companion_getInstance_5().m1k(222, 184, 135)), to('cadetblue', Companion_getInstance_5().m1k(95, 158, 160)), to('chartreuse', Companion_getInstance_5().m1k(127, 255, 0)), to('chocolate', Companion_getInstance_5().m1k(210, 105, 30)), to('coral', Companion_getInstance_5().m1k(255, 127, 80)), to('cornflowerblue', Companion_getInstance_5().m1k(100, 149, 237)), to('cornsilk', Companion_getInstance_5().m1k(255, 248, 220)), to('crimson', Companion_getInstance_5().m1k(220, 20, 60)), to('cyan', Companion_getInstance_5().m1k(0, 255, 255)), to('darkblue', Companion_getInstance_5().m1k(0, 0, 139)), to('darkcyan', Companion_getInstance_5().m1k(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_5().m1k(184, 134, 11)), to('darkgray', Companion_getInstance_5().m1k(169, 169, 169)), to('darkgreen', Companion_getInstance_5().m1k(0, 100, 0)), to('darkgrey', Companion_getInstance_5().m1k(169, 169, 169)), to('darkkhaki', Companion_getInstance_5().m1k(189, 183, 107)), to('darkmagenta', Companion_getInstance_5().m1k(139, 0, 139)), to('darkolivegreen', Companion_getInstance_5().m1k(85, 107, 47)), to('darkorange', Companion_getInstance_5().m1k(255, 140, 0)), to('darkorchid', Companion_getInstance_5().m1k(153, 50, 204)), to('darkred', Companion_getInstance_5().m1k(139, 0, 0)), to('darksalmon', Companion_getInstance_5().m1k(233, 150, 122)), to('darkseagreen', Companion_getInstance_5().m1k(143, 188, 143)), to('darkslateblue', Companion_getInstance_5().m1k(72, 61, 139)), to('darkslategray', Companion_getInstance_5().m1k(47, 79, 79)), to('darkslategrey', Companion_getInstance_5().m1k(47, 79, 79)), to('darkturquoise', Companion_getInstance_5().m1k(0, 206, 209)), to('darkviolet', Companion_getInstance_5().m1k(148, 0, 211)), to('deeppink', Companion_getInstance_5().m1k(255, 20, 147)), to('deepskyblue', Companion_getInstance_5().m1k(0, 191, 255)), to('dimgray', Companion_getInstance_5().m1k(105, 105, 105)), to('dimgrey', Companion_getInstance_5().m1k(105, 105, 105)), to('dodgerblue', Companion_getInstance_5().m1k(30, 144, 255)), to('firebrick', Companion_getInstance_5().m1k(178, 34, 34)), to('floralwhite', Companion_getInstance_5().m1k(255, 250, 240)), to('forestgreen', Companion_getInstance_5().m1k(34, 139, 34)), to('gainsboro', Companion_getInstance_5().m1k(220, 220, 220)), to('ghostwhite', Companion_getInstance_5().m1k(248, 248, 255)), to('gold', Companion_getInstance_5().m1k(255, 215, 0)), to('goldenrod', Companion_getInstance_5().m1k(218, 165, 32)), to('greenyellow', Companion_getInstance_5().m1k(173, 255, 47)), to('grey', Companion_getInstance_5().m1k(128, 128, 128)), to('honeydew', Companion_getInstance_5().m1k(240, 255, 240)), to('hotpink', Companion_getInstance_5().m1k(255, 105, 180)), to('indianred', Companion_getInstance_5().m1k(205, 92, 92)), to('indigo', Companion_getInstance_5().m1k(75, 0, 130)), to('ivory', Companion_getInstance_5().m1k(255, 255, 240)), to('khaki', Companion_getInstance_5().m1k(240, 230, 140)), to('lavender', Companion_getInstance_5().m1k(230, 230, 250)), to('lavenderblush', Companion_getInstance_5().m1k(255, 240, 245)), to('lawngreen', Companion_getInstance_5().m1k(124, 252, 0)), to('lemonchiffon', Companion_getInstance_5().m1k(255, 250, 205)), to('lightblue', Companion_getInstance_5().m1k(173, 216, 230)), to('lightcoral', Companion_getInstance_5().m1k(240, 128, 128)), to('lightcyan', Companion_getInstance_5().m1k(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_5().m1k(250, 250, 210)), to('lightgray', Companion_getInstance_5().m1k(211, 211, 211)), to('lightgreen', Companion_getInstance_5().m1k(144, 238, 144)), to('lightgrey', Companion_getInstance_5().m1k(211, 211, 211)), to('lightpink', Companion_getInstance_5().m1k(255, 182, 193)), to('lightsalmon', Companion_getInstance_5().m1k(255, 160, 122)), to('lightseagreen', Companion_getInstance_5().m1k(32, 178, 170)), to('lightskyblue', Companion_getInstance_5().m1k(135, 206, 250)), to('lightslategray', Companion_getInstance_5().m1k(119, 136, 153)), to('lightslategrey', Companion_getInstance_5().m1k(119, 136, 153)), to('lightsteelblue', Companion_getInstance_5().m1k(176, 196, 222)), to('lightyellow', Companion_getInstance_5().m1k(255, 255, 224)), to('limegreen', Companion_getInstance_5().m1k(50, 205, 50)), to('linen', Companion_getInstance_5().m1k(250, 240, 230)), to('magenta', Companion_getInstance_5().m1k(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_5().m1k(102, 205, 170)), to('mediumblue', Companion_getInstance_5().m1k(0, 0, 205)), to('mediumorchid', Companion_getInstance_5().m1k(186, 85, 211)), to('mediumpurple', Companion_getInstance_5().m1k(147, 112, 219)), to('mediumseagreen', Companion_getInstance_5().m1k(60, 179, 113)), to('mediumslateblue', Companion_getInstance_5().m1k(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_5().m1k(0, 250, 154)), to('mediumturquoise', Companion_getInstance_5().m1k(72, 209, 204)), to('mediumvioletred', Companion_getInstance_5().m1k(199, 21, 133)), to('midnightblue', Companion_getInstance_5().m1k(25, 25, 112)), to('mintcream', Companion_getInstance_5().m1k(245, 255, 250)), to('mistyrose', Companion_getInstance_5().m1k(255, 228, 225)), to('moccasin', Companion_getInstance_5().m1k(255, 228, 181)), to('navajowhite', Companion_getInstance_5().m1k(255, 222, 173)), to('oldlace', Companion_getInstance_5().m1k(253, 245, 230)), to('olivedrab', Companion_getInstance_5().m1k(107, 142, 35)), to('orangered', Companion_getInstance_5().m1k(255, 69, 0)), to('orchid', Companion_getInstance_5().m1k(218, 112, 214)), to('palegoldenrod', Companion_getInstance_5().m1k(238, 232, 170)), to('palegreen', Companion_getInstance_5().m1k(152, 251, 152)), to('paleturquoise', Companion_getInstance_5().m1k(175, 238, 238)), to('palevioletred', Companion_getInstance_5().m1k(219, 112, 147)), to('papayawhip', Companion_getInstance_5().m1k(255, 239, 213)), to('peachpuff', Companion_getInstance_5().m1k(255, 218, 185)), to('peru', Companion_getInstance_5().m1k(205, 133, 63)), to('pink', Companion_getInstance_5().m1k(255, 192, 203)), to('plum', Companion_getInstance_5().m1k(221, 160, 221)), to('powderblue', Companion_getInstance_5().m1k(176, 224, 230)), to('rosybrown', Companion_getInstance_5().m1k(188, 143, 143)), to('royalblue', Companion_getInstance_5().m1k(65, 105, 225)), to('saddlebrown', Companion_getInstance_5().m1k(139, 69, 19)), to('salmon', Companion_getInstance_5().m1k(250, 128, 114)), to('sandybrown', Companion_getInstance_5().m1k(244, 164, 96)), to('seagreen', Companion_getInstance_5().m1k(46, 139, 87)), to('seashell', Companion_getInstance_5().m1k(255, 245, 238)), to('sienna', Companion_getInstance_5().m1k(160, 82, 45)), to('skyblue', Companion_getInstance_5().m1k(135, 206, 235)), to('slateblue', Companion_getInstance_5().m1k(106, 90, 205)), to('slategray', Companion_getInstance_5().m1k(112, 128, 144)), to('slategrey', Companion_getInstance_5().m1k(112, 128, 144)), to('snow', Companion_getInstance_5().m1k(255, 250, 250)), to('springgreen', Companion_getInstance_5().m1k(0, 255, 127)), to('steelblue', Companion_getInstance_5().m1k(70, 130, 180)), to('tan', Companion_getInstance_5().m1k(210, 180, 140)), to('thistle', Companion_getInstance_5().m1k(216, 191, 216)), to('tomato', Companion_getInstance_5().m1k(255, 99, 71)), to('turquoise', Companion_getInstance_5().m1k(64, 224, 208)), to('violet', Companion_getInstance_5().m1k(238, 130, 238)), to('wheat', Companion_getInstance_5().m1k(245, 222, 179)), to('whitesmoke', Companion_getInstance_5().m1k(245, 245, 245)), to('yellowgreen', Companion_getInstance_5().m1k(154, 205, 50)), to('rebeccapurple', Companion_getInstance_5().m1k(102, 51, 153)), to('transparent', Companion_getInstance_5().n1k(0, 0, 0, 0))]);
|
|
1151
997
|
}
|
|
1152
998
|
var CssColors_instance;
|
|
1153
999
|
function CssColors_getInstance() {
|
|
@@ -1167,10 +1013,8 @@
|
|
|
1167
1013
|
function spow_0(_this__u8e3s4, p) {
|
|
1168
1014
|
var tmp$ret$1;
|
|
1169
1015
|
// Inline function 'kotlin.math.pow' call
|
|
1170
|
-
var tmp$ret$0;
|
|
1171
1016
|
// Inline function 'kotlin.math.absoluteValue' call
|
|
1172
|
-
|
|
1173
|
-
var tmp0_pow = tmp$ret$0;
|
|
1017
|
+
var tmp0_pow = Math.abs(_this__u8e3s4);
|
|
1174
1018
|
tmp$ret$1 = Math.pow(tmp0_pow, p);
|
|
1175
1019
|
return withSign(tmp$ret$1, _this__u8e3s4);
|
|
1176
1020
|
}
|
|
@@ -1211,17 +1055,13 @@
|
|
|
1211
1055
|
var tmp$ret$0;
|
|
1212
1056
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1213
1057
|
tmp$ret$0 = new Float32Array([v00, v10, v20, v01, v11, v21, v02, v12, v22]);
|
|
1214
|
-
|
|
1215
|
-
return tmp;
|
|
1058
|
+
return _Matrix___init__impl__q3kp4w(tmp$ret$0);
|
|
1216
1059
|
}
|
|
1217
1060
|
function Matrix__copy_impl_kmkvzd($this) {
|
|
1218
1061
|
var tmp$ret$1;
|
|
1219
1062
|
// Inline function 'kotlin.collections.copyOf' call
|
|
1220
|
-
var tmp0_copyOf = _Matrix___get_rowMajor__impl__vmgxkq($this);
|
|
1221
|
-
var tmp$ret$0;
|
|
1222
1063
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1223
|
-
tmp$ret$
|
|
1224
|
-
tmp$ret$1 = tmp$ret$0.slice();
|
|
1064
|
+
tmp$ret$1 = _Matrix___get_rowMajor__impl__vmgxkq($this).slice();
|
|
1225
1065
|
return _Matrix___init__impl__q3kp4w(tmp$ret$1);
|
|
1226
1066
|
}
|
|
1227
1067
|
function Matrix__get_impl_xogbpk($this, x, y) {
|
|
@@ -1269,9 +1109,7 @@
|
|
|
1269
1109
|
do {
|
|
1270
1110
|
var i = inductionVariable;
|
|
1271
1111
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1272
|
-
|
|
1273
|
-
var tmp2_index0 = i;
|
|
1274
|
-
tmp1_array[tmp2_index0] = tmp1_array[tmp2_index0] / x;
|
|
1112
|
+
out[i] = out[i] / x;
|
|
1275
1113
|
}
|
|
1276
1114
|
while (inductionVariable <= last);
|
|
1277
1115
|
return _Matrix___init__impl__q3kp4w(out);
|
|
@@ -1292,8 +1130,7 @@
|
|
|
1292
1130
|
var tmp$ret$0;
|
|
1293
1131
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1294
1132
|
tmp$ret$0 = new Float32Array([v0, v1, v2]);
|
|
1295
|
-
|
|
1296
|
-
return tmp;
|
|
1133
|
+
return _Vector___init__impl__y7x4qq(tmp$ret$0);
|
|
1297
1134
|
}
|
|
1298
1135
|
function _Vector___get_l__impl__envr1l($this) {
|
|
1299
1136
|
return _Vector___get_values__impl__3gdbp5($this)[0];
|
|
@@ -1305,26 +1142,24 @@
|
|
|
1305
1142
|
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
1306
1143
|
}
|
|
1307
1144
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
1308
|
-
var tmp$ret$0;
|
|
1309
1145
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1310
|
-
|
|
1311
|
-
return tmp$ret$0;
|
|
1146
|
+
return _Vector___init__impl__y7x4qq_0(Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2, Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2);
|
|
1312
1147
|
}
|
|
1313
1148
|
function dot$f($this_dot, $other, x, y) {
|
|
1314
1149
|
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);
|
|
1315
1150
|
}
|
|
1316
1151
|
function Companion_0() {
|
|
1317
1152
|
Companion_instance_0 = this;
|
|
1318
|
-
this.
|
|
1153
|
+
this.o1k_1 = polarComponentInfo('HSL');
|
|
1319
1154
|
}
|
|
1320
|
-
protoOf(Companion_0).
|
|
1155
|
+
protoOf(Companion_0).ee = function () {
|
|
1321
1156
|
return 'HSL';
|
|
1322
1157
|
};
|
|
1323
|
-
protoOf(Companion_0).
|
|
1324
|
-
return this.
|
|
1158
|
+
protoOf(Companion_0).p1k = function () {
|
|
1159
|
+
return this.o1k_1;
|
|
1325
1160
|
};
|
|
1326
|
-
protoOf(Companion_0).
|
|
1327
|
-
return color.
|
|
1161
|
+
protoOf(Companion_0).t1h = function (color) {
|
|
1162
|
+
return color.z1g();
|
|
1328
1163
|
};
|
|
1329
1164
|
var Companion_instance_0;
|
|
1330
1165
|
function Companion_getInstance_1() {
|
|
@@ -1334,11 +1169,9 @@
|
|
|
1334
1169
|
}
|
|
1335
1170
|
function toSRGB$f(h, s, l, n) {
|
|
1336
1171
|
var k = (n + h) % 12.0;
|
|
1337
|
-
var tmp$ret$0;
|
|
1338
1172
|
// Inline function 'kotlin.math.min' call
|
|
1339
1173
|
var tmp0_min = 1 - l;
|
|
1340
|
-
|
|
1341
|
-
var a = s * tmp$ret$0;
|
|
1174
|
+
var a = s * Math.min(l, tmp0_min);
|
|
1342
1175
|
var tmp$ret$1;
|
|
1343
1176
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1344
1177
|
var tmp1_minOf = k - 3;
|
|
@@ -1349,56 +1182,53 @@
|
|
|
1349
1182
|
function HSL(h, s, l, alpha) {
|
|
1350
1183
|
Companion_getInstance_1();
|
|
1351
1184
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1352
|
-
this.
|
|
1353
|
-
this.
|
|
1354
|
-
this.
|
|
1355
|
-
this.
|
|
1185
|
+
this.o1j_1 = h;
|
|
1186
|
+
this.p1j_1 = s;
|
|
1187
|
+
this.q1j_1 = l;
|
|
1188
|
+
this.r1j_1 = alpha;
|
|
1356
1189
|
}
|
|
1357
|
-
protoOf(HSL).
|
|
1358
|
-
return this.
|
|
1190
|
+
protoOf(HSL).b1k = function () {
|
|
1191
|
+
return this.o1j_1;
|
|
1359
1192
|
};
|
|
1360
|
-
protoOf(HSL).
|
|
1361
|
-
return this.
|
|
1193
|
+
protoOf(HSL).w1g = function () {
|
|
1194
|
+
return this.r1j_1;
|
|
1362
1195
|
};
|
|
1363
|
-
protoOf(HSL).
|
|
1196
|
+
protoOf(HSL).x1g = function () {
|
|
1364
1197
|
return Companion_getInstance_1();
|
|
1365
1198
|
};
|
|
1366
|
-
protoOf(HSL).
|
|
1367
|
-
if (this.
|
|
1368
|
-
return Companion_getInstance_5().
|
|
1199
|
+
protoOf(HSL).y1g = function () {
|
|
1200
|
+
if (this.p1j_1 < 1.0E-7)
|
|
1201
|
+
return Companion_getInstance_5().r1i(this.q1j_1, this.q1j_1, this.q1j_1, this.r1j_1);
|
|
1369
1202
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1370
|
-
var s = this.
|
|
1371
|
-
var l = this.
|
|
1372
|
-
return SRGB_getInstance().
|
|
1203
|
+
var s = this.p1j_1;
|
|
1204
|
+
var l = this.q1j_1;
|
|
1205
|
+
return SRGB_getInstance().r1i(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.r1j_1);
|
|
1373
1206
|
};
|
|
1374
|
-
protoOf(HSL).
|
|
1207
|
+
protoOf(HSL).z1g = function () {
|
|
1375
1208
|
return this;
|
|
1376
1209
|
};
|
|
1377
|
-
protoOf(HSL).
|
|
1378
|
-
var tmp$ret$0;
|
|
1210
|
+
protoOf(HSL).a3 = function () {
|
|
1379
1211
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1380
|
-
|
|
1381
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1382
|
-
return tmp$ret$0;
|
|
1212
|
+
return new Float32Array([this.o1j_1, this.p1j_1, this.q1j_1, this.r1j_1]);
|
|
1383
1213
|
};
|
|
1384
|
-
protoOf(HSL).
|
|
1214
|
+
protoOf(HSL).w1k = function (h, s, l, alpha) {
|
|
1385
1215
|
return new HSL(h, s, l, alpha);
|
|
1386
1216
|
};
|
|
1387
|
-
protoOf(HSL).
|
|
1388
|
-
h = h === VOID ? this.
|
|
1389
|
-
s = s === VOID ? this.
|
|
1390
|
-
l = l === VOID ? this.
|
|
1391
|
-
alpha = alpha === VOID ? this.
|
|
1392
|
-
return $super === VOID ? this.
|
|
1217
|
+
protoOf(HSL).x1k = function (h, s, l, alpha, $super) {
|
|
1218
|
+
h = h === VOID ? this.o1j_1 : h;
|
|
1219
|
+
s = s === VOID ? this.p1j_1 : s;
|
|
1220
|
+
l = l === VOID ? this.q1j_1 : l;
|
|
1221
|
+
alpha = alpha === VOID ? this.r1j_1 : alpha;
|
|
1222
|
+
return $super === VOID ? this.w1k(h, s, l, alpha) : $super.w1k.call(this, h, s, l, alpha);
|
|
1393
1223
|
};
|
|
1394
1224
|
protoOf(HSL).toString = function () {
|
|
1395
|
-
return 'HSL(h=' + this.
|
|
1225
|
+
return 'HSL(h=' + this.o1j_1 + ', s=' + this.p1j_1 + ', l=' + this.q1j_1 + ', alpha=' + this.r1j_1 + ')';
|
|
1396
1226
|
};
|
|
1397
1227
|
protoOf(HSL).hashCode = function () {
|
|
1398
|
-
var result = getNumberHashCode(this.
|
|
1399
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1400
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1401
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1228
|
+
var result = getNumberHashCode(this.o1j_1);
|
|
1229
|
+
result = imul(result, 31) + getNumberHashCode(this.p1j_1) | 0;
|
|
1230
|
+
result = imul(result, 31) + getNumberHashCode(this.q1j_1) | 0;
|
|
1231
|
+
result = imul(result, 31) + getNumberHashCode(this.r1j_1) | 0;
|
|
1402
1232
|
return result;
|
|
1403
1233
|
};
|
|
1404
1234
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1407,28 +1237,28 @@
|
|
|
1407
1237
|
if (!(other instanceof HSL))
|
|
1408
1238
|
return false;
|
|
1409
1239
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1410
|
-
if (!equals(this.
|
|
1240
|
+
if (!equals(this.o1j_1, tmp0_other_with_cast.o1j_1))
|
|
1411
1241
|
return false;
|
|
1412
|
-
if (!equals(this.
|
|
1242
|
+
if (!equals(this.p1j_1, tmp0_other_with_cast.p1j_1))
|
|
1413
1243
|
return false;
|
|
1414
|
-
if (!equals(this.
|
|
1244
|
+
if (!equals(this.q1j_1, tmp0_other_with_cast.q1j_1))
|
|
1415
1245
|
return false;
|
|
1416
|
-
if (!equals(this.
|
|
1246
|
+
if (!equals(this.r1j_1, tmp0_other_with_cast.r1j_1))
|
|
1417
1247
|
return false;
|
|
1418
1248
|
return true;
|
|
1419
1249
|
};
|
|
1420
1250
|
function Companion_1() {
|
|
1421
1251
|
Companion_instance_1 = this;
|
|
1422
|
-
this.
|
|
1252
|
+
this.y1k_1 = polarComponentInfo('HWB');
|
|
1423
1253
|
}
|
|
1424
|
-
protoOf(Companion_1).
|
|
1254
|
+
protoOf(Companion_1).ee = function () {
|
|
1425
1255
|
return 'HWB';
|
|
1426
1256
|
};
|
|
1427
|
-
protoOf(Companion_1).
|
|
1428
|
-
return this.
|
|
1257
|
+
protoOf(Companion_1).p1k = function () {
|
|
1258
|
+
return this.y1k_1;
|
|
1429
1259
|
};
|
|
1430
|
-
protoOf(Companion_1).
|
|
1431
|
-
return color.
|
|
1260
|
+
protoOf(Companion_1).t1h = function (color) {
|
|
1261
|
+
return color.s1h();
|
|
1432
1262
|
};
|
|
1433
1263
|
var Companion_instance_1;
|
|
1434
1264
|
function Companion_getInstance_2() {
|
|
@@ -1439,67 +1269,63 @@
|
|
|
1439
1269
|
function HWB(h, w, b, alpha) {
|
|
1440
1270
|
Companion_getInstance_2();
|
|
1441
1271
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1442
|
-
this.
|
|
1443
|
-
this.
|
|
1444
|
-
this.
|
|
1445
|
-
this.
|
|
1272
|
+
this.x1j_1 = h;
|
|
1273
|
+
this.y1j_1 = w;
|
|
1274
|
+
this.z1j_1 = b;
|
|
1275
|
+
this.a1k_1 = alpha;
|
|
1446
1276
|
}
|
|
1447
|
-
protoOf(HWB).
|
|
1448
|
-
return this.
|
|
1277
|
+
protoOf(HWB).b1k = function () {
|
|
1278
|
+
return this.x1j_1;
|
|
1449
1279
|
};
|
|
1450
|
-
protoOf(HWB).
|
|
1451
|
-
return this.
|
|
1280
|
+
protoOf(HWB).w1g = function () {
|
|
1281
|
+
return this.a1k_1;
|
|
1452
1282
|
};
|
|
1453
|
-
protoOf(HWB).
|
|
1283
|
+
protoOf(HWB).x1g = function () {
|
|
1454
1284
|
return Companion_getInstance_2();
|
|
1455
1285
|
};
|
|
1456
|
-
protoOf(HWB).
|
|
1457
|
-
var h = this.
|
|
1458
|
-
var w = this.
|
|
1459
|
-
var b = this.
|
|
1460
|
-
var a = this.
|
|
1286
|
+
protoOf(HWB).y1g = function () {
|
|
1287
|
+
var h = this.x1j_1 / 60.0;
|
|
1288
|
+
var w = this.y1j_1;
|
|
1289
|
+
var b = this.z1j_1;
|
|
1290
|
+
var a = this.a1k_1;
|
|
1461
1291
|
if (w + b >= 1) {
|
|
1462
1292
|
var gray = w / (w + b);
|
|
1463
|
-
return Companion_getInstance_5().
|
|
1293
|
+
return Companion_getInstance_5().r1i(gray, gray, gray, a);
|
|
1464
1294
|
}
|
|
1465
1295
|
var v = 1 - b;
|
|
1466
1296
|
var i = numberToInt(h);
|
|
1467
1297
|
var f = (i % 2 | 0) === 1 ? 1 - (h - i) : h - i;
|
|
1468
1298
|
var n = w + f * (v - w);
|
|
1469
|
-
|
|
1470
|
-
switch (tmp0_subject) {
|
|
1299
|
+
switch (i) {
|
|
1471
1300
|
case 1:
|
|
1472
|
-
return Companion_getInstance_5().
|
|
1301
|
+
return Companion_getInstance_5().r1i(n, v, w, a);
|
|
1473
1302
|
case 2:
|
|
1474
|
-
return Companion_getInstance_5().
|
|
1303
|
+
return Companion_getInstance_5().r1i(w, v, n, a);
|
|
1475
1304
|
case 3:
|
|
1476
|
-
return Companion_getInstance_5().
|
|
1305
|
+
return Companion_getInstance_5().r1i(w, n, v, a);
|
|
1477
1306
|
case 4:
|
|
1478
|
-
return Companion_getInstance_5().
|
|
1307
|
+
return Companion_getInstance_5().r1i(n, w, v, a);
|
|
1479
1308
|
case 5:
|
|
1480
|
-
return Companion_getInstance_5().
|
|
1309
|
+
return Companion_getInstance_5().r1i(v, w, n, a);
|
|
1481
1310
|
default:
|
|
1482
|
-
return Companion_getInstance_5().
|
|
1311
|
+
return Companion_getInstance_5().r1i(v, n, w, a);
|
|
1483
1312
|
}
|
|
1484
1313
|
};
|
|
1485
|
-
protoOf(HWB).
|
|
1314
|
+
protoOf(HWB).s1h = function () {
|
|
1486
1315
|
return this;
|
|
1487
1316
|
};
|
|
1488
|
-
protoOf(HWB).
|
|
1489
|
-
var tmp$ret$0;
|
|
1317
|
+
protoOf(HWB).a3 = function () {
|
|
1490
1318
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1491
|
-
|
|
1492
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1493
|
-
return tmp$ret$0;
|
|
1319
|
+
return new Float32Array([this.x1j_1, this.y1j_1, this.z1j_1, this.a1k_1]);
|
|
1494
1320
|
};
|
|
1495
1321
|
protoOf(HWB).toString = function () {
|
|
1496
|
-
return 'HWB(h=' + this.
|
|
1322
|
+
return 'HWB(h=' + this.x1j_1 + ', w=' + this.y1j_1 + ', b=' + this.z1j_1 + ', alpha=' + this.a1k_1 + ')';
|
|
1497
1323
|
};
|
|
1498
1324
|
protoOf(HWB).hashCode = function () {
|
|
1499
|
-
var result = getNumberHashCode(this.
|
|
1500
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1501
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1502
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1325
|
+
var result = getNumberHashCode(this.x1j_1);
|
|
1326
|
+
result = imul(result, 31) + getNumberHashCode(this.y1j_1) | 0;
|
|
1327
|
+
result = imul(result, 31) + getNumberHashCode(this.z1j_1) | 0;
|
|
1328
|
+
result = imul(result, 31) + getNumberHashCode(this.a1k_1) | 0;
|
|
1503
1329
|
return result;
|
|
1504
1330
|
};
|
|
1505
1331
|
protoOf(HWB).equals = function (other) {
|
|
@@ -1508,13 +1334,13 @@
|
|
|
1508
1334
|
if (!(other instanceof HWB))
|
|
1509
1335
|
return false;
|
|
1510
1336
|
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1511
|
-
if (!equals(this.
|
|
1337
|
+
if (!equals(this.x1j_1, tmp0_other_with_cast.x1j_1))
|
|
1512
1338
|
return false;
|
|
1513
|
-
if (!equals(this.
|
|
1339
|
+
if (!equals(this.y1j_1, tmp0_other_with_cast.y1j_1))
|
|
1514
1340
|
return false;
|
|
1515
|
-
if (!equals(this.
|
|
1341
|
+
if (!equals(this.z1j_1, tmp0_other_with_cast.z1j_1))
|
|
1516
1342
|
return false;
|
|
1517
|
-
if (!equals(this.
|
|
1343
|
+
if (!equals(this.a1k_1, tmp0_other_with_cast.a1k_1))
|
|
1518
1344
|
return false;
|
|
1519
1345
|
return true;
|
|
1520
1346
|
};
|
|
@@ -1556,54 +1382,46 @@
|
|
|
1556
1382
|
var ICTCP_LMS_TO_XYZ;
|
|
1557
1383
|
function ICtCp() {
|
|
1558
1384
|
}
|
|
1559
|
-
protoOf(ICtCp).
|
|
1560
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1561
|
-
var tmp$ret$3;
|
|
1385
|
+
protoOf(ICtCp).d1l = function () {
|
|
1386
|
+
var fo = RGBColorSpaces_getInstance().b1j_1.e1l();
|
|
1562
1387
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1563
1388
|
var tmp0_dot = get_ICTCP_ICTCP_to_LMS();
|
|
1564
|
-
var tmp1_dot = this.
|
|
1565
|
-
var tmp2_dot = this.
|
|
1566
|
-
var tmp3_dot = this.
|
|
1567
|
-
var tmp$ret$2;
|
|
1389
|
+
var tmp1_dot = this.z1k_1;
|
|
1390
|
+
var tmp2_dot = this.a1l_1;
|
|
1391
|
+
var tmp3_dot = this.b1l_1;
|
|
1568
1392
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
1569
|
-
var
|
|
1570
|
-
var
|
|
1571
|
-
var
|
|
1572
|
-
var tmp$ret$1;
|
|
1393
|
+
var tmp4_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
1394
|
+
var tmp5_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
1395
|
+
var tmp6_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
1573
1396
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1574
1397
|
var tmp0_dot_0 = get_ICTCP_LMS_to_RGB();
|
|
1575
|
-
var tmp1_dot_0 = PqNonlinearity_getInstance().
|
|
1576
|
-
var tmp2_dot_0 = PqNonlinearity_getInstance().
|
|
1577
|
-
var tmp3_dot_0 = PqNonlinearity_getInstance().
|
|
1578
|
-
var tmp$ret$0;
|
|
1398
|
+
var tmp1_dot_0 = PqNonlinearity_getInstance().n1l(tmp4_anonymous);
|
|
1399
|
+
var tmp2_dot_0 = PqNonlinearity_getInstance().n1l(tmp5_anonymous);
|
|
1400
|
+
var tmp3_dot_0 = PqNonlinearity_getInstance().n1l(tmp6_anonymous);
|
|
1579
1401
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1582
|
-
var
|
|
1583
|
-
|
|
1584
|
-
tmp$ret$1 = tmp$ret$0;
|
|
1585
|
-
tmp$ret$2 = tmp$ret$1;
|
|
1586
|
-
tmp$ret$3 = tmp$ret$2;
|
|
1587
|
-
return tmp$ret$3;
|
|
1402
|
+
var tmp4_anonymous_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 0) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 0) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 0) * tmp3_dot_0;
|
|
1403
|
+
var tmp5_anonymous_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 1) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 1) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 1) * tmp3_dot_0;
|
|
1404
|
+
var tmp6_anonymous_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 2) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 2) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 2) * tmp3_dot_0;
|
|
1405
|
+
return RGBColorSpaces_getInstance().b1j_1.r1i(fo.o1l(tmp4_anonymous_0), fo.o1l(tmp5_anonymous_0), fo.o1l(tmp6_anonymous_0), this.c1l_1);
|
|
1588
1406
|
};
|
|
1589
1407
|
function PqNonlinearity() {
|
|
1590
1408
|
PqNonlinearity_instance = this;
|
|
1591
|
-
this.
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
this.
|
|
1598
|
-
this.
|
|
1599
|
-
}
|
|
1600
|
-
protoOf(PqNonlinearity).
|
|
1409
|
+
this.f1l_1 = 0.1593017578125;
|
|
1410
|
+
this.g1l_1 = 78.84375;
|
|
1411
|
+
this.h1l_1 = 0.8359375;
|
|
1412
|
+
this.i1l_1 = 18.8515625;
|
|
1413
|
+
this.j1l_1 = 18.6875;
|
|
1414
|
+
this.k1l_1 = 10000.0;
|
|
1415
|
+
this.l1l_1 = 6.277394636015326;
|
|
1416
|
+
this.m1l_1 = 0.012683313515655966;
|
|
1417
|
+
}
|
|
1418
|
+
protoOf(PqNonlinearity).n1l = function (x) {
|
|
1601
1419
|
var vp = spow(x, 0.012683313515655966);
|
|
1602
1420
|
var n = coerceAtLeast_0(vp - 0.8359375, 0.0);
|
|
1603
1421
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
1604
1422
|
return 10000.0 * l;
|
|
1605
1423
|
};
|
|
1606
|
-
protoOf(PqNonlinearity).
|
|
1424
|
+
protoOf(PqNonlinearity).o1l = function (x) {
|
|
1607
1425
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
1608
1426
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
1609
1427
|
};
|
|
@@ -1615,8 +1433,7 @@
|
|
|
1615
1433
|
}
|
|
1616
1434
|
var properties_initialized_ICtCp_kt_w6y8uv;
|
|
1617
1435
|
function _init_properties_ICtCp_kt__7vx7or() {
|
|
1618
|
-
if (properties_initialized_ICtCp_kt_w6y8uv) {
|
|
1619
|
-
} else {
|
|
1436
|
+
if (!properties_initialized_ICtCp_kt_w6y8uv) {
|
|
1620
1437
|
properties_initialized_ICtCp_kt_w6y8uv = true;
|
|
1621
1438
|
ICTCP_RGB_TO_LMS = scalarDiv(_Matrix___init__impl__q3kp4w_0(1688.0, 2146.0, 262.0, 683.0, 2951.0, 462.0, 99.0, 309.0, 3688.0), 4096.0, true);
|
|
1622
1439
|
ICTCP_LMS_TO_ICTCP = scalarDiv(_Matrix___init__impl__q3kp4w_0(2048.0, 2048.0, 0.0, 6610.0, -13613.0, 7003.0, 17933.0, -17390.0, -543.0), 4096.0, true);
|
|
@@ -1630,28 +1447,28 @@
|
|
|
1630
1447
|
}
|
|
1631
1448
|
function Companion_2() {
|
|
1632
1449
|
Companion_instance_2 = this;
|
|
1633
|
-
this.
|
|
1450
|
+
this.s1i_1 = LABColorSpaces_getInstance().l1j_1;
|
|
1634
1451
|
}
|
|
1635
|
-
protoOf(Companion_2).
|
|
1636
|
-
return this.
|
|
1452
|
+
protoOf(Companion_2).p1k = function () {
|
|
1453
|
+
return this.s1i_1.p1k();
|
|
1637
1454
|
};
|
|
1638
|
-
protoOf(Companion_2).
|
|
1639
|
-
return this.
|
|
1455
|
+
protoOf(Companion_2).ee = function () {
|
|
1456
|
+
return this.s1i_1.ee();
|
|
1640
1457
|
};
|
|
1641
|
-
protoOf(Companion_2).
|
|
1642
|
-
return this.
|
|
1458
|
+
protoOf(Companion_2).u1h = function () {
|
|
1459
|
+
return this.s1i_1.u1h();
|
|
1643
1460
|
};
|
|
1644
|
-
protoOf(Companion_2).
|
|
1645
|
-
return this.
|
|
1461
|
+
protoOf(Companion_2).t1h = function (color) {
|
|
1462
|
+
return this.s1i_1.t1h(color);
|
|
1646
1463
|
};
|
|
1647
|
-
protoOf(Companion_2).
|
|
1648
|
-
return this.
|
|
1464
|
+
protoOf(Companion_2).v1h = function (components) {
|
|
1465
|
+
return this.s1i_1.v1h(components);
|
|
1649
1466
|
};
|
|
1650
|
-
protoOf(Companion_2).
|
|
1651
|
-
return this.
|
|
1467
|
+
protoOf(Companion_2).r1i = function (l, a, b, alpha) {
|
|
1468
|
+
return this.s1i_1.r1i(l, a, b, alpha);
|
|
1652
1469
|
};
|
|
1653
|
-
protoOf(Companion_2).
|
|
1654
|
-
return this.
|
|
1470
|
+
protoOf(Companion_2).p1l = function (l, a, b, alpha) {
|
|
1471
|
+
return this.s1i_1.p1l(l, a, b, alpha);
|
|
1655
1472
|
};
|
|
1656
1473
|
var Companion_instance_2;
|
|
1657
1474
|
function Companion_getInstance_3() {
|
|
@@ -1661,76 +1478,58 @@
|
|
|
1661
1478
|
}
|
|
1662
1479
|
function LAB(l, a, b, alpha, space) {
|
|
1663
1480
|
Companion_getInstance_3();
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1666
|
-
this.
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
}
|
|
1670
|
-
protoOf(LAB).
|
|
1671
|
-
return this.
|
|
1672
|
-
};
|
|
1673
|
-
protoOf(LAB).
|
|
1674
|
-
return this.
|
|
1675
|
-
};
|
|
1676
|
-
protoOf(LAB).
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1686
|
-
var fx = this.w2l_1 / 500.0 + fy;
|
|
1481
|
+
this.n1h_1 = l;
|
|
1482
|
+
this.o1h_1 = a;
|
|
1483
|
+
this.p1h_1 = b;
|
|
1484
|
+
this.q1h_1 = alpha;
|
|
1485
|
+
this.r1h_1 = space;
|
|
1486
|
+
}
|
|
1487
|
+
protoOf(LAB).w1g = function () {
|
|
1488
|
+
return this.q1h_1;
|
|
1489
|
+
};
|
|
1490
|
+
protoOf(LAB).x1g = function () {
|
|
1491
|
+
return this.r1h_1;
|
|
1492
|
+
};
|
|
1493
|
+
protoOf(LAB).y1g = function () {
|
|
1494
|
+
return this.n1h_1 === 0.0 ? Companion_getInstance_5().r1i(0.0, 0.0, 0.0, this.q1h_1) : this.f1h().y1g();
|
|
1495
|
+
};
|
|
1496
|
+
protoOf(LAB).f1h = function () {
|
|
1497
|
+
var xyzSpace = XYZColorSpace_0(this.r1h_1.u1h());
|
|
1498
|
+
if (this.n1h_1 === 0.0)
|
|
1499
|
+
return xyzSpace.q1l(0.0, 0.0, 0.0);
|
|
1500
|
+
var fy = (this.n1h_1 + 16) / 116.0;
|
|
1501
|
+
var fz = fy - this.p1h_1 / 200.0;
|
|
1502
|
+
var fx = this.o1h_1 / 500.0 + fy;
|
|
1687
1503
|
var tmp;
|
|
1688
|
-
if (this.
|
|
1689
|
-
var tmp$ret$0;
|
|
1504
|
+
if (this.n1h_1 > get_CIE_E_times_K()) {
|
|
1690
1505
|
// Inline function 'kotlin.math.pow' call
|
|
1691
|
-
tmp
|
|
1692
|
-
tmp = tmp$ret$0;
|
|
1506
|
+
tmp = Math.pow(fy, 3.0);
|
|
1693
1507
|
} else {
|
|
1694
|
-
tmp = this.
|
|
1508
|
+
tmp = this.n1h_1 / get_CIE_K();
|
|
1695
1509
|
}
|
|
1696
1510
|
var yr = tmp;
|
|
1697
|
-
var tmp$ret$3;
|
|
1698
1511
|
// Inline function 'kotlin.let' call
|
|
1699
|
-
var tmp$ret$1;
|
|
1700
1512
|
// Inline function 'kotlin.math.pow' call
|
|
1701
|
-
|
|
1702
|
-
var tmp0_let = tmp$ret$1;
|
|
1513
|
+
var tmp0_let = Math.pow(fz, 3.0);
|
|
1703
1514
|
// Inline function 'kotlin.contracts.contract' call
|
|
1704
|
-
var tmp$ret$2;
|
|
1705
1515
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1706
|
-
|
|
1707
|
-
tmp$ret$3 = tmp$ret$2;
|
|
1708
|
-
var zr = tmp$ret$3;
|
|
1709
|
-
var tmp$ret$6;
|
|
1516
|
+
var zr = tmp0_let > get_CIE_E() ? tmp0_let : (116 * fz - 16) / get_CIE_K();
|
|
1710
1517
|
// Inline function 'kotlin.let' call
|
|
1711
|
-
var tmp$ret$4;
|
|
1712
1518
|
// Inline function 'kotlin.math.pow' call
|
|
1713
|
-
|
|
1714
|
-
var tmp1_let = tmp$ret$4;
|
|
1519
|
+
var tmp1_let = Math.pow(fx, 3.0);
|
|
1715
1520
|
// Inline function 'kotlin.contracts.contract' call
|
|
1716
|
-
var tmp$ret$5;
|
|
1717
1521
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
var wp = this.z2l_1.c2m().l2o_1;
|
|
1722
|
-
return xyzSpace.x2p(xr * wp.c2q(), yr * wp.b2q_1, zr * wp.d2q(), this.y2l_1);
|
|
1522
|
+
var xr = tmp1_let > get_CIE_E() ? tmp1_let : (116 * fx - 16) / get_CIE_K();
|
|
1523
|
+
var wp = this.r1h_1.u1h().d1k_1;
|
|
1524
|
+
return xyzSpace.p1l(xr * wp.u1l(), yr * wp.t1l_1, zr * wp.v1l(), this.q1h_1);
|
|
1723
1525
|
};
|
|
1724
|
-
protoOf(LAB).
|
|
1725
|
-
var tmp$ret$3;
|
|
1526
|
+
protoOf(LAB).m1h = function () {
|
|
1726
1527
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
1729
|
-
var tmp$ret$0;
|
|
1528
|
+
var tmp0_toPolarModel = this.o1h_1;
|
|
1529
|
+
var tmp1_toPolarModel = this.p1h_1;
|
|
1730
1530
|
// Inline function 'kotlin.math.sqrt' call
|
|
1731
|
-
var tmp0_sqrt =
|
|
1732
|
-
|
|
1733
|
-
var c = tmp$ret$0;
|
|
1531
|
+
var tmp0_sqrt = tmp0_toPolarModel * tmp0_toPolarModel + tmp1_toPolarModel * tmp1_toPolarModel;
|
|
1532
|
+
var c = Math.sqrt(tmp0_sqrt);
|
|
1734
1533
|
var tmp;
|
|
1735
1534
|
if (c > -1.0E-7 ? c < 1.0E-7 : false) {
|
|
1736
1535
|
FloatCompanionObject_getInstance();
|
|
@@ -1738,36 +1537,30 @@
|
|
|
1738
1537
|
} else {
|
|
1739
1538
|
var tmp$ret$1;
|
|
1740
1539
|
// Inline function 'kotlin.math.atan2' call
|
|
1741
|
-
tmp$ret$1 = Math.atan2(
|
|
1540
|
+
tmp$ret$1 = Math.atan2(tmp1_toPolarModel, tmp0_toPolarModel);
|
|
1742
1541
|
tmp = radToDeg(tmp$ret$1);
|
|
1743
1542
|
}
|
|
1744
1543
|
var h = tmp;
|
|
1745
|
-
var tmp$ret$2;
|
|
1746
1544
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
1747
|
-
var
|
|
1748
|
-
|
|
1749
|
-
tmp$ret$3 = tmp$ret$2;
|
|
1750
|
-
return tmp$ret$3;
|
|
1545
|
+
var tmp2_anonymous = normalizeDeg_0(h);
|
|
1546
|
+
return LCHabColorSpace(this.r1h_1.u1h()).r1i(this.n1h_1, c, tmp2_anonymous, this.q1h_1);
|
|
1751
1547
|
};
|
|
1752
|
-
protoOf(LAB).
|
|
1548
|
+
protoOf(LAB).g1h = function () {
|
|
1753
1549
|
return this;
|
|
1754
1550
|
};
|
|
1755
|
-
protoOf(LAB).
|
|
1756
|
-
var tmp$ret$0;
|
|
1551
|
+
protoOf(LAB).a3 = function () {
|
|
1757
1552
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1758
|
-
|
|
1759
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1760
|
-
return tmp$ret$0;
|
|
1553
|
+
return new Float32Array([this.n1h_1, this.o1h_1, this.p1h_1, this.q1h_1]);
|
|
1761
1554
|
};
|
|
1762
1555
|
protoOf(LAB).toString = function () {
|
|
1763
|
-
return 'LAB(l=' + this.
|
|
1556
|
+
return 'LAB(l=' + this.n1h_1 + ', a=' + this.o1h_1 + ', b=' + this.p1h_1 + ', alpha=' + this.q1h_1 + ', space=' + this.r1h_1 + ')';
|
|
1764
1557
|
};
|
|
1765
1558
|
protoOf(LAB).hashCode = function () {
|
|
1766
|
-
var result = getNumberHashCode(this.
|
|
1767
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1768
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1769
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1770
|
-
result = imul(result, 31) + hashCode(this.
|
|
1559
|
+
var result = getNumberHashCode(this.n1h_1);
|
|
1560
|
+
result = imul(result, 31) + getNumberHashCode(this.o1h_1) | 0;
|
|
1561
|
+
result = imul(result, 31) + getNumberHashCode(this.p1h_1) | 0;
|
|
1562
|
+
result = imul(result, 31) + getNumberHashCode(this.q1h_1) | 0;
|
|
1563
|
+
result = imul(result, 31) + hashCode(this.r1h_1) | 0;
|
|
1771
1564
|
return result;
|
|
1772
1565
|
};
|
|
1773
1566
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1776,28 +1569,27 @@
|
|
|
1776
1569
|
if (!(other instanceof LAB))
|
|
1777
1570
|
return false;
|
|
1778
1571
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1779
|
-
if (!equals(this.
|
|
1572
|
+
if (!equals(this.n1h_1, tmp0_other_with_cast.n1h_1))
|
|
1780
1573
|
return false;
|
|
1781
|
-
if (!equals(this.
|
|
1574
|
+
if (!equals(this.o1h_1, tmp0_other_with_cast.o1h_1))
|
|
1782
1575
|
return false;
|
|
1783
|
-
if (!equals(this.
|
|
1576
|
+
if (!equals(this.p1h_1, tmp0_other_with_cast.p1h_1))
|
|
1784
1577
|
return false;
|
|
1785
|
-
if (!equals(this.
|
|
1578
|
+
if (!equals(this.q1h_1, tmp0_other_with_cast.q1h_1))
|
|
1786
1579
|
return false;
|
|
1787
|
-
if (!equals(this.
|
|
1580
|
+
if (!equals(this.r1h_1, tmp0_other_with_cast.r1h_1))
|
|
1788
1581
|
return false;
|
|
1789
1582
|
return true;
|
|
1790
1583
|
};
|
|
1791
1584
|
function LABColorSpace() {
|
|
1792
1585
|
}
|
|
1793
1586
|
function LABColorSpace_0(whitePoint) {
|
|
1794
|
-
|
|
1795
|
-
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LABColorSpaces_getInstance().t2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LABColorSpaces_getInstance().u2n_1 : new LABColorSpaceImpl(whitePoint);
|
|
1587
|
+
return whitePoint.equals(Illuminant_getInstance().j1k_1) ? LABColorSpaces_getInstance().l1j_1 : whitePoint.equals(Illuminant_getInstance().h1k_1) ? LABColorSpaces_getInstance().m1j_1 : new LABColorSpaceImpl(whitePoint);
|
|
1796
1588
|
}
|
|
1797
1589
|
function LABColorSpaces() {
|
|
1798
1590
|
LABColorSpaces_instance = this;
|
|
1799
|
-
this.
|
|
1800
|
-
this.
|
|
1591
|
+
this.l1j_1 = new LABColorSpaceImpl(Illuminant_getInstance().j1k_1);
|
|
1592
|
+
this.m1j_1 = new LABColorSpaceImpl(Illuminant_getInstance().h1k_1);
|
|
1801
1593
|
}
|
|
1802
1594
|
var LABColorSpaces_instance;
|
|
1803
1595
|
function LABColorSpaces_getInstance() {
|
|
@@ -1806,59 +1598,46 @@
|
|
|
1806
1598
|
return LABColorSpaces_instance;
|
|
1807
1599
|
}
|
|
1808
1600
|
function LABColorSpaceImpl(whitePoint) {
|
|
1809
|
-
this.
|
|
1810
|
-
this.
|
|
1601
|
+
this.w1l_1 = whitePoint;
|
|
1602
|
+
this.x1l_1 = rectangularComponentInfo('LAB');
|
|
1811
1603
|
}
|
|
1812
|
-
protoOf(LABColorSpaceImpl).
|
|
1813
|
-
return this.
|
|
1604
|
+
protoOf(LABColorSpaceImpl).u1h = function () {
|
|
1605
|
+
return this.w1l_1;
|
|
1814
1606
|
};
|
|
1815
|
-
protoOf(LABColorSpaceImpl).
|
|
1607
|
+
protoOf(LABColorSpaceImpl).ee = function () {
|
|
1816
1608
|
return 'LAB';
|
|
1817
1609
|
};
|
|
1818
|
-
protoOf(LABColorSpaceImpl).
|
|
1819
|
-
return this.
|
|
1610
|
+
protoOf(LABColorSpaceImpl).p1k = function () {
|
|
1611
|
+
return this.x1l_1;
|
|
1820
1612
|
};
|
|
1821
|
-
protoOf(LABColorSpaceImpl).
|
|
1822
|
-
var tmp$ret$2;
|
|
1613
|
+
protoOf(LABColorSpaceImpl).t1h = function (color) {
|
|
1823
1614
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1824
1615
|
var tmp;
|
|
1825
|
-
var tmp_0 = color.
|
|
1616
|
+
var tmp_0 = color.x1g();
|
|
1826
1617
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1827
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1828
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1829
|
-
var tmp$ret$0;
|
|
1618
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1h();
|
|
1619
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().j1k_1 : tmp1_elvis_lhs).equals(this.u1h())) {
|
|
1830
1620
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1831
|
-
tmp
|
|
1832
|
-
tmp = tmp$ret$0;
|
|
1621
|
+
tmp = color.g1h();
|
|
1833
1622
|
} else {
|
|
1834
|
-
var tmp$ret$1;
|
|
1835
1623
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1836
|
-
|
|
1837
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.o2l();
|
|
1838
|
-
tmp = tmp$ret$1;
|
|
1624
|
+
tmp = color.f1h().i1j(XYZColorSpace_0(this.u1h())).g1h();
|
|
1839
1625
|
}
|
|
1840
|
-
|
|
1841
|
-
return tmp$ret$2;
|
|
1626
|
+
return tmp;
|
|
1842
1627
|
};
|
|
1843
|
-
protoOf(LABColorSpaceImpl).
|
|
1844
|
-
var tmp$ret$5;
|
|
1628
|
+
protoOf(LABColorSpaceImpl).v1h = function (components) {
|
|
1845
1629
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1846
|
-
var tmp$ret$4;
|
|
1847
1630
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1848
|
-
var size = this.
|
|
1631
|
+
var size = this.p1k().i();
|
|
1849
1632
|
// Inline function 'kotlin.require' call
|
|
1850
1633
|
var containsLower = size - 1 | 0;
|
|
1851
1634
|
var containsArg = components.length;
|
|
1852
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
1853
1635
|
// Inline function 'kotlin.contracts.contract' call
|
|
1854
|
-
if (!
|
|
1855
|
-
var tmp$ret$0;
|
|
1636
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
1856
1637
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
1857
|
-
|
|
1858
|
-
var message = tmp$ret$0;
|
|
1638
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
1859
1639
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
1860
1640
|
}
|
|
1861
|
-
var tmp$ret$3;
|
|
1862
1641
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1863
1642
|
var tmp = components[0];
|
|
1864
1643
|
var tmp_0 = components[1];
|
|
@@ -1869,25 +1648,20 @@
|
|
|
1869
1648
|
if (3 <= get_lastIndex_0(components)) {
|
|
1870
1649
|
tmp_2 = components[3];
|
|
1871
1650
|
} else {
|
|
1872
|
-
var tmp$ret$1;
|
|
1873
1651
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1874
|
-
|
|
1875
|
-
tmp_2 = tmp$ret$1;
|
|
1652
|
+
tmp_2 = 1.0;
|
|
1876
1653
|
}
|
|
1877
1654
|
tmp$ret$2 = tmp_2;
|
|
1878
|
-
|
|
1879
|
-
tmp$ret$4 = tmp$ret$3;
|
|
1880
|
-
tmp$ret$5 = tmp$ret$4;
|
|
1881
|
-
return tmp$ret$5;
|
|
1655
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1882
1656
|
};
|
|
1883
1657
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1884
|
-
return 'LABColorSpace(' + this.
|
|
1658
|
+
return 'LABColorSpace(' + this.w1l_1 + ')';
|
|
1885
1659
|
};
|
|
1886
|
-
protoOf(LABColorSpaceImpl).
|
|
1660
|
+
protoOf(LABColorSpaceImpl).r1i = function (l, a, b, alpha) {
|
|
1887
1661
|
return new LAB(l, a, b, alpha, this);
|
|
1888
1662
|
};
|
|
1889
1663
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1890
|
-
return this.
|
|
1664
|
+
return this.w1l_1.hashCode();
|
|
1891
1665
|
};
|
|
1892
1666
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1893
1667
|
if (this === other)
|
|
@@ -1895,31 +1669,31 @@
|
|
|
1895
1669
|
if (!(other instanceof LABColorSpaceImpl))
|
|
1896
1670
|
return false;
|
|
1897
1671
|
var tmp0_other_with_cast = other instanceof LABColorSpaceImpl ? other : THROW_CCE();
|
|
1898
|
-
if (!this.
|
|
1672
|
+
if (!this.w1l_1.equals(tmp0_other_with_cast.w1l_1))
|
|
1899
1673
|
return false;
|
|
1900
1674
|
return true;
|
|
1901
1675
|
};
|
|
1902
1676
|
function Companion_3() {
|
|
1903
1677
|
Companion_instance_3 = this;
|
|
1904
|
-
this.
|
|
1678
|
+
this.t1i_1 = LCHabColorSpaces_getInstance().j1j_1;
|
|
1905
1679
|
}
|
|
1906
|
-
protoOf(Companion_3).
|
|
1907
|
-
return this.
|
|
1680
|
+
protoOf(Companion_3).p1k = function () {
|
|
1681
|
+
return this.t1i_1.p1k();
|
|
1908
1682
|
};
|
|
1909
|
-
protoOf(Companion_3).
|
|
1910
|
-
return this.
|
|
1683
|
+
protoOf(Companion_3).ee = function () {
|
|
1684
|
+
return this.t1i_1.ee();
|
|
1911
1685
|
};
|
|
1912
|
-
protoOf(Companion_3).
|
|
1913
|
-
return this.
|
|
1686
|
+
protoOf(Companion_3).u1h = function () {
|
|
1687
|
+
return this.t1i_1.u1h();
|
|
1914
1688
|
};
|
|
1915
|
-
protoOf(Companion_3).
|
|
1916
|
-
return this.
|
|
1689
|
+
protoOf(Companion_3).t1h = function (color) {
|
|
1690
|
+
return this.t1i_1.t1h(color);
|
|
1917
1691
|
};
|
|
1918
|
-
protoOf(Companion_3).
|
|
1919
|
-
return this.
|
|
1692
|
+
protoOf(Companion_3).v1h = function (components) {
|
|
1693
|
+
return this.t1i_1.v1h(components);
|
|
1920
1694
|
};
|
|
1921
|
-
protoOf(Companion_3).
|
|
1922
|
-
return this.
|
|
1695
|
+
protoOf(Companion_3).r1i = function (l, c, h, alpha) {
|
|
1696
|
+
return this.t1i_1.r1i(l, c, h, alpha);
|
|
1923
1697
|
};
|
|
1924
1698
|
var Companion_instance_3;
|
|
1925
1699
|
function Companion_getInstance_4() {
|
|
@@ -1929,66 +1703,55 @@
|
|
|
1929
1703
|
}
|
|
1930
1704
|
function LCHab(l, c, h, alpha, space) {
|
|
1931
1705
|
Companion_getInstance_4();
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1935
|
-
this.
|
|
1936
|
-
this.
|
|
1706
|
+
this.s1j_1 = l;
|
|
1707
|
+
this.t1j_1 = c;
|
|
1708
|
+
this.u1j_1 = h;
|
|
1709
|
+
this.v1j_1 = alpha;
|
|
1710
|
+
this.w1j_1 = space;
|
|
1937
1711
|
}
|
|
1938
|
-
protoOf(LCHab).
|
|
1939
|
-
return this.
|
|
1712
|
+
protoOf(LCHab).b1k = function () {
|
|
1713
|
+
return this.u1j_1;
|
|
1940
1714
|
};
|
|
1941
|
-
protoOf(LCHab).
|
|
1942
|
-
return this.
|
|
1715
|
+
protoOf(LCHab).w1g = function () {
|
|
1716
|
+
return this.v1j_1;
|
|
1943
1717
|
};
|
|
1944
|
-
protoOf(LCHab).
|
|
1945
|
-
return this.
|
|
1718
|
+
protoOf(LCHab).x1g = function () {
|
|
1719
|
+
return this.w1j_1;
|
|
1946
1720
|
};
|
|
1947
|
-
protoOf(LCHab).
|
|
1948
|
-
return this.
|
|
1721
|
+
protoOf(LCHab).y1g = function () {
|
|
1722
|
+
return this.g1h().y1g();
|
|
1949
1723
|
};
|
|
1950
|
-
protoOf(LCHab).
|
|
1951
|
-
return this.
|
|
1724
|
+
protoOf(LCHab).f1h = function () {
|
|
1725
|
+
return this.g1h().f1h();
|
|
1952
1726
|
};
|
|
1953
|
-
protoOf(LCHab).
|
|
1954
|
-
var tmp$ret$3;
|
|
1727
|
+
protoOf(LCHab).g1h = function () {
|
|
1955
1728
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1956
|
-
var tmp0_fromPolarModel = this.
|
|
1957
|
-
var tmp1_fromPolarModel = this.
|
|
1729
|
+
var tmp0_fromPolarModel = this.t1j_1;
|
|
1730
|
+
var tmp1_fromPolarModel = this.u1j_1;
|
|
1958
1731
|
var hDegrees = isNaN_0(tmp1_fromPolarModel) ? 0.0 : degToRad(tmp1_fromPolarModel);
|
|
1959
|
-
var tmp$ret$0;
|
|
1960
1732
|
// Inline function 'kotlin.math.cos' call
|
|
1961
|
-
|
|
1962
|
-
var a = tmp0_fromPolarModel * tmp$ret$0;
|
|
1963
|
-
var tmp$ret$1;
|
|
1733
|
+
var a = tmp0_fromPolarModel * Math.cos(hDegrees);
|
|
1964
1734
|
// Inline function 'kotlin.math.sin' call
|
|
1965
|
-
|
|
1966
|
-
var b = tmp0_fromPolarModel * tmp$ret$1;
|
|
1967
|
-
var tmp$ret$2;
|
|
1735
|
+
var b = tmp0_fromPolarModel * Math.sin(hDegrees);
|
|
1968
1736
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1969
|
-
|
|
1970
|
-
tmp$ret$3 = tmp$ret$2;
|
|
1971
|
-
return tmp$ret$3;
|
|
1737
|
+
return LABColorSpace_0(this.w1j_1.u1h()).r1i(this.s1j_1, a, b, this.v1j_1);
|
|
1972
1738
|
};
|
|
1973
|
-
protoOf(LCHab).
|
|
1739
|
+
protoOf(LCHab).m1h = function () {
|
|
1974
1740
|
return this;
|
|
1975
1741
|
};
|
|
1976
|
-
protoOf(LCHab).
|
|
1977
|
-
var tmp$ret$0;
|
|
1742
|
+
protoOf(LCHab).a3 = function () {
|
|
1978
1743
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1979
|
-
|
|
1980
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1981
|
-
return tmp$ret$0;
|
|
1744
|
+
return new Float32Array([this.s1j_1, this.t1j_1, this.u1j_1, this.v1j_1]);
|
|
1982
1745
|
};
|
|
1983
1746
|
protoOf(LCHab).toString = function () {
|
|
1984
|
-
return 'LCHab(l=' + this.
|
|
1747
|
+
return 'LCHab(l=' + this.s1j_1 + ', c=' + this.t1j_1 + ', h=' + this.u1j_1 + ', alpha=' + this.v1j_1 + ', space=' + this.w1j_1 + ')';
|
|
1985
1748
|
};
|
|
1986
1749
|
protoOf(LCHab).hashCode = function () {
|
|
1987
|
-
var result = getNumberHashCode(this.
|
|
1988
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1989
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1990
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1991
|
-
result = imul(result, 31) + hashCode(this.
|
|
1750
|
+
var result = getNumberHashCode(this.s1j_1);
|
|
1751
|
+
result = imul(result, 31) + getNumberHashCode(this.t1j_1) | 0;
|
|
1752
|
+
result = imul(result, 31) + getNumberHashCode(this.u1j_1) | 0;
|
|
1753
|
+
result = imul(result, 31) + getNumberHashCode(this.v1j_1) | 0;
|
|
1754
|
+
result = imul(result, 31) + hashCode(this.w1j_1) | 0;
|
|
1992
1755
|
return result;
|
|
1993
1756
|
};
|
|
1994
1757
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1997,26 +1760,25 @@
|
|
|
1997
1760
|
if (!(other instanceof LCHab))
|
|
1998
1761
|
return false;
|
|
1999
1762
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
2000
|
-
if (!equals(this.
|
|
1763
|
+
if (!equals(this.s1j_1, tmp0_other_with_cast.s1j_1))
|
|
2001
1764
|
return false;
|
|
2002
|
-
if (!equals(this.
|
|
1765
|
+
if (!equals(this.t1j_1, tmp0_other_with_cast.t1j_1))
|
|
2003
1766
|
return false;
|
|
2004
|
-
if (!equals(this.
|
|
1767
|
+
if (!equals(this.u1j_1, tmp0_other_with_cast.u1j_1))
|
|
2005
1768
|
return false;
|
|
2006
|
-
if (!equals(this.
|
|
1769
|
+
if (!equals(this.v1j_1, tmp0_other_with_cast.v1j_1))
|
|
2007
1770
|
return false;
|
|
2008
|
-
if (!equals(this.
|
|
1771
|
+
if (!equals(this.w1j_1, tmp0_other_with_cast.w1j_1))
|
|
2009
1772
|
return false;
|
|
2010
1773
|
return true;
|
|
2011
1774
|
};
|
|
2012
1775
|
function LCHabColorSpace(whitePoint) {
|
|
2013
|
-
|
|
2014
|
-
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LCHabColorSpaces_getInstance().r2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LCHabColorSpaces_getInstance().s2n_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1776
|
+
return whitePoint.equals(Illuminant_getInstance().j1k_1) ? LCHabColorSpaces_getInstance().j1j_1 : whitePoint.equals(Illuminant_getInstance().h1k_1) ? LCHabColorSpaces_getInstance().k1j_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
2015
1777
|
}
|
|
2016
1778
|
function LCHabColorSpaces() {
|
|
2017
1779
|
LCHabColorSpaces_instance = this;
|
|
2018
|
-
this.
|
|
2019
|
-
this.
|
|
1780
|
+
this.j1j_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().j1k_1);
|
|
1781
|
+
this.k1j_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().h1k_1);
|
|
2020
1782
|
}
|
|
2021
1783
|
var LCHabColorSpaces_instance;
|
|
2022
1784
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -2025,59 +1787,46 @@
|
|
|
2025
1787
|
return LCHabColorSpaces_instance;
|
|
2026
1788
|
}
|
|
2027
1789
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
2028
|
-
this.
|
|
2029
|
-
this.
|
|
1790
|
+
this.y1l_1 = whitePoint;
|
|
1791
|
+
this.z1l_1 = polarComponentInfo('LCH');
|
|
2030
1792
|
}
|
|
2031
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2032
|
-
return this.
|
|
1793
|
+
protoOf(LCHabColorSpaceImpl).u1h = function () {
|
|
1794
|
+
return this.y1l_1;
|
|
2033
1795
|
};
|
|
2034
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1796
|
+
protoOf(LCHabColorSpaceImpl).ee = function () {
|
|
2035
1797
|
return 'LCHab';
|
|
2036
1798
|
};
|
|
2037
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2038
|
-
return this.
|
|
1799
|
+
protoOf(LCHabColorSpaceImpl).p1k = function () {
|
|
1800
|
+
return this.z1l_1;
|
|
2039
1801
|
};
|
|
2040
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2041
|
-
var tmp$ret$2;
|
|
1802
|
+
protoOf(LCHabColorSpaceImpl).t1h = function (color) {
|
|
2042
1803
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
2043
1804
|
var tmp;
|
|
2044
|
-
var tmp_0 = color.
|
|
1805
|
+
var tmp_0 = color.x1g();
|
|
2045
1806
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
2046
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2047
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
2048
|
-
var tmp$ret$0;
|
|
1807
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1h();
|
|
1808
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().j1k_1 : tmp1_elvis_lhs).equals(this.u1h())) {
|
|
2049
1809
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
2050
|
-
tmp
|
|
2051
|
-
tmp = tmp$ret$0;
|
|
1810
|
+
tmp = color.m1h();
|
|
2052
1811
|
} else {
|
|
2053
|
-
var tmp$ret$1;
|
|
2054
1812
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
2055
|
-
|
|
2056
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.u2l();
|
|
2057
|
-
tmp = tmp$ret$1;
|
|
1813
|
+
tmp = color.f1h().i1j(XYZColorSpace_0(this.u1h())).m1h();
|
|
2058
1814
|
}
|
|
2059
|
-
|
|
2060
|
-
return tmp$ret$2;
|
|
1815
|
+
return tmp;
|
|
2061
1816
|
};
|
|
2062
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2063
|
-
var tmp$ret$5;
|
|
1817
|
+
protoOf(LCHabColorSpaceImpl).v1h = function (components) {
|
|
2064
1818
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2065
|
-
var tmp$ret$4;
|
|
2066
1819
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2067
|
-
var size = this.
|
|
1820
|
+
var size = this.p1k().i();
|
|
2068
1821
|
// Inline function 'kotlin.require' call
|
|
2069
1822
|
var containsLower = size - 1 | 0;
|
|
2070
1823
|
var containsArg = components.length;
|
|
2071
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2072
1824
|
// Inline function 'kotlin.contracts.contract' call
|
|
2073
|
-
if (!
|
|
2074
|
-
var tmp$ret$0;
|
|
1825
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2075
1826
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2076
|
-
|
|
2077
|
-
var message = tmp$ret$0;
|
|
1827
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2078
1828
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2079
1829
|
}
|
|
2080
|
-
var tmp$ret$3;
|
|
2081
1830
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2082
1831
|
var tmp = components[0];
|
|
2083
1832
|
var tmp_0 = components[1];
|
|
@@ -2088,25 +1837,20 @@
|
|
|
2088
1837
|
if (3 <= get_lastIndex_0(components)) {
|
|
2089
1838
|
tmp_2 = components[3];
|
|
2090
1839
|
} else {
|
|
2091
|
-
var tmp$ret$1;
|
|
2092
1840
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2093
|
-
|
|
2094
|
-
tmp_2 = tmp$ret$1;
|
|
1841
|
+
tmp_2 = 1.0;
|
|
2095
1842
|
}
|
|
2096
1843
|
tmp$ret$2 = tmp_2;
|
|
2097
|
-
|
|
2098
|
-
tmp$ret$4 = tmp$ret$3;
|
|
2099
|
-
tmp$ret$5 = tmp$ret$4;
|
|
2100
|
-
return tmp$ret$5;
|
|
1844
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2101
1845
|
};
|
|
2102
1846
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
2103
|
-
return 'LCHabColorSpace(' + this.
|
|
1847
|
+
return 'LCHabColorSpace(' + this.y1l_1 + ')';
|
|
2104
1848
|
};
|
|
2105
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1849
|
+
protoOf(LCHabColorSpaceImpl).r1i = function (l, c, h, alpha) {
|
|
2106
1850
|
return new LCHab(l, c, h, alpha, this);
|
|
2107
1851
|
};
|
|
2108
1852
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
2109
|
-
return this.
|
|
1853
|
+
return this.y1l_1.hashCode();
|
|
2110
1854
|
};
|
|
2111
1855
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
2112
1856
|
if (this === other)
|
|
@@ -2114,24 +1858,24 @@
|
|
|
2114
1858
|
if (!(other instanceof LCHabColorSpaceImpl))
|
|
2115
1859
|
return false;
|
|
2116
1860
|
var tmp0_other_with_cast = other instanceof LCHabColorSpaceImpl ? other : THROW_CCE();
|
|
2117
|
-
if (!this.
|
|
1861
|
+
if (!this.y1l_1.equals(tmp0_other_with_cast.y1l_1))
|
|
2118
1862
|
return false;
|
|
2119
1863
|
return true;
|
|
2120
1864
|
};
|
|
2121
1865
|
function GammaTransferFunctions(gamma) {
|
|
2122
|
-
this.
|
|
1866
|
+
this.a1m_1 = gamma;
|
|
2123
1867
|
}
|
|
2124
|
-
protoOf(GammaTransferFunctions).
|
|
2125
|
-
return spow(x, this.
|
|
1868
|
+
protoOf(GammaTransferFunctions).n1l = function (x) {
|
|
1869
|
+
return spow(x, this.a1m_1);
|
|
2126
1870
|
};
|
|
2127
|
-
protoOf(GammaTransferFunctions).
|
|
2128
|
-
return spow(x, 1.0 / this.
|
|
1871
|
+
protoOf(GammaTransferFunctions).o1l = function (x) {
|
|
1872
|
+
return spow(x, 1.0 / this.a1m_1);
|
|
2129
1873
|
};
|
|
2130
1874
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
2131
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
1875
|
+
return 'GammaTransferFunctions(gamma=' + this.a1m_1 + ')';
|
|
2132
1876
|
};
|
|
2133
1877
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2134
|
-
return getNumberHashCode(this.
|
|
1878
|
+
return getNumberHashCode(this.a1m_1);
|
|
2135
1879
|
};
|
|
2136
1880
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2137
1881
|
if (this === other)
|
|
@@ -2139,17 +1883,17 @@
|
|
|
2139
1883
|
if (!(other instanceof GammaTransferFunctions))
|
|
2140
1884
|
return false;
|
|
2141
1885
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2142
|
-
if (!equals(this.
|
|
1886
|
+
if (!equals(this.a1m_1, tmp0_other_with_cast.a1m_1))
|
|
2143
1887
|
return false;
|
|
2144
1888
|
return true;
|
|
2145
1889
|
};
|
|
2146
1890
|
function LinearTransferFunctions() {
|
|
2147
1891
|
LinearTransferFunctions_instance = this;
|
|
2148
1892
|
}
|
|
2149
|
-
protoOf(LinearTransferFunctions).
|
|
1893
|
+
protoOf(LinearTransferFunctions).n1l = function (x) {
|
|
2150
1894
|
return x;
|
|
2151
1895
|
};
|
|
2152
|
-
protoOf(LinearTransferFunctions).
|
|
1896
|
+
protoOf(LinearTransferFunctions).o1l = function (x) {
|
|
2153
1897
|
return x;
|
|
2154
1898
|
};
|
|
2155
1899
|
var LinearTransferFunctions_instance;
|
|
@@ -2162,43 +1906,43 @@
|
|
|
2162
1906
|
}
|
|
2163
1907
|
function Companion_4() {
|
|
2164
1908
|
Companion_instance_4 = this;
|
|
2165
|
-
this.
|
|
1909
|
+
this.p1i_1 = RGBColorSpaces_getInstance().u1i_1;
|
|
2166
1910
|
}
|
|
2167
|
-
protoOf(Companion_4).
|
|
2168
|
-
return this.
|
|
1911
|
+
protoOf(Companion_4).p1k = function () {
|
|
1912
|
+
return this.p1i_1.p1k();
|
|
2169
1913
|
};
|
|
2170
|
-
protoOf(Companion_4).
|
|
2171
|
-
return this.
|
|
1914
|
+
protoOf(Companion_4).c1m = function () {
|
|
1915
|
+
return this.p1i_1.c1m();
|
|
2172
1916
|
};
|
|
2173
|
-
protoOf(Companion_4).
|
|
2174
|
-
return this.
|
|
1917
|
+
protoOf(Companion_4).b1m = function () {
|
|
1918
|
+
return this.p1i_1.b1m();
|
|
2175
1919
|
};
|
|
2176
|
-
protoOf(Companion_4).
|
|
2177
|
-
return this.
|
|
1920
|
+
protoOf(Companion_4).ee = function () {
|
|
1921
|
+
return this.p1i_1.ee();
|
|
2178
1922
|
};
|
|
2179
|
-
protoOf(Companion_4).
|
|
2180
|
-
return this.
|
|
1923
|
+
protoOf(Companion_4).e1l = function () {
|
|
1924
|
+
return this.p1i_1.e1l();
|
|
2181
1925
|
};
|
|
2182
|
-
protoOf(Companion_4).
|
|
2183
|
-
return this.
|
|
1926
|
+
protoOf(Companion_4).u1h = function () {
|
|
1927
|
+
return this.p1i_1.u1h();
|
|
2184
1928
|
};
|
|
2185
|
-
protoOf(Companion_4).
|
|
2186
|
-
return this.
|
|
1929
|
+
protoOf(Companion_4).t1h = function (color) {
|
|
1930
|
+
return this.p1i_1.t1h(color);
|
|
2187
1931
|
};
|
|
2188
|
-
protoOf(Companion_4).
|
|
2189
|
-
return this.
|
|
1932
|
+
protoOf(Companion_4).v1h = function (components) {
|
|
1933
|
+
return this.p1i_1.v1h(components);
|
|
2190
1934
|
};
|
|
2191
|
-
protoOf(Companion_4).
|
|
2192
|
-
return this.
|
|
1935
|
+
protoOf(Companion_4).n1k = function (r, g, b, alpha) {
|
|
1936
|
+
return this.p1i_1.n1k(r, g, b, alpha);
|
|
2193
1937
|
};
|
|
2194
|
-
protoOf(Companion_4).
|
|
2195
|
-
return this.
|
|
1938
|
+
protoOf(Companion_4).r1i = function (r, g, b, alpha) {
|
|
1939
|
+
return this.p1i_1.r1i(r, g, b, alpha);
|
|
2196
1940
|
};
|
|
2197
|
-
protoOf(Companion_4).
|
|
2198
|
-
return this.
|
|
1941
|
+
protoOf(Companion_4).p1l = function (r, g, b, alpha) {
|
|
1942
|
+
return this.p1i_1.p1l(r, g, b, alpha);
|
|
2199
1943
|
};
|
|
2200
|
-
protoOf(Companion_4).
|
|
2201
|
-
return this.
|
|
1944
|
+
protoOf(Companion_4).q1i = function (hex) {
|
|
1945
|
+
return this.p1i_1.q1i(hex);
|
|
2202
1946
|
};
|
|
2203
1947
|
var Companion_instance_4;
|
|
2204
1948
|
function Companion_getInstance_5() {
|
|
@@ -2208,50 +1952,41 @@
|
|
|
2208
1952
|
}
|
|
2209
1953
|
function RGB(r, g, b, alpha, space) {
|
|
2210
1954
|
Companion_getInstance_5();
|
|
2211
|
-
this.
|
|
2212
|
-
this.
|
|
2213
|
-
this.
|
|
2214
|
-
this.
|
|
2215
|
-
this.
|
|
1955
|
+
this.a1h_1 = r;
|
|
1956
|
+
this.b1h_1 = g;
|
|
1957
|
+
this.c1h_1 = b;
|
|
1958
|
+
this.d1h_1 = alpha;
|
|
1959
|
+
this.e1h_1 = space;
|
|
2216
1960
|
}
|
|
2217
|
-
protoOf(RGB).
|
|
2218
|
-
return this.
|
|
1961
|
+
protoOf(RGB).w1g = function () {
|
|
1962
|
+
return this.d1h_1;
|
|
2219
1963
|
};
|
|
2220
|
-
protoOf(RGB).
|
|
2221
|
-
return this.
|
|
1964
|
+
protoOf(RGB).x1g = function () {
|
|
1965
|
+
return this.e1h_1;
|
|
2222
1966
|
};
|
|
2223
|
-
protoOf(RGB).
|
|
2224
|
-
var tmp$ret$1;
|
|
1967
|
+
protoOf(RGB).n1j = function () {
|
|
2225
1968
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2226
|
-
var tmp$ret$0;
|
|
2227
1969
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
2228
|
-
var
|
|
2229
|
-
|
|
2230
|
-
tmp$ret$1 = tmp$ret$0;
|
|
2231
|
-
return tmp$ret$1;
|
|
1970
|
+
var tmp0_anonymous = this.d1m(SRGB_getInstance());
|
|
1971
|
+
return _RGBInt___init__impl__lqova7_1(tmp0_anonymous.a1h_1, tmp0_anonymous.b1h_1, tmp0_anonymous.c1h_1, nanToOne(tmp0_anonymous.d1h_1));
|
|
2232
1972
|
};
|
|
2233
|
-
protoOf(RGB).
|
|
2234
|
-
var f = SRGB_getInstance().
|
|
2235
|
-
return equals(this.
|
|
1973
|
+
protoOf(RGB).d1m = function (space) {
|
|
1974
|
+
var f = SRGB_getInstance().t1k_1;
|
|
1975
|
+
return equals(this.e1h_1, space) ? this : (equals(this.e1h_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().v1i_1) : false) ? space.r1i(f.n1l(this.a1h_1), f.n1l(this.b1h_1), f.n1l(this.c1h_1), this.d1h_1) : (equals(this.e1h_1, RGBColorSpaces_getInstance().v1i_1) ? equals(space, SRGB_getInstance()) : false) ? space.r1i(f.o1l(this.a1h_1), f.o1l(this.b1h_1), f.o1l(this.c1h_1), this.d1h_1) : this.f1h().e1m(space);
|
|
2236
1976
|
};
|
|
2237
|
-
protoOf(RGB).
|
|
1977
|
+
protoOf(RGB).z1g = function () {
|
|
2238
1978
|
var tmp$ret$3;
|
|
2239
1979
|
$l$block: {
|
|
2240
1980
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2241
|
-
var tmp$ret$4;
|
|
2242
1981
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2243
|
-
var
|
|
2244
|
-
var r =
|
|
2245
|
-
var g =
|
|
2246
|
-
var b =
|
|
2247
|
-
var tmp$ret$0;
|
|
1982
|
+
var tmp0_anonymous = this.d1m(SRGB_getInstance());
|
|
1983
|
+
var r = tmp0_anonymous.a1h_1;
|
|
1984
|
+
var g = tmp0_anonymous.b1h_1;
|
|
1985
|
+
var b = tmp0_anonymous.c1h_1;
|
|
2248
1986
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2249
|
-
|
|
2250
|
-
var min = tmp$ret$0;
|
|
2251
|
-
var tmp$ret$1;
|
|
1987
|
+
var min = Math.min(r, g, b);
|
|
2252
1988
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2253
|
-
|
|
2254
|
-
var max = tmp$ret$1;
|
|
1989
|
+
var max = Math.max(r, g, b);
|
|
2255
1990
|
var chroma = max - min;
|
|
2256
1991
|
var tmp;
|
|
2257
1992
|
if (chroma < 1.0E-7) {
|
|
@@ -2267,53 +2002,41 @@
|
|
|
2267
2002
|
tmp = 0.0;
|
|
2268
2003
|
}
|
|
2269
2004
|
var h = tmp * 60;
|
|
2270
|
-
var tmp$ret$2;
|
|
2271
2005
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSL.<anonymous>' call
|
|
2272
|
-
var
|
|
2006
|
+
var tmp0_anonymous_0 = normalizeDeg(h);
|
|
2273
2007
|
var l = (min + max) / 2.0;
|
|
2274
2008
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2275
|
-
tmp$ret$
|
|
2276
|
-
tmp$ret$3 = tmp$ret$2;
|
|
2009
|
+
tmp$ret$3 = new HSL(tmp0_anonymous_0, s, l, this.d1h_1);
|
|
2277
2010
|
break $l$block;
|
|
2278
|
-
tmp$ret$3 = tmp$ret$4;
|
|
2279
2011
|
}
|
|
2280
2012
|
return tmp$ret$3;
|
|
2281
2013
|
};
|
|
2282
|
-
protoOf(RGB).
|
|
2283
|
-
var f = this.
|
|
2284
|
-
var tmp$ret$1;
|
|
2014
|
+
protoOf(RGB).f1h = function () {
|
|
2015
|
+
var f = this.e1h_1.e1l();
|
|
2285
2016
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2286
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.
|
|
2287
|
-
var tmp1_dot = f.
|
|
2288
|
-
var tmp2_dot = f.
|
|
2289
|
-
var tmp3_dot = f.
|
|
2290
|
-
var tmp$ret$0;
|
|
2017
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.e1h_1.b1m());
|
|
2018
|
+
var tmp1_dot = f.n1l(this.a1h_1);
|
|
2019
|
+
var tmp2_dot = f.n1l(this.b1h_1);
|
|
2020
|
+
var tmp3_dot = f.n1l(this.c1h_1);
|
|
2291
2021
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
2292
|
-
var
|
|
2293
|
-
var
|
|
2294
|
-
var
|
|
2295
|
-
|
|
2296
|
-
tmp$ret$1 = tmp$ret$0;
|
|
2297
|
-
return tmp$ret$1;
|
|
2022
|
+
var tmp4_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
2023
|
+
var tmp5_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
2024
|
+
var tmp6_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
2025
|
+
return XYZColorSpace_0(this.e1h_1.u1h()).r1i(tmp4_anonymous, tmp5_anonymous, tmp6_anonymous, this.d1h_1);
|
|
2298
2026
|
};
|
|
2299
|
-
protoOf(RGB).
|
|
2027
|
+
protoOf(RGB).s1h = function () {
|
|
2300
2028
|
var tmp$ret$3;
|
|
2301
2029
|
$l$block: {
|
|
2302
2030
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2303
|
-
var tmp$ret$4;
|
|
2304
2031
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2305
|
-
var
|
|
2306
|
-
var r =
|
|
2307
|
-
var g =
|
|
2308
|
-
var b =
|
|
2309
|
-
var tmp$ret$0;
|
|
2032
|
+
var tmp0_anonymous = this.d1m(SRGB_getInstance());
|
|
2033
|
+
var r = tmp0_anonymous.a1h_1;
|
|
2034
|
+
var g = tmp0_anonymous.b1h_1;
|
|
2035
|
+
var b = tmp0_anonymous.c1h_1;
|
|
2310
2036
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2311
|
-
|
|
2312
|
-
var min = tmp$ret$0;
|
|
2313
|
-
var tmp$ret$1;
|
|
2037
|
+
var min = Math.min(r, g, b);
|
|
2314
2038
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2315
|
-
|
|
2316
|
-
var max = tmp$ret$1;
|
|
2039
|
+
var max = Math.max(r, g, b);
|
|
2317
2040
|
var chroma = max - min;
|
|
2318
2041
|
var tmp;
|
|
2319
2042
|
if (chroma < 1.0E-7) {
|
|
@@ -2329,35 +2052,29 @@
|
|
|
2329
2052
|
tmp = 0.0;
|
|
2330
2053
|
}
|
|
2331
2054
|
var h = tmp * 60;
|
|
2332
|
-
var tmp$ret$2;
|
|
2333
2055
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHWB.<anonymous>' call
|
|
2334
|
-
var
|
|
2335
|
-
tmp$ret$
|
|
2336
|
-
tmp$ret$3 = tmp$ret$2;
|
|
2056
|
+
var tmp0_anonymous_0 = normalizeDeg(h);
|
|
2057
|
+
tmp$ret$3 = new HWB(tmp0_anonymous_0, min, 1.0 - max, this.d1h_1);
|
|
2337
2058
|
break $l$block;
|
|
2338
|
-
tmp$ret$3 = tmp$ret$4;
|
|
2339
2059
|
}
|
|
2340
2060
|
return tmp$ret$3;
|
|
2341
2061
|
};
|
|
2342
|
-
protoOf(RGB).
|
|
2343
|
-
return this.
|
|
2062
|
+
protoOf(RGB).y1g = function () {
|
|
2063
|
+
return this.d1m(RGBColorSpaces_getInstance().u1i_1);
|
|
2344
2064
|
};
|
|
2345
|
-
protoOf(RGB).
|
|
2346
|
-
var tmp$ret$0;
|
|
2065
|
+
protoOf(RGB).a3 = function () {
|
|
2347
2066
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2348
|
-
|
|
2349
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
2350
|
-
return tmp$ret$0;
|
|
2067
|
+
return new Float32Array([this.a1h_1, this.b1h_1, this.c1h_1, this.d1h_1]);
|
|
2351
2068
|
};
|
|
2352
2069
|
protoOf(RGB).toString = function () {
|
|
2353
|
-
return 'RGB(r=' + this.
|
|
2070
|
+
return 'RGB(r=' + this.a1h_1 + ', g=' + this.b1h_1 + ', b=' + this.c1h_1 + ', alpha=' + this.d1h_1 + ', space=' + this.e1h_1 + ')';
|
|
2354
2071
|
};
|
|
2355
2072
|
protoOf(RGB).hashCode = function () {
|
|
2356
|
-
var result = getNumberHashCode(this.
|
|
2357
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2358
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2359
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2360
|
-
result = imul(result, 31) + hashCode(this.
|
|
2073
|
+
var result = getNumberHashCode(this.a1h_1);
|
|
2074
|
+
result = imul(result, 31) + getNumberHashCode(this.b1h_1) | 0;
|
|
2075
|
+
result = imul(result, 31) + getNumberHashCode(this.c1h_1) | 0;
|
|
2076
|
+
result = imul(result, 31) + getNumberHashCode(this.d1h_1) | 0;
|
|
2077
|
+
result = imul(result, 31) + hashCode(this.e1h_1) | 0;
|
|
2361
2078
|
return result;
|
|
2362
2079
|
};
|
|
2363
2080
|
protoOf(RGB).equals = function (other) {
|
|
@@ -2366,44 +2083,40 @@
|
|
|
2366
2083
|
if (!(other instanceof RGB))
|
|
2367
2084
|
return false;
|
|
2368
2085
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
2369
|
-
if (!equals(this.
|
|
2086
|
+
if (!equals(this.a1h_1, tmp0_other_with_cast.a1h_1))
|
|
2370
2087
|
return false;
|
|
2371
|
-
if (!equals(this.
|
|
2088
|
+
if (!equals(this.b1h_1, tmp0_other_with_cast.b1h_1))
|
|
2372
2089
|
return false;
|
|
2373
|
-
if (!equals(this.
|
|
2090
|
+
if (!equals(this.c1h_1, tmp0_other_with_cast.c1h_1))
|
|
2374
2091
|
return false;
|
|
2375
|
-
if (!equals(this.
|
|
2092
|
+
if (!equals(this.d1h_1, tmp0_other_with_cast.d1h_1))
|
|
2376
2093
|
return false;
|
|
2377
|
-
if (!equals(this.
|
|
2094
|
+
if (!equals(this.e1h_1, tmp0_other_with_cast.e1h_1))
|
|
2378
2095
|
return false;
|
|
2379
2096
|
return true;
|
|
2380
2097
|
};
|
|
2381
2098
|
function parseHex(_this__u8e3s4, startIndex) {
|
|
2382
2099
|
var tmp;
|
|
2383
2100
|
if (get_hexLength(_this__u8e3s4) > 4) {
|
|
2384
|
-
var i =
|
|
2101
|
+
var i = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
|
|
2385
2102
|
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
2386
2103
|
} else {
|
|
2387
|
-
var i_0 =
|
|
2104
|
+
var i_0 = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
|
|
2388
2105
|
var tmp$ret$1;
|
|
2389
2106
|
// Inline function 'kotlin.let' call
|
|
2390
2107
|
var tmp0_let = charSequenceGet(_this__u8e3s4, i_0);
|
|
2391
2108
|
// Inline function 'kotlin.contracts.contract' call
|
|
2392
|
-
var tmp$ret$0;
|
|
2393
2109
|
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
2394
|
-
tmp$ret$
|
|
2395
|
-
tmp$ret$1 = tmp$ret$0;
|
|
2110
|
+
tmp$ret$1 = '' + new Char(tmp0_let) + new Char(tmp0_let);
|
|
2396
2111
|
tmp = toInt(tmp$ret$1, 16);
|
|
2397
2112
|
}
|
|
2398
2113
|
return tmp;
|
|
2399
2114
|
}
|
|
2400
2115
|
function validateHex(_this__u8e3s4) {
|
|
2401
|
-
var tmp$ret$3;
|
|
2402
2116
|
// Inline function 'kotlin.apply' call
|
|
2403
2117
|
// Inline function 'kotlin.contracts.contract' call
|
|
2404
2118
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
|
|
2405
2119
|
// Inline function 'kotlin.require' call
|
|
2406
|
-
var tmp$ret$1;
|
|
2407
2120
|
// Inline function 'kotlin.let' call
|
|
2408
2121
|
var tmp0_let = get_hexLength(_this__u8e3s4);
|
|
2409
2122
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -2419,18 +2132,13 @@
|
|
|
2419
2132
|
tmp$ret$0 = tmp0_let === 8;
|
|
2420
2133
|
break;
|
|
2421
2134
|
}
|
|
2422
|
-
tmp$ret$1 = tmp$ret$0;
|
|
2423
|
-
var tmp1_require = tmp$ret$1;
|
|
2424
2135
|
// Inline function 'kotlin.contracts.contract' call
|
|
2425
|
-
if (!
|
|
2426
|
-
var tmp$ret$2;
|
|
2136
|
+
if (!tmp$ret$0) {
|
|
2427
2137
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
2428
|
-
|
|
2429
|
-
var message = tmp$ret$2;
|
|
2138
|
+
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
2430
2139
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2431
2140
|
}
|
|
2432
|
-
|
|
2433
|
-
return tmp$ret$3;
|
|
2141
|
+
return _this__u8e3s4;
|
|
2434
2142
|
}
|
|
2435
2143
|
function get_hexLength(_this__u8e3s4) {
|
|
2436
2144
|
return startsWith(_this__u8e3s4, '#') ? _this__u8e3s4.length - 1 | 0 : _this__u8e3s4.length;
|
|
@@ -2487,18 +2195,18 @@
|
|
|
2487
2195
|
var ACES_AP1_B;
|
|
2488
2196
|
function RGBColorSpaces() {
|
|
2489
2197
|
RGBColorSpaces_instance = this;
|
|
2490
|
-
this.
|
|
2491
|
-
this.
|
|
2492
|
-
this.
|
|
2493
|
-
this.
|
|
2494
|
-
this.
|
|
2495
|
-
this.
|
|
2496
|
-
this.
|
|
2497
|
-
this.
|
|
2498
|
-
this.
|
|
2499
|
-
this.
|
|
2500
|
-
this.
|
|
2501
|
-
this.
|
|
2198
|
+
this.u1i_1 = SRGB_getInstance();
|
|
2199
|
+
this.v1i_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().j1k_1, LinearTransferFunctions_getInstance(), get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2200
|
+
this.w1i_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2201
|
+
this.x1i_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2202
|
+
this.y1i_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2203
|
+
this.z1i_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2204
|
+
this.a1j_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().j1k_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));
|
|
2205
|
+
this.b1j_1 = BT2020Space_getInstance();
|
|
2206
|
+
this.c1j_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().j1k_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2207
|
+
this.d1j_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));
|
|
2208
|
+
this.e1j_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().j1k_1, SRGBTransferFunctions_getInstance(), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2209
|
+
this.f1j_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().h1k_1, ROMMTransferFunctions_getInstance(), xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
2502
2210
|
}
|
|
2503
2211
|
var RGBColorSpaces_instance;
|
|
2504
2212
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2508,53 +2216,47 @@
|
|
|
2508
2216
|
}
|
|
2509
2217
|
function SRGB() {
|
|
2510
2218
|
SRGB_instance = this;
|
|
2511
|
-
this.
|
|
2512
|
-
this.
|
|
2513
|
-
this.
|
|
2514
|
-
this.
|
|
2515
|
-
this.
|
|
2516
|
-
this.
|
|
2219
|
+
this.q1k_1 = 'sRGB';
|
|
2220
|
+
this.r1k_1 = rectangularComponentInfo('RGB');
|
|
2221
|
+
this.s1k_1 = Illuminant_getInstance().j1k_1;
|
|
2222
|
+
this.t1k_1 = SRGBTransferFunctions_getInstance();
|
|
2223
|
+
this.u1k_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.s1k_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
2224
|
+
this.v1k_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.u1k_1)));
|
|
2517
2225
|
}
|
|
2518
|
-
protoOf(SRGB).
|
|
2519
|
-
return this.
|
|
2226
|
+
protoOf(SRGB).ee = function () {
|
|
2227
|
+
return this.q1k_1;
|
|
2520
2228
|
};
|
|
2521
|
-
protoOf(SRGB).
|
|
2522
|
-
return this.
|
|
2229
|
+
protoOf(SRGB).p1k = function () {
|
|
2230
|
+
return this.r1k_1;
|
|
2523
2231
|
};
|
|
2524
|
-
protoOf(SRGB).
|
|
2525
|
-
return this.
|
|
2232
|
+
protoOf(SRGB).u1h = function () {
|
|
2233
|
+
return this.s1k_1;
|
|
2526
2234
|
};
|
|
2527
|
-
protoOf(SRGB).
|
|
2528
|
-
return this.
|
|
2235
|
+
protoOf(SRGB).e1l = function () {
|
|
2236
|
+
return this.t1k_1;
|
|
2529
2237
|
};
|
|
2530
|
-
protoOf(SRGB).
|
|
2531
|
-
return this.
|
|
2238
|
+
protoOf(SRGB).b1m = function () {
|
|
2239
|
+
return this.u1k_1;
|
|
2532
2240
|
};
|
|
2533
|
-
protoOf(SRGB).
|
|
2534
|
-
return this.
|
|
2241
|
+
protoOf(SRGB).c1m = function () {
|
|
2242
|
+
return this.v1k_1;
|
|
2535
2243
|
};
|
|
2536
|
-
protoOf(SRGB).
|
|
2537
|
-
return color.
|
|
2244
|
+
protoOf(SRGB).t1h = function (color) {
|
|
2245
|
+
return color.y1g();
|
|
2538
2246
|
};
|
|
2539
|
-
protoOf(SRGB).
|
|
2540
|
-
var tmp$ret$5;
|
|
2247
|
+
protoOf(SRGB).v1h = function (components) {
|
|
2541
2248
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2542
|
-
var tmp$ret$4;
|
|
2543
2249
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2544
|
-
var size = this.
|
|
2250
|
+
var size = this.p1k().i();
|
|
2545
2251
|
// Inline function 'kotlin.require' call
|
|
2546
2252
|
var containsLower = size - 1 | 0;
|
|
2547
2253
|
var containsArg = components.length;
|
|
2548
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2549
2254
|
// Inline function 'kotlin.contracts.contract' call
|
|
2550
|
-
if (!
|
|
2551
|
-
var tmp$ret$0;
|
|
2255
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2552
2256
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2553
|
-
|
|
2554
|
-
var message = tmp$ret$0;
|
|
2257
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2555
2258
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2556
2259
|
}
|
|
2557
|
-
var tmp$ret$3;
|
|
2558
2260
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2559
2261
|
var tmp = components[0];
|
|
2560
2262
|
var tmp_0 = components[1];
|
|
@@ -2565,21 +2267,16 @@
|
|
|
2565
2267
|
if (3 <= get_lastIndex_0(components)) {
|
|
2566
2268
|
tmp_2 = components[3];
|
|
2567
2269
|
} else {
|
|
2568
|
-
var tmp$ret$1;
|
|
2569
2270
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2570
|
-
|
|
2571
|
-
tmp_2 = tmp$ret$1;
|
|
2271
|
+
tmp_2 = 1.0;
|
|
2572
2272
|
}
|
|
2573
2273
|
tmp$ret$2 = tmp_2;
|
|
2574
|
-
|
|
2575
|
-
tmp$ret$4 = tmp$ret$3;
|
|
2576
|
-
tmp$ret$5 = tmp$ret$4;
|
|
2577
|
-
return tmp$ret$5;
|
|
2274
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2578
2275
|
};
|
|
2579
2276
|
protoOf(SRGB).toString = function () {
|
|
2580
|
-
return this.
|
|
2277
|
+
return this.q1k_1;
|
|
2581
2278
|
};
|
|
2582
|
-
protoOf(SRGB).
|
|
2279
|
+
protoOf(SRGB).r1i = function (r, g, b, alpha) {
|
|
2583
2280
|
return new RGB(r, g, b, alpha, this);
|
|
2584
2281
|
};
|
|
2585
2282
|
var SRGB_instance;
|
|
@@ -2594,43 +2291,35 @@
|
|
|
2594
2291
|
}
|
|
2595
2292
|
function ACESccTransferFunctions() {
|
|
2596
2293
|
ACESccTransferFunctions_instance = this;
|
|
2597
|
-
this.
|
|
2598
|
-
this.
|
|
2599
|
-
this.
|
|
2294
|
+
this.f1m_1 = 3.0517578125E-5;
|
|
2295
|
+
this.g1m_1 = 1.52587890625E-5;
|
|
2296
|
+
this.h1m_1 = -0.3013698630136986;
|
|
2600
2297
|
var tmp = this;
|
|
2601
|
-
var tmp$ret$0;
|
|
2602
2298
|
// Inline function 'kotlin.math.log2' call
|
|
2603
|
-
tmp
|
|
2604
|
-
tmp.q2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
2299
|
+
tmp.i1m_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2605
2300
|
}
|
|
2606
|
-
protoOf(ACESccTransferFunctions).
|
|
2301
|
+
protoOf(ACESccTransferFunctions).n1l = function (x) {
|
|
2607
2302
|
var tmp;
|
|
2608
2303
|
if (x <= -0.3013698630136986) {
|
|
2609
2304
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
2610
|
-
} else if (x < this.
|
|
2611
|
-
var tmp$ret$0;
|
|
2305
|
+
} else if (x < this.i1m_1) {
|
|
2612
2306
|
// Inline function 'kotlin.math.pow' call
|
|
2613
2307
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
2614
|
-
tmp
|
|
2615
|
-
tmp = tmp$ret$0;
|
|
2308
|
+
tmp = Math.pow(2.0, tmp0_pow);
|
|
2616
2309
|
} else {
|
|
2617
2310
|
tmp = 65504.0;
|
|
2618
2311
|
}
|
|
2619
2312
|
return tmp;
|
|
2620
2313
|
};
|
|
2621
|
-
protoOf(ACESccTransferFunctions).
|
|
2314
|
+
protoOf(ACESccTransferFunctions).o1l = function (x) {
|
|
2622
2315
|
var tmp;
|
|
2623
2316
|
if (x < 3.0517578125E-5) {
|
|
2624
|
-
var tmp$ret$0;
|
|
2625
2317
|
// Inline function 'kotlin.math.log2' call
|
|
2626
2318
|
var tmp0_log2 = 1.52587890625E-5 + coerceAtLeast(x, 0.0) / 2.0;
|
|
2627
|
-
tmp
|
|
2628
|
-
tmp = (tmp$ret$0 + 9.72) / 17.52;
|
|
2319
|
+
tmp = (log2(tmp0_log2) + 9.72) / 17.52;
|
|
2629
2320
|
} else {
|
|
2630
|
-
var tmp$ret$1;
|
|
2631
2321
|
// Inline function 'kotlin.math.log2' call
|
|
2632
|
-
tmp
|
|
2633
|
-
tmp = (tmp$ret$1 + 9.72) / 17.52;
|
|
2322
|
+
tmp = (log2(x) + 9.72) / 17.52;
|
|
2634
2323
|
}
|
|
2635
2324
|
return tmp;
|
|
2636
2325
|
};
|
|
@@ -2642,38 +2331,32 @@
|
|
|
2642
2331
|
}
|
|
2643
2332
|
function ACEScctTransferFunctions() {
|
|
2644
2333
|
ACEScctTransferFunctions_instance = this;
|
|
2645
|
-
this.
|
|
2646
|
-
this.
|
|
2334
|
+
this.j1m_1 = 10.5402377416545;
|
|
2335
|
+
this.k1m_1 = 0.0729055341958355;
|
|
2647
2336
|
var tmp = this;
|
|
2648
|
-
var tmp$ret$0;
|
|
2649
2337
|
// Inline function 'kotlin.math.log2' call
|
|
2650
|
-
tmp
|
|
2651
|
-
tmp.t2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
2338
|
+
tmp.l1m_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2652
2339
|
}
|
|
2653
|
-
protoOf(ACEScctTransferFunctions).
|
|
2340
|
+
protoOf(ACEScctTransferFunctions).n1l = function (x) {
|
|
2654
2341
|
var tmp;
|
|
2655
2342
|
if (x <= 0.155251141552511) {
|
|
2656
2343
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
2657
|
-
} else if (x < this.
|
|
2658
|
-
var tmp$ret$0;
|
|
2344
|
+
} else if (x < this.l1m_1) {
|
|
2659
2345
|
// Inline function 'kotlin.math.pow' call
|
|
2660
2346
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
2661
|
-
tmp
|
|
2662
|
-
tmp = tmp$ret$0;
|
|
2347
|
+
tmp = Math.pow(2.0, tmp0_pow);
|
|
2663
2348
|
} else {
|
|
2664
2349
|
tmp = 65504.0;
|
|
2665
2350
|
}
|
|
2666
2351
|
return tmp;
|
|
2667
2352
|
};
|
|
2668
|
-
protoOf(ACEScctTransferFunctions).
|
|
2353
|
+
protoOf(ACEScctTransferFunctions).o1l = function (x) {
|
|
2669
2354
|
var tmp;
|
|
2670
2355
|
if (x < 0.0078125) {
|
|
2671
2356
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
2672
2357
|
} else {
|
|
2673
|
-
var tmp$ret$0;
|
|
2674
2358
|
// Inline function 'kotlin.math.log2' call
|
|
2675
|
-
tmp
|
|
2676
|
-
tmp = (tmp$ret$0 + 9.72) / 17.52;
|
|
2359
|
+
tmp = (log2(x) + 9.72) / 17.52;
|
|
2677
2360
|
}
|
|
2678
2361
|
return tmp;
|
|
2679
2362
|
};
|
|
@@ -2685,61 +2368,54 @@
|
|
|
2685
2368
|
}
|
|
2686
2369
|
function BT2020Space() {
|
|
2687
2370
|
BT2020Space_instance = this;
|
|
2688
|
-
this.
|
|
2689
|
-
this.
|
|
2690
|
-
this.
|
|
2691
|
-
this.
|
|
2692
|
-
this.
|
|
2693
|
-
this.
|
|
2371
|
+
this.m1m_1 = 'BT.2020';
|
|
2372
|
+
this.n1m_1 = rectangularComponentInfo('RGB');
|
|
2373
|
+
this.o1m_1 = Illuminant_getInstance().j1k_1;
|
|
2374
|
+
this.p1m_1 = BT2020TransferFunctions_getInstance();
|
|
2375
|
+
this.q1m_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.o1m_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
2376
|
+
this.r1m_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.q1m_1)));
|
|
2694
2377
|
}
|
|
2695
|
-
protoOf(BT2020Space).
|
|
2696
|
-
return this.
|
|
2378
|
+
protoOf(BT2020Space).ee = function () {
|
|
2379
|
+
return this.m1m_1;
|
|
2697
2380
|
};
|
|
2698
|
-
protoOf(BT2020Space).
|
|
2699
|
-
return this.
|
|
2381
|
+
protoOf(BT2020Space).p1k = function () {
|
|
2382
|
+
return this.n1m_1;
|
|
2700
2383
|
};
|
|
2701
|
-
protoOf(BT2020Space).
|
|
2702
|
-
return this.
|
|
2384
|
+
protoOf(BT2020Space).u1h = function () {
|
|
2385
|
+
return this.o1m_1;
|
|
2703
2386
|
};
|
|
2704
|
-
protoOf(BT2020Space).
|
|
2705
|
-
return this.
|
|
2387
|
+
protoOf(BT2020Space).e1l = function () {
|
|
2388
|
+
return this.p1m_1;
|
|
2706
2389
|
};
|
|
2707
|
-
protoOf(BT2020Space).
|
|
2390
|
+
protoOf(BT2020Space).r1i = function (r, g, b, alpha) {
|
|
2708
2391
|
return new RGB(r, g, b, alpha, this);
|
|
2709
2392
|
};
|
|
2710
|
-
protoOf(BT2020Space).
|
|
2711
|
-
var tmp0_subject = color;
|
|
2393
|
+
protoOf(BT2020Space).t1h = function (color) {
|
|
2712
2394
|
var tmp;
|
|
2713
|
-
if (
|
|
2714
|
-
tmp = color.
|
|
2395
|
+
if (color instanceof RGB) {
|
|
2396
|
+
tmp = color.d1m(this);
|
|
2715
2397
|
} else {
|
|
2716
|
-
if (
|
|
2717
|
-
tmp = color.
|
|
2398
|
+
if (color instanceof ICtCp) {
|
|
2399
|
+
tmp = color.d1l();
|
|
2718
2400
|
} else {
|
|
2719
|
-
tmp = color.
|
|
2401
|
+
tmp = color.f1h().e1m(this);
|
|
2720
2402
|
}
|
|
2721
2403
|
}
|
|
2722
2404
|
return tmp;
|
|
2723
2405
|
};
|
|
2724
|
-
protoOf(BT2020Space).
|
|
2725
|
-
var tmp$ret$5;
|
|
2406
|
+
protoOf(BT2020Space).v1h = function (components) {
|
|
2726
2407
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2727
|
-
var tmp$ret$4;
|
|
2728
2408
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2729
|
-
var size = this.
|
|
2409
|
+
var size = this.p1k().i();
|
|
2730
2410
|
// Inline function 'kotlin.require' call
|
|
2731
2411
|
var containsLower = size - 1 | 0;
|
|
2732
2412
|
var containsArg = components.length;
|
|
2733
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2734
2413
|
// Inline function 'kotlin.contracts.contract' call
|
|
2735
|
-
if (!
|
|
2736
|
-
var tmp$ret$0;
|
|
2414
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2737
2415
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2738
|
-
|
|
2739
|
-
var message = tmp$ret$0;
|
|
2416
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2740
2417
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2741
2418
|
}
|
|
2742
|
-
var tmp$ret$3;
|
|
2743
2419
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2744
2420
|
var tmp = components[0];
|
|
2745
2421
|
var tmp_0 = components[1];
|
|
@@ -2750,25 +2426,20 @@
|
|
|
2750
2426
|
if (3 <= get_lastIndex_0(components)) {
|
|
2751
2427
|
tmp_2 = components[3];
|
|
2752
2428
|
} else {
|
|
2753
|
-
var tmp$ret$1;
|
|
2754
2429
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2755
|
-
|
|
2756
|
-
tmp_2 = tmp$ret$1;
|
|
2430
|
+
tmp_2 = 1.0;
|
|
2757
2431
|
}
|
|
2758
2432
|
tmp$ret$2 = tmp_2;
|
|
2759
|
-
|
|
2760
|
-
tmp$ret$4 = tmp$ret$3;
|
|
2761
|
-
tmp$ret$5 = tmp$ret$4;
|
|
2762
|
-
return tmp$ret$5;
|
|
2433
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2763
2434
|
};
|
|
2764
|
-
protoOf(BT2020Space).
|
|
2765
|
-
return this.
|
|
2435
|
+
protoOf(BT2020Space).b1m = function () {
|
|
2436
|
+
return this.q1m_1;
|
|
2766
2437
|
};
|
|
2767
|
-
protoOf(BT2020Space).
|
|
2768
|
-
return this.
|
|
2438
|
+
protoOf(BT2020Space).c1m = function () {
|
|
2439
|
+
return this.r1m_1;
|
|
2769
2440
|
};
|
|
2770
2441
|
protoOf(BT2020Space).toString = function () {
|
|
2771
|
-
return this.
|
|
2442
|
+
return this.m1m_1;
|
|
2772
2443
|
};
|
|
2773
2444
|
var BT2020Space_instance;
|
|
2774
2445
|
function BT2020Space_getInstance() {
|
|
@@ -2778,12 +2449,12 @@
|
|
|
2778
2449
|
}
|
|
2779
2450
|
function BT709TransferFunctions() {
|
|
2780
2451
|
BT709TransferFunctions_instance = this;
|
|
2781
|
-
this.
|
|
2452
|
+
this.s1m_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2782
2453
|
}
|
|
2783
|
-
protoOf(BT709TransferFunctions).
|
|
2784
|
-
return numberToDouble(x < this.
|
|
2454
|
+
protoOf(BT709TransferFunctions).n1l = function (x) {
|
|
2455
|
+
return numberToDouble(x < this.s1m_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
2785
2456
|
};
|
|
2786
|
-
protoOf(BT709TransferFunctions).
|
|
2457
|
+
protoOf(BT709TransferFunctions).o1l = function (x) {
|
|
2787
2458
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2788
2459
|
};
|
|
2789
2460
|
var BT709TransferFunctions_instance;
|
|
@@ -2795,10 +2466,10 @@
|
|
|
2795
2466
|
function SRGBTransferFunctions() {
|
|
2796
2467
|
SRGBTransferFunctions_instance = this;
|
|
2797
2468
|
}
|
|
2798
|
-
protoOf(SRGBTransferFunctions).
|
|
2469
|
+
protoOf(SRGBTransferFunctions).o1l = function (x) {
|
|
2799
2470
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
2800
2471
|
};
|
|
2801
|
-
protoOf(SRGBTransferFunctions).
|
|
2472
|
+
protoOf(SRGBTransferFunctions).n1l = function (x) {
|
|
2802
2473
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2803
2474
|
};
|
|
2804
2475
|
var SRGBTransferFunctions_instance;
|
|
@@ -2809,12 +2480,12 @@
|
|
|
2809
2480
|
}
|
|
2810
2481
|
function ROMMTransferFunctions() {
|
|
2811
2482
|
ROMMTransferFunctions_instance = this;
|
|
2812
|
-
this.
|
|
2483
|
+
this.t1m_1 = 0.001953;
|
|
2813
2484
|
}
|
|
2814
|
-
protoOf(ROMMTransferFunctions).
|
|
2485
|
+
protoOf(ROMMTransferFunctions).n1l = function (x) {
|
|
2815
2486
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
2816
2487
|
};
|
|
2817
|
-
protoOf(ROMMTransferFunctions).
|
|
2488
|
+
protoOf(ROMMTransferFunctions).o1l = function (x) {
|
|
2818
2489
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
2819
2490
|
};
|
|
2820
2491
|
var ROMMTransferFunctions_instance;
|
|
@@ -2825,74 +2496,64 @@
|
|
|
2825
2496
|
}
|
|
2826
2497
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2827
2498
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2828
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2829
|
-
var wp = whitePoint.
|
|
2830
|
-
var tmp$ret$1;
|
|
2499
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.r1l_1, g.r1l_1, b.r1l_1, r.s1l_1, g.s1l_1, b.s1l_1, r.u1m(), g.u1m(), b.u1m());
|
|
2500
|
+
var wp = whitePoint.d1k_1;
|
|
2831
2501
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2832
2502
|
var tmp0_dot = inverse(primaries);
|
|
2833
|
-
var tmp1_dot = wp.
|
|
2834
|
-
var tmp2_dot = wp.
|
|
2835
|
-
var tmp3_dot = wp.
|
|
2836
|
-
var tmp$ret$0;
|
|
2503
|
+
var tmp1_dot = wp.u1l();
|
|
2504
|
+
var tmp2_dot = wp.t1l_1;
|
|
2505
|
+
var tmp3_dot = wp.v1l();
|
|
2837
2506
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
2838
|
-
var
|
|
2839
|
-
var
|
|
2840
|
-
var
|
|
2841
|
-
|
|
2842
|
-
tmp$ret$1 = tmp$ret$0;
|
|
2843
|
-
return tmp$ret$1;
|
|
2507
|
+
var tmp4_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
2508
|
+
var tmp5_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
2509
|
+
var tmp6_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
2510
|
+
return dotDiagonal(primaries, tmp4_anonymous, tmp5_anonymous, tmp6_anonymous);
|
|
2844
2511
|
}
|
|
2845
2512
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
2846
|
-
this.
|
|
2847
|
-
this.
|
|
2848
|
-
this.
|
|
2849
|
-
this.
|
|
2850
|
-
this.
|
|
2851
|
-
this.
|
|
2852
|
-
this.
|
|
2853
|
-
this.
|
|
2854
|
-
this.
|
|
2513
|
+
this.v1m_1 = name;
|
|
2514
|
+
this.w1m_1 = whitePoint;
|
|
2515
|
+
this.x1m_1 = transferFunctions;
|
|
2516
|
+
this.y1m_1 = r;
|
|
2517
|
+
this.z1m_1 = g;
|
|
2518
|
+
this.a1n_1 = b;
|
|
2519
|
+
this.b1n_1 = rectangularComponentInfo('RGB');
|
|
2520
|
+
this.c1n_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.w1m_1, this.y1m_1, this.z1m_1, this.a1n_1));
|
|
2521
|
+
this.d1n_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.c1n_1)));
|
|
2855
2522
|
}
|
|
2856
|
-
protoOf(RGBColorSpaceImpl).
|
|
2857
|
-
return this.
|
|
2523
|
+
protoOf(RGBColorSpaceImpl).ee = function () {
|
|
2524
|
+
return this.v1m_1;
|
|
2858
2525
|
};
|
|
2859
|
-
protoOf(RGBColorSpaceImpl).
|
|
2860
|
-
return this.
|
|
2526
|
+
protoOf(RGBColorSpaceImpl).u1h = function () {
|
|
2527
|
+
return this.w1m_1;
|
|
2861
2528
|
};
|
|
2862
|
-
protoOf(RGBColorSpaceImpl).
|
|
2863
|
-
return this.
|
|
2529
|
+
protoOf(RGBColorSpaceImpl).e1l = function () {
|
|
2530
|
+
return this.x1m_1;
|
|
2864
2531
|
};
|
|
2865
|
-
protoOf(RGBColorSpaceImpl).
|
|
2866
|
-
return this.
|
|
2532
|
+
protoOf(RGBColorSpaceImpl).p1k = function () {
|
|
2533
|
+
return this.b1n_1;
|
|
2867
2534
|
};
|
|
2868
|
-
protoOf(RGBColorSpaceImpl).
|
|
2535
|
+
protoOf(RGBColorSpaceImpl).t1h = function (color) {
|
|
2869
2536
|
var tmp;
|
|
2870
2537
|
if (color instanceof RGB) {
|
|
2871
|
-
tmp = color.
|
|
2538
|
+
tmp = color.d1m(this);
|
|
2872
2539
|
} else {
|
|
2873
|
-
tmp = color.
|
|
2540
|
+
tmp = color.f1h().e1m(this);
|
|
2874
2541
|
}
|
|
2875
2542
|
return tmp;
|
|
2876
2543
|
};
|
|
2877
|
-
protoOf(RGBColorSpaceImpl).
|
|
2878
|
-
var tmp$ret$5;
|
|
2544
|
+
protoOf(RGBColorSpaceImpl).v1h = function (components) {
|
|
2879
2545
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2880
|
-
var tmp$ret$4;
|
|
2881
2546
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2882
|
-
var size = this.
|
|
2547
|
+
var size = this.p1k().i();
|
|
2883
2548
|
// Inline function 'kotlin.require' call
|
|
2884
2549
|
var containsLower = size - 1 | 0;
|
|
2885
2550
|
var containsArg = components.length;
|
|
2886
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
2887
2551
|
// Inline function 'kotlin.contracts.contract' call
|
|
2888
|
-
if (!
|
|
2889
|
-
var tmp$ret$0;
|
|
2552
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
2890
2553
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
2891
|
-
|
|
2892
|
-
var message = tmp$ret$0;
|
|
2554
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
2893
2555
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2894
2556
|
}
|
|
2895
|
-
var tmp$ret$3;
|
|
2896
2557
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2897
2558
|
var tmp = components[0];
|
|
2898
2559
|
var tmp_0 = components[1];
|
|
@@ -2903,36 +2564,31 @@
|
|
|
2903
2564
|
if (3 <= get_lastIndex_0(components)) {
|
|
2904
2565
|
tmp_2 = components[3];
|
|
2905
2566
|
} else {
|
|
2906
|
-
var tmp$ret$1;
|
|
2907
2567
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2908
|
-
|
|
2909
|
-
tmp_2 = tmp$ret$1;
|
|
2568
|
+
tmp_2 = 1.0;
|
|
2910
2569
|
}
|
|
2911
2570
|
tmp$ret$2 = tmp_2;
|
|
2912
|
-
|
|
2913
|
-
tmp$ret$4 = tmp$ret$3;
|
|
2914
|
-
tmp$ret$5 = tmp$ret$4;
|
|
2915
|
-
return tmp$ret$5;
|
|
2571
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2916
2572
|
};
|
|
2917
|
-
protoOf(RGBColorSpaceImpl).
|
|
2918
|
-
return this.
|
|
2573
|
+
protoOf(RGBColorSpaceImpl).b1m = function () {
|
|
2574
|
+
return this.c1n_1;
|
|
2919
2575
|
};
|
|
2920
|
-
protoOf(RGBColorSpaceImpl).
|
|
2921
|
-
return this.
|
|
2576
|
+
protoOf(RGBColorSpaceImpl).c1m = function () {
|
|
2577
|
+
return this.d1n_1;
|
|
2922
2578
|
};
|
|
2923
2579
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2924
|
-
return this.
|
|
2580
|
+
return this.v1m_1;
|
|
2925
2581
|
};
|
|
2926
|
-
protoOf(RGBColorSpaceImpl).
|
|
2582
|
+
protoOf(RGBColorSpaceImpl).r1i = function (r, g, b, alpha) {
|
|
2927
2583
|
return new RGB(r, g, b, alpha, this);
|
|
2928
2584
|
};
|
|
2929
2585
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2930
|
-
var result = getStringHashCode(this.
|
|
2931
|
-
result = imul(result, 31) + this.
|
|
2932
|
-
result = imul(result, 31) + hashCode(this.
|
|
2933
|
-
result = imul(result, 31) + this.
|
|
2934
|
-
result = imul(result, 31) + this.
|
|
2935
|
-
result = imul(result, 31) + this.
|
|
2586
|
+
var result = getStringHashCode(this.v1m_1);
|
|
2587
|
+
result = imul(result, 31) + this.w1m_1.hashCode() | 0;
|
|
2588
|
+
result = imul(result, 31) + hashCode(this.x1m_1) | 0;
|
|
2589
|
+
result = imul(result, 31) + this.y1m_1.hashCode() | 0;
|
|
2590
|
+
result = imul(result, 31) + this.z1m_1.hashCode() | 0;
|
|
2591
|
+
result = imul(result, 31) + this.a1n_1.hashCode() | 0;
|
|
2936
2592
|
return result;
|
|
2937
2593
|
};
|
|
2938
2594
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -2941,35 +2597,32 @@
|
|
|
2941
2597
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
2942
2598
|
return false;
|
|
2943
2599
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
2944
|
-
if (!(this.
|
|
2600
|
+
if (!(this.v1m_1 === tmp0_other_with_cast.v1m_1))
|
|
2945
2601
|
return false;
|
|
2946
|
-
if (!this.
|
|
2602
|
+
if (!this.w1m_1.equals(tmp0_other_with_cast.w1m_1))
|
|
2947
2603
|
return false;
|
|
2948
|
-
if (!equals(this.
|
|
2604
|
+
if (!equals(this.x1m_1, tmp0_other_with_cast.x1m_1))
|
|
2949
2605
|
return false;
|
|
2950
|
-
if (!this.
|
|
2606
|
+
if (!this.y1m_1.equals(tmp0_other_with_cast.y1m_1))
|
|
2951
2607
|
return false;
|
|
2952
|
-
if (!this.
|
|
2608
|
+
if (!this.z1m_1.equals(tmp0_other_with_cast.z1m_1))
|
|
2953
2609
|
return false;
|
|
2954
|
-
if (!this.
|
|
2610
|
+
if (!this.a1n_1.equals(tmp0_other_with_cast.a1n_1))
|
|
2955
2611
|
return false;
|
|
2956
2612
|
return true;
|
|
2957
2613
|
};
|
|
2958
2614
|
function BT2020TransferFunctions() {
|
|
2959
2615
|
BT2020TransferFunctions_instance = this;
|
|
2960
|
-
this.
|
|
2961
|
-
this.
|
|
2616
|
+
this.e1n_1 = 1.0993;
|
|
2617
|
+
this.f1n_1 = 0.0181;
|
|
2962
2618
|
var tmp = this;
|
|
2963
|
-
var tmp$ret$0;
|
|
2964
2619
|
// Inline function 'kotlin.math.pow' call
|
|
2965
|
-
|
|
2966
|
-
tmp$ret$0 = Math.pow(tmp0_pow, 0.45);
|
|
2967
|
-
tmp.o2r_1 = 1.0993 * tmp$ret$0 - 0.09929999999999994;
|
|
2620
|
+
tmp.g1n_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
2968
2621
|
}
|
|
2969
|
-
protoOf(BT2020TransferFunctions).
|
|
2970
|
-
return numberToDouble(x < this.
|
|
2622
|
+
protoOf(BT2020TransferFunctions).n1l = function (x) {
|
|
2623
|
+
return numberToDouble(x < this.g1n_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
2971
2624
|
};
|
|
2972
|
-
protoOf(BT2020TransferFunctions).
|
|
2625
|
+
protoOf(BT2020TransferFunctions).o1l = function (x) {
|
|
2973
2626
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
2974
2627
|
};
|
|
2975
2628
|
var BT2020TransferFunctions_instance;
|
|
@@ -2980,8 +2633,7 @@
|
|
|
2980
2633
|
}
|
|
2981
2634
|
var properties_initialized_RGBColorSpaces_kt_fsnpad;
|
|
2982
2635
|
function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
2983
|
-
if (properties_initialized_RGBColorSpaces_kt_fsnpad) {
|
|
2984
|
-
} else {
|
|
2636
|
+
if (!properties_initialized_RGBColorSpaces_kt_fsnpad) {
|
|
2985
2637
|
properties_initialized_RGBColorSpaces_kt_fsnpad = true;
|
|
2986
2638
|
SRGB_R = xyY_init_$Create$(0.64, 0.33);
|
|
2987
2639
|
SRGB_G = xyY_init_$Create$(0.3, 0.6);
|
|
@@ -3005,45 +2657,26 @@
|
|
|
3005
2657
|
alpha = alpha === VOID ? 255 : alpha;
|
|
3006
2658
|
var tmp$ret$9;
|
|
3007
2659
|
// Inline function 'kotlin.UInt.or' call
|
|
3008
|
-
var tmp$ret$7;
|
|
3009
2660
|
// Inline function 'kotlin.UInt.or' call
|
|
3010
|
-
var tmp$ret$4;
|
|
3011
2661
|
// Inline function 'kotlin.UInt.or' call
|
|
3012
|
-
var tmp$ret$1;
|
|
3013
2662
|
// Inline function 'kotlin.UInt.shl' call
|
|
3014
|
-
var tmp$ret$0;
|
|
3015
2663
|
// Inline function 'kotlin.toUInt' call
|
|
3016
|
-
|
|
3017
|
-
var
|
|
3018
|
-
tmp$ret$1 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_shl) << 24);
|
|
3019
|
-
var tmp2_or = tmp$ret$1;
|
|
3020
|
-
var tmp$ret$3;
|
|
2664
|
+
var tmp0_shl = _UInt___init__impl__l7qpdl(alpha);
|
|
2665
|
+
var tmp2_or = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_shl) << 24);
|
|
3021
2666
|
// Inline function 'kotlin.UInt.shl' call
|
|
3022
|
-
var tmp$ret$2;
|
|
3023
2667
|
// Inline function 'kotlin.toUInt' call
|
|
3024
|
-
|
|
3025
|
-
var
|
|
3026
|
-
|
|
3027
|
-
var tmp3_or = tmp$ret$3;
|
|
3028
|
-
tmp$ret$4 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp2_or) | _UInt___get_data__impl__f0vqqw(tmp3_or));
|
|
3029
|
-
var tmp5_or = tmp$ret$4;
|
|
3030
|
-
var tmp$ret$6;
|
|
2668
|
+
var tmp1_shl = _UInt___init__impl__l7qpdl(r);
|
|
2669
|
+
var tmp3_or = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp1_shl) << 16);
|
|
2670
|
+
var tmp5_or = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp2_or) | _UInt___get_data__impl__f0vqqw(tmp3_or));
|
|
3031
2671
|
// Inline function 'kotlin.UInt.shl' call
|
|
3032
|
-
var tmp$ret$5;
|
|
3033
2672
|
// Inline function 'kotlin.toUInt' call
|
|
3034
|
-
|
|
3035
|
-
var
|
|
3036
|
-
|
|
3037
|
-
var tmp6_or = tmp$ret$6;
|
|
3038
|
-
tmp$ret$7 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp5_or) | _UInt___get_data__impl__f0vqqw(tmp6_or));
|
|
3039
|
-
var tmp7_or = tmp$ret$7;
|
|
3040
|
-
var tmp$ret$8;
|
|
2673
|
+
var tmp4_shl = _UInt___init__impl__l7qpdl(g);
|
|
2674
|
+
var tmp6_or = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp4_shl) << 8);
|
|
2675
|
+
var tmp7_or = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp5_or) | _UInt___get_data__impl__f0vqqw(tmp6_or));
|
|
3041
2676
|
// Inline function 'kotlin.toUInt' call
|
|
3042
|
-
|
|
3043
|
-
var tmp8_or = tmp$ret$8;
|
|
2677
|
+
var tmp8_or = _UInt___init__impl__l7qpdl(b);
|
|
3044
2678
|
tmp$ret$9 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp7_or) | _UInt___get_data__impl__f0vqqw(tmp8_or));
|
|
3045
|
-
|
|
3046
|
-
return tmp;
|
|
2679
|
+
return _RGBInt___init__impl__lqova7(tmp$ret$9);
|
|
3047
2680
|
}
|
|
3048
2681
|
function _RGBInt___init__impl__lqova7_1(r, g, b, alpha) {
|
|
3049
2682
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
@@ -3084,78 +2717,59 @@
|
|
|
3084
2717
|
// Inline function 'kotlin.math.roundToInt' call
|
|
3085
2718
|
var tmp3_roundToInt = alpha * 255;
|
|
3086
2719
|
tmp$ret$3 = roundToInt(tmp3_roundToInt);
|
|
3087
|
-
|
|
3088
|
-
return tmp_5;
|
|
2720
|
+
return _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4, coerceIn_0(tmp$ret$3, 0, 255));
|
|
3089
2721
|
}
|
|
3090
2722
|
function _RGBInt___get_r__impl__dulq0e($this) {
|
|
3091
|
-
var tmp$ret$2;
|
|
3092
2723
|
// Inline function 'kotlin.UInt.toUByte' call
|
|
3093
|
-
var tmp$ret$0;
|
|
3094
2724
|
// Inline function 'kotlin.UInt.shr' call
|
|
3095
2725
|
var tmp0_shr = _RGBInt___get_argb__impl__xiee7i($this);
|
|
3096
|
-
|
|
3097
|
-
var tmp2_toUByte = tmp$ret$0;
|
|
3098
|
-
var tmp$ret$1;
|
|
2726
|
+
var tmp1_toUByte = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_shr) >>> 16 | 0);
|
|
3099
2727
|
// Inline function 'kotlin.toUByte' call
|
|
3100
|
-
var
|
|
3101
|
-
|
|
3102
|
-
tmp$ret$2 = tmp$ret$1;
|
|
3103
|
-
return tmp$ret$2;
|
|
2728
|
+
var tmp0_toUByte = _UInt___get_data__impl__f0vqqw(tmp1_toUByte);
|
|
2729
|
+
return _UByte___init__impl__g9hnc4(toByte(tmp0_toUByte));
|
|
3104
2730
|
}
|
|
3105
2731
|
function _RGBInt___get_g__impl__o93c71($this) {
|
|
3106
|
-
var tmp$ret$2;
|
|
3107
2732
|
// Inline function 'kotlin.UInt.toUByte' call
|
|
3108
|
-
var tmp$ret$0;
|
|
3109
2733
|
// Inline function 'kotlin.UInt.shr' call
|
|
3110
2734
|
var tmp0_shr = _RGBInt___get_argb__impl__xiee7i($this);
|
|
3111
|
-
|
|
3112
|
-
var tmp2_toUByte = tmp$ret$0;
|
|
3113
|
-
var tmp$ret$1;
|
|
2735
|
+
var tmp1_toUByte = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_shr) >>> 8 | 0);
|
|
3114
2736
|
// Inline function 'kotlin.toUByte' call
|
|
3115
|
-
var
|
|
3116
|
-
|
|
3117
|
-
tmp$ret$2 = tmp$ret$1;
|
|
3118
|
-
return tmp$ret$2;
|
|
2737
|
+
var tmp0_toUByte = _UInt___get_data__impl__f0vqqw(tmp1_toUByte);
|
|
2738
|
+
return _UByte___init__impl__g9hnc4(toByte(tmp0_toUByte));
|
|
3119
2739
|
}
|
|
3120
2740
|
function _RGBInt___get_b__impl__m772ua($this) {
|
|
3121
|
-
var tmp$ret$2;
|
|
3122
2741
|
// Inline function 'kotlin.UInt.toUByte' call
|
|
3123
|
-
var tmp$ret$0;
|
|
3124
2742
|
// Inline function 'kotlin.UInt.shr' call
|
|
3125
2743
|
var tmp0_shr = _RGBInt___get_argb__impl__xiee7i($this);
|
|
3126
|
-
|
|
3127
|
-
var tmp2_toUByte = tmp$ret$0;
|
|
3128
|
-
var tmp$ret$1;
|
|
2744
|
+
var tmp1_toUByte = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_shr) >>> 0 | 0);
|
|
3129
2745
|
// Inline function 'kotlin.toUByte' call
|
|
3130
|
-
var
|
|
3131
|
-
|
|
3132
|
-
tmp$ret$2 = tmp$ret$1;
|
|
3133
|
-
return tmp$ret$2;
|
|
2746
|
+
var tmp0_toUByte = _UInt___get_data__impl__f0vqqw(tmp1_toUByte);
|
|
2747
|
+
return _UByte___init__impl__g9hnc4(toByte(tmp0_toUByte));
|
|
3134
2748
|
}
|
|
3135
2749
|
function Companion_5() {
|
|
3136
2750
|
Companion_instance_5 = this;
|
|
3137
|
-
this.
|
|
2751
|
+
this.h1n_1 = XYZColorSpaces_getInstance().g1j_1;
|
|
3138
2752
|
}
|
|
3139
|
-
protoOf(Companion_5).
|
|
3140
|
-
return this.
|
|
2753
|
+
protoOf(Companion_5).p1k = function () {
|
|
2754
|
+
return this.h1n_1.p1k();
|
|
3141
2755
|
};
|
|
3142
|
-
protoOf(Companion_5).
|
|
3143
|
-
return this.
|
|
2756
|
+
protoOf(Companion_5).ee = function () {
|
|
2757
|
+
return this.h1n_1.ee();
|
|
3144
2758
|
};
|
|
3145
|
-
protoOf(Companion_5).
|
|
3146
|
-
return this.
|
|
2759
|
+
protoOf(Companion_5).u1h = function () {
|
|
2760
|
+
return this.h1n_1.u1h();
|
|
3147
2761
|
};
|
|
3148
|
-
protoOf(Companion_5).
|
|
3149
|
-
return this.
|
|
2762
|
+
protoOf(Companion_5).t1h = function (color) {
|
|
2763
|
+
return this.h1n_1.t1h(color);
|
|
3150
2764
|
};
|
|
3151
|
-
protoOf(Companion_5).
|
|
3152
|
-
return this.
|
|
2765
|
+
protoOf(Companion_5).v1h = function (components) {
|
|
2766
|
+
return this.h1n_1.v1h(components);
|
|
3153
2767
|
};
|
|
3154
|
-
protoOf(Companion_5).
|
|
3155
|
-
return this.
|
|
2768
|
+
protoOf(Companion_5).r1i = function (x, y, z, alpha) {
|
|
2769
|
+
return this.h1n_1.r1i(x, y, z, alpha);
|
|
3156
2770
|
};
|
|
3157
|
-
protoOf(Companion_5).
|
|
3158
|
-
return this.
|
|
2771
|
+
protoOf(Companion_5).p1l = function (x, y, z, alpha) {
|
|
2772
|
+
return this.h1n_1.p1l(x, y, z, alpha);
|
|
3159
2773
|
};
|
|
3160
2774
|
var Companion_instance_5;
|
|
3161
2775
|
function Companion_getInstance_6() {
|
|
@@ -3164,101 +2778,97 @@
|
|
|
3164
2778
|
return Companion_instance_5;
|
|
3165
2779
|
}
|
|
3166
2780
|
function adaptToM($this, space, m, mi) {
|
|
3167
|
-
if (space.
|
|
2781
|
+
if (space.u1h().equals($this.l1h_1.u1h()))
|
|
3168
2782
|
return $this;
|
|
3169
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3170
|
-
var tmp$ret$1;
|
|
2783
|
+
var transform = chromaticAdaptationMatrix(space, $this.l1h_1.u1h().d1k_1, m, mi);
|
|
3171
2784
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3172
|
-
var tmp0_dot = $this.
|
|
3173
|
-
var tmp1_dot = $this.
|
|
3174
|
-
var tmp2_dot = $this.
|
|
3175
|
-
var tmp$ret$0;
|
|
2785
|
+
var tmp0_dot = $this.h1h_1;
|
|
2786
|
+
var tmp1_dot = $this.i1h_1;
|
|
2787
|
+
var tmp2_dot = $this.j1h_1;
|
|
3176
2788
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
3177
|
-
var
|
|
3178
|
-
var
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3181
|
-
tmp$ret$1 = tmp$ret$0;
|
|
3182
|
-
return tmp$ret$1;
|
|
2789
|
+
var tmp3_anonymous = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 0) * tmp2_dot;
|
|
2790
|
+
var tmp4_anonymous = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 1) * tmp2_dot;
|
|
2791
|
+
var tmp5_anonymous = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 2) * tmp2_dot;
|
|
2792
|
+
return space.r1i(tmp3_anonymous, tmp4_anonymous, tmp5_anonymous, $this.k1h_1);
|
|
3183
2793
|
}
|
|
3184
2794
|
function toLAB$f(t) {
|
|
3185
|
-
|
|
2795
|
+
var tmp;
|
|
2796
|
+
if (t > get_CIE_E()) {
|
|
2797
|
+
// Inline function 'kotlin.math.cbrt' call
|
|
2798
|
+
tmp = Math.cbrt(t);
|
|
2799
|
+
} else {
|
|
2800
|
+
tmp = (t * get_CIE_K() + 16) / 116;
|
|
2801
|
+
}
|
|
2802
|
+
return tmp;
|
|
3186
2803
|
}
|
|
3187
2804
|
function XYZ(x, y, z, alpha, space) {
|
|
3188
2805
|
Companion_getInstance_6();
|
|
3189
|
-
this.
|
|
3190
|
-
this.
|
|
3191
|
-
this.
|
|
3192
|
-
this.
|
|
3193
|
-
this.
|
|
2806
|
+
this.h1h_1 = x;
|
|
2807
|
+
this.i1h_1 = y;
|
|
2808
|
+
this.j1h_1 = z;
|
|
2809
|
+
this.k1h_1 = alpha;
|
|
2810
|
+
this.l1h_1 = space;
|
|
3194
2811
|
}
|
|
3195
|
-
protoOf(XYZ).
|
|
3196
|
-
return this.
|
|
2812
|
+
protoOf(XYZ).w1g = function () {
|
|
2813
|
+
return this.k1h_1;
|
|
3197
2814
|
};
|
|
3198
|
-
protoOf(XYZ).
|
|
3199
|
-
return this.
|
|
2815
|
+
protoOf(XYZ).x1g = function () {
|
|
2816
|
+
return this.l1h_1;
|
|
3200
2817
|
};
|
|
3201
|
-
protoOf(XYZ).
|
|
2818
|
+
protoOf(XYZ).i1j = function (space) {
|
|
3202
2819
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
3203
2820
|
};
|
|
3204
|
-
protoOf(XYZ).
|
|
3205
|
-
var tmp0_container = this.
|
|
3206
|
-
var x = tmp0_container.
|
|
3207
|
-
var y = tmp0_container.
|
|
3208
|
-
var z = tmp0_container.
|
|
3209
|
-
var f = space.
|
|
3210
|
-
var tmp$ret$1;
|
|
2821
|
+
protoOf(XYZ).e1m = function (space) {
|
|
2822
|
+
var tmp0_container = this.i1j(XYZColorSpace_0(space.u1h()));
|
|
2823
|
+
var x = tmp0_container.s3();
|
|
2824
|
+
var y = tmp0_container.t3();
|
|
2825
|
+
var z = tmp0_container.i1n();
|
|
2826
|
+
var f = space.e1l();
|
|
3211
2827
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3212
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.
|
|
3213
|
-
var tmp$ret$0;
|
|
2828
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.c1m());
|
|
3214
2829
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
3215
|
-
var
|
|
3216
|
-
var
|
|
3217
|
-
var
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
var
|
|
3227
|
-
var fy = toLAB$f(this.q2l_1 / this.t2l_1.c2m().l2o_1.b2q_1);
|
|
3228
|
-
var fz = toLAB$f(this.r2l_1 / this.t2l_1.c2m().l2o_1.d2q());
|
|
2830
|
+
var tmp1_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * z;
|
|
2831
|
+
var tmp2_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * z;
|
|
2832
|
+
var tmp3_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * z;
|
|
2833
|
+
return space.r1i(f.o1l(tmp1_anonymous), f.o1l(tmp2_anonymous), f.o1l(tmp3_anonymous), this.k1h_1);
|
|
2834
|
+
};
|
|
2835
|
+
protoOf(XYZ).y1g = function () {
|
|
2836
|
+
return this.e1m(RGBColorSpaces_getInstance().u1i_1);
|
|
2837
|
+
};
|
|
2838
|
+
protoOf(XYZ).g1h = function () {
|
|
2839
|
+
var fx = toLAB$f(this.h1h_1 / this.l1h_1.u1h().d1k_1.u1l());
|
|
2840
|
+
var fy = toLAB$f(this.i1h_1 / this.l1h_1.u1h().d1k_1.t1l_1);
|
|
2841
|
+
var fz = toLAB$f(this.j1h_1 / this.l1h_1.u1h().d1k_1.v1l());
|
|
3229
2842
|
var l = 116 * fy - 16;
|
|
3230
2843
|
var a = 500 * (fx - fy);
|
|
3231
2844
|
var b = 200 * (fy - fz);
|
|
3232
|
-
return LABColorSpace_0(this.
|
|
2845
|
+
return LABColorSpace_0(this.l1h_1.u1h()).p1l(l, a, b, this.k1h_1);
|
|
3233
2846
|
};
|
|
3234
|
-
protoOf(XYZ).
|
|
2847
|
+
protoOf(XYZ).f1h = function () {
|
|
3235
2848
|
return this;
|
|
3236
2849
|
};
|
|
3237
|
-
protoOf(XYZ).
|
|
3238
|
-
var tmp$ret$0;
|
|
2850
|
+
protoOf(XYZ).a3 = function () {
|
|
3239
2851
|
// Inline function 'kotlin.floatArrayOf' call
|
|
3240
|
-
|
|
3241
|
-
tmp$ret$0 = tmp0_floatArrayOf;
|
|
3242
|
-
return tmp$ret$0;
|
|
2852
|
+
return new Float32Array([this.h1h_1, this.i1h_1, this.j1h_1, this.k1h_1]);
|
|
3243
2853
|
};
|
|
3244
|
-
protoOf(XYZ).
|
|
3245
|
-
return this.
|
|
2854
|
+
protoOf(XYZ).s3 = function () {
|
|
2855
|
+
return this.h1h_1;
|
|
3246
2856
|
};
|
|
3247
|
-
protoOf(XYZ).
|
|
3248
|
-
return this.
|
|
2857
|
+
protoOf(XYZ).t3 = function () {
|
|
2858
|
+
return this.i1h_1;
|
|
3249
2859
|
};
|
|
3250
|
-
protoOf(XYZ).
|
|
3251
|
-
return this.
|
|
2860
|
+
protoOf(XYZ).i1n = function () {
|
|
2861
|
+
return this.j1h_1;
|
|
3252
2862
|
};
|
|
3253
2863
|
protoOf(XYZ).toString = function () {
|
|
3254
|
-
return 'XYZ(x=' + this.
|
|
2864
|
+
return 'XYZ(x=' + this.h1h_1 + ', y=' + this.i1h_1 + ', z=' + this.j1h_1 + ', alpha=' + this.k1h_1 + ', space=' + this.l1h_1 + ')';
|
|
3255
2865
|
};
|
|
3256
2866
|
protoOf(XYZ).hashCode = function () {
|
|
3257
|
-
var result = getNumberHashCode(this.
|
|
3258
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3259
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3260
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3261
|
-
result = imul(result, 31) + hashCode(this.
|
|
2867
|
+
var result = getNumberHashCode(this.h1h_1);
|
|
2868
|
+
result = imul(result, 31) + getNumberHashCode(this.i1h_1) | 0;
|
|
2869
|
+
result = imul(result, 31) + getNumberHashCode(this.j1h_1) | 0;
|
|
2870
|
+
result = imul(result, 31) + getNumberHashCode(this.k1h_1) | 0;
|
|
2871
|
+
result = imul(result, 31) + hashCode(this.l1h_1) | 0;
|
|
3262
2872
|
return result;
|
|
3263
2873
|
};
|
|
3264
2874
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -3267,28 +2877,27 @@
|
|
|
3267
2877
|
if (!(other instanceof XYZ))
|
|
3268
2878
|
return false;
|
|
3269
2879
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
3270
|
-
if (!equals(this.
|
|
2880
|
+
if (!equals(this.h1h_1, tmp0_other_with_cast.h1h_1))
|
|
3271
2881
|
return false;
|
|
3272
|
-
if (!equals(this.
|
|
2882
|
+
if (!equals(this.i1h_1, tmp0_other_with_cast.i1h_1))
|
|
3273
2883
|
return false;
|
|
3274
|
-
if (!equals(this.
|
|
2884
|
+
if (!equals(this.j1h_1, tmp0_other_with_cast.j1h_1))
|
|
3275
2885
|
return false;
|
|
3276
|
-
if (!equals(this.
|
|
2886
|
+
if (!equals(this.k1h_1, tmp0_other_with_cast.k1h_1))
|
|
3277
2887
|
return false;
|
|
3278
|
-
if (!equals(this.
|
|
2888
|
+
if (!equals(this.l1h_1, tmp0_other_with_cast.l1h_1))
|
|
3279
2889
|
return false;
|
|
3280
2890
|
return true;
|
|
3281
2891
|
};
|
|
3282
2892
|
function XYZColorSpace() {
|
|
3283
2893
|
}
|
|
3284
2894
|
function XYZColorSpace_0(whitePoint) {
|
|
3285
|
-
|
|
3286
|
-
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? XYZColorSpaces_getInstance().o2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? XYZColorSpaces_getInstance().p2n_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2895
|
+
return whitePoint.equals(Illuminant_getInstance().j1k_1) ? XYZColorSpaces_getInstance().g1j_1 : whitePoint.equals(Illuminant_getInstance().h1k_1) ? XYZColorSpaces_getInstance().h1j_1 : new XYZColorSpaceImpl(whitePoint);
|
|
3287
2896
|
}
|
|
3288
2897
|
function XYZColorSpaces() {
|
|
3289
2898
|
XYZColorSpaces_instance = this;
|
|
3290
|
-
this.
|
|
3291
|
-
this.
|
|
2899
|
+
this.g1j_1 = new XYZColorSpaceImpl(Illuminant_getInstance().j1k_1);
|
|
2900
|
+
this.h1j_1 = new XYZColorSpaceImpl(Illuminant_getInstance().h1k_1);
|
|
3292
2901
|
}
|
|
3293
2902
|
var XYZColorSpaces_instance;
|
|
3294
2903
|
function XYZColorSpaces_getInstance() {
|
|
@@ -3299,46 +2908,40 @@
|
|
|
3299
2908
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
3300
2909
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
3301
2910
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
3302
|
-
var dstWp = _this__u8e3s4.
|
|
3303
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
3304
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
2911
|
+
var dstWp = _this__u8e3s4.u1h().d1k_1;
|
|
2912
|
+
var src = dot_0(xyzToLms, srcWp.u1l(), srcWp.t1l_1, srcWp.v1l());
|
|
2913
|
+
var dst = dot_0(xyzToLms, dstWp.u1l(), dstWp.t1l_1, dstWp.v1l());
|
|
3305
2914
|
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);
|
|
3306
2915
|
}
|
|
3307
2916
|
function XYZColorSpaceImpl(whitePoint) {
|
|
3308
|
-
this.
|
|
3309
|
-
this.
|
|
2917
|
+
this.j1n_1 = whitePoint;
|
|
2918
|
+
this.k1n_1 = rectangularComponentInfo('XYZ');
|
|
3310
2919
|
}
|
|
3311
|
-
protoOf(XYZColorSpaceImpl).
|
|
3312
|
-
return this.
|
|
2920
|
+
protoOf(XYZColorSpaceImpl).u1h = function () {
|
|
2921
|
+
return this.j1n_1;
|
|
3313
2922
|
};
|
|
3314
|
-
protoOf(XYZColorSpaceImpl).
|
|
2923
|
+
protoOf(XYZColorSpaceImpl).ee = function () {
|
|
3315
2924
|
return 'XYZ';
|
|
3316
2925
|
};
|
|
3317
|
-
protoOf(XYZColorSpaceImpl).
|
|
3318
|
-
return this.
|
|
2926
|
+
protoOf(XYZColorSpaceImpl).p1k = function () {
|
|
2927
|
+
return this.k1n_1;
|
|
3319
2928
|
};
|
|
3320
|
-
protoOf(XYZColorSpaceImpl).
|
|
3321
|
-
return color.
|
|
2929
|
+
protoOf(XYZColorSpaceImpl).t1h = function (color) {
|
|
2930
|
+
return color.f1h().i1j(this);
|
|
3322
2931
|
};
|
|
3323
|
-
protoOf(XYZColorSpaceImpl).
|
|
3324
|
-
var tmp$ret$5;
|
|
2932
|
+
protoOf(XYZColorSpaceImpl).v1h = function (components) {
|
|
3325
2933
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3326
|
-
var tmp$ret$4;
|
|
3327
2934
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3328
|
-
var size = this.
|
|
2935
|
+
var size = this.p1k().i();
|
|
3329
2936
|
// Inline function 'kotlin.require' call
|
|
3330
2937
|
var containsLower = size - 1 | 0;
|
|
3331
2938
|
var containsArg = components.length;
|
|
3332
|
-
var tmp0_require = containsLower <= containsArg ? containsArg <= size : false;
|
|
3333
2939
|
// Inline function 'kotlin.contracts.contract' call
|
|
3334
|
-
if (!
|
|
3335
|
-
var tmp$ret$0;
|
|
2940
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
3336
2941
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
3337
|
-
|
|
3338
|
-
var message = tmp$ret$0;
|
|
2942
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
3339
2943
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
3340
2944
|
}
|
|
3341
|
-
var tmp$ret$3;
|
|
3342
2945
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3343
2946
|
var tmp = components[0];
|
|
3344
2947
|
var tmp_0 = components[1];
|
|
@@ -3349,25 +2952,20 @@
|
|
|
3349
2952
|
if (3 <= get_lastIndex_0(components)) {
|
|
3350
2953
|
tmp_2 = components[3];
|
|
3351
2954
|
} else {
|
|
3352
|
-
var tmp$ret$1;
|
|
3353
2955
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3354
|
-
|
|
3355
|
-
tmp_2 = tmp$ret$1;
|
|
2956
|
+
tmp_2 = 1.0;
|
|
3356
2957
|
}
|
|
3357
2958
|
tmp$ret$2 = tmp_2;
|
|
3358
|
-
|
|
3359
|
-
tmp$ret$4 = tmp$ret$3;
|
|
3360
|
-
tmp$ret$5 = tmp$ret$4;
|
|
3361
|
-
return tmp$ret$5;
|
|
2959
|
+
return this.r1i(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
3362
2960
|
};
|
|
3363
2961
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
3364
|
-
return 'XYZColorSpace(' + this.
|
|
2962
|
+
return 'XYZColorSpace(' + this.j1n_1 + ')';
|
|
3365
2963
|
};
|
|
3366
|
-
protoOf(XYZColorSpaceImpl).
|
|
2964
|
+
protoOf(XYZColorSpaceImpl).r1i = function (x, y, z, alpha) {
|
|
3367
2965
|
return new XYZ(x, y, z, alpha, this);
|
|
3368
2966
|
};
|
|
3369
2967
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
3370
|
-
return this.
|
|
2968
|
+
return this.j1n_1.hashCode();
|
|
3371
2969
|
};
|
|
3372
2970
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
3373
2971
|
if (this === other)
|
|
@@ -3375,7 +2973,7 @@
|
|
|
3375
2973
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
3376
2974
|
return false;
|
|
3377
2975
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
3378
|
-
if (!this.
|
|
2976
|
+
if (!this.j1n_1.equals(tmp0_other_with_cast.j1n_1))
|
|
3379
2977
|
return false;
|
|
3380
2978
|
return true;
|
|
3381
2979
|
};
|
|
@@ -3389,26 +2987,26 @@
|
|
|
3389
2987
|
}
|
|
3390
2988
|
function xyY(x, y, Y) {
|
|
3391
2989
|
Y = Y === VOID ? 1.0 : Y;
|
|
3392
|
-
this.
|
|
3393
|
-
this.
|
|
3394
|
-
this.
|
|
2990
|
+
this.r1l_1 = x;
|
|
2991
|
+
this.s1l_1 = y;
|
|
2992
|
+
this.t1l_1 = Y;
|
|
3395
2993
|
}
|
|
3396
|
-
protoOf(xyY).
|
|
3397
|
-
return 1 - this.
|
|
2994
|
+
protoOf(xyY).u1m = function () {
|
|
2995
|
+
return 1 - this.r1l_1 - this.s1l_1;
|
|
3398
2996
|
};
|
|
3399
|
-
protoOf(xyY).
|
|
3400
|
-
return this.
|
|
2997
|
+
protoOf(xyY).u1l = function () {
|
|
2998
|
+
return this.r1l_1 * this.t1l_1 / this.s1l_1;
|
|
3401
2999
|
};
|
|
3402
|
-
protoOf(xyY).
|
|
3403
|
-
return (1 - this.
|
|
3000
|
+
protoOf(xyY).v1l = function () {
|
|
3001
|
+
return (1 - this.r1l_1 - this.s1l_1) * this.t1l_1 / this.s1l_1;
|
|
3404
3002
|
};
|
|
3405
3003
|
protoOf(xyY).toString = function () {
|
|
3406
|
-
return 'xyY(x=' + this.
|
|
3004
|
+
return 'xyY(x=' + this.r1l_1 + ', y=' + this.s1l_1 + ', Y=' + this.t1l_1 + ')';
|
|
3407
3005
|
};
|
|
3408
3006
|
protoOf(xyY).hashCode = function () {
|
|
3409
|
-
var result = getNumberHashCode(this.
|
|
3410
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3411
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3007
|
+
var result = getNumberHashCode(this.r1l_1);
|
|
3008
|
+
result = imul(result, 31) + getNumberHashCode(this.s1l_1) | 0;
|
|
3009
|
+
result = imul(result, 31) + getNumberHashCode(this.t1l_1) | 0;
|
|
3412
3010
|
return result;
|
|
3413
3011
|
};
|
|
3414
3012
|
protoOf(xyY).equals = function (other) {
|
|
@@ -3417,53 +3015,49 @@
|
|
|
3417
3015
|
if (!(other instanceof xyY))
|
|
3418
3016
|
return false;
|
|
3419
3017
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
3420
|
-
if (!equals(this.
|
|
3018
|
+
if (!equals(this.r1l_1, tmp0_other_with_cast.r1l_1))
|
|
3421
3019
|
return false;
|
|
3422
|
-
if (!equals(this.
|
|
3020
|
+
if (!equals(this.s1l_1, tmp0_other_with_cast.s1l_1))
|
|
3423
3021
|
return false;
|
|
3424
|
-
if (!equals(this.
|
|
3022
|
+
if (!equals(this.t1l_1, tmp0_other_with_cast.t1l_1))
|
|
3425
3023
|
return false;
|
|
3426
3024
|
return true;
|
|
3427
3025
|
};
|
|
3428
|
-
function cbrt(float) {
|
|
3429
|
-
var tmp = Math.cbrt(float);
|
|
3430
|
-
return numberToDouble(isNumber(tmp) ? tmp : THROW_CCE());
|
|
3431
|
-
}
|
|
3432
3026
|
//region block: post-declaration
|
|
3433
|
-
protoOf(HSL).
|
|
3434
|
-
protoOf(HSL).
|
|
3435
|
-
protoOf(HSL).
|
|
3436
|
-
protoOf(HSL).
|
|
3437
|
-
protoOf(HWB).
|
|
3438
|
-
protoOf(HWB).
|
|
3439
|
-
protoOf(HWB).
|
|
3440
|
-
protoOf(HWB).
|
|
3441
|
-
protoOf(LAB).
|
|
3442
|
-
protoOf(LAB).
|
|
3443
|
-
protoOf(LABColorSpaceImpl).
|
|
3444
|
-
protoOf(LCHab).
|
|
3445
|
-
protoOf(LCHab).
|
|
3446
|
-
protoOf(Companion_4).
|
|
3447
|
-
protoOf(RGB).
|
|
3448
|
-
protoOf(RGB).
|
|
3449
|
-
protoOf(SRGB).
|
|
3450
|
-
protoOf(SRGB).
|
|
3451
|
-
protoOf(SRGB).
|
|
3452
|
-
protoOf(SRGB).
|
|
3453
|
-
protoOf(BT2020Space).
|
|
3454
|
-
protoOf(BT2020Space).
|
|
3455
|
-
protoOf(BT2020Space).
|
|
3456
|
-
protoOf(BT2020Space).
|
|
3457
|
-
protoOf(RGBColorSpaceImpl).
|
|
3458
|
-
protoOf(RGBColorSpaceImpl).
|
|
3459
|
-
protoOf(RGBColorSpaceImpl).
|
|
3460
|
-
protoOf(RGBColorSpaceImpl).
|
|
3461
|
-
protoOf(Companion_5).
|
|
3462
|
-
protoOf(XYZ).
|
|
3463
|
-
protoOf(XYZ).
|
|
3464
|
-
protoOf(XYZ).
|
|
3465
|
-
protoOf(XYZColorSpaceImpl).
|
|
3466
|
-
protoOf(XYZColorSpaceImpl).
|
|
3027
|
+
protoOf(HSL).f1h = toXYZ;
|
|
3028
|
+
protoOf(HSL).g1h = toLAB;
|
|
3029
|
+
protoOf(HSL).m1h = toLCHab;
|
|
3030
|
+
protoOf(HSL).s1h = toHWB;
|
|
3031
|
+
protoOf(HWB).z1g = toHSL;
|
|
3032
|
+
protoOf(HWB).f1h = toXYZ;
|
|
3033
|
+
protoOf(HWB).g1h = toLAB;
|
|
3034
|
+
protoOf(HWB).m1h = toLCHab;
|
|
3035
|
+
protoOf(LAB).z1g = toHSL;
|
|
3036
|
+
protoOf(LAB).s1h = toHWB;
|
|
3037
|
+
protoOf(LABColorSpaceImpl).p1l = invoke;
|
|
3038
|
+
protoOf(LCHab).z1g = toHSL;
|
|
3039
|
+
protoOf(LCHab).s1h = toHWB;
|
|
3040
|
+
protoOf(Companion_4).m1k = from255$default;
|
|
3041
|
+
protoOf(RGB).g1h = toLAB;
|
|
3042
|
+
protoOf(RGB).m1h = toLCHab;
|
|
3043
|
+
protoOf(SRGB).p1l = invoke_0;
|
|
3044
|
+
protoOf(SRGB).q1i = invoke_1;
|
|
3045
|
+
protoOf(SRGB).n1k = from255;
|
|
3046
|
+
protoOf(SRGB).m1k = from255$default;
|
|
3047
|
+
protoOf(BT2020Space).p1l = invoke_0;
|
|
3048
|
+
protoOf(BT2020Space).q1i = invoke_1;
|
|
3049
|
+
protoOf(BT2020Space).n1k = from255;
|
|
3050
|
+
protoOf(BT2020Space).m1k = from255$default;
|
|
3051
|
+
protoOf(RGBColorSpaceImpl).p1l = invoke_0;
|
|
3052
|
+
protoOf(RGBColorSpaceImpl).q1i = invoke_1;
|
|
3053
|
+
protoOf(RGBColorSpaceImpl).n1k = from255;
|
|
3054
|
+
protoOf(RGBColorSpaceImpl).m1k = from255$default;
|
|
3055
|
+
protoOf(Companion_5).q1l = invoke$default;
|
|
3056
|
+
protoOf(XYZ).z1g = toHSL;
|
|
3057
|
+
protoOf(XYZ).m1h = toLCHab;
|
|
3058
|
+
protoOf(XYZ).s1h = toHWB;
|
|
3059
|
+
protoOf(XYZColorSpaceImpl).p1l = invoke_2;
|
|
3060
|
+
protoOf(XYZColorSpaceImpl).q1l = invoke$default;
|
|
3467
3061
|
//endregion
|
|
3468
3062
|
//region block: init
|
|
3469
3063
|
CIE_E = 0.008856451679035631;
|
|
@@ -3481,4 +3075,4 @@
|
|
|
3481
3075
|
return _;
|
|
3482
3076
|
}));
|
|
3483
3077
|
|
|
3484
|
-
//# sourceMappingURL=colormath-root-colormath
|
|
3078
|
+
//# sourceMappingURL=colormath-root-colormath.js.map
|