@lin-lang/lin
Version:
A JS wrapper for the programming language Lin.
1,314 lines (1,313 loc) • 1.1 MB
JavaScript
(function (root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports'], factory);
else if (typeof exports === 'object')
factory(module.exports);
else
root.lin = factory(typeof lin === 'undefined' ? {} : lin);
}(this, function (_) {
'use strict';
AbstractList.prototype = Object.create(AbstractCollection.prototype);
AbstractList.prototype.constructor = AbstractList;
ReversedListReadOnly.prototype = Object.create(AbstractList.prototype);
ReversedListReadOnly.prototype.constructor = ReversedListReadOnly;
DoubleTimeMark.prototype = Object.create(TimeMark.prototype);
DoubleTimeMark.prototype.constructor = DoubleTimeMark;
Error_0.prototype = Object.create(Error.prototype);
Error_0.prototype.constructor = Error_0;
NotImplementedError.prototype = Object.create(Error_0.prototype);
NotImplementedError.prototype.constructor = NotImplementedError;
IntProgressionIterator.prototype = Object.create(IntIterator.prototype);
IntProgressionIterator.prototype.constructor = IntProgressionIterator;
LongProgressionIterator.prototype = Object.create(LongIterator.prototype);
LongProgressionIterator.prototype.constructor = LongProgressionIterator;
IntRange.prototype = Object.create(IntProgression.prototype);
IntRange.prototype.constructor = IntRange;
LongRange.prototype = Object.create(LongProgression.prototype);
LongRange.prototype.constructor = LongRange;
AbstractMutableCollection.prototype = Object.create(AbstractCollection.prototype);
AbstractMutableCollection.prototype.constructor = AbstractMutableCollection;
AbstractMutableList.prototype = Object.create(AbstractMutableCollection.prototype);
AbstractMutableList.prototype.constructor = AbstractMutableList;
AbstractMutableSet.prototype = Object.create(AbstractMutableCollection.prototype);
AbstractMutableSet.prototype.constructor = AbstractMutableSet;
AbstractEntrySet.prototype = Object.create(AbstractMutableSet.prototype);
AbstractEntrySet.prototype.constructor = AbstractEntrySet;
AbstractMutableMap.prototype = Object.create(AbstractMap.prototype);
AbstractMutableMap.prototype.constructor = AbstractMutableMap;
ArrayList.prototype = Object.create(AbstractMutableList.prototype);
ArrayList.prototype.constructor = ArrayList;
EntrySet.prototype = Object.create(AbstractEntrySet.prototype);
EntrySet.prototype.constructor = EntrySet;
HashMap.prototype = Object.create(AbstractMutableMap.prototype);
HashMap.prototype.constructor = HashMap;
ChainEntry.prototype = Object.create(SimpleEntry.prototype);
ChainEntry.prototype.constructor = ChainEntry;
EntrySet_0.prototype = Object.create(AbstractEntrySet.prototype);
EntrySet_0.prototype.constructor = EntrySet_0;
LinkedHashMap.prototype = Object.create(HashMap.prototype);
LinkedHashMap.prototype.constructor = LinkedHashMap;
NodeJsOutput_0.prototype = Object.create(BaseOutput.prototype);
NodeJsOutput_0.prototype.constructor = NodeJsOutput_0;
BufferedOutput_0.prototype = Object.create(BaseOutput.prototype);
BufferedOutput_0.prototype.constructor = BufferedOutput_0;
BufferedOutputToConsoleLog_0.prototype = Object.create(BufferedOutput_0.prototype);
BufferedOutputToConsoleLog_0.prototype.constructor = BufferedOutputToConsoleLog_0;
PrimitiveKClassImpl.prototype = Object.create(KClassImpl.prototype);
PrimitiveKClassImpl.prototype.constructor = PrimitiveKClassImpl;
NothingKClassImpl.prototype = Object.create(KClassImpl.prototype);
NothingKClassImpl.prototype.constructor = NothingKClassImpl;
SimpleKClassImpl.prototype = Object.create(KClassImpl.prototype);
SimpleKClassImpl.prototype.constructor = SimpleKClassImpl;
DurationUnit.prototype = Object.create(Enum.prototype);
DurationUnit.prototype.constructor = DurationUnit;
_no_name_provided__29.prototype = Object.create(TimeMark.prototype);
_no_name_provided__29.prototype.constructor = _no_name_provided__29;
PerformanceTimeSource.prototype = Object.create(AbstractDoubleTimeSource.prototype);
PerformanceTimeSource.prototype.constructor = PerformanceTimeSource;
DateNowTimeSource.prototype = Object.create(AbstractDoubleTimeSource.prototype);
DateNowTimeSource.prototype.constructor = DateNowTimeSource;
Long.prototype = Object.create(Number_0.prototype);
Long.prototype.constructor = Long;
Exception.prototype = Object.create(Error.prototype);
Exception.prototype.constructor = Exception;
RuntimeException.prototype = Object.create(Exception.prototype);
RuntimeException.prototype.constructor = RuntimeException;
IllegalArgumentException.prototype = Object.create(RuntimeException.prototype);
IllegalArgumentException.prototype.constructor = IllegalArgumentException;
NoSuchElementException.prototype = Object.create(RuntimeException.prototype);
NoSuchElementException.prototype.constructor = NoSuchElementException;
IllegalStateException.prototype = Object.create(RuntimeException.prototype);
IllegalStateException.prototype.constructor = IllegalStateException;
IndexOutOfBoundsException.prototype = Object.create(RuntimeException.prototype);
IndexOutOfBoundsException.prototype.constructor = IndexOutOfBoundsException;
NumberFormatException.prototype = Object.create(IllegalArgumentException.prototype);
NumberFormatException.prototype.constructor = NumberFormatException;
AssertionError.prototype = Object.create(Error_0.prototype);
AssertionError.prototype.constructor = AssertionError;
UnsupportedOperationException.prototype = Object.create(RuntimeException.prototype);
UnsupportedOperationException.prototype.constructor = UnsupportedOperationException;
ArithmeticException.prototype = Object.create(RuntimeException.prototype);
ArithmeticException.prototype.constructor = ArithmeticException;
NullPointerException.prototype = Object.create(RuntimeException.prototype);
NullPointerException.prototype.constructor = NullPointerException;
NoWhenBranchMatchedException.prototype = Object.create(RuntimeException.prototype);
NoWhenBranchMatchedException.prototype.constructor = NoWhenBranchMatchedException;
ClassCastException.prototype = Object.create(RuntimeException.prototype);
ClassCastException.prototype.constructor = ClassCastException;
SyntaxException.prototype = Object.create(RuntimeException.prototype);
SyntaxException.prototype.constructor = SyntaxException;
Invalid.prototype = Object.create(LexicalNumber.prototype);
Invalid.prototype.constructor = Invalid;
Decimal.prototype = Object.create(LexicalNumber.prototype);
Decimal.prototype.constructor = Decimal;
Integer.prototype = Object.create(LexicalNumber.prototype);
Integer.prototype.constructor = Integer;
ArrayIndexOutOfBoundsException.prototype = Object.create(IndexOutOfBoundsException.prototype);
ArrayIndexOutOfBoundsException.prototype.constructor = ArrayIndexOutOfBoundsException;
SegmentedByteString.prototype = Object.create(ByteString.prototype);
SegmentedByteString.prototype.constructor = SegmentedByteString;
ArrayInsertInsn.prototype = Object.create(Insn.prototype);
ArrayInsertInsn.prototype.constructor = ArrayInsertInsn;
AssignInsn.prototype = Object.create(Insn.prototype);
AssignInsn.prototype.constructor = AssignInsn;
BinaryAddOperationInsn.prototype = Object.create(Insn.prototype);
BinaryAddOperationInsn.prototype.constructor = BinaryAddOperationInsn;
BinaryDivideOperationInsn.prototype = Object.create(Insn.prototype);
BinaryDivideOperationInsn.prototype.constructor = BinaryDivideOperationInsn;
BinaryEqualsOperationInsn.prototype = Object.create(Insn.prototype);
BinaryEqualsOperationInsn.prototype.constructor = BinaryEqualsOperationInsn;
BinaryGtOperationInsn.prototype = Object.create(Insn.prototype);
BinaryGtOperationInsn.prototype.constructor = BinaryGtOperationInsn;
BinaryGteOperationInsn.prototype = Object.create(Insn.prototype);
BinaryGteOperationInsn.prototype.constructor = BinaryGteOperationInsn;
BinaryInOperationInsn.prototype = Object.create(Insn.prototype);
BinaryInOperationInsn.prototype.constructor = BinaryInOperationInsn;
BinaryLtOperationInsn.prototype = Object.create(Insn.prototype);
BinaryLtOperationInsn.prototype.constructor = BinaryLtOperationInsn;
BinaryLteOperationInsn.prototype = Object.create(Insn.prototype);
BinaryLteOperationInsn.prototype.constructor = BinaryLteOperationInsn;
BinaryMultiplyOperationInsn.prototype = Object.create(Insn.prototype);
BinaryMultiplyOperationInsn.prototype.constructor = BinaryMultiplyOperationInsn;
BinaryNotEqualsOperationInsn.prototype = Object.create(Insn.prototype);
BinaryNotEqualsOperationInsn.prototype.constructor = BinaryNotEqualsOperationInsn;
BinaryRangeOperationInsn.prototype = Object.create(Insn.prototype);
BinaryRangeOperationInsn.prototype.constructor = BinaryRangeOperationInsn;
BinaryRemainingOperationInsn.prototype = Object.create(Insn.prototype);
BinaryRemainingOperationInsn.prototype.constructor = BinaryRemainingOperationInsn;
BinarySubtractOperationInsn.prototype = Object.create(Insn.prototype);
BinarySubtractOperationInsn.prototype.constructor = BinarySubtractOperationInsn;
BranchIfInsn.prototype = Object.create(Insn.prototype);
BranchIfInsn.prototype.constructor = BranchIfInsn;
BreakInsn.prototype = Object.create(Insn.prototype);
BreakInsn.prototype.constructor = BreakInsn;
ContinueInsn.prototype = Object.create(Insn.prototype);
ContinueInsn.prototype.constructor = ContinueInsn;
DeclareVariableInsn.prototype = Object.create(Insn.prototype);
DeclareVariableInsn.prototype.constructor = DeclareVariableInsn;
DupInsn.prototype = Object.create(Insn.prototype);
DupInsn.prototype.constructor = DupInsn;
GetMemberPropertyInsn.prototype = Object.create(Insn.prototype);
GetMemberPropertyInsn.prototype.constructor = GetMemberPropertyInsn;
GetSubscriptInsn.prototype = Object.create(Insn.prototype);
GetSubscriptInsn.prototype.constructor = GetSubscriptInsn;
GetVariableInsn.prototype = Object.create(Insn.prototype);
GetVariableInsn.prototype.constructor = GetVariableInsn;
Opcode.prototype = Object.create(Enum.prototype);
Opcode.prototype.constructor = Opcode;
ParameterlessCode.prototype = Object.create(Enum.prototype);
ParameterlessCode.prototype.constructor = ParameterlessCode;
InvokeInsn.prototype = Object.create(Insn.prototype);
InvokeInsn.prototype.constructor = InvokeInsn;
InvokeLocalInsn.prototype = Object.create(Insn.prototype);
InvokeLocalInsn.prototype.constructor = InvokeLocalInsn;
InvokeMemberInsn.prototype = Object.create(Insn.prototype);
InvokeMemberInsn.prototype.constructor = InvokeMemberInsn;
JumpInsn.prototype = Object.create(Insn.prototype);
JumpInsn.prototype.constructor = JumpInsn;
LoadDecimalInsn.prototype = Object.create(Insn.prototype);
LoadDecimalInsn.prototype.constructor = LoadDecimalInsn;
LoadIntegerInsn.prototype = Object.create(Insn.prototype);
LoadIntegerInsn.prototype.constructor = LoadIntegerInsn;
LoadStringInsn.prototype = Object.create(Insn.prototype);
LoadStringInsn.prototype.constructor = LoadStringInsn;
NewArrayInsn.prototype = Object.create(Insn.prototype);
NewArrayInsn.prototype.constructor = NewArrayInsn;
NewFunctionInsn.prototype = Object.create(Insn.prototype);
NewFunctionInsn.prototype.constructor = NewFunctionInsn;
NewObjectInsn.prototype = Object.create(Insn.prototype);
NewObjectInsn.prototype.constructor = NewObjectInsn;
ObjectInsertInsn.prototype = Object.create(Insn.prototype);
ObjectInsertInsn.prototype.constructor = ObjectInsertInsn;
PopExceptionHandlingInsn.prototype = Object.create(Insn.prototype);
PopExceptionHandlingInsn.prototype.constructor = PopExceptionHandlingInsn;
PopInsn.prototype = Object.create(Insn.prototype);
PopInsn.prototype.constructor = PopInsn;
PopLoopHandlingInsn.prototype = Object.create(Insn.prototype);
PopLoopHandlingInsn.prototype.constructor = PopLoopHandlingInsn;
PopScopeInsn.prototype = Object.create(Insn.prototype);
PopScopeInsn.prototype.constructor = PopScopeInsn;
PushBooleanInsn.prototype = Object.create(Insn.prototype);
PushBooleanInsn.prototype.constructor = PushBooleanInsn;
PushDecimalInsn.prototype = Object.create(Insn.prototype);
PushDecimalInsn.prototype.constructor = PushDecimalInsn;
PushExceptionHandlingInsn.prototype = Object.create(Insn.prototype);
PushExceptionHandlingInsn.prototype.constructor = PushExceptionHandlingInsn;
PushIntegerInsn.prototype = Object.create(Insn.prototype);
PushIntegerInsn.prototype.constructor = PushIntegerInsn;
PushLoopHandlingInsn.prototype = Object.create(Insn.prototype);
PushLoopHandlingInsn.prototype.constructor = PushLoopHandlingInsn;
PushNullInsn.prototype = Object.create(Insn.prototype);
PushNullInsn.prototype.constructor = PushNullInsn;
PushScopeInsn.prototype = Object.create(Insn.prototype);
PushScopeInsn.prototype.constructor = PushScopeInsn;
PushThisInsn.prototype = Object.create(Insn.prototype);
PushThisInsn.prototype.constructor = PushThisInsn;
ReturnInsn.prototype = Object.create(Insn.prototype);
ReturnInsn.prototype.constructor = ReturnInsn;
SetMemberPropertyInsn.prototype = Object.create(Insn.prototype);
SetMemberPropertyInsn.prototype.constructor = SetMemberPropertyInsn;
SetSubscriptInsn.prototype = Object.create(Insn.prototype);
SetSubscriptInsn.prototype.constructor = SetSubscriptInsn;
SetVariableInsn.prototype = Object.create(Insn.prototype);
SetVariableInsn.prototype.constructor = SetVariableInsn;
ThrowInsn.prototype = Object.create(Insn.prototype);
ThrowInsn.prototype.constructor = ThrowInsn;
TypeofInsn.prototype = Object.create(Insn.prototype);
TypeofInsn.prototype.constructor = TypeofInsn;
UnaryNegativeOperationInsn.prototype = Object.create(Insn.prototype);
UnaryNegativeOperationInsn.prototype.constructor = UnaryNegativeOperationInsn;
UnaryNotOperationInsn.prototype = Object.create(Insn.prototype);
UnaryNotOperationInsn.prototype.constructor = UnaryNotOperationInsn;
UnaryPositiveOperationInsn.prototype = Object.create(Insn.prototype);
UnaryPositiveOperationInsn.prototype.constructor = UnaryPositiveOperationInsn;
UnaryTruthOperationInsn.prototype = Object.create(Insn.prototype);
UnaryTruthOperationInsn.prototype.constructor = UnaryTruthOperationInsn;
LinNullPointerException.prototype = Object.create(NullPointerException.prototype);
LinNullPointerException.prototype.constructor = LinNullPointerException;
IllegalConstantIndexException.prototype = Object.create(RuntimeException.prototype);
IllegalConstantIndexException.prototype.constructor = IllegalConstantIndexException;
LinUnsupportedOperationException.prototype = Object.create(NoSuchElementException.prototype);
LinUnsupportedOperationException.prototype.constructor = LinUnsupportedOperationException;
StackUnderflowException.prototype = Object.create(NoSuchElementException.prototype);
StackUnderflowException.prototype.constructor = StackUnderflowException;
TokenType.prototype = Object.create(Enum.prototype);
TokenType.prototype.constructor = TokenType;
BinaryOperationType.prototype = Object.create(Enum.prototype);
BinaryOperationType.prototype.constructor = BinaryOperationType;
UnaryOperationType.prototype = Object.create(Enum.prototype);
UnaryOperationType.prototype.constructor = UnaryOperationType;
LAnyException.prototype = Object.create(RuntimeException.prototype);
LAnyException.prototype.constructor = LAnyException;
Returned.prototype = Object.create(LinResult.prototype);
Returned.prototype.constructor = Returned;
Thrown.prototype = Object.create(LinResult.prototype);
Thrown.prototype.constructor = Thrown;
Comparison.prototype = Object.create(Enum.prototype);
Comparison.prototype.constructor = Comparison;
GT.prototype = Object.create(Comparison.prototype);
GT.prototype.constructor = GT;
GTE.prototype = Object.create(Comparison.prototype);
GTE.prototype.constructor = GTE;
LT.prototype = Object.create(Comparison.prototype);
LT.prototype.constructor = LT;
LTE.prototype = Object.create(Comparison.prototype);
LTE.prototype.constructor = LTE;
MutableScope.prototype = Object.create(Scope.prototype);
MutableScope.prototype.constructor = MutableScope;
AbstractMutableScope.prototype = Object.create(MutableScope.prototype);
AbstractMutableScope.prototype.constructor = AbstractMutableScope;
DefaultMutableScope.prototype = Object.create(AbstractMutableScope.prototype);
DefaultMutableScope.prototype.constructor = DefaultMutableScope;
ImmutableMapScope.prototype = Object.create(Scope.prototype);
ImmutableMapScope.prototype.constructor = ImmutableMapScope;
LArray.prototype = Object.create(LAny.prototype);
LArray.prototype.constructor = LArray;
LFunction.prototype = Object.create(LAny.prototype);
LFunction.prototype.constructor = LFunction;
LCompiledFunction.prototype = Object.create(LFunction.prototype);
LCompiledFunction.prototype.constructor = LCompiledFunction;
LNumber.prototype = Object.create(LAny.prototype);
LNumber.prototype.constructor = LNumber;
LDecimal.prototype = Object.create(LNumber.prototype);
LDecimal.prototype.constructor = LDecimal;
LFalse.prototype = Object.create(LAny.prototype);
LFalse.prototype.constructor = LFalse;
LInteger.prototype = Object.create(LNumber.prototype);
LInteger.prototype.constructor = LInteger;
LNativeFunction.prototype = Object.create(LFunction.prototype);
LNativeFunction.prototype.constructor = LNativeFunction;
LNull.prototype = Object.create(LAny.prototype);
LNull.prototype.constructor = LNull;
LObject.prototype = Object.create(LAny.prototype);
LObject.prototype.constructor = LObject;
LRange.prototype = Object.create(LAny.prototype);
LRange.prototype.constructor = LRange;
LString.prototype = Object.create(LAny.prototype);
LString.prototype.constructor = LString;
LTrue.prototype = Object.create(LAny.prototype);
LTrue.prototype.constructor = LTrue;
function contains(_this_, element) {
return indexOf(_this_, element) >= 0;
}
function indexOf(_this_, element) {
if (element == null) {
var inductionVariable = 0;
var last_0 = _this_.length - 1 | 0;
if (inductionVariable <= last_0)
do {
var index = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
if (_this_[index] == null) {
return index;
}}
while (inductionVariable <= last_0);
} else {
var inductionVariable_0 = 0;
var last_1 = _this_.length - 1 | 0;
if (inductionVariable_0 <= last_1)
do {
var index_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
if (equals_0(element, _this_[index_0])) {
return index_0;
}}
while (inductionVariable_0 <= last_1);
}
return -1;
}
function _get_lastIndex_(_this_) {
return _this_.length - 1 | 0;
}
function joinToString(_this_, separator, prefix, postfix, limit, truncated, transform) {
return joinTo(_this_, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();
}
function joinToString$default(_this_, separator, prefix, postfix, limit, truncated, transform, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
separator = ', ';
if (!(($mask0 & 2) === 0))
prefix = '';
if (!(($mask0 & 4) === 0))
postfix = '';
if (!(($mask0 & 8) === 0))
limit = -1;
if (!(($mask0 & 16) === 0))
truncated = '...';
if (!(($mask0 & 32) === 0))
transform = null;
return joinToString(_this_, separator, prefix, postfix, limit, truncated, transform);
}
function joinTo(_this_, buffer, separator, prefix, postfix, limit, truncated, transform) {
buffer.append_v1o70a_k$(prefix);
Unit_getInstance();
var count = 0;
var indexedObject = _this_;
var inductionVariable = 0;
var last_0 = indexedObject.length;
$l$break: while (inductionVariable < last_0) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
count = count + 1 | 0;
if (count > 1) {
buffer.append_v1o70a_k$(separator);
Unit_getInstance();
} else {
}
if (limit < 0 ? true : count <= limit) {
appendElement(buffer, element, transform);
} else
break $l$break;
}
if (limit >= 0 ? count > limit : false) {
buffer.append_v1o70a_k$(truncated);
Unit_getInstance();
}buffer.append_v1o70a_k$(postfix);
Unit_getInstance();
return buffer;
}
function filterNotNull(_this_) {
return filterNotNullTo(_this_, ArrayList_init_$Create$());
}
function filterNotNullTo(_this_, destination) {
var indexedObject = _this_;
var inductionVariable = 0;
var last_0 = indexedObject.length;
while (inductionVariable < last_0) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
if (!(element == null)) {
destination.add_2bq_k$(element);
Unit_getInstance();
}}
return destination;
}
function joinToString_0(_this_, separator, prefix, postfix, limit, truncated, transform) {
return joinTo_0(_this_, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();
}
function joinToString$default_0(_this_, separator, prefix, postfix, limit, truncated, transform, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
separator = ', ';
if (!(($mask0 & 2) === 0))
prefix = '';
if (!(($mask0 & 4) === 0))
postfix = '';
if (!(($mask0 & 8) === 0))
limit = -1;
if (!(($mask0 & 16) === 0))
truncated = '...';
if (!(($mask0 & 32) === 0))
transform = null;
return joinToString_0(_this_, separator, prefix, postfix, limit, truncated, transform);
}
function single(_this_) {
var tmp0_subject = _this_;
if (isInterface(tmp0_subject, List))
return single_0(_this_);
else {
{
var iterator = _this_.iterator_0_k$();
if (!iterator.hasNext_0_k$())
throw NoSuchElementException_init_$Create$_0('Collection is empty.');
var single_1 = iterator.next_0_k$();
if (iterator.hasNext_0_k$())
throw IllegalArgumentException_init_$Create$('Collection has more than one element.');
return single_1;
}
}
}
function joinTo_0(_this_, buffer, separator, prefix, postfix, limit, truncated, transform) {
buffer.append_v1o70a_k$(prefix);
Unit_getInstance();
var count = 0;
var tmp0_iterator = _this_.iterator_0_k$();
$l$break: while (tmp0_iterator.hasNext_0_k$()) {
var element = tmp0_iterator.next_0_k$();
count = count + 1 | 0;
if (count > 1) {
buffer.append_v1o70a_k$(separator);
Unit_getInstance();
} else {
}
if (limit < 0 ? true : count <= limit) {
appendElement(buffer, element, transform);
} else
break $l$break;
}
if (limit >= 0 ? count > limit : false) {
buffer.append_v1o70a_k$(truncated);
Unit_getInstance();
}buffer.append_v1o70a_k$(postfix);
Unit_getInstance();
return buffer;
}
function single_0(_this_) {
var tmp0_subject = _this_._get_size__0_k$();
var tmp;
switch (tmp0_subject) {
case 0:
throw NoSuchElementException_init_$Create$_0('List is empty.');
case 1:
tmp = _this_.get_ha5a7z_k$(0);
break;
default:throw IllegalArgumentException_init_$Create$('List has more than one element.');
}
return tmp;
}
function asSequence(_this_) {
var tmp$ret$0;
$l$block: {
tmp$ret$0 = new _no_name_provided__1(_this_);
break $l$block;
}
return tmp$ret$0;
}
function toCollection(_this_, destination) {
var tmp0_iterator = _this_.iterator_0_k$();
while (tmp0_iterator.hasNext_0_k$()) {
var item = tmp0_iterator.next_0_k$();
destination.add_2bq_k$(item);
Unit_getInstance();
}
return destination;
}
function getOrNull(_this_, index) {
return (index >= 0 ? index <= _get_lastIndex__0(_this_) : false) ? _this_.get_ha5a7z_k$(index) : null;
}
function plus(_this_, element) {
var result = ArrayList_init_$Create$_0(_this_._get_size__0_k$() + 1 | 0);
result.addAll_dxd4eo_k$(_this_);
Unit_getInstance();
result.add_2bq_k$(element);
Unit_getInstance();
return result;
}
function first(_this_) {
if (_this_.isEmpty_0_k$())
throw NoSuchElementException_init_$Create$_0('List is empty.');
return _this_.get_ha5a7z_k$(0);
}
function lastOrNull(_this_) {
return _this_.isEmpty_0_k$() ? null : _this_.get_ha5a7z_k$(_this_._get_size__0_k$() - 1 | 0);
}
function reversed(_this_) {
var tmp;
if (isInterface(_this_, Collection)) {
tmp = _this_._get_size__0_k$() <= 1;
} else {
{
tmp = false;
}
}
if (tmp)
return toList(_this_);
else {
}
var list = toMutableList_0(_this_);
reverse(list);
return list;
}
function toMutableList(_this_) {
return ArrayList_init_$Create$_1(_this_);
}
function plus_0(_this_, elements) {
if (isInterface(elements, Collection)) {
var result = ArrayList_init_$Create$_0(_this_._get_size__0_k$() + elements._get_size__0_k$() | 0);
result.addAll_dxd4eo_k$(_this_);
Unit_getInstance();
result.addAll_dxd4eo_k$(elements);
Unit_getInstance();
return result;
} else {
{
var result_0 = ArrayList_init_$Create$_1(_this_);
addAll(result_0, elements);
Unit_getInstance();
return result_0;
}
}
}
function last(_this_) {
if (_this_.isEmpty_0_k$())
throw NoSuchElementException_init_$Create$_0('List is empty.');
return _this_.get_ha5a7z_k$(_get_lastIndex__0(_this_));
}
function toList(_this_) {
if (isInterface(_this_, Collection)) {
var tmp0_subject = _this_._get_size__0_k$();
var tmp;
switch (tmp0_subject) {
case 0:
tmp = emptyList();
break;
case 1:
var tmp_0;
if (isInterface(_this_, List)) {
tmp_0 = _this_.get_ha5a7z_k$(0);
} else {
{
tmp_0 = _this_.iterator_0_k$().next_0_k$();
}
}
tmp = listOf_0(tmp_0);
break;
default:tmp = toMutableList(_this_);
break;
}
return tmp;
} else {
}
return optimizeReadOnlyList(toMutableList_0(_this_));
}
function sortedWith(_this_, comparator) {
if (isInterface(_this_, Collection)) {
if (_this_._get_size__0_k$() <= 1)
return toList(_this_);
var tmp$ret$1;
$l$block_0: {
var tmp$ret$0;
$l$block: {
var tmp0_toTypedArray_0 = _this_;
tmp$ret$0 = copyToArray_0(tmp0_toTypedArray_0);
break $l$block;
}
var tmp = tmp$ret$0;
var tmp1_apply_0 = isArray(tmp) ? tmp : THROW_CCE();
{
}
{
sortWith_0(tmp1_apply_0, comparator);
}
tmp$ret$1 = tmp1_apply_0;
break $l$block_0;
}
return asList(tmp$ret$1);
} else {
}
var tmp$ret$2;
$l$block_1: {
var tmp2_apply_0 = toMutableList_0(_this_);
{
}
{
sortWith(tmp2_apply_0, comparator);
}
tmp$ret$2 = tmp2_apply_0;
break $l$block_1;
}
return tmp$ret$2;
}
function toMutableList_0(_this_) {
if (isInterface(_this_, Collection))
return toMutableList(_this_);
else {
}
return toCollection(_this_, ArrayList_init_$Create$());
}
function _no_name_provided__1($this_asSequence) {
this._$this_asSequence = $this_asSequence;
}
_no_name_provided__1.prototype.iterator_2_0_k$ = function () {
var tmp$ret$0;
$l$block: {
tmp$ret$0 = this._$this_asSequence.iterator_0_k$();
break $l$block;
}
return tmp$ret$0;
};
_no_name_provided__1.prototype.iterator_0_k$ = function () {
return this.iterator_2_0_k$();
};
_no_name_provided__1.$metadata$ = {
simpleName: '<no name provided>_1',
kind: 'class',
interfaces: [Sequence]
};
function asSequence_0(_this_) {
return asSequence(_this_._get_entries__0_k$());
}
function until(_this_, to_0) {
if (to_0 <= IntCompanionObject_getInstance()._MIN_VALUE)
return Companion_getInstance_6()._EMPTY;
return numberRangeToNumber(_this_, to_0 - 1 | 0);
}
function downTo(_this_, to_0) {
return Companion_getInstance_4().fromClosedRange_fcwjfj_k$(_this_, to_0, -1);
}
function coerceIn(_this_, minimumValue, maximumValue) {
if (minimumValue > maximumValue)
throw IllegalArgumentException_init_$Create$('' + 'Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.');
if (_this_ < minimumValue)
return minimumValue;
if (_this_ > maximumValue)
return maximumValue;
return _this_;
}
function coerceAtLeast(_this_, minimumValue) {
return _this_ < minimumValue ? minimumValue : _this_;
}
function coerceAtMost(_this_, maximumValue) {
return _this_ > maximumValue ? maximumValue : _this_;
}
function coerceIn_0(_this_, minimumValue, maximumValue) {
if (minimumValue.compareTo_wiekkq_k$(maximumValue) > 0)
throw IllegalArgumentException_init_$Create$('' + 'Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.');
if (_this_.compareTo_wiekkq_k$(minimumValue) < 0)
return minimumValue;
if (_this_.compareTo_wiekkq_k$(maximumValue) > 0)
return maximumValue;
return _this_;
}
function toList_0(_this_) {
return optimizeReadOnlyList(toMutableList_1(_this_));
}
function map(_this_, transform) {
return new TransformingSequence(_this_, transform);
}
function toMutableList_1(_this_) {
return toCollection_0(_this_, ArrayList_init_$Create$());
}
function toCollection_0(_this_, destination) {
var tmp0_iterator = _this_.iterator_0_k$();
while (tmp0_iterator.hasNext_0_k$()) {
var item = tmp0_iterator.next_0_k$();
destination.add_2bq_k$(item);
Unit_getInstance();
}
return destination;
}
function first_0(_this_) {
var tmp$ret$0;
$l$block: {
tmp$ret$0 = charSequenceLength(_this_) === 0;
break $l$block;
}
if (tmp$ret$0)
throw NoSuchElementException_init_$Create$_0('Char sequence is empty.');
else {
}
return charSequenceGet(_this_, 0);
}
function _no_name_provided_(this$0) {
this._this$0 = this$0;
}
_no_name_provided_.prototype.invoke_2bq_k$ = function (it) {
return it === this._this$0 ? '(this Collection)' : toString_0(it);
};
_no_name_provided_.prototype.invoke_20e8_k$ = function (p1) {
return this.invoke_2bq_k$((p1 == null ? true : isObject(p1)) ? p1 : THROW_CCE());
};
_no_name_provided_.$metadata$ = {
kind: 'class',
interfaces: []
};
function AbstractCollection() {
}
AbstractCollection.prototype.contains_2bq_k$ = function (element) {
var tmp$ret$0;
$l$block_2: {
var tmp;
if (isInterface(this, Collection)) {
tmp = this.isEmpty_0_k$();
} else {
{
tmp = false;
}
}
if (tmp) {
tmp$ret$0 = false;
break $l$block_2;
} else {
}
var tmp0_iterator_1 = this.iterator_0_k$();
while (tmp0_iterator_1.hasNext_0_k$()) {
var element_2 = tmp0_iterator_1.next_0_k$();
var tmp$ret$1;
$l$block_0: {
tmp$ret$1 = equals_0(element_2, element);
break $l$block_0;
}
if (tmp$ret$1) {
tmp$ret$0 = true;
break $l$block_2;
} else {
}
}
tmp$ret$0 = false;
break $l$block_2;
}
return tmp$ret$0;
};
AbstractCollection.prototype.containsAll_dxd4eo_k$ = function (elements) {
var tmp$ret$0;
$l$block_2: {
var tmp;
if (isInterface(elements, Collection)) {
tmp = elements.isEmpty_0_k$();
} else {
{
tmp = false;
}
}
if (tmp) {
tmp$ret$0 = true;
break $l$block_2;
} else {
}
var tmp0_iterator_1 = elements.iterator_0_k$();
while (tmp0_iterator_1.hasNext_0_k$()) {
var element_2 = tmp0_iterator_1.next_0_k$();
var tmp$ret$1;
$l$block_0: {
tmp$ret$1 = this.contains_2bq_k$(element_2);
break $l$block_0;
}
if (!tmp$ret$1) {
tmp$ret$0 = false;
break $l$block_2;
} else {
}
}
tmp$ret$0 = true;
break $l$block_2;
}
return tmp$ret$0;
};
AbstractCollection.prototype.isEmpty_0_k$ = function () {
return this._get_size__0_k$() === 0;
};
AbstractCollection.prototype.toString = function () {
return joinToString$default_0(this, ', ', '[', ']', 0, null, _no_name_provided_$factory(this), 24, null);
};
AbstractCollection.prototype.toArray = function () {
return copyToArrayImpl_0(this);
};
AbstractCollection.$metadata$ = {
simpleName: 'AbstractCollection',
kind: 'class',
interfaces: [Collection]
};
function _no_name_provided_$factory(this$0) {
var i = new _no_name_provided_(this$0);
return function (p1) {
return i.invoke_2bq_k$(p1);
};
}
function IteratorImpl($outer) {
this._$this = $outer;
this._index = 0;
}
IteratorImpl.prototype.hasNext_0_k$ = function () {
return this._index < this._$this._get_size__0_k$();
};
IteratorImpl.prototype.next_0_k$ = function () {
if (!this.hasNext_0_k$())
throw NoSuchElementException_init_$Create$();
var tmp0_this = this;
var tmp1 = tmp0_this._index;
tmp0_this._index = tmp1 + 1 | 0;
return this._$this.get_ha5a7z_k$(tmp1);
};
IteratorImpl.$metadata$ = {
simpleName: 'IteratorImpl',
kind: 'class',
interfaces: [Iterator]
};
function Companion_0() {
Companion_instance = this;
}
Companion_0.prototype.checkElementIndex_rvwcgf_k$ = function (index, size) {
if (index < 0 ? true : index >= size) {
throw IndexOutOfBoundsException_init_$Create$('' + 'index: ' + index + ', size: ' + size);
}};
Companion_0.prototype.checkPositionIndex_rvwcgf_k$ = function (index, size) {
if (index < 0 ? true : index > size) {
throw IndexOutOfBoundsException_init_$Create$('' + 'index: ' + index + ', size: ' + size);
}};
Companion_0.prototype.checkRangeIndexes_zd700_k$ = function (fromIndex, toIndex, size) {
if (fromIndex < 0 ? true : toIndex > size) {
throw IndexOutOfBoundsException_init_$Create$('' + 'fromIndex: ' + fromIndex + ', toIndex: ' + toIndex + ', size: ' + size);
}if (fromIndex > toIndex) {
throw IllegalArgumentException_init_$Create$('' + 'fromIndex: ' + fromIndex + ' > toIndex: ' + toIndex);
}};
Companion_0.prototype.checkBoundsIndexes_zd700_k$ = function (startIndex, endIndex, size) {
if (startIndex < 0 ? true : endIndex > size) {
throw IndexOutOfBoundsException_init_$Create$('' + 'startIndex: ' + startIndex + ', endIndex: ' + endIndex + ', size: ' + size);
}if (startIndex > endIndex) {
throw IllegalArgumentException_init_$Create$('' + 'startIndex: ' + startIndex + ' > endIndex: ' + endIndex);
}};
Companion_0.prototype.orderedHashCode_dxd51x_k$ = function (c) {
var hashCode_1 = 1;
var tmp0_iterator = c.iterator_0_k$();
while (tmp0_iterator.hasNext_0_k$()) {
var e = tmp0_iterator.next_0_k$();
var tmp = imul(31, hashCode_1);
var tmp1_safe_receiver = e;
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : hashCode(tmp1_safe_receiver);
hashCode_1 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;
}
return hashCode_1;
};
Companion_0.prototype.orderedEquals_tuq55s_k$ = function (c, other) {
if (!(c._get_size__0_k$() === other._get_size__0_k$()))
return false;
var otherIterator = other.iterator_0_k$();
var tmp0_iterator = c.iterator_0_k$();
while (tmp0_iterator.hasNext_0_k$()) {
var elem = tmp0_iterator.next_0_k$();
var elemOther = otherIterator.next_0_k$();
if (!equals_0(elem, elemOther)) {
return false;
}}
return true;
};
Companion_0.$metadata$ = {
simpleName: 'Companion',
kind: 'object',
interfaces: []
};
var Companion_instance;
function Companion_getInstance() {
if (Companion_instance == null)
new Companion_0();
return Companion_instance;
}
function AbstractList() {
Companion_getInstance();
AbstractCollection.call(this);
}
AbstractList.prototype.iterator_0_k$ = function () {
return new IteratorImpl(this);
};
AbstractList.prototype.equals = function (other) {
if (other === this)
return true;
if (!(!(other == null) ? isInterface(other, List) : false))
return false;
else {
}
return Companion_getInstance().orderedEquals_tuq55s_k$(this, other);
};
AbstractList.prototype.hashCode = function () {
return Companion_getInstance().orderedHashCode_dxd51x_k$(this);
};
AbstractList.$metadata$ = {
simpleName: 'AbstractList',
kind: 'class',
interfaces: [List]
};
function toString($this, o) {
return o === $this ? '(this Map)' : toString_0(o);
}
function implFindEntry($this, key) {
var tmp$ret$1;
$l$block_1: {
var tmp0_firstOrNull_0 = $this._get_entries__0_k$();
var tmp0_iterator_1 = tmp0_firstOrNull_0.iterator_0_k$();
while (tmp0_iterator_1.hasNext_0_k$()) {
var element_2 = tmp0_iterator_1.next_0_k$();
var tmp$ret$0;
$l$block: {
tmp$ret$0 = equals_0(element_2._get_key__0_k$(), key);
break $l$block;
}
if (tmp$ret$0) {
tmp$ret$1 = element_2;
break $l$block_1;
} else {
}
}
tmp$ret$1 = null;
break $l$block_1;
}
return tmp$ret$1;
}
function Companion_1() {
Companion_instance_0 = this;
}
Companion_1.prototype.entryHashCode_4vm2wp_k$ = function (e) {
var tmp$ret$1;
$l$block_0: {
{
}
var tmp$ret$0;
$l$block: {
var tmp2_safe_receiver_4 = e._get_key__0_k$();
var tmp3_elvis_lhs_3 = tmp2_safe_receiver_4 == null ? null : hashCode(tmp2_safe_receiver_4);
var tmp = tmp3_elvis_lhs_3 == null ? 0 : tmp3_elvis_lhs_3;
var tmp0_safe_receiver_6 = e._get_value__0_k$();
var tmp1_elvis_lhs_5 = tmp0_safe_receiver_6 == null ? null : hashCode(tmp0_safe_receiver_6);
tmp$ret$0 = tmp ^ (tmp1_elvis_lhs_5 == null ? 0 : tmp1_elvis_lhs_5);
break $l$block;
}
tmp$ret$1 = tmp$ret$0;
break $l$block_0;
}
return tmp$ret$1;
};
Companion_1.prototype.entryToString_4vm2wp_k$ = function (e) {
var tmp$ret$1;
$l$block_0: {
{
}
var tmp$ret$0;
$l$block: {
tmp$ret$0 = '' + e._get_key__0_k$() + '=' + e._get_value__0_k$();
break $l$block;
}
tmp$ret$1 = tmp$ret$0;
break $l$block_0;
}
return tmp$ret$1;
};
Companion_1.prototype.entryEquals_caydzc_k$ = function (e, other) {
if (!(!(other == null) ? isInterface(other, Entry) : false))
return false;
else {
}
return equals_0(e._get_key__0_k$(), other._get_key__0_k$()) ? equals_0(e._get_value__0_k$(), other._get_value__0_k$()) : false;
};
Companion_1.$metadata$ = {
simpleName: 'Companion',
kind: 'object',
interfaces: []
};
var Companion_instance_0;
function Companion_getInstance_0() {
if (Companion_instance_0 == null)
new Companion_1();
return Companion_instance_0;
}
function _no_name_provided__0(this$0) {
this._this$0_0 = this$0;
}
_no_name_provided__0.prototype.invoke_4v0zae_k$ = function (it) {
return this._this$0_0.toString_4v0zae_k$(it);
};
_no_name_provided__0.prototype.invoke_20e8_k$ = function (p1) {
return this.invoke_4v0zae_k$((!(p1 == null) ? isInterface(p1, Entry) : false) ? p1 : THROW_CCE());
};
_no_name_provided__0.$metadata$ = {
kind: 'class',
interfaces: []
};
function AbstractMap() {
Companion_getInstance_0();
this.__keys = null;
this.__values = null;
}
AbstractMap.prototype.containsKey_2bw_k$ = function (key) {
return !(implFindEntry(this, key) == null);
};
AbstractMap.prototype.containsEntry_7gsh9e_k$ = function (entry) {
if (!(!(entry == null) ? isInterface(entry, Entry) : false))
return false;
else {
}
var key = entry._get_key__0_k$();
var value = entry._get_value__0_k$();
var tmp$ret$0;
$l$block: {
tmp$ret$0 = (isInterface(this, Map_0) ? this : THROW_CCE()).get_2bw_k$(key);
break $l$block;
}
var ourValue = tmp$ret$0;
if (!equals_0(value, ourValue)) {
return false;
}var tmp;
if (ourValue == null) {
var tmp$ret$1;
$l$block_0: {
tmp$ret$1 = (isInterface(this, Map_0) ? this : THROW_CCE()).containsKey_2bw_k$(key);
break $l$block_0;
}
tmp = !tmp$ret$1;
} else {
tmp = false;
}
if (tmp) {
return false;
} else {
}
return true;
};
AbstractMap.prototype.equals = function (other) {
if (other === this)
return true;
if (!(!(other == null) ? isInterface(other, Map_0) : false))
return false;
else {
}
if (!(this._get_size__0_k$() === other._get_size__0_k$()))
return false;
var tmp$ret$0;
$l$block_2: {
var tmp0_all_0 = other._get_entries__0_k$();
var tmp;
if (isInterface(tmp0_all_0, Collection)) {
tmp = tmp0_all_0.isEmpty_0_k$();
} else {
{
tmp = false;
}
}
if (tmp) {
tmp$ret$0 = true;
break $l$block_2;
} else {
}
var tmp0_iterator_1 = tmp0_all_0.iterator_0_k$();
while (tmp0_iterator_1.hasNext_0_k$()) {
var element_2 = tmp0_iterator_1.next_0_k$();
var tmp$ret$1;
$l$block_0: {
tmp$ret$1 = this.containsEntry_7gsh9e_k$(element_2);
break $l$block_0;
}
if (!tmp$ret$1) {
tmp$ret$0 = false;
break $l$block_2;
} else {
}
}
tmp$ret$0 = true;
break $l$block_2;
}
return tmp$ret$0;
};
AbstractMap.prototype.get_2bw_k$ = function (key) {
var tmp0_safe_receiver = implFindEntry(this, key);
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver._get_value__0_k$();
};
AbstractMap.prototype.hashCode = function () {
return hashCode(this._get_entries__0_k$());
};
AbstractMap.prototype.isEmpty_0_k$ = function () {
return this._get_size__0_k$() === 0;
};
AbstractMap.prototype._get_size__0_k$ = function () {
return this._get_entries__0_k$()._get_size__0_k$();
};
AbstractMap.prototype.toString = function () {
var tmp = this._get_entries__0_k$();
return joinToString$default_0(tmp, ', ', '{', '}', 0, null, _no_name_provided_$factory_0(this), 24, null);
};
AbstractMap.prototype.toString_4v0zae_k$ = function (entry) {
return toString(this, entry._get_key__0_k$()) + '=' + toString(this, entry._get_value__0_k$());
};
AbstractMap.$metadata$ = {
simpleName: 'AbstractMap',
kind: 'class',
interfaces: [Map_0]
};
function _no_name_provided_$factory_0(this$0) {
var i = new _no_name_provided__0(this$0);
return function (p1) {
return i.invoke_4v0zae_k$(p1);
};
}
function Companion_2() {
Companion_instance_1 = this;
}
Companion_2.prototype.unorderedHashCode_dxd51x_k$ = function (c) {
var hashCode_1 = 0;
var tmp0_iterator = c.iterator_0_k$();
while (tmp0_iterator.hasNext_0_k$()) {
var element = tmp0_iterator.next_0_k$();
var tmp = hashCode_1;
var tmp1_safe_receiver = element;
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : hashCode(tmp1_safe_receiver);
hashCode_1 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;
}
return hashCode_1;
};
Companion_2.prototype.setEquals_qlktm2_k$ = function (c, other) {
if (!(c._get_size__0_k$() === other._get_size__0_k$()))
return false;
var tmp$ret$0;
$l$block: {
tmp$ret$0 = c.containsAll_dxd4eo_k$(other);
break $l$block;
}
return tmp$ret$0;
};
Companion_2.$metadata$ = {
simpleName: 'Companion',
kind: 'object',
interfaces: []
};
var Companion_instance_1;
function Companion_getInstance_1() {
if (Companion_instance_1 == null)
new Companion_2();
return Companion_instance_1;
}
function listOf(elements) {
return elements.length > 0 ? asList(elements) : emptyList();
}
function emptyList() {
return EmptyList_getInstance();
}
function ArrayAsCollection(values, isVarargs) {
this._values = values;
this._isVarargs = isVarargs;
}
ArrayAsCollection.prototype._get_size__0_k$ = function () {
return this._values.length;
};
ArrayAsCollection.prototype.isEmpty_0_k$ = function () {
var tmp$ret$0;
$l$block: {
var tmp0_isEmpty_0 = this._values;
tmp$ret$0 = tmp0_isEmpty_0.length === 0;
break $l$block;
}
return tmp$ret$0;
};
ArrayAsCollection.prototype.contains_2c5_k$ = function (element) {
return contains(this._values, element);
};
ArrayAsCollection.prototype.containsAll_dxd41r_k$ = function (elements) {
var tmp$ret$0;
$l$block_2: {
var tmp;
if (isInterface(elements, Collection)) {
tmp = elements.isEmpty_0_k$();
} else {
{
tmp = false;
}
}
if (tmp) {
tmp$ret$0 = true;
break $l$block_2;
} else {
}
var tmp0_iterator_1 = elements.iterator_0_k$();
while (tmp0_iterator_1.hasNext_0_k$()) {
var element_2 = tmp0_iterator_1.next_0_k$();
var tmp$ret$1;
$l$block_0: {
tmp$ret$1 = this.contains_2c5_k$(element_2);
break $l$block_0;
}
if (!tmp$ret$1) {
tmp$ret$0 = false;
break $l$block_2;
} else {
}
}
tmp$ret$0 = true;
break $l$block_2;
}
return tmp$ret$0;
};
ArrayAsCollection.prototype.containsAll_dxd4eo_k$ = function (elements) {
return this.containsAll_dxd41r_k$(elements);
};
ArrayAsCollection.prototype.iterator_0_k$ = function () {
return arrayIterator(this._values);
};
ArrayAsCollection.$metadata$ = {
simpleName: 'ArrayAsCollection',
kind: 'class',
interfaces: [Collection]
};
function rangeCheck(size, fromIndex, toIndex) {
if (fromIndex > toIndex)
throw IllegalArgumentException_init_$Create$('' + 'fromIndex (' + fromIndex + ') is greater than toIndex (' + toIndex + ').');
else if (fromIndex < 0)
throw IndexOutOfBoundsException_init_$Create$('' + 'fromIndex (' + fromIndex + ') is less than zero.');
else if (toIndex > size)
throw IndexOutOfBoundsException_init_$Create$('' + 'toIndex (' + toIndex + ') is greater than size (' + size + ').');
}
function EmptyList() {
EmptyList_instance = this;
this._serialVersionUID = new Long(-1478467534, -1720727600);
}
EmptyList.prototype.equals = function (other) {
var tmp;
if (!(other == null) ? isInterface(other, List) : false) {
tmp = other.isEmpty_0_k$();
} else {
{
tmp = false;
}
}
return tmp;
};
EmptyList.prototype.hashCode = function () {
return 1;
};
EmptyList.prototype.toString = function () {
return '[]';
};
EmptyList.prototype._get_size__0_k$ = function () {
return 0;
};
EmptyList.prototype.isEmpty_0_k$ = function () {
return true;
};
EmptyList.prototype.containsAll_lwol4p_k$ = function (elements) {
return elements.isEmpty_0_k$();
};
EmptyList.prototype.containsAll_dxd4eo_k$ = function (elements) {
return this.containsAll_lwol4p_k$(elements);
};
EmptyList.prototype.get_ha5a7z_k$ = function (index) {
throw IndexOutOfBoundsException_init_$Create$('' + "Empty list doesn't contain element at index " + index + '.');
};
EmptyList.prototype.iterator_0_k$ = function () {
return EmptyIterator_getInstance();
};
EmptyList.$metadata$ = {
simpleName: 'EmptyList',
kind: 'object',
interfaces: [List, Serializable, RandomAccess]
};
var EmptyList_instance;
function EmptyList_getInstance() {
if (EmptyList_instance == null)
new EmptyList();
return EmptyList_instance;
}
function EmptyIterator() {
EmptyIterator_instance = this;
}
EmptyIterator.prototype.hasNext_0_k$ = function () {
return false;
};
EmptyIterator.prototype.next_0_k$ = function () {
throw NoSuchElementException_init_$Create$();
};
EmptyIterator.$metadata$ = {
simpleName: 'EmptyIterator',
kind: 'object',
interfaces: [ListIterator]
};
var EmptyIterator_instance;
function EmptyIterator_getInstance() {
if (EmptyIterator_instance == null)
new EmptyIterator();
return EmptyIterator_instance;
}
function _get_lastIndex__0(_this_) {
return _this_._get_size__0_k$() - 1 | 0;
}
function optimizeReadOnlyList(_this_) {
var tmp0_subject = _this_._get_size__0_k$();
switch (tmp0_subject) {
case 0:
return emptyList();
case 1:
return listOf_0(_this_.get_ha5a7z_k$(0));
default:return _this_;
}
}
function arrayListOf(elements) {
return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));
}
function throwIndexOverflow() {
throw ArithmeticException_init_$Create$('Index overflow has happened.');
}
function listOfNotNull(elements) {
return