git-digger 1.5.17 → 1.5.19
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/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1277 -1277
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/kotlin/bin/digger +0 -0
- package/kotlin/clikt-clikt-mordant.js +305 -0
- package/kotlin/clikt-clikt-mordant.js.map +1 -0
- package/kotlin/clikt-clikt.js +3408 -3065
- package/kotlin/clikt-clikt.js.map +1 -1
- package/kotlin/colormath-root-colormath.js +491 -561
- package/kotlin/colormath-root-colormath.js.map +1 -1
- package/kotlin/command-line-tools-digger-cli.js +84 -83
- package/kotlin/command-line-tools-digger-cli.js.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.js +2191 -2155
- package/kotlin/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +944 -944
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +322 -322
- package/kotlin/mordant-mordant-omnibus.js +8 -0
- package/kotlin/mordant-mordant-omnibus.js.map +1 -0
- package/kotlin/mordant-mordant.js +1995 -3593
- package/kotlin/mordant-mordant.js.map +1 -1
- package/kotlin/tools-cli-tools.js +3 -3
- package/kotlin/tools-digger-core.js +167 -167
- package/kotlin/tools-digger-core.js.map +1 -1
- package/kotlin/tools-digger-json.js +115 -115
- package/kotlin/tools-digger-model.js +60 -60
- package/kotlin/tools-git-adapter.js +86 -79
- package/kotlin/tools-git-adapter.js.map +1 -1
- package/package.json +1 -1
- package/kotlin/markdown.js +0 -6760
- package/kotlin/markdown.js.map +0 -1
|
@@ -3,47 +3,46 @@
|
|
|
3
3
|
//region block: imports
|
|
4
4
|
var imul = Math.imul;
|
|
5
5
|
var log2 = Math.log2;
|
|
6
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
7
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
8
|
-
var toString = kotlin_kotlin.$_$.
|
|
9
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
10
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
11
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
12
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
13
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
14
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
15
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
16
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
17
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
18
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
19
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
6
|
+
var protoOf = kotlin_kotlin.$_$.o8;
|
|
7
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.s7;
|
|
8
|
+
var toString = kotlin_kotlin.$_$.q8;
|
|
9
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.d1;
|
|
10
|
+
var initMetadataForClass = kotlin_kotlin.$_$.p7;
|
|
11
|
+
var getStringHashCode = kotlin_kotlin.$_$.n7;
|
|
12
|
+
var THROW_CCE = kotlin_kotlin.$_$.xb;
|
|
13
|
+
var initMetadataForObject = kotlin_kotlin.$_$.u7;
|
|
14
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
15
|
+
var charSequenceLength = kotlin_kotlin.$_$.f7;
|
|
16
|
+
var charSequenceGet = kotlin_kotlin.$_$.e7;
|
|
17
|
+
var toString_0 = kotlin_kotlin.$_$.r1;
|
|
18
|
+
var Unit_instance = kotlin_kotlin.$_$.g3;
|
|
19
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;
|
|
20
20
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
21
|
-
var listOf = kotlin_kotlin.$_$.
|
|
22
|
-
var withSign = kotlin_kotlin.$_$.
|
|
23
|
-
var trimMargin = kotlin_kotlin.$_$.
|
|
24
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
25
|
-
var equals = kotlin_kotlin.$_$.
|
|
21
|
+
var listOf = kotlin_kotlin.$_$.g5;
|
|
22
|
+
var withSign = kotlin_kotlin.$_$.s8;
|
|
23
|
+
var trimMargin = kotlin_kotlin.$_$.gb;
|
|
24
|
+
var hashCode = kotlin_kotlin.$_$.o7;
|
|
25
|
+
var equals = kotlin_kotlin.$_$.i7;
|
|
26
26
|
var VOID = kotlin_kotlin.$_$.g;
|
|
27
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
28
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
29
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
30
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
31
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var objectCreate = kotlin_kotlin.$_$.a9;
|
|
27
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.q7;
|
|
28
|
+
var coerceAtLeast = kotlin_kotlin.$_$.t8;
|
|
29
|
+
var getNumberHashCode = kotlin_kotlin.$_$.l7;
|
|
30
|
+
var numberToDouble = kotlin_kotlin.$_$.k8;
|
|
31
|
+
var roundToInt = kotlin_kotlin.$_$.r8;
|
|
32
|
+
var coerceIn = kotlin_kotlin.$_$.x8;
|
|
33
|
+
var Char = kotlin_kotlin.$_$.lb;
|
|
34
|
+
var toInt = kotlin_kotlin.$_$.eb;
|
|
35
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.i8;
|
|
36
|
+
var slice = kotlin_kotlin.$_$.ua;
|
|
37
|
+
var startsWith = kotlin_kotlin.$_$.wa;
|
|
38
|
+
var isInterface = kotlin_kotlin.$_$.d8;
|
|
39
|
+
var contentEquals = kotlin_kotlin.$_$.g4;
|
|
40
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.v8;
|
|
41
|
+
var objectCreate = kotlin_kotlin.$_$.n8;
|
|
43
42
|
//endregion
|
|
44
43
|
//region block: pre-declaration
|
|
45
44
|
function toXYZ() {
|
|
46
|
-
return this.
|
|
45
|
+
return this.c1w().d1w();
|
|
47
46
|
}
|
|
48
47
|
initMetadataForInterface(Color, 'Color');
|
|
49
48
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
@@ -62,21 +61,21 @@
|
|
|
62
61
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
63
62
|
function invoke$default(r, g, b, alpha, $super) {
|
|
64
63
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
65
|
-
return $super === VOID ? this.
|
|
64
|
+
return $super === VOID ? this.n1x(r, g, b, alpha) : $super.n1x.call(this, r, g, b, alpha);
|
|
66
65
|
}
|
|
67
66
|
function invoke(r, g, b, alpha) {
|
|
68
|
-
return this.
|
|
67
|
+
return this.n1x(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
69
68
|
}
|
|
70
69
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
71
70
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
72
|
-
return $super === VOID ? this.
|
|
71
|
+
return $super === VOID ? this.s1y(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
73
72
|
}
|
|
74
73
|
function from255(r, g, b, alpha) {
|
|
75
|
-
return this.
|
|
74
|
+
return this.n1x(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
76
75
|
}
|
|
77
76
|
function from255$default(r, g, b, alpha, $super) {
|
|
78
77
|
alpha = alpha === VOID ? 255 : alpha;
|
|
79
|
-
return $super === VOID ? this.
|
|
78
|
+
return $super === VOID ? this.t1y(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
80
79
|
}
|
|
81
80
|
function invoke_0(hex) {
|
|
82
81
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
} else {
|
|
93
92
|
tmp_2 = 255;
|
|
94
93
|
}
|
|
95
|
-
return this.
|
|
94
|
+
return this.t1y(tmp, tmp_0, tmp_1, tmp_2);
|
|
96
95
|
}
|
|
97
96
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace');
|
|
98
97
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
@@ -116,28 +115,28 @@
|
|
|
116
115
|
function Color() {
|
|
117
116
|
}
|
|
118
117
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
118
|
+
this.j1w_1 = name;
|
|
119
|
+
this.k1w_1 = isPolar;
|
|
120
|
+
this.l1w_1 = min;
|
|
121
|
+
this.m1w_1 = max;
|
|
123
122
|
// Inline function 'kotlin.require' call
|
|
124
123
|
// Inline function 'kotlin.contracts.contract' call
|
|
125
|
-
if (!(this.
|
|
124
|
+
if (!(this.l1w_1 <= this.m1w_1)) {
|
|
126
125
|
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
127
126
|
var message = 'min must be less than or equal to max';
|
|
128
127
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
function WhitePoint(name, chromaticity) {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
131
|
+
this.n1w_1 = name;
|
|
132
|
+
this.o1w_1 = chromaticity;
|
|
134
133
|
}
|
|
135
134
|
protoOf(WhitePoint).toString = function () {
|
|
136
|
-
return this.
|
|
135
|
+
return this.n1w_1;
|
|
137
136
|
};
|
|
138
137
|
protoOf(WhitePoint).hashCode = function () {
|
|
139
|
-
var result = getStringHashCode(this.
|
|
140
|
-
result = imul(result, 31) + this.
|
|
138
|
+
var result = getStringHashCode(this.n1w_1);
|
|
139
|
+
result = imul(result, 31) + this.o1w_1.hashCode() | 0;
|
|
141
140
|
return result;
|
|
142
141
|
};
|
|
143
142
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -146,22 +145,22 @@
|
|
|
146
145
|
if (!(other instanceof WhitePoint))
|
|
147
146
|
return false;
|
|
148
147
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
149
|
-
if (!(this.
|
|
148
|
+
if (!(this.n1w_1 === tmp0_other_with_cast.n1w_1))
|
|
150
149
|
return false;
|
|
151
|
-
if (!this.
|
|
150
|
+
if (!this.o1w_1.equals(tmp0_other_with_cast.o1w_1))
|
|
152
151
|
return false;
|
|
153
152
|
return true;
|
|
154
153
|
};
|
|
155
154
|
function Illuminant() {
|
|
156
155
|
Illuminant_instance = this;
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
156
|
+
this.p1w_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
157
|
+
this.q1w_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
158
|
+
this.r1w_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
159
|
+
this.s1w_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
160
|
+
this.t1w_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
161
|
+
this.u1w_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
162
|
+
this.v1w_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
163
|
+
this.w1w_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
165
164
|
}
|
|
166
165
|
var Illuminant_instance;
|
|
167
166
|
function Illuminant_getInstance() {
|
|
@@ -241,7 +240,7 @@
|
|
|
241
240
|
function _init_properties_Constants_kt__atb1ur() {
|
|
242
241
|
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
243
242
|
properties_initialized_Constants_kt_w4w61t = true;
|
|
244
|
-
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(0.7328, 0.4296, -0.1624, -0.7036, 1.6975, 0.0061, 0.003, 0.0136, 0.9834);
|
|
243
|
+
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(+0.7328, +0.4296, -0.1624, -0.7036, +1.6975, +0.0061, +0.003, +0.0136, +0.9834);
|
|
245
244
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
246
245
|
}
|
|
247
246
|
}
|
|
@@ -296,22 +295,22 @@
|
|
|
296
295
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
297
296
|
if (!(other instanceof Matrix))
|
|
298
297
|
return false;
|
|
299
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
298
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.x1w_1 : THROW_CCE();
|
|
300
299
|
if (!equals($this, tmp0_other_with_cast))
|
|
301
300
|
return false;
|
|
302
301
|
return true;
|
|
303
302
|
}
|
|
304
303
|
function Matrix(rowMajor) {
|
|
305
|
-
this.
|
|
304
|
+
this.x1w_1 = rowMajor;
|
|
306
305
|
}
|
|
307
306
|
protoOf(Matrix).toString = function () {
|
|
308
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
307
|
+
return Matrix__toString_impl_l0abk0(this.x1w_1);
|
|
309
308
|
};
|
|
310
309
|
protoOf(Matrix).hashCode = function () {
|
|
311
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
310
|
+
return Matrix__hashCode_impl_s9ntm9(this.x1w_1);
|
|
312
311
|
};
|
|
313
312
|
protoOf(Matrix).equals = function (other) {
|
|
314
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
313
|
+
return Matrix__equals_impl_g5p8p9(this.x1w_1, other);
|
|
315
314
|
};
|
|
316
315
|
function inverse(_this__u8e3s4, inPlace) {
|
|
317
316
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -392,10 +391,10 @@
|
|
|
392
391
|
}
|
|
393
392
|
function Companion() {
|
|
394
393
|
Companion_instance = this;
|
|
395
|
-
this.
|
|
394
|
+
this.y1w_1 = componentInfoList([new ColorComponentInfo('code', false, 30.0, 107.0)]);
|
|
396
395
|
}
|
|
397
|
-
protoOf(Companion).
|
|
398
|
-
return this.
|
|
396
|
+
protoOf(Companion).z1w = function () {
|
|
397
|
+
return this.y1w_1;
|
|
399
398
|
};
|
|
400
399
|
var Companion_instance;
|
|
401
400
|
function Companion_getInstance() {
|
|
@@ -405,38 +404,38 @@
|
|
|
405
404
|
}
|
|
406
405
|
function Ansi16(code) {
|
|
407
406
|
Companion_getInstance();
|
|
408
|
-
this.
|
|
407
|
+
this.a1x_1 = code;
|
|
409
408
|
}
|
|
410
|
-
protoOf(Ansi16).
|
|
409
|
+
protoOf(Ansi16).b1w = function () {
|
|
411
410
|
return Companion_getInstance();
|
|
412
411
|
};
|
|
413
|
-
protoOf(Ansi16).
|
|
414
|
-
switch (this.
|
|
412
|
+
protoOf(Ansi16).c1w = function () {
|
|
413
|
+
switch (this.a1x_1) {
|
|
415
414
|
case 30:
|
|
416
415
|
case 40:
|
|
417
|
-
return Companion_getInstance_2().
|
|
416
|
+
return Companion_getInstance_2().b1x(0.0, 0.0, 0.0);
|
|
418
417
|
case 90:
|
|
419
418
|
case 100:
|
|
420
|
-
return Companion_getInstance_2().
|
|
419
|
+
return Companion_getInstance_2().c1x(128, 128, 128);
|
|
421
420
|
case 37:
|
|
422
421
|
case 47:
|
|
423
|
-
return Companion_getInstance_2().
|
|
422
|
+
return Companion_getInstance_2().c1x(192, 192, 192);
|
|
424
423
|
case 97:
|
|
425
424
|
case 107:
|
|
426
|
-
return Companion_getInstance_2().
|
|
425
|
+
return Companion_getInstance_2().b1x(1.0, 1.0, 1.0);
|
|
427
426
|
}
|
|
428
|
-
var color = this.
|
|
429
|
-
var mul = this.
|
|
427
|
+
var color = this.a1x_1 % 10 | 0;
|
|
428
|
+
var mul = this.a1x_1 > 50 ? 1.0 : 0.5;
|
|
430
429
|
var r = (color % 2 | 0) * mul;
|
|
431
430
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
432
431
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
433
|
-
return Companion_getInstance_2().
|
|
432
|
+
return Companion_getInstance_2().b1x(r, g, b);
|
|
434
433
|
};
|
|
435
434
|
protoOf(Ansi16).toString = function () {
|
|
436
|
-
return 'Ansi16(code=' + this.
|
|
435
|
+
return 'Ansi16(code=' + this.a1x_1 + ')';
|
|
437
436
|
};
|
|
438
437
|
protoOf(Ansi16).hashCode = function () {
|
|
439
|
-
return this.
|
|
438
|
+
return this.a1x_1;
|
|
440
439
|
};
|
|
441
440
|
protoOf(Ansi16).equals = function (other) {
|
|
442
441
|
if (this === other)
|
|
@@ -444,16 +443,16 @@
|
|
|
444
443
|
if (!(other instanceof Ansi16))
|
|
445
444
|
return false;
|
|
446
445
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
447
|
-
if (!(this.
|
|
446
|
+
if (!(this.a1x_1 === tmp0_other_with_cast.a1x_1))
|
|
448
447
|
return false;
|
|
449
448
|
return true;
|
|
450
449
|
};
|
|
451
450
|
function Companion_0() {
|
|
452
451
|
Companion_instance_0 = this;
|
|
453
|
-
this.
|
|
452
|
+
this.d1x_1 = componentInfoList([new ColorComponentInfo('code', false, 0.0, 255.0)]);
|
|
454
453
|
}
|
|
455
|
-
protoOf(Companion_0).
|
|
456
|
-
return this.
|
|
454
|
+
protoOf(Companion_0).z1w = function () {
|
|
455
|
+
return this.d1x_1;
|
|
457
456
|
};
|
|
458
457
|
var Companion_instance_0;
|
|
459
458
|
function Companion_getInstance_0() {
|
|
@@ -463,19 +462,19 @@
|
|
|
463
462
|
}
|
|
464
463
|
function Ansi256(code) {
|
|
465
464
|
Companion_getInstance_0();
|
|
466
|
-
this.
|
|
465
|
+
this.e1x_1 = code;
|
|
467
466
|
}
|
|
468
|
-
protoOf(Ansi256).
|
|
467
|
+
protoOf(Ansi256).b1w = function () {
|
|
469
468
|
return Companion_getInstance_0();
|
|
470
469
|
};
|
|
471
|
-
protoOf(Ansi256).
|
|
472
|
-
if (this.
|
|
473
|
-
return this.
|
|
474
|
-
if (this.
|
|
475
|
-
var c = imul(this.
|
|
476
|
-
return Companion_getInstance_2().
|
|
470
|
+
protoOf(Ansi256).c1w = function () {
|
|
471
|
+
if (this.e1x_1 < 16)
|
|
472
|
+
return this.f1x().c1w();
|
|
473
|
+
if (this.e1x_1 >= 232) {
|
|
474
|
+
var c = imul(this.e1x_1 - 232 | 0, 10) + 8 | 0;
|
|
475
|
+
return Companion_getInstance_2().c1x(c, c, c);
|
|
477
476
|
}
|
|
478
|
-
var c_0 = this.
|
|
477
|
+
var c_0 = this.e1x_1 - 16 | 0;
|
|
479
478
|
var rem = c_0 % 36 | 0;
|
|
480
479
|
// Inline function 'kotlin.math.floor' call
|
|
481
480
|
var x = c_0 / 36.0;
|
|
@@ -484,16 +483,16 @@
|
|
|
484
483
|
var x_0 = rem / 6.0;
|
|
485
484
|
var g = Math.floor(x_0) / 5.0;
|
|
486
485
|
var b = (rem % 6 | 0) / 5.0;
|
|
487
|
-
return Companion_getInstance_2().
|
|
486
|
+
return Companion_getInstance_2().g1x(r, g, b);
|
|
488
487
|
};
|
|
489
|
-
protoOf(Ansi256).
|
|
490
|
-
return this.
|
|
488
|
+
protoOf(Ansi256).f1x = function () {
|
|
489
|
+
return this.e1x_1 < 8 ? new Ansi16(this.e1x_1 + 30 | 0) : this.e1x_1 < 16 ? new Ansi16((this.e1x_1 - 8 | 0) + 90 | 0) : this.c1w().f1x();
|
|
491
490
|
};
|
|
492
491
|
protoOf(Ansi256).toString = function () {
|
|
493
|
-
return 'Ansi256(code=' + this.
|
|
492
|
+
return 'Ansi256(code=' + this.e1x_1 + ')';
|
|
494
493
|
};
|
|
495
494
|
protoOf(Ansi256).hashCode = function () {
|
|
496
|
-
return this.
|
|
495
|
+
return this.e1x_1;
|
|
497
496
|
};
|
|
498
497
|
protoOf(Ansi256).equals = function (other) {
|
|
499
498
|
if (this === other)
|
|
@@ -501,16 +500,16 @@
|
|
|
501
500
|
if (!(other instanceof Ansi256))
|
|
502
501
|
return false;
|
|
503
502
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
504
|
-
if (!(this.
|
|
503
|
+
if (!(this.e1x_1 === tmp0_other_with_cast.e1x_1))
|
|
505
504
|
return false;
|
|
506
505
|
return true;
|
|
507
506
|
};
|
|
508
507
|
function Companion_1() {
|
|
509
508
|
Companion_instance_1 = this;
|
|
510
|
-
this.
|
|
509
|
+
this.h1x_1 = polarComponentInfo('HSV', 0.0, 1.0);
|
|
511
510
|
}
|
|
512
|
-
protoOf(Companion_1).
|
|
513
|
-
return this.
|
|
511
|
+
protoOf(Companion_1).z1w = function () {
|
|
512
|
+
return this.h1x_1;
|
|
514
513
|
};
|
|
515
514
|
var Companion_instance_1;
|
|
516
515
|
function Companion_getInstance_1() {
|
|
@@ -529,30 +528,30 @@
|
|
|
529
528
|
function HSV(h, s, v, alpha) {
|
|
530
529
|
Companion_getInstance_1();
|
|
531
530
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
532
|
-
this.
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
531
|
+
this.i1x_1 = h;
|
|
532
|
+
this.j1x_1 = s;
|
|
533
|
+
this.k1x_1 = v;
|
|
534
|
+
this.l1x_1 = alpha;
|
|
536
535
|
}
|
|
537
|
-
protoOf(HSV).
|
|
536
|
+
protoOf(HSV).b1w = function () {
|
|
538
537
|
return Companion_getInstance_1();
|
|
539
538
|
};
|
|
540
|
-
protoOf(HSV).
|
|
541
|
-
if (this.
|
|
542
|
-
return Companion_getInstance_2().
|
|
543
|
-
var v = this.
|
|
544
|
-
var h = normalizeDeg_0(this.
|
|
545
|
-
var s = this.
|
|
546
|
-
return SRGB_getInstance().
|
|
539
|
+
protoOf(HSV).c1w = function () {
|
|
540
|
+
if (this.j1x_1 < 1.0E-7)
|
|
541
|
+
return Companion_getInstance_2().n1x(this.k1x_1, this.k1x_1, this.k1x_1, this.l1x_1);
|
|
542
|
+
var v = this.k1x_1;
|
|
543
|
+
var h = normalizeDeg_0(this.i1x_1) / 60.0;
|
|
544
|
+
var s = this.j1x_1;
|
|
545
|
+
return SRGB_getInstance().n1x(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.l1x_1);
|
|
547
546
|
};
|
|
548
547
|
protoOf(HSV).toString = function () {
|
|
549
|
-
return 'HSV(h=' + this.
|
|
548
|
+
return 'HSV(h=' + this.i1x_1 + ', s=' + this.j1x_1 + ', v=' + this.k1x_1 + ', alpha=' + this.l1x_1 + ')';
|
|
550
549
|
};
|
|
551
550
|
protoOf(HSV).hashCode = function () {
|
|
552
|
-
var result = getNumberHashCode(this.
|
|
553
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
554
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
555
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
551
|
+
var result = getNumberHashCode(this.i1x_1);
|
|
552
|
+
result = imul(result, 31) + getNumberHashCode(this.j1x_1) | 0;
|
|
553
|
+
result = imul(result, 31) + getNumberHashCode(this.k1x_1) | 0;
|
|
554
|
+
result = imul(result, 31) + getNumberHashCode(this.l1x_1) | 0;
|
|
556
555
|
return result;
|
|
557
556
|
};
|
|
558
557
|
protoOf(HSV).equals = function (other) {
|
|
@@ -561,13 +560,13 @@
|
|
|
561
560
|
if (!(other instanceof HSV))
|
|
562
561
|
return false;
|
|
563
562
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
564
|
-
if (!equals(this.
|
|
563
|
+
if (!equals(this.i1x_1, tmp0_other_with_cast.i1x_1))
|
|
565
564
|
return false;
|
|
566
|
-
if (!equals(this.
|
|
565
|
+
if (!equals(this.j1x_1, tmp0_other_with_cast.j1x_1))
|
|
567
566
|
return false;
|
|
568
|
-
if (!equals(this.
|
|
567
|
+
if (!equals(this.k1x_1, tmp0_other_with_cast.k1x_1))
|
|
569
568
|
return false;
|
|
570
|
-
if (!equals(this.
|
|
569
|
+
if (!equals(this.l1x_1, tmp0_other_with_cast.l1x_1))
|
|
571
570
|
return false;
|
|
572
571
|
return true;
|
|
573
572
|
};
|
|
@@ -609,51 +608,47 @@
|
|
|
609
608
|
var ICTCP_LMS_TO_XYZ;
|
|
610
609
|
function ICtCp() {
|
|
611
610
|
}
|
|
612
|
-
protoOf(ICtCp).
|
|
613
|
-
var fo = RGBColorSpaces_getInstance().
|
|
611
|
+
protoOf(ICtCp).t1x = function () {
|
|
612
|
+
var fo = RGBColorSpaces_getInstance().b1y_1.g1y();
|
|
614
613
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
615
614
|
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
616
|
-
var v0 = this.
|
|
617
|
-
var v1 = this.
|
|
618
|
-
var v2 = this.
|
|
615
|
+
var v0 = this.p1x_1;
|
|
616
|
+
var v1 = this.q1x_1;
|
|
617
|
+
var v2 = this.r1x_1;
|
|
619
618
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
620
619
|
var l = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
621
620
|
var m = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
622
621
|
var s = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
623
622
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
624
623
|
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
625
|
-
var v0_0 = PqNonlinearity_instance.
|
|
626
|
-
var v1_0 = PqNonlinearity_instance.
|
|
627
|
-
var v2_0 = PqNonlinearity_instance.
|
|
624
|
+
var v0_0 = PqNonlinearity_instance.p1y(l);
|
|
625
|
+
var v1_0 = PqNonlinearity_instance.p1y(m);
|
|
626
|
+
var v2_0 = PqNonlinearity_instance.p1y(s);
|
|
628
627
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
629
628
|
var r = Matrix__get_impl_xogbpk(this_1, 0, 0) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 0) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 0) * v2_0;
|
|
630
629
|
var g = Matrix__get_impl_xogbpk(this_1, 0, 1) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 1) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 1) * v2_0;
|
|
631
630
|
var b = Matrix__get_impl_xogbpk(this_1, 0, 2) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 2) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 2) * v2_0;
|
|
632
|
-
return RGBColorSpaces_getInstance().
|
|
631
|
+
return RGBColorSpaces_getInstance().b1y_1.n1x(fo.q1y(r), fo.q1y(g), fo.q1y(b), this.s1x_1);
|
|
633
632
|
};
|
|
634
633
|
function PqNonlinearity() {
|
|
635
|
-
this.
|
|
636
|
-
this.
|
|
637
|
-
this.
|
|
638
|
-
this.
|
|
639
|
-
this.
|
|
640
|
-
this.
|
|
641
|
-
this.
|
|
642
|
-
this.
|
|
643
|
-
}
|
|
644
|
-
protoOf(PqNonlinearity).
|
|
634
|
+
this.h1y_1 = 0.1593017578125;
|
|
635
|
+
this.i1y_1 = 78.84375;
|
|
636
|
+
this.j1y_1 = 0.8359375;
|
|
637
|
+
this.k1y_1 = 18.8515625;
|
|
638
|
+
this.l1y_1 = 18.6875;
|
|
639
|
+
this.m1y_1 = 10000.0;
|
|
640
|
+
this.n1y_1 = 6.277394636015326;
|
|
641
|
+
this.o1y_1 = 0.012683313515655966;
|
|
642
|
+
}
|
|
643
|
+
protoOf(PqNonlinearity).p1y = function (x) {
|
|
645
644
|
var vp = spow(x, 0.012683313515655966);
|
|
646
645
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
647
|
-
var
|
|
648
|
-
var l = spow_0(tmp, 6.277394636015326);
|
|
646
|
+
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
649
647
|
return 10000.0 * l;
|
|
650
648
|
};
|
|
651
|
-
protoOf(PqNonlinearity).
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
var tmp_0 = 0.8359375 + 18.8515625 * yp;
|
|
655
|
-
var tmp_1 = tmp_0 / (1.0 + 18.6875 * yp);
|
|
656
|
-
return spow_0(tmp_1, 78.84375);
|
|
649
|
+
protoOf(PqNonlinearity).q1y = function (x) {
|
|
650
|
+
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
651
|
+
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
657
652
|
};
|
|
658
653
|
var PqNonlinearity_instance;
|
|
659
654
|
function PqNonlinearity_getInstance() {
|
|
@@ -674,19 +669,19 @@
|
|
|
674
669
|
}
|
|
675
670
|
}
|
|
676
671
|
function GammaTransferFunctions(gamma) {
|
|
677
|
-
this.
|
|
672
|
+
this.r1y_1 = gamma;
|
|
678
673
|
}
|
|
679
|
-
protoOf(GammaTransferFunctions).
|
|
680
|
-
return spow(x, this.
|
|
674
|
+
protoOf(GammaTransferFunctions).p1y = function (x) {
|
|
675
|
+
return spow(x, this.r1y_1);
|
|
681
676
|
};
|
|
682
|
-
protoOf(GammaTransferFunctions).
|
|
683
|
-
return spow(x, 1.0 / this.
|
|
677
|
+
protoOf(GammaTransferFunctions).q1y = function (x) {
|
|
678
|
+
return spow(x, 1.0 / this.r1y_1);
|
|
684
679
|
};
|
|
685
680
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
686
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
681
|
+
return 'GammaTransferFunctions(gamma=' + this.r1y_1 + ')';
|
|
687
682
|
};
|
|
688
683
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
689
|
-
return getNumberHashCode(this.
|
|
684
|
+
return getNumberHashCode(this.r1y_1);
|
|
690
685
|
};
|
|
691
686
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
692
687
|
if (this === other)
|
|
@@ -694,16 +689,16 @@
|
|
|
694
689
|
if (!(other instanceof GammaTransferFunctions))
|
|
695
690
|
return false;
|
|
696
691
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
697
|
-
if (!equals(this.
|
|
692
|
+
if (!equals(this.r1y_1, tmp0_other_with_cast.r1y_1))
|
|
698
693
|
return false;
|
|
699
694
|
return true;
|
|
700
695
|
};
|
|
701
696
|
function LinearTransferFunctions() {
|
|
702
697
|
}
|
|
703
|
-
protoOf(LinearTransferFunctions).
|
|
698
|
+
protoOf(LinearTransferFunctions).p1y = function (x) {
|
|
704
699
|
return x;
|
|
705
700
|
};
|
|
706
|
-
protoOf(LinearTransferFunctions).
|
|
701
|
+
protoOf(LinearTransferFunctions).q1y = function (x) {
|
|
707
702
|
return x;
|
|
708
703
|
};
|
|
709
704
|
var LinearTransferFunctions_instance;
|
|
@@ -714,43 +709,43 @@
|
|
|
714
709
|
}
|
|
715
710
|
function Companion_2() {
|
|
716
711
|
Companion_instance_2 = this;
|
|
717
|
-
this.
|
|
712
|
+
this.m1x_1 = RGBColorSpaces_getInstance().u1x_1;
|
|
718
713
|
}
|
|
719
|
-
protoOf(Companion_2).
|
|
720
|
-
return this.
|
|
714
|
+
protoOf(Companion_2).n1x = function (r, g, b, alpha) {
|
|
715
|
+
return this.m1x_1.n1x(r, g, b, alpha);
|
|
721
716
|
};
|
|
722
|
-
protoOf(Companion_2).
|
|
723
|
-
return this.
|
|
717
|
+
protoOf(Companion_2).s1y = function (r, g, b, alpha) {
|
|
718
|
+
return this.m1x_1.s1y(r, g, b, alpha);
|
|
724
719
|
};
|
|
725
|
-
protoOf(Companion_2).
|
|
726
|
-
return this.
|
|
720
|
+
protoOf(Companion_2).u1y = function (hex) {
|
|
721
|
+
return this.m1x_1.u1y(hex);
|
|
727
722
|
};
|
|
728
|
-
protoOf(Companion_2).
|
|
729
|
-
return this.
|
|
723
|
+
protoOf(Companion_2).t1y = function (r, g, b, alpha) {
|
|
724
|
+
return this.m1x_1.t1y(r, g, b, alpha);
|
|
730
725
|
};
|
|
731
|
-
protoOf(Companion_2).
|
|
732
|
-
return this.
|
|
726
|
+
protoOf(Companion_2).g1y = function () {
|
|
727
|
+
return this.m1x_1.g1y();
|
|
733
728
|
};
|
|
734
|
-
protoOf(Companion_2).
|
|
735
|
-
return this.
|
|
729
|
+
protoOf(Companion_2).v1y = function () {
|
|
730
|
+
return this.m1x_1.v1y();
|
|
736
731
|
};
|
|
737
|
-
protoOf(Companion_2).
|
|
738
|
-
return this.
|
|
732
|
+
protoOf(Companion_2).w1y = function () {
|
|
733
|
+
return this.m1x_1.w1y();
|
|
739
734
|
};
|
|
740
|
-
protoOf(Companion_2).
|
|
741
|
-
return this.
|
|
735
|
+
protoOf(Companion_2).x1y = function () {
|
|
736
|
+
return this.m1x_1.x1y();
|
|
742
737
|
};
|
|
743
|
-
protoOf(Companion_2).
|
|
744
|
-
return this.
|
|
738
|
+
protoOf(Companion_2).i13 = function () {
|
|
739
|
+
return this.m1x_1.i13();
|
|
745
740
|
};
|
|
746
|
-
protoOf(Companion_2).
|
|
747
|
-
return this.
|
|
741
|
+
protoOf(Companion_2).z1w = function () {
|
|
742
|
+
return this.m1x_1.z1w();
|
|
748
743
|
};
|
|
749
744
|
protoOf(Companion_2).equals = function (other) {
|
|
750
|
-
return equals(RGBColorSpaces_getInstance().
|
|
745
|
+
return equals(RGBColorSpaces_getInstance().u1x_1, other);
|
|
751
746
|
};
|
|
752
747
|
protoOf(Companion_2).hashCode = function () {
|
|
753
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
748
|
+
return hashCode(RGBColorSpaces_getInstance().u1x_1);
|
|
754
749
|
};
|
|
755
750
|
var Companion_instance_2;
|
|
756
751
|
function Companion_getInstance_2() {
|
|
@@ -759,163 +754,151 @@
|
|
|
759
754
|
return Companion_instance_2;
|
|
760
755
|
}
|
|
761
756
|
function clamp$copy(receiver, p0, p1, p2, p3) {
|
|
762
|
-
return receiver.
|
|
757
|
+
return receiver.y1y(p0, p1, p2, p3);
|
|
763
758
|
}
|
|
764
759
|
function RGB(r, g, b, alpha, space) {
|
|
765
760
|
Companion_getInstance_2();
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
768
|
-
this.
|
|
769
|
-
this.
|
|
770
|
-
this.
|
|
761
|
+
this.e1w_1 = r;
|
|
762
|
+
this.f1w_1 = g;
|
|
763
|
+
this.g1w_1 = b;
|
|
764
|
+
this.h1w_1 = alpha;
|
|
765
|
+
this.i1w_1 = space;
|
|
771
766
|
}
|
|
772
|
-
protoOf(RGB).
|
|
773
|
-
return this.
|
|
767
|
+
protoOf(RGB).b1w = function () {
|
|
768
|
+
return this.i1w_1;
|
|
774
769
|
};
|
|
775
|
-
protoOf(RGB).
|
|
770
|
+
protoOf(RGB).z1y = function () {
|
|
776
771
|
// Inline function 'kotlin.math.roundToInt' call
|
|
777
|
-
var this_0 = this.
|
|
772
|
+
var this_0 = this.e1w_1 * 255;
|
|
778
773
|
return roundToInt(this_0);
|
|
779
774
|
};
|
|
780
|
-
protoOf(RGB).
|
|
775
|
+
protoOf(RGB).a1z = function () {
|
|
781
776
|
// Inline function 'kotlin.math.roundToInt' call
|
|
782
|
-
var this_0 = this.
|
|
777
|
+
var this_0 = this.f1w_1 * 255;
|
|
783
778
|
return roundToInt(this_0);
|
|
784
779
|
};
|
|
785
|
-
protoOf(RGB).
|
|
780
|
+
protoOf(RGB).b1z = function () {
|
|
786
781
|
// Inline function 'kotlin.math.roundToInt' call
|
|
787
|
-
var this_0 = this.
|
|
782
|
+
var this_0 = this.g1w_1 * 255;
|
|
788
783
|
return roundToInt(this_0);
|
|
789
784
|
};
|
|
790
|
-
protoOf(RGB).
|
|
791
|
-
var f = SRGB_getInstance().
|
|
792
|
-
return equals(this.
|
|
785
|
+
protoOf(RGB).c1z = function (space) {
|
|
786
|
+
var f = SRGB_getInstance().g1y();
|
|
787
|
+
return equals(this.i1w_1, space) ? this : equals(this.i1w_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().v1x_1) ? space.n1x(f.p1y(this.e1w_1), f.p1y(this.f1w_1), f.p1y(this.g1w_1), this.h1w_1) : equals(this.i1w_1, RGBColorSpaces_getInstance().v1x_1) && equals(space, SRGB_getInstance()) ? space.n1x(f.q1y(this.e1w_1), f.q1y(this.f1w_1), f.q1y(this.g1w_1), this.h1w_1) : this.d1w().i1z(space);
|
|
793
788
|
};
|
|
794
|
-
protoOf(RGB).
|
|
789
|
+
protoOf(RGB).j1z = function () {
|
|
795
790
|
var tmp$ret$3;
|
|
796
791
|
$l$block: {
|
|
797
792
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
798
793
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
799
|
-
var $this$toSRGB = this.
|
|
800
|
-
var r = $this$toSRGB.
|
|
801
|
-
var g = $this$toSRGB.
|
|
802
|
-
var b = $this$toSRGB.
|
|
794
|
+
var $this$toSRGB = this.c1z(SRGB_getInstance());
|
|
795
|
+
var r = $this$toSRGB.e1w_1;
|
|
796
|
+
var g = $this$toSRGB.f1w_1;
|
|
797
|
+
var b = $this$toSRGB.g1w_1;
|
|
803
798
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
804
799
|
var min = Math.min(r, g, b);
|
|
805
800
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
806
801
|
var max = Math.max(r, g, b);
|
|
807
802
|
var chroma = max - min;
|
|
808
|
-
var
|
|
809
|
-
if (chroma < 1.0E-7) {
|
|
810
|
-
tmp = NaN;
|
|
811
|
-
} else if (r === max) {
|
|
812
|
-
tmp = (g - b) / chroma;
|
|
813
|
-
} else if (g === max) {
|
|
814
|
-
tmp = 2 + (b - r) / chroma;
|
|
815
|
-
} else if (b === max) {
|
|
816
|
-
tmp = 4 + (r - g) / chroma;
|
|
817
|
-
} else {
|
|
818
|
-
tmp = 0.0;
|
|
819
|
-
}
|
|
820
|
-
var h = tmp * 60;
|
|
803
|
+
var h = (chroma < 1.0E-7 ? NaN : r === max ? (g - b) / chroma : g === max ? 2 + (b - r) / chroma : b === max ? 4 + (r - g) / chroma : 0.0) * 60;
|
|
821
804
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
822
805
|
var h_0 = normalizeDeg(h);
|
|
823
806
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
824
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
807
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.h1w_1);
|
|
825
808
|
break $l$block;
|
|
826
809
|
}
|
|
827
810
|
return tmp$ret$3;
|
|
828
811
|
};
|
|
829
|
-
protoOf(RGB).
|
|
830
|
-
var f = this.
|
|
812
|
+
protoOf(RGB).d1w = function () {
|
|
813
|
+
var f = this.i1w_1.g1y();
|
|
831
814
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
832
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
833
|
-
var v0 = f.
|
|
834
|
-
var v1 = f.
|
|
835
|
-
var v2 = f.
|
|
815
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.i1w_1.v1y());
|
|
816
|
+
var v0 = f.p1y(this.e1w_1);
|
|
817
|
+
var v1 = f.p1y(this.f1w_1);
|
|
818
|
+
var v2 = f.p1y(this.g1w_1);
|
|
836
819
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
837
820
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
838
821
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
839
822
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
840
|
-
return XYZColorSpace_0(this.
|
|
823
|
+
return XYZColorSpace_0(this.i1w_1.x1y()).n1x(x, y, z, this.h1w_1);
|
|
841
824
|
};
|
|
842
|
-
protoOf(RGB).
|
|
825
|
+
protoOf(RGB).f1x = function () {
|
|
843
826
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
844
|
-
var $this$toSRGB = this.
|
|
827
|
+
var $this$toSRGB = this.c1z(SRGB_getInstance());
|
|
845
828
|
// Inline function 'kotlin.math.roundToInt' call
|
|
846
|
-
var this_0 = $this$toSRGB.
|
|
829
|
+
var this_0 = $this$toSRGB.j1z().k1x_1 * 100;
|
|
847
830
|
var value = roundToInt(this_0);
|
|
848
831
|
if (value === 30)
|
|
849
832
|
return new Ansi16(30);
|
|
850
833
|
var v = value / 50 | 0;
|
|
851
834
|
// Inline function 'kotlin.math.roundToInt' call
|
|
852
|
-
var this_1 = $this$toSRGB.
|
|
835
|
+
var this_1 = $this$toSRGB.g1w_1;
|
|
853
836
|
var tmp$ret$1 = roundToInt(this_1);
|
|
854
837
|
var tmp = imul(tmp$ret$1, 4);
|
|
855
838
|
// Inline function 'kotlin.math.roundToInt' call
|
|
856
|
-
var this_2 = $this$toSRGB.
|
|
839
|
+
var this_2 = $this$toSRGB.f1w_1;
|
|
857
840
|
var tmp$ret$2 = roundToInt(this_2);
|
|
858
841
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
859
842
|
// Inline function 'kotlin.math.roundToInt' call
|
|
860
|
-
var this_3 = $this$toSRGB.
|
|
843
|
+
var this_3 = $this$toSRGB.e1w_1;
|
|
861
844
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
862
845
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
863
846
|
};
|
|
864
|
-
protoOf(RGB).
|
|
847
|
+
protoOf(RGB).k1z = function () {
|
|
865
848
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
866
|
-
var $this$toSRGB = this.
|
|
867
|
-
var ri = $this$toSRGB.
|
|
868
|
-
var gi = $this$toSRGB.
|
|
869
|
-
var bi = $this$toSRGB.
|
|
849
|
+
var $this$toSRGB = this.c1z(SRGB_getInstance());
|
|
850
|
+
var ri = $this$toSRGB.z1y();
|
|
851
|
+
var gi = $this$toSRGB.a1z();
|
|
852
|
+
var bi = $this$toSRGB.b1z();
|
|
870
853
|
var tmp;
|
|
871
854
|
if (ri === gi && gi === bi) {
|
|
872
855
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
873
856
|
} else {
|
|
874
857
|
// Inline function 'kotlin.math.roundToInt' call
|
|
875
|
-
var this_0 = $this$toSRGB.
|
|
858
|
+
var this_0 = $this$toSRGB.e1w_1 * 5;
|
|
876
859
|
var tmp$ret$0 = roundToInt(this_0);
|
|
877
860
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
878
861
|
// Inline function 'kotlin.math.roundToInt' call
|
|
879
|
-
var this_1 = $this$toSRGB.
|
|
862
|
+
var this_1 = $this$toSRGB.f1w_1 * 5;
|
|
880
863
|
var tmp$ret$1 = roundToInt(this_1);
|
|
881
864
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
882
865
|
// Inline function 'kotlin.math.roundToInt' call
|
|
883
|
-
var this_2 = $this$toSRGB.
|
|
866
|
+
var this_2 = $this$toSRGB.g1w_1 * 5;
|
|
884
867
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
885
868
|
}
|
|
886
869
|
var code = tmp;
|
|
887
870
|
return new Ansi256(code);
|
|
888
871
|
};
|
|
889
|
-
protoOf(RGB).
|
|
890
|
-
return this.
|
|
872
|
+
protoOf(RGB).c1w = function () {
|
|
873
|
+
return this.c1z(RGBColorSpaces_getInstance().u1x_1);
|
|
891
874
|
};
|
|
892
|
-
protoOf(RGB).
|
|
875
|
+
protoOf(RGB).l1z = function () {
|
|
893
876
|
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
894
|
-
var v1 = this.
|
|
895
|
-
var v2 = this.
|
|
896
|
-
var v3 = this.
|
|
897
|
-
var alpha = this.
|
|
898
|
-
var
|
|
877
|
+
var v1 = this.e1w_1;
|
|
878
|
+
var v2 = this.f1w_1;
|
|
879
|
+
var v3 = this.g1w_1;
|
|
880
|
+
var alpha = this.h1w_1;
|
|
881
|
+
var _destruct__k2r9zo = this.b1w().z1w();
|
|
899
882
|
// Inline function 'kotlin.collections.component1' call
|
|
900
|
-
var c1 =
|
|
883
|
+
var c1 = _destruct__k2r9zo.q(0);
|
|
901
884
|
// Inline function 'kotlin.collections.component2' call
|
|
902
|
-
var c2 =
|
|
885
|
+
var c2 = _destruct__k2r9zo.q(1);
|
|
903
886
|
// Inline function 'kotlin.collections.component3' call
|
|
904
|
-
var c3 =
|
|
887
|
+
var c3 = _destruct__k2r9zo.q(2);
|
|
905
888
|
var tmp;
|
|
906
889
|
var tmp_0;
|
|
907
890
|
var tmp_1;
|
|
908
891
|
var tmp_2;
|
|
909
|
-
var containsLower = c1.
|
|
910
|
-
if (v1 <= c1.
|
|
911
|
-
var containsLower_0 = c2.
|
|
912
|
-
tmp_2 = v2 <= c2.
|
|
892
|
+
var containsLower = c1.l1w_1;
|
|
893
|
+
if (v1 <= c1.m1w_1 ? containsLower <= v1 : false) {
|
|
894
|
+
var containsLower_0 = c2.l1w_1;
|
|
895
|
+
tmp_2 = v2 <= c2.m1w_1 ? containsLower_0 <= v2 : false;
|
|
913
896
|
} else {
|
|
914
897
|
tmp_2 = false;
|
|
915
898
|
}
|
|
916
899
|
if (tmp_2) {
|
|
917
|
-
var containsLower_1 = c3.
|
|
918
|
-
tmp_1 = v3 <= c3.
|
|
900
|
+
var containsLower_1 = c3.l1w_1;
|
|
901
|
+
tmp_1 = v3 <= c3.m1w_1 ? containsLower_1 <= v3 : false;
|
|
919
902
|
} else {
|
|
920
903
|
tmp_1 = false;
|
|
921
904
|
}
|
|
@@ -927,30 +910,30 @@
|
|
|
927
910
|
if (tmp_0) {
|
|
928
911
|
tmp = this;
|
|
929
912
|
} else {
|
|
930
|
-
tmp = clamp$copy(this, coerceIn(v1, c1.
|
|
913
|
+
tmp = clamp$copy(this, coerceIn(v1, c1.l1w_1, c1.m1w_1), coerceIn(v2, c2.l1w_1, c2.m1w_1), coerceIn(v3, c3.l1w_1, c3.m1w_1), coerceIn(alpha, 0.0, 1.0));
|
|
931
914
|
}
|
|
932
915
|
return tmp;
|
|
933
916
|
};
|
|
934
|
-
protoOf(RGB).
|
|
917
|
+
protoOf(RGB).m1z = function (r, g, b, alpha, space) {
|
|
935
918
|
return new RGB(r, g, b, alpha, space);
|
|
936
919
|
};
|
|
937
|
-
protoOf(RGB).
|
|
938
|
-
r = r === VOID ? this.
|
|
939
|
-
g = g === VOID ? this.
|
|
940
|
-
b = b === VOID ? this.
|
|
941
|
-
alpha = alpha === VOID ? this.
|
|
942
|
-
space = space === VOID ? this.
|
|
943
|
-
return $super === VOID ? this.
|
|
920
|
+
protoOf(RGB).y1y = function (r, g, b, alpha, space, $super) {
|
|
921
|
+
r = r === VOID ? this.e1w_1 : r;
|
|
922
|
+
g = g === VOID ? this.f1w_1 : g;
|
|
923
|
+
b = b === VOID ? this.g1w_1 : b;
|
|
924
|
+
alpha = alpha === VOID ? this.h1w_1 : alpha;
|
|
925
|
+
space = space === VOID ? this.i1w_1 : space;
|
|
926
|
+
return $super === VOID ? this.m1z(r, g, b, alpha, space) : $super.m1z.call(this, r, g, b, alpha, space);
|
|
944
927
|
};
|
|
945
928
|
protoOf(RGB).toString = function () {
|
|
946
|
-
return 'RGB(r=' + this.
|
|
929
|
+
return 'RGB(r=' + this.e1w_1 + ', g=' + this.f1w_1 + ', b=' + this.g1w_1 + ', alpha=' + this.h1w_1 + ', space=' + toString(this.i1w_1) + ')';
|
|
947
930
|
};
|
|
948
931
|
protoOf(RGB).hashCode = function () {
|
|
949
|
-
var result = getNumberHashCode(this.
|
|
950
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
951
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
952
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
953
|
-
result = imul(result, 31) + hashCode(this.
|
|
932
|
+
var result = getNumberHashCode(this.e1w_1);
|
|
933
|
+
result = imul(result, 31) + getNumberHashCode(this.f1w_1) | 0;
|
|
934
|
+
result = imul(result, 31) + getNumberHashCode(this.g1w_1) | 0;
|
|
935
|
+
result = imul(result, 31) + getNumberHashCode(this.h1w_1) | 0;
|
|
936
|
+
result = imul(result, 31) + hashCode(this.i1w_1) | 0;
|
|
954
937
|
return result;
|
|
955
938
|
};
|
|
956
939
|
protoOf(RGB).equals = function (other) {
|
|
@@ -959,15 +942,15 @@
|
|
|
959
942
|
if (!(other instanceof RGB))
|
|
960
943
|
return false;
|
|
961
944
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
962
|
-
if (!equals(this.
|
|
945
|
+
if (!equals(this.e1w_1, tmp0_other_with_cast.e1w_1))
|
|
963
946
|
return false;
|
|
964
|
-
if (!equals(this.
|
|
947
|
+
if (!equals(this.f1w_1, tmp0_other_with_cast.f1w_1))
|
|
965
948
|
return false;
|
|
966
|
-
if (!equals(this.
|
|
949
|
+
if (!equals(this.g1w_1, tmp0_other_with_cast.g1w_1))
|
|
967
950
|
return false;
|
|
968
|
-
if (!equals(this.
|
|
951
|
+
if (!equals(this.h1w_1, tmp0_other_with_cast.h1w_1))
|
|
969
952
|
return false;
|
|
970
|
-
if (!equals(this.
|
|
953
|
+
if (!equals(this.i1w_1, tmp0_other_with_cast.i1w_1))
|
|
971
954
|
return false;
|
|
972
955
|
return true;
|
|
973
956
|
};
|
|
@@ -1067,18 +1050,18 @@
|
|
|
1067
1050
|
return ACES_AP1_B;
|
|
1068
1051
|
}
|
|
1069
1052
|
var ACES_AP1_B;
|
|
1070
|
-
function RGBColorSpaces$SRGB$lambda($this
|
|
1071
|
-
return it.
|
|
1053
|
+
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1054
|
+
return it.c1w();
|
|
1072
1055
|
}
|
|
1073
|
-
function RGBColorSpaces$BT2020$lambda($this
|
|
1056
|
+
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1074
1057
|
var tmp;
|
|
1075
1058
|
if (color instanceof RGB) {
|
|
1076
|
-
tmp = color.
|
|
1059
|
+
tmp = color.c1z($this$RGBColorSpaceImpl);
|
|
1077
1060
|
} else {
|
|
1078
1061
|
if (color instanceof ICtCp) {
|
|
1079
|
-
tmp = color.
|
|
1062
|
+
tmp = color.t1x();
|
|
1080
1063
|
} else {
|
|
1081
|
-
tmp = color.
|
|
1064
|
+
tmp = color.d1w().i1z($this$RGBColorSpaceImpl);
|
|
1082
1065
|
}
|
|
1083
1066
|
}
|
|
1084
1067
|
return tmp;
|
|
@@ -1086,29 +1069,29 @@
|
|
|
1086
1069
|
function RGBColorSpaces() {
|
|
1087
1070
|
RGBColorSpaces_instance = this;
|
|
1088
1071
|
var tmp = this;
|
|
1089
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1072
|
+
var tmp_0 = Illuminant_getInstance().u1w_1;
|
|
1090
1073
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1091
1074
|
var tmp_2 = get_SRGB_R();
|
|
1092
1075
|
var tmp_3 = get_SRGB_G();
|
|
1093
1076
|
var tmp_4 = get_SRGB_B();
|
|
1094
|
-
tmp.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1100
|
-
this.
|
|
1077
|
+
tmp.u1x_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1078
|
+
this.v1x_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().u1w_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1079
|
+
this.w1x_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1080
|
+
this.x1x_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1081
|
+
this.y1x_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1082
|
+
this.z1x_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1083
|
+
this.a1y_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().u1w_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));
|
|
1101
1084
|
var tmp_5 = this;
|
|
1102
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1085
|
+
var tmp_6 = Illuminant_getInstance().u1w_1;
|
|
1103
1086
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1104
1087
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1105
1088
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1106
1089
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1107
|
-
tmp_5.
|
|
1108
|
-
this.
|
|
1109
|
-
this.
|
|
1110
|
-
this.
|
|
1111
|
-
this.
|
|
1090
|
+
tmp_5.b1y_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1091
|
+
this.c1y_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().u1w_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1092
|
+
this.d1y_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));
|
|
1093
|
+
this.e1y_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().u1w_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1094
|
+
this.f1y_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().s1w_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1112
1095
|
}
|
|
1113
1096
|
var RGBColorSpaces_instance;
|
|
1114
1097
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1118,43 +1101,43 @@
|
|
|
1118
1101
|
}
|
|
1119
1102
|
function SRGB() {
|
|
1120
1103
|
SRGB_instance = this;
|
|
1121
|
-
this.
|
|
1104
|
+
this.o1x_1 = RGBColorSpaces_getInstance().u1x_1;
|
|
1122
1105
|
}
|
|
1123
|
-
protoOf(SRGB).
|
|
1124
|
-
return this.
|
|
1106
|
+
protoOf(SRGB).n1x = function (r, g, b, alpha) {
|
|
1107
|
+
return this.o1x_1.n1x(r, g, b, alpha);
|
|
1125
1108
|
};
|
|
1126
|
-
protoOf(SRGB).
|
|
1127
|
-
return this.
|
|
1109
|
+
protoOf(SRGB).s1y = function (r, g, b, alpha) {
|
|
1110
|
+
return this.o1x_1.s1y(r, g, b, alpha);
|
|
1128
1111
|
};
|
|
1129
|
-
protoOf(SRGB).
|
|
1130
|
-
return this.
|
|
1112
|
+
protoOf(SRGB).u1y = function (hex) {
|
|
1113
|
+
return this.o1x_1.u1y(hex);
|
|
1131
1114
|
};
|
|
1132
|
-
protoOf(SRGB).
|
|
1133
|
-
return this.
|
|
1115
|
+
protoOf(SRGB).t1y = function (r, g, b, alpha) {
|
|
1116
|
+
return this.o1x_1.t1y(r, g, b, alpha);
|
|
1134
1117
|
};
|
|
1135
|
-
protoOf(SRGB).
|
|
1136
|
-
return this.
|
|
1118
|
+
protoOf(SRGB).g1y = function () {
|
|
1119
|
+
return this.o1x_1.g1y();
|
|
1137
1120
|
};
|
|
1138
|
-
protoOf(SRGB).
|
|
1139
|
-
return this.
|
|
1121
|
+
protoOf(SRGB).v1y = function () {
|
|
1122
|
+
return this.o1x_1.v1y();
|
|
1140
1123
|
};
|
|
1141
|
-
protoOf(SRGB).
|
|
1142
|
-
return this.
|
|
1124
|
+
protoOf(SRGB).w1y = function () {
|
|
1125
|
+
return this.o1x_1.w1y();
|
|
1143
1126
|
};
|
|
1144
|
-
protoOf(SRGB).
|
|
1145
|
-
return this.
|
|
1127
|
+
protoOf(SRGB).x1y = function () {
|
|
1128
|
+
return this.o1x_1.x1y();
|
|
1146
1129
|
};
|
|
1147
|
-
protoOf(SRGB).
|
|
1148
|
-
return this.
|
|
1130
|
+
protoOf(SRGB).i13 = function () {
|
|
1131
|
+
return this.o1x_1.i13();
|
|
1149
1132
|
};
|
|
1150
|
-
protoOf(SRGB).
|
|
1151
|
-
return this.
|
|
1133
|
+
protoOf(SRGB).z1w = function () {
|
|
1134
|
+
return this.o1x_1.z1w();
|
|
1152
1135
|
};
|
|
1153
1136
|
protoOf(SRGB).equals = function (other) {
|
|
1154
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1137
|
+
return equals(RGBColorSpaces_getInstance().u1x_1, other);
|
|
1155
1138
|
};
|
|
1156
1139
|
protoOf(SRGB).hashCode = function () {
|
|
1157
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1140
|
+
return hashCode(RGBColorSpaces_getInstance().u1x_1);
|
|
1158
1141
|
};
|
|
1159
1142
|
protoOf(SRGB).toString = function () {
|
|
1160
1143
|
return 'sRGB';
|
|
@@ -1166,39 +1149,39 @@
|
|
|
1166
1149
|
return SRGB_instance;
|
|
1167
1150
|
}
|
|
1168
1151
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1169
|
-
this.
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1172
|
-
this.
|
|
1173
|
-
this.
|
|
1174
|
-
this.
|
|
1175
|
-
this.
|
|
1176
|
-
this.
|
|
1177
|
-
this.
|
|
1178
|
-
this.
|
|
1152
|
+
this.n1z_1 = name;
|
|
1153
|
+
this.o1z_1 = whitePoint;
|
|
1154
|
+
this.p1z_1 = transferFunctions;
|
|
1155
|
+
this.q1z_1 = r;
|
|
1156
|
+
this.r1z_1 = g;
|
|
1157
|
+
this.s1z_1 = b;
|
|
1158
|
+
this.t1z_1 = convertImpl;
|
|
1159
|
+
this.u1z_1 = zeroOneComponentInfo('RGB');
|
|
1160
|
+
this.v1z_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.o1z_1, this.q1z_1, this.r1z_1, this.s1z_1));
|
|
1161
|
+
this.w1z_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.v1z_1)));
|
|
1179
1162
|
}
|
|
1180
|
-
protoOf(RGBColorSpaceImpl).
|
|
1181
|
-
return this.
|
|
1163
|
+
protoOf(RGBColorSpaceImpl).i13 = function () {
|
|
1164
|
+
return this.n1z_1;
|
|
1182
1165
|
};
|
|
1183
|
-
protoOf(RGBColorSpaceImpl).
|
|
1184
|
-
return this.
|
|
1166
|
+
protoOf(RGBColorSpaceImpl).x1y = function () {
|
|
1167
|
+
return this.o1z_1;
|
|
1185
1168
|
};
|
|
1186
|
-
protoOf(RGBColorSpaceImpl).
|
|
1187
|
-
return this.
|
|
1169
|
+
protoOf(RGBColorSpaceImpl).g1y = function () {
|
|
1170
|
+
return this.p1z_1;
|
|
1188
1171
|
};
|
|
1189
|
-
protoOf(RGBColorSpaceImpl).
|
|
1190
|
-
return this.
|
|
1172
|
+
protoOf(RGBColorSpaceImpl).z1w = function () {
|
|
1173
|
+
return this.u1z_1;
|
|
1191
1174
|
};
|
|
1192
|
-
protoOf(RGBColorSpaceImpl).
|
|
1193
|
-
return this.
|
|
1175
|
+
protoOf(RGBColorSpaceImpl).v1y = function () {
|
|
1176
|
+
return this.v1z_1;
|
|
1194
1177
|
};
|
|
1195
|
-
protoOf(RGBColorSpaceImpl).
|
|
1196
|
-
return this.
|
|
1178
|
+
protoOf(RGBColorSpaceImpl).w1y = function () {
|
|
1179
|
+
return this.w1z_1;
|
|
1197
1180
|
};
|
|
1198
1181
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1199
|
-
return this.
|
|
1182
|
+
return this.n1z_1;
|
|
1200
1183
|
};
|
|
1201
|
-
protoOf(RGBColorSpaceImpl).
|
|
1184
|
+
protoOf(RGBColorSpaceImpl).n1x = function (r, g, b, alpha) {
|
|
1202
1185
|
return new RGB(r, g, b, alpha, this);
|
|
1203
1186
|
};
|
|
1204
1187
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1206,42 +1189,42 @@
|
|
|
1206
1189
|
return true;
|
|
1207
1190
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1208
1191
|
return false;
|
|
1209
|
-
if (!(this.
|
|
1192
|
+
if (!(this.n1z_1 === other.i13()))
|
|
1210
1193
|
return false;
|
|
1211
|
-
if (!this.
|
|
1194
|
+
if (!this.o1z_1.equals(other.x1y()))
|
|
1212
1195
|
return false;
|
|
1213
|
-
if (!equals(this.
|
|
1196
|
+
if (!equals(this.p1z_1, other.g1y()))
|
|
1214
1197
|
return false;
|
|
1215
1198
|
if (other instanceof RGBColorSpaceImpl) {
|
|
1216
|
-
if (!this.
|
|
1199
|
+
if (!this.q1z_1.equals(other.q1z_1))
|
|
1217
1200
|
return false;
|
|
1218
|
-
if (!this.
|
|
1201
|
+
if (!this.r1z_1.equals(other.r1z_1))
|
|
1219
1202
|
return false;
|
|
1220
|
-
if (!this.
|
|
1203
|
+
if (!this.s1z_1.equals(other.s1z_1))
|
|
1221
1204
|
return false;
|
|
1222
1205
|
} else {
|
|
1223
|
-
if (!contentEquals(this.
|
|
1206
|
+
if (!contentEquals(this.v1z_1, other.v1y()))
|
|
1224
1207
|
return false;
|
|
1225
|
-
if (!contentEquals(this.
|
|
1208
|
+
if (!contentEquals(this.w1z_1, other.w1y()))
|
|
1226
1209
|
return false;
|
|
1227
1210
|
}
|
|
1228
1211
|
return true;
|
|
1229
1212
|
};
|
|
1230
1213
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1231
|
-
var result = getStringHashCode(this.
|
|
1232
|
-
result = imul(31, result) + this.
|
|
1233
|
-
result = imul(31, result) + hashCode(this.
|
|
1234
|
-
result = imul(31, result) + this.
|
|
1235
|
-
result = imul(31, result) + this.
|
|
1236
|
-
result = imul(31, result) + this.
|
|
1214
|
+
var result = getStringHashCode(this.n1z_1);
|
|
1215
|
+
result = imul(31, result) + this.o1z_1.hashCode() | 0;
|
|
1216
|
+
result = imul(31, result) + hashCode(this.p1z_1) | 0;
|
|
1217
|
+
result = imul(31, result) + this.q1z_1.hashCode() | 0;
|
|
1218
|
+
result = imul(31, result) + this.r1z_1.hashCode() | 0;
|
|
1219
|
+
result = imul(31, result) + this.s1z_1.hashCode() | 0;
|
|
1237
1220
|
return result;
|
|
1238
1221
|
};
|
|
1239
1222
|
function SRGBTransferFunctions() {
|
|
1240
1223
|
}
|
|
1241
|
-
protoOf(SRGBTransferFunctions).
|
|
1224
|
+
protoOf(SRGBTransferFunctions).q1y = function (x) {
|
|
1242
1225
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1243
1226
|
};
|
|
1244
|
-
protoOf(SRGBTransferFunctions).
|
|
1227
|
+
protoOf(SRGBTransferFunctions).p1y = function (x) {
|
|
1245
1228
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1246
1229
|
};
|
|
1247
1230
|
var SRGBTransferFunctions_instance;
|
|
@@ -1254,39 +1237,30 @@
|
|
|
1254
1237
|
}
|
|
1255
1238
|
function ACESccTransferFunctions() {
|
|
1256
1239
|
ACESccTransferFunctions_instance = this;
|
|
1257
|
-
this.
|
|
1258
|
-
this.
|
|
1259
|
-
this.
|
|
1240
|
+
this.x1z_1 = 3.0517578125E-5;
|
|
1241
|
+
this.y1z_1 = 1.52587890625E-5;
|
|
1242
|
+
this.z1z_1 = -0.3013698630136986;
|
|
1260
1243
|
var tmp = this;
|
|
1261
1244
|
// Inline function 'kotlin.math.log2' call
|
|
1262
|
-
tmp.
|
|
1245
|
+
tmp.a20_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1263
1246
|
}
|
|
1264
|
-
protoOf(ACESccTransferFunctions).
|
|
1247
|
+
protoOf(ACESccTransferFunctions).p1y = function (x) {
|
|
1265
1248
|
var tmp;
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
if (
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
tmp = (
|
|
1249
|
+
if (x <= -0.3013698630136986) {
|
|
1250
|
+
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1251
|
+
} else if (x < this.a20_1) {
|
|
1252
|
+
// Inline function 'kotlin.math.pow' call
|
|
1253
|
+
var x_0 = x * 17.52 - 9.72;
|
|
1254
|
+
tmp = Math.pow(2.0, x_0);
|
|
1272
1255
|
} else {
|
|
1273
|
-
|
|
1274
|
-
// Inline function 'kotlin.math.pow' call
|
|
1275
|
-
var x_0 = x * 17.52 - 9.72;
|
|
1276
|
-
tmp = Math.pow(2.0, x_0);
|
|
1277
|
-
} else {
|
|
1278
|
-
tmp = 65504.0;
|
|
1279
|
-
}
|
|
1256
|
+
tmp = 65504.0;
|
|
1280
1257
|
}
|
|
1281
1258
|
return tmp;
|
|
1282
1259
|
};
|
|
1283
|
-
protoOf(ACESccTransferFunctions).
|
|
1260
|
+
protoOf(ACESccTransferFunctions).q1y = function (x) {
|
|
1284
1261
|
var tmp;
|
|
1285
|
-
|
|
1286
|
-
ACESccTransferFunctions_getInstance();
|
|
1287
|
-
if (tmp_0 < 3.0517578125E-5) {
|
|
1262
|
+
if (x < 3.0517578125E-5) {
|
|
1288
1263
|
// Inline function 'kotlin.math.log2' call
|
|
1289
|
-
ACESccTransferFunctions_getInstance();
|
|
1290
1264
|
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
1291
1265
|
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
1292
1266
|
} else {
|
|
@@ -1303,20 +1277,17 @@
|
|
|
1303
1277
|
}
|
|
1304
1278
|
function ACEScctTransferFunctions() {
|
|
1305
1279
|
ACEScctTransferFunctions_instance = this;
|
|
1306
|
-
this.
|
|
1307
|
-
this.
|
|
1280
|
+
this.b20_1 = 10.5402377416545;
|
|
1281
|
+
this.c20_1 = 0.0729055341958355;
|
|
1308
1282
|
var tmp = this;
|
|
1309
1283
|
// Inline function 'kotlin.math.log2' call
|
|
1310
|
-
tmp.
|
|
1284
|
+
tmp.d20_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1311
1285
|
}
|
|
1312
|
-
protoOf(ACEScctTransferFunctions).
|
|
1286
|
+
protoOf(ACEScctTransferFunctions).p1y = function (x) {
|
|
1313
1287
|
var tmp;
|
|
1314
1288
|
if (x <= 0.155251141552511) {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
ACEScctTransferFunctions_getInstance();
|
|
1318
|
-
tmp = tmp_0 / 10.5402377416545;
|
|
1319
|
-
} else if (x < this.r1g_1) {
|
|
1289
|
+
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1290
|
+
} else if (x < this.d20_1) {
|
|
1320
1291
|
// Inline function 'kotlin.math.pow' call
|
|
1321
1292
|
var x_0 = x * 17.52 - 9.72;
|
|
1322
1293
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1325,13 +1296,10 @@
|
|
|
1325
1296
|
}
|
|
1326
1297
|
return tmp;
|
|
1327
1298
|
};
|
|
1328
|
-
protoOf(ACEScctTransferFunctions).
|
|
1299
|
+
protoOf(ACEScctTransferFunctions).q1y = function (x) {
|
|
1329
1300
|
var tmp;
|
|
1330
1301
|
if (x < 0.0078125) {
|
|
1331
|
-
|
|
1332
|
-
var tmp_0 = 10.5402377416545 * x;
|
|
1333
|
-
ACEScctTransferFunctions_getInstance();
|
|
1334
|
-
tmp = tmp_0 + 0.0729055341958355;
|
|
1302
|
+
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
1335
1303
|
} else {
|
|
1336
1304
|
// Inline function 'kotlin.math.log2' call
|
|
1337
1305
|
tmp = (log2(x) + 9.72) / 17.52;
|
|
@@ -1346,41 +1314,17 @@
|
|
|
1346
1314
|
}
|
|
1347
1315
|
function BT2020TransferFunctions() {
|
|
1348
1316
|
BT2020TransferFunctions_instance = this;
|
|
1349
|
-
this.
|
|
1350
|
-
this.
|
|
1317
|
+
this.e20_1 = 1.0993;
|
|
1318
|
+
this.f20_1 = 0.0181;
|
|
1351
1319
|
var tmp = this;
|
|
1352
|
-
BT2020TransferFunctions_getInstance();
|
|
1353
1320
|
// Inline function 'kotlin.math.pow' call
|
|
1354
|
-
|
|
1355
|
-
var tmp_0 = 1.0993 * Math.pow(0.0181, 0.45);
|
|
1356
|
-
BT2020TransferFunctions_getInstance();
|
|
1357
|
-
tmp.u1g_1 = tmp_0 - (1.0993 - 1);
|
|
1321
|
+
tmp.g20_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1358
1322
|
}
|
|
1359
|
-
protoOf(BT2020TransferFunctions).
|
|
1360
|
-
|
|
1361
|
-
if (x < this.u1g_1) {
|
|
1362
|
-
tmp = x / 4.5;
|
|
1363
|
-
} else {
|
|
1364
|
-
BT2020TransferFunctions_getInstance();
|
|
1365
|
-
var tmp_0 = x + (1.0993 - 1);
|
|
1366
|
-
BT2020TransferFunctions_getInstance();
|
|
1367
|
-
tmp = spow_0(tmp_0 / 1.0993, 1 / 0.45);
|
|
1368
|
-
}
|
|
1369
|
-
return numberToDouble(tmp);
|
|
1323
|
+
protoOf(BT2020TransferFunctions).p1y = function (x) {
|
|
1324
|
+
return numberToDouble(x < this.g20_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1370
1325
|
};
|
|
1371
|
-
protoOf(BT2020TransferFunctions).
|
|
1372
|
-
|
|
1373
|
-
var tmp_0 = x;
|
|
1374
|
-
BT2020TransferFunctions_getInstance();
|
|
1375
|
-
if (tmp_0 < 0.0181) {
|
|
1376
|
-
tmp = 4.5 * x;
|
|
1377
|
-
} else {
|
|
1378
|
-
BT2020TransferFunctions_getInstance();
|
|
1379
|
-
var tmp_1 = 1.0993 * spow(x, 0.45);
|
|
1380
|
-
BT2020TransferFunctions_getInstance();
|
|
1381
|
-
tmp = tmp_1 - (1.0993 - 1);
|
|
1382
|
-
}
|
|
1383
|
-
return tmp;
|
|
1326
|
+
protoOf(BT2020TransferFunctions).q1y = function (x) {
|
|
1327
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1384
1328
|
};
|
|
1385
1329
|
var BT2020TransferFunctions_instance;
|
|
1386
1330
|
function BT2020TransferFunctions_getInstance() {
|
|
@@ -1390,12 +1334,12 @@
|
|
|
1390
1334
|
}
|
|
1391
1335
|
function BT709TransferFunctions() {
|
|
1392
1336
|
BT709TransferFunctions_instance = this;
|
|
1393
|
-
this.
|
|
1337
|
+
this.h20_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1394
1338
|
}
|
|
1395
|
-
protoOf(BT709TransferFunctions).
|
|
1396
|
-
return numberToDouble(x < this.
|
|
1339
|
+
protoOf(BT709TransferFunctions).p1y = function (x) {
|
|
1340
|
+
return numberToDouble(x < this.h20_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1397
1341
|
};
|
|
1398
|
-
protoOf(BT709TransferFunctions).
|
|
1342
|
+
protoOf(BT709TransferFunctions).q1y = function (x) {
|
|
1399
1343
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1400
1344
|
};
|
|
1401
1345
|
var BT709TransferFunctions_instance;
|
|
@@ -1405,27 +1349,13 @@
|
|
|
1405
1349
|
return BT709TransferFunctions_instance;
|
|
1406
1350
|
}
|
|
1407
1351
|
function ROMMTransferFunctions() {
|
|
1408
|
-
this.
|
|
1352
|
+
this.i20_1 = 0.001953;
|
|
1409
1353
|
}
|
|
1410
|
-
protoOf(ROMMTransferFunctions).
|
|
1411
|
-
|
|
1412
|
-
var tmp_0 = x;
|
|
1413
|
-
if (tmp_0 < 16 * 0.001953) {
|
|
1414
|
-
tmp = x / 16.0;
|
|
1415
|
-
} else {
|
|
1416
|
-
tmp = spow(x, 1.8);
|
|
1417
|
-
}
|
|
1418
|
-
return tmp;
|
|
1354
|
+
protoOf(ROMMTransferFunctions).p1y = function (x) {
|
|
1355
|
+
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1419
1356
|
};
|
|
1420
|
-
protoOf(ROMMTransferFunctions).
|
|
1421
|
-
|
|
1422
|
-
var tmp_0 = x;
|
|
1423
|
-
if (tmp_0 < 0.001953) {
|
|
1424
|
-
tmp = x * 16.0;
|
|
1425
|
-
} else {
|
|
1426
|
-
tmp = spow(x, 1.0 / 1.8);
|
|
1427
|
-
}
|
|
1428
|
-
return tmp;
|
|
1357
|
+
protoOf(ROMMTransferFunctions).q1y = function (x) {
|
|
1358
|
+
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1429
1359
|
};
|
|
1430
1360
|
var ROMMTransferFunctions_instance;
|
|
1431
1361
|
function ROMMTransferFunctions_getInstance() {
|
|
@@ -1433,26 +1363,26 @@
|
|
|
1433
1363
|
}
|
|
1434
1364
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1435
1365
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1436
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1437
|
-
var wp = whitePoint.
|
|
1366
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.j20_1, g.j20_1, b.j20_1, r.k20_1, g.k20_1, b.k20_1, r.m20(), g.m20(), b.m20());
|
|
1367
|
+
var wp = whitePoint.o1w_1;
|
|
1438
1368
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1439
1369
|
var this_0 = inverse(primaries);
|
|
1440
|
-
var v0 = wp.
|
|
1441
|
-
var v1 = wp.
|
|
1442
|
-
var v2 = wp.
|
|
1370
|
+
var v0 = wp.n20();
|
|
1371
|
+
var v1 = wp.l20_1;
|
|
1372
|
+
var v2 = wp.o20();
|
|
1443
1373
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1444
1374
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1445
1375
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
1446
1376
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
1447
1377
|
return dotDiagonal(primaries, x, y, z);
|
|
1448
1378
|
}
|
|
1449
|
-
function RGBColorSpace$lambda($this
|
|
1379
|
+
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
1450
1380
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1451
1381
|
var tmp;
|
|
1452
1382
|
if (color instanceof RGB) {
|
|
1453
|
-
tmp = color.
|
|
1383
|
+
tmp = color.c1z($this$RGBColorSpaceImpl);
|
|
1454
1384
|
} else {
|
|
1455
|
-
tmp = color.
|
|
1385
|
+
tmp = color.d1w().i1z($this$RGBColorSpaceImpl);
|
|
1456
1386
|
}
|
|
1457
1387
|
return tmp;
|
|
1458
1388
|
}
|
|
@@ -1474,22 +1404,22 @@
|
|
|
1474
1404
|
}
|
|
1475
1405
|
function Companion_3() {
|
|
1476
1406
|
Companion_instance_3 = this;
|
|
1477
|
-
this.
|
|
1407
|
+
this.p20_1 = XYZColorSpaces_getInstance().q20_1;
|
|
1478
1408
|
}
|
|
1479
|
-
protoOf(Companion_3).
|
|
1480
|
-
return this.
|
|
1409
|
+
protoOf(Companion_3).n1x = function (x, y, z, alpha) {
|
|
1410
|
+
return this.p20_1.n1x(x, y, z, alpha);
|
|
1481
1411
|
};
|
|
1482
|
-
protoOf(Companion_3).
|
|
1483
|
-
return this.
|
|
1412
|
+
protoOf(Companion_3).x1y = function () {
|
|
1413
|
+
return this.p20_1.x1y();
|
|
1484
1414
|
};
|
|
1485
|
-
protoOf(Companion_3).
|
|
1486
|
-
return this.
|
|
1415
|
+
protoOf(Companion_3).z1w = function () {
|
|
1416
|
+
return this.p20_1.z1w();
|
|
1487
1417
|
};
|
|
1488
1418
|
protoOf(Companion_3).hashCode = function () {
|
|
1489
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
1419
|
+
return hashCode(XYZColorSpaces_getInstance().q20_1);
|
|
1490
1420
|
};
|
|
1491
1421
|
protoOf(Companion_3).equals = function (other) {
|
|
1492
|
-
return equals(XYZColorSpaces_getInstance().
|
|
1422
|
+
return equals(XYZColorSpaces_getInstance().q20_1, other);
|
|
1493
1423
|
};
|
|
1494
1424
|
var Companion_instance_3;
|
|
1495
1425
|
function Companion_getInstance_3() {
|
|
@@ -1498,71 +1428,71 @@
|
|
|
1498
1428
|
return Companion_instance_3;
|
|
1499
1429
|
}
|
|
1500
1430
|
function adaptToM($this, space, m, mi) {
|
|
1501
|
-
if (space.
|
|
1431
|
+
if (space.x1y().equals($this.h1z_1.x1y()))
|
|
1502
1432
|
return $this;
|
|
1503
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1433
|
+
var transform = chromaticAdaptationMatrix(space, $this.h1z_1.x1y().o1w_1, m, mi);
|
|
1504
1434
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1505
|
-
var v0 = $this.
|
|
1506
|
-
var v1 = $this.
|
|
1507
|
-
var v2 = $this.
|
|
1435
|
+
var v0 = $this.d1z_1;
|
|
1436
|
+
var v1 = $this.e1z_1;
|
|
1437
|
+
var v2 = $this.f1z_1;
|
|
1508
1438
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1509
1439
|
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1510
1440
|
var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
1511
1441
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
1512
|
-
return space.
|
|
1442
|
+
return space.n1x(xx, yy, zz, $this.g1z_1);
|
|
1513
1443
|
}
|
|
1514
1444
|
function XYZ(x, y, z, alpha, space) {
|
|
1515
1445
|
Companion_getInstance_3();
|
|
1516
|
-
this.
|
|
1517
|
-
this.
|
|
1518
|
-
this.
|
|
1519
|
-
this.
|
|
1520
|
-
this.
|
|
1446
|
+
this.d1z_1 = x;
|
|
1447
|
+
this.e1z_1 = y;
|
|
1448
|
+
this.f1z_1 = z;
|
|
1449
|
+
this.g1z_1 = alpha;
|
|
1450
|
+
this.h1z_1 = space;
|
|
1521
1451
|
}
|
|
1522
|
-
protoOf(XYZ).
|
|
1523
|
-
return this.
|
|
1452
|
+
protoOf(XYZ).b1w = function () {
|
|
1453
|
+
return this.h1z_1;
|
|
1524
1454
|
};
|
|
1525
|
-
protoOf(XYZ).
|
|
1455
|
+
protoOf(XYZ).s20 = function (space) {
|
|
1526
1456
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1527
1457
|
};
|
|
1528
|
-
protoOf(XYZ).
|
|
1529
|
-
var
|
|
1530
|
-
var x =
|
|
1531
|
-
var y =
|
|
1532
|
-
var z =
|
|
1533
|
-
var f = space.
|
|
1458
|
+
protoOf(XYZ).i1z = function (space) {
|
|
1459
|
+
var _destruct__k2r9zo = this.s20(XYZColorSpace_0(space.x1y()));
|
|
1460
|
+
var x = _destruct__k2r9zo.m9();
|
|
1461
|
+
var y = _destruct__k2r9zo.n9();
|
|
1462
|
+
var z = _destruct__k2r9zo.tg();
|
|
1463
|
+
var f = space.g1y();
|
|
1534
1464
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1535
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
1465
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.w1y());
|
|
1536
1466
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1537
1467
|
var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
1538
1468
|
var g = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
1539
1469
|
var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
|
|
1540
|
-
return space.
|
|
1470
|
+
return space.n1x(f.q1y(r), f.q1y(g), f.q1y(b), this.g1z_1);
|
|
1541
1471
|
};
|
|
1542
|
-
protoOf(XYZ).
|
|
1543
|
-
return this.
|
|
1472
|
+
protoOf(XYZ).c1w = function () {
|
|
1473
|
+
return this.i1z(RGBColorSpaces_getInstance().u1x_1);
|
|
1544
1474
|
};
|
|
1545
|
-
protoOf(XYZ).
|
|
1475
|
+
protoOf(XYZ).d1w = function () {
|
|
1546
1476
|
return this;
|
|
1547
1477
|
};
|
|
1548
|
-
protoOf(XYZ).
|
|
1549
|
-
return this.
|
|
1478
|
+
protoOf(XYZ).m9 = function () {
|
|
1479
|
+
return this.d1z_1;
|
|
1550
1480
|
};
|
|
1551
|
-
protoOf(XYZ).
|
|
1552
|
-
return this.
|
|
1481
|
+
protoOf(XYZ).n9 = function () {
|
|
1482
|
+
return this.e1z_1;
|
|
1553
1483
|
};
|
|
1554
|
-
protoOf(XYZ).
|
|
1555
|
-
return this.
|
|
1484
|
+
protoOf(XYZ).tg = function () {
|
|
1485
|
+
return this.f1z_1;
|
|
1556
1486
|
};
|
|
1557
1487
|
protoOf(XYZ).toString = function () {
|
|
1558
|
-
return 'XYZ(x=' + this.
|
|
1488
|
+
return 'XYZ(x=' + this.d1z_1 + ', y=' + this.e1z_1 + ', z=' + this.f1z_1 + ', alpha=' + this.g1z_1 + ', space=' + toString(this.h1z_1) + ')';
|
|
1559
1489
|
};
|
|
1560
1490
|
protoOf(XYZ).hashCode = function () {
|
|
1561
|
-
var result = getNumberHashCode(this.
|
|
1562
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1563
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1564
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1565
|
-
result = imul(result, 31) + hashCode(this.
|
|
1491
|
+
var result = getNumberHashCode(this.d1z_1);
|
|
1492
|
+
result = imul(result, 31) + getNumberHashCode(this.e1z_1) | 0;
|
|
1493
|
+
result = imul(result, 31) + getNumberHashCode(this.f1z_1) | 0;
|
|
1494
|
+
result = imul(result, 31) + getNumberHashCode(this.g1z_1) | 0;
|
|
1495
|
+
result = imul(result, 31) + hashCode(this.h1z_1) | 0;
|
|
1566
1496
|
return result;
|
|
1567
1497
|
};
|
|
1568
1498
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1571,27 +1501,27 @@
|
|
|
1571
1501
|
if (!(other instanceof XYZ))
|
|
1572
1502
|
return false;
|
|
1573
1503
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1574
|
-
if (!equals(this.
|
|
1504
|
+
if (!equals(this.d1z_1, tmp0_other_with_cast.d1z_1))
|
|
1575
1505
|
return false;
|
|
1576
|
-
if (!equals(this.
|
|
1506
|
+
if (!equals(this.e1z_1, tmp0_other_with_cast.e1z_1))
|
|
1577
1507
|
return false;
|
|
1578
|
-
if (!equals(this.
|
|
1508
|
+
if (!equals(this.f1z_1, tmp0_other_with_cast.f1z_1))
|
|
1579
1509
|
return false;
|
|
1580
|
-
if (!equals(this.
|
|
1510
|
+
if (!equals(this.g1z_1, tmp0_other_with_cast.g1z_1))
|
|
1581
1511
|
return false;
|
|
1582
|
-
if (!equals(this.
|
|
1512
|
+
if (!equals(this.h1z_1, tmp0_other_with_cast.h1z_1))
|
|
1583
1513
|
return false;
|
|
1584
1514
|
return true;
|
|
1585
1515
|
};
|
|
1586
1516
|
function XYZColorSpace() {
|
|
1587
1517
|
}
|
|
1588
1518
|
function XYZColorSpace_0(whitePoint) {
|
|
1589
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1519
|
+
return whitePoint.equals(Illuminant_getInstance().u1w_1) ? XYZColorSpaces_getInstance().q20_1 : whitePoint.equals(Illuminant_getInstance().s1w_1) ? XYZColorSpaces_getInstance().r20_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1590
1520
|
}
|
|
1591
1521
|
function XYZColorSpaces() {
|
|
1592
1522
|
XYZColorSpaces_instance = this;
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1523
|
+
this.q20_1 = new XYZColorSpaceImpl(Illuminant_getInstance().u1w_1);
|
|
1524
|
+
this.r20_1 = new XYZColorSpaceImpl(Illuminant_getInstance().s1w_1);
|
|
1595
1525
|
}
|
|
1596
1526
|
var XYZColorSpaces_instance;
|
|
1597
1527
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1602,34 +1532,34 @@
|
|
|
1602
1532
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1603
1533
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1604
1534
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1605
|
-
var dstWp = _this__u8e3s4.
|
|
1606
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1607
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1535
|
+
var dstWp = _this__u8e3s4.x1y().o1w_1;
|
|
1536
|
+
var src = dot_0(xyzToLms, srcWp.n20(), srcWp.l20_1, srcWp.o20());
|
|
1537
|
+
var dst = dot_0(xyzToLms, dstWp.n20(), dstWp.l20_1, dstWp.o20());
|
|
1608
1538
|
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);
|
|
1609
1539
|
}
|
|
1610
1540
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1611
|
-
this.
|
|
1612
|
-
this.
|
|
1541
|
+
this.t20_1 = whitePoint;
|
|
1542
|
+
this.u20_1 = zeroOneComponentInfo('XYZ');
|
|
1613
1543
|
}
|
|
1614
|
-
protoOf(XYZColorSpaceImpl).
|
|
1615
|
-
return this.
|
|
1544
|
+
protoOf(XYZColorSpaceImpl).x1y = function () {
|
|
1545
|
+
return this.t20_1;
|
|
1616
1546
|
};
|
|
1617
|
-
protoOf(XYZColorSpaceImpl).
|
|
1618
|
-
return this.
|
|
1547
|
+
protoOf(XYZColorSpaceImpl).z1w = function () {
|
|
1548
|
+
return this.u20_1;
|
|
1619
1549
|
};
|
|
1620
1550
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1621
|
-
return 'XYZColorSpace(' + this.
|
|
1551
|
+
return 'XYZColorSpace(' + this.t20_1.toString() + ')';
|
|
1622
1552
|
};
|
|
1623
|
-
protoOf(XYZColorSpaceImpl).
|
|
1553
|
+
protoOf(XYZColorSpaceImpl).n1x = function (x, y, z, alpha) {
|
|
1624
1554
|
return new XYZ(x, y, z, alpha, this);
|
|
1625
1555
|
};
|
|
1626
1556
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1627
|
-
return this.
|
|
1557
|
+
return this.t20_1.hashCode();
|
|
1628
1558
|
};
|
|
1629
1559
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1630
1560
|
var tmp;
|
|
1631
1561
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
1632
|
-
tmp = this.
|
|
1562
|
+
tmp = this.t20_1.equals(other.x1y());
|
|
1633
1563
|
} else {
|
|
1634
1564
|
tmp = false;
|
|
1635
1565
|
}
|
|
@@ -1645,26 +1575,26 @@
|
|
|
1645
1575
|
}
|
|
1646
1576
|
function xyY(x, y, Y) {
|
|
1647
1577
|
Y = Y === VOID ? 1.0 : Y;
|
|
1648
|
-
this.
|
|
1649
|
-
this.
|
|
1650
|
-
this.
|
|
1578
|
+
this.j20_1 = x;
|
|
1579
|
+
this.k20_1 = y;
|
|
1580
|
+
this.l20_1 = Y;
|
|
1651
1581
|
}
|
|
1652
|
-
protoOf(xyY).
|
|
1653
|
-
return 1 - this.
|
|
1582
|
+
protoOf(xyY).m20 = function () {
|
|
1583
|
+
return 1 - this.j20_1 - this.k20_1;
|
|
1654
1584
|
};
|
|
1655
|
-
protoOf(xyY).
|
|
1656
|
-
return this.
|
|
1585
|
+
protoOf(xyY).n20 = function () {
|
|
1586
|
+
return this.j20_1 * this.l20_1 / this.k20_1;
|
|
1657
1587
|
};
|
|
1658
|
-
protoOf(xyY).
|
|
1659
|
-
return (1 - this.
|
|
1588
|
+
protoOf(xyY).o20 = function () {
|
|
1589
|
+
return (1 - this.j20_1 - this.k20_1) * this.l20_1 / this.k20_1;
|
|
1660
1590
|
};
|
|
1661
1591
|
protoOf(xyY).toString = function () {
|
|
1662
|
-
return 'xyY(x=' + this.
|
|
1592
|
+
return 'xyY(x=' + this.j20_1 + ', y=' + this.k20_1 + ', Y=' + this.l20_1 + ')';
|
|
1663
1593
|
};
|
|
1664
1594
|
protoOf(xyY).hashCode = function () {
|
|
1665
|
-
var result = getNumberHashCode(this.
|
|
1666
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1667
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1595
|
+
var result = getNumberHashCode(this.j20_1);
|
|
1596
|
+
result = imul(result, 31) + getNumberHashCode(this.k20_1) | 0;
|
|
1597
|
+
result = imul(result, 31) + getNumberHashCode(this.l20_1) | 0;
|
|
1668
1598
|
return result;
|
|
1669
1599
|
};
|
|
1670
1600
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1673,30 +1603,30 @@
|
|
|
1673
1603
|
if (!(other instanceof xyY))
|
|
1674
1604
|
return false;
|
|
1675
1605
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1676
|
-
if (!equals(this.
|
|
1606
|
+
if (!equals(this.j20_1, tmp0_other_with_cast.j20_1))
|
|
1677
1607
|
return false;
|
|
1678
|
-
if (!equals(this.
|
|
1608
|
+
if (!equals(this.k20_1, tmp0_other_with_cast.k20_1))
|
|
1679
1609
|
return false;
|
|
1680
|
-
if (!equals(this.
|
|
1610
|
+
if (!equals(this.l20_1, tmp0_other_with_cast.l20_1))
|
|
1681
1611
|
return false;
|
|
1682
1612
|
return true;
|
|
1683
1613
|
};
|
|
1684
1614
|
//region block: post-declaration
|
|
1685
|
-
protoOf(Ansi16).
|
|
1686
|
-
protoOf(Ansi256).
|
|
1687
|
-
protoOf(HSV).
|
|
1688
|
-
protoOf(Companion_2).
|
|
1689
|
-
protoOf(Companion_2).
|
|
1690
|
-
protoOf(Companion_2).
|
|
1691
|
-
protoOf(SRGB).
|
|
1692
|
-
protoOf(SRGB).
|
|
1693
|
-
protoOf(SRGB).
|
|
1694
|
-
protoOf(RGBColorSpaceImpl).
|
|
1695
|
-
protoOf(RGBColorSpaceImpl).
|
|
1696
|
-
protoOf(RGBColorSpaceImpl).
|
|
1697
|
-
protoOf(RGBColorSpaceImpl).
|
|
1698
|
-
protoOf(RGBColorSpaceImpl).
|
|
1699
|
-
protoOf(RGBColorSpaceImpl).
|
|
1615
|
+
protoOf(Ansi16).d1w = toXYZ;
|
|
1616
|
+
protoOf(Ansi256).d1w = toXYZ;
|
|
1617
|
+
protoOf(HSV).d1w = toXYZ;
|
|
1618
|
+
protoOf(Companion_2).b1x = invoke$default;
|
|
1619
|
+
protoOf(Companion_2).g1x = invoke$default_0;
|
|
1620
|
+
protoOf(Companion_2).c1x = from255$default;
|
|
1621
|
+
protoOf(SRGB).b1x = invoke$default;
|
|
1622
|
+
protoOf(SRGB).g1x = invoke$default_0;
|
|
1623
|
+
protoOf(SRGB).c1x = from255$default;
|
|
1624
|
+
protoOf(RGBColorSpaceImpl).b1x = invoke$default;
|
|
1625
|
+
protoOf(RGBColorSpaceImpl).s1y = invoke;
|
|
1626
|
+
protoOf(RGBColorSpaceImpl).g1x = invoke$default_0;
|
|
1627
|
+
protoOf(RGBColorSpaceImpl).u1y = invoke_0;
|
|
1628
|
+
protoOf(RGBColorSpaceImpl).t1y = from255;
|
|
1629
|
+
protoOf(RGBColorSpaceImpl).c1x = from255$default;
|
|
1700
1630
|
//endregion
|
|
1701
1631
|
//region block: init
|
|
1702
1632
|
PqNonlinearity_instance = new PqNonlinearity();
|