@flock/wirespec 0.17.20 → 0.18.1-RC.2
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/arrow-arrow-annotations.mjs.map +1 -1
- package/arrow-arrow-atomic.mjs +13 -13
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +588 -431
- package/arrow-arrow-core.mjs.map +1 -1
- package/arrow-arrow-exception-utils.mjs +30 -0
- package/arrow-arrow-exception-utils.mjs.map +1 -0
- package/clikt-clikt-mordant.mjs +318 -0
- package/clikt-clikt-mordant.mjs.map +1 -0
- package/clikt-clikt.mjs +3834 -3696
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +619 -682
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-js-core.mjs +4 -0
- package/kotlin-js-core.mjs.map +1 -0
- package/kotlin-js.mjs +4 -0
- package/kotlin-js.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +6284 -5825
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +8163 -8198
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-plugins-js-plain-objects-runtime.mjs +4 -0
- package/kotlin-plugins-js-plain-objects-runtime.mjs.map +1 -0
- package/kotlin-rgxgen.mjs +2007 -2062
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +4 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-coroutines-core.mjs +4 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +803 -839
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2483 -2553
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1861 -1928
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant-omnibus.mjs +4 -0
- package/mordant-mordant-omnibus.mjs.map +1 -0
- package/mordant-mordant.mjs +2525 -4426
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +4 -7
- package/seskar-core.mjs +4 -0
- package/seskar-core.mjs.map +1 -0
- package/wirespec-bin.mjs +13 -1
- package/wirespec-fetch.d.ts +4 -1
- package/wirespec-fetch.mjs +34 -0
- package/wirespec-serialization.d.ts +13 -2
- package/wirespec-serialization.mjs +22 -1
- package/wirespec-src-compiler-core.mjs +2857 -3909
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +1370 -413
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +1015 -337
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +1465 -387
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +2461 -0
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-scala.mjs +1010 -0
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-typescript.mjs +1533 -450
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +122 -144
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +17369 -0
- package/wirespec-src-compiler-ir.mjs.map +1 -0
- package/wirespec-src-compiler-lib.mjs +662 -728
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +630 -656
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1705 -2024
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +418 -459
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +367 -331
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/{wirespec-src-plugin-npm.d.ts → wirespec-src-plugin-npm.d.mts} +247 -0
- package/wirespec-src-plugin-npm.mjs +166 -359
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +79 -106
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/arrow-arrow-continuations.mjs +0 -18
- package/arrow-arrow-continuations.mjs.map +0 -1
- package/markdown.mjs +0 -6756
- package/markdown.mjs.map +0 -1
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
protoOf180f3jzyo7rfj as protoOf,
|
|
3
3
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
4
4
|
toString1pkumu07cwy4m as toString,
|
|
5
|
-
IllegalArgumentException_init_$Create$
|
|
5
|
+
IllegalArgumentException_init_$Create$1j1aj36nbo0wg as IllegalArgumentException_init_$Create$,
|
|
6
|
+
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
6
7
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
7
8
|
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
8
9
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
9
10
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
10
|
-
ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$,
|
|
11
|
-
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
12
|
-
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
13
|
-
toString14fd7g605f91p as toString_0,
|
|
14
|
-
Unit_instanceat14thlj150z as Unit_instance,
|
|
15
|
-
_Char___init__impl__6a9atx367vrx0avsvbg as _Char___init__impl__6a9atx,
|
|
16
11
|
arrayConcat3qsij7vh68m69 as arrayConcat,
|
|
17
12
|
listOf1jh22dvmctj1r as listOf,
|
|
13
|
+
ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
|
|
14
|
+
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
15
|
+
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
16
|
+
toString3dhdjl9yf50de as toString_0,
|
|
17
|
+
_Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
|
|
18
18
|
withSignc9p5jv9gifer as withSign,
|
|
19
19
|
trimMarginhyd3fsmh8iev as trimMargin,
|
|
20
20
|
hashCodeq5arwsb9dgti as hashCode,
|
|
21
21
|
equals2au1ep9vhcato as equals,
|
|
22
|
-
|
|
22
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
23
23
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
24
24
|
coerceAtLeastklytehohcpeq as coerceAtLeast,
|
|
25
25
|
getNumberHashCode2l4nbdcihl25f as getNumberHashCode,
|
|
26
|
-
numberToDouble210hrknaofnhf as numberToDouble,
|
|
27
26
|
roundToInt1ue8x8yshtznx as roundToInt,
|
|
28
|
-
DoubleCompanionObject_instance173s5lyb0q261 as DoubleCompanionObject_instance,
|
|
29
27
|
coerceInlzh524ulyz3c as coerceIn,
|
|
28
|
+
numberToDouble210hrknaofnhf as numberToDouble,
|
|
29
|
+
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
30
30
|
Char19o2r8palgjof as Char,
|
|
31
31
|
toInt5qdj874w69jh as toInt,
|
|
32
32
|
numberRangeToNumber25vse2rgp6rs8 as numberRangeToNumber,
|
|
@@ -43,13 +43,14 @@ var log2 = Math.log2;
|
|
|
43
43
|
//endregion
|
|
44
44
|
//region block: pre-declaration
|
|
45
45
|
function toXYZ() {
|
|
46
|
-
return this.
|
|
46
|
+
return this.a3p().b3p();
|
|
47
47
|
}
|
|
48
48
|
initMetadataForInterface(Color, 'Color');
|
|
49
49
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
50
50
|
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
51
51
|
initMetadataForObject(Illuminant, 'Illuminant');
|
|
52
52
|
initMetadataForClass(Matrix, 'Matrix');
|
|
53
|
+
initMetadataForClass(Vector, 'Vector');
|
|
53
54
|
initMetadataForCompanion(Companion);
|
|
54
55
|
initMetadataForClass(Ansi16, 'Ansi16', VOID, VOID, [Color]);
|
|
55
56
|
initMetadataForCompanion(Companion_0);
|
|
@@ -58,25 +59,23 @@ initMetadataForCompanion(Companion_1);
|
|
|
58
59
|
initMetadataForClass(HSV, 'HSV', VOID, VOID, [Color]);
|
|
59
60
|
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
60
61
|
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
61
|
-
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
62
|
-
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.m3q(r, g, b, alpha) : $super.m3q.call(this, r, g, b, alpha);
|
|
66
65
|
}
|
|
67
66
|
function invoke(r, g, b, alpha) {
|
|
68
|
-
return this.
|
|
67
|
+
return this.m3q(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.q3r(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.m3q(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.r3r(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);
|
|
@@ -84,21 +83,21 @@ function invoke_0(hex) {
|
|
|
84
83
|
var tmp_1 = parseHex(hex, 2);
|
|
85
84
|
var tmp_2;
|
|
86
85
|
// Inline function 'kotlin.let' call
|
|
87
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
88
|
-
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
89
86
|
var it = get_hexLength(hex);
|
|
90
87
|
if (it === 4 || it === 8) {
|
|
91
88
|
tmp_2 = parseHex(hex, 3);
|
|
92
89
|
} else {
|
|
93
90
|
tmp_2 = 255;
|
|
94
91
|
}
|
|
95
|
-
return this.
|
|
92
|
+
return this.r3r(tmp, tmp_0, tmp_1, tmp_2);
|
|
96
93
|
}
|
|
97
94
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace');
|
|
98
95
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
99
96
|
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
100
|
-
|
|
97
|
+
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
98
|
+
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
101
99
|
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
100
|
+
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
102
101
|
initMetadataForClass(RGBColorSpaceImpl, 'RGBColorSpaceImpl', VOID, VOID, [RGBColorSpace]);
|
|
103
102
|
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
104
103
|
initMetadataForObject(ACESccTransferFunctions, 'ACESccTransferFunctions');
|
|
@@ -116,28 +115,26 @@ initMetadataForClass(xyY, 'xyY');
|
|
|
116
115
|
function Color() {
|
|
117
116
|
}
|
|
118
117
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
118
|
+
this.h3p_1 = name;
|
|
119
|
+
this.i3p_1 = isPolar;
|
|
120
|
+
this.j3p_1 = min;
|
|
121
|
+
this.k3p_1 = max;
|
|
123
122
|
// Inline function 'kotlin.require' call
|
|
124
|
-
|
|
125
|
-
if (!(this.x2m_1 <= this.y2m_1)) {
|
|
126
|
-
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
123
|
+
if (!(this.j3p_1 <= this.k3p_1)) {
|
|
127
124
|
var message = 'min must be less than or equal to max';
|
|
128
125
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
function WhitePoint(name, chromaticity) {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
129
|
+
this.l3p_1 = name;
|
|
130
|
+
this.m3p_1 = chromaticity;
|
|
134
131
|
}
|
|
135
132
|
protoOf(WhitePoint).toString = function () {
|
|
136
|
-
return this.
|
|
133
|
+
return this.l3p_1;
|
|
137
134
|
};
|
|
138
135
|
protoOf(WhitePoint).hashCode = function () {
|
|
139
|
-
var result = getStringHashCode(this.
|
|
140
|
-
result = imul(result, 31) + this.
|
|
136
|
+
var result = getStringHashCode(this.l3p_1);
|
|
137
|
+
result = imul(result, 31) + this.m3p_1.hashCode() | 0;
|
|
141
138
|
return result;
|
|
142
139
|
};
|
|
143
140
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -146,22 +143,22 @@ protoOf(WhitePoint).equals = function (other) {
|
|
|
146
143
|
if (!(other instanceof WhitePoint))
|
|
147
144
|
return false;
|
|
148
145
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
149
|
-
if (!(this.
|
|
146
|
+
if (!(this.l3p_1 === tmp0_other_with_cast.l3p_1))
|
|
150
147
|
return false;
|
|
151
|
-
if (!this.
|
|
148
|
+
if (!this.m3p_1.equals(tmp0_other_with_cast.m3p_1))
|
|
152
149
|
return false;
|
|
153
150
|
return true;
|
|
154
151
|
};
|
|
155
152
|
function Illuminant() {
|
|
156
153
|
Illuminant_instance = this;
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
154
|
+
this.n3p_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
155
|
+
this.o3p_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
156
|
+
this.p3p_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
157
|
+
this.q3p_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
158
|
+
this.r3p_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
159
|
+
this.s3p_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
160
|
+
this.t3p_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
161
|
+
this.u3p_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
165
162
|
}
|
|
166
163
|
var Illuminant_instance;
|
|
167
164
|
function Illuminant_getInstance() {
|
|
@@ -174,51 +171,43 @@ function get_alphaInfo() {
|
|
|
174
171
|
return alphaInfo;
|
|
175
172
|
}
|
|
176
173
|
var alphaInfo;
|
|
174
|
+
function componentInfoList(c) {
|
|
175
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
176
|
+
return listOf(arrayConcat([c, [get_alphaInfo()]]));
|
|
177
|
+
}
|
|
177
178
|
function zeroOneComponentInfo(name) {
|
|
178
179
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
179
180
|
// Inline function 'kotlin.collections.buildList' call
|
|
180
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
181
181
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
182
182
|
// Inline function 'kotlin.apply' call
|
|
183
183
|
var this_0 = ArrayList_init_$Create$();
|
|
184
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
185
|
-
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>' call
|
|
186
184
|
// Inline function 'kotlin.text.mapTo' call
|
|
187
185
|
var inductionVariable = 0;
|
|
188
186
|
while (inductionVariable < charSequenceLength(name)) {
|
|
189
187
|
var item = charSequenceGet(name, inductionVariable);
|
|
190
188
|
inductionVariable = inductionVariable + 1 | 0;
|
|
191
|
-
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
192
189
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
193
|
-
this_0.
|
|
190
|
+
this_0.x(tmp$ret$0);
|
|
194
191
|
}
|
|
195
|
-
this_0.
|
|
196
|
-
return this_0.
|
|
192
|
+
this_0.x(get_alphaInfo());
|
|
193
|
+
return this_0.o5();
|
|
197
194
|
}
|
|
198
195
|
function polarComponentInfo(name, l, r) {
|
|
199
196
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
200
197
|
// Inline function 'kotlin.collections.buildList' call
|
|
201
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
202
198
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
203
199
|
// Inline function 'kotlin.apply' call
|
|
204
200
|
var this_0 = ArrayList_init_$Create$();
|
|
205
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
206
|
-
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
207
201
|
// Inline function 'kotlin.text.mapTo' call
|
|
208
202
|
var inductionVariable = 0;
|
|
209
203
|
while (inductionVariable < charSequenceLength(name)) {
|
|
210
204
|
var item = charSequenceGet(name, inductionVariable);
|
|
211
205
|
inductionVariable = inductionVariable + 1 | 0;
|
|
212
|
-
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
213
206
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), item === _Char___init__impl__6a9atx(72), item === _Char___init__impl__6a9atx(72) ? 0.0 : l, item === _Char___init__impl__6a9atx(72) ? 360.0 : r);
|
|
214
|
-
this_0.
|
|
207
|
+
this_0.x(tmp$ret$0);
|
|
215
208
|
}
|
|
216
|
-
this_0.
|
|
217
|
-
return this_0.
|
|
218
|
-
}
|
|
219
|
-
function componentInfoList(c) {
|
|
220
|
-
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
221
|
-
return listOf(arrayConcat([c, [get_alphaInfo()]]));
|
|
209
|
+
this_0.x(get_alphaInfo());
|
|
210
|
+
return this_0.o5();
|
|
222
211
|
}
|
|
223
212
|
var properties_initialized_ColorSpaceUtils_kt_kskdoe;
|
|
224
213
|
function _init_properties_ColorSpaceUtils_kt__cnwylg() {
|
|
@@ -241,19 +230,19 @@ var properties_initialized_Constants_kt_w4w61t;
|
|
|
241
230
|
function _init_properties_Constants_kt__atb1ur() {
|
|
242
231
|
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
243
232
|
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);
|
|
233
|
+
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
234
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
246
235
|
}
|
|
247
236
|
}
|
|
248
|
-
function spow(_this__u8e3s4, p) {
|
|
249
|
-
return spow_0(_this__u8e3s4, p);
|
|
250
|
-
}
|
|
251
237
|
function normalizeDeg(_this__u8e3s4) {
|
|
252
238
|
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
253
239
|
}
|
|
240
|
+
function spow(_this__u8e3s4, p) {
|
|
241
|
+
return spow_0(_this__u8e3s4, p);
|
|
242
|
+
}
|
|
254
243
|
function spow_0(_this__u8e3s4, p) {
|
|
255
|
-
// Inline function 'kotlin.math.pow' call
|
|
256
244
|
// Inline function 'kotlin.math.absoluteValue' call
|
|
245
|
+
// Inline function 'kotlin.math.pow' call
|
|
257
246
|
var this_0 = Math.abs(_this__u8e3s4);
|
|
258
247
|
var tmp$ret$1 = Math.pow(this_0, p);
|
|
259
248
|
return withSign(tmp$ret$1, _this__u8e3s4);
|
|
@@ -296,22 +285,22 @@ function Matrix__hashCode_impl_s9ntm9($this) {
|
|
|
296
285
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
297
286
|
if (!(other instanceof Matrix))
|
|
298
287
|
return false;
|
|
299
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
288
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.v3p_1 : THROW_CCE();
|
|
300
289
|
if (!equals($this, tmp0_other_with_cast))
|
|
301
290
|
return false;
|
|
302
291
|
return true;
|
|
303
292
|
}
|
|
304
293
|
function Matrix(rowMajor) {
|
|
305
|
-
this.
|
|
294
|
+
this.v3p_1 = rowMajor;
|
|
306
295
|
}
|
|
307
296
|
protoOf(Matrix).toString = function () {
|
|
308
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
297
|
+
return Matrix__toString_impl_l0abk0(this.v3p_1);
|
|
309
298
|
};
|
|
310
299
|
protoOf(Matrix).hashCode = function () {
|
|
311
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
300
|
+
return Matrix__hashCode_impl_s9ntm9(this.v3p_1);
|
|
312
301
|
};
|
|
313
302
|
protoOf(Matrix).equals = function (other) {
|
|
314
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
303
|
+
return Matrix__equals_impl_g5p8p9(this.v3p_1, other);
|
|
315
304
|
};
|
|
316
305
|
function inverse(_this__u8e3s4, inPlace) {
|
|
317
306
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -380,22 +369,51 @@ function _Vector___get_m__impl__e5qq0m($this) {
|
|
|
380
369
|
function _Vector___get_s__impl__pzuljk($this) {
|
|
381
370
|
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
382
371
|
}
|
|
372
|
+
function Vector__toString_impl_hn2ybi($this) {
|
|
373
|
+
return 'Vector(values=' + toString($this) + ')';
|
|
374
|
+
}
|
|
375
|
+
function Vector__hashCode_impl_442yhd($this) {
|
|
376
|
+
return hashCode($this);
|
|
377
|
+
}
|
|
378
|
+
function Vector__equals_impl_hy6igl($this, other) {
|
|
379
|
+
if (!(other instanceof Vector))
|
|
380
|
+
return false;
|
|
381
|
+
var tmp0_other_with_cast = other instanceof Vector ? other.w3p_1 : THROW_CCE();
|
|
382
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
383
|
+
return false;
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
386
|
+
function Vector(values) {
|
|
387
|
+
this.w3p_1 = values;
|
|
388
|
+
}
|
|
389
|
+
protoOf(Vector).toString = function () {
|
|
390
|
+
return Vector__toString_impl_hn2ybi(this.w3p_1);
|
|
391
|
+
};
|
|
392
|
+
protoOf(Vector).hashCode = function () {
|
|
393
|
+
return Vector__hashCode_impl_442yhd(this.w3p_1);
|
|
394
|
+
};
|
|
395
|
+
protoOf(Vector).equals = function (other) {
|
|
396
|
+
return Vector__equals_impl_hy6igl(this.w3p_1, other);
|
|
397
|
+
};
|
|
383
398
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
384
399
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
385
|
-
var
|
|
386
|
-
var
|
|
400
|
+
var tmp0 = 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;
|
|
401
|
+
var tmp2 = 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;
|
|
387
402
|
var p2 = 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;
|
|
388
|
-
return _Vector___init__impl__y7x4qq_0(
|
|
403
|
+
return _Vector___init__impl__y7x4qq_0(tmp0, tmp2, p2);
|
|
389
404
|
}
|
|
390
405
|
function dot$f($this_dot, $other, x, y) {
|
|
391
406
|
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);
|
|
392
407
|
}
|
|
393
408
|
function Companion() {
|
|
394
409
|
Companion_instance = this;
|
|
395
|
-
this.
|
|
410
|
+
this.x3p_1 = componentInfoList([new ColorComponentInfo('code', false, 30.0, 107.0)]);
|
|
396
411
|
}
|
|
397
|
-
protoOf(Companion).
|
|
398
|
-
return
|
|
412
|
+
protoOf(Companion).m = function () {
|
|
413
|
+
return 'Ansi16';
|
|
414
|
+
};
|
|
415
|
+
protoOf(Companion).y3p = function () {
|
|
416
|
+
return this.x3p_1;
|
|
399
417
|
};
|
|
400
418
|
var Companion_instance;
|
|
401
419
|
function Companion_getInstance() {
|
|
@@ -405,38 +423,38 @@ function Companion_getInstance() {
|
|
|
405
423
|
}
|
|
406
424
|
function Ansi16(code) {
|
|
407
425
|
Companion_getInstance();
|
|
408
|
-
this.
|
|
426
|
+
this.z3p_1 = code;
|
|
409
427
|
}
|
|
410
|
-
protoOf(Ansi16).
|
|
428
|
+
protoOf(Ansi16).z3o = function () {
|
|
411
429
|
return Companion_getInstance();
|
|
412
430
|
};
|
|
413
|
-
protoOf(Ansi16).
|
|
414
|
-
switch (this.
|
|
431
|
+
protoOf(Ansi16).a3p = function () {
|
|
432
|
+
switch (this.z3p_1) {
|
|
415
433
|
case 30:
|
|
416
434
|
case 40:
|
|
417
|
-
return Companion_getInstance_2().
|
|
435
|
+
return Companion_getInstance_2().a3q(0.0, 0.0, 0.0);
|
|
418
436
|
case 90:
|
|
419
437
|
case 100:
|
|
420
|
-
return Companion_getInstance_2().
|
|
438
|
+
return Companion_getInstance_2().b3q(128, 128, 128);
|
|
421
439
|
case 37:
|
|
422
440
|
case 47:
|
|
423
|
-
return Companion_getInstance_2().
|
|
441
|
+
return Companion_getInstance_2().b3q(192, 192, 192);
|
|
424
442
|
case 97:
|
|
425
443
|
case 107:
|
|
426
|
-
return Companion_getInstance_2().
|
|
444
|
+
return Companion_getInstance_2().a3q(1.0, 1.0, 1.0);
|
|
427
445
|
}
|
|
428
|
-
var color = this.
|
|
429
|
-
var mul = this.
|
|
446
|
+
var color = this.z3p_1 % 10 | 0;
|
|
447
|
+
var mul = this.z3p_1 > 50 ? 1.0 : 0.5;
|
|
430
448
|
var r = (color % 2 | 0) * mul;
|
|
431
449
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
432
450
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
433
|
-
return Companion_getInstance_2().
|
|
451
|
+
return Companion_getInstance_2().a3q(r, g, b);
|
|
434
452
|
};
|
|
435
453
|
protoOf(Ansi16).toString = function () {
|
|
436
|
-
return 'Ansi16(code=' + this.
|
|
454
|
+
return 'Ansi16(code=' + this.z3p_1 + ')';
|
|
437
455
|
};
|
|
438
456
|
protoOf(Ansi16).hashCode = function () {
|
|
439
|
-
return this.
|
|
457
|
+
return this.z3p_1;
|
|
440
458
|
};
|
|
441
459
|
protoOf(Ansi16).equals = function (other) {
|
|
442
460
|
if (this === other)
|
|
@@ -444,16 +462,19 @@ protoOf(Ansi16).equals = function (other) {
|
|
|
444
462
|
if (!(other instanceof Ansi16))
|
|
445
463
|
return false;
|
|
446
464
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
447
|
-
if (!(this.
|
|
465
|
+
if (!(this.z3p_1 === tmp0_other_with_cast.z3p_1))
|
|
448
466
|
return false;
|
|
449
467
|
return true;
|
|
450
468
|
};
|
|
451
469
|
function Companion_0() {
|
|
452
470
|
Companion_instance_0 = this;
|
|
453
|
-
this.
|
|
471
|
+
this.c3q_1 = componentInfoList([new ColorComponentInfo('code', false, 0.0, 255.0)]);
|
|
454
472
|
}
|
|
455
|
-
protoOf(Companion_0).
|
|
456
|
-
return
|
|
473
|
+
protoOf(Companion_0).m = function () {
|
|
474
|
+
return 'Ansi256';
|
|
475
|
+
};
|
|
476
|
+
protoOf(Companion_0).y3p = function () {
|
|
477
|
+
return this.c3q_1;
|
|
457
478
|
};
|
|
458
479
|
var Companion_instance_0;
|
|
459
480
|
function Companion_getInstance_0() {
|
|
@@ -463,19 +484,19 @@ function Companion_getInstance_0() {
|
|
|
463
484
|
}
|
|
464
485
|
function Ansi256(code) {
|
|
465
486
|
Companion_getInstance_0();
|
|
466
|
-
this.
|
|
487
|
+
this.d3q_1 = code;
|
|
467
488
|
}
|
|
468
|
-
protoOf(Ansi256).
|
|
489
|
+
protoOf(Ansi256).z3o = function () {
|
|
469
490
|
return Companion_getInstance_0();
|
|
470
491
|
};
|
|
471
|
-
protoOf(Ansi256).
|
|
472
|
-
if (this.
|
|
473
|
-
return this.
|
|
474
|
-
if (this.
|
|
475
|
-
var c = imul(this.
|
|
476
|
-
return Companion_getInstance_2().
|
|
492
|
+
protoOf(Ansi256).a3p = function () {
|
|
493
|
+
if (this.d3q_1 < 16)
|
|
494
|
+
return this.e3q().a3p();
|
|
495
|
+
if (this.d3q_1 >= 232) {
|
|
496
|
+
var c = imul(this.d3q_1 - 232 | 0, 10) + 8 | 0;
|
|
497
|
+
return Companion_getInstance_2().b3q(c, c, c);
|
|
477
498
|
}
|
|
478
|
-
var c_0 = this.
|
|
499
|
+
var c_0 = this.d3q_1 - 16 | 0;
|
|
479
500
|
var rem = c_0 % 36 | 0;
|
|
480
501
|
// Inline function 'kotlin.math.floor' call
|
|
481
502
|
var x = c_0 / 36.0;
|
|
@@ -484,16 +505,16 @@ protoOf(Ansi256).o2m = function () {
|
|
|
484
505
|
var x_0 = rem / 6.0;
|
|
485
506
|
var g = Math.floor(x_0) / 5.0;
|
|
486
507
|
var b = (rem % 6 | 0) / 5.0;
|
|
487
|
-
return Companion_getInstance_2().
|
|
508
|
+
return Companion_getInstance_2().f3q(r, g, b);
|
|
488
509
|
};
|
|
489
|
-
protoOf(Ansi256).
|
|
490
|
-
return this.
|
|
510
|
+
protoOf(Ansi256).e3q = function () {
|
|
511
|
+
return this.d3q_1 < 8 ? new Ansi16(this.d3q_1 + 30 | 0) : this.d3q_1 < 16 ? new Ansi16((this.d3q_1 - 8 | 0) + 90 | 0) : this.a3p().e3q();
|
|
491
512
|
};
|
|
492
513
|
protoOf(Ansi256).toString = function () {
|
|
493
|
-
return 'Ansi256(code=' + this.
|
|
514
|
+
return 'Ansi256(code=' + this.d3q_1 + ')';
|
|
494
515
|
};
|
|
495
516
|
protoOf(Ansi256).hashCode = function () {
|
|
496
|
-
return this.
|
|
517
|
+
return this.d3q_1;
|
|
497
518
|
};
|
|
498
519
|
protoOf(Ansi256).equals = function (other) {
|
|
499
520
|
if (this === other)
|
|
@@ -501,16 +522,19 @@ protoOf(Ansi256).equals = function (other) {
|
|
|
501
522
|
if (!(other instanceof Ansi256))
|
|
502
523
|
return false;
|
|
503
524
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
504
|
-
if (!(this.
|
|
525
|
+
if (!(this.d3q_1 === tmp0_other_with_cast.d3q_1))
|
|
505
526
|
return false;
|
|
506
527
|
return true;
|
|
507
528
|
};
|
|
508
529
|
function Companion_1() {
|
|
509
530
|
Companion_instance_1 = this;
|
|
510
|
-
this.
|
|
531
|
+
this.g3q_1 = polarComponentInfo('HSV', 0.0, 1.0);
|
|
511
532
|
}
|
|
512
|
-
protoOf(Companion_1).
|
|
513
|
-
return
|
|
533
|
+
protoOf(Companion_1).m = function () {
|
|
534
|
+
return 'HSV';
|
|
535
|
+
};
|
|
536
|
+
protoOf(Companion_1).y3p = function () {
|
|
537
|
+
return this.g3q_1;
|
|
514
538
|
};
|
|
515
539
|
var Companion_instance_1;
|
|
516
540
|
function Companion_getInstance_1() {
|
|
@@ -529,30 +553,30 @@ function toSRGB$f(h, v, s, n) {
|
|
|
529
553
|
function HSV(h, s, v, alpha) {
|
|
530
554
|
Companion_getInstance_1();
|
|
531
555
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
532
|
-
this.
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
556
|
+
this.h3q_1 = h;
|
|
557
|
+
this.i3q_1 = s;
|
|
558
|
+
this.j3q_1 = v;
|
|
559
|
+
this.k3q_1 = alpha;
|
|
536
560
|
}
|
|
537
|
-
protoOf(HSV).
|
|
561
|
+
protoOf(HSV).z3o = function () {
|
|
538
562
|
return Companion_getInstance_1();
|
|
539
563
|
};
|
|
540
|
-
protoOf(HSV).
|
|
541
|
-
if (this.
|
|
542
|
-
return Companion_getInstance_2().
|
|
543
|
-
var v = this.
|
|
544
|
-
var h =
|
|
545
|
-
var s = this.
|
|
546
|
-
return SRGB_getInstance().
|
|
564
|
+
protoOf(HSV).a3p = function () {
|
|
565
|
+
if (this.i3q_1 < 1.0E-7)
|
|
566
|
+
return Companion_getInstance_2().m3q(this.j3q_1, this.j3q_1, this.j3q_1, this.k3q_1);
|
|
567
|
+
var v = this.j3q_1;
|
|
568
|
+
var h = normalizeDeg(this.h3q_1) / 60.0;
|
|
569
|
+
var s = this.i3q_1;
|
|
570
|
+
return SRGB_getInstance().m3q(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.k3q_1);
|
|
547
571
|
};
|
|
548
572
|
protoOf(HSV).toString = function () {
|
|
549
|
-
return 'HSV(h=' + this.
|
|
573
|
+
return 'HSV(h=' + this.h3q_1 + ', s=' + this.i3q_1 + ', v=' + this.j3q_1 + ', alpha=' + this.k3q_1 + ')';
|
|
550
574
|
};
|
|
551
575
|
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.
|
|
576
|
+
var result = getNumberHashCode(this.h3q_1);
|
|
577
|
+
result = imul(result, 31) + getNumberHashCode(this.i3q_1) | 0;
|
|
578
|
+
result = imul(result, 31) + getNumberHashCode(this.j3q_1) | 0;
|
|
579
|
+
result = imul(result, 31) + getNumberHashCode(this.k3q_1) | 0;
|
|
556
580
|
return result;
|
|
557
581
|
};
|
|
558
582
|
protoOf(HSV).equals = function (other) {
|
|
@@ -561,13 +585,13 @@ protoOf(HSV).equals = function (other) {
|
|
|
561
585
|
if (!(other instanceof HSV))
|
|
562
586
|
return false;
|
|
563
587
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
564
|
-
if (!equals(this.
|
|
588
|
+
if (!equals(this.h3q_1, tmp0_other_with_cast.h3q_1))
|
|
565
589
|
return false;
|
|
566
|
-
if (!equals(this.
|
|
590
|
+
if (!equals(this.i3q_1, tmp0_other_with_cast.i3q_1))
|
|
567
591
|
return false;
|
|
568
|
-
if (!equals(this.
|
|
592
|
+
if (!equals(this.j3q_1, tmp0_other_with_cast.j3q_1))
|
|
569
593
|
return false;
|
|
570
|
-
if (!equals(this.
|
|
594
|
+
if (!equals(this.k3q_1, tmp0_other_with_cast.k3q_1))
|
|
571
595
|
return false;
|
|
572
596
|
return true;
|
|
573
597
|
};
|
|
@@ -609,51 +633,45 @@ var ICTCP_XYZ_TO_LMS;
|
|
|
609
633
|
var ICTCP_LMS_TO_XYZ;
|
|
610
634
|
function ICtCp() {
|
|
611
635
|
}
|
|
612
|
-
protoOf(ICtCp).
|
|
613
|
-
var fo = RGBColorSpaces_getInstance().
|
|
636
|
+
protoOf(ICtCp).s3q = function () {
|
|
637
|
+
var fo = RGBColorSpaces_getInstance().a3r_1.f3r();
|
|
638
|
+
var tmp0 = get_ICTCP_ICTCP_to_LMS();
|
|
639
|
+
var tmp2 = this.o3q_1;
|
|
640
|
+
var tmp4 = this.p3q_1;
|
|
614
641
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
618
|
-
var
|
|
619
|
-
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
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;
|
|
642
|
+
var v2 = this.q3q_1;
|
|
643
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
644
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
645
|
+
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
646
|
+
var tmp0_1 = get_ICTCP_LMS_to_RGB();
|
|
647
|
+
var tmp2_1 = PqNonlinearity_instance.o3r(tmp0_0);
|
|
648
|
+
var tmp4_0 = PqNonlinearity_instance.o3r(tmp2_0);
|
|
623
649
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
624
|
-
var
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var
|
|
628
|
-
|
|
629
|
-
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
|
-
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
|
-
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().n2o_1.z2n(fo.c2p(r), fo.c2p(g), fo.c2p(b), this.e2o_1);
|
|
650
|
+
var v2_0 = PqNonlinearity_instance.o3r(s);
|
|
651
|
+
var tmp0_2 = Matrix__get_impl_xogbpk(tmp0_1, 0, 0) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 0) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 0) * v2_0;
|
|
652
|
+
var tmp2_2 = Matrix__get_impl_xogbpk(tmp0_1, 0, 1) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 1) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 1) * v2_0;
|
|
653
|
+
var b = Matrix__get_impl_xogbpk(tmp0_1, 0, 2) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 2) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 2) * v2_0;
|
|
654
|
+
return RGBColorSpaces_getInstance().a3r_1.m3q(fo.p3r(tmp0_2), fo.p3r(tmp2_2), fo.p3r(b), this.r3q_1);
|
|
633
655
|
};
|
|
634
656
|
function PqNonlinearity() {
|
|
635
|
-
this.
|
|
636
|
-
this.
|
|
637
|
-
this.
|
|
638
|
-
this.
|
|
639
|
-
this.
|
|
640
|
-
this.
|
|
641
|
-
this.
|
|
642
|
-
this.
|
|
643
|
-
}
|
|
644
|
-
protoOf(PqNonlinearity).
|
|
657
|
+
this.g3r_1 = 0.1593017578125;
|
|
658
|
+
this.h3r_1 = 78.84375;
|
|
659
|
+
this.i3r_1 = 0.8359375;
|
|
660
|
+
this.j3r_1 = 18.8515625;
|
|
661
|
+
this.k3r_1 = 18.6875;
|
|
662
|
+
this.l3r_1 = 10000.0;
|
|
663
|
+
this.m3r_1 = 6.277394636015326;
|
|
664
|
+
this.n3r_1 = 0.012683313515655966;
|
|
665
|
+
}
|
|
666
|
+
protoOf(PqNonlinearity).o3r = function (x) {
|
|
645
667
|
var vp = spow(x, 0.012683313515655966);
|
|
646
668
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
647
|
-
var
|
|
648
|
-
var l = spow_0(tmp, 6.277394636015326);
|
|
669
|
+
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
649
670
|
return 10000.0 * l;
|
|
650
671
|
};
|
|
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);
|
|
672
|
+
protoOf(PqNonlinearity).p3r = function (x) {
|
|
673
|
+
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
674
|
+
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
657
675
|
};
|
|
658
676
|
var PqNonlinearity_instance;
|
|
659
677
|
function PqNonlinearity_getInstance() {
|
|
@@ -673,84 +691,45 @@ function _init_properties_ICtCp_kt__7vx7or() {
|
|
|
673
691
|
ICTCP_LMS_TO_XYZ = inverse(get_ICTCP_XYZ_TO_LMS());
|
|
674
692
|
}
|
|
675
693
|
}
|
|
676
|
-
function GammaTransferFunctions(gamma) {
|
|
677
|
-
this.d2p_1 = gamma;
|
|
678
|
-
}
|
|
679
|
-
protoOf(GammaTransferFunctions).b2p = function (x) {
|
|
680
|
-
return spow(x, this.d2p_1);
|
|
681
|
-
};
|
|
682
|
-
protoOf(GammaTransferFunctions).c2p = function (x) {
|
|
683
|
-
return spow(x, 1.0 / this.d2p_1);
|
|
684
|
-
};
|
|
685
|
-
protoOf(GammaTransferFunctions).toString = function () {
|
|
686
|
-
return 'GammaTransferFunctions(gamma=' + this.d2p_1 + ')';
|
|
687
|
-
};
|
|
688
|
-
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
689
|
-
return getNumberHashCode(this.d2p_1);
|
|
690
|
-
};
|
|
691
|
-
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
692
|
-
if (this === other)
|
|
693
|
-
return true;
|
|
694
|
-
if (!(other instanceof GammaTransferFunctions))
|
|
695
|
-
return false;
|
|
696
|
-
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
697
|
-
if (!equals(this.d2p_1, tmp0_other_with_cast.d2p_1))
|
|
698
|
-
return false;
|
|
699
|
-
return true;
|
|
700
|
-
};
|
|
701
|
-
function LinearTransferFunctions() {
|
|
702
|
-
}
|
|
703
|
-
protoOf(LinearTransferFunctions).b2p = function (x) {
|
|
704
|
-
return x;
|
|
705
|
-
};
|
|
706
|
-
protoOf(LinearTransferFunctions).c2p = function (x) {
|
|
707
|
-
return x;
|
|
708
|
-
};
|
|
709
|
-
var LinearTransferFunctions_instance;
|
|
710
|
-
function LinearTransferFunctions_getInstance() {
|
|
711
|
-
return LinearTransferFunctions_instance;
|
|
712
|
-
}
|
|
713
|
-
function RGBColorSpace() {
|
|
714
|
-
}
|
|
715
694
|
function Companion_2() {
|
|
716
695
|
Companion_instance_2 = this;
|
|
717
|
-
this.
|
|
696
|
+
this.l3q_1 = RGBColorSpaces_getInstance().t3q_1;
|
|
718
697
|
}
|
|
719
|
-
protoOf(Companion_2).
|
|
720
|
-
return this.
|
|
698
|
+
protoOf(Companion_2).m3q = function (r, g, b, alpha) {
|
|
699
|
+
return this.l3q_1.m3q(r, g, b, alpha);
|
|
721
700
|
};
|
|
722
|
-
protoOf(Companion_2).
|
|
723
|
-
return this.
|
|
701
|
+
protoOf(Companion_2).q3r = function (r, g, b, alpha) {
|
|
702
|
+
return this.l3q_1.q3r(r, g, b, alpha);
|
|
724
703
|
};
|
|
725
|
-
protoOf(Companion_2).
|
|
726
|
-
return this.
|
|
704
|
+
protoOf(Companion_2).u3o = function (hex) {
|
|
705
|
+
return this.l3q_1.u3o(hex);
|
|
727
706
|
};
|
|
728
|
-
protoOf(Companion_2).
|
|
729
|
-
return this.
|
|
707
|
+
protoOf(Companion_2).r3r = function (r, g, b, alpha) {
|
|
708
|
+
return this.l3q_1.r3r(r, g, b, alpha);
|
|
730
709
|
};
|
|
731
|
-
protoOf(Companion_2).
|
|
732
|
-
return this.
|
|
710
|
+
protoOf(Companion_2).f3r = function () {
|
|
711
|
+
return this.l3q_1.f3r();
|
|
733
712
|
};
|
|
734
|
-
protoOf(Companion_2).
|
|
735
|
-
return this.
|
|
713
|
+
protoOf(Companion_2).s3r = function () {
|
|
714
|
+
return this.l3q_1.s3r();
|
|
736
715
|
};
|
|
737
|
-
protoOf(Companion_2).
|
|
738
|
-
return this.
|
|
716
|
+
protoOf(Companion_2).t3r = function () {
|
|
717
|
+
return this.l3q_1.t3r();
|
|
739
718
|
};
|
|
740
|
-
protoOf(Companion_2).
|
|
741
|
-
return this.
|
|
719
|
+
protoOf(Companion_2).u3r = function () {
|
|
720
|
+
return this.l3q_1.u3r();
|
|
742
721
|
};
|
|
743
|
-
protoOf(Companion_2).
|
|
744
|
-
return this.
|
|
722
|
+
protoOf(Companion_2).m = function () {
|
|
723
|
+
return this.l3q_1.m();
|
|
745
724
|
};
|
|
746
|
-
protoOf(Companion_2).
|
|
747
|
-
return this.
|
|
725
|
+
protoOf(Companion_2).y3p = function () {
|
|
726
|
+
return this.l3q_1.y3p();
|
|
748
727
|
};
|
|
749
728
|
protoOf(Companion_2).equals = function (other) {
|
|
750
|
-
return equals(RGBColorSpaces_getInstance().
|
|
729
|
+
return equals(RGBColorSpaces_getInstance().t3q_1, other);
|
|
751
730
|
};
|
|
752
731
|
protoOf(Companion_2).hashCode = function () {
|
|
753
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
732
|
+
return hashCode(RGBColorSpaces_getInstance().t3q_1);
|
|
754
733
|
};
|
|
755
734
|
var Companion_instance_2;
|
|
756
735
|
function Companion_getInstance_2() {
|
|
@@ -758,164 +737,147 @@ function Companion_getInstance_2() {
|
|
|
758
737
|
new Companion_2();
|
|
759
738
|
return Companion_instance_2;
|
|
760
739
|
}
|
|
761
|
-
function clamp$copy(receiver, p0, p1, p2, p3) {
|
|
762
|
-
return receiver.j2p(p0, p1, p2, p3);
|
|
763
|
-
}
|
|
764
740
|
function RGB(r, g, b, alpha, space) {
|
|
765
741
|
Companion_getInstance_2();
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
768
|
-
this.
|
|
769
|
-
this.
|
|
770
|
-
this.
|
|
742
|
+
this.c3p_1 = r;
|
|
743
|
+
this.d3p_1 = g;
|
|
744
|
+
this.e3p_1 = b;
|
|
745
|
+
this.f3p_1 = alpha;
|
|
746
|
+
this.g3p_1 = space;
|
|
771
747
|
}
|
|
772
|
-
protoOf(RGB).
|
|
773
|
-
return this.
|
|
748
|
+
protoOf(RGB).z3o = function () {
|
|
749
|
+
return this.g3p_1;
|
|
774
750
|
};
|
|
775
|
-
protoOf(RGB).
|
|
751
|
+
protoOf(RGB).v3r = function () {
|
|
776
752
|
// Inline function 'kotlin.math.roundToInt' call
|
|
777
|
-
var this_0 = this.
|
|
753
|
+
var this_0 = this.c3p_1 * 255;
|
|
778
754
|
return roundToInt(this_0);
|
|
779
755
|
};
|
|
780
|
-
protoOf(RGB).
|
|
756
|
+
protoOf(RGB).w3r = function () {
|
|
781
757
|
// Inline function 'kotlin.math.roundToInt' call
|
|
782
|
-
var this_0 = this.
|
|
758
|
+
var this_0 = this.d3p_1 * 255;
|
|
783
759
|
return roundToInt(this_0);
|
|
784
760
|
};
|
|
785
|
-
protoOf(RGB).
|
|
761
|
+
protoOf(RGB).x3r = function () {
|
|
786
762
|
// Inline function 'kotlin.math.roundToInt' call
|
|
787
|
-
var this_0 = this.
|
|
763
|
+
var this_0 = this.e3p_1 * 255;
|
|
788
764
|
return roundToInt(this_0);
|
|
789
765
|
};
|
|
790
|
-
protoOf(RGB).
|
|
791
|
-
var f = SRGB_getInstance().
|
|
792
|
-
return equals(this.
|
|
766
|
+
protoOf(RGB).y3r = function (space) {
|
|
767
|
+
var f = SRGB_getInstance().f3r();
|
|
768
|
+
return equals(this.g3p_1, space) ? this : equals(this.g3p_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().u3q_1) ? space.m3q(f.o3r(this.c3p_1), f.o3r(this.d3p_1), f.o3r(this.e3p_1), this.f3p_1) : equals(this.g3p_1, RGBColorSpaces_getInstance().u3q_1) && equals(space, SRGB_getInstance()) ? space.m3q(f.p3r(this.c3p_1), f.p3r(this.d3p_1), f.p3r(this.e3p_1), this.f3p_1) : this.b3p().e3s(space);
|
|
793
769
|
};
|
|
794
|
-
protoOf(RGB).
|
|
770
|
+
protoOf(RGB).f3s = function () {
|
|
795
771
|
var tmp$ret$3;
|
|
796
772
|
$l$block: {
|
|
797
773
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
798
774
|
// 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.
|
|
775
|
+
var $this$toSRGB = this.y3r(SRGB_getInstance());
|
|
776
|
+
var r = $this$toSRGB.c3p_1;
|
|
777
|
+
var g = $this$toSRGB.d3p_1;
|
|
778
|
+
var b = $this$toSRGB.e3p_1;
|
|
803
779
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
804
780
|
var min = Math.min(r, g, b);
|
|
805
781
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
806
782
|
var max = Math.max(r, g, b);
|
|
807
783
|
var chroma = max - min;
|
|
808
|
-
var
|
|
809
|
-
|
|
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;
|
|
821
|
-
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
822
|
-
var h_0 = normalizeDeg(h);
|
|
784
|
+
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;
|
|
785
|
+
var h_0 = normalizeDeg_0(h);
|
|
823
786
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
824
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
787
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.f3p_1);
|
|
825
788
|
break $l$block;
|
|
826
789
|
}
|
|
827
790
|
return tmp$ret$3;
|
|
828
791
|
};
|
|
829
|
-
protoOf(RGB).
|
|
830
|
-
var f = this.
|
|
792
|
+
protoOf(RGB).b3p = function () {
|
|
793
|
+
var f = this.g3p_1.f3r();
|
|
794
|
+
var tmp0 = _Matrix___init__impl__q3kp4w(this.g3p_1.s3r());
|
|
795
|
+
var tmp2 = f.o3r(this.c3p_1);
|
|
796
|
+
var tmp4 = f.o3r(this.d3p_1);
|
|
831
797
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
832
|
-
var
|
|
833
|
-
var
|
|
834
|
-
var
|
|
835
|
-
var
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
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.u2m_1.i2p()).z2n(x, y, z, this.t2m_1);
|
|
841
|
-
};
|
|
842
|
-
protoOf(RGB).r2n = function () {
|
|
798
|
+
var v2 = f.o3r(this.e3p_1);
|
|
799
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
800
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
801
|
+
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
802
|
+
return XYZColorSpace_0(this.g3p_1.u3r()).m3q(tmp0_0, tmp2_0, z, this.f3p_1);
|
|
803
|
+
};
|
|
804
|
+
protoOf(RGB).e3q = function () {
|
|
843
805
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
844
|
-
var $this$toSRGB = this.
|
|
806
|
+
var $this$toSRGB = this.y3r(SRGB_getInstance());
|
|
845
807
|
// Inline function 'kotlin.math.roundToInt' call
|
|
846
|
-
var this_0 = $this$toSRGB.
|
|
808
|
+
var this_0 = $this$toSRGB.f3s().j3q_1 * 100;
|
|
847
809
|
var value = roundToInt(this_0);
|
|
848
810
|
if (value === 30)
|
|
849
811
|
return new Ansi16(30);
|
|
850
812
|
var v = value / 50 | 0;
|
|
851
813
|
// Inline function 'kotlin.math.roundToInt' call
|
|
852
|
-
var this_1 = $this$toSRGB.
|
|
814
|
+
var this_1 = $this$toSRGB.e3p_1;
|
|
853
815
|
var tmp$ret$1 = roundToInt(this_1);
|
|
854
816
|
var tmp = imul(tmp$ret$1, 4);
|
|
855
817
|
// Inline function 'kotlin.math.roundToInt' call
|
|
856
|
-
var this_2 = $this$toSRGB.
|
|
818
|
+
var this_2 = $this$toSRGB.d3p_1;
|
|
857
819
|
var tmp$ret$2 = roundToInt(this_2);
|
|
858
820
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
859
821
|
// Inline function 'kotlin.math.roundToInt' call
|
|
860
|
-
var this_3 = $this$toSRGB.
|
|
822
|
+
var this_3 = $this$toSRGB.c3p_1;
|
|
861
823
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
862
824
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
863
825
|
};
|
|
864
|
-
protoOf(RGB).
|
|
826
|
+
protoOf(RGB).g3s = function () {
|
|
865
827
|
// 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.
|
|
828
|
+
var $this$toSRGB = this.y3r(SRGB_getInstance());
|
|
829
|
+
var ri = $this$toSRGB.v3r();
|
|
830
|
+
var gi = $this$toSRGB.w3r();
|
|
831
|
+
var bi = $this$toSRGB.x3r();
|
|
870
832
|
var tmp;
|
|
871
833
|
if (ri === gi && gi === bi) {
|
|
872
834
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
873
835
|
} else {
|
|
874
836
|
// Inline function 'kotlin.math.roundToInt' call
|
|
875
|
-
var this_0 = $this$toSRGB.
|
|
837
|
+
var this_0 = $this$toSRGB.c3p_1 * 5;
|
|
876
838
|
var tmp$ret$0 = roundToInt(this_0);
|
|
877
839
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
878
840
|
// Inline function 'kotlin.math.roundToInt' call
|
|
879
|
-
var this_1 = $this$toSRGB.
|
|
841
|
+
var this_1 = $this$toSRGB.d3p_1 * 5;
|
|
880
842
|
var tmp$ret$1 = roundToInt(this_1);
|
|
881
843
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
882
844
|
// Inline function 'kotlin.math.roundToInt' call
|
|
883
|
-
var this_2 = $this$toSRGB.
|
|
845
|
+
var this_2 = $this$toSRGB.e3p_1 * 5;
|
|
884
846
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
885
847
|
}
|
|
886
848
|
var code = tmp;
|
|
887
849
|
return new Ansi256(code);
|
|
888
850
|
};
|
|
889
|
-
protoOf(RGB).
|
|
890
|
-
return this.
|
|
851
|
+
protoOf(RGB).a3p = function () {
|
|
852
|
+
return this.y3r(RGBColorSpaces_getInstance().t3q_1);
|
|
891
853
|
};
|
|
892
|
-
protoOf(RGB).
|
|
854
|
+
protoOf(RGB).h3s = function () {
|
|
855
|
+
var tmp2 = this.c3p_1;
|
|
856
|
+
var tmp4 = this.d3p_1;
|
|
857
|
+
var tmp6 = this.e3p_1;
|
|
893
858
|
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
894
|
-
var
|
|
895
|
-
var
|
|
896
|
-
var v3 = this.s2m_1;
|
|
897
|
-
var alpha = this.t2m_1;
|
|
898
|
-
var tmp0_container = this.n2m().l2n();
|
|
859
|
+
var alpha = this.f3p_1;
|
|
860
|
+
var _destruct__k2r9zo = this.z3o().y3p();
|
|
899
861
|
// Inline function 'kotlin.collections.component1' call
|
|
900
|
-
var c1 =
|
|
862
|
+
var c1 = _destruct__k2r9zo.f1(0);
|
|
901
863
|
// Inline function 'kotlin.collections.component2' call
|
|
902
|
-
var c2 =
|
|
864
|
+
var c2 = _destruct__k2r9zo.f1(1);
|
|
903
865
|
// Inline function 'kotlin.collections.component3' call
|
|
904
|
-
var c3 =
|
|
866
|
+
var c3 = _destruct__k2r9zo.f1(2);
|
|
905
867
|
var tmp;
|
|
906
868
|
var tmp_0;
|
|
907
869
|
var tmp_1;
|
|
908
870
|
var tmp_2;
|
|
909
|
-
var containsLower = c1.
|
|
910
|
-
if (
|
|
911
|
-
var containsLower_0 = c2.
|
|
912
|
-
tmp_2 =
|
|
871
|
+
var containsLower = c1.j3p_1;
|
|
872
|
+
if (tmp2 <= c1.k3p_1 ? containsLower <= tmp2 : false) {
|
|
873
|
+
var containsLower_0 = c2.j3p_1;
|
|
874
|
+
tmp_2 = tmp4 <= c2.k3p_1 ? containsLower_0 <= tmp4 : false;
|
|
913
875
|
} else {
|
|
914
876
|
tmp_2 = false;
|
|
915
877
|
}
|
|
916
878
|
if (tmp_2) {
|
|
917
|
-
var containsLower_1 = c3.
|
|
918
|
-
tmp_1 =
|
|
879
|
+
var containsLower_1 = c3.j3p_1;
|
|
880
|
+
tmp_1 = tmp6 <= c3.k3p_1 ? containsLower_1 <= tmp6 : false;
|
|
919
881
|
} else {
|
|
920
882
|
tmp_1 = false;
|
|
921
883
|
}
|
|
@@ -927,30 +889,34 @@ protoOf(RGB).w2p = function () {
|
|
|
927
889
|
if (tmp_0) {
|
|
928
890
|
tmp = this;
|
|
929
891
|
} else {
|
|
930
|
-
|
|
892
|
+
var tmp2_0 = coerceIn(tmp2, c1.j3p_1, c1.k3p_1);
|
|
893
|
+
var tmp4_0 = coerceIn(tmp4, c2.j3p_1, c2.k3p_1);
|
|
894
|
+
var tmp6_0 = coerceIn(tmp6, c3.j3p_1, c3.k3p_1);
|
|
895
|
+
var p3 = coerceIn(alpha, 0.0, 1.0);
|
|
896
|
+
tmp = this.i3s(tmp2_0, tmp4_0, tmp6_0, p3);
|
|
931
897
|
}
|
|
932
898
|
return tmp;
|
|
933
899
|
};
|
|
934
|
-
protoOf(RGB).
|
|
900
|
+
protoOf(RGB).j3s = function (r, g, b, alpha, space) {
|
|
935
901
|
return new RGB(r, g, b, alpha, space);
|
|
936
902
|
};
|
|
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.
|
|
903
|
+
protoOf(RGB).i3s = function (r, g, b, alpha, space, $super) {
|
|
904
|
+
r = r === VOID ? this.c3p_1 : r;
|
|
905
|
+
g = g === VOID ? this.d3p_1 : g;
|
|
906
|
+
b = b === VOID ? this.e3p_1 : b;
|
|
907
|
+
alpha = alpha === VOID ? this.f3p_1 : alpha;
|
|
908
|
+
space = space === VOID ? this.g3p_1 : space;
|
|
909
|
+
return $super === VOID ? this.j3s(r, g, b, alpha, space) : $super.j3s.call(this, r, g, b, alpha, space);
|
|
944
910
|
};
|
|
945
911
|
protoOf(RGB).toString = function () {
|
|
946
|
-
return 'RGB(r=' + this.
|
|
912
|
+
return 'RGB(r=' + this.c3p_1 + ', g=' + this.d3p_1 + ', b=' + this.e3p_1 + ', alpha=' + this.f3p_1 + ', space=' + toString(this.g3p_1) + ')';
|
|
947
913
|
};
|
|
948
914
|
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.
|
|
915
|
+
var result = getNumberHashCode(this.c3p_1);
|
|
916
|
+
result = imul(result, 31) + getNumberHashCode(this.d3p_1) | 0;
|
|
917
|
+
result = imul(result, 31) + getNumberHashCode(this.e3p_1) | 0;
|
|
918
|
+
result = imul(result, 31) + getNumberHashCode(this.f3p_1) | 0;
|
|
919
|
+
result = imul(result, 31) + hashCode(this.g3p_1) | 0;
|
|
954
920
|
return result;
|
|
955
921
|
};
|
|
956
922
|
protoOf(RGB).equals = function (other) {
|
|
@@ -959,29 +925,66 @@ protoOf(RGB).equals = function (other) {
|
|
|
959
925
|
if (!(other instanceof RGB))
|
|
960
926
|
return false;
|
|
961
927
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
962
|
-
if (!equals(this.
|
|
928
|
+
if (!equals(this.c3p_1, tmp0_other_with_cast.c3p_1))
|
|
963
929
|
return false;
|
|
964
|
-
if (!equals(this.
|
|
930
|
+
if (!equals(this.d3p_1, tmp0_other_with_cast.d3p_1))
|
|
965
931
|
return false;
|
|
966
|
-
if (!equals(this.
|
|
932
|
+
if (!equals(this.e3p_1, tmp0_other_with_cast.e3p_1))
|
|
967
933
|
return false;
|
|
968
|
-
if (!equals(this.
|
|
934
|
+
if (!equals(this.f3p_1, tmp0_other_with_cast.f3p_1))
|
|
969
935
|
return false;
|
|
970
|
-
if (!equals(this.
|
|
936
|
+
if (!equals(this.g3p_1, tmp0_other_with_cast.g3p_1))
|
|
971
937
|
return false;
|
|
972
938
|
return true;
|
|
973
939
|
};
|
|
940
|
+
function GammaTransferFunctions(gamma) {
|
|
941
|
+
this.k3s_1 = gamma;
|
|
942
|
+
}
|
|
943
|
+
protoOf(GammaTransferFunctions).o3r = function (x) {
|
|
944
|
+
return spow(x, this.k3s_1);
|
|
945
|
+
};
|
|
946
|
+
protoOf(GammaTransferFunctions).p3r = function (x) {
|
|
947
|
+
return spow(x, 1.0 / this.k3s_1);
|
|
948
|
+
};
|
|
949
|
+
protoOf(GammaTransferFunctions).toString = function () {
|
|
950
|
+
return 'GammaTransferFunctions(gamma=' + this.k3s_1 + ')';
|
|
951
|
+
};
|
|
952
|
+
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
953
|
+
return getNumberHashCode(this.k3s_1);
|
|
954
|
+
};
|
|
955
|
+
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
956
|
+
if (this === other)
|
|
957
|
+
return true;
|
|
958
|
+
if (!(other instanceof GammaTransferFunctions))
|
|
959
|
+
return false;
|
|
960
|
+
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
961
|
+
if (!equals(this.k3s_1, tmp0_other_with_cast.k3s_1))
|
|
962
|
+
return false;
|
|
963
|
+
return true;
|
|
964
|
+
};
|
|
965
|
+
function LinearTransferFunctions() {
|
|
966
|
+
}
|
|
967
|
+
protoOf(LinearTransferFunctions).o3r = function (x) {
|
|
968
|
+
return x;
|
|
969
|
+
};
|
|
970
|
+
protoOf(LinearTransferFunctions).p3r = function (x) {
|
|
971
|
+
return x;
|
|
972
|
+
};
|
|
973
|
+
var LinearTransferFunctions_instance;
|
|
974
|
+
function LinearTransferFunctions_getInstance() {
|
|
975
|
+
return LinearTransferFunctions_instance;
|
|
976
|
+
}
|
|
977
|
+
function RGBColorSpace() {
|
|
978
|
+
}
|
|
974
979
|
function parseHex(_this__u8e3s4, startIndex) {
|
|
975
980
|
var tmp;
|
|
976
981
|
if (get_hexLength(_this__u8e3s4) > 4) {
|
|
977
|
-
var i =
|
|
982
|
+
var i = charCodeAt(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
|
|
978
983
|
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
979
984
|
} else {
|
|
980
|
-
var i_0 =
|
|
985
|
+
var i_0 = charCodeAt(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
|
|
981
986
|
// Inline function 'kotlin.let' call
|
|
982
|
-
|
|
983
|
-
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
984
|
-
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
987
|
+
var it = charCodeAt(_this__u8e3s4, i_0);
|
|
985
988
|
var tmp$ret$1 = toString_0(it) + toString_0(it);
|
|
986
989
|
tmp = toInt(tmp$ret$1, 16);
|
|
987
990
|
}
|
|
@@ -989,26 +992,10 @@ function parseHex(_this__u8e3s4, startIndex) {
|
|
|
989
992
|
}
|
|
990
993
|
function validateHex(_this__u8e3s4) {
|
|
991
994
|
// Inline function 'kotlin.apply' call
|
|
992
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
993
|
-
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
|
|
994
|
-
// Inline function 'kotlin.require' call
|
|
995
995
|
// Inline function 'kotlin.let' call
|
|
996
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
997
|
-
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
998
996
|
var it = get_hexLength(_this__u8e3s4);
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
case 4:
|
|
1002
|
-
case 6:
|
|
1003
|
-
var tmp$ret$0 = true;
|
|
1004
|
-
break;
|
|
1005
|
-
default:
|
|
1006
|
-
tmp$ret$0 = it === 8;
|
|
1007
|
-
break;
|
|
1008
|
-
}
|
|
1009
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1010
|
-
if (!tmp$ret$0) {
|
|
1011
|
-
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
997
|
+
// Inline function 'kotlin.require' call
|
|
998
|
+
if (!(it === 3 || it === 4 || it === 6 || it === 8)) {
|
|
1012
999
|
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
1013
1000
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1014
1001
|
}
|
|
@@ -1067,18 +1054,67 @@ function get_ACES_AP1_B() {
|
|
|
1067
1054
|
return ACES_AP1_B;
|
|
1068
1055
|
}
|
|
1069
1056
|
var ACES_AP1_B;
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1057
|
+
function SRGB() {
|
|
1058
|
+
SRGB_instance = this;
|
|
1059
|
+
this.n3q_1 = RGBColorSpaces_getInstance().t3q_1;
|
|
1072
1060
|
}
|
|
1073
|
-
function
|
|
1061
|
+
protoOf(SRGB).m3q = function (r, g, b, alpha) {
|
|
1062
|
+
return this.n3q_1.m3q(r, g, b, alpha);
|
|
1063
|
+
};
|
|
1064
|
+
protoOf(SRGB).q3r = function (r, g, b, alpha) {
|
|
1065
|
+
return this.n3q_1.q3r(r, g, b, alpha);
|
|
1066
|
+
};
|
|
1067
|
+
protoOf(SRGB).u3o = function (hex) {
|
|
1068
|
+
return this.n3q_1.u3o(hex);
|
|
1069
|
+
};
|
|
1070
|
+
protoOf(SRGB).r3r = function (r, g, b, alpha) {
|
|
1071
|
+
return this.n3q_1.r3r(r, g, b, alpha);
|
|
1072
|
+
};
|
|
1073
|
+
protoOf(SRGB).f3r = function () {
|
|
1074
|
+
return this.n3q_1.f3r();
|
|
1075
|
+
};
|
|
1076
|
+
protoOf(SRGB).s3r = function () {
|
|
1077
|
+
return this.n3q_1.s3r();
|
|
1078
|
+
};
|
|
1079
|
+
protoOf(SRGB).t3r = function () {
|
|
1080
|
+
return this.n3q_1.t3r();
|
|
1081
|
+
};
|
|
1082
|
+
protoOf(SRGB).u3r = function () {
|
|
1083
|
+
return this.n3q_1.u3r();
|
|
1084
|
+
};
|
|
1085
|
+
protoOf(SRGB).m = function () {
|
|
1086
|
+
return this.n3q_1.m();
|
|
1087
|
+
};
|
|
1088
|
+
protoOf(SRGB).y3p = function () {
|
|
1089
|
+
return this.n3q_1.y3p();
|
|
1090
|
+
};
|
|
1091
|
+
protoOf(SRGB).equals = function (other) {
|
|
1092
|
+
return equals(RGBColorSpaces_getInstance().t3q_1, other);
|
|
1093
|
+
};
|
|
1094
|
+
protoOf(SRGB).hashCode = function () {
|
|
1095
|
+
return hashCode(RGBColorSpaces_getInstance().t3q_1);
|
|
1096
|
+
};
|
|
1097
|
+
protoOf(SRGB).toString = function () {
|
|
1098
|
+
return 'sRGB';
|
|
1099
|
+
};
|
|
1100
|
+
var SRGB_instance;
|
|
1101
|
+
function SRGB_getInstance() {
|
|
1102
|
+
if (SRGB_instance == null)
|
|
1103
|
+
new SRGB();
|
|
1104
|
+
return SRGB_instance;
|
|
1105
|
+
}
|
|
1106
|
+
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1107
|
+
return it.a3p();
|
|
1108
|
+
}
|
|
1109
|
+
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1074
1110
|
var tmp;
|
|
1075
1111
|
if (color instanceof RGB) {
|
|
1076
|
-
tmp = color.
|
|
1112
|
+
tmp = color.y3r($this$RGBColorSpaceImpl);
|
|
1077
1113
|
} else {
|
|
1078
1114
|
if (color instanceof ICtCp) {
|
|
1079
|
-
tmp = color.
|
|
1115
|
+
tmp = color.s3q();
|
|
1080
1116
|
} else {
|
|
1081
|
-
tmp = color.
|
|
1117
|
+
tmp = color.b3p().e3s($this$RGBColorSpaceImpl);
|
|
1082
1118
|
}
|
|
1083
1119
|
}
|
|
1084
1120
|
return tmp;
|
|
@@ -1086,29 +1122,29 @@ function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
|
1086
1122
|
function RGBColorSpaces() {
|
|
1087
1123
|
RGBColorSpaces_instance = this;
|
|
1088
1124
|
var tmp = this;
|
|
1089
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1125
|
+
var tmp_0 = Illuminant_getInstance().s3p_1;
|
|
1090
1126
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1091
1127
|
var tmp_2 = get_SRGB_R();
|
|
1092
1128
|
var tmp_3 = get_SRGB_G();
|
|
1093
1129
|
var tmp_4 = get_SRGB_B();
|
|
1094
|
-
tmp.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1100
|
-
this.
|
|
1130
|
+
tmp.t3q_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1131
|
+
this.u3q_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().s3p_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1132
|
+
this.v3q_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1133
|
+
this.w3q_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1134
|
+
this.x3q_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1135
|
+
this.y3q_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1136
|
+
this.z3q_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().s3p_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
1137
|
var tmp_5 = this;
|
|
1102
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1138
|
+
var tmp_6 = Illuminant_getInstance().s3p_1;
|
|
1103
1139
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1104
1140
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1105
1141
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1106
1142
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1107
|
-
tmp_5.
|
|
1108
|
-
this.
|
|
1109
|
-
this.
|
|
1110
|
-
this.
|
|
1111
|
-
this.
|
|
1143
|
+
tmp_5.a3r_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1144
|
+
this.b3r_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().s3p_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1145
|
+
this.c3r_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));
|
|
1146
|
+
this.d3r_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().s3p_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1147
|
+
this.e3r_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().q3p_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
1148
|
}
|
|
1113
1149
|
var RGBColorSpaces_instance;
|
|
1114
1150
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1116,89 +1152,40 @@ function RGBColorSpaces_getInstance() {
|
|
|
1116
1152
|
new RGBColorSpaces();
|
|
1117
1153
|
return RGBColorSpaces_instance;
|
|
1118
1154
|
}
|
|
1119
|
-
function SRGB() {
|
|
1120
|
-
SRGB_instance = this;
|
|
1121
|
-
this.a2o_1 = RGBColorSpaces_getInstance().g2o_1;
|
|
1122
|
-
}
|
|
1123
|
-
protoOf(SRGB).l2n = function () {
|
|
1124
|
-
return this.a2o_1.l2n();
|
|
1125
|
-
};
|
|
1126
|
-
protoOf(SRGB).h2p = function () {
|
|
1127
|
-
return this.a2o_1.h2p();
|
|
1128
|
-
};
|
|
1129
|
-
protoOf(SRGB).g2p = function () {
|
|
1130
|
-
return this.a2o_1.g2p();
|
|
1131
|
-
};
|
|
1132
|
-
protoOf(SRGB).s2 = function () {
|
|
1133
|
-
return this.a2o_1.s2();
|
|
1134
|
-
};
|
|
1135
|
-
protoOf(SRGB).s2o = function () {
|
|
1136
|
-
return this.a2o_1.s2o();
|
|
1137
|
-
};
|
|
1138
|
-
protoOf(SRGB).i2p = function () {
|
|
1139
|
-
return this.a2o_1.i2p();
|
|
1140
|
-
};
|
|
1141
|
-
protoOf(SRGB).f2p = function (r, g, b, alpha) {
|
|
1142
|
-
return this.a2o_1.f2p(r, g, b, alpha);
|
|
1143
|
-
};
|
|
1144
|
-
protoOf(SRGB).z2n = function (r, g, b, alpha) {
|
|
1145
|
-
return this.a2o_1.z2n(r, g, b, alpha);
|
|
1146
|
-
};
|
|
1147
|
-
protoOf(SRGB).e2p = function (r, g, b, alpha) {
|
|
1148
|
-
return this.a2o_1.e2p(r, g, b, alpha);
|
|
1149
|
-
};
|
|
1150
|
-
protoOf(SRGB).r2j = function (hex) {
|
|
1151
|
-
return this.a2o_1.r2j(hex);
|
|
1152
|
-
};
|
|
1153
|
-
protoOf(SRGB).equals = function (other) {
|
|
1154
|
-
return equals(RGBColorSpaces_getInstance().g2o_1, other);
|
|
1155
|
-
};
|
|
1156
|
-
protoOf(SRGB).hashCode = function () {
|
|
1157
|
-
return hashCode(RGBColorSpaces_getInstance().g2o_1);
|
|
1158
|
-
};
|
|
1159
|
-
protoOf(SRGB).toString = function () {
|
|
1160
|
-
return 'sRGB';
|
|
1161
|
-
};
|
|
1162
|
-
var SRGB_instance;
|
|
1163
|
-
function SRGB_getInstance() {
|
|
1164
|
-
if (SRGB_instance == null)
|
|
1165
|
-
new SRGB();
|
|
1166
|
-
return SRGB_instance;
|
|
1167
|
-
}
|
|
1168
1155
|
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.
|
|
1156
|
+
this.l3s_1 = name;
|
|
1157
|
+
this.m3s_1 = whitePoint;
|
|
1158
|
+
this.n3s_1 = transferFunctions;
|
|
1159
|
+
this.o3s_1 = r;
|
|
1160
|
+
this.p3s_1 = g;
|
|
1161
|
+
this.q3s_1 = b;
|
|
1162
|
+
this.r3s_1 = convertImpl;
|
|
1163
|
+
this.s3s_1 = zeroOneComponentInfo('RGB');
|
|
1164
|
+
this.t3s_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.m3s_1, this.o3s_1, this.p3s_1, this.q3s_1));
|
|
1165
|
+
this.u3s_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.t3s_1)));
|
|
1179
1166
|
}
|
|
1180
|
-
protoOf(RGBColorSpaceImpl).
|
|
1181
|
-
return this.
|
|
1167
|
+
protoOf(RGBColorSpaceImpl).m = function () {
|
|
1168
|
+
return this.l3s_1;
|
|
1182
1169
|
};
|
|
1183
|
-
protoOf(RGBColorSpaceImpl).
|
|
1184
|
-
return this.
|
|
1170
|
+
protoOf(RGBColorSpaceImpl).u3r = function () {
|
|
1171
|
+
return this.m3s_1;
|
|
1185
1172
|
};
|
|
1186
|
-
protoOf(RGBColorSpaceImpl).
|
|
1187
|
-
return this.
|
|
1173
|
+
protoOf(RGBColorSpaceImpl).f3r = function () {
|
|
1174
|
+
return this.n3s_1;
|
|
1188
1175
|
};
|
|
1189
|
-
protoOf(RGBColorSpaceImpl).
|
|
1190
|
-
return this.
|
|
1176
|
+
protoOf(RGBColorSpaceImpl).y3p = function () {
|
|
1177
|
+
return this.s3s_1;
|
|
1191
1178
|
};
|
|
1192
|
-
protoOf(RGBColorSpaceImpl).
|
|
1193
|
-
return this.
|
|
1179
|
+
protoOf(RGBColorSpaceImpl).s3r = function () {
|
|
1180
|
+
return this.t3s_1;
|
|
1194
1181
|
};
|
|
1195
|
-
protoOf(RGBColorSpaceImpl).
|
|
1196
|
-
return this.
|
|
1182
|
+
protoOf(RGBColorSpaceImpl).t3r = function () {
|
|
1183
|
+
return this.u3s_1;
|
|
1197
1184
|
};
|
|
1198
1185
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1199
|
-
return this.
|
|
1186
|
+
return this.l3s_1;
|
|
1200
1187
|
};
|
|
1201
|
-
protoOf(RGBColorSpaceImpl).
|
|
1188
|
+
protoOf(RGBColorSpaceImpl).m3q = function (r, g, b, alpha) {
|
|
1202
1189
|
return new RGB(r, g, b, alpha, this);
|
|
1203
1190
|
};
|
|
1204
1191
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1206,42 +1193,42 @@ protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
|
1206
1193
|
return true;
|
|
1207
1194
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1208
1195
|
return false;
|
|
1209
|
-
if (!(this.
|
|
1196
|
+
if (!(this.l3s_1 === other.m()))
|
|
1210
1197
|
return false;
|
|
1211
|
-
if (!this.
|
|
1198
|
+
if (!this.m3s_1.equals(other.u3r()))
|
|
1212
1199
|
return false;
|
|
1213
|
-
if (!equals(this.
|
|
1200
|
+
if (!equals(this.n3s_1, other.f3r()))
|
|
1214
1201
|
return false;
|
|
1215
1202
|
if (other instanceof RGBColorSpaceImpl) {
|
|
1216
|
-
if (!this.
|
|
1203
|
+
if (!this.o3s_1.equals(other.o3s_1))
|
|
1217
1204
|
return false;
|
|
1218
|
-
if (!this.
|
|
1205
|
+
if (!this.p3s_1.equals(other.p3s_1))
|
|
1219
1206
|
return false;
|
|
1220
|
-
if (!this.
|
|
1207
|
+
if (!this.q3s_1.equals(other.q3s_1))
|
|
1221
1208
|
return false;
|
|
1222
1209
|
} else {
|
|
1223
|
-
if (!contentEquals(this.
|
|
1210
|
+
if (!contentEquals(this.t3s_1, other.s3r()))
|
|
1224
1211
|
return false;
|
|
1225
|
-
if (!contentEquals(this.
|
|
1212
|
+
if (!contentEquals(this.u3s_1, other.t3r()))
|
|
1226
1213
|
return false;
|
|
1227
1214
|
}
|
|
1228
1215
|
return true;
|
|
1229
1216
|
};
|
|
1230
1217
|
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.
|
|
1218
|
+
var result = getStringHashCode(this.l3s_1);
|
|
1219
|
+
result = imul(31, result) + this.m3s_1.hashCode() | 0;
|
|
1220
|
+
result = imul(31, result) + hashCode(this.n3s_1) | 0;
|
|
1221
|
+
result = imul(31, result) + this.o3s_1.hashCode() | 0;
|
|
1222
|
+
result = imul(31, result) + this.p3s_1.hashCode() | 0;
|
|
1223
|
+
result = imul(31, result) + this.q3s_1.hashCode() | 0;
|
|
1237
1224
|
return result;
|
|
1238
1225
|
};
|
|
1239
1226
|
function SRGBTransferFunctions() {
|
|
1240
1227
|
}
|
|
1241
|
-
protoOf(SRGBTransferFunctions).
|
|
1228
|
+
protoOf(SRGBTransferFunctions).p3r = function (x) {
|
|
1242
1229
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1243
1230
|
};
|
|
1244
|
-
protoOf(SRGBTransferFunctions).
|
|
1231
|
+
protoOf(SRGBTransferFunctions).o3r = function (x) {
|
|
1245
1232
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1246
1233
|
};
|
|
1247
1234
|
var SRGBTransferFunctions_instance;
|
|
@@ -1254,39 +1241,30 @@ function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
|
|
|
1254
1241
|
}
|
|
1255
1242
|
function ACESccTransferFunctions() {
|
|
1256
1243
|
ACESccTransferFunctions_instance = this;
|
|
1257
|
-
this.
|
|
1258
|
-
this.
|
|
1259
|
-
this.
|
|
1244
|
+
this.v3s_1 = 3.0517578125E-5;
|
|
1245
|
+
this.w3s_1 = 1.52587890625E-5;
|
|
1246
|
+
this.x3s_1 = -0.3013698630136986;
|
|
1260
1247
|
var tmp = this;
|
|
1261
1248
|
// Inline function 'kotlin.math.log2' call
|
|
1262
|
-
tmp.
|
|
1249
|
+
tmp.y3s_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1263
1250
|
}
|
|
1264
|
-
protoOf(ACESccTransferFunctions).
|
|
1251
|
+
protoOf(ACESccTransferFunctions).o3r = function (x) {
|
|
1265
1252
|
var tmp;
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
if (
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
tmp = (
|
|
1253
|
+
if (x <= -0.3013698630136986) {
|
|
1254
|
+
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1255
|
+
} else if (x < this.y3s_1) {
|
|
1256
|
+
// Inline function 'kotlin.math.pow' call
|
|
1257
|
+
var x_0 = x * 17.52 - 9.72;
|
|
1258
|
+
tmp = Math.pow(2.0, x_0);
|
|
1272
1259
|
} 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
|
-
}
|
|
1260
|
+
tmp = 65504.0;
|
|
1280
1261
|
}
|
|
1281
1262
|
return tmp;
|
|
1282
1263
|
};
|
|
1283
|
-
protoOf(ACESccTransferFunctions).
|
|
1264
|
+
protoOf(ACESccTransferFunctions).p3r = function (x) {
|
|
1284
1265
|
var tmp;
|
|
1285
|
-
|
|
1286
|
-
ACESccTransferFunctions_getInstance();
|
|
1287
|
-
if (tmp_0 < 3.0517578125E-5) {
|
|
1266
|
+
if (x < 3.0517578125E-5) {
|
|
1288
1267
|
// Inline function 'kotlin.math.log2' call
|
|
1289
|
-
ACESccTransferFunctions_getInstance();
|
|
1290
1268
|
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
1291
1269
|
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
1292
1270
|
} else {
|
|
@@ -1303,20 +1281,17 @@ function ACESccTransferFunctions_getInstance() {
|
|
|
1303
1281
|
}
|
|
1304
1282
|
function ACEScctTransferFunctions() {
|
|
1305
1283
|
ACEScctTransferFunctions_instance = this;
|
|
1306
|
-
this.
|
|
1307
|
-
this.
|
|
1284
|
+
this.z3s_1 = 10.5402377416545;
|
|
1285
|
+
this.a3t_1 = 0.0729055341958355;
|
|
1308
1286
|
var tmp = this;
|
|
1309
1287
|
// Inline function 'kotlin.math.log2' call
|
|
1310
|
-
tmp.
|
|
1288
|
+
tmp.b3t_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1311
1289
|
}
|
|
1312
|
-
protoOf(ACEScctTransferFunctions).
|
|
1290
|
+
protoOf(ACEScctTransferFunctions).o3r = function (x) {
|
|
1313
1291
|
var tmp;
|
|
1314
1292
|
if (x <= 0.155251141552511) {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
ACEScctTransferFunctions_getInstance();
|
|
1318
|
-
tmp = tmp_0 / 10.5402377416545;
|
|
1319
|
-
} else if (x < this.o2q_1) {
|
|
1293
|
+
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1294
|
+
} else if (x < this.b3t_1) {
|
|
1320
1295
|
// Inline function 'kotlin.math.pow' call
|
|
1321
1296
|
var x_0 = x * 17.52 - 9.72;
|
|
1322
1297
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1325,13 +1300,10 @@ protoOf(ACEScctTransferFunctions).b2p = function (x) {
|
|
|
1325
1300
|
}
|
|
1326
1301
|
return tmp;
|
|
1327
1302
|
};
|
|
1328
|
-
protoOf(ACEScctTransferFunctions).
|
|
1303
|
+
protoOf(ACEScctTransferFunctions).p3r = function (x) {
|
|
1329
1304
|
var tmp;
|
|
1330
1305
|
if (x < 0.0078125) {
|
|
1331
|
-
|
|
1332
|
-
var tmp_0 = 10.5402377416545 * x;
|
|
1333
|
-
ACEScctTransferFunctions_getInstance();
|
|
1334
|
-
tmp = tmp_0 + 0.0729055341958355;
|
|
1306
|
+
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
1335
1307
|
} else {
|
|
1336
1308
|
// Inline function 'kotlin.math.log2' call
|
|
1337
1309
|
tmp = (log2(x) + 9.72) / 17.52;
|
|
@@ -1346,41 +1318,17 @@ function ACEScctTransferFunctions_getInstance() {
|
|
|
1346
1318
|
}
|
|
1347
1319
|
function BT2020TransferFunctions() {
|
|
1348
1320
|
BT2020TransferFunctions_instance = this;
|
|
1349
|
-
this.
|
|
1350
|
-
this.
|
|
1321
|
+
this.c3t_1 = 1.0993;
|
|
1322
|
+
this.d3t_1 = 0.0181;
|
|
1351
1323
|
var tmp = this;
|
|
1352
|
-
BT2020TransferFunctions_getInstance();
|
|
1353
1324
|
// Inline function 'kotlin.math.pow' call
|
|
1354
|
-
|
|
1355
|
-
var tmp_0 = 1.0993 * Math.pow(0.0181, 0.45);
|
|
1356
|
-
BT2020TransferFunctions_getInstance();
|
|
1357
|
-
tmp.r2q_1 = tmp_0 - (1.0993 - 1);
|
|
1325
|
+
tmp.e3t_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1358
1326
|
}
|
|
1359
|
-
protoOf(BT2020TransferFunctions).
|
|
1360
|
-
|
|
1361
|
-
if (x < this.r2q_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);
|
|
1327
|
+
protoOf(BT2020TransferFunctions).o3r = function (x) {
|
|
1328
|
+
return numberToDouble(x < this.e3t_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1370
1329
|
};
|
|
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;
|
|
1330
|
+
protoOf(BT2020TransferFunctions).p3r = function (x) {
|
|
1331
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1384
1332
|
};
|
|
1385
1333
|
var BT2020TransferFunctions_instance;
|
|
1386
1334
|
function BT2020TransferFunctions_getInstance() {
|
|
@@ -1390,12 +1338,12 @@ function BT2020TransferFunctions_getInstance() {
|
|
|
1390
1338
|
}
|
|
1391
1339
|
function BT709TransferFunctions() {
|
|
1392
1340
|
BT709TransferFunctions_instance = this;
|
|
1393
|
-
this.
|
|
1341
|
+
this.f3t_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1394
1342
|
}
|
|
1395
|
-
protoOf(BT709TransferFunctions).
|
|
1396
|
-
return numberToDouble(x < this.
|
|
1343
|
+
protoOf(BT709TransferFunctions).o3r = function (x) {
|
|
1344
|
+
return numberToDouble(x < this.f3t_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1397
1345
|
};
|
|
1398
|
-
protoOf(BT709TransferFunctions).
|
|
1346
|
+
protoOf(BT709TransferFunctions).p3r = function (x) {
|
|
1399
1347
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1400
1348
|
};
|
|
1401
1349
|
var BT709TransferFunctions_instance;
|
|
@@ -1405,27 +1353,13 @@ function BT709TransferFunctions_getInstance() {
|
|
|
1405
1353
|
return BT709TransferFunctions_instance;
|
|
1406
1354
|
}
|
|
1407
1355
|
function ROMMTransferFunctions() {
|
|
1408
|
-
this.
|
|
1356
|
+
this.g3t_1 = 0.001953;
|
|
1409
1357
|
}
|
|
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;
|
|
1358
|
+
protoOf(ROMMTransferFunctions).o3r = function (x) {
|
|
1359
|
+
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1419
1360
|
};
|
|
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;
|
|
1361
|
+
protoOf(ROMMTransferFunctions).p3r = function (x) {
|
|
1362
|
+
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1429
1363
|
};
|
|
1430
1364
|
var ROMMTransferFunctions_instance;
|
|
1431
1365
|
function ROMMTransferFunctions_getInstance() {
|
|
@@ -1433,26 +1367,25 @@ function ROMMTransferFunctions_getInstance() {
|
|
|
1433
1367
|
}
|
|
1434
1368
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1435
1369
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1436
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1437
|
-
var wp = whitePoint.
|
|
1370
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.h3t_1, g.h3t_1, b.h3t_1, r.i3t_1, g.i3t_1, b.i3t_1, r.k3t(), g.k3t(), b.k3t());
|
|
1371
|
+
var wp = whitePoint.m3p_1;
|
|
1372
|
+
var tmp0 = inverse(primaries);
|
|
1373
|
+
var tmp2 = wp.l3t();
|
|
1374
|
+
var tmp4 = wp.j3t_1;
|
|
1438
1375
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1439
|
-
var
|
|
1440
|
-
var
|
|
1441
|
-
var
|
|
1442
|
-
var
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
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
|
-
return dotDiagonal(primaries, x, y, z);
|
|
1448
|
-
}
|
|
1449
|
-
function RGBColorSpace$lambda($this$$receiver, color) {
|
|
1376
|
+
var v2 = wp.m3t();
|
|
1377
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1378
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1379
|
+
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
1380
|
+
return dotDiagonal(primaries, tmp0_0, tmp2_0, z);
|
|
1381
|
+
}
|
|
1382
|
+
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
1450
1383
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1451
1384
|
var tmp;
|
|
1452
1385
|
if (color instanceof RGB) {
|
|
1453
|
-
tmp = color.
|
|
1386
|
+
tmp = color.y3r($this$RGBColorSpaceImpl);
|
|
1454
1387
|
} else {
|
|
1455
|
-
tmp = color.
|
|
1388
|
+
tmp = color.b3p().e3s($this$RGBColorSpaceImpl);
|
|
1456
1389
|
}
|
|
1457
1390
|
return tmp;
|
|
1458
1391
|
}
|
|
@@ -1474,22 +1407,25 @@ function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
|
1474
1407
|
}
|
|
1475
1408
|
function Companion_3() {
|
|
1476
1409
|
Companion_instance_3 = this;
|
|
1477
|
-
this.
|
|
1410
|
+
this.n3t_1 = XYZColorSpaces_getInstance().o3t_1;
|
|
1478
1411
|
}
|
|
1479
|
-
protoOf(Companion_3).
|
|
1480
|
-
return this.
|
|
1412
|
+
protoOf(Companion_3).m3q = function (x, y, z, alpha) {
|
|
1413
|
+
return this.n3t_1.m3q(x, y, z, alpha);
|
|
1414
|
+
};
|
|
1415
|
+
protoOf(Companion_3).u3r = function () {
|
|
1416
|
+
return this.n3t_1.u3r();
|
|
1481
1417
|
};
|
|
1482
|
-
protoOf(Companion_3).
|
|
1483
|
-
return this.
|
|
1418
|
+
protoOf(Companion_3).m = function () {
|
|
1419
|
+
return this.n3t_1.m();
|
|
1484
1420
|
};
|
|
1485
|
-
protoOf(Companion_3).
|
|
1486
|
-
return this.
|
|
1421
|
+
protoOf(Companion_3).y3p = function () {
|
|
1422
|
+
return this.n3t_1.y3p();
|
|
1487
1423
|
};
|
|
1488
1424
|
protoOf(Companion_3).hashCode = function () {
|
|
1489
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
1425
|
+
return hashCode(XYZColorSpaces_getInstance().o3t_1);
|
|
1490
1426
|
};
|
|
1491
1427
|
protoOf(Companion_3).equals = function (other) {
|
|
1492
|
-
return equals(XYZColorSpaces_getInstance().
|
|
1428
|
+
return equals(XYZColorSpaces_getInstance().o3t_1, other);
|
|
1493
1429
|
};
|
|
1494
1430
|
var Companion_instance_3;
|
|
1495
1431
|
function Companion_getInstance_3() {
|
|
@@ -1498,71 +1434,69 @@ function Companion_getInstance_3() {
|
|
|
1498
1434
|
return Companion_instance_3;
|
|
1499
1435
|
}
|
|
1500
1436
|
function adaptToM($this, space, m, mi) {
|
|
1501
|
-
if (space.
|
|
1437
|
+
if (space.u3r().equals($this.d3s_1.u3r()))
|
|
1502
1438
|
return $this;
|
|
1503
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1439
|
+
var transform = chromaticAdaptationMatrix(space, $this.d3s_1.u3r().m3p_1, m, mi);
|
|
1440
|
+
var tmp2 = $this.z3r_1;
|
|
1441
|
+
var tmp4 = $this.a3s_1;
|
|
1504
1442
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1505
|
-
var
|
|
1506
|
-
var
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
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
|
-
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.z2n(xx, yy, zz, $this.r2p_1);
|
|
1443
|
+
var v2 = $this.b3s_1;
|
|
1444
|
+
var tmp0 = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1445
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
1446
|
+
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
1447
|
+
return space.m3q(tmp0, tmp2_0, zz, $this.c3s_1);
|
|
1513
1448
|
}
|
|
1514
1449
|
function XYZ(x, y, z, alpha, space) {
|
|
1515
1450
|
Companion_getInstance_3();
|
|
1516
|
-
this.
|
|
1517
|
-
this.
|
|
1518
|
-
this.
|
|
1519
|
-
this.
|
|
1520
|
-
this.
|
|
1451
|
+
this.z3r_1 = x;
|
|
1452
|
+
this.a3s_1 = y;
|
|
1453
|
+
this.b3s_1 = z;
|
|
1454
|
+
this.c3s_1 = alpha;
|
|
1455
|
+
this.d3s_1 = space;
|
|
1521
1456
|
}
|
|
1522
|
-
protoOf(XYZ).
|
|
1523
|
-
return this.
|
|
1457
|
+
protoOf(XYZ).z3o = function () {
|
|
1458
|
+
return this.d3s_1;
|
|
1524
1459
|
};
|
|
1525
|
-
protoOf(XYZ).
|
|
1460
|
+
protoOf(XYZ).q3t = function (space) {
|
|
1526
1461
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1527
1462
|
};
|
|
1528
|
-
protoOf(XYZ).
|
|
1529
|
-
var
|
|
1530
|
-
var x =
|
|
1531
|
-
var y =
|
|
1532
|
-
var z =
|
|
1533
|
-
var f = space.
|
|
1463
|
+
protoOf(XYZ).e3s = function (space) {
|
|
1464
|
+
var _destruct__k2r9zo = this.q3t(XYZColorSpace_0(space.u3r()));
|
|
1465
|
+
var x = _destruct__k2r9zo.ne();
|
|
1466
|
+
var y = _destruct__k2r9zo.oe();
|
|
1467
|
+
var z = _destruct__k2r9zo.oj();
|
|
1468
|
+
var f = space.f3r();
|
|
1534
1469
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1535
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
1536
|
-
|
|
1537
|
-
var
|
|
1538
|
-
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;
|
|
1470
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.t3r());
|
|
1471
|
+
var tmp0 = 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;
|
|
1472
|
+
var tmp2 = 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
1473
|
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.
|
|
1474
|
+
return space.m3q(f.p3r(tmp0), f.p3r(tmp2), f.p3r(b), this.c3s_1);
|
|
1541
1475
|
};
|
|
1542
|
-
protoOf(XYZ).
|
|
1543
|
-
return this.
|
|
1476
|
+
protoOf(XYZ).a3p = function () {
|
|
1477
|
+
return this.e3s(RGBColorSpaces_getInstance().t3q_1);
|
|
1544
1478
|
};
|
|
1545
|
-
protoOf(XYZ).
|
|
1479
|
+
protoOf(XYZ).b3p = function () {
|
|
1546
1480
|
return this;
|
|
1547
1481
|
};
|
|
1548
|
-
protoOf(XYZ).
|
|
1549
|
-
return this.
|
|
1482
|
+
protoOf(XYZ).ne = function () {
|
|
1483
|
+
return this.z3r_1;
|
|
1550
1484
|
};
|
|
1551
|
-
protoOf(XYZ).
|
|
1552
|
-
return this.
|
|
1485
|
+
protoOf(XYZ).oe = function () {
|
|
1486
|
+
return this.a3s_1;
|
|
1553
1487
|
};
|
|
1554
|
-
protoOf(XYZ).
|
|
1555
|
-
return this.
|
|
1488
|
+
protoOf(XYZ).oj = function () {
|
|
1489
|
+
return this.b3s_1;
|
|
1556
1490
|
};
|
|
1557
1491
|
protoOf(XYZ).toString = function () {
|
|
1558
|
-
return 'XYZ(x=' + this.
|
|
1492
|
+
return 'XYZ(x=' + this.z3r_1 + ', y=' + this.a3s_1 + ', z=' + this.b3s_1 + ', alpha=' + this.c3s_1 + ', space=' + toString(this.d3s_1) + ')';
|
|
1559
1493
|
};
|
|
1560
1494
|
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.
|
|
1495
|
+
var result = getNumberHashCode(this.z3r_1);
|
|
1496
|
+
result = imul(result, 31) + getNumberHashCode(this.a3s_1) | 0;
|
|
1497
|
+
result = imul(result, 31) + getNumberHashCode(this.b3s_1) | 0;
|
|
1498
|
+
result = imul(result, 31) + getNumberHashCode(this.c3s_1) | 0;
|
|
1499
|
+
result = imul(result, 31) + hashCode(this.d3s_1) | 0;
|
|
1566
1500
|
return result;
|
|
1567
1501
|
};
|
|
1568
1502
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1571,27 +1505,24 @@ protoOf(XYZ).equals = function (other) {
|
|
|
1571
1505
|
if (!(other instanceof XYZ))
|
|
1572
1506
|
return false;
|
|
1573
1507
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1574
|
-
if (!equals(this.
|
|
1508
|
+
if (!equals(this.z3r_1, tmp0_other_with_cast.z3r_1))
|
|
1575
1509
|
return false;
|
|
1576
|
-
if (!equals(this.
|
|
1510
|
+
if (!equals(this.a3s_1, tmp0_other_with_cast.a3s_1))
|
|
1577
1511
|
return false;
|
|
1578
|
-
if (!equals(this.
|
|
1512
|
+
if (!equals(this.b3s_1, tmp0_other_with_cast.b3s_1))
|
|
1579
1513
|
return false;
|
|
1580
|
-
if (!equals(this.
|
|
1514
|
+
if (!equals(this.c3s_1, tmp0_other_with_cast.c3s_1))
|
|
1581
1515
|
return false;
|
|
1582
|
-
if (!equals(this.
|
|
1516
|
+
if (!equals(this.d3s_1, tmp0_other_with_cast.d3s_1))
|
|
1583
1517
|
return false;
|
|
1584
1518
|
return true;
|
|
1585
1519
|
};
|
|
1586
1520
|
function XYZColorSpace() {
|
|
1587
1521
|
}
|
|
1588
|
-
function XYZColorSpace_0(whitePoint) {
|
|
1589
|
-
return whitePoint.equals(Illuminant_getInstance().g2n_1) ? XYZColorSpaces_getInstance().b2r_1 : whitePoint.equals(Illuminant_getInstance().e2n_1) ? XYZColorSpaces_getInstance().c2r_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1590
|
-
}
|
|
1591
1522
|
function XYZColorSpaces() {
|
|
1592
1523
|
XYZColorSpaces_instance = this;
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1524
|
+
this.o3t_1 = new XYZColorSpaceImpl(Illuminant_getInstance().s3p_1);
|
|
1525
|
+
this.p3t_1 = new XYZColorSpaceImpl(Illuminant_getInstance().q3p_1);
|
|
1595
1526
|
}
|
|
1596
1527
|
var XYZColorSpaces_instance;
|
|
1597
1528
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1599,37 +1530,43 @@ function XYZColorSpaces_getInstance() {
|
|
|
1599
1530
|
new XYZColorSpaces();
|
|
1600
1531
|
return XYZColorSpaces_instance;
|
|
1601
1532
|
}
|
|
1533
|
+
function XYZColorSpace_0(whitePoint) {
|
|
1534
|
+
return whitePoint.equals(Illuminant_getInstance().s3p_1) ? XYZColorSpaces_getInstance().o3t_1 : whitePoint.equals(Illuminant_getInstance().q3p_1) ? XYZColorSpaces_getInstance().p3t_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1535
|
+
}
|
|
1602
1536
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1603
1537
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1604
1538
|
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.
|
|
1539
|
+
var dstWp = _this__u8e3s4.u3r().m3p_1;
|
|
1540
|
+
var src = dot_0(xyzToLms, srcWp.l3t(), srcWp.j3t_1, srcWp.m3t());
|
|
1541
|
+
var dst = dot_0(xyzToLms, dstWp.l3t(), dstWp.j3t_1, dstWp.m3t());
|
|
1608
1542
|
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
1543
|
}
|
|
1610
1544
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1611
|
-
this.
|
|
1612
|
-
this.
|
|
1545
|
+
this.r3t_1 = whitePoint;
|
|
1546
|
+
this.s3t_1 = zeroOneComponentInfo('XYZ');
|
|
1613
1547
|
}
|
|
1614
|
-
protoOf(XYZColorSpaceImpl).
|
|
1615
|
-
return this.
|
|
1548
|
+
protoOf(XYZColorSpaceImpl).u3r = function () {
|
|
1549
|
+
return this.r3t_1;
|
|
1550
|
+
};
|
|
1551
|
+
protoOf(XYZColorSpaceImpl).m = function () {
|
|
1552
|
+
return 'XYZ';
|
|
1616
1553
|
};
|
|
1617
|
-
protoOf(XYZColorSpaceImpl).
|
|
1618
|
-
return this.
|
|
1554
|
+
protoOf(XYZColorSpaceImpl).y3p = function () {
|
|
1555
|
+
return this.s3t_1;
|
|
1619
1556
|
};
|
|
1620
1557
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1621
|
-
return 'XYZColorSpace(' + this.
|
|
1558
|
+
return 'XYZColorSpace(' + this.r3t_1.toString() + ')';
|
|
1622
1559
|
};
|
|
1623
|
-
protoOf(XYZColorSpaceImpl).
|
|
1560
|
+
protoOf(XYZColorSpaceImpl).m3q = function (x, y, z, alpha) {
|
|
1624
1561
|
return new XYZ(x, y, z, alpha, this);
|
|
1625
1562
|
};
|
|
1626
1563
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1627
|
-
return this.
|
|
1564
|
+
return this.r3t_1.hashCode();
|
|
1628
1565
|
};
|
|
1629
1566
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1630
1567
|
var tmp;
|
|
1631
1568
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
1632
|
-
tmp = this.
|
|
1569
|
+
tmp = this.r3t_1.equals(other.u3r());
|
|
1633
1570
|
} else {
|
|
1634
1571
|
tmp = false;
|
|
1635
1572
|
}
|
|
@@ -1645,26 +1582,26 @@ function xyY_init_$Create$(x, y, Y) {
|
|
|
1645
1582
|
}
|
|
1646
1583
|
function xyY(x, y, Y) {
|
|
1647
1584
|
Y = Y === VOID ? 1.0 : Y;
|
|
1648
|
-
this.
|
|
1649
|
-
this.
|
|
1650
|
-
this.
|
|
1585
|
+
this.h3t_1 = x;
|
|
1586
|
+
this.i3t_1 = y;
|
|
1587
|
+
this.j3t_1 = Y;
|
|
1651
1588
|
}
|
|
1652
|
-
protoOf(xyY).
|
|
1653
|
-
return 1 - this.
|
|
1589
|
+
protoOf(xyY).k3t = function () {
|
|
1590
|
+
return 1 - this.h3t_1 - this.i3t_1;
|
|
1654
1591
|
};
|
|
1655
|
-
protoOf(xyY).
|
|
1656
|
-
return this.
|
|
1592
|
+
protoOf(xyY).l3t = function () {
|
|
1593
|
+
return this.h3t_1 * this.j3t_1 / this.i3t_1;
|
|
1657
1594
|
};
|
|
1658
|
-
protoOf(xyY).
|
|
1659
|
-
return (1 - this.
|
|
1595
|
+
protoOf(xyY).m3t = function () {
|
|
1596
|
+
return (1 - this.h3t_1 - this.i3t_1) * this.j3t_1 / this.i3t_1;
|
|
1660
1597
|
};
|
|
1661
1598
|
protoOf(xyY).toString = function () {
|
|
1662
|
-
return 'xyY(x=' + this.
|
|
1599
|
+
return 'xyY(x=' + this.h3t_1 + ', y=' + this.i3t_1 + ', Y=' + this.j3t_1 + ')';
|
|
1663
1600
|
};
|
|
1664
1601
|
protoOf(xyY).hashCode = function () {
|
|
1665
|
-
var result = getNumberHashCode(this.
|
|
1666
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1667
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1602
|
+
var result = getNumberHashCode(this.h3t_1);
|
|
1603
|
+
result = imul(result, 31) + getNumberHashCode(this.i3t_1) | 0;
|
|
1604
|
+
result = imul(result, 31) + getNumberHashCode(this.j3t_1) | 0;
|
|
1668
1605
|
return result;
|
|
1669
1606
|
};
|
|
1670
1607
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1673,30 +1610,30 @@ protoOf(xyY).equals = function (other) {
|
|
|
1673
1610
|
if (!(other instanceof xyY))
|
|
1674
1611
|
return false;
|
|
1675
1612
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1676
|
-
if (!equals(this.
|
|
1613
|
+
if (!equals(this.h3t_1, tmp0_other_with_cast.h3t_1))
|
|
1677
1614
|
return false;
|
|
1678
|
-
if (!equals(this.
|
|
1615
|
+
if (!equals(this.i3t_1, tmp0_other_with_cast.i3t_1))
|
|
1679
1616
|
return false;
|
|
1680
|
-
if (!equals(this.
|
|
1617
|
+
if (!equals(this.j3t_1, tmp0_other_with_cast.j3t_1))
|
|
1681
1618
|
return false;
|
|
1682
1619
|
return true;
|
|
1683
1620
|
};
|
|
1684
1621
|
//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).
|
|
1622
|
+
protoOf(Ansi16).b3p = toXYZ;
|
|
1623
|
+
protoOf(Ansi256).b3p = toXYZ;
|
|
1624
|
+
protoOf(HSV).b3p = toXYZ;
|
|
1625
|
+
protoOf(Companion_2).a3q = invoke$default;
|
|
1626
|
+
protoOf(Companion_2).f3q = invoke$default_0;
|
|
1627
|
+
protoOf(Companion_2).b3q = from255$default;
|
|
1628
|
+
protoOf(SRGB).a3q = invoke$default;
|
|
1629
|
+
protoOf(SRGB).f3q = invoke$default_0;
|
|
1630
|
+
protoOf(SRGB).b3q = from255$default;
|
|
1631
|
+
protoOf(RGBColorSpaceImpl).a3q = invoke$default;
|
|
1632
|
+
protoOf(RGBColorSpaceImpl).q3r = invoke;
|
|
1633
|
+
protoOf(RGBColorSpaceImpl).f3q = invoke$default_0;
|
|
1634
|
+
protoOf(RGBColorSpaceImpl).u3o = invoke_0;
|
|
1635
|
+
protoOf(RGBColorSpaceImpl).r3r = from255;
|
|
1636
|
+
protoOf(RGBColorSpaceImpl).b3q = from255$default;
|
|
1700
1637
|
//endregion
|
|
1701
1638
|
//region block: init
|
|
1702
1639
|
PqNonlinearity_instance = new PqNonlinearity();
|
|
@@ -1708,7 +1645,7 @@ ROMMTransferFunctions_instance = new ROMMTransferFunctions();
|
|
|
1708
1645
|
export {
|
|
1709
1646
|
Ansi16 as Ansi161fxj36mncd6rb,
|
|
1710
1647
|
Ansi256 as Ansi25637kncr8jl8m76,
|
|
1711
|
-
Companion_getInstance_2 as
|
|
1648
|
+
Companion_getInstance_2 as Companion_getInstance29k0qnqi8alas,
|
|
1712
1649
|
};
|
|
1713
1650
|
//endregion
|
|
1714
1651
|
|