@tuprolog/arg2p-core 0.7.0 → 0.7.2

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