UNPKG

@vonage/client-sdk

Version:

The Client SDK is intended to provide a ready solution for developers to build Programmable Conversation applications across multiple Channels including: Messages, Voice, SIP, websockets, and App.

1,151 lines (1,110 loc) 3.44 MB
import 'webrtc-adapter'; import * as sdptransform from 'sdp-transform'; import * as socket_io from 'socket.io-client'; /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } function getDefaultExportFromNamespaceIfPresent (n) { return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; } function getDefaultExportFromNamespaceIfNotNamed (n) { return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; } function getAugmentedNamespace(n) { if (n.__esModule) return n; var f = n.default; if (typeof f == "function") { var a = function a () { if (this instanceof a) { var args = [null]; args.push.apply(args, arguments); var Ctor = Function.bind.apply(f, args); return new Ctor(); } return f.apply(this, arguments); }; a.prototype = f.prototype; } else a = {}; Object.defineProperty(a, '__esModule', {value: true}); Object.keys(n).forEach(function (k) { var d = Object.getOwnPropertyDescriptor(n, k); Object.defineProperty(a, k, d.get ? d : { enumerable: true, get: function () { return n[k]; } }); }); return a; } var clientsdkClientcore_jsExports = {}; var clientsdkClientcore_js$1 = { get exports(){ return clientsdkClientcore_jsExports; }, set exports(v){ clientsdkClientcore_jsExports = v; }, }; var kotlinKotlinStdlibExports = {}; var kotlinKotlinStdlib = { get exports(){ return kotlinKotlinStdlibExports; }, set exports(v){ kotlinKotlinStdlibExports = v; }, }; var hasRequiredKotlinKotlinStdlib; function requireKotlinKotlinStdlib () { if (hasRequiredKotlinKotlinStdlib) return kotlinKotlinStdlibExports; hasRequiredKotlinKotlinStdlib = 1; (function (module, exports) { //region block: polyfills (function () { if (typeof globalThis === 'object') return; Object.defineProperty(Object.prototype, '__magic__', {get: function () { return this; }, configurable: true}); __magic__.globalThis = __magic__; delete Object.prototype.__magic__; }()); if (typeof Math.imul === 'undefined') { Math.imul = function imul(a, b) { return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0; }; } if (typeof ArrayBuffer.isView === 'undefined') { ArrayBuffer.isView = function (a) { return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__; }; } if (typeof Array.prototype.fill === 'undefined') { // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill Object.defineProperty(Array.prototype, 'fill', {value: function (value) { // Steps 1-2. if (this == null) { throw new TypeError('this is null or not defined'); } var O = Object(this); // Steps 3-5. var len = O.length >>> 0; // Steps 6-7. var start = arguments[1]; var relativeStart = start >> 0; // Step 8. var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10. var end = arguments[2]; var relativeEnd = end === undefined ? len : end >> 0; // Step 11. var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12. while (k < finalValue) { O[k] = value; k++; } ; // Step 13. return O; }}); } [Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) { if (typeof TypedArray.prototype.fill === 'undefined') { Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill}); } }); if (typeof Math.clz32 === 'undefined') { Math.clz32 = function (log, LN2) { return function (x) { var asUint = x >>> 0; if (asUint === 0) { return 32; } return 31 - (log(asUint) / LN2 | 0) | 0; // the "| 0" acts like math.floor }; }(Math.log, Math.LN2); } if (typeof String.prototype.startsWith === 'undefined') { Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) { position = position || 0; return this.lastIndexOf(searchString, position) === position; }}); } //endregion (function (root, factory) { if (typeof undefined === 'function' && undefined.amd) undefined(['exports'], factory); else if ('object' === 'object') factory(module.exports); else root['kotlin-kotlin-stdlib'] = factory(typeof this['kotlin-kotlin-stdlib'] === 'undefined' ? {} : this['kotlin-kotlin-stdlib']); }(globalThis, function (_) { 'use strict'; //region block: imports var imul = Math.imul; var isView = ArrayBuffer.isView; var clz32 = Math.clz32; //endregion //region block: pre-declaration initMetadataForInterface(CharSequence, 'CharSequence'); initMetadataForClass(Number_0, 'Number'); initMetadataForObject(Unit, 'Unit'); initMetadataForClass(_no_name_provided__qut3iv); initMetadataForCompanion(Companion); initMetadataForClass(Char, 'Char'); initMetadataForInterface(Collection, 'Collection'); initMetadataForInterface(KtList, 'List', VOID, VOID, [Collection]); initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]); initMetadataForInterface(Entry, 'Entry'); initMetadataForInterface(KtMap, 'Map'); initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, Collection]); initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, Collection]); initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]); initMetadataForCompanion(Companion_0); initMetadataForClass(Enum, 'Enum'); initMetadataForCompanion(Companion_1); initMetadataForClass(Long, 'Long', VOID, Number_0); initMetadataForClass(arrayIterator$1); initMetadataForObject(ByteCompanionObject, 'ByteCompanionObject'); initMetadataForObject(ShortCompanionObject, 'ShortCompanionObject'); initMetadataForObject(IntCompanionObject, 'IntCompanionObject'); initMetadataForObject(FloatCompanionObject, 'FloatCompanionObject'); initMetadataForObject(DoubleCompanionObject, 'DoubleCompanionObject'); initMetadataForObject(StringCompanionObject, 'StringCompanionObject'); initMetadataForObject(BooleanCompanionObject, 'BooleanCompanionObject'); initMetadataForObject(Digit, 'Digit'); initMetadataForObject(Letter, 'Letter'); initMetadataForObject(OtherLowercase, 'OtherLowercase'); initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]); initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, Collection]); initMetadataForClass(IteratorImpl, 'IteratorImpl'); initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableList]); initMetadataForClass(AbstractMap, 'AbstractMap', VOID, VOID, [KtMap]); initMetadataForClass(AbstractMutableMap, 'AbstractMutableMap', VOID, AbstractMap, [AbstractMap, KtMutableMap]); initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableSet]); initMetadataForCompanion(Companion_2); initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [AbstractMutableList, KtMutableList]); initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [AbstractMutableMap, KtMutableMap]); initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]); initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, AbstractMutableCollection]); initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]); initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase); initMetadataForClass(HashMapKeysDefault$iterator$1); initMetadataForClass(HashMapKeysDefault, 'HashMapKeysDefault', VOID, AbstractMutableSet); initMetadataForClass(HashMapValuesDefault$iterator$1); initMetadataForClass(HashMapValuesDefault, 'HashMapValuesDefault', VOID, AbstractMutableCollection); initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [AbstractMutableSet, KtMutableSet]); initMetadataForCompanion(Companion_3); initMetadataForClass(Itr, 'Itr'); initMetadataForClass(KeysItr, 'KeysItr', VOID, Itr); initMetadataForClass(ValuesItr, 'ValuesItr', VOID, Itr); initMetadataForClass(EntriesItr, 'EntriesItr', VOID, Itr); initMetadataForClass(EntryRef, 'EntryRef', VOID, VOID, [Entry]); function containsAllEntries(m) { var tmp$ret$0; $l$block_0: { // Inline function 'kotlin.collections.all' call var tmp; if (isInterface(m, Collection)) { tmp = m.n(); } else { tmp = false; } if (tmp) { tmp$ret$0 = true; break $l$block_0; } var tmp0_iterator = m.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); // Inline function 'kotlin.collections.InternalMap.containsAllEntries.<anonymous>' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var entry = element; var tmp_0; if (!(entry == null) ? isInterface(entry, Entry) : false) { tmp_0 = this.m7(entry); } else { tmp_0 = false; } if (!tmp_0) { tmp$ret$0 = false; break $l$block_0; } } tmp$ret$0 = true; } return tmp$ret$0; } initMetadataForInterface(InternalMap, 'InternalMap'); initMetadataForClass(InternalHashMap, 'InternalHashMap', InternalHashMap_init_$Create$, VOID, [InternalMap]); initMetadataForClass(LinkedHashMap, 'LinkedHashMap', LinkedHashMap_init_$Create$, HashMap, [HashMap, KtMutableMap]); initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [HashSet, KtMutableSet]); initMetadataForInterface(Continuation, 'Continuation'); initMetadataForClass(InterceptedCoroutine, 'InterceptedCoroutine', VOID, VOID, [Continuation]); initMetadataForClass(CoroutineImpl, 'CoroutineImpl', VOID, InterceptedCoroutine, [InterceptedCoroutine, Continuation]); initMetadataForObject(CompletedContinuation, 'CompletedContinuation', VOID, VOID, [Continuation]); initMetadataForClass(Exception, 'Exception', Exception_init_$Create$, Error); initMetadataForClass(RuntimeException, 'RuntimeException', RuntimeException_init_$Create$, Exception); initMetadataForClass(IllegalArgumentException, 'IllegalArgumentException', IllegalArgumentException_init_$Create$, RuntimeException); initMetadataForClass(IndexOutOfBoundsException, 'IndexOutOfBoundsException', IndexOutOfBoundsException_init_$Create$, RuntimeException); initMetadataForClass(IllegalStateException, 'IllegalStateException', IllegalStateException_init_$Create$, RuntimeException); initMetadataForClass(UnsupportedOperationException, 'UnsupportedOperationException', UnsupportedOperationException_init_$Create$, RuntimeException); initMetadataForClass(NoSuchElementException, 'NoSuchElementException', NoSuchElementException_init_$Create$, RuntimeException); initMetadataForClass(Error_0, 'Error', Error_init_$Create$, Error); initMetadataForClass(AssertionError, 'AssertionError', AssertionError_init_$Create$, Error_0); initMetadataForClass(ConcurrentModificationException, 'ConcurrentModificationException', ConcurrentModificationException_init_$Create$, RuntimeException); initMetadataForClass(NumberFormatException, 'NumberFormatException', NumberFormatException_init_$Create$, IllegalArgumentException); initMetadataForClass(ArithmeticException, 'ArithmeticException', ArithmeticException_init_$Create$, RuntimeException); initMetadataForClass(ClassCastException, 'ClassCastException', ClassCastException_init_$Create$, RuntimeException); initMetadataForClass(NullPointerException, 'NullPointerException', NullPointerException_init_$Create$, RuntimeException); initMetadataForClass(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', NoWhenBranchMatchedException_init_$Create$, RuntimeException); initMetadataForClass(UninitializedPropertyAccessException, 'UninitializedPropertyAccessException', UninitializedPropertyAccessException_init_$Create$, RuntimeException); initMetadataForInterface(KClass, 'KClass'); initMetadataForClass(KClassImpl, 'KClassImpl', VOID, VOID, [KClass]); initMetadataForObject(NothingKClassImpl, 'NothingKClassImpl', VOID, KClassImpl); initMetadataForClass(ErrorKClass, 'ErrorKClass', ErrorKClass, VOID, [KClass]); initMetadataForClass(PrimitiveKClassImpl, 'PrimitiveKClassImpl', VOID, KClassImpl); initMetadataForClass(SimpleKClassImpl, 'SimpleKClassImpl', VOID, KClassImpl); initMetadataForInterface(KProperty1, 'KProperty1'); initMetadataForClass(KTypeImpl, 'KTypeImpl'); initMetadataForObject(PrimitiveClasses, 'PrimitiveClasses'); initMetadataForClass(StringBuilder, 'StringBuilder', StringBuilder_init_$Create$_0, VOID, [CharSequence]); initMetadataForCompanion(Companion_4); initMetadataForClass(Regex, 'Regex'); initMetadataForClass(ExceptionTraceBuilder, 'ExceptionTraceBuilder', ExceptionTraceBuilder); initMetadataForClass(DurationUnit, 'DurationUnit', VOID, Enum); initMetadataForCompanion(Companion_5); initMetadataForClass(AbstractMap$keys$1$iterator$1); initMetadataForClass(AbstractMap$values$1$iterator$1); initMetadataForCompanion(Companion_6); initMetadataForClass(AbstractSet, 'AbstractSet', VOID, AbstractCollection, [AbstractCollection, KtSet]); initMetadataForClass(AbstractMap$keys$1, VOID, VOID, AbstractSet); initMetadataForClass(AbstractMap$values$1, VOID, VOID, AbstractCollection); initMetadataForCompanion(Companion_7); initMetadataForObject(EmptyList, 'EmptyList', VOID, VOID, [KtList]); initMetadataForObject(EmptyIterator, 'EmptyIterator'); initMetadataForClass(ArrayAsCollection, 'ArrayAsCollection', VOID, VOID, [Collection]); initMetadataForClass(IndexedValue, 'IndexedValue'); initMetadataForClass(IndexingIterable, 'IndexingIterable'); initMetadataForClass(IndexingIterator, 'IndexingIterator'); initMetadataForInterface(MapWithDefault, 'MapWithDefault', VOID, VOID, [KtMap]); initMetadataForObject(EmptyMap, 'EmptyMap', VOID, VOID, [KtMap]); initMetadataForClass(IntIterator, 'IntIterator'); initMetadataForClass(TransformingSequence$iterator$1); initMetadataForClass(TransformingSequence, 'TransformingSequence'); initMetadataForObject(EmptySet, 'EmptySet', VOID, VOID, [KtSet]); initMetadataForObject(Key, 'Key'); function releaseInterceptedContinuation(continuation) { } initMetadataForInterface(ContinuationInterceptor, 'ContinuationInterceptor'); initMetadataForObject(EmptyCoroutineContext, 'EmptyCoroutineContext'); initMetadataForClass(CoroutineSingletons, 'CoroutineSingletons', VOID, Enum); initMetadataForClass(Random, 'Random'); initMetadataForObject(Default, 'Default', VOID, Random); initMetadataForCompanion(Companion_8); initMetadataForClass(XorWowRandom, 'XorWowRandom', VOID, Random); initMetadataForCompanion(Companion_9); initMetadataForClass(IntProgression, 'IntProgression'); initMetadataForClass(IntRange, 'IntRange', VOID, IntProgression); initMetadataForClass(IntProgressionIterator, 'IntProgressionIterator', VOID, IntIterator); initMetadataForCompanion(Companion_10); initMetadataForInterface(KTypeParameter, 'KTypeParameter'); initMetadataForClass(DelimitedRangesSequence$iterator$1); initMetadataForClass(DelimitedRangesSequence, 'DelimitedRangesSequence'); initMetadataForCompanion(Companion_11); initMetadataForClass(Duration, 'Duration'); initMetadataForClass(DeepRecursiveScope, 'DeepRecursiveScope', VOID, VOID, VOID, [1]); initMetadataForClass(DeepRecursiveFunction, 'DeepRecursiveFunction'); initMetadataForClass(DeepRecursiveScopeImpl, 'DeepRecursiveScopeImpl', VOID, DeepRecursiveScope, [DeepRecursiveScope, Continuation], [1]); initMetadataForClass(LazyThreadSafetyMode, 'LazyThreadSafetyMode', VOID, Enum); initMetadataForClass(UnsafeLazyImpl, 'UnsafeLazyImpl'); initMetadataForObject(UNINITIALIZED_VALUE, 'UNINITIALIZED_VALUE'); initMetadataForCompanion(Companion_12); initMetadataForClass(Failure, 'Failure'); initMetadataForClass(Result, 'Result'); initMetadataForClass(NotImplementedError, 'NotImplementedError', NotImplementedError, Error_0); initMetadataForClass(Pair, 'Pair'); initMetadataForClass(Triple, 'Triple'); initMetadataForCompanion(Companion_13); initMetadataForClass(UByte, 'UByte'); initMetadataForClass(Iterator, 'Iterator'); initMetadataForClass(UByteArray, 'UByteArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_14); initMetadataForClass(UInt, 'UInt'); initMetadataForClass(Iterator_0, 'Iterator'); initMetadataForClass(UIntArray, 'UIntArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_15); initMetadataForClass(ULong, 'ULong'); initMetadataForClass(Iterator_1, 'Iterator'); initMetadataForClass(ULongArray, 'ULongArray', VOID, VOID, [Collection]); initMetadataForCompanion(Companion_16); initMetadataForClass(UShort, 'UShort'); initMetadataForClass(Iterator_2, 'Iterator'); initMetadataForClass(UShortArray, 'UShortArray', VOID, VOID, [Collection]); //endregion function CharSequence() { } function Number_0() { } function Unit() { } protoOf(Unit).toString = function () { return 'kotlin.Unit'; }; var Unit_instance; function Unit_getInstance() { return Unit_instance; } function toList(_this__u8e3s4) { switch (_this__u8e3s4.length) { case 0: return emptyList(); case 1: return listOf(_this__u8e3s4[0]); default: return toMutableList(_this__u8e3s4); } } function withIndex(_this__u8e3s4) { return new IndexingIterable(withIndex$lambda(_this__u8e3s4)); } function get_indices(_this__u8e3s4) { return new IntRange(0, get_lastIndex(_this__u8e3s4)); } function get_indices_0(_this__u8e3s4) { return new IntRange(0, get_lastIndex_0(_this__u8e3s4)); } function contains(_this__u8e3s4, element) { return indexOf_0(_this__u8e3s4, element) >= 0; } function contains_0(_this__u8e3s4, element) { return indexOf_1(_this__u8e3s4, element) >= 0; } function contains_1(_this__u8e3s4, element) { return indexOf_2(_this__u8e3s4, element) >= 0; } function contains_2(_this__u8e3s4, element) { return indexOf_3(_this__u8e3s4, element) >= 0; } function indexOf(_this__u8e3s4, element) { if (element == null) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (_this__u8e3s4[index] == null) { return index; } } while (inductionVariable <= last); } else { var inductionVariable_0 = 0; var last_0 = _this__u8e3s4.length - 1 | 0; if (inductionVariable_0 <= last_0) do { var index_0 = inductionVariable_0; inductionVariable_0 = inductionVariable_0 + 1 | 0; if (equals(element, _this__u8e3s4[index_0])) { return index_0; } } while (inductionVariable_0 <= last_0); } return -1; } function toSet(_this__u8e3s4) { switch (_this__u8e3s4.length) { case 0: return emptySet(); case 1: return setOf(_this__u8e3s4[0]); default: return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length))); } } function single(_this__u8e3s4) { var tmp; switch (_this__u8e3s4.length) { case 0: throw NoSuchElementException_init_$Create$_0('Array is empty.'); case 1: tmp = _this__u8e3s4[0]; break; default: throw IllegalArgumentException_init_$Create$_0('Array has more than one element.'); } return tmp; } function toMutableList(_this__u8e3s4) { return ArrayList_init_$Create$_1(asCollection(_this__u8e3s4)); } function get_lastIndex(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function get_lastIndex_0(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function indexOf_0(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element.equals(_this__u8e3s4[index])) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_1(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_2(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function indexOf_3(_this__u8e3s4, element) { var inductionVariable = 0; var last = _this__u8e3s4.length - 1 | 0; if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; if (element === _this__u8e3s4[index]) { return index; } } while (inductionVariable <= last); return -1; } function toCollection(_this__u8e3s4, destination) { var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var item = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; destination.d(item); } return destination; } function get_lastIndex_1(_this__u8e3s4) { return _this__u8e3s4.length - 1 | 0; } function contains_3(_this__u8e3s4, element) { return indexOf(_this__u8e3s4, element) >= 0; } function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString(); } function joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; buffer.e(prefix); var count = 0; var inductionVariable = 0; var last = _this__u8e3s4.length; $l$loop: while (inductionVariable < last) { var element = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; count = count + 1 | 0; if (count > 1) { buffer.e(separator); } if (limit < 0 || count <= limit) { appendElement(buffer, element, transform); } else break $l$loop; } if (limit >= 0 && count > limit) { buffer.e(truncated); } buffer.e(postfix); return buffer; } function reversed(_this__u8e3s4) { // Inline function 'kotlin.collections.isEmpty' call if (_this__u8e3s4.length === 0) return emptyList(); var list = toMutableList(_this__u8e3s4); reverse(list); return list; } function filterNotNull(_this__u8e3s4) { return filterNotNullTo(_this__u8e3s4, ArrayList_init_$Create$()); } function filterNotNullTo(_this__u8e3s4, destination) { var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var element = _this__u8e3s4[inductionVariable]; inductionVariable = inductionVariable + 1 | 0; if (!(element == null)) { destination.d(element); } } return destination; } function distinct(_this__u8e3s4) { return toList_0(toMutableSet(_this__u8e3s4)); } function zip(_this__u8e3s4, other) { // Inline function 'kotlin.collections.zip' call // Inline function 'kotlin.comparisons.minOf' call var a = _this__u8e3s4.length; var b = other.length; var size = Math.min(a, b); var list = ArrayList_init_$Create$_0(size); var inductionVariable = 0; if (inductionVariable < size) do { var i = inductionVariable; inductionVariable = inductionVariable + 1 | 0; // Inline function 'kotlin.collections.zip.<anonymous>' call var t1 = _this__u8e3s4[i]; var t2 = other[i]; var tmp$ret$1 = to(t1, t2); list.d(tmp$ret$1); } while (inductionVariable < size); return list; } function toMutableSet(_this__u8e3s4) { return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length))); } function withIndex$lambda($this_withIndex) { return function () { return arrayIterator($this_withIndex); }; } function joinToString_0(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; return joinTo_0(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString(); } function joinTo_0(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) { separator = separator === VOID ? ', ' : separator; prefix = prefix === VOID ? '' : prefix; postfix = postfix === VOID ? '' : postfix; limit = limit === VOID ? -1 : limit; truncated = truncated === VOID ? '...' : truncated; transform = transform === VOID ? null : transform; buffer.e(prefix); var count = 0; var tmp0_iterator = _this__u8e3s4.i(); $l$loop: while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); count = count + 1 | 0; if (count > 1) { buffer.e(separator); } if (limit < 0 || count <= limit) { appendElement(buffer, element, transform); } else break $l$loop; } if (limit >= 0 && count > limit) { buffer.e(truncated); } buffer.e(postfix); return buffer; } function toHashSet(_this__u8e3s4) { return toCollection_0(_this__u8e3s4, HashSet_init_$Create$_1(mapCapacity(collectionSizeOrDefault(_this__u8e3s4, 12)))); } function toBooleanArray(_this__u8e3s4) { var result = booleanArray(_this__u8e3s4.l()); var index = 0; var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); var tmp1 = index; index = tmp1 + 1 | 0; result[tmp1] = element; } return result; } function toCollection_0(_this__u8e3s4, destination) { var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var item = tmp0_iterator.k(); destination.d(item); } return destination; } function toList_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) { var tmp; switch (_this__u8e3s4.l()) { case 0: tmp = emptyList(); break; case 1: var tmp_0; if (isInterface(_this__u8e3s4, KtList)) { tmp_0 = _this__u8e3s4.m(0); } else { tmp_0 = _this__u8e3s4.i().k(); } tmp = listOf(tmp_0); break; default: tmp = toMutableList_0(_this__u8e3s4); break; } return tmp; } return optimizeReadOnlyList(toMutableList_1(_this__u8e3s4)); } function last(_this__u8e3s4) { if (_this__u8e3s4.n()) throw NoSuchElementException_init_$Create$_0('List is empty.'); return _this__u8e3s4.m(get_lastIndex_2(_this__u8e3s4)); } function singleOrNull(_this__u8e3s4) { return _this__u8e3s4.l() === 1 ? _this__u8e3s4.m(0) : null; } function filterNotNull_0(_this__u8e3s4) { return filterNotNullTo_0(_this__u8e3s4, ArrayList_init_$Create$()); } function single_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, KtList)) return single_1(_this__u8e3s4); else { var iterator = _this__u8e3s4.i(); if (!iterator.j()) throw NoSuchElementException_init_$Create$_0('Collection is empty.'); var single = iterator.k(); if (iterator.j()) throw IllegalArgumentException_init_$Create$_0('Collection has more than one element.'); return single; } } function toMutableList_0(_this__u8e3s4) { return ArrayList_init_$Create$_1(_this__u8e3s4); } function toMutableList_1(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) return toMutableList_0(_this__u8e3s4); return toCollection_0(_this__u8e3s4, ArrayList_init_$Create$()); } function filterNotNullTo_0(_this__u8e3s4, destination) { var tmp0_iterator = _this__u8e3s4.i(); while (tmp0_iterator.j()) { var element = tmp0_iterator.k(); if (!(element == null)) { destination.d(element); } } return destination; } function single_1(_this__u8e3s4) { var tmp; switch (_this__u8e3s4.l()) { case 0: throw NoSuchElementException_init_$Create$_0('List is empty.'); case 1: tmp = _this__u8e3s4.m(0); break; default: throw IllegalArgumentException_init_$Create$_0('List has more than one element.'); } return tmp; } function toSet_0(_this__u8e3s4) { if (isInterface(_this__u8e3s4, Collection)) { var tmp; switch (_this__u8e3s4.l()) { case 0: tmp = emptySet(); break; case 1: var tmp_0; if (isInterface(_this__u8e3s4, KtList)) { tmp_0 = _this__u8e3s4.m(0); } else { tmp_0 = _this__u8e3s4.i().k(); } tmp = setOf(tmp_0); break; default: tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.l()))); break; } return tmp; } return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$())); } function lastOrNull(_this__u8e3s4) { return _this__u8e3s4.n() ? null : _this__u8e3s4.m(_this__u8e3s4.l() - 1 | 0); } function minOrNull(_this__u8e3s4) { var iterator = _this__u8e3s4.i(); if (!iterator.j()) return null; var min = iterator.k(); while (iterator.j()) { var e = iterator.k(); if (compareTo(min, e) > 0) min = e; } return min; } function titlecaseImpl(_this__u8e3s4) { // Inline function 'kotlin.text.uppercase' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var uppercase = toString(_this__u8e3s4).toUpperCase(); if (uppercase.length > 1) { var tmp; if (_this__u8e3s4 === _Char___init__impl__6a9atx(329)) { tmp = uppercase; } else { // Inline function 'kotlin.text.plus' call var this_0 = charSequenceGet(uppercase, 0); // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.text.substring' call // Inline function 'kotlin.js.asDynamic' call // Inline function 'kotlin.js.asDynamic' call var other = uppercase.substring(1).toLowerCase(); tmp = toString(this_0) + other; } return tmp; } return toString(titlecaseChar(_this__u8e3s4)); } function until(_this__u8e3s4, to) { if (to <= -2147483648) return Companion_getInstance_9().o_1; return numberRangeToNumber(_this__u8e3s4, to - 1 | 0); } function step(_this__u8e3s4, step) { checkStepIsPositive(step > 0, step); return Companion_instance_10.s(_this__u8e3s4.p_1, _this__u8e3s4.q_1, _this__u8e3s4.r_1 > 0 ? step : -step | 0); } function coerceAtLeast(_this__u8e3s4, minimumValue) { return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4; } function random(_this__u8e3s4, random) { try { return nextInt(random, _this__u8e3s4); } catch ($p) { if ($p instanceof IllegalArgumentException) { var e = $p; throw NoSuchElementException_init_$Create$_0(e.message); } else { throw $p; } } } function coerceIn(_this__u8e3s4, minimumValue, maximumValue) { if (minimumValue.v(maximumValue) > 0) throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue.toString() + ' is less than minimum ' + minimumValue.toString() + '.'); if (_this__u8e3s4.v(minimumValue) < 0) return minimumValue; if (_this__u8e3s4.v(maximumValue) > 0) return maximumValue; return _this__u8e3s4; } function coerceAtMost(_this__u8e3s4, maximumValue) { return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4; } function downTo(_this__u8e3s4, to) { return Companion_instance_10.s(_this__u8e3s4, to, -1); } function coerceIn_0(_this__u8e3s4, minimumValue, maximumValue) { if (minimumValue > maximumValue) throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.'); if (_this__u8e3s4 < minimumValue) return minimumValue; if (_this__u8e3s4 > maximumValue) return maximumValue; return _this__u8e3s4; } function asIterable(_this__u8e3s4) { // Inline function 'kotlin.collections.Iterable' call return new _no_name_provided__qut3iv(_this__u8e3s4); } function map(_this__u8e3s4, transform) { return new TransformingSequence(_this__u8e3s4, transform); } function toList_1(_this__u8e3s4) { var it = _this__u8e3s4.i(); if (!it.j()) return emptyList(); var element = it.k(); if (!it.j()) return listOf(element); var dst = ArrayList_init_$Create$(); dst.d(element); while (it.j()) { dst.d(it.k()); } return dst; } function _no_name_provided__qut3iv($this_asIterable) { this.w_1 = $this_asIterable; } protoOf(_no_name_provided__qut3iv).i = function () { // Inline function 'kotlin.sequences.asIterable.<anonymous>' call return this.w_1.i(); }; function plus(_this__u8e3s4, elements) { var tmp0_safe_receiver = collectionSizeOrNull(elements); var tmp; if (tmp0_safe_receiver == null) { tmp = null; } else { // Inline function 'kotlin.let' call // Inline function 'kotlin.contracts.contract' call // Inline function 'kotlin.collections.plus.<anonymous>' call tmp = _this__u8e3s4.l() + tmp0_safe_receiver | 0; } var tmp1_elvis_lhs = tmp; var