(function (factory) {
if (typeof define === 'function' && define.amd)
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
else if (typeof exports === 'object')
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
else {
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
throw new Error("Error loading module 'kojak'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kojak'.");
}
globalThis.kojak = factory(typeof kojak === 'undefined' ? {} : kojak, globalThis['kotlin-kotlin-stdlib']);
}
}(function (_, kotlin_kotlin) {
'use strict';
//region block: imports
var imul = Math.imul;
var equals = kotlin_kotlin.$_$.j4;
var KtList = kotlin_kotlin.$_$.q1;
var isInterface = kotlin_kotlin.$_$.v4;
var protoOf = kotlin_kotlin.$_$.d5;
var THROW_CCE = kotlin_kotlin.$_$.n6;
var initMetadataForClass = kotlin_kotlin.$_$.q4;
var VOID = kotlin_kotlin.$_$.c;
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.x6;
var Unit_instance = kotlin_kotlin.$_$.o1;
var initMetadataForObject = kotlin_kotlin.$_$.u4;
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
var objectCreate = kotlin_kotlin.$_$.c5;
var toMutableList = kotlin_kotlin.$_$.c3;
var hashCode = kotlin_kotlin.$_$.p4;
var getKClassFromExpression = kotlin_kotlin.$_$.a;
var getStringHashCode = kotlin_kotlin.$_$.o4;
var toInt = kotlin_kotlin.$_$.b6;
var toDouble = kotlin_kotlin.$_$.a6;
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.i;
var initMetadataForCompanion = kotlin_kotlin.$_$.r4;
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.c1;
var toString = kotlin_kotlin.$_$.f1;
var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.d1;
var charArray = kotlin_kotlin.$_$.e4;
var concatToString = kotlin_kotlin.$_$.m5;
var toInt_0 = kotlin_kotlin.$_$.c6;
var numberToChar = kotlin_kotlin.$_$.y4;
var concatToString_0 = kotlin_kotlin.$_$.n5;
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s;
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.m;
var charArrayOf = kotlin_kotlin.$_$.d4;
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.b1;
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.e1;
var charSequenceGet = kotlin_kotlin.$_$.f4;
var toCharArray = kotlin_kotlin.$_$.y5;
var initMetadataForInterface = kotlin_kotlin.$_$.s4;
var Exception = kotlin_kotlin.$_$.i6;
var Exception_init_$Init$ = kotlin_kotlin.$_$.p;
var captureStack = kotlin_kotlin.$_$.c4;
var defineProp = kotlin_kotlin.$_$.i4;
var lazy = kotlin_kotlin.$_$.u6;
var KProperty1 = kotlin_kotlin.$_$.l5;
var getPropertyCallableRef = kotlin_kotlin.$_$.n4;
//endregion
//region block: pre-declaration
initMetadataForClass(ImmutableList, 'ImmutableList', VOID, VOID, [KtList]);
initMetadataForClass(JsonHandler, 'JsonHandler');
initMetadataForClass(DefaultHandler, 'DefaultHandler', DefaultHandler, JsonHandler);
initMetadataForObject(Json, 'Json');
initMetadataForClass(JsonArray$iterator$1);
initMetadataForClass(JsonValue, 'JsonValue');
initMetadataForClass(JsonArray, 'JsonArray', JsonArray_init_$Create$, JsonValue);
initMetadataForClass(JsonLiteral, 'JsonLiteral', VOID, JsonValue);
initMetadataForClass(JsonNumber, 'JsonNumber', VOID, JsonValue);
initMetadataForClass(Member, 'Member');
initMetadataForClass(JsonObject$iterator$1);
initMetadataForClass(JsonObject, 'JsonObject', JsonObject, JsonValue);
initMetadataForCompanion(Companion);
initMetadataForClass(JsonParser, 'JsonParser');
initMetadataForClass(JsonString, 'JsonString', VOID, JsonValue);
initMetadataForCompanion(Companion_0);
initMetadataForClass(JsonWriter, 'JsonWriter');
initMetadataForClass(Location, 'Location');
initMetadataForClass(MPPStringReader, 'MPPStringReader');
function write(charArray) {
this.z3q(charArray, 0, charArray.length);
}
initMetadataForInterface(MPPWriter, 'MPPWriter');
initMetadataForClass(MPPStringWriter, 'MPPStringWriter', MPPStringWriter, VOID, [MPPWriter]);
initMetadataForClass(ParseException, 'ParseException', VOID, Exception);
initMetadataForCompanion(Companion_1);
initMetadataForClass(PrettyPrintWriter, 'PrettyPrintWriter', VOID, JsonWriter);
initMetadataForClass(WriterConfig, 'WriterConfig');
initMetadataForClass(PrettyPrint, 'PrettyPrint', VOID, WriterConfig);
initMetadataForClass(WriterConfig$Companion$MINIMAL$2$1, VOID, VOID, WriterConfig);
initMetadataForCompanion(Companion_2);
//endregion
function ImmutableList(protectedList) {
this.m3m_1 = protectedList;
}
protoOf(ImmutableList).equals = function (other) {
if (!(other == null) ? isInterface(other, KtList) : false) {
return equals(other, this.m3m_1);
}
return false;
};
protoOf(ImmutableList).l = function () {
return this.m3m_1.l();
};
protoOf(ImmutableList).fc = function (element) {
return this.m3m_1.o1(element);
};
protoOf(ImmutableList).o1 = function (element) {
if (!(element == null ? true : !(element == null)))
return false;
return this.fc((element == null ? true : !(element == null)) ? element : THROW_CCE());
};
protoOf(ImmutableList).g = function () {
return this.m3m_1.g();
};
protoOf(ImmutableList).k = function (index) {
return this.m3m_1.k(index);
};
protoOf(ImmutableList).yh = function (element) {
return this.m3m_1.p1(element);
};
protoOf(ImmutableList).p1 = function (element) {
if (!(element == null ? true : !(element == null)))
return -1;
return this.yh((element == null ? true : !(element == null)) ? element : THROW_CCE());
};
protoOf(ImmutableList).q1 = function (index) {
return this.m3m_1.q1(index);
};
protoOf(ImmutableList).v = function (fromIndex, toIndex) {
return this.m3m_1.v(fromIndex, toIndex);
};
protoOf(ImmutableList).j = function () {
return this.m3m_1.j();
};
function DefaultHandler() {
JsonHandler.call(this);
}
protoOf(DefaultHandler).t1 = function () {
var tmp = this.o3m_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('value');
}
};
protoOf(DefaultHandler).p3m = function () {
return JsonArray_init_$Create$();
};
protoOf(DefaultHandler).q3m = function () {
return new JsonObject();
};
protoOf(DefaultHandler).r3m = function () {
this.o3m_1 = Json_getInstance().s3m_1;
};
protoOf(DefaultHandler).v3m = function (value) {
this.o3m_1 = value ? Json_getInstance().t3m_1 : Json_getInstance().u3m_1;
};
protoOf(DefaultHandler).w3m = function (string) {
this.o3m_1 = new JsonString(string);
};
protoOf(DefaultHandler).x3m = function (string) {
this.o3m_1 = new JsonNumber(string);
};
protoOf(DefaultHandler).y3m = function (array) {
this.o3m_1 = array;
};
protoOf(DefaultHandler).z3m = function (array) {
return this.y3m(array instanceof JsonArray ? array : THROW_CCE());
};
protoOf(DefaultHandler).a3n = function (obj) {
this.o3m_1 = obj;
};
protoOf(DefaultHandler).b3n = function (obj) {
return this.a3n(obj instanceof JsonObject ? obj : THROW_CCE());
};
protoOf(DefaultHandler).c3n = function (array) {
array.e3n(this.t1());
};
protoOf(DefaultHandler).f3n = function (array) {
return this.c3n(array instanceof JsonArray ? array : THROW_CCE());
};
protoOf(DefaultHandler).g3n = function (obj, name) {
obj.k3n(name, this.t1());
};
protoOf(DefaultHandler).l3n = function (obj, name) {
return this.g3n(obj instanceof JsonObject ? obj : THROW_CCE(), name);
};
function Json() {
Json_instance = this;
this.s3m_1 = new JsonLiteral('null');
this.t3m_1 = new JsonLiteral('true');
this.u3m_1 = new JsonLiteral('false');
}
protoOf(Json).v3n = function (string) {
var handler = new DefaultHandler();
this.w3n(string, handler);
return handler.t1();
};
protoOf(Json).w3n = function (string, handler) {
var tmp2 = Companion_instance.y3n_1;
var tmp0 = Companion_instance.z3n_1;
// Inline function 'kotlin.math.min' call
var b = string.length;
// Inline function 'kotlin.math.max' call
var b_0 = Math.min(tmp0, b);
var bufferSize = Math.max(tmp2, b_0);
(new JsonParser(handler, new MPPStringReader(string), bufferSize)).o3o();
};
var Json_instance;
function Json_getInstance() {
if (Json_instance == null)
new Json();
return Json_instance;
}
function JsonArray_init_$Init$($this) {
// Inline function 'kotlin.collections.mutableListOf' call
var tmp$ret$0 = ArrayList_init_$Create$();
JsonArray.call($this, tmp$ret$0);
return $this;
}
function JsonArray_init_$Create$() {
return JsonArray_init_$Init$(objectCreate(protoOf(JsonArray)));
}
function JsonArray$iterator$1($iterator) {
this.p3o_1 = $iterator;
}
protoOf(JsonArray$iterator$1).h = function () {
return this.p3o_1.h();
};
protoOf(JsonArray$iterator$1).i = function () {
return this.p3o_1.i();
};
function JsonArray(values) {
JsonValue.call(this);
this.d3n_1 = toMutableList(values);
}
protoOf(JsonArray).e3n = function (value) {
this.d3n_1.e(value);
return this;
};
protoOf(JsonArray).q3o = function () {
return new ImmutableList(this.d3n_1);
};
protoOf(JsonArray).g = function () {
var iterator = this.d3n_1.g();
return new JsonArray$iterator$1(iterator);
};
protoOf(JsonArray).r3o = function (writer) {
writer.t3o();
var iterator = this.g();
if (iterator.h()) {
iterator.i().r3o(writer);
while (iterator.h()) {
writer.u3o();
iterator.i().r3o(writer);
}
}
writer.v3o();
};
protoOf(JsonArray).hashCode = function () {
return hashCode(this.d3n_1);
};
protoOf(JsonArray).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof JsonArray))
return false;
if (!getKClassFromExpression(other).equals(getKClassFromExpression(this)))
return false;
return equals(this.d3n_1, other.d3n_1);
};
function JsonHandler() {
}
protoOf(JsonHandler).n3n = function () {
};
protoOf(JsonHandler).r3m = function () {
};
protoOf(JsonHandler).o3n = function () {
};
protoOf(JsonHandler).v3m = function (value) {
};
protoOf(JsonHandler).p3n = function () {
};
protoOf(JsonHandler).w3m = function (string) {
};
protoOf(JsonHandler).q3n = function () {
};
protoOf(JsonHandler).x3m = function (string) {
};
protoOf(JsonHandler).z3m = function (array) {
};
protoOf(JsonHandler).r3n = function (array) {
};
protoOf(JsonHandler).f3n = function (array) {
};
protoOf(JsonHandler).b3n = function (obj) {
};
protoOf(JsonHandler).s3n = function (obj) {
};
protoOf(JsonHandler).t3n = function (obj, name) {
};
protoOf(JsonHandler).u3n = function (obj, name) {
};
protoOf(JsonHandler).l3n = function (obj, name) {
};
function JsonLiteral(value) {
JsonValue.call(this);
this.d3p_1 = value;
}
protoOf(JsonLiteral).r3o = function (writer) {
writer.e3p(this.d3p_1);
};
protoOf(JsonLiteral).a3p = function () {
return this.g3p() ? protoOf(JsonValue).a3p.call(this) : this.f3p();
};
protoOf(JsonLiteral).g3p = function () {
return this.d3p_1 === 'null';
};
protoOf(JsonLiteral).f3p = function () {
return this.d3p_1 === 'true';
};
protoOf(JsonLiteral).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
var tmp;
if (other instanceof JsonLiteral) {
tmp = other.d3p_1 === this.d3p_1;
} else {
tmp = false;
}
return tmp;
};
protoOf(JsonLiteral).hashCode = function () {
return getStringHashCode(this.d3p_1);
};
function JsonNumber(string) {
JsonValue.call(this);
this.h3p_1 = string;
}
protoOf(JsonNumber).r3o = function (writer) {
writer.i3p(this.h3p_1);
};
protoOf(JsonNumber).x3o = function () {
return toInt(this.h3p_1);
};
protoOf(JsonNumber).y3o = function () {
// Inline function 'kotlin.text.toFloat' call
var this_0 = this.h3p_1;
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
return toDouble(this_0);
};
protoOf(JsonNumber).hashCode = function () {
return getStringHashCode(this.h3p_1);
};
protoOf(JsonNumber).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof JsonNumber))
return false;
if (!getKClassFromExpression(other).equals(getKClassFromExpression(this)))
return false;
return equals(this.h3p_1, other.h3p_1);
};
function Member(name, value) {
this.j3p_1 = name;
this.k3p_1 = value;
}
protoOf(Member).hashCode = function () {
var result = 1;
result = imul(31, result) + getStringHashCode(this.j3p_1) | 0;
result = imul(31, result) + hashCode(this.k3p_1) | 0;
return result;
};
protoOf(Member).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof Member))
return false;
if (!getKClassFromExpression(other).equals(getKClassFromExpression(this)))
return false;
return this.j3p_1 === other.j3p_1 && this.k3p_1.equals(other.k3p_1);
};
function JsonObject$iterator$1($namesIterator, $valuesIterator) {
this.l3p_1 = $namesIterator;
this.m3p_1 = $valuesIterator;
}
protoOf(JsonObject$iterator$1).h = function () {
return this.l3p_1.h();
};
protoOf(JsonObject$iterator$1).i = function () {
var name = this.l3p_1.i();
var value = this.m3p_1.i();
return new Member(name, value);
};
function JsonObject() {
JsonValue.call(this);
var tmp = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp.h3n_1 = ArrayList_init_$Create$();
var tmp_0 = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp_0.i3n_1 = ArrayList_init_$Create$();
var tmp_1 = this;
// Inline function 'kotlin.collections.mutableMapOf' call
tmp_1.j3n_1 = LinkedHashMap_init_$Create$();
}
protoOf(JsonObject).k3n = function (name, value) {
var tmp0 = this.j3n_1;
// Inline function 'kotlin.collections.set' call
var value_0 = this.h3n_1.j();
tmp0.f4(name, value_0);
this.h3n_1.e(name);
this.i3n_1.e(value);
return this;
};
protoOf(JsonObject).t2q = function (name) {
var index = this.n3p(name);
return !(index === -1) ? this.i3n_1.k(index) : null;
};
protoOf(JsonObject).o3p = function (name, defaultValue) {
var value = this.t2q(name);
var tmp1_elvis_lhs = value == null ? null : value.x3o();
return tmp1_elvis_lhs == null ? defaultValue : tmp1_elvis_lhs;
};
protoOf(JsonObject).p3p = function (name, defaultValue) {
var value = this.t2q(name);
var tmp1_elvis_lhs = value == null ? null : value.y3o();
return tmp1_elvis_lhs == null ? defaultValue : tmp1_elvis_lhs;
};
protoOf(JsonObject).q3p = function (name, defaultValue) {
var value = this.t2q(name);
var tmp1_elvis_lhs = value == null ? null : value.a3p();
return tmp1_elvis_lhs == null ? defaultValue : tmp1_elvis_lhs;
};
protoOf(JsonObject).r3p = function (name, defaultValue) {
var value = this.t2q(name);
var tmp1_elvis_lhs = value == null ? null : value.z3o();
return tmp1_elvis_lhs == null ? defaultValue : tmp1_elvis_lhs;
};
protoOf(JsonObject).s3p = function () {
return new ImmutableList(this.h3n_1);
};
protoOf(JsonObject).g = function () {
var namesIterator = this.h3n_1.g();
var valuesIterator = this.i3n_1.g();
return new JsonObject$iterator$1(namesIterator, valuesIterator);
};
protoOf(JsonObject).r3o = function (writer) {
writer.t3p();
var namesIterator = this.h3n_1.g();
var valuesIterator = this.i3n_1.g();
if (namesIterator.h()) {
writer.u3p(namesIterator.i());
writer.v3p();
valuesIterator.i().r3o(writer);
while (namesIterator.h()) {
writer.w3p();
writer.u3p(namesIterator.i());
writer.v3p();
valuesIterator.i().r3o(writer);
}
}
writer.x3p();
};
protoOf(JsonObject).w3o = function () {
return this;
};
protoOf(JsonObject).hashCode = function () {
var result = 1;
result = imul(31, result) + hashCode(this.h3n_1) | 0;
result = imul(31, result) + hashCode(this.i3n_1) | 0;
return result;
};
protoOf(JsonObject).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof JsonObject))
return false;
if (!getKClassFromExpression(other).equals(getKClassFromExpression(this)))
return false;
return equals(this.h3n_1, other.h3n_1) && equals(this.i3n_1, other.i3n_1);
};
protoOf(JsonObject).n3p = function (name) {
var index = this.j3n_1.w1(name);
if (!(index == null)) {
return index;
} else {
return -1;
}
};
function Companion() {
this.x3n_1 = 1000;
this.y3n_1 = 10;
this.z3n_1 = 1024;
}
var Companion_instance;
function Companion_getInstance() {
return Companion_instance;
}
function readValue($this) {
var tmp0_subject = $this.i3o_1;
if (tmp0_subject === _Char___init__impl__6a9atx(110)) {
readNull($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(116)) {
readTrue($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(102)) {
readFalse($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(34)) {
readString($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(91)) {
readArray($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(123)) {
readObject($this);
} else if (tmp0_subject === _Char___init__impl__6a9atx(45) || tmp0_subject === _Char___init__impl__6a9atx(48) || (tmp0_subject === _Char___init__impl__6a9atx(49) || (tmp0_subject === _Char___init__impl__6a9atx(50) || tmp0_subject === _Char___init__impl__6a9atx(51))) || (tmp0_subject === _Char___init__impl__6a9atx(52) || (tmp0_subject === _Char___init__impl__6a9atx(53) || tmp0_subject === _Char___init__impl__6a9atx(54)) || (tmp0_subject === _Char___init__impl__6a9atx(55) || (tmp0_subject === _Char___init__impl__6a9atx(56) || tmp0_subject === _Char___init__impl__6a9atx(57))))) {
readNumber($this);
} else
throw expected($this, 'value');
}
function readArray($this) {
var array = $this.a3o_1.p3m();
read($this);
$this.l3o_1 = $this.l3o_1 + 1 | 0;
if ($this.l3o_1 > Companion_instance.x3n_1) {
throw error($this, 'Nesting too deep');
}
skipWhiteSpace($this);
if (readChar($this, _Char___init__impl__6a9atx(93))) {
$this.l3o_1 = $this.l3o_1 - 1 | 0;
$this.a3o_1.z3m(array);
return Unit_instance;
}
do {
skipWhiteSpace($this);
$this.a3o_1.r3n(array);
readValue($this);
$this.a3o_1.f3n(array);
skipWhiteSpace($this);
}
while (readChar($this, _Char___init__impl__6a9atx(44)));
if (!readChar($this, _Char___init__impl__6a9atx(93))) {
throw expected($this, "',' or ']'");
}
$this.l3o_1 = $this.l3o_1 - 1 | 0;
$this.a3o_1.z3m(array);
}
function readObject($this) {
var obj = $this.a3o_1.q3m();
read($this);
$this.l3o_1 = $this.l3o_1 + 1 | 0;
if ($this.l3o_1 > Companion_instance.x3n_1) {
throw error($this, 'Nesting too deep');
}
skipWhiteSpace($this);
if (readChar($this, _Char___init__impl__6a9atx(125))) {
$this.l3o_1 = $this.l3o_1 - 1 | 0;
$this.a3o_1.b3n(obj);
return Unit_instance;
}
do {
skipWhiteSpace($this);
$this.a3o_1.s3n(obj);
var name = $this.y3p();
$this.a3o_1.t3n(obj, name);
skipWhiteSpace($this);
if (!readChar($this, _Char___init__impl__6a9atx(58))) {
throw expected($this, "':'");
}
skipWhiteSpace($this);
$this.a3o_1.u3n(obj, name);
readValue($this);
$this.a3o_1.l3n(obj, name);
skipWhiteSpace($this);
}
while (readChar($this, _Char___init__impl__6a9atx(44)));
if (!readChar($this, _Char___init__impl__6a9atx(125))) {
throw expected($this, "',' or '}'");
}
$this.l3o_1 = $this.l3o_1 - 1 | 0;
$this.a3o_1.b3n(obj);
}
function readNull($this) {
$this.a3o_1.n3n();
read($this);
readRequiredChar($this, _Char___init__impl__6a9atx(117));
readRequiredChar($this, _Char___init__impl__6a9atx(108));
readRequiredChar($this, _Char___init__impl__6a9atx(108));
$this.a3o_1.r3m();
}
function readTrue($this) {
$this.a3o_1.o3n();
read($this);
readRequiredChar($this, _Char___init__impl__6a9atx(114));
readRequiredChar($this, _Char___init__impl__6a9atx(117));
readRequiredChar($this, _Char___init__impl__6a9atx(101));
$this.a3o_1.v3m(true);
}
function readFalse($this) {
$this.a3o_1.o3n();
read($this);
readRequiredChar($this, _Char___init__impl__6a9atx(97));
readRequiredChar($this, _Char___init__impl__6a9atx(108));
readRequiredChar($this, _Char___init__impl__6a9atx(115));
readRequiredChar($this, _Char___init__impl__6a9atx(101));
$this.a3o_1.v3m(false);
}
function readRequiredChar($this, ch) {
if (!readChar($this, ch)) {
throw expected($this, "'" + toString(ch) + "'");
}
}
function readString($this) {
$this.a3o_1.p3n();
$this.a3o_1.w3m(readStringInternal($this));
}
function readStringInternal($this) {
read($this);
startCapture($this);
while (!($this.i3o_1 === _Char___init__impl__6a9atx(34))) {
if ($this.i3o_1 === _Char___init__impl__6a9atx(92)) {
pauseCapture($this);
readEscape($this);
startCapture($this);
} else if (Char__compareTo_impl_ypi4mb($this.i3o_1, _Char___init__impl__6a9atx(32)) < 0) {
throw expected($this, 'valid string character');
} else {
read($this);
}
}
var string = endCapture($this);
read($this);
return string;
}
function readEscape($this) {
read($this);
var tmp0_subject = $this.i3o_1;
if (tmp0_subject === _Char___init__impl__6a9atx(34) || (tmp0_subject === _Char___init__impl__6a9atx(47) || tmp0_subject === _Char___init__impl__6a9atx(92)))
$this.j3o_1.l7($this.i3o_1);
else if (tmp0_subject === _Char___init__impl__6a9atx(98))
$this.j3o_1.l7(_Char___init__impl__6a9atx(8));
else if (tmp0_subject === _Char___init__impl__6a9atx(102))
$this.j3o_1.l7(_Char___init__impl__6a9atx(12));
else if (tmp0_subject === _Char___init__impl__6a9atx(110))
$this.j3o_1.l7(_Char___init__impl__6a9atx(10));
else if (tmp0_subject === _Char___init__impl__6a9atx(114))
$this.j3o_1.l7(_Char___init__impl__6a9atx(13));
else if (tmp0_subject === _Char___init__impl__6a9atx(116))
$this.j3o_1.l7(_Char___init__impl__6a9atx(9));
else if (tmp0_subject === _Char___init__impl__6a9atx(117)) {
var tmp = 0;
var tmp_0 = charArray(4);
while (tmp < 4) {
tmp_0[tmp] = _Char___init__impl__6a9atx(32);
tmp = tmp + 1 | 0;
}
var hexChars = tmp_0;
var inductionVariable = 0;
if (inductionVariable < 4)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
read($this);
if (!isHexDigit($this)) {
throw expected($this, 'hexadecimal digit');
}
hexChars[i] = $this.i3o_1;
}
while (inductionVariable < 4);
$this.j3o_1.l7(numberToChar(toInt_0(concatToString(hexChars), 16)));
} else
throw expected($this, 'valid escape sequence');
read($this);
}
function readNumber($this) {
$this.a3o_1.q3n();
startCapture($this);
readChar($this, _Char___init__impl__6a9atx(45));
var firstDigit = $this.i3o_1;
if (!readDigit($this)) {
throw expected($this, 'digit');
}
if (!(firstDigit === _Char___init__impl__6a9atx(48))) {
while (readDigit($this)) {
}
}
readFraction($this);
readExponent($this);
$this.a3o_1.x3m(endCapture($this));
}
function readFraction($this) {
if (!readChar($this, _Char___init__impl__6a9atx(46))) {
return false;
}
if (!readDigit($this)) {
throw expected($this, 'digit');
}
while (readDigit($this)) {
}
return true;
}
function readExponent($this) {
if (!readChar($this, _Char___init__impl__6a9atx(101)) && !readChar($this, _Char___init__impl__6a9atx(69))) {
return false;
}
if (!readChar($this, _Char___init__impl__6a9atx(43))) {
readChar($this, _Char___init__impl__6a9atx(45));
}
if (!readDigit($this)) {
throw expected($this, 'digit');
}
while (readDigit($this)) {
}
return true;
}
function readChar($this, ch) {
if (!($this.i3o_1 === ch)) {
return false;
}
read($this);
return true;
}
function readDigit($this) {
if (!isDigit($this)) {
return false;
}
read($this);
return true;
}
function skipWhiteSpace($this) {
while (isWhiteSpace($this)) {
read($this);
}
}
function read($this) {
if ($this.e3o_1 === $this.f3o_1) {
if (!($this.k3o_1 === -1)) {
$this.j3o_1.ua($this.c3o_1, $this.k3o_1, $this.f3o_1);
$this.k3o_1 = 0;
}
$this.d3o_1 = $this.d3o_1 + $this.f3o_1 | 0;
$this.f3o_1 = $this.b3o_1.z3p($this.c3o_1, 0, $this.c3o_1.length);
$this.e3o_1 = 0;
if ($this.f3o_1 === -1) {
$this.i3o_1 = _Char___init__impl__6a9atx(0);
$this.m3o_1 = true;
$this.e3o_1 = $this.e3o_1 + 1 | 0;
return Unit_instance;
}
}
if ($this.i3o_1 === _Char___init__impl__6a9atx(10)) {
$this.g3o_1 = $this.g3o_1 + 1 | 0;
$this.h3o_1 = $this.d3o_1 + $this.e3o_1 | 0;
}
var tmp = $this;
var _unary__edvuaz = $this.e3o_1;
$this.e3o_1 = _unary__edvuaz + 1 | 0;
tmp.i3o_1 = $this.c3o_1[_unary__edvuaz];
}
function startCapture($this) {
$this.k3o_1 = $this.e3o_1 - 1 | 0;
}
function pauseCapture($this) {
var end = $this.i3o_1 === _Char___init__impl__6a9atx(0) ? $this.e3o_1 : $this.e3o_1 - 1 | 0;
$this.j3o_1.ua($this.c3o_1, $this.k3o_1, $this.k3o_1 + (end - $this.k3o_1 | 0) | 0);
$this.k3o_1 = -1;
}
function endCapture($this) {
var start = $this.k3o_1;
var end = $this.e3o_1 - 1 | 0;
$this.k3o_1 = -1;
if ($this.j3o_1.a() > 0) {
$this.j3o_1.ua($this.c3o_1, start, start + (end - start | 0) | 0);
var captured = $this.j3o_1.toString();
$this.j3o_1.ta(0);
return captured;
}
return concatToString_0($this.c3o_1, start, start + (end - start | 0) | 0);
}
function expected($this, expected) {
if (isEndOfText($this)) {
return error($this, 'Unexpected end of input');
}
return error($this, 'Expected ' + expected);
}
function error($this, message) {
return new ParseException(message, $this.a3q());
}
function isWhiteSpace($this) {
return $this.i3o_1 === _Char___init__impl__6a9atx(32) || $this.i3o_1 === _Char___init__impl__6a9atx(9) || $this.i3o_1 === _Char___init__impl__6a9atx(10) || $this.i3o_1 === _Char___init__impl__6a9atx(13);
}
function isDigit($this) {
var containsArg = $this.i3o_1;
return _Char___init__impl__6a9atx(48) <= containsArg ? containsArg <= _Char___init__impl__6a9atx(57) : false;
}
function isHexDigit($this) {
var tmp;
var tmp_0;
var containsArg = $this.i3o_1;
if (_Char___init__impl__6a9atx(48) <= containsArg ? containsArg <= _Char___init__impl__6a9atx(57) : false) {
tmp_0 = true;
} else {
var containsArg_0 = $this.i3o_1;
tmp_0 = _Char___init__impl__6a9atx(97) <= containsArg_0 ? containsArg_0 <= _Char___init__impl__6a9atx(102) : false;
}
if (tmp_0) {
tmp = true;
} else {
var containsArg_1 = $this.i3o_1;
tmp = _Char___init__impl__6a9atx(65) <= containsArg_1 ? containsArg_1 <= _Char___init__impl__6a9atx(70) : false;
}
return tmp;
}
function isEndOfText($this) {
return $this.m3o_1;
}
function JsonParser(handler, reader, bufferSize) {
this.a3o_1 = handler;
this.b3o_1 = reader;
if (bufferSize <= 0) {
throw IllegalArgumentException_init_$Create$('bufferSize is zero or negative');
}
this.a3o_1.m3n_1 = this;
var tmp = this;
var tmp_0 = 0;
var tmp_1 = charArray(bufferSize);
while (tmp_0 < bufferSize) {
tmp_1[tmp_0] = _Char___init__impl__6a9atx(32);
tmp_0 = tmp_0 + 1 | 0;
}
tmp.c3o_1 = tmp_1;
this.d3o_1 = 0;
this.e3o_1 = 0;
this.f3o_1 = 0;
this.g3o_1 = 1;
this.h3o_1 = 0;
this.i3o_1 = _Char___init__impl__6a9atx(0);
this.j3o_1 = StringBuilder_init_$Create$();
this.k3o_1 = -1;
this.l3o_1 = 0;
this.m3o_1 = false;
var tmp_2 = this;
// Inline function 'kotlin.charArrayOf' call
tmp_2.n3o_1 = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
}
protoOf(JsonParser).o3o = function () {
read(this);
skipWhiteSpace(this);
readValue(this);
skipWhiteSpace(this);
if (!isEndOfText(this)) {
throw error(this, 'Unexpected character');
}
};
protoOf(JsonParser).y3p = function () {
if (!(this.i3o_1 === _Char___init__impl__6a9atx(34))) {
throw expected(this, 'name');
}
return readStringInternal(this);
};
protoOf(JsonParser).a3q = function () {
var offset = (this.d3o_1 + this.e3o_1 | 0) - 1 | 0;
var column = (offset - this.h3o_1 | 0) + 1 | 0;
return new Location(offset, this.g3o_1, column);
};
function JsonString(string) {
JsonValue.call(this);
this.b3q_1 = string;
}
protoOf(JsonString).r3o = function (writer) {
writer.c3q(this.b3q_1);
};
protoOf(JsonString).z3o = function () {
return this.b3q_1;
};
protoOf(JsonString).hashCode = function () {
return getStringHashCode(this.b3q_1);
};
protoOf(JsonString).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof JsonString))
return false;
if (!getKClassFromExpression(other).equals(getKClassFromExpression(this)))
return false;
return equals(this.b3q_1, other.b3q_1);
};
function JsonValue() {
}
protoOf(JsonValue).w3o = function () {
throw UnsupportedOperationException_init_$Create$('Not an object: ' + this.toString());
};
protoOf(JsonValue).x3o = function () {
throw UnsupportedOperationException_init_$Create$('Not a number: ' + this.toString());
};
protoOf(JsonValue).y3o = function () {
throw UnsupportedOperationException_init_$Create$('Not a number: ' + this.toString());
};
protoOf(JsonValue).z3o = function () {
throw UnsupportedOperationException_init_$Create$('Not a string: ' + this.toString());
};
protoOf(JsonValue).a3p = function () {
throw UnsupportedOperationException_init_$Create$('Not a boolean: ' + this.toString());
};
protoOf(JsonValue).b3p = function (writer, config) {
this.r3o(config.d3q(writer));
writer.a8();
};
protoOf(JsonValue).c3p = function (config) {
var buffer = new MPPStringWriter();
this.b3p(buffer, config);
return buffer.toString();
};
protoOf(JsonValue).toString = function () {
return this.c3p(Companion_getInstance_2().g3q());
};
protoOf(JsonValue).equals = function (other) {
return this === other;
};
function Companion_0() {
Companion_instance_0 = this;
this.h3q_1 = _Char___init__impl__6a9atx(31);
this.i3q_1 = '\\"';
this.j3q_1 = '\\\\';
this.k3q_1 = '\\n';
this.l3q_1 = '\\r';
this.m3q_1 = '\\t';
this.n3q_1 = '\\u2028';
this.o3q_1 = '\\u2029';
var tmp = this;
// Inline function 'kotlin.charArrayOf' call
tmp.p3q_1 = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
}
var Companion_instance_0;
function Companion_getInstance_0() {
if (Companion_instance_0 == null)
new Companion_0();
return Companion_instance_0;
}
function getReplacementChars($this, ch) {
if (Char__compareTo_impl_ypi4mb(ch, _Char___init__impl__6a9atx(92)) > 0) {
if (Char__compareTo_impl_ypi4mb(ch, _Char___init__impl__6a9atx(8232)) < 0 || Char__compareTo_impl_ypi4mb(ch, _Char___init__impl__6a9atx(8233)) > 0) {
return null;
}
return ch === _Char___init__impl__6a9atx(8232) ? Companion_getInstance_0().n3q_1 : Companion_getInstance_0().o3q_1;
}
if (ch === _Char___init__impl__6a9atx(92)) {
return Companion_getInstance_0().j3q_1;
}
if (Char__compareTo_impl_ypi4mb(ch, _Char___init__impl__6a9atx(34)) > 0) {
return null;
}
if (ch === _Char___init__impl__6a9atx(34)) {
return Companion_getInstance_0().i3q_1;
}
if (Char__compareTo_impl_ypi4mb(ch, Companion_getInstance_0().h3q_1) > 0) {
return null;
}
if (ch === _Char___init__impl__6a9atx(10)) {
return Companion_getInstance_0().k3q_1;
}
if (ch === _Char___init__impl__6a9atx(13)) {
return Companion_getInstance_0().l3q_1;
}
if (ch === _Char___init__impl__6a9atx(9)) {
return Companion_getInstance_0().m3q_1;
}
// Inline function 'kotlin.code' call
var code = Char__toInt_impl_vasixd(ch);
return '\\u00' + toString(Companion_getInstance_0().p3q_1[code >> 4 & 15]) + toString(Companion_getInstance_0().p3q_1[code & 15]);
}
function JsonWriter(writer) {
Companion_getInstance_0();
this.s3o_1 = writer;
}
protoOf(JsonWriter).e3p = function (value) {
this.s3o_1.q3q(value);
};
protoOf(JsonWriter).i3p = function (string) {
this.s3o_1.q3q(string);
};
protoOf(JsonWriter).c3q = function (string) {
this.s3o_1.l7(_Char___init__impl__6a9atx(34));
this.r3q(string);
this.s3o_1.l7(_Char___init__impl__6a9atx(34));
};
protoOf(JsonWriter).t3o = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(91));
};
protoOf(JsonWriter).v3o = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(93));
};
protoOf(JsonWriter).u3o = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(44));
};
protoOf(JsonWriter).t3p = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(123));
};
protoOf(JsonWriter).x3p = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(125));
};
protoOf(JsonWriter).u3p = function (name) {
this.s3o_1.l7(_Char___init__impl__6a9atx(34));
this.r3q(name);
this.s3o_1.l7(_Char___init__impl__6a9atx(34));
};
protoOf(JsonWriter).v3p = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(58));
};
protoOf(JsonWriter).w3p = function () {
this.s3o_1.l7(_Char___init__impl__6a9atx(44));
};
protoOf(JsonWriter).r3q = function (string) {
var length = string.length;
var start = 0;
var inductionVariable = 0;
if (inductionVariable < length)
do {
var index = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var replacement = getReplacementChars(this, charSequenceGet(string, index));
if (!(replacement == null)) {
this.s3o_1.s3q(string, start, index - start | 0);
this.s3o_1.q3q(replacement);
start = index + 1 | 0;
}
}
while (inductionVariable < length);
this.s3o_1.s3q(string, start, length - start | 0);
};
function Location(offset, line, column) {
this.t3q_1 = offset;
this.u3q_1 = line;
this.v3q_1 = column;
}
protoOf(Location).toString = function () {
return '' + this.u3q_1 + ':' + this.v3q_1;
};
protoOf(Location).hashCode = function () {
return this.t3q_1;
};
protoOf(Location).equals = function (other) {
if (this === other)
return true;
if (other == null)
return false;
if (!(other instanceof Location))
return false;
return this.t3q_1 === other.t3q_1 && this.v3q_1 === other.v3q_1 && this.u3q_1 === other.u3q_1;
};
function MPPStringReader(string) {
this.w3q_1 = string;
this.x3q_1 = 0;
}
protoOf(MPPStringReader).z3p = function (charArray, offset, length) {
// Inline function 'kotlin.math.min' call
var b = this.w3q_1.length - this.x3q_1 | 0;
var toCopy = Math.min(length, b);
if (toCopy <= 0)
return -1;
toCharArray(this.w3q_1, charArray, offset, this.x3q_1, this.x3q_1 + toCopy | 0);
this.x3q_1 = this.x3q_1 + toCopy | 0;
return toCopy;
};
function MPPWriter() {
}
function MPPStringWriter() {
this.a3r_1 = StringBuilder_init_$Create$();
}
protoOf(MPPStringWriter).q3q = function (value) {
this.a3r_1.k7(value);
return this;
};
protoOf(MPPStringWriter).l7 = function (value) {
this.a3r_1.l7(value);
return this;
};
protoOf(MPPStringWriter).z3q = function (charArray, offset, length) {
this.a3r_1.ua(charArray, offset, offset + length | 0);
};
protoOf(MPPStringWriter).s3q = function (string, offset, length) {
this.a3r_1.va(string, offset, offset + length | 0);
};
protoOf(MPPStringWriter).a8 = function () {
};
protoOf(MPPStringWriter).toString = function () {
return this.a3r_1.toString();
};
function ParseException(message, location) {
Exception_init_$Init$(message + ' at ' + location.toString(), this);
captureStack(this, ParseException);
this.b3r_1 = location;
}
protoOf(ParseException).t8 = function () {
return this.message;
};
function writeNewLine($this) {
if ($this.e3r_1 == null) {
return false;
}
$this.d3r_1.l7(_Char___init__impl__6a9atx(10));
var inductionVariable = 0;
var last = $this.f3r_1;
if (inductionVariable < last)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
$this.d3r_1.y3q($this.e3r_1);
}
while (inductionVariable < last);
return true;
}
function Companion_1() {
}
protoOf(Companion_1).g3r = function (number) {
if (number < 0) {
throw IllegalArgumentException_init_$Create$('number is negative');
}
var tmp = 0;
var tmp_0 = charArray(number);
while (tmp < number) {
tmp_0[tmp] = _Char___init__impl__6a9atx(32);
tmp = tmp + 1 | 0;
}
var chars = tmp_0;
return new PrettyPrint(chars);
};
var Companion_instance_1;
function Companion_getInstance_1() {
return Companion_instance_1;
}
function PrettyPrintWriter(writer, indentChars) {
JsonWriter.call(this, writer);
this.d3r_1 = writer;
this.e3r_1 = indentChars;
this.f3r_1 = 0;
}
protoOf(PrettyPrintWriter).t3o = function () {
this.f3r_1 = this.f3r_1 + 1 | 0;
this.d3r_1.l7(_Char___init__impl__6a9atx(91));
writeNewLine(this);
};
protoOf(PrettyPrintWriter).v3o = function () {
this.f3r_1 = this.f3r_1 - 1 | 0;
writeNewLine(this);
this.d3r_1.l7(_Char___init__impl__6a9atx(93));
};
protoOf(PrettyPrintWriter).u3o = function () {
this.d3r_1.l7(_Char___init__impl__6a9atx(44));
if (!writeNewLine(this)) {
this.d3r_1.l7(_Char___init__impl__6a9atx(32));
}
};
protoOf(PrettyPrintWriter).t3p = function () {
this.f3r_1 = this.f3r_1 + 1 | 0;
this.d3r_1.l7(_Char___init__impl__6a9atx(123));
writeNewLine(this);
};
protoOf(PrettyPrintWriter).x3p = function () {
this.f3r_1 = this.f3r_1 - 1 | 0;
writeNewLine(this);
this.d3r_1.l7(_Char___init__impl__6a9atx(125));
};
protoOf(PrettyPrintWriter).v3p = function () {
this.d3r_1.l7(_Char___init__impl__6a9atx(58));
this.d3r_1.l7(_Char___init__impl__6a9atx(32));
};
protoOf(PrettyPrintWriter).w3p = function () {
this.d3r_1.l7(_Char___init__impl__6a9atx(44));
if (!writeNewLine(this)) {
this.d3r_1.l7(_Char___init__impl__6a9atx(32));
}
};
function PrettyPrint(indentChars) {
WriterConfig.call(this);
this.h3r_1 = indentChars;
}
protoOf(PrettyPrint).d3q = function (writer) {
return new PrettyPrintWriter(writer, this.h3r_1);
};
function WriterConfig$Companion$MINIMAL$delegate$lambda() {
return new WriterConfig$Companion$MINIMAL$2$1();
}
function WriterConfig$Companion$MINIMAL$2$1() {
WriterConfig.call(this);
}
protoOf(WriterConfig$Companion$MINIMAL$2$1).d3q = function (writer) {
return new JsonWriter(writer);
};
function WriterConfig$Companion$PRETTY_PRINT$delegate$lambda() {
return Companion_instance_1.g3r(2);
}
function Companion_2() {
Companion_instance_2 = this;
var tmp = this;
tmp.e3q_1 = lazy(WriterConfig$Companion$MINIMAL$delegate$lambda);
var tmp_0 = this;
tmp_0.f3q_1 = lazy(WriterConfig$Companion$PRETTY_PRINT$delegate$lambda);
}
protoOf(Companion_2).g3q = function () {
var tmp0 = this.e3q_1;
// Inline function 'kotlin.getValue' call
MINIMAL$factory();
return tmp0.t1();
};
var Companion_instance_2;
function Companion_getInstance_2() {
if (Companion_instance_2 == null)
new Companion_2();
return Companion_instance_2;
}
function WriterConfig() {
Companion_getInstance_2();
}
function MINIMAL$factory() {
return getPropertyCallableRef('MINIMAL', 1, KProperty1, function (receiver) {
return receiver.g3q();
}, null);
}
//region block: post-declaration
protoOf(MPPStringWriter).y3q = write;
defineProp(protoOf(ParseException), 'message', function () {
return this.t8();
});
//endregion
//region block: init
Companion_instance = new Companion();
Companion_instance_1 = new Companion_1();
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = Json_getInstance;
_.$_$.b = JsonArray;
_.$_$.c = JsonObject;
_.$_$.d = JsonString;
//endregion
return _;
}));
//# sourceMappingURL=kojak.js.map