@flock/wirespec 0.9.11 → 0.9.13
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-atomic.js +14 -15
- package/arrow-arrow-atomic.js.map +1 -1
- package/arrow-arrow-continuations.js +2 -3
- package/arrow-arrow-continuations.js.map +1 -1
- package/arrow-arrow-core.js +100 -105
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1936 -2057
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +479 -504
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2368 -2480
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-openapi-bindings.js +5695 -5579
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin-rgxgen.js +2051 -2108
- package/kotlin-rgxgen.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +2155 -2140
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +1636 -1700
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/markdown.js +2218 -2412
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +2322 -2431
- package/mordant-mordant.js.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +2348 -2609
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +641 -678
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +1497 -1518
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-generator.js +86 -91
- package/wirespec-src-generator.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +137 -151
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +281 -301
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +1 -1
- package/wirespec-src-plugin-npm.js +88 -99
- package/wirespec-src-plugin-npm.js.map +1 -1
|
@@ -14,43 +14,44 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
29
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
30
|
-
var plus = kotlin_kotlin.$_$.
|
|
31
|
-
var asList = kotlin_kotlin.$_$.
|
|
32
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.qa;
|
|
18
|
+
var classMeta = kotlin_kotlin.$_$.l9;
|
|
19
|
+
var setMetadataFor = kotlin_kotlin.$_$.ra;
|
|
20
|
+
var getStringHashCode = kotlin_kotlin.$_$.t9;
|
|
21
|
+
var THROW_CCE = kotlin_kotlin.$_$.ye;
|
|
22
|
+
var objectMeta = kotlin_kotlin.$_$.pa;
|
|
23
|
+
var charSequenceLength = kotlin_kotlin.$_$.j9;
|
|
24
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
25
|
+
var charSequenceGet = kotlin_kotlin.$_$.i9;
|
|
26
|
+
var toString = kotlin_kotlin.$_$.a2;
|
|
27
|
+
var Unit_instance = kotlin_kotlin.$_$.i4;
|
|
28
|
+
var copyToArray = kotlin_kotlin.$_$.v5;
|
|
29
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w1;
|
|
30
|
+
var plus = kotlin_kotlin.$_$.q7;
|
|
31
|
+
var asList = kotlin_kotlin.$_$.b5;
|
|
32
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.h5;
|
|
33
33
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
34
|
-
var listOf = kotlin_kotlin.$_$.
|
|
35
|
-
var withSign = kotlin_kotlin.$_$.
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
34
|
+
var listOf = kotlin_kotlin.$_$.f7;
|
|
35
|
+
var withSign = kotlin_kotlin.$_$.xa;
|
|
36
|
+
var VOID = kotlin_kotlin.$_$.g;
|
|
37
|
+
var coerceAtLeast = kotlin_kotlin.$_$.ab;
|
|
38
|
+
var getNumberHashCode = kotlin_kotlin.$_$.r9;
|
|
39
|
+
var equals = kotlin_kotlin.$_$.o9;
|
|
40
|
+
var numberToDouble = kotlin_kotlin.$_$.ma;
|
|
41
|
+
var interfaceMeta = kotlin_kotlin.$_$.v9;
|
|
42
|
+
var roundToInt = kotlin_kotlin.$_$.wa;
|
|
43
|
+
var coerceIn = kotlin_kotlin.$_$.eb;
|
|
44
|
+
var DoubleCompanionObject_instance = kotlin_kotlin.$_$.s3;
|
|
45
|
+
var hashCode = kotlin_kotlin.$_$.u9;
|
|
46
|
+
var Char = kotlin_kotlin.$_$.ie;
|
|
47
|
+
var toInt = kotlin_kotlin.$_$.sd;
|
|
48
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.ka;
|
|
49
|
+
var slice = kotlin_kotlin.$_$.ed;
|
|
50
|
+
var toString_0 = kotlin_kotlin.$_$.va;
|
|
51
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
52
|
+
var startsWith = kotlin_kotlin.$_$.hd;
|
|
53
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.cb;
|
|
54
|
+
var objectCreate = kotlin_kotlin.$_$.oa;
|
|
54
55
|
//endregion
|
|
55
56
|
//region block: pre-declaration
|
|
56
57
|
setMetadataFor(ColorComponentInfo, 'ColorComponentInfo', classMeta);
|
|
@@ -66,41 +67,37 @@
|
|
|
66
67
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
67
68
|
function invoke$default(r, g, b, alpha, $super) {
|
|
68
69
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
69
|
-
return $super === VOID ? this.
|
|
70
|
+
return $super === VOID ? this.e34(r, g, b, alpha) : $super.e34.call(this, r, g, b, alpha);
|
|
70
71
|
}
|
|
71
72
|
function invoke(r, g, b, alpha) {
|
|
72
|
-
return this.
|
|
73
|
+
return this.e34(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
73
74
|
}
|
|
74
75
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
75
76
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
76
|
-
return $super === VOID ? this.
|
|
77
|
+
return $super === VOID ? this.o34(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
77
78
|
}
|
|
78
79
|
function from255(r, g, b, alpha) {
|
|
79
|
-
return this.
|
|
80
|
+
return this.e34(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
80
81
|
}
|
|
81
82
|
function from255$default(r, g, b, alpha, $super) {
|
|
82
83
|
alpha = alpha === VOID ? 255 : alpha;
|
|
83
|
-
return $super === VOID ? this.
|
|
84
|
+
return $super === VOID ? this.p34(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
84
85
|
}
|
|
85
86
|
function invoke_0(hex) {
|
|
86
87
|
var tmp = parseHex(validateHex(hex), 0);
|
|
87
88
|
var tmp_0 = parseHex(hex, 1);
|
|
88
89
|
var tmp_1 = parseHex(hex, 2);
|
|
89
90
|
var tmp_2;
|
|
90
|
-
var tmp$ret$1;
|
|
91
91
|
// Inline function 'kotlin.let' call
|
|
92
|
-
var tmp0_let = get_hexLength(hex);
|
|
93
92
|
// Inline function 'kotlin.contracts.contract' call
|
|
94
|
-
var tmp$ret$0;
|
|
95
93
|
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (tmp$ret$1) {
|
|
94
|
+
var it = get_hexLength(hex);
|
|
95
|
+
if (it === 4 ? true : it === 8) {
|
|
99
96
|
tmp_2 = parseHex(hex, 3);
|
|
100
97
|
} else {
|
|
101
98
|
tmp_2 = 255;
|
|
102
99
|
}
|
|
103
|
-
return this.
|
|
100
|
+
return this.p34(tmp, tmp_0, tmp_1, tmp_2);
|
|
104
101
|
}
|
|
105
102
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta);
|
|
106
103
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -122,19 +119,19 @@
|
|
|
122
119
|
setMetadataFor(xyY, 'xyY', classMeta);
|
|
123
120
|
//endregion
|
|
124
121
|
function ColorComponentInfo(name, isPolar) {
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
122
|
+
this.y32_1 = name;
|
|
123
|
+
this.z32_1 = isPolar;
|
|
127
124
|
}
|
|
128
125
|
function WhitePoint(name, chromaticity) {
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
126
|
+
this.a33_1 = name;
|
|
127
|
+
this.b33_1 = chromaticity;
|
|
131
128
|
}
|
|
132
129
|
protoOf(WhitePoint).toString = function () {
|
|
133
|
-
return this.
|
|
130
|
+
return this.a33_1;
|
|
134
131
|
};
|
|
135
132
|
protoOf(WhitePoint).hashCode = function () {
|
|
136
|
-
var result = getStringHashCode(this.
|
|
137
|
-
result = imul(result, 31) + this.
|
|
133
|
+
var result = getStringHashCode(this.a33_1);
|
|
134
|
+
result = imul(result, 31) + this.b33_1.hashCode() | 0;
|
|
138
135
|
return result;
|
|
139
136
|
};
|
|
140
137
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -143,22 +140,22 @@
|
|
|
143
140
|
if (!(other instanceof WhitePoint))
|
|
144
141
|
return false;
|
|
145
142
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
146
|
-
if (!(this.
|
|
143
|
+
if (!(this.a33_1 === tmp0_other_with_cast.a33_1))
|
|
147
144
|
return false;
|
|
148
|
-
if (!this.
|
|
145
|
+
if (!this.b33_1.equals(tmp0_other_with_cast.b33_1))
|
|
149
146
|
return false;
|
|
150
147
|
return true;
|
|
151
148
|
};
|
|
152
149
|
function Illuminant() {
|
|
153
150
|
Illuminant_instance = this;
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
151
|
+
this.c33_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
152
|
+
this.d33_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
153
|
+
this.e33_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
154
|
+
this.f33_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
155
|
+
this.g33_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
156
|
+
this.h33_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
157
|
+
this.i33_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
158
|
+
this.j33_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
162
159
|
}
|
|
163
160
|
var Illuminant_instance;
|
|
164
161
|
function Illuminant_getInstance() {
|
|
@@ -167,54 +164,48 @@
|
|
|
167
164
|
return Illuminant_instance;
|
|
168
165
|
}
|
|
169
166
|
function rectangularComponentInfo(name) {
|
|
170
|
-
var tmp$ret$3;
|
|
171
167
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
172
168
|
// Inline function 'kotlin.text.map' call
|
|
173
169
|
// Inline function 'kotlin.text.mapTo' call
|
|
174
|
-
var
|
|
170
|
+
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
175
171
|
var inductionVariable = 0;
|
|
176
|
-
|
|
177
|
-
while (inductionVariable < last) {
|
|
172
|
+
while (inductionVariable < charSequenceLength(name)) {
|
|
178
173
|
var item = charSequenceGet(name, inductionVariable);
|
|
179
174
|
inductionVariable = inductionVariable + 1 | 0;
|
|
180
|
-
var tmp$ret$0;
|
|
181
175
|
// Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
|
|
182
|
-
tmp$ret$0 = toString(item);
|
|
183
|
-
|
|
176
|
+
var tmp$ret$0 = toString(item);
|
|
177
|
+
destination.s(tmp$ret$0);
|
|
184
178
|
}
|
|
185
|
-
tmp$ret$3 = copyToArray(
|
|
179
|
+
var tmp$ret$3 = copyToArray(destination);
|
|
186
180
|
return rectangularComponentInfo_0(tmp$ret$3.slice());
|
|
187
181
|
}
|
|
188
182
|
function polarComponentInfo(name) {
|
|
189
183
|
// Inline function 'kotlin.text.map' call
|
|
190
184
|
// Inline function 'kotlin.text.mapTo' call
|
|
191
|
-
var
|
|
185
|
+
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
192
186
|
var inductionVariable = 0;
|
|
193
|
-
|
|
194
|
-
while (inductionVariable < last) {
|
|
187
|
+
while (inductionVariable < charSequenceLength(name)) {
|
|
195
188
|
var item = charSequenceGet(name, inductionVariable);
|
|
196
189
|
inductionVariable = inductionVariable + 1 | 0;
|
|
197
|
-
var tmp$ret$0;
|
|
198
190
|
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
199
|
-
tmp$ret$0 = new ColorComponentInfo(toString(item), item === _Char___init__impl__6a9atx(72));
|
|
200
|
-
|
|
191
|
+
var tmp$ret$0 = new ColorComponentInfo(toString(item), item === _Char___init__impl__6a9atx(72));
|
|
192
|
+
destination.s(tmp$ret$0);
|
|
201
193
|
}
|
|
202
|
-
return plus(
|
|
194
|
+
return plus(destination, new ColorComponentInfo('alpha', false));
|
|
203
195
|
}
|
|
204
196
|
function rectangularComponentInfo_0(names) {
|
|
205
197
|
// Inline function 'kotlin.collections.map' call
|
|
206
|
-
var
|
|
198
|
+
var this_0 = plus(asList(names), 'alpha');
|
|
207
199
|
// Inline function 'kotlin.collections.mapTo' call
|
|
208
|
-
var
|
|
209
|
-
var tmp0_iterator =
|
|
200
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
201
|
+
var tmp0_iterator = this_0.v();
|
|
210
202
|
while (tmp0_iterator.w()) {
|
|
211
203
|
var item = tmp0_iterator.y();
|
|
212
|
-
var tmp$ret$0;
|
|
213
204
|
// Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
|
|
214
|
-
tmp$ret$0 = new ColorComponentInfo(item, false);
|
|
215
|
-
|
|
205
|
+
var tmp$ret$0 = new ColorComponentInfo(item, false);
|
|
206
|
+
destination.s(tmp$ret$0);
|
|
216
207
|
}
|
|
217
|
-
return
|
|
208
|
+
return destination;
|
|
218
209
|
}
|
|
219
210
|
function componentInfoList(c) {
|
|
220
211
|
return listOf(arrayConcat([c, [new ColorComponentInfo('alpha', false)]]));
|
|
@@ -244,11 +235,10 @@
|
|
|
244
235
|
return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
|
|
245
236
|
}
|
|
246
237
|
function spow_0(_this__u8e3s4, p) {
|
|
247
|
-
var tmp$ret$1;
|
|
248
238
|
// Inline function 'kotlin.math.pow' call
|
|
249
239
|
// Inline function 'kotlin.math.absoluteValue' call
|
|
250
|
-
var
|
|
251
|
-
tmp$ret$1 = Math.pow(
|
|
240
|
+
var this_0 = Math.abs(_this__u8e3s4);
|
|
241
|
+
var tmp$ret$1 = Math.pow(this_0, p);
|
|
252
242
|
return withSign(tmp$ret$1, _this__u8e3s4);
|
|
253
243
|
}
|
|
254
244
|
function normalizeDeg_0(_this__u8e3s4) {
|
|
@@ -261,16 +251,14 @@
|
|
|
261
251
|
return $this;
|
|
262
252
|
}
|
|
263
253
|
function _Matrix___init__impl__q3kp4w_0(v00, v10, v20, v01, v11, v21, v02, v12, v22) {
|
|
264
|
-
var tmp$ret$0;
|
|
265
254
|
// Inline function 'kotlin.floatArrayOf' call
|
|
266
|
-
tmp$ret$0 = new Float32Array([v00, v10, v20, v01, v11, v21, v02, v12, v22]);
|
|
255
|
+
var tmp$ret$0 = new Float32Array([v00, v10, v20, v01, v11, v21, v02, v12, v22]);
|
|
267
256
|
return _Matrix___init__impl__q3kp4w(tmp$ret$0);
|
|
268
257
|
}
|
|
269
258
|
function Matrix__copy_impl_kmkvzd($this) {
|
|
270
|
-
var tmp$ret$1;
|
|
271
259
|
// Inline function 'kotlin.collections.copyOf' call
|
|
272
260
|
// Inline function 'kotlin.js.asDynamic' call
|
|
273
|
-
tmp$ret$1 = _Matrix___get_rowMajor__impl__vmgxkq($this).slice();
|
|
261
|
+
var tmp$ret$1 = _Matrix___get_rowMajor__impl__vmgxkq($this).slice();
|
|
274
262
|
return _Matrix___init__impl__q3kp4w(tmp$ret$1);
|
|
275
263
|
}
|
|
276
264
|
function Matrix__get_impl_xogbpk($this, x, y) {
|
|
@@ -322,9 +310,8 @@
|
|
|
322
310
|
return $this;
|
|
323
311
|
}
|
|
324
312
|
function _Vector___init__impl__y7x4qq_0(v0, v1, v2) {
|
|
325
|
-
var tmp$ret$0;
|
|
326
313
|
// Inline function 'kotlin.floatArrayOf' call
|
|
327
|
-
tmp$ret$0 = new Float32Array([v0, v1, v2]);
|
|
314
|
+
var tmp$ret$0 = new Float32Array([v0, v1, v2]);
|
|
328
315
|
return _Vector___init__impl__y7x4qq(tmp$ret$0);
|
|
329
316
|
}
|
|
330
317
|
function _Vector___get_l__impl__envr1l($this) {
|
|
@@ -345,7 +332,7 @@
|
|
|
345
332
|
}
|
|
346
333
|
function Companion() {
|
|
347
334
|
Companion_instance = this;
|
|
348
|
-
this.
|
|
335
|
+
this.k33_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
349
336
|
}
|
|
350
337
|
var Companion_instance;
|
|
351
338
|
function Companion_getInstance() {
|
|
@@ -355,35 +342,35 @@
|
|
|
355
342
|
}
|
|
356
343
|
function Ansi16(code) {
|
|
357
344
|
Companion_getInstance();
|
|
358
|
-
this.
|
|
345
|
+
this.l33_1 = code;
|
|
359
346
|
}
|
|
360
|
-
protoOf(Ansi16).
|
|
361
|
-
switch (this.
|
|
347
|
+
protoOf(Ansi16).m33 = function () {
|
|
348
|
+
switch (this.l33_1) {
|
|
362
349
|
case 30:
|
|
363
350
|
case 40:
|
|
364
|
-
return Companion_getInstance_2().
|
|
351
|
+
return Companion_getInstance_2().n33(0.0, 0.0, 0.0);
|
|
365
352
|
case 90:
|
|
366
353
|
case 100:
|
|
367
|
-
return Companion_getInstance_2().
|
|
354
|
+
return Companion_getInstance_2().o33(128, 128, 128);
|
|
368
355
|
case 37:
|
|
369
356
|
case 47:
|
|
370
|
-
return Companion_getInstance_2().
|
|
357
|
+
return Companion_getInstance_2().o33(192, 192, 192);
|
|
371
358
|
case 97:
|
|
372
359
|
case 107:
|
|
373
|
-
return Companion_getInstance_2().
|
|
360
|
+
return Companion_getInstance_2().n33(1.0, 1.0, 1.0);
|
|
374
361
|
}
|
|
375
|
-
var color = this.
|
|
376
|
-
var mul = this.
|
|
362
|
+
var color = this.l33_1 % 10 | 0;
|
|
363
|
+
var mul = this.l33_1 > 50 ? 1.0 : 0.5;
|
|
377
364
|
var r = (color % 2 | 0) * mul;
|
|
378
365
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
379
366
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
380
|
-
return Companion_getInstance_2().
|
|
367
|
+
return Companion_getInstance_2().n33(r, g, b);
|
|
381
368
|
};
|
|
382
369
|
protoOf(Ansi16).toString = function () {
|
|
383
|
-
return 'Ansi16(code=' + this.
|
|
370
|
+
return 'Ansi16(code=' + this.l33_1 + ')';
|
|
384
371
|
};
|
|
385
372
|
protoOf(Ansi16).hashCode = function () {
|
|
386
|
-
return this.
|
|
373
|
+
return this.l33_1;
|
|
387
374
|
};
|
|
388
375
|
protoOf(Ansi16).equals = function (other) {
|
|
389
376
|
if (this === other)
|
|
@@ -391,13 +378,13 @@
|
|
|
391
378
|
if (!(other instanceof Ansi16))
|
|
392
379
|
return false;
|
|
393
380
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
394
|
-
if (!(this.
|
|
381
|
+
if (!(this.l33_1 === tmp0_other_with_cast.l33_1))
|
|
395
382
|
return false;
|
|
396
383
|
return true;
|
|
397
384
|
};
|
|
398
385
|
function Companion_0() {
|
|
399
386
|
Companion_instance_0 = this;
|
|
400
|
-
this.
|
|
387
|
+
this.p33_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
401
388
|
}
|
|
402
389
|
var Companion_instance_0;
|
|
403
390
|
function Companion_getInstance_0() {
|
|
@@ -407,34 +394,34 @@
|
|
|
407
394
|
}
|
|
408
395
|
function Ansi256(code) {
|
|
409
396
|
Companion_getInstance_0();
|
|
410
|
-
this.
|
|
411
|
-
}
|
|
412
|
-
protoOf(Ansi256).
|
|
413
|
-
if (this.
|
|
414
|
-
return this.
|
|
415
|
-
if (this.
|
|
416
|
-
var c = imul(this.
|
|
417
|
-
return Companion_getInstance_2().
|
|
397
|
+
this.q33_1 = code;
|
|
398
|
+
}
|
|
399
|
+
protoOf(Ansi256).m33 = function () {
|
|
400
|
+
if (this.q33_1 < 16)
|
|
401
|
+
return this.r33().m33();
|
|
402
|
+
if (this.q33_1 >= 232) {
|
|
403
|
+
var c = imul(this.q33_1 - 232 | 0, 10) + 8 | 0;
|
|
404
|
+
return Companion_getInstance_2().o33(c, c, c);
|
|
418
405
|
}
|
|
419
|
-
var c_0 = this.
|
|
406
|
+
var c_0 = this.q33_1 - 16 | 0;
|
|
420
407
|
var rem = c_0 % 36 | 0;
|
|
421
408
|
// Inline function 'kotlin.math.floor' call
|
|
422
|
-
var
|
|
423
|
-
var r = Math.floor(
|
|
409
|
+
var x = c_0 / 36.0;
|
|
410
|
+
var r = Math.floor(x) / 5.0;
|
|
424
411
|
// Inline function 'kotlin.math.floor' call
|
|
425
|
-
var
|
|
426
|
-
var g = Math.floor(
|
|
412
|
+
var x_0 = rem / 6.0;
|
|
413
|
+
var g = Math.floor(x_0) / 5.0;
|
|
427
414
|
var b = (rem % 6 | 0) / 5.0;
|
|
428
|
-
return Companion_getInstance_2().
|
|
415
|
+
return Companion_getInstance_2().s33(r, g, b);
|
|
429
416
|
};
|
|
430
|
-
protoOf(Ansi256).
|
|
431
|
-
return this.
|
|
417
|
+
protoOf(Ansi256).r33 = function () {
|
|
418
|
+
return this.q33_1 < 8 ? new Ansi16(this.q33_1 + 30 | 0) : this.q33_1 < 16 ? new Ansi16((this.q33_1 - 8 | 0) + 90 | 0) : this.m33().r33();
|
|
432
419
|
};
|
|
433
420
|
protoOf(Ansi256).toString = function () {
|
|
434
|
-
return 'Ansi256(code=' + this.
|
|
421
|
+
return 'Ansi256(code=' + this.q33_1 + ')';
|
|
435
422
|
};
|
|
436
423
|
protoOf(Ansi256).hashCode = function () {
|
|
437
|
-
return this.
|
|
424
|
+
return this.q33_1;
|
|
438
425
|
};
|
|
439
426
|
protoOf(Ansi256).equals = function (other) {
|
|
440
427
|
if (this === other)
|
|
@@ -442,13 +429,13 @@
|
|
|
442
429
|
if (!(other instanceof Ansi256))
|
|
443
430
|
return false;
|
|
444
431
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
445
|
-
if (!(this.
|
|
432
|
+
if (!(this.q33_1 === tmp0_other_with_cast.q33_1))
|
|
446
433
|
return false;
|
|
447
434
|
return true;
|
|
448
435
|
};
|
|
449
436
|
function Companion_1() {
|
|
450
437
|
Companion_instance_1 = this;
|
|
451
|
-
this.
|
|
438
|
+
this.y33_1 = polarComponentInfo('HSV');
|
|
452
439
|
}
|
|
453
440
|
var Companion_instance_1;
|
|
454
441
|
function Companion_getInstance_1() {
|
|
@@ -459,36 +446,35 @@
|
|
|
459
446
|
function toSRGB$f(h, v, s, n) {
|
|
460
447
|
var k = (n + h) % 6;
|
|
461
448
|
var tmp = v * s;
|
|
462
|
-
var tmp$ret$0;
|
|
463
449
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
464
|
-
var
|
|
465
|
-
tmp$ret$0 = Math.min(k,
|
|
450
|
+
var b = 4 - k;
|
|
451
|
+
var tmp$ret$0 = Math.min(k, b, 1.0);
|
|
466
452
|
return v - tmp * coerceAtLeast(tmp$ret$0, 0.0);
|
|
467
453
|
}
|
|
468
454
|
function HSV(h, s, v, alpha) {
|
|
469
455
|
Companion_getInstance_1();
|
|
470
456
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
471
|
-
this.
|
|
472
|
-
this.
|
|
473
|
-
this.
|
|
474
|
-
this.
|
|
475
|
-
}
|
|
476
|
-
protoOf(HSV).
|
|
477
|
-
if (this.
|
|
478
|
-
return Companion_getInstance_2().
|
|
479
|
-
var v = this.
|
|
480
|
-
var h = normalizeDeg_0(this.
|
|
481
|
-
var s = this.
|
|
482
|
-
return SRGB_getInstance().
|
|
457
|
+
this.z33_1 = h;
|
|
458
|
+
this.a34_1 = s;
|
|
459
|
+
this.b34_1 = v;
|
|
460
|
+
this.c34_1 = alpha;
|
|
461
|
+
}
|
|
462
|
+
protoOf(HSV).m33 = function () {
|
|
463
|
+
if (this.a34_1 < 1.0E-7)
|
|
464
|
+
return Companion_getInstance_2().e34(this.b34_1, this.b34_1, this.b34_1, this.c34_1);
|
|
465
|
+
var v = this.b34_1;
|
|
466
|
+
var h = normalizeDeg_0(this.z33_1) / 60.0;
|
|
467
|
+
var s = this.a34_1;
|
|
468
|
+
return SRGB_getInstance().e34(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.c34_1);
|
|
483
469
|
};
|
|
484
470
|
protoOf(HSV).toString = function () {
|
|
485
|
-
return 'HSV(h=' + this.
|
|
471
|
+
return 'HSV(h=' + this.z33_1 + ', s=' + this.a34_1 + ', v=' + this.b34_1 + ', alpha=' + this.c34_1 + ')';
|
|
486
472
|
};
|
|
487
473
|
protoOf(HSV).hashCode = function () {
|
|
488
|
-
var result = getNumberHashCode(this.
|
|
489
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
490
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
491
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
474
|
+
var result = getNumberHashCode(this.z33_1);
|
|
475
|
+
result = imul(result, 31) + getNumberHashCode(this.a34_1) | 0;
|
|
476
|
+
result = imul(result, 31) + getNumberHashCode(this.b34_1) | 0;
|
|
477
|
+
result = imul(result, 31) + getNumberHashCode(this.c34_1) | 0;
|
|
492
478
|
return result;
|
|
493
479
|
};
|
|
494
480
|
protoOf(HSV).equals = function (other) {
|
|
@@ -497,30 +483,30 @@
|
|
|
497
483
|
if (!(other instanceof HSV))
|
|
498
484
|
return false;
|
|
499
485
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
500
|
-
if (!equals(this.
|
|
486
|
+
if (!equals(this.z33_1, tmp0_other_with_cast.z33_1))
|
|
501
487
|
return false;
|
|
502
|
-
if (!equals(this.
|
|
488
|
+
if (!equals(this.a34_1, tmp0_other_with_cast.a34_1))
|
|
503
489
|
return false;
|
|
504
|
-
if (!equals(this.
|
|
490
|
+
if (!equals(this.b34_1, tmp0_other_with_cast.b34_1))
|
|
505
491
|
return false;
|
|
506
|
-
if (!equals(this.
|
|
492
|
+
if (!equals(this.c34_1, tmp0_other_with_cast.c34_1))
|
|
507
493
|
return false;
|
|
508
494
|
return true;
|
|
509
495
|
};
|
|
510
496
|
function GammaTransferFunctions(gamma) {
|
|
511
|
-
this.
|
|
497
|
+
this.l34_1 = gamma;
|
|
512
498
|
}
|
|
513
|
-
protoOf(GammaTransferFunctions).
|
|
514
|
-
return spow(x, this.
|
|
499
|
+
protoOf(GammaTransferFunctions).m34 = function (x) {
|
|
500
|
+
return spow(x, this.l34_1);
|
|
515
501
|
};
|
|
516
|
-
protoOf(GammaTransferFunctions).
|
|
517
|
-
return spow(x, 1.0 / this.
|
|
502
|
+
protoOf(GammaTransferFunctions).n34 = function (x) {
|
|
503
|
+
return spow(x, 1.0 / this.l34_1);
|
|
518
504
|
};
|
|
519
505
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
520
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
506
|
+
return 'GammaTransferFunctions(gamma=' + this.l34_1 + ')';
|
|
521
507
|
};
|
|
522
508
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
523
|
-
return getNumberHashCode(this.
|
|
509
|
+
return getNumberHashCode(this.l34_1);
|
|
524
510
|
};
|
|
525
511
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
526
512
|
if (this === other)
|
|
@@ -528,54 +514,51 @@
|
|
|
528
514
|
if (!(other instanceof GammaTransferFunctions))
|
|
529
515
|
return false;
|
|
530
516
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
531
|
-
if (!equals(this.
|
|
517
|
+
if (!equals(this.l34_1, tmp0_other_with_cast.l34_1))
|
|
532
518
|
return false;
|
|
533
519
|
return true;
|
|
534
520
|
};
|
|
535
521
|
function LinearTransferFunctions() {
|
|
536
|
-
LinearTransferFunctions_instance = this;
|
|
537
522
|
}
|
|
538
|
-
protoOf(LinearTransferFunctions).
|
|
523
|
+
protoOf(LinearTransferFunctions).m34 = function (x) {
|
|
539
524
|
return x;
|
|
540
525
|
};
|
|
541
|
-
protoOf(LinearTransferFunctions).
|
|
526
|
+
protoOf(LinearTransferFunctions).n34 = function (x) {
|
|
542
527
|
return x;
|
|
543
528
|
};
|
|
544
529
|
var LinearTransferFunctions_instance;
|
|
545
530
|
function LinearTransferFunctions_getInstance() {
|
|
546
|
-
if (LinearTransferFunctions_instance == null)
|
|
547
|
-
new LinearTransferFunctions();
|
|
548
531
|
return LinearTransferFunctions_instance;
|
|
549
532
|
}
|
|
550
533
|
function RGBColorSpace() {
|
|
551
534
|
}
|
|
552
535
|
function Companion_2() {
|
|
553
536
|
Companion_instance_2 = this;
|
|
554
|
-
this.
|
|
537
|
+
this.d34_1 = RGBColorSpaces_getInstance().u34_1;
|
|
555
538
|
}
|
|
556
|
-
protoOf(Companion_2).
|
|
557
|
-
return this.
|
|
539
|
+
protoOf(Companion_2).s34 = function () {
|
|
540
|
+
return this.d34_1.s34();
|
|
558
541
|
};
|
|
559
|
-
protoOf(Companion_2).
|
|
560
|
-
return this.
|
|
542
|
+
protoOf(Companion_2).r34 = function () {
|
|
543
|
+
return this.d34_1.r34();
|
|
561
544
|
};
|
|
562
|
-
protoOf(Companion_2).
|
|
563
|
-
return this.
|
|
545
|
+
protoOf(Companion_2).q34 = function () {
|
|
546
|
+
return this.d34_1.q34();
|
|
564
547
|
};
|
|
565
|
-
protoOf(Companion_2).
|
|
566
|
-
return this.
|
|
548
|
+
protoOf(Companion_2).t34 = function () {
|
|
549
|
+
return this.d34_1.t34();
|
|
567
550
|
};
|
|
568
|
-
protoOf(Companion_2).
|
|
569
|
-
return this.
|
|
551
|
+
protoOf(Companion_2).p34 = function (r, g, b, alpha) {
|
|
552
|
+
return this.d34_1.p34(r, g, b, alpha);
|
|
570
553
|
};
|
|
571
|
-
protoOf(Companion_2).
|
|
572
|
-
return this.
|
|
554
|
+
protoOf(Companion_2).e34 = function (r, g, b, alpha) {
|
|
555
|
+
return this.d34_1.e34(r, g, b, alpha);
|
|
573
556
|
};
|
|
574
|
-
protoOf(Companion_2).
|
|
575
|
-
return this.
|
|
557
|
+
protoOf(Companion_2).o34 = function (r, g, b, alpha) {
|
|
558
|
+
return this.d34_1.o34(r, g, b, alpha);
|
|
576
559
|
};
|
|
577
|
-
protoOf(Companion_2).
|
|
578
|
-
return this.
|
|
560
|
+
protoOf(Companion_2).w28 = function (hex) {
|
|
561
|
+
return this.d34_1.w28(hex);
|
|
579
562
|
};
|
|
580
563
|
var Companion_instance_2;
|
|
581
564
|
function Companion_getInstance_2() {
|
|
@@ -585,43 +568,43 @@
|
|
|
585
568
|
}
|
|
586
569
|
function RGB(r, g, b, alpha, space) {
|
|
587
570
|
Companion_getInstance_2();
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
590
|
-
this.
|
|
591
|
-
this.
|
|
592
|
-
this.
|
|
571
|
+
this.t33_1 = r;
|
|
572
|
+
this.u33_1 = g;
|
|
573
|
+
this.v33_1 = b;
|
|
574
|
+
this.w33_1 = alpha;
|
|
575
|
+
this.x33_1 = space;
|
|
593
576
|
}
|
|
594
|
-
protoOf(RGB).
|
|
577
|
+
protoOf(RGB).g35 = function () {
|
|
595
578
|
// Inline function 'kotlin.math.roundToInt' call
|
|
596
|
-
var
|
|
597
|
-
return roundToInt(
|
|
579
|
+
var this_0 = this.t33_1 * 255;
|
|
580
|
+
return roundToInt(this_0);
|
|
598
581
|
};
|
|
599
|
-
protoOf(RGB).
|
|
582
|
+
protoOf(RGB).h35 = function () {
|
|
600
583
|
// Inline function 'kotlin.math.roundToInt' call
|
|
601
|
-
var
|
|
602
|
-
return roundToInt(
|
|
584
|
+
var this_0 = this.u33_1 * 255;
|
|
585
|
+
return roundToInt(this_0);
|
|
603
586
|
};
|
|
604
|
-
protoOf(RGB).
|
|
587
|
+
protoOf(RGB).i35 = function () {
|
|
605
588
|
// Inline function 'kotlin.math.roundToInt' call
|
|
606
|
-
var
|
|
607
|
-
return roundToInt(
|
|
589
|
+
var this_0 = this.v33_1 * 255;
|
|
590
|
+
return roundToInt(this_0);
|
|
608
591
|
};
|
|
609
|
-
protoOf(RGB).
|
|
610
|
-
var f = SRGB_getInstance().
|
|
611
|
-
return equals(this.
|
|
592
|
+
protoOf(RGB).j35 = function (space) {
|
|
593
|
+
var f = SRGB_getInstance().i34_1;
|
|
594
|
+
return equals(this.x33_1, space) ? this : (equals(this.x33_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().v34_1) : false) ? space.e34(f.m34(this.t33_1), f.m34(this.u33_1), f.m34(this.v33_1), this.w33_1) : (equals(this.x33_1, RGBColorSpaces_getInstance().v34_1) ? equals(space, SRGB_getInstance()) : false) ? space.e34(f.n34(this.t33_1), f.n34(this.u33_1), f.n34(this.v33_1), this.w33_1) : this.k35().q35(space);
|
|
612
595
|
};
|
|
613
|
-
protoOf(RGB).
|
|
614
|
-
return this.
|
|
596
|
+
protoOf(RGB).r35 = function () {
|
|
597
|
+
return this.s35(coerceIn(this.t33_1, 0.0, 1.0), coerceIn(this.u33_1, 0.0, 1.0), coerceIn(this.v33_1, 0.0, 1.0), coerceIn(this.w33_1, 0.0, 1.0));
|
|
615
598
|
};
|
|
616
|
-
protoOf(RGB).
|
|
599
|
+
protoOf(RGB).t35 = function () {
|
|
617
600
|
var tmp$ret$3;
|
|
618
601
|
$l$block: {
|
|
619
602
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
620
603
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
621
|
-
var
|
|
622
|
-
var r =
|
|
623
|
-
var g =
|
|
624
|
-
var b =
|
|
604
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
605
|
+
var r = $this$toSRGB.t33_1;
|
|
606
|
+
var g = $this$toSRGB.u33_1;
|
|
607
|
+
var b = $this$toSRGB.v33_1;
|
|
625
608
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
626
609
|
var min = Math.min(r, g, b);
|
|
627
610
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -629,7 +612,6 @@
|
|
|
629
612
|
var chroma = max - min;
|
|
630
613
|
var tmp;
|
|
631
614
|
if (chroma < 1.0E-7) {
|
|
632
|
-
DoubleCompanionObject_getInstance();
|
|
633
615
|
tmp = NaN;
|
|
634
616
|
} else if (r === max) {
|
|
635
617
|
tmp = (g - b) / chroma;
|
|
@@ -642,100 +624,96 @@
|
|
|
642
624
|
}
|
|
643
625
|
var h = tmp * 60;
|
|
644
626
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
645
|
-
var
|
|
627
|
+
var h_0 = normalizeDeg(h);
|
|
646
628
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
647
|
-
tmp$ret$3 = new HSV(
|
|
629
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.w33_1);
|
|
648
630
|
break $l$block;
|
|
649
631
|
}
|
|
650
632
|
return tmp$ret$3;
|
|
651
633
|
};
|
|
652
|
-
protoOf(RGB).
|
|
653
|
-
var f = this.
|
|
634
|
+
protoOf(RGB).k35 = function () {
|
|
635
|
+
var f = this.x33_1.q34();
|
|
654
636
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
655
|
-
var
|
|
656
|
-
var
|
|
657
|
-
var
|
|
658
|
-
var
|
|
637
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.x33_1.r34());
|
|
638
|
+
var v0 = f.m34(this.t33_1);
|
|
639
|
+
var v1 = f.m34(this.u33_1);
|
|
640
|
+
var v2 = f.m34(this.v33_1);
|
|
659
641
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
660
|
-
var
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
return XYZColorSpace(this.
|
|
642
|
+
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
643
|
+
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
644
|
+
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;
|
|
645
|
+
return XYZColorSpace(this.x33_1.t34()).e34(x, y, z, this.w33_1);
|
|
664
646
|
};
|
|
665
|
-
protoOf(RGB).
|
|
647
|
+
protoOf(RGB).r33 = function () {
|
|
666
648
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
667
|
-
var
|
|
649
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
668
650
|
// Inline function 'kotlin.math.roundToInt' call
|
|
669
|
-
var
|
|
670
|
-
var value = roundToInt(
|
|
651
|
+
var this_0 = $this$toSRGB.t35().b34_1 * 100;
|
|
652
|
+
var value = roundToInt(this_0);
|
|
671
653
|
if (value === 30)
|
|
672
654
|
return new Ansi16(30);
|
|
673
655
|
var v = value / 50 | 0;
|
|
674
|
-
var tmp$ret$1;
|
|
675
656
|
// Inline function 'kotlin.math.roundToInt' call
|
|
676
|
-
var
|
|
677
|
-
tmp$ret$1 = roundToInt(
|
|
657
|
+
var this_1 = $this$toSRGB.v33_1;
|
|
658
|
+
var tmp$ret$1 = roundToInt(this_1);
|
|
678
659
|
var tmp = imul(tmp$ret$1, 4);
|
|
679
|
-
var tmp$ret$2;
|
|
680
660
|
// Inline function 'kotlin.math.roundToInt' call
|
|
681
|
-
var
|
|
682
|
-
tmp$ret$2 = roundToInt(
|
|
661
|
+
var this_2 = $this$toSRGB.u33_1;
|
|
662
|
+
var tmp$ret$2 = roundToInt(this_2);
|
|
683
663
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
684
664
|
// Inline function 'kotlin.math.roundToInt' call
|
|
685
|
-
var
|
|
686
|
-
var ansi = 30 + (tmp_0 | roundToInt(
|
|
665
|
+
var this_3 = $this$toSRGB.t33_1;
|
|
666
|
+
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
687
667
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
688
668
|
};
|
|
689
|
-
protoOf(RGB).
|
|
669
|
+
protoOf(RGB).u35 = function () {
|
|
690
670
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
691
|
-
var
|
|
692
|
-
var ri =
|
|
693
|
-
var gi =
|
|
694
|
-
var bi =
|
|
671
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
672
|
+
var ri = $this$toSRGB.g35();
|
|
673
|
+
var gi = $this$toSRGB.h35();
|
|
674
|
+
var bi = $this$toSRGB.i35();
|
|
695
675
|
var tmp;
|
|
696
676
|
if (ri === gi ? gi === bi : false) {
|
|
697
677
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
698
678
|
} else {
|
|
699
|
-
var tmp$ret$0;
|
|
700
679
|
// Inline function 'kotlin.math.roundToInt' call
|
|
701
|
-
var
|
|
702
|
-
tmp$ret$0 = roundToInt(
|
|
680
|
+
var this_0 = $this$toSRGB.t33_1 * 5;
|
|
681
|
+
var tmp$ret$0 = roundToInt(this_0);
|
|
703
682
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
704
|
-
var tmp$ret$1;
|
|
705
683
|
// Inline function 'kotlin.math.roundToInt' call
|
|
706
|
-
var
|
|
707
|
-
tmp$ret$1 = roundToInt(
|
|
684
|
+
var this_1 = $this$toSRGB.u33_1 * 5;
|
|
685
|
+
var tmp$ret$1 = roundToInt(this_1);
|
|
708
686
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
709
687
|
// Inline function 'kotlin.math.roundToInt' call
|
|
710
|
-
var
|
|
711
|
-
tmp = tmp_1 + roundToInt(
|
|
688
|
+
var this_2 = $this$toSRGB.v33_1 * 5;
|
|
689
|
+
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
712
690
|
}
|
|
713
691
|
var code = tmp;
|
|
714
692
|
return new Ansi256(code);
|
|
715
693
|
};
|
|
716
|
-
protoOf(RGB).
|
|
717
|
-
return this.
|
|
694
|
+
protoOf(RGB).m33 = function () {
|
|
695
|
+
return this.j35(RGBColorSpaces_getInstance().u34_1);
|
|
718
696
|
};
|
|
719
|
-
protoOf(RGB).
|
|
697
|
+
protoOf(RGB).v35 = function (r, g, b, alpha, space) {
|
|
720
698
|
return new RGB(r, g, b, alpha, space);
|
|
721
699
|
};
|
|
722
|
-
protoOf(RGB).
|
|
723
|
-
r = r === VOID ? this.
|
|
724
|
-
g = g === VOID ? this.
|
|
725
|
-
b = b === VOID ? this.
|
|
726
|
-
alpha = alpha === VOID ? this.
|
|
727
|
-
space = space === VOID ? this.
|
|
728
|
-
return $super === VOID ? this.
|
|
700
|
+
protoOf(RGB).s35 = function (r, g, b, alpha, space, $super) {
|
|
701
|
+
r = r === VOID ? this.t33_1 : r;
|
|
702
|
+
g = g === VOID ? this.u33_1 : g;
|
|
703
|
+
b = b === VOID ? this.v33_1 : b;
|
|
704
|
+
alpha = alpha === VOID ? this.w33_1 : alpha;
|
|
705
|
+
space = space === VOID ? this.x33_1 : space;
|
|
706
|
+
return $super === VOID ? this.v35(r, g, b, alpha, space) : $super.v35.call(this, r, g, b, alpha, space);
|
|
729
707
|
};
|
|
730
708
|
protoOf(RGB).toString = function () {
|
|
731
|
-
return 'RGB(r=' + this.
|
|
709
|
+
return 'RGB(r=' + this.t33_1 + ', g=' + this.u33_1 + ', b=' + this.v33_1 + ', alpha=' + this.w33_1 + ', space=' + this.x33_1 + ')';
|
|
732
710
|
};
|
|
733
711
|
protoOf(RGB).hashCode = function () {
|
|
734
|
-
var result = getNumberHashCode(this.
|
|
735
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
736
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
737
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
738
|
-
result = imul(result, 31) + hashCode(this.
|
|
712
|
+
var result = getNumberHashCode(this.t33_1);
|
|
713
|
+
result = imul(result, 31) + getNumberHashCode(this.u33_1) | 0;
|
|
714
|
+
result = imul(result, 31) + getNumberHashCode(this.v33_1) | 0;
|
|
715
|
+
result = imul(result, 31) + getNumberHashCode(this.w33_1) | 0;
|
|
716
|
+
result = imul(result, 31) + hashCode(this.x33_1) | 0;
|
|
739
717
|
return result;
|
|
740
718
|
};
|
|
741
719
|
protoOf(RGB).equals = function (other) {
|
|
@@ -744,15 +722,15 @@
|
|
|
744
722
|
if (!(other instanceof RGB))
|
|
745
723
|
return false;
|
|
746
724
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
747
|
-
if (!equals(this.
|
|
725
|
+
if (!equals(this.t33_1, tmp0_other_with_cast.t33_1))
|
|
748
726
|
return false;
|
|
749
|
-
if (!equals(this.
|
|
727
|
+
if (!equals(this.u33_1, tmp0_other_with_cast.u33_1))
|
|
750
728
|
return false;
|
|
751
|
-
if (!equals(this.
|
|
729
|
+
if (!equals(this.v33_1, tmp0_other_with_cast.v33_1))
|
|
752
730
|
return false;
|
|
753
|
-
if (!equals(this.
|
|
731
|
+
if (!equals(this.w33_1, tmp0_other_with_cast.w33_1))
|
|
754
732
|
return false;
|
|
755
|
-
if (!equals(this.
|
|
733
|
+
if (!equals(this.x33_1, tmp0_other_with_cast.x33_1))
|
|
756
734
|
return false;
|
|
757
735
|
return true;
|
|
758
736
|
};
|
|
@@ -763,12 +741,11 @@
|
|
|
763
741
|
tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
|
|
764
742
|
} else {
|
|
765
743
|
var i_0 = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
|
|
766
|
-
var tmp$ret$1;
|
|
767
744
|
// Inline function 'kotlin.let' call
|
|
768
|
-
var tmp0_let = charSequenceGet(_this__u8e3s4, i_0);
|
|
769
745
|
// Inline function 'kotlin.contracts.contract' call
|
|
770
746
|
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
771
|
-
|
|
747
|
+
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
748
|
+
var tmp$ret$1 = toString(it) + toString(it);
|
|
772
749
|
tmp = toInt(tmp$ret$1, 16);
|
|
773
750
|
}
|
|
774
751
|
return tmp;
|
|
@@ -779,18 +756,17 @@
|
|
|
779
756
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
|
|
780
757
|
// Inline function 'kotlin.require' call
|
|
781
758
|
// Inline function 'kotlin.let' call
|
|
782
|
-
var tmp0_let = get_hexLength(_this__u8e3s4);
|
|
783
759
|
// Inline function 'kotlin.contracts.contract' call
|
|
784
|
-
var tmp$ret$0;
|
|
785
760
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
786
|
-
|
|
761
|
+
var it = get_hexLength(_this__u8e3s4);
|
|
762
|
+
switch (it) {
|
|
787
763
|
case 3:
|
|
788
764
|
case 4:
|
|
789
765
|
case 6:
|
|
790
|
-
tmp$ret$0 = true;
|
|
766
|
+
var tmp$ret$0 = true;
|
|
791
767
|
break;
|
|
792
768
|
default:
|
|
793
|
-
tmp$ret$0 =
|
|
769
|
+
tmp$ret$0 = it === 8;
|
|
794
770
|
break;
|
|
795
771
|
}
|
|
796
772
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -856,18 +832,18 @@
|
|
|
856
832
|
var ACES_AP1_B;
|
|
857
833
|
function RGBColorSpaces() {
|
|
858
834
|
RGBColorSpaces_instance = this;
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
868
|
-
this.
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
835
|
+
this.u34_1 = SRGB_getInstance();
|
|
836
|
+
this.v34_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().h33_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
837
|
+
this.w34_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
838
|
+
this.x34_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
839
|
+
this.y34_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
840
|
+
this.z34_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
841
|
+
this.a35_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().h33_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));
|
|
842
|
+
this.b35_1 = BT2020Space_getInstance();
|
|
843
|
+
this.c35_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().h33_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
844
|
+
this.d35_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));
|
|
845
|
+
this.e35_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().h33_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
846
|
+
this.f35_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().f33_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));
|
|
871
847
|
}
|
|
872
848
|
var RGBColorSpaces_instance;
|
|
873
849
|
function RGBColorSpaces_getInstance() {
|
|
@@ -877,29 +853,29 @@
|
|
|
877
853
|
}
|
|
878
854
|
function SRGB() {
|
|
879
855
|
SRGB_instance = this;
|
|
880
|
-
this.
|
|
881
|
-
this.
|
|
882
|
-
this.
|
|
883
|
-
this.
|
|
884
|
-
this.
|
|
885
|
-
this.
|
|
856
|
+
this.f34_1 = 'sRGB';
|
|
857
|
+
this.g34_1 = rectangularComponentInfo('RGB');
|
|
858
|
+
this.h34_1 = Illuminant_getInstance().h33_1;
|
|
859
|
+
this.i34_1 = SRGBTransferFunctions_instance;
|
|
860
|
+
this.j34_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.h34_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
861
|
+
this.k34_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.j34_1)));
|
|
886
862
|
}
|
|
887
|
-
protoOf(SRGB).
|
|
888
|
-
return this.
|
|
863
|
+
protoOf(SRGB).t34 = function () {
|
|
864
|
+
return this.h34_1;
|
|
889
865
|
};
|
|
890
|
-
protoOf(SRGB).
|
|
891
|
-
return this.
|
|
866
|
+
protoOf(SRGB).q34 = function () {
|
|
867
|
+
return this.i34_1;
|
|
892
868
|
};
|
|
893
|
-
protoOf(SRGB).
|
|
894
|
-
return this.
|
|
869
|
+
protoOf(SRGB).r34 = function () {
|
|
870
|
+
return this.j34_1;
|
|
895
871
|
};
|
|
896
|
-
protoOf(SRGB).
|
|
897
|
-
return this.
|
|
872
|
+
protoOf(SRGB).s34 = function () {
|
|
873
|
+
return this.k34_1;
|
|
898
874
|
};
|
|
899
875
|
protoOf(SRGB).toString = function () {
|
|
900
|
-
return this.
|
|
876
|
+
return this.f34_1;
|
|
901
877
|
};
|
|
902
|
-
protoOf(SRGB).
|
|
878
|
+
protoOf(SRGB).e34 = function (r, g, b, alpha) {
|
|
903
879
|
return new RGB(r, g, b, alpha, this);
|
|
904
880
|
};
|
|
905
881
|
var SRGB_instance;
|
|
@@ -914,32 +890,32 @@
|
|
|
914
890
|
}
|
|
915
891
|
function ACESccTransferFunctions() {
|
|
916
892
|
ACESccTransferFunctions_instance = this;
|
|
917
|
-
this.
|
|
918
|
-
this.
|
|
919
|
-
this.
|
|
893
|
+
this.w35_1 = 3.0517578125E-5;
|
|
894
|
+
this.x35_1 = 1.52587890625E-5;
|
|
895
|
+
this.y35_1 = -0.3013698630136986;
|
|
920
896
|
var tmp = this;
|
|
921
897
|
// Inline function 'kotlin.math.log2' call
|
|
922
|
-
tmp.
|
|
898
|
+
tmp.z35_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
923
899
|
}
|
|
924
|
-
protoOf(ACESccTransferFunctions).
|
|
900
|
+
protoOf(ACESccTransferFunctions).m34 = function (x) {
|
|
925
901
|
var tmp;
|
|
926
902
|
if (x <= -0.3013698630136986) {
|
|
927
903
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
928
|
-
} else if (x < this.
|
|
904
|
+
} else if (x < this.z35_1) {
|
|
929
905
|
// Inline function 'kotlin.math.pow' call
|
|
930
|
-
var
|
|
931
|
-
tmp = Math.pow(2.0,
|
|
906
|
+
var x_0 = x * 17.52 - 9.72;
|
|
907
|
+
tmp = Math.pow(2.0, x_0);
|
|
932
908
|
} else {
|
|
933
909
|
tmp = 65504.0;
|
|
934
910
|
}
|
|
935
911
|
return tmp;
|
|
936
912
|
};
|
|
937
|
-
protoOf(ACESccTransferFunctions).
|
|
913
|
+
protoOf(ACESccTransferFunctions).n34 = function (x) {
|
|
938
914
|
var tmp;
|
|
939
915
|
if (x < 3.0517578125E-5) {
|
|
940
916
|
// Inline function 'kotlin.math.log2' call
|
|
941
|
-
var
|
|
942
|
-
tmp = (log2(
|
|
917
|
+
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
918
|
+
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
943
919
|
} else {
|
|
944
920
|
// Inline function 'kotlin.math.log2' call
|
|
945
921
|
tmp = (log2(x) + 9.72) / 17.52;
|
|
@@ -954,26 +930,26 @@
|
|
|
954
930
|
}
|
|
955
931
|
function ACEScctTransferFunctions() {
|
|
956
932
|
ACEScctTransferFunctions_instance = this;
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
933
|
+
this.a36_1 = 10.5402377416545;
|
|
934
|
+
this.b36_1 = 0.0729055341958355;
|
|
959
935
|
var tmp = this;
|
|
960
936
|
// Inline function 'kotlin.math.log2' call
|
|
961
|
-
tmp.
|
|
937
|
+
tmp.c36_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
962
938
|
}
|
|
963
|
-
protoOf(ACEScctTransferFunctions).
|
|
939
|
+
protoOf(ACEScctTransferFunctions).m34 = function (x) {
|
|
964
940
|
var tmp;
|
|
965
941
|
if (x <= 0.155251141552511) {
|
|
966
942
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
967
|
-
} else if (x < this.
|
|
943
|
+
} else if (x < this.c36_1) {
|
|
968
944
|
// Inline function 'kotlin.math.pow' call
|
|
969
|
-
var
|
|
970
|
-
tmp = Math.pow(2.0,
|
|
945
|
+
var x_0 = x * 17.52 - 9.72;
|
|
946
|
+
tmp = Math.pow(2.0, x_0);
|
|
971
947
|
} else {
|
|
972
948
|
tmp = 65504.0;
|
|
973
949
|
}
|
|
974
950
|
return tmp;
|
|
975
951
|
};
|
|
976
|
-
protoOf(ACEScctTransferFunctions).
|
|
952
|
+
protoOf(ACEScctTransferFunctions).n34 = function (x) {
|
|
977
953
|
var tmp;
|
|
978
954
|
if (x < 0.0078125) {
|
|
979
955
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -991,30 +967,30 @@
|
|
|
991
967
|
}
|
|
992
968
|
function BT2020Space() {
|
|
993
969
|
BT2020Space_instance = this;
|
|
994
|
-
this.
|
|
995
|
-
this.
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
1000
|
-
}
|
|
1001
|
-
protoOf(BT2020Space).
|
|
1002
|
-
return this.
|
|
970
|
+
this.d36_1 = 'BT.2020';
|
|
971
|
+
this.e36_1 = rectangularComponentInfo('RGB');
|
|
972
|
+
this.f36_1 = Illuminant_getInstance().h33_1;
|
|
973
|
+
this.g36_1 = BT2020TransferFunctions_getInstance();
|
|
974
|
+
this.h36_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.f36_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
975
|
+
this.i36_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.h36_1)));
|
|
976
|
+
}
|
|
977
|
+
protoOf(BT2020Space).t34 = function () {
|
|
978
|
+
return this.f36_1;
|
|
1003
979
|
};
|
|
1004
|
-
protoOf(BT2020Space).
|
|
1005
|
-
return this.
|
|
980
|
+
protoOf(BT2020Space).q34 = function () {
|
|
981
|
+
return this.g36_1;
|
|
1006
982
|
};
|
|
1007
|
-
protoOf(BT2020Space).
|
|
983
|
+
protoOf(BT2020Space).e34 = function (r, g, b, alpha) {
|
|
1008
984
|
return new RGB(r, g, b, alpha, this);
|
|
1009
985
|
};
|
|
1010
|
-
protoOf(BT2020Space).
|
|
1011
|
-
return this.
|
|
986
|
+
protoOf(BT2020Space).r34 = function () {
|
|
987
|
+
return this.h36_1;
|
|
1012
988
|
};
|
|
1013
|
-
protoOf(BT2020Space).
|
|
1014
|
-
return this.
|
|
989
|
+
protoOf(BT2020Space).s34 = function () {
|
|
990
|
+
return this.i36_1;
|
|
1015
991
|
};
|
|
1016
992
|
protoOf(BT2020Space).toString = function () {
|
|
1017
|
-
return this.
|
|
993
|
+
return this.d36_1;
|
|
1018
994
|
};
|
|
1019
995
|
var BT2020Space_instance;
|
|
1020
996
|
function BT2020Space_getInstance() {
|
|
@@ -1024,12 +1000,12 @@
|
|
|
1024
1000
|
}
|
|
1025
1001
|
function BT709TransferFunctions() {
|
|
1026
1002
|
BT709TransferFunctions_instance = this;
|
|
1027
|
-
this.
|
|
1003
|
+
this.j36_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1028
1004
|
}
|
|
1029
|
-
protoOf(BT709TransferFunctions).
|
|
1030
|
-
return numberToDouble(x < this.
|
|
1005
|
+
protoOf(BT709TransferFunctions).m34 = function (x) {
|
|
1006
|
+
return numberToDouble(x < this.j36_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1031
1007
|
};
|
|
1032
|
-
protoOf(BT709TransferFunctions).
|
|
1008
|
+
protoOf(BT709TransferFunctions).n34 = function (x) {
|
|
1033
1009
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1034
1010
|
};
|
|
1035
1011
|
var BT709TransferFunctions_instance;
|
|
@@ -1039,87 +1015,81 @@
|
|
|
1039
1015
|
return BT709TransferFunctions_instance;
|
|
1040
1016
|
}
|
|
1041
1017
|
function SRGBTransferFunctions() {
|
|
1042
|
-
SRGBTransferFunctions_instance = this;
|
|
1043
1018
|
}
|
|
1044
|
-
protoOf(SRGBTransferFunctions).
|
|
1019
|
+
protoOf(SRGBTransferFunctions).n34 = function (x) {
|
|
1045
1020
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
1046
1021
|
};
|
|
1047
|
-
protoOf(SRGBTransferFunctions).
|
|
1022
|
+
protoOf(SRGBTransferFunctions).m34 = function (x) {
|
|
1048
1023
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1049
1024
|
};
|
|
1050
1025
|
var SRGBTransferFunctions_instance;
|
|
1051
1026
|
function SRGBTransferFunctions_getInstance() {
|
|
1052
|
-
if (SRGBTransferFunctions_instance == null)
|
|
1053
|
-
new SRGBTransferFunctions();
|
|
1054
1027
|
return SRGBTransferFunctions_instance;
|
|
1055
1028
|
}
|
|
1056
1029
|
function ROMMTransferFunctions() {
|
|
1057
|
-
|
|
1058
|
-
this.x35_1 = 0.001953;
|
|
1030
|
+
this.k36_1 = 0.001953;
|
|
1059
1031
|
}
|
|
1060
|
-
protoOf(ROMMTransferFunctions).
|
|
1032
|
+
protoOf(ROMMTransferFunctions).m34 = function (x) {
|
|
1061
1033
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
1062
1034
|
};
|
|
1063
|
-
protoOf(ROMMTransferFunctions).
|
|
1035
|
+
protoOf(ROMMTransferFunctions).n34 = function (x) {
|
|
1064
1036
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
1065
1037
|
};
|
|
1066
1038
|
var ROMMTransferFunctions_instance;
|
|
1067
1039
|
function ROMMTransferFunctions_getInstance() {
|
|
1068
|
-
if (ROMMTransferFunctions_instance == null)
|
|
1069
|
-
new ROMMTransferFunctions();
|
|
1070
1040
|
return ROMMTransferFunctions_instance;
|
|
1071
1041
|
}
|
|
1072
1042
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1073
1043
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1074
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1075
|
-
var wp = whitePoint.
|
|
1044
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.l36_1, g.l36_1, b.l36_1, r.m36_1, g.m36_1, b.m36_1, r.o36(), g.o36(), b.o36());
|
|
1045
|
+
var wp = whitePoint.b33_1;
|
|
1076
1046
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1077
|
-
var
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1047
|
+
var this_0 = inverse(primaries);
|
|
1048
|
+
var v0 = wp.p36();
|
|
1049
|
+
var v1 = wp.n36_1;
|
|
1050
|
+
var v2 = wp.q36();
|
|
1081
1051
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1082
|
-
var
|
|
1083
|
-
var
|
|
1084
|
-
var
|
|
1085
|
-
return dotDiagonal(primaries,
|
|
1052
|
+
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1053
|
+
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
1054
|
+
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;
|
|
1055
|
+
return dotDiagonal(primaries, x, y, z);
|
|
1086
1056
|
}
|
|
1087
1057
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
1088
|
-
this.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
}
|
|
1098
|
-
protoOf(RGBColorSpaceImpl).
|
|
1099
|
-
return this.
|
|
1058
|
+
this.r36_1 = name;
|
|
1059
|
+
this.s36_1 = whitePoint;
|
|
1060
|
+
this.t36_1 = transferFunctions;
|
|
1061
|
+
this.u36_1 = r;
|
|
1062
|
+
this.v36_1 = g;
|
|
1063
|
+
this.w36_1 = b;
|
|
1064
|
+
this.x36_1 = rectangularComponentInfo('RGB');
|
|
1065
|
+
this.y36_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.s36_1, this.u36_1, this.v36_1, this.w36_1));
|
|
1066
|
+
this.z36_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.y36_1)));
|
|
1067
|
+
}
|
|
1068
|
+
protoOf(RGBColorSpaceImpl).t34 = function () {
|
|
1069
|
+
return this.s36_1;
|
|
1100
1070
|
};
|
|
1101
|
-
protoOf(RGBColorSpaceImpl).
|
|
1102
|
-
return this.
|
|
1071
|
+
protoOf(RGBColorSpaceImpl).q34 = function () {
|
|
1072
|
+
return this.t36_1;
|
|
1103
1073
|
};
|
|
1104
|
-
protoOf(RGBColorSpaceImpl).
|
|
1105
|
-
return this.
|
|
1074
|
+
protoOf(RGBColorSpaceImpl).r34 = function () {
|
|
1075
|
+
return this.y36_1;
|
|
1106
1076
|
};
|
|
1107
|
-
protoOf(RGBColorSpaceImpl).
|
|
1108
|
-
return this.
|
|
1077
|
+
protoOf(RGBColorSpaceImpl).s34 = function () {
|
|
1078
|
+
return this.z36_1;
|
|
1109
1079
|
};
|
|
1110
1080
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1111
|
-
return this.
|
|
1081
|
+
return this.r36_1;
|
|
1112
1082
|
};
|
|
1113
|
-
protoOf(RGBColorSpaceImpl).
|
|
1083
|
+
protoOf(RGBColorSpaceImpl).e34 = function (r, g, b, alpha) {
|
|
1114
1084
|
return new RGB(r, g, b, alpha, this);
|
|
1115
1085
|
};
|
|
1116
1086
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1117
|
-
var result = getStringHashCode(this.
|
|
1118
|
-
result = imul(result, 31) + this.
|
|
1119
|
-
result = imul(result, 31) + hashCode(this.
|
|
1120
|
-
result = imul(result, 31) + this.
|
|
1121
|
-
result = imul(result, 31) + this.
|
|
1122
|
-
result = imul(result, 31) + this.
|
|
1087
|
+
var result = getStringHashCode(this.r36_1);
|
|
1088
|
+
result = imul(result, 31) + this.s36_1.hashCode() | 0;
|
|
1089
|
+
result = imul(result, 31) + hashCode(this.t36_1) | 0;
|
|
1090
|
+
result = imul(result, 31) + this.u36_1.hashCode() | 0;
|
|
1091
|
+
result = imul(result, 31) + this.v36_1.hashCode() | 0;
|
|
1092
|
+
result = imul(result, 31) + this.w36_1.hashCode() | 0;
|
|
1123
1093
|
return result;
|
|
1124
1094
|
};
|
|
1125
1095
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1128,32 +1098,32 @@
|
|
|
1128
1098
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
1129
1099
|
return false;
|
|
1130
1100
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1131
|
-
if (!(this.
|
|
1101
|
+
if (!(this.r36_1 === tmp0_other_with_cast.r36_1))
|
|
1132
1102
|
return false;
|
|
1133
|
-
if (!this.
|
|
1103
|
+
if (!this.s36_1.equals(tmp0_other_with_cast.s36_1))
|
|
1134
1104
|
return false;
|
|
1135
|
-
if (!equals(this.
|
|
1105
|
+
if (!equals(this.t36_1, tmp0_other_with_cast.t36_1))
|
|
1136
1106
|
return false;
|
|
1137
|
-
if (!this.
|
|
1107
|
+
if (!this.u36_1.equals(tmp0_other_with_cast.u36_1))
|
|
1138
1108
|
return false;
|
|
1139
|
-
if (!this.
|
|
1109
|
+
if (!this.v36_1.equals(tmp0_other_with_cast.v36_1))
|
|
1140
1110
|
return false;
|
|
1141
|
-
if (!this.
|
|
1111
|
+
if (!this.w36_1.equals(tmp0_other_with_cast.w36_1))
|
|
1142
1112
|
return false;
|
|
1143
1113
|
return true;
|
|
1144
1114
|
};
|
|
1145
1115
|
function BT2020TransferFunctions() {
|
|
1146
1116
|
BT2020TransferFunctions_instance = this;
|
|
1147
|
-
this.
|
|
1148
|
-
this.
|
|
1117
|
+
this.a37_1 = 1.0993;
|
|
1118
|
+
this.b37_1 = 0.0181;
|
|
1149
1119
|
var tmp = this;
|
|
1150
1120
|
// Inline function 'kotlin.math.pow' call
|
|
1151
|
-
tmp.
|
|
1121
|
+
tmp.c37_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
1152
1122
|
}
|
|
1153
|
-
protoOf(BT2020TransferFunctions).
|
|
1154
|
-
return numberToDouble(x < this.
|
|
1123
|
+
protoOf(BT2020TransferFunctions).m34 = function (x) {
|
|
1124
|
+
return numberToDouble(x < this.c37_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1155
1125
|
};
|
|
1156
|
-
protoOf(BT2020TransferFunctions).
|
|
1126
|
+
protoOf(BT2020TransferFunctions).n34 = function (x) {
|
|
1157
1127
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
1158
1128
|
};
|
|
1159
1129
|
var BT2020TransferFunctions_instance;
|
|
@@ -1180,13 +1150,13 @@
|
|
|
1180
1150
|
}
|
|
1181
1151
|
function Companion_3() {
|
|
1182
1152
|
Companion_instance_3 = this;
|
|
1183
|
-
this.
|
|
1153
|
+
this.d37_1 = XYZColorSpaces_getInstance().e37_1;
|
|
1184
1154
|
}
|
|
1185
|
-
protoOf(Companion_3).
|
|
1186
|
-
return this.
|
|
1155
|
+
protoOf(Companion_3).t34 = function () {
|
|
1156
|
+
return this.d37_1.t34();
|
|
1187
1157
|
};
|
|
1188
|
-
protoOf(Companion_3).
|
|
1189
|
-
return this.
|
|
1158
|
+
protoOf(Companion_3).e34 = function (x, y, z, alpha) {
|
|
1159
|
+
return this.d37_1.e34(x, y, z, alpha);
|
|
1190
1160
|
};
|
|
1191
1161
|
var Companion_instance_3;
|
|
1192
1162
|
function Companion_getInstance_3() {
|
|
@@ -1195,65 +1165,65 @@
|
|
|
1195
1165
|
return Companion_instance_3;
|
|
1196
1166
|
}
|
|
1197
1167
|
function adaptToM($this, space, m, mi) {
|
|
1198
|
-
if (space.
|
|
1168
|
+
if (space.t34().equals($this.p35_1.t34()))
|
|
1199
1169
|
return $this;
|
|
1200
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1170
|
+
var transform = chromaticAdaptationMatrix(space, $this.p35_1.t34().b33_1, m, mi);
|
|
1201
1171
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1202
|
-
var
|
|
1203
|
-
var
|
|
1204
|
-
var
|
|
1172
|
+
var v0 = $this.l35_1;
|
|
1173
|
+
var v1 = $this.m35_1;
|
|
1174
|
+
var v2 = $this.n35_1;
|
|
1205
1175
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1206
|
-
var
|
|
1207
|
-
var
|
|
1208
|
-
var
|
|
1209
|
-
return space.
|
|
1176
|
+
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1177
|
+
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;
|
|
1178
|
+
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;
|
|
1179
|
+
return space.e34(xx, yy, zz, $this.o35_1);
|
|
1210
1180
|
}
|
|
1211
1181
|
function XYZ(x, y, z, alpha, space) {
|
|
1212
1182
|
Companion_getInstance_3();
|
|
1213
|
-
this.
|
|
1214
|
-
this.
|
|
1215
|
-
this.
|
|
1216
|
-
this.
|
|
1217
|
-
this.
|
|
1183
|
+
this.l35_1 = x;
|
|
1184
|
+
this.m35_1 = y;
|
|
1185
|
+
this.n35_1 = z;
|
|
1186
|
+
this.o35_1 = alpha;
|
|
1187
|
+
this.p35_1 = space;
|
|
1218
1188
|
}
|
|
1219
|
-
protoOf(XYZ).
|
|
1189
|
+
protoOf(XYZ).g37 = function (space) {
|
|
1220
1190
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1221
1191
|
};
|
|
1222
|
-
protoOf(XYZ).
|
|
1223
|
-
var tmp0_container = this.
|
|
1224
|
-
var x = tmp0_container.
|
|
1225
|
-
var y = tmp0_container.
|
|
1226
|
-
var z = tmp0_container.
|
|
1227
|
-
var f = space.
|
|
1192
|
+
protoOf(XYZ).q35 = function (space) {
|
|
1193
|
+
var tmp0_container = this.g37(XYZColorSpace(space.t34()));
|
|
1194
|
+
var x = tmp0_container.jd();
|
|
1195
|
+
var y = tmp0_container.kd();
|
|
1196
|
+
var z = tmp0_container.dh();
|
|
1197
|
+
var f = space.q34();
|
|
1228
1198
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1229
|
-
var
|
|
1199
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.s34());
|
|
1230
1200
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1231
|
-
var
|
|
1232
|
-
var
|
|
1233
|
-
var
|
|
1234
|
-
return space.
|
|
1201
|
+
var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
1202
|
+
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;
|
|
1203
|
+
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;
|
|
1204
|
+
return space.e34(f.n34(r), f.n34(g), f.n34(b), this.o35_1);
|
|
1235
1205
|
};
|
|
1236
|
-
protoOf(XYZ).
|
|
1237
|
-
return this.
|
|
1206
|
+
protoOf(XYZ).m33 = function () {
|
|
1207
|
+
return this.q35(RGBColorSpaces_getInstance().u34_1);
|
|
1238
1208
|
};
|
|
1239
|
-
protoOf(XYZ).
|
|
1240
|
-
return this.
|
|
1209
|
+
protoOf(XYZ).jd = function () {
|
|
1210
|
+
return this.l35_1;
|
|
1241
1211
|
};
|
|
1242
|
-
protoOf(XYZ).
|
|
1243
|
-
return this.
|
|
1212
|
+
protoOf(XYZ).kd = function () {
|
|
1213
|
+
return this.m35_1;
|
|
1244
1214
|
};
|
|
1245
|
-
protoOf(XYZ).
|
|
1246
|
-
return this.
|
|
1215
|
+
protoOf(XYZ).dh = function () {
|
|
1216
|
+
return this.n35_1;
|
|
1247
1217
|
};
|
|
1248
1218
|
protoOf(XYZ).toString = function () {
|
|
1249
|
-
return 'XYZ(x=' + this.
|
|
1219
|
+
return 'XYZ(x=' + this.l35_1 + ', y=' + this.m35_1 + ', z=' + this.n35_1 + ', alpha=' + this.o35_1 + ', space=' + this.p35_1 + ')';
|
|
1250
1220
|
};
|
|
1251
1221
|
protoOf(XYZ).hashCode = function () {
|
|
1252
|
-
var result = getNumberHashCode(this.
|
|
1253
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1254
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1255
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1256
|
-
result = imul(result, 31) + hashCode(this.
|
|
1222
|
+
var result = getNumberHashCode(this.l35_1);
|
|
1223
|
+
result = imul(result, 31) + getNumberHashCode(this.m35_1) | 0;
|
|
1224
|
+
result = imul(result, 31) + getNumberHashCode(this.n35_1) | 0;
|
|
1225
|
+
result = imul(result, 31) + getNumberHashCode(this.o35_1) | 0;
|
|
1226
|
+
result = imul(result, 31) + hashCode(this.p35_1) | 0;
|
|
1257
1227
|
return result;
|
|
1258
1228
|
};
|
|
1259
1229
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1262,25 +1232,25 @@
|
|
|
1262
1232
|
if (!(other instanceof XYZ))
|
|
1263
1233
|
return false;
|
|
1264
1234
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1265
|
-
if (!equals(this.
|
|
1235
|
+
if (!equals(this.l35_1, tmp0_other_with_cast.l35_1))
|
|
1266
1236
|
return false;
|
|
1267
|
-
if (!equals(this.
|
|
1237
|
+
if (!equals(this.m35_1, tmp0_other_with_cast.m35_1))
|
|
1268
1238
|
return false;
|
|
1269
|
-
if (!equals(this.
|
|
1239
|
+
if (!equals(this.n35_1, tmp0_other_with_cast.n35_1))
|
|
1270
1240
|
return false;
|
|
1271
|
-
if (!equals(this.
|
|
1241
|
+
if (!equals(this.o35_1, tmp0_other_with_cast.o35_1))
|
|
1272
1242
|
return false;
|
|
1273
|
-
if (!equals(this.
|
|
1243
|
+
if (!equals(this.p35_1, tmp0_other_with_cast.p35_1))
|
|
1274
1244
|
return false;
|
|
1275
1245
|
return true;
|
|
1276
1246
|
};
|
|
1277
1247
|
function XYZColorSpace(whitePoint) {
|
|
1278
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1248
|
+
return whitePoint.equals(Illuminant_getInstance().h33_1) ? XYZColorSpaces_getInstance().e37_1 : whitePoint.equals(Illuminant_getInstance().f33_1) ? XYZColorSpaces_getInstance().f37_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1279
1249
|
}
|
|
1280
1250
|
function XYZColorSpaces() {
|
|
1281
1251
|
XYZColorSpaces_instance = this;
|
|
1282
|
-
this.
|
|
1283
|
-
this.
|
|
1252
|
+
this.e37_1 = new XYZColorSpaceImpl(Illuminant_getInstance().h33_1);
|
|
1253
|
+
this.f37_1 = new XYZColorSpaceImpl(Illuminant_getInstance().f33_1);
|
|
1284
1254
|
}
|
|
1285
1255
|
var XYZColorSpaces_instance;
|
|
1286
1256
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1291,26 +1261,26 @@
|
|
|
1291
1261
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1292
1262
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1293
1263
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1294
|
-
var dstWp = _this__u8e3s4.
|
|
1295
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1296
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1264
|
+
var dstWp = _this__u8e3s4.t34().b33_1;
|
|
1265
|
+
var src = dot_0(xyzToLms, srcWp.p36(), srcWp.n36_1, srcWp.q36());
|
|
1266
|
+
var dst = dot_0(xyzToLms, dstWp.p36(), dstWp.n36_1, dstWp.q36());
|
|
1297
1267
|
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);
|
|
1298
1268
|
}
|
|
1299
1269
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1300
|
-
this.
|
|
1301
|
-
this.
|
|
1270
|
+
this.h37_1 = whitePoint;
|
|
1271
|
+
this.i37_1 = rectangularComponentInfo('XYZ');
|
|
1302
1272
|
}
|
|
1303
|
-
protoOf(XYZColorSpaceImpl).
|
|
1304
|
-
return this.
|
|
1273
|
+
protoOf(XYZColorSpaceImpl).t34 = function () {
|
|
1274
|
+
return this.h37_1;
|
|
1305
1275
|
};
|
|
1306
1276
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1307
|
-
return 'XYZColorSpace(' + this.
|
|
1277
|
+
return 'XYZColorSpace(' + this.h37_1 + ')';
|
|
1308
1278
|
};
|
|
1309
|
-
protoOf(XYZColorSpaceImpl).
|
|
1279
|
+
protoOf(XYZColorSpaceImpl).e34 = function (x, y, z, alpha) {
|
|
1310
1280
|
return new XYZ(x, y, z, alpha, this);
|
|
1311
1281
|
};
|
|
1312
1282
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1313
|
-
return this.
|
|
1283
|
+
return this.h37_1.hashCode();
|
|
1314
1284
|
};
|
|
1315
1285
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1316
1286
|
if (this === other)
|
|
@@ -1318,7 +1288,7 @@
|
|
|
1318
1288
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
1319
1289
|
return false;
|
|
1320
1290
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
1321
|
-
if (!this.
|
|
1291
|
+
if (!this.h37_1.equals(tmp0_other_with_cast.h37_1))
|
|
1322
1292
|
return false;
|
|
1323
1293
|
return true;
|
|
1324
1294
|
};
|
|
@@ -1332,26 +1302,26 @@
|
|
|
1332
1302
|
}
|
|
1333
1303
|
function xyY(x, y, Y) {
|
|
1334
1304
|
Y = Y === VOID ? 1.0 : Y;
|
|
1335
|
-
this.
|
|
1336
|
-
this.
|
|
1337
|
-
this.
|
|
1305
|
+
this.l36_1 = x;
|
|
1306
|
+
this.m36_1 = y;
|
|
1307
|
+
this.n36_1 = Y;
|
|
1338
1308
|
}
|
|
1339
|
-
protoOf(xyY).
|
|
1340
|
-
return 1 - this.
|
|
1309
|
+
protoOf(xyY).o36 = function () {
|
|
1310
|
+
return 1 - this.l36_1 - this.m36_1;
|
|
1341
1311
|
};
|
|
1342
|
-
protoOf(xyY).
|
|
1343
|
-
return this.
|
|
1312
|
+
protoOf(xyY).p36 = function () {
|
|
1313
|
+
return this.l36_1 * this.n36_1 / this.m36_1;
|
|
1344
1314
|
};
|
|
1345
|
-
protoOf(xyY).
|
|
1346
|
-
return (1 - this.
|
|
1315
|
+
protoOf(xyY).q36 = function () {
|
|
1316
|
+
return (1 - this.l36_1 - this.m36_1) * this.n36_1 / this.m36_1;
|
|
1347
1317
|
};
|
|
1348
1318
|
protoOf(xyY).toString = function () {
|
|
1349
|
-
return 'xyY(x=' + this.
|
|
1319
|
+
return 'xyY(x=' + this.l36_1 + ', y=' + this.m36_1 + ', Y=' + this.n36_1 + ')';
|
|
1350
1320
|
};
|
|
1351
1321
|
protoOf(xyY).hashCode = function () {
|
|
1352
|
-
var result = getNumberHashCode(this.
|
|
1353
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1354
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1322
|
+
var result = getNumberHashCode(this.l36_1);
|
|
1323
|
+
result = imul(result, 31) + getNumberHashCode(this.m36_1) | 0;
|
|
1324
|
+
result = imul(result, 31) + getNumberHashCode(this.n36_1) | 0;
|
|
1355
1325
|
return result;
|
|
1356
1326
|
};
|
|
1357
1327
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1360,36 +1330,41 @@
|
|
|
1360
1330
|
if (!(other instanceof xyY))
|
|
1361
1331
|
return false;
|
|
1362
1332
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1363
|
-
if (!equals(this.
|
|
1333
|
+
if (!equals(this.l36_1, tmp0_other_with_cast.l36_1))
|
|
1364
1334
|
return false;
|
|
1365
|
-
if (!equals(this.
|
|
1335
|
+
if (!equals(this.m36_1, tmp0_other_with_cast.m36_1))
|
|
1366
1336
|
return false;
|
|
1367
|
-
if (!equals(this.
|
|
1337
|
+
if (!equals(this.n36_1, tmp0_other_with_cast.n36_1))
|
|
1368
1338
|
return false;
|
|
1369
1339
|
return true;
|
|
1370
1340
|
};
|
|
1371
1341
|
//region block: post-declaration
|
|
1372
|
-
protoOf(Companion_2).
|
|
1373
|
-
protoOf(Companion_2).
|
|
1374
|
-
protoOf(Companion_2).
|
|
1375
|
-
protoOf(SRGB).
|
|
1376
|
-
protoOf(SRGB).
|
|
1377
|
-
protoOf(SRGB).
|
|
1378
|
-
protoOf(SRGB).
|
|
1379
|
-
protoOf(SRGB).
|
|
1380
|
-
protoOf(SRGB).
|
|
1381
|
-
protoOf(BT2020Space).
|
|
1382
|
-
protoOf(BT2020Space).
|
|
1383
|
-
protoOf(BT2020Space).
|
|
1384
|
-
protoOf(BT2020Space).
|
|
1385
|
-
protoOf(BT2020Space).
|
|
1386
|
-
protoOf(BT2020Space).
|
|
1387
|
-
protoOf(RGBColorSpaceImpl).
|
|
1388
|
-
protoOf(RGBColorSpaceImpl).
|
|
1389
|
-
protoOf(RGBColorSpaceImpl).
|
|
1390
|
-
protoOf(RGBColorSpaceImpl).
|
|
1391
|
-
protoOf(RGBColorSpaceImpl).
|
|
1392
|
-
protoOf(RGBColorSpaceImpl).
|
|
1342
|
+
protoOf(Companion_2).o33 = from255$default;
|
|
1343
|
+
protoOf(Companion_2).n33 = invoke$default;
|
|
1344
|
+
protoOf(Companion_2).s33 = invoke$default_0;
|
|
1345
|
+
protoOf(SRGB).n33 = invoke$default;
|
|
1346
|
+
protoOf(SRGB).o34 = invoke;
|
|
1347
|
+
protoOf(SRGB).s33 = invoke$default_0;
|
|
1348
|
+
protoOf(SRGB).w28 = invoke_0;
|
|
1349
|
+
protoOf(SRGB).p34 = from255;
|
|
1350
|
+
protoOf(SRGB).o33 = from255$default;
|
|
1351
|
+
protoOf(BT2020Space).n33 = invoke$default;
|
|
1352
|
+
protoOf(BT2020Space).o34 = invoke;
|
|
1353
|
+
protoOf(BT2020Space).s33 = invoke$default_0;
|
|
1354
|
+
protoOf(BT2020Space).w28 = invoke_0;
|
|
1355
|
+
protoOf(BT2020Space).p34 = from255;
|
|
1356
|
+
protoOf(BT2020Space).o33 = from255$default;
|
|
1357
|
+
protoOf(RGBColorSpaceImpl).n33 = invoke$default;
|
|
1358
|
+
protoOf(RGBColorSpaceImpl).o34 = invoke;
|
|
1359
|
+
protoOf(RGBColorSpaceImpl).s33 = invoke$default_0;
|
|
1360
|
+
protoOf(RGBColorSpaceImpl).w28 = invoke_0;
|
|
1361
|
+
protoOf(RGBColorSpaceImpl).p34 = from255;
|
|
1362
|
+
protoOf(RGBColorSpaceImpl).o33 = from255$default;
|
|
1363
|
+
//endregion
|
|
1364
|
+
//region block: init
|
|
1365
|
+
LinearTransferFunctions_instance = new LinearTransferFunctions();
|
|
1366
|
+
SRGBTransferFunctions_instance = new SRGBTransferFunctions();
|
|
1367
|
+
ROMMTransferFunctions_instance = new ROMMTransferFunctions();
|
|
1393
1368
|
//endregion
|
|
1394
1369
|
//region block: exports
|
|
1395
1370
|
_.$_$ = _.$_$ || {};
|