@tuprolog/arg2p-causality-solver 0.9.0
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/2p-core.js +9449 -0
- package/2p-core.js.map +1 -0
- package/2p-dsl-core.js +1630 -0
- package/2p-dsl-core.js.map +1 -0
- package/2p-dsl-solve.js +959 -0
- package/2p-dsl-solve.js.map +1 -0
- package/2p-dsl-theory.js +806 -0
- package/2p-dsl-theory.js.map +1 -0
- package/2p-dsl-unify.js +79 -0
- package/2p-dsl-unify.js.map +1 -0
- package/2p-parser-core.js +1274 -0
- package/2p-parser-core.js.map +1 -0
- package/2p-parser-js.js +39 -0
- package/2p-parser-js.js.map +1 -0
- package/2p-parser-theory.js +156 -0
- package/2p-parser-theory.js.map +1 -0
- package/2p-solve-classic.js +2825 -0
- package/2p-solve-classic.js.map +1 -0
- package/2p-solve.js +14540 -0
- package/2p-solve.js.map +1 -0
- package/2p-theory.js +4771 -0
- package/2p-theory.js.map +1 -0
- package/2p-unify.js +923 -0
- package/2p-unify.js.map +1 -0
- package/2p-utils.js +1410 -0
- package/2p-utils.js.map +1 -0
- package/README.md +120 -0
- package/arg2p-causality-solver.js +30 -0
- package/arg2p-causality-solver.js.map +1 -0
- package/arg2p-core.js +4839 -0
- package/arg2p-core.js.map +1 -0
- package/kotlin-kotlin-stdlib.js +9833 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kt-math.js +10392 -0
- package/kt-math.js.map +1 -0
- package/package.json +26 -0
package/2p-utils.js
ADDED
|
@@ -0,0 +1,1410 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './kt-math.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kt-math.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module '2p-utils'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-utils'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof this['kt-math'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module '2p-utils'. Its dependency 'kt-math' was not found. Please, check whether 'kt-math' is loaded prior to '2p-utils'.");
|
|
12
|
+
}
|
|
13
|
+
root['2p-utils'] = factory(typeof this['2p-utils'] === 'undefined' ? {} : this['2p-utils'], this['kotlin-kotlin-stdlib'], this['kt-math']);
|
|
14
|
+
}
|
|
15
|
+
}(this, function (_, kotlin_kotlin, kotlin_io_github_gciatto_kt_math) {
|
|
16
|
+
'use strict';
|
|
17
|
+
//region block: imports
|
|
18
|
+
var imul = Math.imul;
|
|
19
|
+
var protoOf = kotlin_kotlin.$_$.a6;
|
|
20
|
+
var objectMeta = kotlin_kotlin.$_$.z5;
|
|
21
|
+
var setMetadataFor = kotlin_kotlin.$_$.b6;
|
|
22
|
+
var Unit_instance = kotlin_kotlin.$_$.s1;
|
|
23
|
+
var interfaceMeta = kotlin_kotlin.$_$.n5;
|
|
24
|
+
var THROW_CCE = kotlin_kotlin.$_$.v9;
|
|
25
|
+
var isInterface = kotlin_kotlin.$_$.q5;
|
|
26
|
+
var Iterable = kotlin_kotlin.$_$.u1;
|
|
27
|
+
var classMeta = kotlin_kotlin.$_$.e5;
|
|
28
|
+
var VOID = kotlin_kotlin.$_$.d;
|
|
29
|
+
var Sequence = kotlin_kotlin.$_$.w6;
|
|
30
|
+
var arrayIterator = kotlin_kotlin.$_$.y4;
|
|
31
|
+
var Comparable = kotlin_kotlin.$_$.k9;
|
|
32
|
+
var sequence = kotlin_kotlin.$_$.z7;
|
|
33
|
+
var hashCode = kotlin_kotlin.$_$.m5;
|
|
34
|
+
var asIterable = kotlin_kotlin.$_$.y6;
|
|
35
|
+
var toList = kotlin_kotlin.$_$.g8;
|
|
36
|
+
var asSequence = kotlin_kotlin.$_$.h2;
|
|
37
|
+
var asIterable_0 = kotlin_kotlin.$_$.c2;
|
|
38
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
|
|
39
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.e;
|
|
40
|
+
var map = kotlin_kotlin.$_$.s7;
|
|
41
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
42
|
+
var List = kotlin_kotlin.$_$.v1;
|
|
43
|
+
var IntCompanionObject_instance = kotlin_kotlin.$_$.m1;
|
|
44
|
+
var IntRange = kotlin_kotlin.$_$.p6;
|
|
45
|
+
var zip = kotlin_kotlin.$_$.k8;
|
|
46
|
+
var CoroutineImpl = kotlin_kotlin.$_$.w4;
|
|
47
|
+
var SequenceScope = kotlin_kotlin.$_$.v6;
|
|
48
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v4;
|
|
49
|
+
var withIndex = kotlin_kotlin.$_$.j8;
|
|
50
|
+
var equals = kotlin_kotlin.$_$.h5;
|
|
51
|
+
var ensureNotNull = kotlin_kotlin.$_$.y9;
|
|
52
|
+
var filterNot = kotlin_kotlin.$_$.g7;
|
|
53
|
+
var toMutableList = kotlin_kotlin.$_$.h8;
|
|
54
|
+
var minWithOrNull = kotlin_kotlin.$_$.t7;
|
|
55
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
56
|
+
var toString = kotlin_kotlin.$_$.f6;
|
|
57
|
+
var Companion_getInstance = kotlin_io_github_gciatto_kt_math.$_$.e;
|
|
58
|
+
var Companion_getInstance_0 = kotlin_io_github_gciatto_kt_math.$_$.d;
|
|
59
|
+
var Map = kotlin_kotlin.$_$.x1;
|
|
60
|
+
var lazy = kotlin_kotlin.$_$.aa;
|
|
61
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.b;
|
|
62
|
+
var KProperty1 = kotlin_kotlin.$_$.u6;
|
|
63
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.k5;
|
|
64
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
65
|
+
var first = kotlin_kotlin.$_$.y2;
|
|
66
|
+
var to = kotlin_kotlin.$_$.ha;
|
|
67
|
+
var Pair = kotlin_kotlin.$_$.t9;
|
|
68
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
69
|
+
var joinToString = kotlin_kotlin.$_$.o7;
|
|
70
|
+
var mutableListOf = kotlin_kotlin.$_$.u3;
|
|
71
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
|
|
72
|
+
var addAll = kotlin_kotlin.$_$.z1;
|
|
73
|
+
//endregion
|
|
74
|
+
//region block: pre-declaration
|
|
75
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
76
|
+
function getOrSet(key, valueGenerator) {
|
|
77
|
+
var got = this.x2(key);
|
|
78
|
+
var tmp;
|
|
79
|
+
if (got instanceof Some) {
|
|
80
|
+
tmp = got.mp_1;
|
|
81
|
+
} else {
|
|
82
|
+
// Inline function 'kotlin.also' call
|
|
83
|
+
var this_0 = valueGenerator();
|
|
84
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
85
|
+
// Inline function 'it.unibo.tuprolog.utils.Cache.getOrSet.<anonymous>' call
|
|
86
|
+
this.kp(key, this_0);
|
|
87
|
+
tmp = this_0;
|
|
88
|
+
}
|
|
89
|
+
return tmp;
|
|
90
|
+
}
|
|
91
|
+
setMetadataFor(Cache, 'Cache', interfaceMeta);
|
|
92
|
+
setMetadataFor(Companion_0, 'Companion', objectMeta);
|
|
93
|
+
function ifValid(consumer) {
|
|
94
|
+
var tmp;
|
|
95
|
+
if (this.op()) {
|
|
96
|
+
var tmp_0 = Companion_instance_5;
|
|
97
|
+
// Inline function 'kotlin.let' call
|
|
98
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
99
|
+
var tmp$ret$0 = consumer(this.r2());
|
|
100
|
+
tmp = tmp_0.sp(tmp$ret$0);
|
|
101
|
+
} else {
|
|
102
|
+
tmp = Companion_instance_5.rp();
|
|
103
|
+
}
|
|
104
|
+
return tmp;
|
|
105
|
+
}
|
|
106
|
+
setMetadataFor(Cached, 'Cached', interfaceMeta);
|
|
107
|
+
function castTo() {
|
|
108
|
+
return isInterface(this, Castable) ? this : THROW_CCE();
|
|
109
|
+
}
|
|
110
|
+
setMetadataFor(Castable, 'Castable', interfaceMeta);
|
|
111
|
+
setMetadataFor(Companion_1, 'Companion', objectMeta);
|
|
112
|
+
setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, [Iterable]);
|
|
113
|
+
setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, VOID, [Sequence]);
|
|
114
|
+
function asIterable_1() {
|
|
115
|
+
// Inline function 'kotlin.collections.Iterable' call
|
|
116
|
+
return new _no_name_provided__qut3iv(this);
|
|
117
|
+
}
|
|
118
|
+
function asSequence_0() {
|
|
119
|
+
// Inline function 'kotlin.sequences.Sequence' call
|
|
120
|
+
return new _no_name_provided__qut3iv_0(this);
|
|
121
|
+
}
|
|
122
|
+
setMetadataFor(Cursor, 'Cursor', interfaceMeta);
|
|
123
|
+
function component1() {
|
|
124
|
+
return this.bq();
|
|
125
|
+
}
|
|
126
|
+
function component2() {
|
|
127
|
+
return this.r2();
|
|
128
|
+
}
|
|
129
|
+
setMetadataFor(Indexed, 'Indexed', interfaceMeta);
|
|
130
|
+
setMetadataFor(Companion_2, 'Companion', objectMeta);
|
|
131
|
+
function compareTo(other) {
|
|
132
|
+
return this.bq() - other.bq() | 0;
|
|
133
|
+
}
|
|
134
|
+
setMetadataFor(IntIndexed, 'IntIndexed', interfaceMeta, VOID, [Indexed, Comparable]);
|
|
135
|
+
setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta);
|
|
136
|
+
setMetadataFor(dropLast$slambda, 'dropLast$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
|
|
137
|
+
setMetadataFor(insertAt$slambda, 'insertAt$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
|
|
138
|
+
setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta);
|
|
139
|
+
setMetadataFor(merge$slambda, 'merge$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
|
|
140
|
+
setMetadataFor(Companion_3, 'Companion', objectMeta);
|
|
141
|
+
function compareTo_0(other) {
|
|
142
|
+
return this.bq().ma(other.bq()).b9();
|
|
143
|
+
}
|
|
144
|
+
setMetadataFor(LongIndexed, 'LongIndexed', interfaceMeta, VOID, [Indexed, Comparable]);
|
|
145
|
+
setMetadataFor(Companion_4, 'Companion', objectMeta);
|
|
146
|
+
setMetadataFor(NumberTypeTester, 'NumberTypeTester', classMeta, VOID, VOID, NumberTypeTester);
|
|
147
|
+
setMetadataFor(Companion_5, 'Companion', objectMeta);
|
|
148
|
+
setMetadataFor(Optional, 'Optional', classMeta);
|
|
149
|
+
setMetadataFor(Some, 'Some', classMeta, Optional);
|
|
150
|
+
setMetadataFor(None, 'None', objectMeta, Optional);
|
|
151
|
+
function getTag(name) {
|
|
152
|
+
var tmp = this.os().x2(name);
|
|
153
|
+
return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
|
|
154
|
+
}
|
|
155
|
+
function containsTag(name) {
|
|
156
|
+
// Inline function 'kotlin.collections.contains' call
|
|
157
|
+
// Inline function 'kotlin.collections.containsKey' call
|
|
158
|
+
var this_0 = this.os();
|
|
159
|
+
return (isInterface(this_0, Map) ? this_0 : THROW_CCE()).u2(name);
|
|
160
|
+
}
|
|
161
|
+
setMetadataFor(Taggable, 'Taggable', interfaceMeta);
|
|
162
|
+
setMetadataFor(Companion_6, 'Companion', objectMeta);
|
|
163
|
+
setMetadataFor(AbstractCursor$iterator$1, VOID, classMeta);
|
|
164
|
+
setMetadataFor(AbstractCursor, 'AbstractCursor', classMeta, VOID, [Cursor]);
|
|
165
|
+
setMetadataFor(CachedImpl, 'CachedImpl', classMeta, VOID, [Cached]);
|
|
166
|
+
setMetadataFor(ConjunctionCursor, 'ConjunctionCursor', classMeta, AbstractCursor);
|
|
167
|
+
setMetadataFor(EmptyCursor, 'EmptyCursor', objectMeta, AbstractCursor);
|
|
168
|
+
setMetadataFor(IntIndexedImpl, 'IntIndexedImpl', classMeta, VOID, [IntIndexed]);
|
|
169
|
+
setMetadataFor(LazyCursor, 'LazyCursor', classMeta, AbstractCursor);
|
|
170
|
+
setMetadataFor(LongIndexedImpl, 'LongIndexedImpl', classMeta, VOID, [LongIndexed]);
|
|
171
|
+
setMetadataFor(MapperCursor, 'MapperCursor', classMeta, AbstractCursor);
|
|
172
|
+
setMetadataFor(NonLastCursor, 'NonLastCursor', classMeta, AbstractCursor);
|
|
173
|
+
setMetadataFor(SimpleLRUCache, 'SimpleLRUCache', classMeta, VOID, [Cache]);
|
|
174
|
+
setMetadataFor(ValueCursor, 'ValueCursor', classMeta, AbstractCursor);
|
|
175
|
+
//endregion
|
|
176
|
+
function Companion() {
|
|
177
|
+
}
|
|
178
|
+
protoOf(Companion).jp = function (capacity) {
|
|
179
|
+
return new SimpleLRUCache(capacity);
|
|
180
|
+
};
|
|
181
|
+
var Companion_instance;
|
|
182
|
+
function Companion_getInstance_1() {
|
|
183
|
+
return Companion_instance;
|
|
184
|
+
}
|
|
185
|
+
function Cache() {
|
|
186
|
+
}
|
|
187
|
+
function Companion_0() {
|
|
188
|
+
}
|
|
189
|
+
protoOf(Companion_0).np = function (generator) {
|
|
190
|
+
return new CachedImpl(generator);
|
|
191
|
+
};
|
|
192
|
+
var Companion_instance_0;
|
|
193
|
+
function Companion_getInstance_2() {
|
|
194
|
+
return Companion_instance_0;
|
|
195
|
+
}
|
|
196
|
+
function Cached() {
|
|
197
|
+
}
|
|
198
|
+
function Castable() {
|
|
199
|
+
}
|
|
200
|
+
function Companion_1() {
|
|
201
|
+
}
|
|
202
|
+
protoOf(Companion_1).of = function (iterator) {
|
|
203
|
+
return toCursor(iterator);
|
|
204
|
+
};
|
|
205
|
+
protoOf(Companion_1).ofSequence = function (sequence) {
|
|
206
|
+
return cursor_0(sequence);
|
|
207
|
+
};
|
|
208
|
+
protoOf(Companion_1).empty = function () {
|
|
209
|
+
return EmptyCursor_getInstance();
|
|
210
|
+
};
|
|
211
|
+
var Companion_instance_1;
|
|
212
|
+
function Companion_getInstance_3() {
|
|
213
|
+
return Companion_instance_1;
|
|
214
|
+
}
|
|
215
|
+
function _no_name_provided__qut3iv(this$0) {
|
|
216
|
+
this.up_1 = this$0;
|
|
217
|
+
}
|
|
218
|
+
protoOf(_no_name_provided__qut3iv).r = function () {
|
|
219
|
+
// Inline function 'it.unibo.tuprolog.utils.Cursor.asIterable.<anonymous>' call
|
|
220
|
+
return this.up_1.iterator();
|
|
221
|
+
};
|
|
222
|
+
function _no_name_provided__qut3iv_0(this$0) {
|
|
223
|
+
this.vp_1 = this$0;
|
|
224
|
+
}
|
|
225
|
+
protoOf(_no_name_provided__qut3iv_0).r = function () {
|
|
226
|
+
// Inline function 'it.unibo.tuprolog.utils.Cursor.asSequence.<anonymous>' call
|
|
227
|
+
return this.vp_1.iterator();
|
|
228
|
+
};
|
|
229
|
+
function Cursor() {
|
|
230
|
+
}
|
|
231
|
+
function cursor(_this__u8e3s4) {
|
|
232
|
+
return toCursor(_this__u8e3s4.r());
|
|
233
|
+
}
|
|
234
|
+
function cursor_0(_this__u8e3s4) {
|
|
235
|
+
return toCursor(_this__u8e3s4.r());
|
|
236
|
+
}
|
|
237
|
+
function cursor_1(_this__u8e3s4) {
|
|
238
|
+
return toCursor(arrayIterator(_this__u8e3s4));
|
|
239
|
+
}
|
|
240
|
+
function plus(_this__u8e3s4, other) {
|
|
241
|
+
return other.yp() ? new ConjunctionCursor(_this__u8e3s4, forceCast(other)) : _this__u8e3s4.yp() ? _this__u8e3s4 : EmptyCursor_getInstance();
|
|
242
|
+
}
|
|
243
|
+
function toCursor(_this__u8e3s4) {
|
|
244
|
+
return Companion_instance_6.aq(_this__u8e3s4);
|
|
245
|
+
}
|
|
246
|
+
function Indexed() {
|
|
247
|
+
}
|
|
248
|
+
function Companion_2() {
|
|
249
|
+
}
|
|
250
|
+
protoOf(Companion_2).cq = function (index, value) {
|
|
251
|
+
return new IntIndexedImpl(index, value);
|
|
252
|
+
};
|
|
253
|
+
var Companion_instance_2;
|
|
254
|
+
function Companion_getInstance_4() {
|
|
255
|
+
return Companion_instance_2;
|
|
256
|
+
}
|
|
257
|
+
function IntIndexed() {
|
|
258
|
+
}
|
|
259
|
+
function dropLast(_this__u8e3s4) {
|
|
260
|
+
return sequence(dropLast$slambda_0(_this__u8e3s4, null));
|
|
261
|
+
}
|
|
262
|
+
function itemWiseHashCode(iterable) {
|
|
263
|
+
var hash = 13;
|
|
264
|
+
var i = iterable.r();
|
|
265
|
+
while (i.s()) {
|
|
266
|
+
var tmp = imul(31, hash);
|
|
267
|
+
var tmp0_safe_receiver = i.u();
|
|
268
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
|
|
269
|
+
hash = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
270
|
+
}
|
|
271
|
+
return hash;
|
|
272
|
+
}
|
|
273
|
+
function insertAt(_this__u8e3s4, index, item, items) {
|
|
274
|
+
return sequence(insertAt$slambda_0(_this__u8e3s4, index, item, items, null));
|
|
275
|
+
}
|
|
276
|
+
function itemWiseHashCode_0(sequence) {
|
|
277
|
+
return itemWiseHashCode(asIterable(sequence));
|
|
278
|
+
}
|
|
279
|
+
function itemWiseEquals(sequence1, sequence2, comparator) {
|
|
280
|
+
return itemWiseEquals_0(asIterable(sequence1), asIterable(sequence2), comparator);
|
|
281
|
+
}
|
|
282
|
+
function cached(_this__u8e3s4) {
|
|
283
|
+
return cursor_0(_this__u8e3s4).asSequence();
|
|
284
|
+
}
|
|
285
|
+
function buffered(_this__u8e3s4) {
|
|
286
|
+
return asSequence(toList(_this__u8e3s4));
|
|
287
|
+
}
|
|
288
|
+
function itemWiseEquals_0(iterable1, iterable2, comparator) {
|
|
289
|
+
var i = iterable1.r();
|
|
290
|
+
var j = iterable2.r();
|
|
291
|
+
while (i.s() ? j.s() : false) {
|
|
292
|
+
var a = i.u();
|
|
293
|
+
var b = j.u();
|
|
294
|
+
if (!comparator(a, b)) {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return i.s() === j.s();
|
|
299
|
+
}
|
|
300
|
+
function itemWiseHashCode_1(items) {
|
|
301
|
+
return itemWiseHashCode(asIterable_0(items));
|
|
302
|
+
}
|
|
303
|
+
function itemWiseEquals_1(iterable1, iterable2) {
|
|
304
|
+
return itemWiseEquals_0(iterable1, iterable2, itemWiseEquals$lambda);
|
|
305
|
+
}
|
|
306
|
+
function mergeSequences(iterables, comparator) {
|
|
307
|
+
var tmp = new sam$kotlin_Comparator$0(comparator);
|
|
308
|
+
// Inline function 'kotlin.collections.map' call
|
|
309
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
310
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(iterables, 10));
|
|
311
|
+
var tmp0_iterator = iterables.r();
|
|
312
|
+
while (tmp0_iterator.s()) {
|
|
313
|
+
var item = tmp0_iterator.u();
|
|
314
|
+
// Inline function 'it.unibo.tuprolog.utils.mergeSequences.<anonymous>' call
|
|
315
|
+
var tmp$ret$0 = asIterable(item);
|
|
316
|
+
destination.o(tmp$ret$0);
|
|
317
|
+
}
|
|
318
|
+
return merge(tmp, destination);
|
|
319
|
+
}
|
|
320
|
+
function assertItemsAreNotNull(_this__u8e3s4) {
|
|
321
|
+
return asIterable(assertItemsAreNotNull_0(asSequence(_this__u8e3s4)));
|
|
322
|
+
}
|
|
323
|
+
function assertItemsAreNotNull_0(_this__u8e3s4) {
|
|
324
|
+
var tmp = indexed(_this__u8e3s4);
|
|
325
|
+
return map(tmp, assertItemsAreNotNull$lambda);
|
|
326
|
+
}
|
|
327
|
+
function assertItemsAreNotNull_1(_this__u8e3s4) {
|
|
328
|
+
var iterator = _this__u8e3s4.r();
|
|
329
|
+
var index = 0;
|
|
330
|
+
while (iterator.s()) {
|
|
331
|
+
var index_0 = index;
|
|
332
|
+
index = index + 1 | 0;
|
|
333
|
+
var value = iterator.u();
|
|
334
|
+
if (value == null) {
|
|
335
|
+
throw IllegalArgumentException_init_$Create$('Item at index ' + index_0 + ' is null');
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return isInterface(_this__u8e3s4, List) ? _this__u8e3s4 : THROW_CCE();
|
|
339
|
+
}
|
|
340
|
+
function merge(comparator, iterables) {
|
|
341
|
+
return sequence(merge$slambda_0(iterables, comparator, null));
|
|
342
|
+
}
|
|
343
|
+
function indexed(_this__u8e3s4) {
|
|
344
|
+
var tmp = asSequence(new IntRange(0, IntCompanionObject_instance.MAX_VALUE));
|
|
345
|
+
return zip(_this__u8e3s4, tmp, indexed$lambda);
|
|
346
|
+
}
|
|
347
|
+
function sam$kotlin_Comparator$0(function_0) {
|
|
348
|
+
this.eq_1 = function_0;
|
|
349
|
+
}
|
|
350
|
+
protoOf(sam$kotlin_Comparator$0).o8 = function (a, b) {
|
|
351
|
+
return this.eq_1(a, b);
|
|
352
|
+
};
|
|
353
|
+
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
354
|
+
return this.o8(a, b);
|
|
355
|
+
};
|
|
356
|
+
function dropLast$slambda($this_dropLast, resultContinuation) {
|
|
357
|
+
this.nq_1 = $this_dropLast;
|
|
358
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
359
|
+
}
|
|
360
|
+
protoOf(dropLast$slambda).rq = function ($this$sequence, $completion) {
|
|
361
|
+
var tmp = this.sq($this$sequence, $completion);
|
|
362
|
+
tmp.hb_1 = Unit_instance;
|
|
363
|
+
tmp.ib_1 = null;
|
|
364
|
+
return tmp.qb();
|
|
365
|
+
};
|
|
366
|
+
protoOf(dropLast$slambda).dc = function (p1, $completion) {
|
|
367
|
+
return this.rq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
368
|
+
};
|
|
369
|
+
protoOf(dropLast$slambda).qb = function () {
|
|
370
|
+
var suspendResult = this.hb_1;
|
|
371
|
+
$sm: do
|
|
372
|
+
try {
|
|
373
|
+
var tmp = this.fb_1;
|
|
374
|
+
switch (tmp) {
|
|
375
|
+
case 0:
|
|
376
|
+
this.gb_1 = 5;
|
|
377
|
+
this.pq_1 = this.nq_1.r();
|
|
378
|
+
this.fb_1 = 1;
|
|
379
|
+
continue $sm;
|
|
380
|
+
case 1:
|
|
381
|
+
if (!this.pq_1.s()) {
|
|
382
|
+
this.fb_1 = 4;
|
|
383
|
+
continue $sm;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
this.qq_1 = this.pq_1.u();
|
|
387
|
+
if (this.pq_1.s()) {
|
|
388
|
+
this.fb_1 = 2;
|
|
389
|
+
suspendResult = this.oq_1.wd(this.qq_1, this);
|
|
390
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
391
|
+
return suspendResult;
|
|
392
|
+
}
|
|
393
|
+
continue $sm;
|
|
394
|
+
} else {
|
|
395
|
+
this.fb_1 = 3;
|
|
396
|
+
continue $sm;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
case 2:
|
|
400
|
+
this.fb_1 = 3;
|
|
401
|
+
continue $sm;
|
|
402
|
+
case 3:
|
|
403
|
+
this.fb_1 = 1;
|
|
404
|
+
continue $sm;
|
|
405
|
+
case 4:
|
|
406
|
+
return Unit_instance;
|
|
407
|
+
case 5:
|
|
408
|
+
throw this.ib_1;
|
|
409
|
+
}
|
|
410
|
+
} catch ($p) {
|
|
411
|
+
var e = $p;
|
|
412
|
+
if (this.gb_1 === 5) {
|
|
413
|
+
throw e;
|
|
414
|
+
} else {
|
|
415
|
+
this.fb_1 = this.gb_1;
|
|
416
|
+
this.ib_1 = e;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
while (true);
|
|
420
|
+
};
|
|
421
|
+
protoOf(dropLast$slambda).sq = function ($this$sequence, completion) {
|
|
422
|
+
var i = new dropLast$slambda(this.nq_1, completion);
|
|
423
|
+
i.oq_1 = $this$sequence;
|
|
424
|
+
return i;
|
|
425
|
+
};
|
|
426
|
+
function dropLast$slambda_0($this_dropLast, resultContinuation) {
|
|
427
|
+
var i = new dropLast$slambda($this_dropLast, resultContinuation);
|
|
428
|
+
var l = function ($this$sequence, $completion) {
|
|
429
|
+
return i.rq($this$sequence, $completion);
|
|
430
|
+
};
|
|
431
|
+
l.$arity = 1;
|
|
432
|
+
return l;
|
|
433
|
+
}
|
|
434
|
+
function insertAt$slambda($this_insertAt, $index, $item, $items, resultContinuation) {
|
|
435
|
+
this.br_1 = $this_insertAt;
|
|
436
|
+
this.cr_1 = $index;
|
|
437
|
+
this.dr_1 = $item;
|
|
438
|
+
this.er_1 = $items;
|
|
439
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
440
|
+
}
|
|
441
|
+
protoOf(insertAt$slambda).rq = function ($this$sequence, $completion) {
|
|
442
|
+
var tmp = this.sq($this$sequence, $completion);
|
|
443
|
+
tmp.hb_1 = Unit_instance;
|
|
444
|
+
tmp.ib_1 = null;
|
|
445
|
+
return tmp.qb();
|
|
446
|
+
};
|
|
447
|
+
protoOf(insertAt$slambda).dc = function (p1, $completion) {
|
|
448
|
+
return this.rq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
449
|
+
};
|
|
450
|
+
protoOf(insertAt$slambda).qb = function () {
|
|
451
|
+
var suspendResult = this.hb_1;
|
|
452
|
+
$sm: do
|
|
453
|
+
try {
|
|
454
|
+
var tmp = this.fb_1;
|
|
455
|
+
switch (tmp) {
|
|
456
|
+
case 0:
|
|
457
|
+
this.gb_1 = 7;
|
|
458
|
+
this.gr_1 = asIterable(withIndex(this.br_1)).r();
|
|
459
|
+
this.fb_1 = 1;
|
|
460
|
+
continue $sm;
|
|
461
|
+
case 1:
|
|
462
|
+
if (!this.gr_1.s()) {
|
|
463
|
+
this.fb_1 = 6;
|
|
464
|
+
continue $sm;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
this.hr_1 = this.gr_1.u();
|
|
468
|
+
this.ir_1 = this.hr_1.gd();
|
|
469
|
+
this.jr_1 = this.hr_1.hd();
|
|
470
|
+
if (this.ir_1 === this.cr_1) {
|
|
471
|
+
this.fb_1 = 2;
|
|
472
|
+
suspendResult = this.fr_1.wd(this.dr_1, this);
|
|
473
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
474
|
+
return suspendResult;
|
|
475
|
+
}
|
|
476
|
+
continue $sm;
|
|
477
|
+
} else {
|
|
478
|
+
this.fb_1 = 4;
|
|
479
|
+
continue $sm;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
case 2:
|
|
483
|
+
this.fb_1 = 3;
|
|
484
|
+
suspendResult = this.fr_1.yd(asIterable_0(this.er_1), this);
|
|
485
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
486
|
+
return suspendResult;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
continue $sm;
|
|
490
|
+
case 3:
|
|
491
|
+
this.fb_1 = 4;
|
|
492
|
+
continue $sm;
|
|
493
|
+
case 4:
|
|
494
|
+
this.fb_1 = 5;
|
|
495
|
+
suspendResult = this.fr_1.wd(this.jr_1, this);
|
|
496
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
497
|
+
return suspendResult;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
continue $sm;
|
|
501
|
+
case 5:
|
|
502
|
+
this.fb_1 = 1;
|
|
503
|
+
continue $sm;
|
|
504
|
+
case 6:
|
|
505
|
+
return Unit_instance;
|
|
506
|
+
case 7:
|
|
507
|
+
throw this.ib_1;
|
|
508
|
+
}
|
|
509
|
+
} catch ($p) {
|
|
510
|
+
var e = $p;
|
|
511
|
+
if (this.gb_1 === 7) {
|
|
512
|
+
throw e;
|
|
513
|
+
} else {
|
|
514
|
+
this.fb_1 = this.gb_1;
|
|
515
|
+
this.ib_1 = e;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
while (true);
|
|
519
|
+
};
|
|
520
|
+
protoOf(insertAt$slambda).sq = function ($this$sequence, completion) {
|
|
521
|
+
var i = new insertAt$slambda(this.br_1, this.cr_1, this.dr_1, this.er_1, completion);
|
|
522
|
+
i.fr_1 = $this$sequence;
|
|
523
|
+
return i;
|
|
524
|
+
};
|
|
525
|
+
function insertAt$slambda_0($this_insertAt, $index, $item, $items, resultContinuation) {
|
|
526
|
+
var i = new insertAt$slambda($this_insertAt, $index, $item, $items, resultContinuation);
|
|
527
|
+
var l = function ($this$sequence, $completion) {
|
|
528
|
+
return i.rq($this$sequence, $completion);
|
|
529
|
+
};
|
|
530
|
+
l.$arity = 1;
|
|
531
|
+
return l;
|
|
532
|
+
}
|
|
533
|
+
function itemWiseEquals$lambda(a, b) {
|
|
534
|
+
return equals(a, b);
|
|
535
|
+
}
|
|
536
|
+
function assertItemsAreNotNull$lambda(it) {
|
|
537
|
+
var value = it.r2();
|
|
538
|
+
var tmp;
|
|
539
|
+
if (value == null) {
|
|
540
|
+
throw IllegalArgumentException_init_$Create$('Item at index ' + it.bq() + ' is null');
|
|
541
|
+
} else {
|
|
542
|
+
tmp = value;
|
|
543
|
+
}
|
|
544
|
+
return tmp;
|
|
545
|
+
}
|
|
546
|
+
function sam$kotlin_Comparator$0_0(function_0) {
|
|
547
|
+
this.kr_1 = function_0;
|
|
548
|
+
}
|
|
549
|
+
protoOf(sam$kotlin_Comparator$0_0).o8 = function (a, b) {
|
|
550
|
+
return this.kr_1(a, b);
|
|
551
|
+
};
|
|
552
|
+
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
553
|
+
return this.o8(a, b);
|
|
554
|
+
};
|
|
555
|
+
function merge$slambda$lambda(it) {
|
|
556
|
+
return cursor(it);
|
|
557
|
+
}
|
|
558
|
+
function merge$slambda$lambda_0(it) {
|
|
559
|
+
return it.zp();
|
|
560
|
+
}
|
|
561
|
+
function merge$slambda$lambda_1(it) {
|
|
562
|
+
return ensureNotNull(it.xp());
|
|
563
|
+
}
|
|
564
|
+
function merge$slambda$lambda_2($comparator) {
|
|
565
|
+
return function (a, b) {
|
|
566
|
+
return $comparator.compare(a.r2(), b.r2());
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function merge$slambda($iterables, $comparator, resultContinuation) {
|
|
570
|
+
this.ur_1 = $iterables;
|
|
571
|
+
this.vr_1 = $comparator;
|
|
572
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
573
|
+
}
|
|
574
|
+
protoOf(merge$slambda).rq = function ($this$sequence, $completion) {
|
|
575
|
+
var tmp = this.sq($this$sequence, $completion);
|
|
576
|
+
tmp.hb_1 = Unit_instance;
|
|
577
|
+
tmp.ib_1 = null;
|
|
578
|
+
return tmp.qb();
|
|
579
|
+
};
|
|
580
|
+
protoOf(merge$slambda).dc = function (p1, $completion) {
|
|
581
|
+
return this.rq(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
582
|
+
};
|
|
583
|
+
protoOf(merge$slambda).qb = function () {
|
|
584
|
+
var suspendResult = this.hb_1;
|
|
585
|
+
$sm: do
|
|
586
|
+
try {
|
|
587
|
+
var tmp = this.fb_1;
|
|
588
|
+
switch (tmp) {
|
|
589
|
+
case 0:
|
|
590
|
+
this.gb_1 = 3;
|
|
591
|
+
var tmp_0 = this;
|
|
592
|
+
var tmp_1 = asSequence(this.ur_1);
|
|
593
|
+
var tmp_2 = map(tmp_1, merge$slambda$lambda);
|
|
594
|
+
tmp_0.xr_1 = toMutableList(filterNot(tmp_2, merge$slambda$lambda_0));
|
|
595
|
+
this.fb_1 = 1;
|
|
596
|
+
continue $sm;
|
|
597
|
+
case 1:
|
|
598
|
+
if (!!this.xr_1.z()) {
|
|
599
|
+
this.fb_1 = 4;
|
|
600
|
+
continue $sm;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
var tmp_3 = this;
|
|
604
|
+
var tmp_4 = asSequence(this.xr_1);
|
|
605
|
+
var tmp_5 = indexed(map(tmp_4, merge$slambda$lambda_1));
|
|
606
|
+
var tmp_6 = merge$slambda$lambda_2(this.vr_1);
|
|
607
|
+
tmp_3.yr_1 = ensureNotNull(minWithOrNull(tmp_5, new sam$kotlin_Comparator$0_0(tmp_6)));
|
|
608
|
+
this.zr_1 = this.yr_1.gd();
|
|
609
|
+
this.as_1 = this.yr_1.hd();
|
|
610
|
+
this.fb_1 = 2;
|
|
611
|
+
suspendResult = this.wr_1.wd(this.as_1, this);
|
|
612
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
613
|
+
return suspendResult;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
continue $sm;
|
|
617
|
+
case 2:
|
|
618
|
+
var it = this.xr_1.d1(this.zr_1).wp();
|
|
619
|
+
if (it.zp()) {
|
|
620
|
+
this.xr_1.f1(this.zr_1);
|
|
621
|
+
} else {
|
|
622
|
+
this.xr_1.m(this.zr_1, it);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
this.fb_1 = 1;
|
|
626
|
+
continue $sm;
|
|
627
|
+
case 3:
|
|
628
|
+
throw this.ib_1;
|
|
629
|
+
case 4:
|
|
630
|
+
return Unit_instance;
|
|
631
|
+
}
|
|
632
|
+
} catch ($p) {
|
|
633
|
+
var e = $p;
|
|
634
|
+
if (this.gb_1 === 3) {
|
|
635
|
+
throw e;
|
|
636
|
+
} else {
|
|
637
|
+
this.fb_1 = this.gb_1;
|
|
638
|
+
this.ib_1 = e;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
while (true);
|
|
642
|
+
};
|
|
643
|
+
protoOf(merge$slambda).sq = function ($this$sequence, completion) {
|
|
644
|
+
var i = new merge$slambda(this.ur_1, this.vr_1, completion);
|
|
645
|
+
i.wr_1 = $this$sequence;
|
|
646
|
+
return i;
|
|
647
|
+
};
|
|
648
|
+
function merge$slambda_0($iterables, $comparator, resultContinuation) {
|
|
649
|
+
var i = new merge$slambda($iterables, $comparator, resultContinuation);
|
|
650
|
+
var l = function ($this$sequence, $completion) {
|
|
651
|
+
return i.rq($this$sequence, $completion);
|
|
652
|
+
};
|
|
653
|
+
l.$arity = 1;
|
|
654
|
+
return l;
|
|
655
|
+
}
|
|
656
|
+
function indexed$lambda(it, i) {
|
|
657
|
+
return Companion_instance_2.cq(i, it);
|
|
658
|
+
}
|
|
659
|
+
function Companion_3() {
|
|
660
|
+
}
|
|
661
|
+
protoOf(Companion_3).bs = function (index, value) {
|
|
662
|
+
return new LongIndexedImpl(index, value);
|
|
663
|
+
};
|
|
664
|
+
var Companion_instance_3;
|
|
665
|
+
function Companion_getInstance_5() {
|
|
666
|
+
return Companion_instance_3;
|
|
667
|
+
}
|
|
668
|
+
function LongIndexed() {
|
|
669
|
+
}
|
|
670
|
+
function Companion_4() {
|
|
671
|
+
Companion_instance_4 = this;
|
|
672
|
+
var tmp = this;
|
|
673
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
674
|
+
tmp.ds_1 = Regex_init_$Create$('[0-9]+');
|
|
675
|
+
}
|
|
676
|
+
var Companion_instance_4;
|
|
677
|
+
function Companion_getInstance_6() {
|
|
678
|
+
if (Companion_instance_4 == null)
|
|
679
|
+
new Companion_4();
|
|
680
|
+
return Companion_instance_4;
|
|
681
|
+
}
|
|
682
|
+
function _get_stringRepresentation__xuqjt9(_this__u8e3s4, $this) {
|
|
683
|
+
return $this.es_1.lp(_this__u8e3s4, NumberTypeTester$_get_stringRepresentation_$lambda_7w0qtg(_this__u8e3s4));
|
|
684
|
+
}
|
|
685
|
+
function NumberTypeTester$_get_stringRepresentation_$lambda_7w0qtg($this_stringRepresentation) {
|
|
686
|
+
return function () {
|
|
687
|
+
return toString($this_stringRepresentation);
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function NumberTypeTester() {
|
|
691
|
+
Companion_getInstance_6();
|
|
692
|
+
this.es_1 = Companion_instance.jp(8);
|
|
693
|
+
}
|
|
694
|
+
protoOf(NumberTypeTester).fs = function (_this__u8e3s4) {
|
|
695
|
+
return Companion_getInstance_6().ds_1.i8(_get_stringRepresentation__xuqjt9(_this__u8e3s4, this));
|
|
696
|
+
};
|
|
697
|
+
protoOf(NumberTypeTester).gs = function (_this__u8e3s4) {
|
|
698
|
+
return Companion_getInstance().parse(_get_stringRepresentation__xuqjt9(_this__u8e3s4, this));
|
|
699
|
+
};
|
|
700
|
+
protoOf(NumberTypeTester).hs = function (_this__u8e3s4) {
|
|
701
|
+
return Companion_getInstance_0().parse(_get_stringRepresentation__xuqjt9(_this__u8e3s4, this));
|
|
702
|
+
};
|
|
703
|
+
protoOf(NumberTypeTester).is = function (number) {
|
|
704
|
+
return this.fs(number);
|
|
705
|
+
};
|
|
706
|
+
protoOf(NumberTypeTester).js = function (number) {
|
|
707
|
+
return this.gs(number);
|
|
708
|
+
};
|
|
709
|
+
protoOf(NumberTypeTester).ks = function (number) {
|
|
710
|
+
return this.hs(number);
|
|
711
|
+
};
|
|
712
|
+
function Companion_5() {
|
|
713
|
+
}
|
|
714
|
+
protoOf(Companion_5).ls = function (value) {
|
|
715
|
+
return new Some(value);
|
|
716
|
+
};
|
|
717
|
+
protoOf(Companion_5).sp = function (value) {
|
|
718
|
+
var tmp;
|
|
719
|
+
if (value == null) {
|
|
720
|
+
tmp = this.rp();
|
|
721
|
+
} else {
|
|
722
|
+
tmp = this.ls(value);
|
|
723
|
+
}
|
|
724
|
+
return tmp;
|
|
725
|
+
};
|
|
726
|
+
protoOf(Companion_5).rp = function () {
|
|
727
|
+
return None_getInstance();
|
|
728
|
+
};
|
|
729
|
+
var Companion_instance_5;
|
|
730
|
+
function Companion_getInstance_7() {
|
|
731
|
+
return Companion_instance_5;
|
|
732
|
+
}
|
|
733
|
+
function Some(value) {
|
|
734
|
+
Optional.call(this);
|
|
735
|
+
this.mp_1 = value;
|
|
736
|
+
}
|
|
737
|
+
protoOf(Some).r2 = function () {
|
|
738
|
+
return this.mp_1;
|
|
739
|
+
};
|
|
740
|
+
protoOf(Some).ms = function () {
|
|
741
|
+
return true;
|
|
742
|
+
};
|
|
743
|
+
protoOf(Some).toString = function () {
|
|
744
|
+
return 'Some(' + this.mp_1 + ')';
|
|
745
|
+
};
|
|
746
|
+
protoOf(Some).hashCode = function () {
|
|
747
|
+
return this.mp_1 == null ? 0 : hashCode(this.mp_1);
|
|
748
|
+
};
|
|
749
|
+
protoOf(Some).equals = function (other) {
|
|
750
|
+
if (this === other)
|
|
751
|
+
return true;
|
|
752
|
+
if (!(other instanceof Some))
|
|
753
|
+
return false;
|
|
754
|
+
var tmp0_other_with_cast = other instanceof Some ? other : THROW_CCE();
|
|
755
|
+
if (!equals(this.mp_1, tmp0_other_with_cast.mp_1))
|
|
756
|
+
return false;
|
|
757
|
+
return true;
|
|
758
|
+
};
|
|
759
|
+
function None() {
|
|
760
|
+
None_instance = this;
|
|
761
|
+
Optional.call(this);
|
|
762
|
+
}
|
|
763
|
+
protoOf(None).r2 = function () {
|
|
764
|
+
return null;
|
|
765
|
+
};
|
|
766
|
+
protoOf(None).ms = function () {
|
|
767
|
+
return false;
|
|
768
|
+
};
|
|
769
|
+
protoOf(None).toString = function () {
|
|
770
|
+
return 'None';
|
|
771
|
+
};
|
|
772
|
+
var None_instance;
|
|
773
|
+
function None_getInstance() {
|
|
774
|
+
if (None_instance == null)
|
|
775
|
+
new None();
|
|
776
|
+
return None_instance;
|
|
777
|
+
}
|
|
778
|
+
function Optional() {
|
|
779
|
+
}
|
|
780
|
+
protoOf(Optional).ns = function () {
|
|
781
|
+
return !this.ms();
|
|
782
|
+
};
|
|
783
|
+
function Taggable() {
|
|
784
|
+
}
|
|
785
|
+
function setTags(_this__u8e3s4, tags) {
|
|
786
|
+
var tmp = _this__u8e3s4.resetTags(tags);
|
|
787
|
+
return isInterface(tmp, Taggable) ? tmp : THROW_CCE();
|
|
788
|
+
}
|
|
789
|
+
function synchronizedOnSelf(_this__u8e3s4, action) {
|
|
790
|
+
return synchronizedOn(_this__u8e3s4, action);
|
|
791
|
+
}
|
|
792
|
+
function Companion_6() {
|
|
793
|
+
}
|
|
794
|
+
protoOf(Companion_6).aq = function (source) {
|
|
795
|
+
var tmp;
|
|
796
|
+
if (source.s()) {
|
|
797
|
+
tmp = new LazyCursor(source);
|
|
798
|
+
} else {
|
|
799
|
+
tmp = EmptyCursor_getInstance();
|
|
800
|
+
}
|
|
801
|
+
return tmp;
|
|
802
|
+
};
|
|
803
|
+
var Companion_instance_6;
|
|
804
|
+
function Companion_getInstance_8() {
|
|
805
|
+
return Companion_instance_6;
|
|
806
|
+
}
|
|
807
|
+
function AbstractCursor$iterator$1(this$0) {
|
|
808
|
+
this.ps_1 = this$0;
|
|
809
|
+
}
|
|
810
|
+
protoOf(AbstractCursor$iterator$1).s = function () {
|
|
811
|
+
return !this.ps_1.zp();
|
|
812
|
+
};
|
|
813
|
+
protoOf(AbstractCursor$iterator$1).u = function () {
|
|
814
|
+
var result = this.ps_1.xp();
|
|
815
|
+
this.ps_1 = this.ps_1.wp();
|
|
816
|
+
return ensureNotNull(result);
|
|
817
|
+
};
|
|
818
|
+
function AbstractCursor() {
|
|
819
|
+
}
|
|
820
|
+
protoOf(AbstractCursor).toString = function () {
|
|
821
|
+
return this.zp() ? '[]' : !this.yp() ? '[' + this.xp() + ']' : '[' + this.xp() + ', ...]';
|
|
822
|
+
};
|
|
823
|
+
protoOf(AbstractCursor).r = function () {
|
|
824
|
+
return new AbstractCursor$iterator$1(this);
|
|
825
|
+
};
|
|
826
|
+
protoOf(AbstractCursor).iterator = function () {
|
|
827
|
+
return this.r();
|
|
828
|
+
};
|
|
829
|
+
protoOf(AbstractCursor).qs = function () {
|
|
830
|
+
return false;
|
|
831
|
+
};
|
|
832
|
+
protoOf(AbstractCursor).rs = function (mapper) {
|
|
833
|
+
return new MapperCursor(this, mapper);
|
|
834
|
+
};
|
|
835
|
+
protoOf(AbstractCursor).map = function (mapper) {
|
|
836
|
+
return this.rs(mapper);
|
|
837
|
+
};
|
|
838
|
+
function CachedImpl(generator) {
|
|
839
|
+
this.ss_1 = generator;
|
|
840
|
+
this.ts_1 = Companion_instance_5.rp();
|
|
841
|
+
}
|
|
842
|
+
protoOf(CachedImpl).op = function () {
|
|
843
|
+
return this.ts_1.ms();
|
|
844
|
+
};
|
|
845
|
+
protoOf(CachedImpl).us = function () {
|
|
846
|
+
return this.ts_1.ns();
|
|
847
|
+
};
|
|
848
|
+
protoOf(CachedImpl).r2 = function () {
|
|
849
|
+
this.vs();
|
|
850
|
+
return ensureNotNull(this.ts_1.r2());
|
|
851
|
+
};
|
|
852
|
+
protoOf(CachedImpl).vs = function () {
|
|
853
|
+
if (this.us()) {
|
|
854
|
+
this.ts_1 = Companion_instance_5.ls(this.ss_1());
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
protoOf(CachedImpl).pp = function () {
|
|
858
|
+
this.ts_1 = Companion_instance_5.rp();
|
|
859
|
+
};
|
|
860
|
+
protoOf(CachedImpl).toString = function () {
|
|
861
|
+
return 'CachedImpl(generator=' + this.ss_1 + ')';
|
|
862
|
+
};
|
|
863
|
+
protoOf(CachedImpl).hashCode = function () {
|
|
864
|
+
return hashCode(this.ss_1);
|
|
865
|
+
};
|
|
866
|
+
protoOf(CachedImpl).equals = function (other) {
|
|
867
|
+
if (this === other)
|
|
868
|
+
return true;
|
|
869
|
+
if (!(other instanceof CachedImpl))
|
|
870
|
+
return false;
|
|
871
|
+
var tmp0_other_with_cast = other instanceof CachedImpl ? other : THROW_CCE();
|
|
872
|
+
if (!equals(this.ss_1, tmp0_other_with_cast.ss_1))
|
|
873
|
+
return false;
|
|
874
|
+
return true;
|
|
875
|
+
};
|
|
876
|
+
function ConjunctionCursor$next$delegate$lambda(this$0) {
|
|
877
|
+
return function () {
|
|
878
|
+
return this$0.ws_1.yp() ? new ConjunctionCursor(this$0.ws_1.wp(), this$0.xs_1) : this$0.xs_1.qs() ? this$0.xs_1.wp() : this$0.xs_1;
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
function ConjunctionCursor(first, second) {
|
|
882
|
+
AbstractCursor.call(this);
|
|
883
|
+
this.ws_1 = first;
|
|
884
|
+
this.xs_1 = second;
|
|
885
|
+
var tmp = this;
|
|
886
|
+
tmp.ys_1 = lazy(ConjunctionCursor$next$delegate$lambda(this));
|
|
887
|
+
}
|
|
888
|
+
protoOf(ConjunctionCursor).zp = function () {
|
|
889
|
+
return this.ws_1.zp() ? this.xs_1.zp() : false;
|
|
890
|
+
};
|
|
891
|
+
protoOf(ConjunctionCursor).wp = function () {
|
|
892
|
+
// Inline function 'kotlin.getValue' call
|
|
893
|
+
var this_0 = this.ys_1;
|
|
894
|
+
next$factory();
|
|
895
|
+
return this_0.r2();
|
|
896
|
+
};
|
|
897
|
+
protoOf(ConjunctionCursor).xp = function () {
|
|
898
|
+
return this.ws_1.yp() ? this.ws_1.xp() : this.xs_1.xp();
|
|
899
|
+
};
|
|
900
|
+
protoOf(ConjunctionCursor).yp = function () {
|
|
901
|
+
return this.ws_1.yp() ? true : this.xs_1.yp();
|
|
902
|
+
};
|
|
903
|
+
protoOf(ConjunctionCursor).equals = function (other) {
|
|
904
|
+
if (this === other)
|
|
905
|
+
return true;
|
|
906
|
+
if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
907
|
+
return false;
|
|
908
|
+
if (!(other instanceof ConjunctionCursor))
|
|
909
|
+
THROW_CCE();
|
|
910
|
+
if (!equals(this.ws_1, other.ws_1))
|
|
911
|
+
return false;
|
|
912
|
+
if (!equals(this.xs_1, other.xs_1))
|
|
913
|
+
return false;
|
|
914
|
+
return true;
|
|
915
|
+
};
|
|
916
|
+
protoOf(ConjunctionCursor).hashCode = function () {
|
|
917
|
+
var result = hashCode(this.ws_1);
|
|
918
|
+
result = imul(31, result) + hashCode(this.xs_1) | 0;
|
|
919
|
+
return result;
|
|
920
|
+
};
|
|
921
|
+
function next$factory() {
|
|
922
|
+
return getPropertyCallableRef('next', 1, KProperty1, function (receiver) {
|
|
923
|
+
return receiver.wp();
|
|
924
|
+
}, null);
|
|
925
|
+
}
|
|
926
|
+
function EmptyCursor() {
|
|
927
|
+
EmptyCursor_instance = this;
|
|
928
|
+
AbstractCursor.call(this);
|
|
929
|
+
}
|
|
930
|
+
protoOf(EmptyCursor).wp = function () {
|
|
931
|
+
throw NoSuchElementException_init_$Create$();
|
|
932
|
+
};
|
|
933
|
+
protoOf(EmptyCursor).xp = function () {
|
|
934
|
+
return null;
|
|
935
|
+
};
|
|
936
|
+
protoOf(EmptyCursor).yp = function () {
|
|
937
|
+
return false;
|
|
938
|
+
};
|
|
939
|
+
protoOf(EmptyCursor).zp = function () {
|
|
940
|
+
return true;
|
|
941
|
+
};
|
|
942
|
+
protoOf(EmptyCursor).toString = function () {
|
|
943
|
+
return protoOf(AbstractCursor).toString.call(this);
|
|
944
|
+
};
|
|
945
|
+
protoOf(EmptyCursor).zs = function (mapper) {
|
|
946
|
+
return this;
|
|
947
|
+
};
|
|
948
|
+
protoOf(EmptyCursor).map = function (mapper) {
|
|
949
|
+
return this.zs(mapper);
|
|
950
|
+
};
|
|
951
|
+
protoOf(EmptyCursor).rs = function (mapper) {
|
|
952
|
+
return this.zs(mapper);
|
|
953
|
+
};
|
|
954
|
+
var EmptyCursor_instance;
|
|
955
|
+
function EmptyCursor_getInstance() {
|
|
956
|
+
if (EmptyCursor_instance == null)
|
|
957
|
+
new EmptyCursor();
|
|
958
|
+
return EmptyCursor_instance;
|
|
959
|
+
}
|
|
960
|
+
function IntIndexedImpl(index, value) {
|
|
961
|
+
this.at_1 = index;
|
|
962
|
+
this.bt_1 = value;
|
|
963
|
+
}
|
|
964
|
+
protoOf(IntIndexedImpl).bq = function () {
|
|
965
|
+
return this.at_1;
|
|
966
|
+
};
|
|
967
|
+
protoOf(IntIndexedImpl).r2 = function () {
|
|
968
|
+
return this.bt_1;
|
|
969
|
+
};
|
|
970
|
+
protoOf(IntIndexedImpl).gd = function () {
|
|
971
|
+
return this.at_1;
|
|
972
|
+
};
|
|
973
|
+
protoOf(IntIndexedImpl).hd = function () {
|
|
974
|
+
return this.bt_1;
|
|
975
|
+
};
|
|
976
|
+
protoOf(IntIndexedImpl).toString = function () {
|
|
977
|
+
return 'IntIndexedImpl(index=' + this.at_1 + ', value=' + this.bt_1 + ')';
|
|
978
|
+
};
|
|
979
|
+
protoOf(IntIndexedImpl).hashCode = function () {
|
|
980
|
+
var result = this.at_1;
|
|
981
|
+
result = imul(result, 31) + (this.bt_1 == null ? 0 : hashCode(this.bt_1)) | 0;
|
|
982
|
+
return result;
|
|
983
|
+
};
|
|
984
|
+
protoOf(IntIndexedImpl).equals = function (other) {
|
|
985
|
+
if (this === other)
|
|
986
|
+
return true;
|
|
987
|
+
if (!(other instanceof IntIndexedImpl))
|
|
988
|
+
return false;
|
|
989
|
+
var tmp0_other_with_cast = other instanceof IntIndexedImpl ? other : THROW_CCE();
|
|
990
|
+
if (!(this.at_1 === tmp0_other_with_cast.at_1))
|
|
991
|
+
return false;
|
|
992
|
+
if (!equals(this.bt_1, tmp0_other_with_cast.bt_1))
|
|
993
|
+
return false;
|
|
994
|
+
return true;
|
|
995
|
+
};
|
|
996
|
+
protoOf(IntIndexedImpl).d = function (other) {
|
|
997
|
+
return this.dq((!(other == null) ? isInterface(other, IntIndexed) : false) ? other : THROW_CCE());
|
|
998
|
+
};
|
|
999
|
+
function _get_wrapped__s2ip8($this) {
|
|
1000
|
+
// Inline function 'kotlin.getValue' call
|
|
1001
|
+
var this_0 = $this.dt_1;
|
|
1002
|
+
wrapped$factory();
|
|
1003
|
+
return this_0.r2();
|
|
1004
|
+
}
|
|
1005
|
+
function LazyCursor$wrapped$delegate$lambda(this$0) {
|
|
1006
|
+
return function () {
|
|
1007
|
+
return new NonLastCursor(this$0.ct_1);
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
function LazyCursor(delegate) {
|
|
1011
|
+
AbstractCursor.call(this);
|
|
1012
|
+
this.ct_1 = delegate;
|
|
1013
|
+
var tmp = this;
|
|
1014
|
+
tmp.dt_1 = lazy(LazyCursor$wrapped$delegate$lambda(this));
|
|
1015
|
+
}
|
|
1016
|
+
protoOf(LazyCursor).qs = function () {
|
|
1017
|
+
return true;
|
|
1018
|
+
};
|
|
1019
|
+
protoOf(LazyCursor).wp = function () {
|
|
1020
|
+
return _get_wrapped__s2ip8(this).wp();
|
|
1021
|
+
};
|
|
1022
|
+
protoOf(LazyCursor).xp = function () {
|
|
1023
|
+
return _get_wrapped__s2ip8(this).xp();
|
|
1024
|
+
};
|
|
1025
|
+
protoOf(LazyCursor).yp = function () {
|
|
1026
|
+
return true;
|
|
1027
|
+
};
|
|
1028
|
+
protoOf(LazyCursor).zp = function () {
|
|
1029
|
+
return false;
|
|
1030
|
+
};
|
|
1031
|
+
protoOf(LazyCursor).toString = function () {
|
|
1032
|
+
return protoOf(AbstractCursor).toString.call(this);
|
|
1033
|
+
};
|
|
1034
|
+
protoOf(LazyCursor).r = function () {
|
|
1035
|
+
return _get_wrapped__s2ip8(this).r();
|
|
1036
|
+
};
|
|
1037
|
+
protoOf(LazyCursor).iterator = function () {
|
|
1038
|
+
return this.r();
|
|
1039
|
+
};
|
|
1040
|
+
protoOf(LazyCursor).hashCode = function () {
|
|
1041
|
+
return hashCode(this.ct_1);
|
|
1042
|
+
};
|
|
1043
|
+
protoOf(LazyCursor).equals = function (other) {
|
|
1044
|
+
if (this === other)
|
|
1045
|
+
return true;
|
|
1046
|
+
if (!(other instanceof LazyCursor))
|
|
1047
|
+
return false;
|
|
1048
|
+
var tmp0_other_with_cast = other instanceof LazyCursor ? other : THROW_CCE();
|
|
1049
|
+
if (!equals(this.ct_1, tmp0_other_with_cast.ct_1))
|
|
1050
|
+
return false;
|
|
1051
|
+
return true;
|
|
1052
|
+
};
|
|
1053
|
+
function wrapped$factory() {
|
|
1054
|
+
return getPropertyCallableRef('wrapped', 1, KProperty1, function (receiver) {
|
|
1055
|
+
return _get_wrapped__s2ip8(receiver);
|
|
1056
|
+
}, null);
|
|
1057
|
+
}
|
|
1058
|
+
function LongIndexedImpl(index, value) {
|
|
1059
|
+
this.et_1 = index;
|
|
1060
|
+
this.ft_1 = value;
|
|
1061
|
+
}
|
|
1062
|
+
protoOf(LongIndexedImpl).bq = function () {
|
|
1063
|
+
return this.et_1;
|
|
1064
|
+
};
|
|
1065
|
+
protoOf(LongIndexedImpl).r2 = function () {
|
|
1066
|
+
return this.ft_1;
|
|
1067
|
+
};
|
|
1068
|
+
protoOf(LongIndexedImpl).cs = function (other) {
|
|
1069
|
+
return this.et_1.ma(other.bq()).b9();
|
|
1070
|
+
};
|
|
1071
|
+
protoOf(LongIndexedImpl).d = function (other) {
|
|
1072
|
+
return this.cs((!(other == null) ? isInterface(other, LongIndexed) : false) ? other : THROW_CCE());
|
|
1073
|
+
};
|
|
1074
|
+
protoOf(LongIndexedImpl).toString = function () {
|
|
1075
|
+
return 'LongIndexedImpl(index=' + this.et_1.toString() + ', value=' + this.ft_1 + ')';
|
|
1076
|
+
};
|
|
1077
|
+
protoOf(LongIndexedImpl).hashCode = function () {
|
|
1078
|
+
var result = this.et_1.hashCode();
|
|
1079
|
+
result = imul(result, 31) + (this.ft_1 == null ? 0 : hashCode(this.ft_1)) | 0;
|
|
1080
|
+
return result;
|
|
1081
|
+
};
|
|
1082
|
+
protoOf(LongIndexedImpl).equals = function (other) {
|
|
1083
|
+
if (this === other)
|
|
1084
|
+
return true;
|
|
1085
|
+
if (!(other instanceof LongIndexedImpl))
|
|
1086
|
+
return false;
|
|
1087
|
+
var tmp0_other_with_cast = other instanceof LongIndexedImpl ? other : THROW_CCE();
|
|
1088
|
+
if (!this.et_1.equals(tmp0_other_with_cast.et_1))
|
|
1089
|
+
return false;
|
|
1090
|
+
if (!equals(this.ft_1, tmp0_other_with_cast.ft_1))
|
|
1091
|
+
return false;
|
|
1092
|
+
return true;
|
|
1093
|
+
};
|
|
1094
|
+
function MapperCursor$current$delegate$lambda(this$0) {
|
|
1095
|
+
return function () {
|
|
1096
|
+
return this$0.ht_1(ensureNotNull(this$0.gt_1.xp()));
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
function MapperCursor(wrapped, mapper) {
|
|
1100
|
+
AbstractCursor.call(this);
|
|
1101
|
+
this.gt_1 = wrapped;
|
|
1102
|
+
this.ht_1 = mapper;
|
|
1103
|
+
var tmp = this;
|
|
1104
|
+
tmp.it_1 = lazy(MapperCursor$current$delegate$lambda(this));
|
|
1105
|
+
}
|
|
1106
|
+
protoOf(MapperCursor).wp = function () {
|
|
1107
|
+
return this.gt_1.wp().rs(this.ht_1);
|
|
1108
|
+
};
|
|
1109
|
+
protoOf(MapperCursor).xp = function () {
|
|
1110
|
+
// Inline function 'kotlin.getValue' call
|
|
1111
|
+
var this_0 = this.it_1;
|
|
1112
|
+
current$factory();
|
|
1113
|
+
return this_0.r2();
|
|
1114
|
+
};
|
|
1115
|
+
protoOf(MapperCursor).yp = function () {
|
|
1116
|
+
return true;
|
|
1117
|
+
};
|
|
1118
|
+
protoOf(MapperCursor).zp = function () {
|
|
1119
|
+
return false;
|
|
1120
|
+
};
|
|
1121
|
+
protoOf(MapperCursor).equals = function (other) {
|
|
1122
|
+
if (this === other)
|
|
1123
|
+
return true;
|
|
1124
|
+
if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
1125
|
+
return false;
|
|
1126
|
+
if (!(other instanceof MapperCursor))
|
|
1127
|
+
THROW_CCE();
|
|
1128
|
+
if (!equals(this.gt_1, other.gt_1))
|
|
1129
|
+
return false;
|
|
1130
|
+
if (!equals(this.ht_1, other.ht_1))
|
|
1131
|
+
return false;
|
|
1132
|
+
return true;
|
|
1133
|
+
};
|
|
1134
|
+
protoOf(MapperCursor).hashCode = function () {
|
|
1135
|
+
var result = hashCode(this.gt_1);
|
|
1136
|
+
result = imul(31, result) + hashCode(this.ht_1) | 0;
|
|
1137
|
+
return result;
|
|
1138
|
+
};
|
|
1139
|
+
protoOf(MapperCursor).jt = function (mapper) {
|
|
1140
|
+
return new ValueCursor(mapper(this.xp()), this.wp().rs(mapper));
|
|
1141
|
+
};
|
|
1142
|
+
protoOf(MapperCursor).map = function (mapper) {
|
|
1143
|
+
return this.jt(mapper);
|
|
1144
|
+
};
|
|
1145
|
+
protoOf(MapperCursor).rs = function (mapper) {
|
|
1146
|
+
return this.jt(mapper);
|
|
1147
|
+
};
|
|
1148
|
+
function current$factory() {
|
|
1149
|
+
return getPropertyCallableRef('current', 1, KProperty1, function (receiver) {
|
|
1150
|
+
return receiver.xp();
|
|
1151
|
+
}, null);
|
|
1152
|
+
}
|
|
1153
|
+
function NonLastCursor$next$delegate$lambda($source, this$0) {
|
|
1154
|
+
return function () {
|
|
1155
|
+
// Inline function 'kotlin.also' call
|
|
1156
|
+
var this_0 = Companion_instance_6.aq($source);
|
|
1157
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1158
|
+
// Inline function 'it.unibo.tuprolog.utils.impl.NonLastCursor.next$delegate.<anonymous>.<anonymous>' call
|
|
1159
|
+
this$0.kt_1 = null;
|
|
1160
|
+
return this_0;
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
function NonLastCursor(source) {
|
|
1164
|
+
AbstractCursor.call(this);
|
|
1165
|
+
this.kt_1 = source;
|
|
1166
|
+
var tmp = this;
|
|
1167
|
+
tmp.lt_1 = lazy(NonLastCursor$next$delegate$lambda(source, this));
|
|
1168
|
+
this.mt_1 = source.u();
|
|
1169
|
+
}
|
|
1170
|
+
protoOf(NonLastCursor).wp = function () {
|
|
1171
|
+
// Inline function 'kotlin.getValue' call
|
|
1172
|
+
var this_0 = this.lt_1;
|
|
1173
|
+
next$factory_0();
|
|
1174
|
+
return this_0.r2();
|
|
1175
|
+
};
|
|
1176
|
+
protoOf(NonLastCursor).xp = function () {
|
|
1177
|
+
return this.mt_1;
|
|
1178
|
+
};
|
|
1179
|
+
protoOf(NonLastCursor).yp = function () {
|
|
1180
|
+
return true;
|
|
1181
|
+
};
|
|
1182
|
+
protoOf(NonLastCursor).zp = function () {
|
|
1183
|
+
return false;
|
|
1184
|
+
};
|
|
1185
|
+
protoOf(NonLastCursor).toString = function () {
|
|
1186
|
+
return protoOf(AbstractCursor).toString.call(this);
|
|
1187
|
+
};
|
|
1188
|
+
function next$factory_0() {
|
|
1189
|
+
return getPropertyCallableRef('next', 1, KProperty1, function (receiver) {
|
|
1190
|
+
return receiver.wp();
|
|
1191
|
+
}, null);
|
|
1192
|
+
}
|
|
1193
|
+
function removeLeastRecent($this) {
|
|
1194
|
+
// Inline function 'kotlin.collections.asIterable' call
|
|
1195
|
+
var tmp$ret$0 = $this.ot_1.n2();
|
|
1196
|
+
var tmp0_container = first(tmp$ret$0);
|
|
1197
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1198
|
+
var key = tmp0_container.q2();
|
|
1199
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1200
|
+
var value = tmp0_container.r2();
|
|
1201
|
+
$this.ot_1.p2(key);
|
|
1202
|
+
return Companion_instance_5.ls(to(key, value));
|
|
1203
|
+
}
|
|
1204
|
+
function removeLeastRecentIfNecessary($this) {
|
|
1205
|
+
var tmp;
|
|
1206
|
+
if ($this.ot_1.l() >= $this.nt_1) {
|
|
1207
|
+
tmp = removeLeastRecent($this);
|
|
1208
|
+
} else {
|
|
1209
|
+
tmp = Companion_instance_5.rp();
|
|
1210
|
+
}
|
|
1211
|
+
return tmp;
|
|
1212
|
+
}
|
|
1213
|
+
function SimpleLRUCache$set$lambda(this$0, $key, $value) {
|
|
1214
|
+
return function () {
|
|
1215
|
+
var evicted = removeLeastRecentIfNecessary(this$0);
|
|
1216
|
+
var this_0 = this$0.ot_1;
|
|
1217
|
+
var key = $key;
|
|
1218
|
+
var value = $value;
|
|
1219
|
+
this_0.o2(key, value);
|
|
1220
|
+
return evicted;
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
function SimpleLRUCache$get$lambda(this$0, $key) {
|
|
1224
|
+
return function () {
|
|
1225
|
+
var tmp;
|
|
1226
|
+
if (this$0.ot_1.u2($key)) {
|
|
1227
|
+
tmp = Companion_instance_5.sp(this$0.ot_1.x2($key));
|
|
1228
|
+
} else {
|
|
1229
|
+
tmp = Companion_instance_5.rp();
|
|
1230
|
+
}
|
|
1231
|
+
return tmp;
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
function SimpleLRUCache$toSequence$lambda$lambda(it) {
|
|
1235
|
+
// Inline function 'kotlin.collections.toPair' call
|
|
1236
|
+
return new Pair(it.q2(), it.r2());
|
|
1237
|
+
}
|
|
1238
|
+
function SimpleLRUCache$toSequence$lambda(this$0) {
|
|
1239
|
+
return function () {
|
|
1240
|
+
var tmp = asSequence(this$0.ot_1.n2());
|
|
1241
|
+
return buffered(map(tmp, SimpleLRUCache$toSequence$lambda$lambda));
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
function SimpleLRUCache$toString$lambda(it) {
|
|
1245
|
+
return '' + it.qd_1 + ' = ' + it.rd_1;
|
|
1246
|
+
}
|
|
1247
|
+
function SimpleLRUCache(capacity) {
|
|
1248
|
+
this.nt_1 = capacity;
|
|
1249
|
+
// Inline function 'kotlin.require' call
|
|
1250
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1251
|
+
// Inline function 'kotlin.require' call
|
|
1252
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1253
|
+
if (!(this.nt_1 > 0)) {
|
|
1254
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
1255
|
+
var message = 'Failed requirement.';
|
|
1256
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1257
|
+
}
|
|
1258
|
+
this.ot_1 = LinkedHashMap_init_$Create$();
|
|
1259
|
+
}
|
|
1260
|
+
protoOf(SimpleLRUCache).kp = function (key, value) {
|
|
1261
|
+
return synchronizedOnSelf(this, SimpleLRUCache$set$lambda(this, key, value));
|
|
1262
|
+
};
|
|
1263
|
+
protoOf(SimpleLRUCache).x2 = function (key) {
|
|
1264
|
+
return synchronizedOnSelf(this, SimpleLRUCache$get$lambda(this, key));
|
|
1265
|
+
};
|
|
1266
|
+
protoOf(SimpleLRUCache).equals = function (other) {
|
|
1267
|
+
if (this === other)
|
|
1268
|
+
return true;
|
|
1269
|
+
if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
1270
|
+
return false;
|
|
1271
|
+
if (!(other instanceof SimpleLRUCache))
|
|
1272
|
+
THROW_CCE();
|
|
1273
|
+
if (!(this.nt_1 === other.nt_1))
|
|
1274
|
+
return false;
|
|
1275
|
+
if (!this.ot_1.equals(other.ot_1))
|
|
1276
|
+
return false;
|
|
1277
|
+
return true;
|
|
1278
|
+
};
|
|
1279
|
+
protoOf(SimpleLRUCache).hashCode = function () {
|
|
1280
|
+
var result = this.nt_1;
|
|
1281
|
+
result = imul(31, result) + this.ot_1.hashCode() | 0;
|
|
1282
|
+
return result;
|
|
1283
|
+
};
|
|
1284
|
+
protoOf(SimpleLRUCache).pt = function () {
|
|
1285
|
+
return synchronizedOnSelf(this, SimpleLRUCache$toSequence$lambda(this));
|
|
1286
|
+
};
|
|
1287
|
+
protoOf(SimpleLRUCache).toString = function () {
|
|
1288
|
+
var tmp = this.pt();
|
|
1289
|
+
return 'SimpleLRUCache(' + joinToString(map(tmp, SimpleLRUCache$toString$lambda), ', ') + ')';
|
|
1290
|
+
};
|
|
1291
|
+
function ValueCursor(current, next) {
|
|
1292
|
+
AbstractCursor.call(this);
|
|
1293
|
+
this.qt_1 = current;
|
|
1294
|
+
this.rt_1 = next;
|
|
1295
|
+
}
|
|
1296
|
+
protoOf(ValueCursor).xp = function () {
|
|
1297
|
+
return this.qt_1;
|
|
1298
|
+
};
|
|
1299
|
+
protoOf(ValueCursor).wp = function () {
|
|
1300
|
+
return this.rt_1;
|
|
1301
|
+
};
|
|
1302
|
+
protoOf(ValueCursor).yp = function () {
|
|
1303
|
+
return true;
|
|
1304
|
+
};
|
|
1305
|
+
protoOf(ValueCursor).zp = function () {
|
|
1306
|
+
return false;
|
|
1307
|
+
};
|
|
1308
|
+
function dequeOf(items) {
|
|
1309
|
+
return toMutableList(items);
|
|
1310
|
+
}
|
|
1311
|
+
function dequeOf_0(items) {
|
|
1312
|
+
return mutableListOf(items.slice());
|
|
1313
|
+
}
|
|
1314
|
+
function dequeOf_1(items) {
|
|
1315
|
+
// Inline function 'kotlin.also' call
|
|
1316
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1317
|
+
var this_0 = ArrayList_init_$Create$_0();
|
|
1318
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1319
|
+
// Inline function 'it.unibo.tuprolog.utils.dequeOf.<anonymous>' call
|
|
1320
|
+
addAll(this_0, items);
|
|
1321
|
+
return this_0;
|
|
1322
|
+
}
|
|
1323
|
+
function takeFirst(_this__u8e3s4) {
|
|
1324
|
+
if (_this__u8e3s4.z())
|
|
1325
|
+
return null;
|
|
1326
|
+
var first = _this__u8e3s4.d1(0);
|
|
1327
|
+
_this__u8e3s4.f1(0);
|
|
1328
|
+
return first;
|
|
1329
|
+
}
|
|
1330
|
+
function addFirst(_this__u8e3s4, item) {
|
|
1331
|
+
_this__u8e3s4.q1(0, item);
|
|
1332
|
+
}
|
|
1333
|
+
function addFirst_0(_this__u8e3s4, items) {
|
|
1334
|
+
var i = _this__u8e3s4.z1();
|
|
1335
|
+
var tmp0_iterator = items.r();
|
|
1336
|
+
while (tmp0_iterator.s()) {
|
|
1337
|
+
var item = tmp0_iterator.u();
|
|
1338
|
+
i.r1(item);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
function synchronizedOn(obj, action) {
|
|
1342
|
+
return action();
|
|
1343
|
+
}
|
|
1344
|
+
function forceCast(_this__u8e3s4) {
|
|
1345
|
+
var it = _this__u8e3s4;
|
|
1346
|
+
return it;
|
|
1347
|
+
}
|
|
1348
|
+
//region block: post-declaration
|
|
1349
|
+
protoOf(AbstractCursor).asIterable = asIterable_1;
|
|
1350
|
+
protoOf(AbstractCursor).asSequence = asSequence_0;
|
|
1351
|
+
protoOf(CachedImpl).qp = ifValid;
|
|
1352
|
+
protoOf(IntIndexedImpl).dq = compareTo;
|
|
1353
|
+
protoOf(SimpleLRUCache).lp = getOrSet;
|
|
1354
|
+
//endregion
|
|
1355
|
+
//region block: init
|
|
1356
|
+
Companion_instance = new Companion();
|
|
1357
|
+
Companion_instance_0 = new Companion_0();
|
|
1358
|
+
Companion_instance_1 = new Companion_1();
|
|
1359
|
+
Companion_instance_2 = new Companion_2();
|
|
1360
|
+
Companion_instance_3 = new Companion_3();
|
|
1361
|
+
Companion_instance_5 = new Companion_5();
|
|
1362
|
+
Companion_instance_6 = new Companion_6();
|
|
1363
|
+
//endregion
|
|
1364
|
+
//region block: exports
|
|
1365
|
+
_.$_$ = _.$_$ || {};
|
|
1366
|
+
_.$_$.a = Companion_instance;
|
|
1367
|
+
_.$_$.b = Companion_instance_0;
|
|
1368
|
+
_.$_$.c = Companion_instance_1;
|
|
1369
|
+
_.$_$.d = Companion_instance_3;
|
|
1370
|
+
_.$_$.e = castTo;
|
|
1371
|
+
_.$_$.f = Castable;
|
|
1372
|
+
_.$_$.g = compareTo_0;
|
|
1373
|
+
_.$_$.h = LongIndexed;
|
|
1374
|
+
_.$_$.i = NumberTypeTester;
|
|
1375
|
+
_.$_$.j = Some;
|
|
1376
|
+
_.$_$.k = containsTag;
|
|
1377
|
+
_.$_$.l = getTag;
|
|
1378
|
+
_.$_$.m = Taggable;
|
|
1379
|
+
_.$_$.n = addFirst_0;
|
|
1380
|
+
_.$_$.o = addFirst;
|
|
1381
|
+
_.$_$.p = assertItemsAreNotNull_0;
|
|
1382
|
+
_.$_$.q = assertItemsAreNotNull;
|
|
1383
|
+
_.$_$.r = assertItemsAreNotNull_1;
|
|
1384
|
+
_.$_$.s = buffered;
|
|
1385
|
+
_.$_$.t = cached;
|
|
1386
|
+
_.$_$.u = cursor;
|
|
1387
|
+
_.$_$.v = cursor_0;
|
|
1388
|
+
_.$_$.w = cursor_1;
|
|
1389
|
+
_.$_$.x = dequeOf;
|
|
1390
|
+
_.$_$.y = dequeOf_1;
|
|
1391
|
+
_.$_$.z = dequeOf_0;
|
|
1392
|
+
_.$_$.a1 = dropLast;
|
|
1393
|
+
_.$_$.b1 = forceCast;
|
|
1394
|
+
_.$_$.c1 = insertAt;
|
|
1395
|
+
_.$_$.d1 = itemWiseEquals;
|
|
1396
|
+
_.$_$.e1 = itemWiseEquals_1;
|
|
1397
|
+
_.$_$.f1 = itemWiseHashCode;
|
|
1398
|
+
_.$_$.g1 = itemWiseHashCode_1;
|
|
1399
|
+
_.$_$.h1 = itemWiseHashCode_0;
|
|
1400
|
+
_.$_$.i1 = mergeSequences;
|
|
1401
|
+
_.$_$.j1 = plus;
|
|
1402
|
+
_.$_$.k1 = setTags;
|
|
1403
|
+
_.$_$.l1 = synchronizedOnSelf;
|
|
1404
|
+
_.$_$.m1 = synchronizedOn;
|
|
1405
|
+
_.$_$.n1 = takeFirst;
|
|
1406
|
+
//endregion
|
|
1407
|
+
return _;
|
|
1408
|
+
}));
|
|
1409
|
+
|
|
1410
|
+
//# sourceMappingURL=2p-utils.js.map
|